diff --git a/.gitignore b/.gitignore index f659a544..652c5071 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,10 @@ go.work.sum # Local Go build cache .gocache/ +# Node dependencies (per-tree .gitignores cover admin/site/docs/web; this +# also catches a stray root-level install / pnpm store) +node_modules/ + # Local pnpm store created by dockerized frontend installs web/.pnpm-store/ diff --git a/docs/public/banner.svg b/docs/public/banner.svg index 449e3a0b..bd9bb4e0 100644 --- a/docs/public/banner.svg +++ b/docs/public/banner.svg @@ -1,90 +1,58 @@ Warmbly - - - - - - - - + + + + + + + - - - - - - + + + + - - - - - - + + + + - - - - - + + + - - - + + - - - - - - - - - - - - + - - - - - + + + + + + + + - - - - - - - + + + + + + + + Warmbly - - - + COLD EMAIL · MAILBOX WARMUP · SELF-HOSTED - - - - - Warmbly - - - COLD EMAIL · MAILBOX WARMUP · SELF-HOSTED - - - + diff --git a/node_modules/.modules.yaml b/node_modules/.modules.yaml deleted file mode 100644 index a1d09db0..00000000 --- a/node_modules/.modules.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{ - "hoistedDependencies": { - "tslib@2.8.1": { - "tslib": "private" - }, - "framer-motion@12.40.0": { - "framer-motion": "private" - }, - "motion-utils@12.39.0": { - "motion-utils": "private" - }, - "motion-dom@12.40.0": { - "motion-dom": "private" - } - }, - "hoistPattern": [ - "*" - ], - "included": { - "dependencies": true, - "devDependencies": true, - "optionalDependencies": true - }, - "injectedDeps": {}, - "layoutVersion": 5, - "nodeLinker": "isolated", - "packageManager": "pnpm@10.30.3", - "pendingBuilds": [], - "publicHoistPattern": [], - "prunedAt": "Tue, 26 May 2026 07:22:09 GMT", - "registries": { - "default": "https://registry.npmjs.org/", - "@jsr": "https://npm.jsr.io/" - }, - "skipped": [], - "storeDir": "/home/meszmate/.local/share/pnpm/store/v10", - "virtualStoreDir": ".pnpm", - "virtualStoreDirMaxLength": 120 -} \ No newline at end of file diff --git a/node_modules/.pnpm-workspace-state-v1.json b/node_modules/.pnpm-workspace-state-v1.json deleted file mode 100644 index 0f7cf892..00000000 --- a/node_modules/.pnpm-workspace-state-v1.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "lastValidatedTimestamp": 1779780129207, - "projects": {}, - "pnpmfiles": [], - "settings": { - "autoInstallPeers": true, - "dedupeDirectDeps": false, - "dedupeInjectedDeps": true, - "dedupePeerDependents": true, - "dev": true, - "excludeLinksFromLockfile": false, - "hoistPattern": [ - "*" - ], - "hoistWorkspacePackages": true, - "injectWorkspacePackages": false, - "linkWorkspacePackages": false, - "nodeLinker": "isolated", - "optional": true, - "preferWorkspacePackages": false, - "production": true, - "publicHoistPattern": [] - }, - "filteredInstall": false -} diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/LICENSE.md b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/LICENSE.md deleted file mode 100644 index b5b8d6a8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Framer B.V. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/README.md b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/README.md deleted file mode 100644 index a997d7bc..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/README.md +++ /dev/null @@ -1,136 +0,0 @@ -

Motion logo
Motion for React

-

- An open source animation library
for React -

- -

- npm version - npm downloads per month - jsDelivr hits (npm) - NPM License -

- -```bash -npm install motion -``` - -## Table of Contents - -1. [Why Motion?](#why-motion) -2. [🍦 Platforms](#-platforms) -3. [🎓 Examples](#-examples) -4. [⚡️ Motion+](#-motion) -5. [👩🏻‍⚖️ License](#-license) -6. [💎 Contribute](#-contribute) -7. [✨ Sponsors](#-sponsors) - -## Why Motion? - -- **Simple API:** First-class React, JavaScript, and Vue packages. -- **Hybrid engine:** Power of JavaScript combined with native browser APIs for 120fps, GPU-accelerated animations. -- **Production-ready:** TypeScript, extensive test suite, tree-shakable, tiny footprint. - **Batteries included:** Gestures, springs, layout transitions, scroll-linked effects, timelines. - -## 🍦 Platforms - -Motion is available for [React](https://motion.dev/docs/react), [JavaScript](https://motion.dev/docs/quick-start) and [Vue](https://motion.dev/docs/vue). - -### React - -```jsx -import { motion } from "motion/react" - -function Component() { - return -} -``` - -Get started with [Motion for React](https://motion.dev/docs/react). - -**Note:** Framer Motion is now Motion. Import from `motion/react` instead of `framer-motion`. - -### JS - -```javascript -import { animate } from "motion" - -animate("#box", { x: 100 }) -``` - -Get started with [JavaScript](https://motion.dev/docs/quick-start). - -### Vue - -```html - - - -``` - -Get started with [Motion for Vue](https://motion.dev/docs/vue). - -## 🎓 Examples & tutorials - -Browse 330+ [official examples](https://motion.dev/examples), with copy-paste code that'll level-up your animations whether you're a beginner or an expert. - -Over 100 examples come with a full step-by-step [tutorial](https://motion.dev/tutorials). - -## ⚡️ Motion+ - -A one-time payment, lifetime-updates membership: - -- **330+ examples** -- **100+ tutorials** -- **Premium APIs** like [Cursor](https://motion.dev/docs/cursor) and [Ticker](https://motion.dev/docs/react-ticker) -- **Transition editor** for Cursor and VS Code -- **AI skills** -- **Private Discord** -- **Early access content** - -[Get Motion+](https://motion.dev/plus) - -## 👩🏻‍⚖️ License - -- Motion is MIT licensed. - -## 💎 Contribute - -- Want to contribute to Motion? Our [contributing guide](https://github.com/motiondivision/motion/blob/master/CONTRIBUTING.md) has you covered. - -## ✨ Sponsors - -Motion is sustainable thanks to the kind support of its sponsors. - -[Become a sponsor](https://motion.dev/sponsor) - -### Partners - -Motion powers the animations for all websites built with Framer, the web builder for creative pros. The Motion website itself is built on Framer, for its delightful canvas-based editing and powerful CMS features. - - - Framer - - -Motion drives the animations on the Cursor homepage, and is working with Cursor to bring powerful AI workflows to the Motion examples and docs. - - - Cursor - - -### Platinum - -Linear Figma Sanity Sanity Clerk - -### Gold - -### Silver - -Liveblocks Frontend.fyi Firecrawl Puzzmo Bolt.new - -### Personal - -- [OlegWock](https://sinja.io) -- [Lambert Weller](https://github.com/l-mbert) -- [Jake LeBoeuf](https://jklb.wf) diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/client/README.md b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/client/README.md deleted file mode 100644 index 00af8b44..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/client/README.md +++ /dev/null @@ -1 +0,0 @@ -This directory is a fallback for `exports["./client"]` in the root `framer-motion` `package.json`. diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/client/package.json b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/client/package.json deleted file mode 100644 index c4eeff4b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/client/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "types": "../dist/client.d.ts", - "main": "../dist/cjs/client.js", - "module": "../dist/es/client.mjs" -} diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/client.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/client.js deleted file mode 100644 index fdbcb838..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/client.js +++ /dev/null @@ -1,370 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var index = require('./index-6W16WHlG.js'); -var featureBundle = require('./feature-bundle-frRcWALD.js'); -require('react/jsx-runtime'); -require('motion-utils'); -require('react'); -require('motion-dom'); - -function createMotionComponentWithFeatures(Component, options) { - return index.createMotionComponent(Component, options, featureBundle.featureBundle, featureBundle.createDomVisualElement); -} - -/** - * HTML components - */ -const MotionA = /*@__PURE__*/ createMotionComponentWithFeatures("a"); -const MotionAbbr = /*@__PURE__*/ createMotionComponentWithFeatures("abbr"); -const MotionAddress = /*@__PURE__*/ createMotionComponentWithFeatures("address"); -const MotionArea = /*@__PURE__*/ createMotionComponentWithFeatures("area"); -const MotionArticle = /*@__PURE__*/ createMotionComponentWithFeatures("article"); -const MotionAside = /*@__PURE__*/ createMotionComponentWithFeatures("aside"); -const MotionAudio = /*@__PURE__*/ createMotionComponentWithFeatures("audio"); -const MotionB = /*@__PURE__*/ createMotionComponentWithFeatures("b"); -const MotionBase = /*@__PURE__*/ createMotionComponentWithFeatures("base"); -const MotionBdi = /*@__PURE__*/ createMotionComponentWithFeatures("bdi"); -const MotionBdo = /*@__PURE__*/ createMotionComponentWithFeatures("bdo"); -const MotionBig = /*@__PURE__*/ createMotionComponentWithFeatures("big"); -const MotionBlockquote = -/*@__PURE__*/ createMotionComponentWithFeatures("blockquote"); -const MotionBody = /*@__PURE__*/ createMotionComponentWithFeatures("body"); -const MotionButton = /*@__PURE__*/ createMotionComponentWithFeatures("button"); -const MotionCanvas = /*@__PURE__*/ createMotionComponentWithFeatures("canvas"); -const MotionCaption = /*@__PURE__*/ createMotionComponentWithFeatures("caption"); -const MotionCite = /*@__PURE__*/ createMotionComponentWithFeatures("cite"); -const MotionCode = /*@__PURE__*/ createMotionComponentWithFeatures("code"); -const MotionCol = /*@__PURE__*/ createMotionComponentWithFeatures("col"); -const MotionColgroup = /*@__PURE__*/ createMotionComponentWithFeatures("colgroup"); -const MotionData = /*@__PURE__*/ createMotionComponentWithFeatures("data"); -const MotionDatalist = /*@__PURE__*/ createMotionComponentWithFeatures("datalist"); -const MotionDd = /*@__PURE__*/ createMotionComponentWithFeatures("dd"); -const MotionDel = /*@__PURE__*/ createMotionComponentWithFeatures("del"); -const MotionDetails = /*@__PURE__*/ createMotionComponentWithFeatures("details"); -const MotionDfn = /*@__PURE__*/ createMotionComponentWithFeatures("dfn"); -const MotionDialog = /*@__PURE__*/ createMotionComponentWithFeatures("dialog"); -const MotionDiv = /*@__PURE__*/ createMotionComponentWithFeatures("div"); -const MotionDl = /*@__PURE__*/ createMotionComponentWithFeatures("dl"); -const MotionDt = /*@__PURE__*/ createMotionComponentWithFeatures("dt"); -const MotionEm = /*@__PURE__*/ createMotionComponentWithFeatures("em"); -const MotionEmbed = /*@__PURE__*/ createMotionComponentWithFeatures("embed"); -const MotionFieldset = /*@__PURE__*/ createMotionComponentWithFeatures("fieldset"); -const MotionFigcaption = -/*@__PURE__*/ createMotionComponentWithFeatures("figcaption"); -const MotionFigure = /*@__PURE__*/ createMotionComponentWithFeatures("figure"); -const MotionFooter = /*@__PURE__*/ createMotionComponentWithFeatures("footer"); -const MotionForm = /*@__PURE__*/ createMotionComponentWithFeatures("form"); -const MotionH1 = /*@__PURE__*/ createMotionComponentWithFeatures("h1"); -const MotionH2 = /*@__PURE__*/ createMotionComponentWithFeatures("h2"); -const MotionH3 = /*@__PURE__*/ createMotionComponentWithFeatures("h3"); -const MotionH4 = /*@__PURE__*/ createMotionComponentWithFeatures("h4"); -const MotionH5 = /*@__PURE__*/ createMotionComponentWithFeatures("h5"); -const MotionH6 = /*@__PURE__*/ createMotionComponentWithFeatures("h6"); -const MotionHead = /*@__PURE__*/ createMotionComponentWithFeatures("head"); -const MotionHeader = /*@__PURE__*/ createMotionComponentWithFeatures("header"); -const MotionHgroup = /*@__PURE__*/ createMotionComponentWithFeatures("hgroup"); -const MotionHr = /*@__PURE__*/ createMotionComponentWithFeatures("hr"); -const MotionHtml = /*@__PURE__*/ createMotionComponentWithFeatures("html"); -const MotionI = /*@__PURE__*/ createMotionComponentWithFeatures("i"); -const MotionIframe = /*@__PURE__*/ createMotionComponentWithFeatures("iframe"); -const MotionImg = /*@__PURE__*/ createMotionComponentWithFeatures("img"); -const MotionInput = /*@__PURE__*/ createMotionComponentWithFeatures("input"); -const MotionIns = /*@__PURE__*/ createMotionComponentWithFeatures("ins"); -const MotionKbd = /*@__PURE__*/ createMotionComponentWithFeatures("kbd"); -const MotionKeygen = /*@__PURE__*/ createMotionComponentWithFeatures("keygen"); -const MotionLabel = /*@__PURE__*/ createMotionComponentWithFeatures("label"); -const MotionLegend = /*@__PURE__*/ createMotionComponentWithFeatures("legend"); -const MotionLi = /*@__PURE__*/ createMotionComponentWithFeatures("li"); -const MotionLink = /*@__PURE__*/ createMotionComponentWithFeatures("link"); -const MotionMain = /*@__PURE__*/ createMotionComponentWithFeatures("main"); -const MotionMap = /*@__PURE__*/ createMotionComponentWithFeatures("map"); -const MotionMark = /*@__PURE__*/ createMotionComponentWithFeatures("mark"); -const MotionMenu = /*@__PURE__*/ createMotionComponentWithFeatures("menu"); -const MotionMenuitem = /*@__PURE__*/ createMotionComponentWithFeatures("menuitem"); -const MotionMeter = /*@__PURE__*/ createMotionComponentWithFeatures("meter"); -const MotionNav = /*@__PURE__*/ createMotionComponentWithFeatures("nav"); -const MotionObject = /*@__PURE__*/ createMotionComponentWithFeatures("object"); -const MotionOl = /*@__PURE__*/ createMotionComponentWithFeatures("ol"); -const MotionOptgroup = /*@__PURE__*/ createMotionComponentWithFeatures("optgroup"); -const MotionOption = /*@__PURE__*/ createMotionComponentWithFeatures("option"); -const MotionOutput = /*@__PURE__*/ createMotionComponentWithFeatures("output"); -const MotionP = /*@__PURE__*/ createMotionComponentWithFeatures("p"); -const MotionParam = /*@__PURE__*/ createMotionComponentWithFeatures("param"); -const MotionPicture = /*@__PURE__*/ createMotionComponentWithFeatures("picture"); -const MotionPre = /*@__PURE__*/ createMotionComponentWithFeatures("pre"); -const MotionProgress = /*@__PURE__*/ createMotionComponentWithFeatures("progress"); -const MotionQ = /*@__PURE__*/ createMotionComponentWithFeatures("q"); -const MotionRp = /*@__PURE__*/ createMotionComponentWithFeatures("rp"); -const MotionRt = /*@__PURE__*/ createMotionComponentWithFeatures("rt"); -const MotionRuby = /*@__PURE__*/ createMotionComponentWithFeatures("ruby"); -const MotionS = /*@__PURE__*/ createMotionComponentWithFeatures("s"); -const MotionSamp = /*@__PURE__*/ createMotionComponentWithFeatures("samp"); -const MotionScript = /*@__PURE__*/ createMotionComponentWithFeatures("script"); -const MotionSection = /*@__PURE__*/ createMotionComponentWithFeatures("section"); -const MotionSelect = /*@__PURE__*/ createMotionComponentWithFeatures("select"); -const MotionSmall = /*@__PURE__*/ createMotionComponentWithFeatures("small"); -const MotionSource = /*@__PURE__*/ createMotionComponentWithFeatures("source"); -const MotionSpan = /*@__PURE__*/ createMotionComponentWithFeatures("span"); -const MotionStrong = /*@__PURE__*/ createMotionComponentWithFeatures("strong"); -const MotionStyle = /*@__PURE__*/ createMotionComponentWithFeatures("style"); -const MotionSub = /*@__PURE__*/ createMotionComponentWithFeatures("sub"); -const MotionSummary = /*@__PURE__*/ createMotionComponentWithFeatures("summary"); -const MotionSup = /*@__PURE__*/ createMotionComponentWithFeatures("sup"); -const MotionTable = /*@__PURE__*/ createMotionComponentWithFeatures("table"); -const MotionTbody = /*@__PURE__*/ createMotionComponentWithFeatures("tbody"); -const MotionTd = /*@__PURE__*/ createMotionComponentWithFeatures("td"); -const MotionTextarea = /*@__PURE__*/ createMotionComponentWithFeatures("textarea"); -const MotionTfoot = /*@__PURE__*/ createMotionComponentWithFeatures("tfoot"); -const MotionTh = /*@__PURE__*/ createMotionComponentWithFeatures("th"); -const MotionThead = /*@__PURE__*/ createMotionComponentWithFeatures("thead"); -const MotionTime = /*@__PURE__*/ createMotionComponentWithFeatures("time"); -const MotionTitle = /*@__PURE__*/ createMotionComponentWithFeatures("title"); -const MotionTr = /*@__PURE__*/ createMotionComponentWithFeatures("tr"); -const MotionTrack = /*@__PURE__*/ createMotionComponentWithFeatures("track"); -const MotionU = /*@__PURE__*/ createMotionComponentWithFeatures("u"); -const MotionUl = /*@__PURE__*/ createMotionComponentWithFeatures("ul"); -const MotionVideo = /*@__PURE__*/ createMotionComponentWithFeatures("video"); -const MotionWbr = /*@__PURE__*/ createMotionComponentWithFeatures("wbr"); -const MotionWebview = /*@__PURE__*/ createMotionComponentWithFeatures("webview"); -/** - * SVG components - */ -const MotionAnimate = /*@__PURE__*/ createMotionComponentWithFeatures("animate"); -const MotionCircle = /*@__PURE__*/ createMotionComponentWithFeatures("circle"); -const MotionDefs = /*@__PURE__*/ createMotionComponentWithFeatures("defs"); -const MotionDesc = /*@__PURE__*/ createMotionComponentWithFeatures("desc"); -const MotionEllipse = /*@__PURE__*/ createMotionComponentWithFeatures("ellipse"); -const MotionG = /*@__PURE__*/ createMotionComponentWithFeatures("g"); -const MotionImage = /*@__PURE__*/ createMotionComponentWithFeatures("image"); -const MotionLine = /*@__PURE__*/ createMotionComponentWithFeatures("line"); -const MotionFilter = /*@__PURE__*/ createMotionComponentWithFeatures("filter"); -const MotionMarker = /*@__PURE__*/ createMotionComponentWithFeatures("marker"); -const MotionMask = /*@__PURE__*/ createMotionComponentWithFeatures("mask"); -const MotionMetadata = /*@__PURE__*/ createMotionComponentWithFeatures("metadata"); -const MotionPath = /*@__PURE__*/ createMotionComponentWithFeatures("path"); -const MotionPattern = /*@__PURE__*/ createMotionComponentWithFeatures("pattern"); -const MotionPolygon = /*@__PURE__*/ createMotionComponentWithFeatures("polygon"); -const MotionPolyline = /*@__PURE__*/ createMotionComponentWithFeatures("polyline"); -const MotionRect = /*@__PURE__*/ createMotionComponentWithFeatures("rect"); -const MotionStop = /*@__PURE__*/ createMotionComponentWithFeatures("stop"); -const MotionSvg = /*@__PURE__*/ createMotionComponentWithFeatures("svg"); -const MotionSymbol = /*@__PURE__*/ createMotionComponentWithFeatures("symbol"); -const MotionText = /*@__PURE__*/ createMotionComponentWithFeatures("text"); -const MotionTspan = /*@__PURE__*/ createMotionComponentWithFeatures("tspan"); -const MotionUse = /*@__PURE__*/ createMotionComponentWithFeatures("use"); -const MotionView = /*@__PURE__*/ createMotionComponentWithFeatures("view"); -const MotionClipPath = /*@__PURE__*/ createMotionComponentWithFeatures("clipPath"); -const MotionFeBlend = /*@__PURE__*/ createMotionComponentWithFeatures("feBlend"); -const MotionFeColorMatrix = -/*@__PURE__*/ createMotionComponentWithFeatures("feColorMatrix"); -const MotionFeComponentTransfer = /*@__PURE__*/ createMotionComponentWithFeatures("feComponentTransfer"); -const MotionFeComposite = -/*@__PURE__*/ createMotionComponentWithFeatures("feComposite"); -const MotionFeConvolveMatrix = -/*@__PURE__*/ createMotionComponentWithFeatures("feConvolveMatrix"); -const MotionFeDiffuseLighting = -/*@__PURE__*/ createMotionComponentWithFeatures("feDiffuseLighting"); -const MotionFeDisplacementMap = -/*@__PURE__*/ createMotionComponentWithFeatures("feDisplacementMap"); -const MotionFeDistantLight = -/*@__PURE__*/ createMotionComponentWithFeatures("feDistantLight"); -const MotionFeDropShadow = -/*@__PURE__*/ createMotionComponentWithFeatures("feDropShadow"); -const MotionFeFlood = /*@__PURE__*/ createMotionComponentWithFeatures("feFlood"); -const MotionFeFuncA = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncA"); -const MotionFeFuncB = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncB"); -const MotionFeFuncG = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncG"); -const MotionFeFuncR = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncR"); -const MotionFeGaussianBlur = -/*@__PURE__*/ createMotionComponentWithFeatures("feGaussianBlur"); -const MotionFeImage = /*@__PURE__*/ createMotionComponentWithFeatures("feImage"); -const MotionFeMerge = /*@__PURE__*/ createMotionComponentWithFeatures("feMerge"); -const MotionFeMergeNode = -/*@__PURE__*/ createMotionComponentWithFeatures("feMergeNode"); -const MotionFeMorphology = -/*@__PURE__*/ createMotionComponentWithFeatures("feMorphology"); -const MotionFeOffset = /*@__PURE__*/ createMotionComponentWithFeatures("feOffset"); -const MotionFePointLight = -/*@__PURE__*/ createMotionComponentWithFeatures("fePointLight"); -const MotionFeSpecularLighting = -/*@__PURE__*/ createMotionComponentWithFeatures("feSpecularLighting"); -const MotionFeSpotLight = -/*@__PURE__*/ createMotionComponentWithFeatures("feSpotLight"); -const MotionFeTile = /*@__PURE__*/ createMotionComponentWithFeatures("feTile"); -const MotionFeTurbulence = -/*@__PURE__*/ createMotionComponentWithFeatures("feTurbulence"); -const MotionForeignObject = -/*@__PURE__*/ createMotionComponentWithFeatures("foreignObject"); -const MotionLinearGradient = -/*@__PURE__*/ createMotionComponentWithFeatures("linearGradient"); -const MotionRadialGradient = -/*@__PURE__*/ createMotionComponentWithFeatures("radialGradient"); -const MotionTextPath = /*@__PURE__*/ createMotionComponentWithFeatures("textPath"); - -exports.a = MotionA; -exports.abbr = MotionAbbr; -exports.address = MotionAddress; -exports.animate = MotionAnimate; -exports.area = MotionArea; -exports.article = MotionArticle; -exports.aside = MotionAside; -exports.audio = MotionAudio; -exports.b = MotionB; -exports.base = MotionBase; -exports.bdi = MotionBdi; -exports.bdo = MotionBdo; -exports.big = MotionBig; -exports.blockquote = MotionBlockquote; -exports.body = MotionBody; -exports.button = MotionButton; -exports.canvas = MotionCanvas; -exports.caption = MotionCaption; -exports.circle = MotionCircle; -exports.cite = MotionCite; -exports.clipPath = MotionClipPath; -exports.code = MotionCode; -exports.col = MotionCol; -exports.colgroup = MotionColgroup; -exports.data = MotionData; -exports.datalist = MotionDatalist; -exports.dd = MotionDd; -exports.defs = MotionDefs; -exports.del = MotionDel; -exports.desc = MotionDesc; -exports.details = MotionDetails; -exports.dfn = MotionDfn; -exports.dialog = MotionDialog; -exports.div = MotionDiv; -exports.dl = MotionDl; -exports.dt = MotionDt; -exports.ellipse = MotionEllipse; -exports.em = MotionEm; -exports.embed = MotionEmbed; -exports.feBlend = MotionFeBlend; -exports.feColorMatrix = MotionFeColorMatrix; -exports.feComponentTransfer = MotionFeComponentTransfer; -exports.feComposite = MotionFeComposite; -exports.feConvolveMatrix = MotionFeConvolveMatrix; -exports.feDiffuseLighting = MotionFeDiffuseLighting; -exports.feDisplacementMap = MotionFeDisplacementMap; -exports.feDistantLight = MotionFeDistantLight; -exports.feDropShadow = MotionFeDropShadow; -exports.feFlood = MotionFeFlood; -exports.feFuncA = MotionFeFuncA; -exports.feFuncB = MotionFeFuncB; -exports.feFuncG = MotionFeFuncG; -exports.feFuncR = MotionFeFuncR; -exports.feGaussianBlur = MotionFeGaussianBlur; -exports.feImage = MotionFeImage; -exports.feMerge = MotionFeMerge; -exports.feMergeNode = MotionFeMergeNode; -exports.feMorphology = MotionFeMorphology; -exports.feOffset = MotionFeOffset; -exports.fePointLight = MotionFePointLight; -exports.feSpecularLighting = MotionFeSpecularLighting; -exports.feSpotLight = MotionFeSpotLight; -exports.feTile = MotionFeTile; -exports.feTurbulence = MotionFeTurbulence; -exports.fieldset = MotionFieldset; -exports.figcaption = MotionFigcaption; -exports.figure = MotionFigure; -exports.filter = MotionFilter; -exports.footer = MotionFooter; -exports.foreignObject = MotionForeignObject; -exports.form = MotionForm; -exports.g = MotionG; -exports.h1 = MotionH1; -exports.h2 = MotionH2; -exports.h3 = MotionH3; -exports.h4 = MotionH4; -exports.h5 = MotionH5; -exports.h6 = MotionH6; -exports.head = MotionHead; -exports.header = MotionHeader; -exports.hgroup = MotionHgroup; -exports.hr = MotionHr; -exports.html = MotionHtml; -exports.i = MotionI; -exports.iframe = MotionIframe; -exports.image = MotionImage; -exports.img = MotionImg; -exports.input = MotionInput; -exports.ins = MotionIns; -exports.kbd = MotionKbd; -exports.keygen = MotionKeygen; -exports.label = MotionLabel; -exports.legend = MotionLegend; -exports.li = MotionLi; -exports.line = MotionLine; -exports.linearGradient = MotionLinearGradient; -exports.link = MotionLink; -exports.main = MotionMain; -exports.map = MotionMap; -exports.mark = MotionMark; -exports.marker = MotionMarker; -exports.mask = MotionMask; -exports.menu = MotionMenu; -exports.menuitem = MotionMenuitem; -exports.metadata = MotionMetadata; -exports.meter = MotionMeter; -exports.nav = MotionNav; -exports.object = MotionObject; -exports.ol = MotionOl; -exports.optgroup = MotionOptgroup; -exports.option = MotionOption; -exports.output = MotionOutput; -exports.p = MotionP; -exports.param = MotionParam; -exports.path = MotionPath; -exports.pattern = MotionPattern; -exports.picture = MotionPicture; -exports.polygon = MotionPolygon; -exports.polyline = MotionPolyline; -exports.pre = MotionPre; -exports.progress = MotionProgress; -exports.q = MotionQ; -exports.radialGradient = MotionRadialGradient; -exports.rect = MotionRect; -exports.rp = MotionRp; -exports.rt = MotionRt; -exports.ruby = MotionRuby; -exports.s = MotionS; -exports.samp = MotionSamp; -exports.script = MotionScript; -exports.section = MotionSection; -exports.select = MotionSelect; -exports.small = MotionSmall; -exports.source = MotionSource; -exports.span = MotionSpan; -exports.stop = MotionStop; -exports.strong = MotionStrong; -exports.style = MotionStyle; -exports.sub = MotionSub; -exports.summary = MotionSummary; -exports.sup = MotionSup; -exports.svg = MotionSvg; -exports.symbol = MotionSymbol; -exports.table = MotionTable; -exports.tbody = MotionTbody; -exports.td = MotionTd; -exports.text = MotionText; -exports.textPath = MotionTextPath; -exports.textarea = MotionTextarea; -exports.tfoot = MotionTfoot; -exports.th = MotionTh; -exports.thead = MotionThead; -exports.time = MotionTime; -exports.title = MotionTitle; -exports.tr = MotionTr; -exports.track = MotionTrack; -exports.tspan = MotionTspan; -exports.u = MotionU; -exports.ul = MotionUl; -exports.use = MotionUse; -exports.video = MotionVideo; -exports.view = MotionView; -exports.wbr = MotionWbr; -exports.webview = MotionWebview; -//# sourceMappingURL=client.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/client.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/client.js.map deleted file mode 100644 index 4663f043..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sources":["../../src/render/components/motion/create.ts","../../src/render/components/motion/elements.ts"],"sourcesContent":["import { createMotionComponent, MotionComponentOptions } from \"../../../motion\"\nimport { createDomVisualElement } from \"../../dom/create-visual-element\"\nimport { DOMMotionComponents } from \"../../dom/types\"\nimport { CreateVisualElement } from \"../../types\"\nimport { featureBundle } from \"./feature-bundle\"\n\nexport function createMotionComponentWithFeatures<\n Props,\n TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n Component: TagName | string | React.ComponentType,\n options?: MotionComponentOptions\n) {\n return createMotionComponent(\n Component,\n options,\n featureBundle,\n createDomVisualElement as CreateVisualElement\n )\n}\n","\"use client\"\n\nimport { createMotionComponentWithFeatures as createMotionComponent } from \"./create\"\n\n/**\n * HTML components\n */\nexport const MotionA = /*@__PURE__*/ createMotionComponent(\"a\")\nexport const MotionAbbr = /*@__PURE__*/ createMotionComponent(\"abbr\")\nexport const MotionAddress = /*@__PURE__*/ createMotionComponent(\"address\")\nexport const MotionArea = /*@__PURE__*/ createMotionComponent(\"area\")\nexport const MotionArticle = /*@__PURE__*/ createMotionComponent(\"article\")\nexport const MotionAside = /*@__PURE__*/ createMotionComponent(\"aside\")\nexport const MotionAudio = /*@__PURE__*/ createMotionComponent(\"audio\")\nexport const MotionB = /*@__PURE__*/ createMotionComponent(\"b\")\nexport const MotionBase = /*@__PURE__*/ createMotionComponent(\"base\")\nexport const MotionBdi = /*@__PURE__*/ createMotionComponent(\"bdi\")\nexport const MotionBdo = /*@__PURE__*/ createMotionComponent(\"bdo\")\nexport const MotionBig = /*@__PURE__*/ createMotionComponent(\"big\")\nexport const MotionBlockquote =\n /*@__PURE__*/ createMotionComponent(\"blockquote\")\nexport const MotionBody = /*@__PURE__*/ createMotionComponent(\"body\")\nexport const MotionButton = /*@__PURE__*/ createMotionComponent(\"button\")\nexport const MotionCanvas = /*@__PURE__*/ createMotionComponent(\"canvas\")\nexport const MotionCaption = /*@__PURE__*/ createMotionComponent(\"caption\")\nexport const MotionCite = /*@__PURE__*/ createMotionComponent(\"cite\")\nexport const MotionCode = /*@__PURE__*/ createMotionComponent(\"code\")\nexport const MotionCol = /*@__PURE__*/ createMotionComponent(\"col\")\nexport const MotionColgroup = /*@__PURE__*/ createMotionComponent(\"colgroup\")\nexport const MotionData = /*@__PURE__*/ createMotionComponent(\"data\")\nexport const MotionDatalist = /*@__PURE__*/ createMotionComponent(\"datalist\")\nexport const MotionDd = /*@__PURE__*/ createMotionComponent(\"dd\")\nexport const MotionDel = /*@__PURE__*/ createMotionComponent(\"del\")\nexport const MotionDetails = /*@__PURE__*/ createMotionComponent(\"details\")\nexport const MotionDfn = /*@__PURE__*/ createMotionComponent(\"dfn\")\nexport const MotionDialog = /*@__PURE__*/ createMotionComponent(\"dialog\")\nexport const MotionDiv = /*@__PURE__*/ createMotionComponent(\"div\")\nexport const MotionDl = /*@__PURE__*/ createMotionComponent(\"dl\")\nexport const MotionDt = /*@__PURE__*/ createMotionComponent(\"dt\")\nexport const MotionEm = /*@__PURE__*/ createMotionComponent(\"em\")\nexport const MotionEmbed = /*@__PURE__*/ createMotionComponent(\"embed\")\nexport const MotionFieldset = /*@__PURE__*/ createMotionComponent(\"fieldset\")\nexport const MotionFigcaption =\n /*@__PURE__*/ createMotionComponent(\"figcaption\")\nexport const MotionFigure = /*@__PURE__*/ createMotionComponent(\"figure\")\nexport const MotionFooter = /*@__PURE__*/ createMotionComponent(\"footer\")\nexport const MotionForm = /*@__PURE__*/ createMotionComponent(\"form\")\nexport const MotionH1 = /*@__PURE__*/ createMotionComponent(\"h1\")\nexport const MotionH2 = /*@__PURE__*/ createMotionComponent(\"h2\")\nexport const MotionH3 = /*@__PURE__*/ createMotionComponent(\"h3\")\nexport const MotionH4 = /*@__PURE__*/ createMotionComponent(\"h4\")\nexport const MotionH5 = /*@__PURE__*/ createMotionComponent(\"h5\")\nexport const MotionH6 = /*@__PURE__*/ createMotionComponent(\"h6\")\nexport const MotionHead = /*@__PURE__*/ createMotionComponent(\"head\")\nexport const MotionHeader = /*@__PURE__*/ createMotionComponent(\"header\")\nexport const MotionHgroup = /*@__PURE__*/ createMotionComponent(\"hgroup\")\nexport const MotionHr = /*@__PURE__*/ createMotionComponent(\"hr\")\nexport const MotionHtml = /*@__PURE__*/ createMotionComponent(\"html\")\nexport const MotionI = /*@__PURE__*/ createMotionComponent(\"i\")\nexport const MotionIframe = /*@__PURE__*/ createMotionComponent(\"iframe\")\nexport const MotionImg = /*@__PURE__*/ createMotionComponent(\"img\")\nexport const MotionInput = /*@__PURE__*/ createMotionComponent(\"input\")\nexport const MotionIns = /*@__PURE__*/ createMotionComponent(\"ins\")\nexport const MotionKbd = /*@__PURE__*/ createMotionComponent(\"kbd\")\nexport const MotionKeygen = /*@__PURE__*/ createMotionComponent(\"keygen\")\nexport const MotionLabel = /*@__PURE__*/ createMotionComponent(\"label\")\nexport const MotionLegend = /*@__PURE__*/ createMotionComponent(\"legend\")\nexport const MotionLi = /*@__PURE__*/ createMotionComponent(\"li\")\nexport const MotionLink = /*@__PURE__*/ createMotionComponent(\"link\")\nexport const MotionMain = /*@__PURE__*/ createMotionComponent(\"main\")\nexport const MotionMap = /*@__PURE__*/ createMotionComponent(\"map\")\nexport const MotionMark = /*@__PURE__*/ createMotionComponent(\"mark\")\nexport const MotionMenu = /*@__PURE__*/ createMotionComponent(\"menu\")\nexport const MotionMenuitem = /*@__PURE__*/ createMotionComponent(\"menuitem\")\nexport const MotionMeter = /*@__PURE__*/ createMotionComponent(\"meter\")\nexport const MotionNav = /*@__PURE__*/ createMotionComponent(\"nav\")\nexport const MotionObject = /*@__PURE__*/ createMotionComponent(\"object\")\nexport const MotionOl = /*@__PURE__*/ createMotionComponent(\"ol\")\nexport const MotionOptgroup = /*@__PURE__*/ createMotionComponent(\"optgroup\")\nexport const MotionOption = /*@__PURE__*/ createMotionComponent(\"option\")\nexport const MotionOutput = /*@__PURE__*/ createMotionComponent(\"output\")\nexport const MotionP = /*@__PURE__*/ createMotionComponent(\"p\")\nexport const MotionParam = /*@__PURE__*/ createMotionComponent(\"param\")\nexport const MotionPicture = /*@__PURE__*/ createMotionComponent(\"picture\")\nexport const MotionPre = /*@__PURE__*/ createMotionComponent(\"pre\")\nexport const MotionProgress = /*@__PURE__*/ createMotionComponent(\"progress\")\nexport const MotionQ = /*@__PURE__*/ createMotionComponent(\"q\")\nexport const MotionRp = /*@__PURE__*/ createMotionComponent(\"rp\")\nexport const MotionRt = /*@__PURE__*/ createMotionComponent(\"rt\")\nexport const MotionRuby = /*@__PURE__*/ createMotionComponent(\"ruby\")\nexport const MotionS = /*@__PURE__*/ createMotionComponent(\"s\")\nexport const MotionSamp = /*@__PURE__*/ createMotionComponent(\"samp\")\nexport const MotionScript = /*@__PURE__*/ createMotionComponent(\"script\")\nexport const MotionSection = /*@__PURE__*/ createMotionComponent(\"section\")\nexport const MotionSelect = /*@__PURE__*/ createMotionComponent(\"select\")\nexport const MotionSmall = /*@__PURE__*/ createMotionComponent(\"small\")\nexport const MotionSource = /*@__PURE__*/ createMotionComponent(\"source\")\nexport const MotionSpan = /*@__PURE__*/ createMotionComponent(\"span\")\nexport const MotionStrong = /*@__PURE__*/ createMotionComponent(\"strong\")\nexport const MotionStyle = /*@__PURE__*/ createMotionComponent(\"style\")\nexport const MotionSub = /*@__PURE__*/ createMotionComponent(\"sub\")\nexport const MotionSummary = /*@__PURE__*/ createMotionComponent(\"summary\")\nexport const MotionSup = /*@__PURE__*/ createMotionComponent(\"sup\")\nexport const MotionTable = /*@__PURE__*/ createMotionComponent(\"table\")\nexport const MotionTbody = /*@__PURE__*/ createMotionComponent(\"tbody\")\nexport const MotionTd = /*@__PURE__*/ createMotionComponent(\"td\")\nexport const MotionTextarea = /*@__PURE__*/ createMotionComponent(\"textarea\")\nexport const MotionTfoot = /*@__PURE__*/ createMotionComponent(\"tfoot\")\nexport const MotionTh = /*@__PURE__*/ createMotionComponent(\"th\")\nexport const MotionThead = /*@__PURE__*/ createMotionComponent(\"thead\")\nexport const MotionTime = /*@__PURE__*/ createMotionComponent(\"time\")\nexport const MotionTitle = /*@__PURE__*/ createMotionComponent(\"title\")\nexport const MotionTr = /*@__PURE__*/ createMotionComponent(\"tr\")\nexport const MotionTrack = /*@__PURE__*/ createMotionComponent(\"track\")\nexport const MotionU = /*@__PURE__*/ createMotionComponent(\"u\")\nexport const MotionUl = /*@__PURE__*/ createMotionComponent(\"ul\")\nexport const MotionVideo = /*@__PURE__*/ createMotionComponent(\"video\")\nexport const MotionWbr = /*@__PURE__*/ createMotionComponent(\"wbr\")\nexport const MotionWebview = /*@__PURE__*/ createMotionComponent(\"webview\")\n\n/**\n * SVG components\n */\nexport const MotionAnimate = /*@__PURE__*/ createMotionComponent(\"animate\")\nexport const MotionCircle = /*@__PURE__*/ createMotionComponent(\"circle\")\nexport const MotionDefs = /*@__PURE__*/ createMotionComponent(\"defs\")\nexport const MotionDesc = /*@__PURE__*/ createMotionComponent(\"desc\")\nexport const MotionEllipse = /*@__PURE__*/ createMotionComponent(\"ellipse\")\nexport const MotionG = /*@__PURE__*/ createMotionComponent(\"g\")\nexport const MotionImage = /*@__PURE__*/ createMotionComponent(\"image\")\nexport const MotionLine = /*@__PURE__*/ createMotionComponent(\"line\")\nexport const MotionFilter = /*@__PURE__*/ createMotionComponent(\"filter\")\nexport const MotionMarker = /*@__PURE__*/ createMotionComponent(\"marker\")\nexport const MotionMask = /*@__PURE__*/ createMotionComponent(\"mask\")\nexport const MotionMetadata = /*@__PURE__*/ createMotionComponent(\"metadata\")\nexport const MotionPath = /*@__PURE__*/ createMotionComponent(\"path\")\nexport const MotionPattern = /*@__PURE__*/ createMotionComponent(\"pattern\")\nexport const MotionPolygon = /*@__PURE__*/ createMotionComponent(\"polygon\")\nexport const MotionPolyline = /*@__PURE__*/ createMotionComponent(\"polyline\")\nexport const MotionRect = /*@__PURE__*/ createMotionComponent(\"rect\")\nexport const MotionStop = /*@__PURE__*/ createMotionComponent(\"stop\")\nexport const MotionSvg = /*@__PURE__*/ createMotionComponent(\"svg\")\nexport const MotionSymbol = /*@__PURE__*/ createMotionComponent(\"symbol\")\nexport const MotionText = /*@__PURE__*/ createMotionComponent(\"text\")\nexport const MotionTspan = /*@__PURE__*/ createMotionComponent(\"tspan\")\nexport const MotionUse = /*@__PURE__*/ createMotionComponent(\"use\")\nexport const MotionView = /*@__PURE__*/ createMotionComponent(\"view\")\nexport const MotionClipPath = /*@__PURE__*/ createMotionComponent(\"clipPath\")\nexport const MotionFeBlend = /*@__PURE__*/ createMotionComponent(\"feBlend\")\nexport const MotionFeColorMatrix =\n /*@__PURE__*/ createMotionComponent(\"feColorMatrix\")\nexport const MotionFeComponentTransfer = /*@__PURE__*/ createMotionComponent(\n \"feComponentTransfer\"\n)\nexport const MotionFeComposite =\n /*@__PURE__*/ createMotionComponent(\"feComposite\")\nexport const MotionFeConvolveMatrix =\n /*@__PURE__*/ createMotionComponent(\"feConvolveMatrix\")\nexport const MotionFeDiffuseLighting =\n /*@__PURE__*/ createMotionComponent(\"feDiffuseLighting\")\nexport const MotionFeDisplacementMap =\n /*@__PURE__*/ createMotionComponent(\"feDisplacementMap\")\nexport const MotionFeDistantLight =\n /*@__PURE__*/ createMotionComponent(\"feDistantLight\")\nexport const MotionFeDropShadow =\n /*@__PURE__*/ createMotionComponent(\"feDropShadow\")\nexport const MotionFeFlood = /*@__PURE__*/ createMotionComponent(\"feFlood\")\nexport const MotionFeFuncA = /*@__PURE__*/ createMotionComponent(\"feFuncA\")\nexport const MotionFeFuncB = /*@__PURE__*/ createMotionComponent(\"feFuncB\")\nexport const MotionFeFuncG = /*@__PURE__*/ createMotionComponent(\"feFuncG\")\nexport const MotionFeFuncR = /*@__PURE__*/ createMotionComponent(\"feFuncR\")\nexport const MotionFeGaussianBlur =\n /*@__PURE__*/ createMotionComponent(\"feGaussianBlur\")\nexport const MotionFeImage = /*@__PURE__*/ createMotionComponent(\"feImage\")\nexport const MotionFeMerge = /*@__PURE__*/ createMotionComponent(\"feMerge\")\nexport const MotionFeMergeNode =\n /*@__PURE__*/ createMotionComponent(\"feMergeNode\")\nexport const MotionFeMorphology =\n /*@__PURE__*/ createMotionComponent(\"feMorphology\")\nexport const MotionFeOffset = /*@__PURE__*/ createMotionComponent(\"feOffset\")\nexport const MotionFePointLight =\n /*@__PURE__*/ createMotionComponent(\"fePointLight\")\nexport const MotionFeSpecularLighting =\n /*@__PURE__*/ createMotionComponent(\"feSpecularLighting\")\nexport const MotionFeSpotLight =\n /*@__PURE__*/ createMotionComponent(\"feSpotLight\")\nexport const MotionFeTile = /*@__PURE__*/ createMotionComponent(\"feTile\")\nexport const MotionFeTurbulence =\n /*@__PURE__*/ createMotionComponent(\"feTurbulence\")\nexport const MotionForeignObject =\n /*@__PURE__*/ createMotionComponent(\"foreignObject\")\nexport const MotionLinearGradient =\n /*@__PURE__*/ createMotionComponent(\"linearGradient\")\nexport const MotionRadialGradient =\n /*@__PURE__*/ createMotionComponent(\"radialGradient\")\nexport const MotionTextPath = /*@__PURE__*/ createMotionComponent(\"textPath\")\n"],"names":["createMotionComponent","featureBundle","createDomVisualElement"],"mappings":";;;;;;;;;;;AAMM,SAAU,iCAAiC,CAI7C,SAAwD,EACxD,OAAgC,EAAA;IAEhC,OAAOA,2BAAqB,CACxB,SAAS,EACT,OAAO,EACPC,2BAAa,EACbC,oCAA6D,CAChE;AACL;;ACfA;;AAEG;AACI,MAAM,OAAO,iBAAiBF,iCAAqB,CAAC,GAAG;AACvD,MAAM,UAAU,iBAAiBA,iCAAqB,CAAC,MAAM;AAC7D,MAAM,aAAa,iBAAiBA,iCAAqB,CAAC,SAAS;AACn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xC,kBAAkB;AAC3B,cAAcA,iCAAqB,CAAC,cAAc;AAC/C,MAAM,cAAc,iBAAiBA,iCAAqB,CAAC,UAAU;MAC/D,kBAAkB;AAC3B,cAAcA,iCAAqB,CAAC,cAAc;MACzC,wBAAwB;AACjC,cAAcA,iCAAqB,CAAC,oBAAoB;MAC/C,iBAAiB;AAC1B,cAAcA,iCAAqB,CAAC,aAAa;AAC9C,MAAM,YAAY,iBAAiBA,iCAAqB,CAAC,QAAQ;MAC3D,kBAAkB;AAC3B,cAAcA,iCAAqB,CAAC,cAAc;MACzC,mBAAmB;AAC5B,cAAcA,iCAAqB,CAAC,eAAe;MAC1C,oBAAoB;AAC7B,cAAcA,iCAAqB,CAAC,gBAAgB;MAC3C,oBAAoB;AAC7B,cAAcA,iCAAqB,CAAC,gBAAgB;AACjD,MAAM,cAAc,iBAAiBA,iCAAqB,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/debug.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/debug.js deleted file mode 100644 index 6fb2ed65..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/debug.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var motionDom = require('motion-dom'); - - - -Object.defineProperty(exports, "recordStats", { - enumerable: true, - get: function () { return motionDom.recordStats; } -}); -//# sourceMappingURL=debug.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/debug.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/debug.js.map deleted file mode 100644 index ec4f5cd8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/debug.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debug.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom-mini.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom-mini.js deleted file mode 100644 index b33c9285..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom-mini.js +++ /dev/null @@ -1,531 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var motionDom = require('motion-dom'); -var motionUtils = require('motion-utils'); - -function isDOMKeyframes(keyframes) { - return typeof keyframes === "object" && !Array.isArray(keyframes); -} - -function resolveSubjects(subject, keyframes, scope, selectorCache) { - if (subject == null) { - return []; - } - if (typeof subject === "string" && isDOMKeyframes(keyframes)) { - return motionDom.resolveElements(subject, scope, selectorCache); - } - else if (subject instanceof NodeList) { - return Array.from(subject); - } - else if (Array.isArray(subject)) { - return subject.filter((s) => s != null); - } - else { - return [subject]; - } -} - -function calculateRepeatDuration(duration, repeat, repeatDelay) { - return duration * (repeat + 1) + repeatDelay * repeat; -} - -/** - * Given a absolute or relative time definition and current/prev time state of the sequence, - * calculate an absolute time for the next keyframes. - */ -function calcNextTime(current, next, prev, labels) { - if (typeof next === "number") { - return next; - } - else if (next.startsWith("-") || next.startsWith("+")) { - return Math.max(0, current + parseFloat(next)); - } - else if (next === "<") { - return prev; - } - else if (next.startsWith("<")) { - return Math.max(0, prev + parseFloat(next.slice(1))); - } - else { - return labels.get(next) ?? current; - } -} - -function eraseKeyframes(sequence, startTime, endTime) { - for (let i = 0; i < sequence.length; i++) { - const keyframe = sequence[i]; - if (keyframe.at > startTime && keyframe.at < endTime) { - motionUtils.removeItem(sequence, keyframe); - // If we remove this item we have to push the pointer back one - i--; - } - } -} -function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) { - /** - * Erase every existing value between currentTime and targetTime, - * this will essentially splice this timeline into any currently - * defined ones. - */ - eraseKeyframes(sequence, startTime, endTime); - for (let i = 0; i < keyframes.length; i++) { - sequence.push({ - value: keyframes[i], - at: motionDom.mixNumber(startTime, endTime, offset[i]), - easing: motionUtils.getEasingForSegment(easing, i), - }); - } -} - -/** - * Take an array of times that represent repeated keyframes. For instance - * if we have original times of [0, 0.5, 1] then our repeated times will - * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back - * down to a 0-1 scale. - * - * `repeatDelayUnits` is the repeatDelay expressed in units of a single - * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`. - */ -function normalizeTimes(times, repeat, repeatDelayUnits = 0) { - const totalUnits = repeat + 1 + repeat * repeatDelayUnits; - for (let i = 0; i < times.length; i++) { - times[i] = times[i] / totalUnits; - } -} - -function compareByTime(a, b) { - if (a.at === b.at) { - if (a.value === null) - return 1; - if (b.value === null) - return -1; - return 0; - } - else { - return a.at - b.at; - } -} - -const defaultSegmentEasing = "easeInOut"; -const MAX_REPEAT = 20; -function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) { - const defaultDuration = defaultTransition.duration || 0.3; - const animationDefinitions = new Map(); - const sequences = new Map(); - const elementCache = {}; - const timeLabels = new Map(); - let prevTime = 0; - let currentTime = 0; - let totalDuration = 0; - /** - * Build the timeline by mapping over the sequence array and converting - * the definitions into keyframes and offsets with absolute time values. - * These will later get converted into relative offsets in a second pass. - */ - for (let i = 0; i < sequence.length; i++) { - const segment = sequence[i]; - /** - * If this is a timeline label, mark it and skip the rest of this iteration. - */ - if (typeof segment === "string") { - timeLabels.set(segment, currentTime); - continue; - } - else if (!Array.isArray(segment)) { - timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels)); - continue; - } - let [subject, keyframes, transition = {}] = segment; - /** - * If a relative or absolute time value has been specified we need to resolve - * it in relation to the currentTime. - */ - if (transition.at !== undefined) { - currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels); - } - /** - * Keep track of the maximum duration in this definition. This will be - * applied to currentTime once the definition has been parsed. - */ - let maxDuration = 0; - const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => { - const valueKeyframesAsList = keyframesAsList(valueKeyframes); - const { delay = 0, times = motionDom.defaultOffset(valueKeyframesAsList), type = defaultTransition.type || "keyframes", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition; - let { ease = defaultTransition.ease || "easeOut", duration } = valueTransition; - /** - * Resolve stagger() if defined. - */ - const calculatedDelay = typeof delay === "function" - ? delay(elementIndex, numSubjects) - : delay; - /** - * If this animation should and can use a spring, generate a spring easing function. - */ - const numKeyframes = valueKeyframesAsList.length; - const createGenerator = motionDom.isGenerator(type) - ? type - : generators?.[type || "keyframes"]; - if (numKeyframes <= 2 && createGenerator) { - /** - * As we're creating an easing function from a spring, - * ideally we want to generate it using the real distance - * between the two keyframes. However this isn't always - * possible - in these situations we use 0-100. - */ - let absoluteDelta = 100; - if (numKeyframes === 2 && - isNumberKeyframesArray(valueKeyframesAsList)) { - const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0]; - absoluteDelta = Math.abs(delta); - } - const springTransition = { - ...defaultTransition, - ...remainingTransition, - }; - if (duration !== undefined) { - springTransition.duration = motionUtils.secondsToMilliseconds(duration); - } - const springEasing = motionDom.createGeneratorEasing(springTransition, absoluteDelta, createGenerator); - ease = springEasing.ease; - duration = springEasing.duration; - } - duration ?? (duration = defaultDuration); - const startTime = currentTime + calculatedDelay; - /** - * If there's only one time offset of 0, fill in a second with length 1 - */ - if (times.length === 1 && times[0] === 0) { - times[1] = 1; - } - /** - * Fill out if offset if fewer offsets than keyframes - */ - const remainder = times.length - valueKeyframesAsList.length; - remainder > 0 && motionDom.fillOffset(times, remainder); - /** - * If only one value has been set, ie [1], push a null to the start of - * the keyframe array. This will let us mark a keyframe at this point - * that will later be hydrated with the previous value. - */ - valueKeyframesAsList.length === 1 && - valueKeyframesAsList.unshift(null); - /** - * Segments can't express `repeat: Infinity` or very large - * counts — they'd leave dead time after the segment or - * explode the keyframe array. Ignore with a warning. - */ - if (repeat) { - motionUtils.warning(repeat < MAX_REPEAT, `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`); - } - if (repeat && repeat < MAX_REPEAT) { - /** - * Express repeatDelay in units of a single iteration's duration - * so it can be added to the per-iteration time offsets below - * before they're normalized to 0-1. - */ - const repeatDelayUnits = duration > 0 ? repeatDelay / duration : 0; - duration = calculateRepeatDuration(duration, repeat, repeatDelay); - const originalKeyframes = [...valueKeyframesAsList]; - const originalTimes = [...times]; - ease = Array.isArray(ease) ? [...ease] : [ease]; - const originalEase = [...ease]; - /** - * For reverse/mirror, alternate iterations play the segment - * backwards. mirror matches JSAnimation's mirroredGenerator: - * reversed keyframes, easings unchanged. reverse matches - * JSAnimation's iterationProgress = 1 - p: reversed - * keyframes, easing array reversed AND each function easing - * mapped through reverseEasing (string easings unchanged — - * they're resolved later by the keyframes engine). - */ - const isFlipping = repeatType === "reverse" || repeatType === "mirror"; - let flippedKeyframes = originalKeyframes; - let flippedEases = originalEase; - if (isFlipping) { - flippedKeyframes = [...originalKeyframes].reverse(); - if (repeatType === "reverse") { - flippedEases = [...originalEase] - .reverse() - .map((e) => typeof e === "function" - ? motionUtils.reverseEasing(e) - : e); - } - } - for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) { - const isFlipped = isFlipping && repeatIndex % 2 === 0; - const iterKeyframes = isFlipped - ? flippedKeyframes - : originalKeyframes; - const iterEase = isFlipped ? flippedEases : originalEase; - const iterStartOffset = (repeatIndex + 1) * (1 + repeatDelayUnits); - /** - * If repeatDelay is set, hold the previous iteration's - * final value through the delay by inserting a keyframe - * at the moment the next iteration begins. - */ - if (repeatDelayUnits > 0) { - valueKeyframesAsList.push(valueKeyframesAsList[valueKeyframesAsList.length - 1]); - times.push(iterStartOffset); - ease.push("linear"); - } - valueKeyframesAsList.push(...iterKeyframes); - for (let keyframeIndex = 0; keyframeIndex < iterKeyframes.length; keyframeIndex++) { - times.push(originalTimes[keyframeIndex] + iterStartOffset); - ease.push(keyframeIndex === 0 - ? "linear" - : motionUtils.getEasingForSegment(iterEase, keyframeIndex - 1)); - } - } - normalizeTimes(times, repeat, repeatDelayUnits); - } - const targetTime = startTime + duration; - /** - * Add keyframes, mapping offsets to absolute time. - */ - addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime); - maxDuration = Math.max(calculatedDelay + duration, maxDuration); - totalDuration = Math.max(targetTime, totalDuration); - }; - if (motionDom.isMotionValue(subject)) { - const subjectSequence = getSubjectSequence(subject, sequences); - resolveValueSequence(keyframes, transition, getValueSequence("default", subjectSequence)); - } - else { - const subjects = resolveSubjects(subject, keyframes, scope, elementCache); - const numSubjects = subjects.length; - /** - * For every element in this segment, process the defined values. - */ - for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) { - /** - * Cast necessary, but we know these are of this type - */ - keyframes = keyframes; - transition = transition; - const thisSubject = subjects[subjectIndex]; - const subjectSequence = getSubjectSequence(thisSubject, sequences); - for (const key in keyframes) { - resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects); - } - } - } - prevTime = currentTime; - currentTime += maxDuration; - } - /** - * For every element and value combination create a new animation. - */ - sequences.forEach((valueSequences, element) => { - for (const key in valueSequences) { - const valueSequence = valueSequences[key]; - /** - * Arrange all the keyframes in ascending time order. - */ - valueSequence.sort(compareByTime); - const keyframes = []; - const valueOffset = []; - const valueEasing = []; - /** - * For each keyframe, translate absolute times into - * relative offsets based on the total duration of the timeline. - */ - for (let i = 0; i < valueSequence.length; i++) { - const { at, value, easing } = valueSequence[i]; - keyframes.push(value); - valueOffset.push(motionUtils.progress(0, totalDuration, at)); - valueEasing.push(easing || "easeOut"); - } - /** - * If the first keyframe doesn't land on offset: 0 - * provide one by duplicating the initial keyframe. This ensures - * it snaps to the first keyframe when the animation starts. - */ - if (valueOffset[0] !== 0) { - valueOffset.unshift(0); - keyframes.unshift(keyframes[0]); - valueEasing.unshift(defaultSegmentEasing); - } - /** - * If the last keyframe doesn't land on offset: 1 - * provide one with a null wildcard value. This will ensure it - * stays static until the end of the animation. - */ - if (valueOffset[valueOffset.length - 1] !== 1) { - valueOffset.push(1); - keyframes.push(null); - } - if (!animationDefinitions.has(element)) { - animationDefinitions.set(element, { - keyframes: {}, - transition: {}, - }); - } - const definition = animationDefinitions.get(element); - definition.keyframes[key] = keyframes; - /** - * Exclude `type` from defaultTransition since springs have been - * converted to duration-based easing functions in resolveValueSequence. - * Including `type: "spring"` would cause JSAnimation to error when - * the merged keyframes array has more than 2 keyframes. - */ - const { type: _type, ...remainingDefaultTransition } = defaultTransition; - definition.transition[key] = { - ...remainingDefaultTransition, - duration: totalDuration, - ease: valueEasing, - times: valueOffset, - ...sequenceTransition, - }; - } - }); - return animationDefinitions; -} -function getSubjectSequence(subject, sequences) { - !sequences.has(subject) && sequences.set(subject, {}); - return sequences.get(subject); -} -function getValueSequence(name, sequences) { - if (!sequences[name]) - sequences[name] = []; - return sequences[name]; -} -function keyframesAsList(keyframes) { - return Array.isArray(keyframes) ? keyframes : [keyframes]; -} -function getValueTransition(transition, key) { - return transition && transition[key] - ? { - ...transition, - ...transition[key], - } - : { ...transition }; -} -const isNumber = (keyframe) => typeof keyframe === "number"; -const isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber); - -function animateElements(elementOrSelector, keyframes, options, scope) { - // Gracefully handle null/undefined elements (e.g., from querySelector returning null) - if (elementOrSelector == null) { - return []; - } - const elements = motionDom.resolveElements(elementOrSelector, scope); - const numElements = elements.length; - motionUtils.invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements"); - /** - * WAAPI doesn't support interrupting animations. - * - * Therefore, starting animations requires a three-step process: - * 1. Stop existing animations (write styles to DOM) - * 2. Resolve keyframes (read styles from DOM) - * 3. Create new animations (write styles to DOM) - * - * The hybrid `animate()` function uses AsyncAnimation to resolve - * keyframes before creating new animations, which removes style - * thrashing. Here, we have much stricter filesize constraints. - * Therefore we do this in a synchronous way that ensures that - * at least within `animate()` calls there is no style thrashing. - * - * In the motion-native-animate-mini-interrupt benchmark this - * was 80% faster than a single loop. - */ - const animationDefinitions = []; - /** - * Step 1: Build options and stop existing animations (write) - */ - for (let i = 0; i < numElements; i++) { - const element = elements[i]; - const elementTransition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if (typeof elementTransition.delay === "function") { - elementTransition.delay = elementTransition.delay(i, numElements); - } - for (const valueName in keyframes) { - let valueKeyframes = keyframes[valueName]; - if (!Array.isArray(valueKeyframes)) { - valueKeyframes = [valueKeyframes]; - } - const valueOptions = { - ...motionDom.getValueTransition(elementTransition, valueName), - }; - valueOptions.duration && (valueOptions.duration = motionUtils.secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = motionUtils.secondsToMilliseconds(valueOptions.delay)); - /** - * If there's an existing animation playing on this element then stop it - * before creating a new one. - */ - const map = motionDom.getAnimationMap(element); - const key = motionDom.animationMapKey(valueName, valueOptions.pseudoElement || ""); - const currentAnimation = map.get(key); - currentAnimation && currentAnimation.stop(); - animationDefinitions.push({ - map, - key, - unresolvedKeyframes: valueKeyframes, - options: { - ...valueOptions, - element, - name: valueName, - allowFlatten: !elementTransition.type && !elementTransition.ease, - }, - }); - } - } - /** - * Step 2: Resolve keyframes (read) - */ - for (let i = 0; i < animationDefinitions.length; i++) { - const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i]; - const { element, name, pseudoElement } = animationOptions; - if (!pseudoElement && unresolvedKeyframes[0] === null) { - unresolvedKeyframes[0] = motionDom.getComputedStyle(element, name); - } - motionDom.fillWildcards(unresolvedKeyframes); - motionDom.applyPxDefaults(unresolvedKeyframes, name); - /** - * If we only have one keyframe, explicitly read the initial keyframe - * from the computed style. This is to ensure consistency with WAAPI behaviour - * for restarting animations, for instance .play() after finish, when it - * has one vs two keyframes. - */ - if (!pseudoElement && unresolvedKeyframes.length < 2) { - unresolvedKeyframes.unshift(motionDom.getComputedStyle(element, name)); - } - animationOptions.keyframes = unresolvedKeyframes; - } - /** - * Step 3: Create new animations (write) - */ - const animations = []; - for (let i = 0; i < animationDefinitions.length; i++) { - const { map, key, options: animationOptions } = animationDefinitions[i]; - const animation = new motionDom.NativeAnimation(animationOptions); - map.set(key, animation); - animation.finished.finally(() => map.delete(key)); - animations.push(animation); - } - return animations; -} - -function animateSequence(definition, options) { - const animations = []; - createAnimationsFromSequence(definition, options).forEach(({ keyframes, transition }, element) => { - animations.push(...animateElements(element, keyframes, transition)); - }); - return new motionDom.GroupAnimationWithThen(animations); -} - -const createScopedWaapiAnimate = (scope) => { - function scopedAnimate(elementOrSelector, keyframes, options) { - return new motionDom.GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope)); - } - return scopedAnimate; -}; -const animateMini = /*@__PURE__*/ createScopedWaapiAnimate(); - -exports.animate = animateMini; -exports.animateSequence = animateSequence; -//# sourceMappingURL=dom-mini.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom-mini.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom-mini.js.map deleted file mode 100644 index 571da8e1..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom-mini.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dom-mini.js","sources":["../../src/animation/utils/is-dom-keyframes.ts","../../src/animation/animate/resolve-subjects.ts","../../src/animation/sequence/utils/calc-repeat-duration.ts","../../src/animation/sequence/utils/calc-time.ts","../../src/animation/sequence/utils/edit.ts","../../src/animation/sequence/utils/normalize-times.ts","../../src/animation/sequence/utils/sort.ts","../../src/animation/sequence/create.ts","../../src/animation/animators/waapi/animate-elements.ts","../../src/animation/animators/waapi/animate-sequence.ts","../../src/animation/animators/waapi/animate-style.ts"],"sourcesContent":["import { DOMKeyframesDefinition } from \"motion-dom\"\n\nexport function isDOMKeyframes(\n keyframes: unknown\n): keyframes is DOMKeyframesDefinition {\n return typeof keyframes === \"object\" && !Array.isArray(keyframes)\n}\n","import {\n AnimationScope,\n DOMKeyframesDefinition,\n SelectorCache,\n resolveElements,\n} from \"motion-dom\"\nimport { ObjectTarget } from \"../sequence/types\"\nimport { isDOMKeyframes } from \"../utils/is-dom-keyframes\"\n\nexport function resolveSubjects(\n subject:\n | string\n | Element\n | Element[]\n | NodeListOf\n | O\n | O[]\n | null\n | undefined,\n keyframes: DOMKeyframesDefinition | ObjectTarget,\n scope?: AnimationScope,\n selectorCache?: SelectorCache\n) {\n if (subject == null) {\n return []\n }\n\n if (typeof subject === \"string\" && isDOMKeyframes(keyframes)) {\n return resolveElements(subject, scope, selectorCache)\n } else if (subject instanceof NodeList) {\n return Array.from(subject)\n } else if (Array.isArray(subject)) {\n return subject.filter((s) => s != null)\n } else {\n return [subject]\n }\n}\n","export function calculateRepeatDuration(\n duration: number,\n repeat: number,\n repeatDelay: number\n): number {\n return duration * (repeat + 1) + repeatDelay * repeat\n}\n","import { SequenceTime } from \"../types\"\n\n/**\n * Given a absolute or relative time definition and current/prev time state of the sequence,\n * calculate an absolute time for the next keyframes.\n */\nexport function calcNextTime(\n current: number,\n next: SequenceTime,\n prev: number,\n labels: Map\n): number {\n if (typeof next === \"number\") {\n return next\n } else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next))\n } else if (next === \"<\") {\n return prev\n } else if (next.startsWith(\"<\")) {\n return Math.max(0, prev + parseFloat(next.slice(1)))\n } else {\n return labels.get(next) ?? current\n }\n}\n","import { mixNumber, UnresolvedValueKeyframe } from \"motion-dom\"\nimport { Easing, getEasingForSegment, removeItem } from \"motion-utils\"\nimport type { ValueSequence } from \"../types\"\n\nexport function eraseKeyframes(\n sequence: ValueSequence,\n startTime: number,\n endTime: number\n): void {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i]\n\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe)\n\n // If we remove this item we have to push the pointer back one\n i--\n }\n }\n}\n\nexport function addKeyframes(\n sequence: ValueSequence,\n keyframes: UnresolvedValueKeyframe[],\n easing: Easing | Easing[],\n offset: number[],\n startTime: number,\n endTime: number\n): void {\n /**\n * Erase every existing value between currentTime and targetTime,\n * this will essentially splice this timeline into any currently\n * defined ones.\n */\n eraseKeyframes(sequence, startTime, endTime)\n\n for (let i = 0; i < keyframes.length; i++) {\n sequence.push({\n value: keyframes[i],\n at: mixNumber(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i),\n })\n }\n}\n","/**\n * Take an array of times that represent repeated keyframes. For instance\n * if we have original times of [0, 0.5, 1] then our repeated times will\n * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back\n * down to a 0-1 scale.\n *\n * `repeatDelayUnits` is the repeatDelay expressed in units of a single\n * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`.\n */\nexport function normalizeTimes(\n times: number[],\n repeat: number,\n repeatDelayUnits = 0\n): void {\n const totalUnits = repeat + 1 + repeat * repeatDelayUnits\n for (let i = 0; i < times.length; i++) {\n times[i] = times[i] / totalUnits\n }\n}\n","import { AbsoluteKeyframe } from \"../types\"\n\nexport function compareByTime(\n a: AbsoluteKeyframe,\n b: AbsoluteKeyframe\n): number {\n if (a.at === b.at) {\n if (a.value === null) return 1\n if (b.value === null) return -1\n return 0\n } else {\n return a.at - b.at\n }\n}\n","import {\n AnimationScope,\n createGeneratorEasing,\n defaultOffset,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n fillOffset,\n GeneratorFactory,\n isGenerator,\n isMotionValue,\n Transition,\n UnresolvedValueKeyframe,\n type AnyResolvedKeyframe,\n type MotionValue,\n} from \"motion-dom\"\nimport {\n Easing,\n getEasingForSegment,\n progress,\n reverseEasing,\n secondsToMilliseconds,\n warning,\n} from \"motion-utils\"\nimport { resolveSubjects } from \"../animate/resolve-subjects\"\nimport {\n AnimationSequence,\n At,\n ResolvedAnimationDefinitions,\n SequenceMap,\n SequenceOptions,\n ValueSequence,\n} from \"./types\"\nimport { calculateRepeatDuration } from \"./utils/calc-repeat-duration\"\nimport { calcNextTime } from \"./utils/calc-time\"\nimport { addKeyframes } from \"./utils/edit\"\nimport { normalizeTimes } from \"./utils/normalize-times\"\nimport { compareByTime } from \"./utils/sort\"\n\nconst defaultSegmentEasing = \"easeInOut\"\n\nconst MAX_REPEAT = 20\n\nexport function createAnimationsFromSequence(\n sequence: AnimationSequence,\n { defaultTransition = {}, ...sequenceTransition }: SequenceOptions = {},\n scope?: AnimationScope,\n generators?: { [key: string]: GeneratorFactory }\n): ResolvedAnimationDefinitions {\n const defaultDuration = defaultTransition.duration || 0.3\n const animationDefinitions: ResolvedAnimationDefinitions = new Map()\n const sequences = new Map()\n const elementCache = {}\n const timeLabels = new Map()\n\n let prevTime = 0\n let currentTime = 0\n let totalDuration = 0\n\n /**\n * Build the timeline by mapping over the sequence array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i]\n\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime)\n continue\n } else if (!Array.isArray(segment)) {\n timeLabels.set(\n segment.name,\n calcNextTime(currentTime, segment.at, prevTime, timeLabels)\n )\n continue\n }\n\n let [subject, keyframes, transition = {}] = segment\n\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (transition.at !== undefined) {\n currentTime = calcNextTime(\n currentTime,\n transition.at,\n prevTime,\n timeLabels\n )\n }\n\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0\n\n const resolveValueSequence = (\n valueKeyframes: UnresolvedValueKeyframe | UnresolvedValueKeyframe[],\n valueTransition: Transition | DynamicAnimationOptions,\n valueSequence: ValueSequence,\n elementIndex = 0,\n numSubjects = 0\n ) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes)\n const {\n delay = 0,\n times = defaultOffset(valueKeyframesAsList),\n type = defaultTransition.type || \"keyframes\",\n repeat,\n repeatType,\n repeatDelay = 0,\n ...remainingTransition\n } = valueTransition\n let { ease = defaultTransition.ease || \"easeOut\", duration } =\n valueTransition\n\n /**\n * Resolve stagger() if defined.\n */\n const calculatedDelay =\n typeof delay === \"function\"\n ? delay(elementIndex, numSubjects)\n : delay\n\n /**\n * If this animation should and can use a spring, generate a spring easing function.\n */\n const numKeyframes = valueKeyframesAsList.length\n const createGenerator = isGenerator(type)\n ? type\n : generators?.[type || \"keyframes\"]\n\n if (numKeyframes <= 2 && createGenerator) {\n /**\n * As we're creating an easing function from a spring,\n * ideally we want to generate it using the real distance\n * between the two keyframes. However this isn't always\n * possible - in these situations we use 0-100.\n */\n let absoluteDelta = 100\n if (\n numKeyframes === 2 &&\n isNumberKeyframesArray(valueKeyframesAsList)\n ) {\n const delta =\n valueKeyframesAsList[1] - valueKeyframesAsList[0]\n absoluteDelta = Math.abs(delta)\n }\n\n const springTransition = {\n ...defaultTransition,\n ...remainingTransition,\n }\n if (duration !== undefined) {\n springTransition.duration = secondsToMilliseconds(duration)\n }\n\n const springEasing = createGeneratorEasing(\n springTransition,\n absoluteDelta,\n createGenerator\n )\n\n ease = springEasing.ease\n duration = springEasing.duration\n }\n\n duration ??= defaultDuration\n\n const startTime = currentTime + calculatedDelay\n\n /**\n * If there's only one time offset of 0, fill in a second with length 1\n */\n if (times.length === 1 && times[0] === 0) {\n times[1] = 1\n }\n\n /**\n * Fill out if offset if fewer offsets than keyframes\n */\n const remainder = times.length - valueKeyframesAsList.length\n remainder > 0 && fillOffset(times, remainder)\n\n /**\n * If only one value has been set, ie [1], push a null to the start of\n * the keyframe array. This will let us mark a keyframe at this point\n * that will later be hydrated with the previous value.\n */\n valueKeyframesAsList.length === 1 &&\n valueKeyframesAsList.unshift(null)\n\n /**\n * Segments can't express `repeat: Infinity` or very large\n * counts — they'd leave dead time after the segment or\n * explode the keyframe array. Ignore with a warning.\n */\n if (repeat) {\n warning(\n repeat < MAX_REPEAT,\n `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`\n )\n }\n\n if (repeat && repeat < MAX_REPEAT) {\n /**\n * Express repeatDelay in units of a single iteration's duration\n * so it can be added to the per-iteration time offsets below\n * before they're normalized to 0-1.\n */\n const repeatDelayUnits =\n duration > 0 ? repeatDelay / duration : 0\n\n duration = calculateRepeatDuration(\n duration,\n repeat,\n repeatDelay\n )\n\n const originalKeyframes = [...valueKeyframesAsList]\n const originalTimes = [...times]\n ease = Array.isArray(ease) ? [...ease] : [ease]\n const originalEase = [...ease]\n\n /**\n * For reverse/mirror, alternate iterations play the segment\n * backwards. mirror matches JSAnimation's mirroredGenerator:\n * reversed keyframes, easings unchanged. reverse matches\n * JSAnimation's iterationProgress = 1 - p: reversed\n * keyframes, easing array reversed AND each function easing\n * mapped through reverseEasing (string easings unchanged —\n * they're resolved later by the keyframes engine).\n */\n const isFlipping =\n repeatType === \"reverse\" || repeatType === \"mirror\"\n let flippedKeyframes = originalKeyframes\n let flippedEases = originalEase\n if (isFlipping) {\n flippedKeyframes = [...originalKeyframes].reverse()\n if (repeatType === \"reverse\") {\n flippedEases = [...originalEase]\n .reverse()\n .map((e) =>\n typeof e === \"function\"\n ? reverseEasing(e)\n : e\n )\n }\n }\n\n for (\n let repeatIndex = 0;\n repeatIndex < repeat;\n repeatIndex++\n ) {\n const isFlipped = isFlipping && repeatIndex % 2 === 0\n const iterKeyframes = isFlipped\n ? flippedKeyframes\n : originalKeyframes\n const iterEase = isFlipped ? flippedEases : originalEase\n const iterStartOffset =\n (repeatIndex + 1) * (1 + repeatDelayUnits)\n\n /**\n * If repeatDelay is set, hold the previous iteration's\n * final value through the delay by inserting a keyframe\n * at the moment the next iteration begins.\n */\n if (repeatDelayUnits > 0) {\n valueKeyframesAsList.push(\n valueKeyframesAsList[\n valueKeyframesAsList.length - 1\n ]\n )\n times.push(iterStartOffset)\n ease.push(\"linear\")\n }\n\n valueKeyframesAsList.push(...iterKeyframes)\n\n for (\n let keyframeIndex = 0;\n keyframeIndex < iterKeyframes.length;\n keyframeIndex++\n ) {\n times.push(\n originalTimes[keyframeIndex] + iterStartOffset\n )\n ease.push(\n keyframeIndex === 0\n ? \"linear\"\n : getEasingForSegment(\n iterEase,\n keyframeIndex - 1\n )\n )\n }\n }\n\n normalizeTimes(times, repeat, repeatDelayUnits)\n }\n\n const targetTime = startTime + duration\n\n /**\n * Add keyframes, mapping offsets to absolute time.\n */\n addKeyframes(\n valueSequence,\n valueKeyframesAsList,\n ease as Easing | Easing[],\n times,\n startTime,\n targetTime\n )\n\n maxDuration = Math.max(calculatedDelay + duration, maxDuration)\n totalDuration = Math.max(targetTime, totalDuration)\n }\n\n if (isMotionValue(subject)) {\n const subjectSequence = getSubjectSequence(subject, sequences)\n resolveValueSequence(\n keyframes as AnyResolvedKeyframe,\n transition,\n getValueSequence(\"default\", subjectSequence)\n )\n } else {\n const subjects = resolveSubjects(\n subject,\n keyframes as DOMKeyframesDefinition,\n scope,\n elementCache\n )\n\n const numSubjects = subjects.length\n\n /**\n * For every element in this segment, process the defined values.\n */\n for (\n let subjectIndex = 0;\n subjectIndex < numSubjects;\n subjectIndex++\n ) {\n /**\n * Cast necessary, but we know these are of this type\n */\n keyframes = keyframes as DOMKeyframesDefinition\n transition = transition as DynamicAnimationOptions\n\n const thisSubject = subjects[subjectIndex]\n const subjectSequence = getSubjectSequence(\n thisSubject,\n sequences\n )\n\n for (const key in keyframes) {\n resolveValueSequence(\n keyframes[\n key as keyof typeof keyframes\n ] as UnresolvedValueKeyframe,\n getValueTransition(transition, key),\n getValueSequence(key, subjectSequence),\n subjectIndex,\n numSubjects\n )\n }\n }\n }\n\n prevTime = currentTime\n currentTime += maxDuration\n }\n\n /**\n * For every element and value combination create a new animation.\n */\n sequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key]\n\n /**\n * Arrange all the keyframes in ascending time order.\n */\n valueSequence.sort(compareByTime)\n\n const keyframes: UnresolvedValueKeyframe[] = []\n const valueOffset: number[] = []\n const valueEasing: Easing[] = []\n\n /**\n * For each keyframe, translate absolute times into\n * relative offsets based on the total duration of the timeline.\n */\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i]\n keyframes.push(value)\n valueOffset.push(progress(0, totalDuration, at))\n valueEasing.push(easing || \"easeOut\")\n }\n\n /**\n * If the first keyframe doesn't land on offset: 0\n * provide one by duplicating the initial keyframe. This ensures\n * it snaps to the first keyframe when the animation starts.\n */\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0)\n keyframes.unshift(keyframes[0])\n valueEasing.unshift(defaultSegmentEasing)\n }\n\n /**\n * If the last keyframe doesn't land on offset: 1\n * provide one with a null wildcard value. This will ensure it\n * stays static until the end of the animation.\n */\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1)\n keyframes.push(null)\n }\n\n if (!animationDefinitions.has(element)) {\n animationDefinitions.set(element, {\n keyframes: {},\n transition: {},\n })\n }\n\n const definition = animationDefinitions.get(element)!\n\n definition.keyframes[key] = keyframes\n\n /**\n * Exclude `type` from defaultTransition since springs have been\n * converted to duration-based easing functions in resolveValueSequence.\n * Including `type: \"spring\"` would cause JSAnimation to error when\n * the merged keyframes array has more than 2 keyframes.\n */\n const { type: _type, ...remainingDefaultTransition } =\n defaultTransition\n definition.transition[key] = {\n ...remainingDefaultTransition,\n duration: totalDuration,\n ease: valueEasing,\n times: valueOffset,\n ...sequenceTransition,\n }\n }\n })\n\n return animationDefinitions\n}\n\nfunction getSubjectSequence(\n subject: Element | MotionValue | O,\n sequences: Map\n): SequenceMap {\n !sequences.has(subject) && sequences.set(subject, {})\n return sequences.get(subject)!\n}\n\nfunction getValueSequence(name: string, sequences: SequenceMap): ValueSequence {\n if (!sequences[name]) sequences[name] = []\n return sequences[name]\n}\n\nfunction keyframesAsList(\n keyframes: UnresolvedValueKeyframe | UnresolvedValueKeyframe[]\n): UnresolvedValueKeyframe[] {\n return Array.isArray(keyframes) ? keyframes : [keyframes]\n}\n\nexport function getValueTransition(\n transition: DynamicAnimationOptions & At,\n key: string\n): DynamicAnimationOptions {\n return transition && transition[key as keyof typeof transition]\n ? {\n ...transition,\n ...(transition[key as keyof typeof transition] as Transition),\n }\n : { ...transition }\n}\n\nconst isNumber = (keyframe: unknown) => typeof keyframe === \"number\"\nconst isNumberKeyframesArray = (\n keyframes: UnresolvedValueKeyframe[]\n): keyframes is number[] => keyframes.every(isNumber)\n","import {\n animationMapKey,\n AnimationPlaybackControls,\n AnimationScope,\n applyPxDefaults,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n fillWildcards,\n getAnimationMap,\n getComputedStyle,\n getValueTransition,\n NativeAnimation,\n NativeAnimationOptions,\n resolveElements,\n UnresolvedValueKeyframe,\n ValueKeyframe,\n} from \"motion-dom\"\nimport { invariant, secondsToMilliseconds } from \"motion-utils\"\n\ninterface AnimationDefinition {\n map: Map>\n key: string\n unresolvedKeyframes: UnresolvedValueKeyframe[]\n options: Omit & {\n keyframes?: ValueKeyframe[]\n }\n}\n\nexport function animateElements(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n) {\n // Gracefully handle null/undefined elements (e.g., from querySelector returning null)\n if (elementOrSelector == null) {\n return []\n }\n\n const elements = resolveElements(elementOrSelector, scope) as Array<\n HTMLElement | SVGElement\n >\n const numElements = elements.length\n\n invariant(\n Boolean(numElements),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions: AnimationDefinition[] = []\n\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i]\n const elementTransition: DynamicAnimationOptions = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements)\n }\n\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName as keyof typeof keyframes]!\n\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes]\n }\n\n const valueOptions = {\n ...getValueTransition(elementTransition as any, valueName),\n }\n\n valueOptions.duration &&= secondsToMilliseconds(\n valueOptions.duration\n )\n\n valueOptions.delay &&= secondsToMilliseconds(valueOptions.delay)\n\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element)\n const key = animationMapKey(\n valueName,\n valueOptions.pseudoElement || \"\"\n )\n const currentAnimation = map.get(key)\n currentAnimation && currentAnimation.stop()\n\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n options: {\n ...valueOptions,\n element,\n name: valueName,\n allowFlatten:\n !elementTransition.type && !elementTransition.ease,\n },\n })\n }\n }\n\n /**\n * Step 2: Resolve keyframes (read)\n */\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { unresolvedKeyframes, options: animationOptions } =\n animationDefinitions[i]\n\n const { element, name, pseudoElement } = animationOptions\n if (!pseudoElement && unresolvedKeyframes[0] === null) {\n unresolvedKeyframes[0] = getComputedStyle(element, name)\n }\n\n fillWildcards(unresolvedKeyframes)\n applyPxDefaults(unresolvedKeyframes, name)\n\n /**\n * If we only have one keyframe, explicitly read the initial keyframe\n * from the computed style. This is to ensure consistency with WAAPI behaviour\n * for restarting animations, for instance .play() after finish, when it\n * has one vs two keyframes.\n */\n if (!pseudoElement && unresolvedKeyframes.length < 2) {\n unresolvedKeyframes.unshift(getComputedStyle(element, name))\n }\n\n animationOptions.keyframes = unresolvedKeyframes as ValueKeyframe[]\n }\n\n /**\n * Step 3: Create new animations (write)\n */\n const animations: AnimationPlaybackControls[] = []\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { map, key, options: animationOptions } = animationDefinitions[i]\n const animation = new NativeAnimation(\n animationOptions as NativeAnimationOptions\n )\n\n map.set(key, animation)\n animation.finished.finally(() => map.delete(key))\n\n animations.push(animation)\n }\n\n return animations\n}\n","import { AnimationPlaybackControls, GroupAnimationWithThen } from \"motion-dom\"\nimport { createAnimationsFromSequence } from \"../../sequence/create\"\nimport { AnimationSequence, SequenceOptions } from \"../../sequence/types\"\nimport { animateElements } from \"./animate-elements\"\n\nexport function animateSequence(\n definition: AnimationSequence,\n options?: SequenceOptions\n) {\n const animations: AnimationPlaybackControls[] = []\n\n createAnimationsFromSequence(definition, options).forEach(\n ({ keyframes, transition }, element: Element) => {\n animations.push(...animateElements(element, keyframes, transition))\n }\n )\n\n return new GroupAnimationWithThen(animations)\n}\n","import {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n GroupAnimationWithThen,\n} from \"motion-dom\"\nimport { animateElements } from \"./animate-elements\"\n\nexport const createScopedWaapiAnimate = (scope?: AnimationScope) => {\n function scopedAnimate(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen {\n return new GroupAnimationWithThen(\n animateElements(\n elementOrSelector,\n keyframes as DOMKeyframesDefinition,\n options,\n scope\n )\n )\n }\n\n return scopedAnimate\n}\n\nexport const animateMini = /*@__PURE__*/ createScopedWaapiAnimate()\n"],"names":["resolveElements","removeItem","mixNumber","getEasingForSegment","defaultOffset","isGenerator","secondsToMilliseconds","createGeneratorEasing","fillOffset","warning","reverseEasing","isMotionValue","progress","invariant","getValueTransition","getAnimationMap","animationMapKey","getComputedStyle","fillWildcards","applyPxDefaults","NativeAnimation","GroupAnimationWithThen"],"mappings":";;;;;;;AAEM,SAAU,cAAc,CAC1B,SAAkB,EAAA;AAElB,IAAA,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AACrE;;ACGM,SAAU,eAAe,CAC3B,OAQe,EACf,SAAmD,EACnD,KAAsB,EACtB,aAA6B,EAAA;AAE7B,IAAA,IAAI,OAAO,IAAI,IAAI,EAAE;AACjB,QAAA,OAAO,EAAE;IACb;IAEA,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,cAAc,CAAC,SAAS,CAAC,EAAE;QAC1D,OAAOA,yBAAe,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa,CAAC;IACzD;AAAO,SAAA,IAAI,OAAO,YAAY,QAAQ,EAAE;AACpC,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;IAC9B;AAAO,SAAA,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;AAC/B,QAAA,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;IAC3C;SAAO;QACH,OAAO,CAAC,OAAO,CAAC;IACpB;AACJ;;SCpCgB,uBAAuB,CACnC,QAA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OAAO,aAAa;AACxB,CAAC;MAEY,WAAW,iBAAiB,wBAAwB;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom.js deleted file mode 100644 index 316013a2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom.js +++ /dev/null @@ -1,1354 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var motionDom = require('motion-dom'); -var motionUtils = require('motion-utils'); - -function isDOMKeyframes(keyframes) { - return typeof keyframes === "object" && !Array.isArray(keyframes); -} - -function resolveSubjects(subject, keyframes, scope, selectorCache) { - if (subject == null) { - return []; - } - if (typeof subject === "string" && isDOMKeyframes(keyframes)) { - return motionDom.resolveElements(subject, scope, selectorCache); - } - else if (subject instanceof NodeList) { - return Array.from(subject); - } - else if (Array.isArray(subject)) { - return subject.filter((s) => s != null); - } - else { - return [subject]; - } -} - -function calculateRepeatDuration(duration, repeat, repeatDelay) { - return duration * (repeat + 1) + repeatDelay * repeat; -} - -/** - * Given a absolute or relative time definition and current/prev time state of the sequence, - * calculate an absolute time for the next keyframes. - */ -function calcNextTime(current, next, prev, labels) { - if (typeof next === "number") { - return next; - } - else if (next.startsWith("-") || next.startsWith("+")) { - return Math.max(0, current + parseFloat(next)); - } - else if (next === "<") { - return prev; - } - else if (next.startsWith("<")) { - return Math.max(0, prev + parseFloat(next.slice(1))); - } - else { - return labels.get(next) ?? current; - } -} - -function eraseKeyframes(sequence, startTime, endTime) { - for (let i = 0; i < sequence.length; i++) { - const keyframe = sequence[i]; - if (keyframe.at > startTime && keyframe.at < endTime) { - motionUtils.removeItem(sequence, keyframe); - // If we remove this item we have to push the pointer back one - i--; - } - } -} -function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) { - /** - * Erase every existing value between currentTime and targetTime, - * this will essentially splice this timeline into any currently - * defined ones. - */ - eraseKeyframes(sequence, startTime, endTime); - for (let i = 0; i < keyframes.length; i++) { - sequence.push({ - value: keyframes[i], - at: motionDom.mixNumber(startTime, endTime, offset[i]), - easing: motionUtils.getEasingForSegment(easing, i), - }); - } -} - -/** - * Take an array of times that represent repeated keyframes. For instance - * if we have original times of [0, 0.5, 1] then our repeated times will - * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back - * down to a 0-1 scale. - * - * `repeatDelayUnits` is the repeatDelay expressed in units of a single - * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`. - */ -function normalizeTimes(times, repeat, repeatDelayUnits = 0) { - const totalUnits = repeat + 1 + repeat * repeatDelayUnits; - for (let i = 0; i < times.length; i++) { - times[i] = times[i] / totalUnits; - } -} - -function compareByTime(a, b) { - if (a.at === b.at) { - if (a.value === null) - return 1; - if (b.value === null) - return -1; - return 0; - } - else { - return a.at - b.at; - } -} - -const defaultSegmentEasing = "easeInOut"; -const MAX_REPEAT = 20; -function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) { - const defaultDuration = defaultTransition.duration || 0.3; - const animationDefinitions = new Map(); - const sequences = new Map(); - const elementCache = {}; - const timeLabels = new Map(); - let prevTime = 0; - let currentTime = 0; - let totalDuration = 0; - /** - * Build the timeline by mapping over the sequence array and converting - * the definitions into keyframes and offsets with absolute time values. - * These will later get converted into relative offsets in a second pass. - */ - for (let i = 0; i < sequence.length; i++) { - const segment = sequence[i]; - /** - * If this is a timeline label, mark it and skip the rest of this iteration. - */ - if (typeof segment === "string") { - timeLabels.set(segment, currentTime); - continue; - } - else if (!Array.isArray(segment)) { - timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels)); - continue; - } - let [subject, keyframes, transition = {}] = segment; - /** - * If a relative or absolute time value has been specified we need to resolve - * it in relation to the currentTime. - */ - if (transition.at !== undefined) { - currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels); - } - /** - * Keep track of the maximum duration in this definition. This will be - * applied to currentTime once the definition has been parsed. - */ - let maxDuration = 0; - const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => { - const valueKeyframesAsList = keyframesAsList(valueKeyframes); - const { delay = 0, times = motionDom.defaultOffset(valueKeyframesAsList), type = defaultTransition.type || "keyframes", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition; - let { ease = defaultTransition.ease || "easeOut", duration } = valueTransition; - /** - * Resolve stagger() if defined. - */ - const calculatedDelay = typeof delay === "function" - ? delay(elementIndex, numSubjects) - : delay; - /** - * If this animation should and can use a spring, generate a spring easing function. - */ - const numKeyframes = valueKeyframesAsList.length; - const createGenerator = motionDom.isGenerator(type) - ? type - : generators?.[type || "keyframes"]; - if (numKeyframes <= 2 && createGenerator) { - /** - * As we're creating an easing function from a spring, - * ideally we want to generate it using the real distance - * between the two keyframes. However this isn't always - * possible - in these situations we use 0-100. - */ - let absoluteDelta = 100; - if (numKeyframes === 2 && - isNumberKeyframesArray(valueKeyframesAsList)) { - const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0]; - absoluteDelta = Math.abs(delta); - } - const springTransition = { - ...defaultTransition, - ...remainingTransition, - }; - if (duration !== undefined) { - springTransition.duration = motionUtils.secondsToMilliseconds(duration); - } - const springEasing = motionDom.createGeneratorEasing(springTransition, absoluteDelta, createGenerator); - ease = springEasing.ease; - duration = springEasing.duration; - } - duration ?? (duration = defaultDuration); - const startTime = currentTime + calculatedDelay; - /** - * If there's only one time offset of 0, fill in a second with length 1 - */ - if (times.length === 1 && times[0] === 0) { - times[1] = 1; - } - /** - * Fill out if offset if fewer offsets than keyframes - */ - const remainder = times.length - valueKeyframesAsList.length; - remainder > 0 && motionDom.fillOffset(times, remainder); - /** - * If only one value has been set, ie [1], push a null to the start of - * the keyframe array. This will let us mark a keyframe at this point - * that will later be hydrated with the previous value. - */ - valueKeyframesAsList.length === 1 && - valueKeyframesAsList.unshift(null); - /** - * Segments can't express `repeat: Infinity` or very large - * counts — they'd leave dead time after the segment or - * explode the keyframe array. Ignore with a warning. - */ - if (repeat) { - motionUtils.warning(repeat < MAX_REPEAT, `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`); - } - if (repeat && repeat < MAX_REPEAT) { - /** - * Express repeatDelay in units of a single iteration's duration - * so it can be added to the per-iteration time offsets below - * before they're normalized to 0-1. - */ - const repeatDelayUnits = duration > 0 ? repeatDelay / duration : 0; - duration = calculateRepeatDuration(duration, repeat, repeatDelay); - const originalKeyframes = [...valueKeyframesAsList]; - const originalTimes = [...times]; - ease = Array.isArray(ease) ? [...ease] : [ease]; - const originalEase = [...ease]; - /** - * For reverse/mirror, alternate iterations play the segment - * backwards. mirror matches JSAnimation's mirroredGenerator: - * reversed keyframes, easings unchanged. reverse matches - * JSAnimation's iterationProgress = 1 - p: reversed - * keyframes, easing array reversed AND each function easing - * mapped through reverseEasing (string easings unchanged — - * they're resolved later by the keyframes engine). - */ - const isFlipping = repeatType === "reverse" || repeatType === "mirror"; - let flippedKeyframes = originalKeyframes; - let flippedEases = originalEase; - if (isFlipping) { - flippedKeyframes = [...originalKeyframes].reverse(); - if (repeatType === "reverse") { - flippedEases = [...originalEase] - .reverse() - .map((e) => typeof e === "function" - ? motionUtils.reverseEasing(e) - : e); - } - } - for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) { - const isFlipped = isFlipping && repeatIndex % 2 === 0; - const iterKeyframes = isFlipped - ? flippedKeyframes - : originalKeyframes; - const iterEase = isFlipped ? flippedEases : originalEase; - const iterStartOffset = (repeatIndex + 1) * (1 + repeatDelayUnits); - /** - * If repeatDelay is set, hold the previous iteration's - * final value through the delay by inserting a keyframe - * at the moment the next iteration begins. - */ - if (repeatDelayUnits > 0) { - valueKeyframesAsList.push(valueKeyframesAsList[valueKeyframesAsList.length - 1]); - times.push(iterStartOffset); - ease.push("linear"); - } - valueKeyframesAsList.push(...iterKeyframes); - for (let keyframeIndex = 0; keyframeIndex < iterKeyframes.length; keyframeIndex++) { - times.push(originalTimes[keyframeIndex] + iterStartOffset); - ease.push(keyframeIndex === 0 - ? "linear" - : motionUtils.getEasingForSegment(iterEase, keyframeIndex - 1)); - } - } - normalizeTimes(times, repeat, repeatDelayUnits); - } - const targetTime = startTime + duration; - /** - * Add keyframes, mapping offsets to absolute time. - */ - addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime); - maxDuration = Math.max(calculatedDelay + duration, maxDuration); - totalDuration = Math.max(targetTime, totalDuration); - }; - if (motionDom.isMotionValue(subject)) { - const subjectSequence = getSubjectSequence(subject, sequences); - resolveValueSequence(keyframes, transition, getValueSequence("default", subjectSequence)); - } - else { - const subjects = resolveSubjects(subject, keyframes, scope, elementCache); - const numSubjects = subjects.length; - /** - * For every element in this segment, process the defined values. - */ - for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) { - /** - * Cast necessary, but we know these are of this type - */ - keyframes = keyframes; - transition = transition; - const thisSubject = subjects[subjectIndex]; - const subjectSequence = getSubjectSequence(thisSubject, sequences); - for (const key in keyframes) { - resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects); - } - } - } - prevTime = currentTime; - currentTime += maxDuration; - } - /** - * For every element and value combination create a new animation. - */ - sequences.forEach((valueSequences, element) => { - for (const key in valueSequences) { - const valueSequence = valueSequences[key]; - /** - * Arrange all the keyframes in ascending time order. - */ - valueSequence.sort(compareByTime); - const keyframes = []; - const valueOffset = []; - const valueEasing = []; - /** - * For each keyframe, translate absolute times into - * relative offsets based on the total duration of the timeline. - */ - for (let i = 0; i < valueSequence.length; i++) { - const { at, value, easing } = valueSequence[i]; - keyframes.push(value); - valueOffset.push(motionUtils.progress(0, totalDuration, at)); - valueEasing.push(easing || "easeOut"); - } - /** - * If the first keyframe doesn't land on offset: 0 - * provide one by duplicating the initial keyframe. This ensures - * it snaps to the first keyframe when the animation starts. - */ - if (valueOffset[0] !== 0) { - valueOffset.unshift(0); - keyframes.unshift(keyframes[0]); - valueEasing.unshift(defaultSegmentEasing); - } - /** - * If the last keyframe doesn't land on offset: 1 - * provide one with a null wildcard value. This will ensure it - * stays static until the end of the animation. - */ - if (valueOffset[valueOffset.length - 1] !== 1) { - valueOffset.push(1); - keyframes.push(null); - } - if (!animationDefinitions.has(element)) { - animationDefinitions.set(element, { - keyframes: {}, - transition: {}, - }); - } - const definition = animationDefinitions.get(element); - definition.keyframes[key] = keyframes; - /** - * Exclude `type` from defaultTransition since springs have been - * converted to duration-based easing functions in resolveValueSequence. - * Including `type: "spring"` would cause JSAnimation to error when - * the merged keyframes array has more than 2 keyframes. - */ - const { type: _type, ...remainingDefaultTransition } = defaultTransition; - definition.transition[key] = { - ...remainingDefaultTransition, - duration: totalDuration, - ease: valueEasing, - times: valueOffset, - ...sequenceTransition, - }; - } - }); - return animationDefinitions; -} -function getSubjectSequence(subject, sequences) { - !sequences.has(subject) && sequences.set(subject, {}); - return sequences.get(subject); -} -function getValueSequence(name, sequences) { - if (!sequences[name]) - sequences[name] = []; - return sequences[name]; -} -function keyframesAsList(keyframes) { - return Array.isArray(keyframes) ? keyframes : [keyframes]; -} -function getValueTransition(transition, key) { - return transition && transition[key] - ? { - ...transition, - ...transition[key], - } - : { ...transition }; -} -const isNumber = (keyframe) => typeof keyframe === "number"; -const isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber); - -function createDOMVisualElement(element) { - const options = { - presenceContext: null, - props: {}, - visualState: { - renderState: { - transform: {}, - transformOrigin: {}, - style: {}, - vars: {}, - attrs: {}, - }, - latestValues: {}, - }, - }; - const node = motionDom.isSVGElement(element) && !motionDom.isSVGSVGElement(element) - ? new motionDom.SVGVisualElement(options) - : new motionDom.HTMLVisualElement(options); - node.mount(element); - motionDom.visualElementStore.set(element, node); -} -function createObjectVisualElement(subject) { - const options = { - presenceContext: null, - props: {}, - visualState: { - renderState: { - output: {}, - }, - latestValues: {}, - }, - }; - const node = new motionDom.ObjectVisualElement(options); - node.mount(subject); - motionDom.visualElementStore.set(subject, node); -} - -function isSingleValue(subject, keyframes) { - return (motionDom.isMotionValue(subject) || - typeof subject === "number" || - (typeof subject === "string" && !isDOMKeyframes(keyframes))); -} -/** - * Implementation - */ -function animateSubject(subject, keyframes, options, scope) { - const animations = []; - if (isSingleValue(subject, keyframes)) { - animations.push(motionDom.animateSingleValue(subject, isDOMKeyframes(keyframes) - ? keyframes.default || keyframes - : keyframes, options ? options.default || options : options)); - } - else { - // Gracefully handle null/undefined subjects (e.g., from querySelector returning null) - if (subject == null) { - return animations; - } - const subjects = resolveSubjects(subject, keyframes, scope); - const numSubjects = subjects.length; - motionUtils.invariant(Boolean(numSubjects), "No valid elements provided.", "no-valid-elements"); - for (let i = 0; i < numSubjects; i++) { - const thisSubject = subjects[i]; - const createVisualElement = thisSubject instanceof Element - ? createDOMVisualElement - : createObjectVisualElement; - if (!motionDom.visualElementStore.has(thisSubject)) { - createVisualElement(thisSubject); - } - const visualElement = motionDom.visualElementStore.get(thisSubject); - const transition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if ("delay" in transition && - typeof transition.delay === "function") { - transition.delay = transition.delay(i, numSubjects); - } - animations.push(...motionDom.animateTarget(visualElement, { ...keyframes, transition }, {})); - } - } - return animations; -} - -function animateSequence(sequence, options, scope) { - const animations = []; - /** - * Pre-process: replace function segments with MotionValue segments, - * subscribe callbacks immediately - */ - const processedSequence = sequence.map((segment) => { - if (Array.isArray(segment) && typeof segment[0] === "function") { - const callback = segment[0]; - const mv = motionDom.motionValue(0); - mv.on("change", callback); - if (segment.length === 1) { - return [mv, [0, 1]]; - } - else if (segment.length === 2) { - return [mv, [0, 1], segment[1]]; - } - else { - return [mv, segment[1], segment[2]]; - } - } - return segment; - }); - const animationDefinitions = createAnimationsFromSequence(processedSequence, options, scope, { spring: motionDom.spring }); - animationDefinitions.forEach(({ keyframes, transition }, subject) => { - animations.push(...animateSubject(subject, keyframes, transition)); - }); - return animations; -} - -function isSequence(value) { - return Array.isArray(value) && value.some(Array.isArray); -} -/** - * Creates an animation function that is optionally scoped - * to a specific element. - */ -function createScopedAnimate(options = {}) { - const { scope, reduceMotion, skipAnimations } = options; - /** - * Implementation - */ - function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) { - let animations = []; - let animationOnComplete; - const inherited = {}; - if (reduceMotion !== undefined) - inherited.reduceMotion = reduceMotion; - if (skipAnimations !== undefined) - inherited.skipAnimations = skipAnimations; - if (isSequence(subjectOrSequence)) { - const { onComplete, ...sequenceOptions } = optionsOrKeyframes || {}; - if (typeof onComplete === "function") { - animationOnComplete = onComplete; - } - animations = animateSequence(subjectOrSequence, { ...inherited, ...sequenceOptions }, scope); - } - else { - // Extract top-level onComplete so it doesn't get applied per-value - const { onComplete, ...rest } = options || {}; - if (typeof onComplete === "function") { - animationOnComplete = onComplete; - } - animations = animateSubject(subjectOrSequence, optionsOrKeyframes, { ...inherited, ...rest }, scope); - } - const animation = new motionDom.GroupAnimationWithThen(animations); - if (animationOnComplete) { - animation.finished.then(animationOnComplete); - } - if (scope) { - scope.animations.push(animation); - animation.finished.then(() => { - motionUtils.removeItem(scope.animations, animation); - }); - } - return animation; - } - return scopedAnimate; -} -const animate = createScopedAnimate(); - -function animateElements(elementOrSelector, keyframes, options, scope) { - // Gracefully handle null/undefined elements (e.g., from querySelector returning null) - if (elementOrSelector == null) { - return []; - } - const elements = motionDom.resolveElements(elementOrSelector, scope); - const numElements = elements.length; - motionUtils.invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements"); - /** - * WAAPI doesn't support interrupting animations. - * - * Therefore, starting animations requires a three-step process: - * 1. Stop existing animations (write styles to DOM) - * 2. Resolve keyframes (read styles from DOM) - * 3. Create new animations (write styles to DOM) - * - * The hybrid `animate()` function uses AsyncAnimation to resolve - * keyframes before creating new animations, which removes style - * thrashing. Here, we have much stricter filesize constraints. - * Therefore we do this in a synchronous way that ensures that - * at least within `animate()` calls there is no style thrashing. - * - * In the motion-native-animate-mini-interrupt benchmark this - * was 80% faster than a single loop. - */ - const animationDefinitions = []; - /** - * Step 1: Build options and stop existing animations (write) - */ - for (let i = 0; i < numElements; i++) { - const element = elements[i]; - const elementTransition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if (typeof elementTransition.delay === "function") { - elementTransition.delay = elementTransition.delay(i, numElements); - } - for (const valueName in keyframes) { - let valueKeyframes = keyframes[valueName]; - if (!Array.isArray(valueKeyframes)) { - valueKeyframes = [valueKeyframes]; - } - const valueOptions = { - ...motionDom.getValueTransition(elementTransition, valueName), - }; - valueOptions.duration && (valueOptions.duration = motionUtils.secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = motionUtils.secondsToMilliseconds(valueOptions.delay)); - /** - * If there's an existing animation playing on this element then stop it - * before creating a new one. - */ - const map = motionDom.getAnimationMap(element); - const key = motionDom.animationMapKey(valueName, valueOptions.pseudoElement || ""); - const currentAnimation = map.get(key); - currentAnimation && currentAnimation.stop(); - animationDefinitions.push({ - map, - key, - unresolvedKeyframes: valueKeyframes, - options: { - ...valueOptions, - element, - name: valueName, - allowFlatten: !elementTransition.type && !elementTransition.ease, - }, - }); - } - } - /** - * Step 2: Resolve keyframes (read) - */ - for (let i = 0; i < animationDefinitions.length; i++) { - const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i]; - const { element, name, pseudoElement } = animationOptions; - if (!pseudoElement && unresolvedKeyframes[0] === null) { - unresolvedKeyframes[0] = motionDom.getComputedStyle(element, name); - } - motionDom.fillWildcards(unresolvedKeyframes); - motionDom.applyPxDefaults(unresolvedKeyframes, name); - /** - * If we only have one keyframe, explicitly read the initial keyframe - * from the computed style. This is to ensure consistency with WAAPI behaviour - * for restarting animations, for instance .play() after finish, when it - * has one vs two keyframes. - */ - if (!pseudoElement && unresolvedKeyframes.length < 2) { - unresolvedKeyframes.unshift(motionDom.getComputedStyle(element, name)); - } - animationOptions.keyframes = unresolvedKeyframes; - } - /** - * Step 3: Create new animations (write) - */ - const animations = []; - for (let i = 0; i < animationDefinitions.length; i++) { - const { map, key, options: animationOptions } = animationDefinitions[i]; - const animation = new motionDom.NativeAnimation(animationOptions); - map.set(key, animation); - animation.finished.finally(() => map.delete(key)); - animations.push(animation); - } - return animations; -} - -const createScopedWaapiAnimate = (scope) => { - function scopedAnimate(elementOrSelector, keyframes, options) { - return new motionDom.GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope)); - } - return scopedAnimate; -}; -const animateMini = /*@__PURE__*/ createScopedWaapiAnimate(); - -function canUseNativeTimeline(target) { - if (typeof window === "undefined") - return false; - return target ? motionDom.supportsViewTimeline() : motionDom.supportsScrollTimeline(); -} - -/** - * A time in milliseconds, beyond which we consider the scroll velocity to be 0. - */ -const maxElapsed = 50; -const createAxisInfo = () => ({ - current: 0, - offset: [], - progress: 0, - scrollLength: 0, - targetOffset: 0, - targetLength: 0, - containerLength: 0, - velocity: 0, -}); -const createScrollInfo = () => ({ - time: 0, - x: createAxisInfo(), - y: createAxisInfo(), -}); -const keys = { - x: { - length: "Width", - position: "Left", - }, - y: { - length: "Height", - position: "Top", - }, -}; -function updateAxisInfo(element, axisName, info, time) { - const axis = info[axisName]; - const { length, position } = keys[axisName]; - const prev = axis.current; - const prevTime = info.time; - axis.current = Math.abs(element[`scroll${position}`]); - axis.scrollLength = element[`scroll${length}`] - element[`client${length}`]; - axis.offset.length = 0; - axis.offset[0] = 0; - axis.offset[1] = axis.scrollLength; - axis.progress = motionUtils.progress(0, axis.scrollLength, axis.current); - const elapsed = time - prevTime; - axis.velocity = - elapsed > maxElapsed - ? 0 - : motionUtils.velocityPerSecond(axis.current - prev, elapsed); -} -function updateScrollInfo(element, info, time) { - updateAxisInfo(element, "x", info, time); - updateAxisInfo(element, "y", info, time); - info.time = time; -} - -function calcInset(element, container) { - const inset = { x: 0, y: 0 }; - let current = element; - while (current && current !== container) { - if (motionDom.isHTMLElement(current)) { - inset.x += current.offsetLeft; - inset.y += current.offsetTop; - current = current.offsetParent; - } - else if (current.tagName === "svg") { - /** - * This isn't an ideal approach to measuring the offset of tags. - * It would be preferable, given they behave like HTMLElements in most ways - * to use offsetLeft/Top. But these don't exist on . Likewise we - * can't use .getBBox() like most SVG elements as these provide the offset - * relative to the SVG itself, which for is usually 0x0. - */ - const svgBoundingBox = current.getBoundingClientRect(); - current = current.parentElement; - const parentBoundingBox = current.getBoundingClientRect(); - inset.x += svgBoundingBox.left - parentBoundingBox.left; - inset.y += svgBoundingBox.top - parentBoundingBox.top; - } - else if (current instanceof SVGGraphicsElement) { - const { x, y } = current.getBBox(); - inset.x += x; - inset.y += y; - let svg = null; - let parent = current.parentNode; - while (!svg) { - if (parent.tagName === "svg") { - svg = parent; - } - parent = current.parentNode; - } - current = svg; - } - else { - break; - } - } - return inset; -} - -const namedEdges = { - start: 0, - center: 0.5, - end: 1, -}; -function resolveEdge(edge, length, inset = 0) { - let delta = 0; - /** - * If we have this edge defined as a preset, replace the definition - * with the numerical value. - */ - if (edge in namedEdges) { - edge = namedEdges[edge]; - } - /** - * Handle unit values - */ - if (typeof edge === "string") { - const asNumber = parseFloat(edge); - if (edge.endsWith("px")) { - delta = asNumber; - } - else if (edge.endsWith("%")) { - edge = asNumber / 100; - } - else if (edge.endsWith("vw")) { - delta = (asNumber / 100) * document.documentElement.clientWidth; - } - else if (edge.endsWith("vh")) { - delta = (asNumber / 100) * document.documentElement.clientHeight; - } - else { - edge = asNumber; - } - } - /** - * If the edge is defined as a number, handle as a progress value. - */ - if (typeof edge === "number") { - delta = length * edge; - } - return inset + delta; -} - -const defaultOffset = [0, 0]; -function resolveOffset(offset, containerLength, targetLength, targetInset) { - let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset; - let targetPoint = 0; - let containerPoint = 0; - if (typeof offset === "number") { - /** - * If we're provided offset: [0, 0.5, 1] then each number x should become - * [x, x], so we default to the behaviour of mapping 0 => 0 of both target - * and container etc. - */ - offsetDefinition = [offset, offset]; - } - else if (typeof offset === "string") { - offset = offset.trim(); - if (offset.includes(" ")) { - offsetDefinition = offset.split(" "); - } - else { - /** - * If we're provided a definition like "100px" then we want to apply - * that only to the top of the target point, leaving the container at 0. - * Whereas a named offset like "end" should be applied to both. - */ - offsetDefinition = [offset, namedEdges[offset] ? offset : `0`]; - } - } - targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset); - containerPoint = resolveEdge(offsetDefinition[1], containerLength); - return targetPoint - containerPoint; -} - -const ScrollOffset = { - Enter: [ - [0, 1], - [1, 1], - ], - Exit: [ - [0, 0], - [1, 0], - ], - Any: [ - [1, 0], - [0, 1], - ], - All: [ - [0, 0], - [1, 1], - ], -}; - -const point = { x: 0, y: 0 }; -function getTargetSize(target) { - return "getBBox" in target && target.tagName !== "svg" - ? target.getBBox() - : { width: target.clientWidth, height: target.clientHeight }; -} -function resolveOffsets(container, info, options) { - const { offset: offsetDefinition = ScrollOffset.All } = options; - const { target = container, axis = "y" } = options; - const lengthLabel = axis === "y" ? "height" : "width"; - const inset = target !== container ? calcInset(target, container) : point; - /** - * Measure the target and container. If they're the same thing then we - * use the container's scrollWidth/Height as the target, from there - * all other calculations can remain the same. - */ - const targetSize = target === container - ? { width: container.scrollWidth, height: container.scrollHeight } - : getTargetSize(target); - const containerSize = { - width: container.clientWidth, - height: container.clientHeight, - }; - /** - * Reset the length of the resolved offset array rather than creating a new one. - * TODO: More reusable data structures for targetSize/containerSize would also be good. - */ - info[axis].offset.length = 0; - /** - * Populate the offset array by resolving the user's offset definition into - * a list of pixel scroll offets. - */ - let hasChanged = !info[axis].interpolate; - const numOffsets = offsetDefinition.length; - for (let i = 0; i < numOffsets; i++) { - const offset = resolveOffset(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]); - if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) { - hasChanged = true; - } - info[axis].offset[i] = offset; - } - /** - * If the pixel scroll offsets have changed, create a new interpolator function - * to map scroll value into a progress. - */ - if (hasChanged) { - info[axis].interpolate = motionDom.interpolate(info[axis].offset, motionDom.defaultOffset(offsetDefinition), { clamp: false }); - info[axis].interpolatorOffsets = [...info[axis].offset]; - } - info[axis].progress = motionUtils.clamp(0, 1, info[axis].interpolate(info[axis].current)); -} - -function measure(container, target = container, info) { - /** - * Find inset of target within scrollable container - */ - info.x.targetOffset = 0; - info.y.targetOffset = 0; - if (target !== container) { - let node = target; - while (node && node !== container) { - info.x.targetOffset += node.offsetLeft; - info.y.targetOffset += node.offsetTop; - node = node.offsetParent; - } - } - info.x.targetLength = - target === container ? target.scrollWidth : target.clientWidth; - info.y.targetLength = - target === container ? target.scrollHeight : target.clientHeight; - info.x.containerLength = container.clientWidth; - info.y.containerLength = container.clientHeight; - /** - * In development mode ensure scroll containers aren't position: static as this makes - * it difficult to measure their relative positions. The document scrolling element - * is exempt: offsetParent measurements naturally resolve relative to the document. - */ - if (process.env.NODE_ENV !== "production") { - if (container && - target && - target !== container && - container !== document.documentElement && - container !== document.scrollingElement && - container !== document.body) { - motionUtils.warnOnce(getComputedStyle(container).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly."); - } - } -} -function createOnScrollHandler(element, onScroll, info, options = {}) { - return { - measure: (time) => { - measure(element, options.target, info); - updateScrollInfo(element, info, time); - if (options.offset || options.target) { - resolveOffsets(element, info, options); - } - }, - notify: () => onScroll(info), - }; -} - -const scrollListeners = new WeakMap(); -const resizeListeners = new WeakMap(); -const onScrollHandlers = new WeakMap(); -const scrollSize = new WeakMap(); -const dimensionCheckProcesses = new WeakMap(); -const getEventTarget = (element) => element === document.scrollingElement ? window : element; -function scrollInfo(onScroll, { container = document.scrollingElement, trackContentSize = false, ...options } = {}) { - if (!container) - return motionUtils.noop; - let containerHandlers = onScrollHandlers.get(container); - /** - * Get the onScroll handlers for this container. - * If one isn't found, create a new one. - */ - if (!containerHandlers) { - containerHandlers = new Set(); - onScrollHandlers.set(container, containerHandlers); - } - /** - * Create a new onScroll handler for the provided callback. - */ - const info = createScrollInfo(); - const containerHandler = createOnScrollHandler(container, onScroll, info, options); - containerHandlers.add(containerHandler); - /** - * Check if there's a scroll event listener for this container. - * If not, create one. - */ - if (!scrollListeners.has(container)) { - const measureAll = () => { - for (const handler of containerHandlers) { - handler.measure(motionDom.frameData.timestamp); - } - motionDom.frame.preUpdate(notifyAll); - }; - const notifyAll = () => { - for (const handler of containerHandlers) { - handler.notify(); - } - }; - const listener = () => motionDom.frame.read(measureAll); - scrollListeners.set(container, listener); - const target = getEventTarget(container); - window.addEventListener("resize", listener); - if (container !== document.documentElement) { - resizeListeners.set(container, motionDom.resize(container, listener)); - } - target.addEventListener("scroll", listener); - listener(); - } - /** - * Enable content size tracking if requested and not already enabled. - */ - if (trackContentSize && !dimensionCheckProcesses.has(container)) { - const listener = scrollListeners.get(container); - // Store initial scroll dimensions (object is reused to avoid allocation) - const size = { - width: container.scrollWidth, - height: container.scrollHeight, - }; - scrollSize.set(container, size); - // Add frame-based scroll dimension checking to detect content changes - const checkScrollDimensions = () => { - const newWidth = container.scrollWidth; - const newHeight = container.scrollHeight; - if (size.width !== newWidth || size.height !== newHeight) { - listener(); - size.width = newWidth; - size.height = newHeight; - } - }; - // Schedule with keepAlive=true to run every frame - const dimensionCheckProcess = motionDom.frame.read(checkScrollDimensions, true); - dimensionCheckProcesses.set(container, dimensionCheckProcess); - } - const listener = scrollListeners.get(container); - motionDom.frame.read(listener, false, true); - return () => { - motionDom.cancelFrame(listener); - /** - * Check if we even have any handlers for this container. - */ - const currentHandlers = onScrollHandlers.get(container); - if (!currentHandlers) - return; - currentHandlers.delete(containerHandler); - if (currentHandlers.size) - return; - /** - * If no more handlers, remove the scroll listener too. - */ - const scrollListener = scrollListeners.get(container); - scrollListeners.delete(container); - if (scrollListener) { - getEventTarget(container).removeEventListener("scroll", scrollListener); - resizeListeners.get(container)?.(); - window.removeEventListener("resize", scrollListener); - } - // Clean up scroll dimension checking - const dimensionCheckProcess = dimensionCheckProcesses.get(container); - if (dimensionCheckProcess) { - motionDom.cancelFrame(dimensionCheckProcess); - dimensionCheckProcesses.delete(container); - } - scrollSize.delete(container); - }; -} - -/** - * Maps from ProgressIntersection pairs used by Motion's preset offsets to - * ViewTimeline named ranges. Returns undefined for unrecognised patterns, - * which signals the caller to fall back to JS-based scroll tracking. - */ -const presets = [ - [ScrollOffset.Enter, "entry"], - [ScrollOffset.Exit, "exit"], - [ScrollOffset.Any, "cover"], - [ScrollOffset.All, "contain"], -]; -const stringToProgress = { - start: 0, - end: 1, -}; -function parseStringOffset(s) { - const parts = s.trim().split(/\s+/); - if (parts.length !== 2) - return undefined; - const a = stringToProgress[parts[0]]; - const b = stringToProgress[parts[1]]; - if (a === undefined || b === undefined) - return undefined; - return [a, b]; -} -function normaliseOffset(offset) { - if (offset.length !== 2) - return undefined; - const result = []; - for (const item of offset) { - if (Array.isArray(item)) { - result.push(item); - } - else if (typeof item === "string") { - const parsed = parseStringOffset(item); - if (!parsed) - return undefined; - result.push(parsed); - } - else { - return undefined; - } - } - return result; -} -function matchesPreset(offset, preset) { - const normalised = normaliseOffset(offset); - if (!normalised) - return false; - for (let i = 0; i < 2; i++) { - const o = normalised[i]; - const p = preset[i]; - if (o[0] !== p[0] || o[1] !== p[1]) - return false; - } - return true; -} -function offsetToViewTimelineRange(offset) { - if (!offset) { - return { rangeStart: "contain 0%", rangeEnd: "contain 100%" }; - } - for (const [preset, name] of presets) { - if (matchesPreset(offset, preset)) { - return { rangeStart: `${name} 0%`, rangeEnd: `${name} 100%` }; - } - } - return undefined; -} - -const timelineCache = new Map(); -function scrollTimelineFallback(options) { - const currentTime = { value: 0 }; - const cancel = scrollInfo((info) => { - currentTime.value = info[options.axis].progress * 100; - }, options); - return { currentTime, cancel }; -} -function getTimeline({ source, container, ...options }) { - const { axis } = options; - if (source) - container = source; - let containerCache = timelineCache.get(container); - if (!containerCache) { - containerCache = new Map(); - timelineCache.set(container, containerCache); - } - const targetKey = options.target ?? "self"; - let targetCache = containerCache.get(targetKey); - if (!targetCache) { - targetCache = {}; - containerCache.set(targetKey, targetCache); - } - const axisKey = axis + (options.offset ?? []).join(","); - if (!targetCache[axisKey]) { - if (options.target && canUseNativeTimeline(options.target)) { - const range = offsetToViewTimelineRange(options.offset); - if (range) { - targetCache[axisKey] = new ViewTimeline({ - subject: options.target, - axis, - }); - } - else { - targetCache[axisKey] = scrollTimelineFallback({ - container, - ...options, - }); - } - } - else if (canUseNativeTimeline()) { - targetCache[axisKey] = new ScrollTimeline({ - source: container, - axis, - }); - } - else { - targetCache[axisKey] = scrollTimelineFallback({ - container, - ...options, - }); - } - } - return targetCache[axisKey]; -} - -function attachToAnimation(animation, options) { - const timeline = getTimeline(options); - const range = options.target - ? offsetToViewTimelineRange(options.offset) - : undefined; - /** - * Use native timeline when: - * - No target: ScrollTimeline (existing behaviour) - * - Target with mappable offset: ViewTimeline with named range - * - Target with unmappable offset: fall back to JS observe - */ - const useNative = options.target - ? canUseNativeTimeline(options.target) && !!range - : canUseNativeTimeline(); - return animation.attachTimeline({ - timeline: useNative ? timeline : undefined, - ...(range && - useNative && { - rangeStart: range.rangeStart, - rangeEnd: range.rangeEnd, - }), - observe: (valueAnimation) => { - valueAnimation.pause(); - return motionDom.observeTimeline((progress) => { - valueAnimation.time = - valueAnimation.iterationDuration * progress; - }, timeline); - }, - }); -} - -/** - * Currently, we only support element tracking with `scrollInfo`, though in - * the future we can also offer ViewTimeline support. - */ -function isElementTracking(options) { - return options && (options.target || options.offset); -} - -/** - * If the onScroll function has two arguments, it's expecting - * more specific information about the scroll from scrollInfo. - */ -function isOnScrollWithInfo(onScroll) { - return onScroll.length === 2; -} -function attachToFunction(onScroll, options) { - if (isOnScrollWithInfo(onScroll) || isElementTracking(options)) { - return scrollInfo((info) => { - onScroll(info[options.axis].progress, info); - }, options); - } - else { - return motionDom.observeTimeline(onScroll, getTimeline(options)); - } -} - -function scroll(onScroll, { axis = "y", container = document.scrollingElement, ...options } = {}) { - if (!container) - return motionUtils.noop; - const optionsWithDefaults = { axis, container, ...options }; - return typeof onScroll === "function" - ? attachToFunction(onScroll, optionsWithDefaults) - : attachToAnimation(onScroll, optionsWithDefaults); -} - -const thresholds = { - some: 0, - all: 1, -}; -function inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = "some" } = {}) { - const elements = motionDom.resolveElements(elementOrSelector); - const activeIntersections = new WeakMap(); - const onIntersectionChange = (entries) => { - entries.forEach((entry) => { - const onEnd = activeIntersections.get(entry.target); - /** - * If there's no change to the intersection, we don't need to - * do anything here. - */ - if (entry.isIntersecting === Boolean(onEnd)) - return; - if (entry.isIntersecting) { - const newOnEnd = onStart(entry.target, entry); - if (typeof newOnEnd === "function") { - activeIntersections.set(entry.target, newOnEnd); - } - else { - observer.unobserve(entry.target); - } - } - else if (typeof onEnd === "function") { - onEnd(entry); - activeIntersections.delete(entry.target); - } - }); - }; - const observer = new IntersectionObserver(onIntersectionChange, { - root, - rootMargin, - threshold: typeof amount === "number" ? amount : thresholds[amount], - }); - elements.forEach((element) => observer.observe(element)); - return () => observer.disconnect(); -} - -const distance = (a, b) => Math.abs(a - b); -function distance2D(a, b) { - // Multi-dimensional - const xDelta = distance(a.x, b.x); - const yDelta = distance(a.y, b.y); - return Math.sqrt(xDelta ** 2 + yDelta ** 2); -} - -Object.defineProperty(exports, "delay", { - enumerable: true, - get: function () { return motionDom.delayInSeconds; } -}); -exports.animate = animate; -exports.animateMini = animateMini; -exports.createScopedAnimate = createScopedAnimate; -exports.distance = distance; -exports.distance2D = distance2D; -exports.inView = inView; -exports.scroll = scroll; -exports.scrollInfo = scrollInfo; -Object.keys(motionDom).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return motionDom[k]; } - }); -}); -Object.keys(motionUtils).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return motionUtils[k]; } - }); -}); -//# sourceMappingURL=dom.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom.js.map deleted file mode 100644 index fe5b9d67..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/dom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dom.js","sources":["../../src/animation/utils/is-dom-keyframes.ts","../../src/animation/animate/resolve-subjects.ts","../../src/animation/sequence/utils/calc-repeat-duration.ts","../../src/animation/sequence/utils/calc-time.ts","../../src/animation/sequence/utils/edit.ts","../../src/animation/sequence/utils/normalize-times.ts","../../src/animation/sequence/utils/sort.ts","../../src/animation/sequence/create.ts","../../src/animation/utils/create-visual-element.ts","../../src/animation/animate/subject.ts","../../src/animation/animate/sequence.ts","../../src/animation/animate/index.ts","../../src/animation/animators/waapi/animate-elements.ts","../../src/animation/animators/waapi/animate-style.ts","../../src/render/dom/scroll/utils/can-use-native-timeline.ts","../../src/render/dom/scroll/info.ts","../../src/render/dom/scroll/offsets/inset.ts","../../src/render/dom/scroll/offsets/edge.ts","../../src/render/dom/scroll/offsets/offset.ts","../../src/render/dom/scroll/offsets/presets.ts","../../src/render/dom/scroll/offsets/index.ts","../../src/render/dom/scroll/on-scroll-handler.ts","../../src/render/dom/scroll/track.ts","../../src/render/dom/scroll/utils/offset-to-range.ts","../../src/render/dom/scroll/utils/get-timeline.ts","../../src/render/dom/scroll/attach-animation.ts","../../src/render/dom/scroll/utils/is-element-tracking.ts","../../src/render/dom/scroll/attach-function.ts","../../src/render/dom/scroll/index.ts","../../src/render/dom/viewport/index.ts","../../src/utils/distance.ts"],"sourcesContent":["import { DOMKeyframesDefinition } from \"motion-dom\"\n\nexport function isDOMKeyframes(\n keyframes: unknown\n): keyframes is DOMKeyframesDefinition {\n return typeof keyframes === \"object\" && !Array.isArray(keyframes)\n}\n","import {\n AnimationScope,\n DOMKeyframesDefinition,\n SelectorCache,\n resolveElements,\n} from \"motion-dom\"\nimport { ObjectTarget } from \"../sequence/types\"\nimport { isDOMKeyframes } from \"../utils/is-dom-keyframes\"\n\nexport function resolveSubjects(\n subject:\n | string\n | Element\n | Element[]\n | NodeListOf\n | O\n | O[]\n | null\n | undefined,\n keyframes: DOMKeyframesDefinition | ObjectTarget,\n scope?: AnimationScope,\n selectorCache?: SelectorCache\n) {\n if (subject == null) {\n return []\n }\n\n if (typeof subject === \"string\" && isDOMKeyframes(keyframes)) {\n return resolveElements(subject, scope, selectorCache)\n } else if (subject instanceof NodeList) {\n return Array.from(subject)\n } else if (Array.isArray(subject)) {\n return subject.filter((s) => s != null)\n } else {\n return [subject]\n }\n}\n","export function calculateRepeatDuration(\n duration: number,\n repeat: number,\n repeatDelay: number\n): number {\n return duration * (repeat + 1) + repeatDelay * repeat\n}\n","import { SequenceTime } from \"../types\"\n\n/**\n * Given a absolute or relative time definition and current/prev time state of the sequence,\n * calculate an absolute time for the next keyframes.\n */\nexport function calcNextTime(\n current: number,\n next: SequenceTime,\n prev: number,\n labels: Map\n): number {\n if (typeof next === \"number\") {\n return next\n } else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next))\n } else if (next === \"<\") {\n return prev\n } else if (next.startsWith(\"<\")) {\n return Math.max(0, prev + parseFloat(next.slice(1)))\n } else {\n return labels.get(next) ?? current\n }\n}\n","import { mixNumber, UnresolvedValueKeyframe } from \"motion-dom\"\nimport { Easing, getEasingForSegment, removeItem } from \"motion-utils\"\nimport type { ValueSequence } from \"../types\"\n\nexport function eraseKeyframes(\n sequence: ValueSequence,\n startTime: number,\n endTime: number\n): void {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i]\n\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe)\n\n // If we remove this item we have to push the pointer back one\n i--\n }\n }\n}\n\nexport function addKeyframes(\n sequence: ValueSequence,\n keyframes: UnresolvedValueKeyframe[],\n easing: Easing | Easing[],\n offset: number[],\n startTime: number,\n endTime: number\n): void {\n /**\n * Erase every existing value between currentTime and targetTime,\n * this will essentially splice this timeline into any currently\n * defined ones.\n */\n eraseKeyframes(sequence, startTime, endTime)\n\n for (let i = 0; i < keyframes.length; i++) {\n sequence.push({\n value: keyframes[i],\n at: mixNumber(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i),\n })\n }\n}\n","/**\n * Take an array of times that represent repeated keyframes. For instance\n * if we have original times of [0, 0.5, 1] then our repeated times will\n * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back\n * down to a 0-1 scale.\n *\n * `repeatDelayUnits` is the repeatDelay expressed in units of a single\n * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`.\n */\nexport function normalizeTimes(\n times: number[],\n repeat: number,\n repeatDelayUnits = 0\n): void {\n const totalUnits = repeat + 1 + repeat * repeatDelayUnits\n for (let i = 0; i < times.length; i++) {\n times[i] = times[i] / totalUnits\n }\n}\n","import { AbsoluteKeyframe } from \"../types\"\n\nexport function compareByTime(\n a: AbsoluteKeyframe,\n b: AbsoluteKeyframe\n): number {\n if (a.at === b.at) {\n if (a.value === null) return 1\n if (b.value === null) return -1\n return 0\n } else {\n return a.at - b.at\n }\n}\n","import {\n AnimationScope,\n createGeneratorEasing,\n defaultOffset,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n fillOffset,\n GeneratorFactory,\n isGenerator,\n isMotionValue,\n Transition,\n UnresolvedValueKeyframe,\n type AnyResolvedKeyframe,\n type MotionValue,\n} from \"motion-dom\"\nimport {\n Easing,\n getEasingForSegment,\n progress,\n reverseEasing,\n secondsToMilliseconds,\n warning,\n} from \"motion-utils\"\nimport { resolveSubjects } from \"../animate/resolve-subjects\"\nimport {\n AnimationSequence,\n At,\n ResolvedAnimationDefinitions,\n SequenceMap,\n SequenceOptions,\n ValueSequence,\n} from \"./types\"\nimport { calculateRepeatDuration } from \"./utils/calc-repeat-duration\"\nimport { calcNextTime } from \"./utils/calc-time\"\nimport { addKeyframes } from \"./utils/edit\"\nimport { normalizeTimes } from \"./utils/normalize-times\"\nimport { compareByTime } from \"./utils/sort\"\n\nconst defaultSegmentEasing = \"easeInOut\"\n\nconst MAX_REPEAT = 20\n\nexport function createAnimationsFromSequence(\n sequence: AnimationSequence,\n { defaultTransition = {}, ...sequenceTransition }: SequenceOptions = {},\n scope?: AnimationScope,\n generators?: { [key: string]: GeneratorFactory }\n): ResolvedAnimationDefinitions {\n const defaultDuration = defaultTransition.duration || 0.3\n const animationDefinitions: ResolvedAnimationDefinitions = new Map()\n const sequences = new Map()\n const elementCache = {}\n const timeLabels = new Map()\n\n let prevTime = 0\n let currentTime = 0\n let totalDuration = 0\n\n /**\n * Build the timeline by mapping over the sequence array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i]\n\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime)\n continue\n } else if (!Array.isArray(segment)) {\n timeLabels.set(\n segment.name,\n calcNextTime(currentTime, segment.at, prevTime, timeLabels)\n )\n continue\n }\n\n let [subject, keyframes, transition = {}] = segment\n\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (transition.at !== undefined) {\n currentTime = calcNextTime(\n currentTime,\n transition.at,\n prevTime,\n timeLabels\n )\n }\n\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0\n\n const resolveValueSequence = (\n valueKeyframes: UnresolvedValueKeyframe | UnresolvedValueKeyframe[],\n valueTransition: Transition | DynamicAnimationOptions,\n valueSequence: ValueSequence,\n elementIndex = 0,\n numSubjects = 0\n ) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes)\n const {\n delay = 0,\n times = defaultOffset(valueKeyframesAsList),\n type = defaultTransition.type || \"keyframes\",\n repeat,\n repeatType,\n repeatDelay = 0,\n ...remainingTransition\n } = valueTransition\n let { ease = defaultTransition.ease || \"easeOut\", duration } =\n valueTransition\n\n /**\n * Resolve stagger() if defined.\n */\n const calculatedDelay =\n typeof delay === \"function\"\n ? delay(elementIndex, numSubjects)\n : delay\n\n /**\n * If this animation should and can use a spring, generate a spring easing function.\n */\n const numKeyframes = valueKeyframesAsList.length\n const createGenerator = isGenerator(type)\n ? type\n : generators?.[type || \"keyframes\"]\n\n if (numKeyframes <= 2 && createGenerator) {\n /**\n * As we're creating an easing function from a spring,\n * ideally we want to generate it using the real distance\n * between the two keyframes. However this isn't always\n * possible - in these situations we use 0-100.\n */\n let absoluteDelta = 100\n if (\n numKeyframes === 2 &&\n isNumberKeyframesArray(valueKeyframesAsList)\n ) {\n const delta =\n valueKeyframesAsList[1] - valueKeyframesAsList[0]\n absoluteDelta = Math.abs(delta)\n }\n\n const springTransition = {\n ...defaultTransition,\n ...remainingTransition,\n }\n if (duration !== undefined) {\n springTransition.duration = secondsToMilliseconds(duration)\n }\n\n const springEasing = createGeneratorEasing(\n springTransition,\n absoluteDelta,\n createGenerator\n )\n\n ease = springEasing.ease\n duration = springEasing.duration\n }\n\n duration ??= defaultDuration\n\n const startTime = currentTime + calculatedDelay\n\n /**\n * If there's only one time offset of 0, fill in a second with length 1\n */\n if (times.length === 1 && times[0] === 0) {\n times[1] = 1\n }\n\n /**\n * Fill out if offset if fewer offsets than keyframes\n */\n const remainder = times.length - valueKeyframesAsList.length\n remainder > 0 && fillOffset(times, remainder)\n\n /**\n * If only one value has been set, ie [1], push a null to the start of\n * the keyframe array. This will let us mark a keyframe at this point\n * that will later be hydrated with the previous value.\n */\n valueKeyframesAsList.length === 1 &&\n valueKeyframesAsList.unshift(null)\n\n /**\n * Segments can't express `repeat: Infinity` or very large\n * counts — they'd leave dead time after the segment or\n * explode the keyframe array. Ignore with a warning.\n */\n if (repeat) {\n warning(\n repeat < MAX_REPEAT,\n `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`\n )\n }\n\n if (repeat && repeat < MAX_REPEAT) {\n /**\n * Express repeatDelay in units of a single iteration's duration\n * so it can be added to the per-iteration time offsets below\n * before they're normalized to 0-1.\n */\n const repeatDelayUnits =\n duration > 0 ? repeatDelay / duration : 0\n\n duration = calculateRepeatDuration(\n duration,\n repeat,\n repeatDelay\n )\n\n const originalKeyframes = [...valueKeyframesAsList]\n const originalTimes = [...times]\n ease = Array.isArray(ease) ? [...ease] : [ease]\n const originalEase = [...ease]\n\n /**\n * For reverse/mirror, alternate iterations play the segment\n * backwards. mirror matches JSAnimation's mirroredGenerator:\n * reversed keyframes, easings unchanged. reverse matches\n * JSAnimation's iterationProgress = 1 - p: reversed\n * keyframes, easing array reversed AND each function easing\n * mapped through reverseEasing (string easings unchanged —\n * they're resolved later by the keyframes engine).\n */\n const isFlipping =\n repeatType === \"reverse\" || repeatType === \"mirror\"\n let flippedKeyframes = originalKeyframes\n let flippedEases = originalEase\n if (isFlipping) {\n flippedKeyframes = [...originalKeyframes].reverse()\n if (repeatType === \"reverse\") {\n flippedEases = [...originalEase]\n .reverse()\n .map((e) =>\n typeof e === \"function\"\n ? reverseEasing(e)\n : e\n )\n }\n }\n\n for (\n let repeatIndex = 0;\n repeatIndex < repeat;\n repeatIndex++\n ) {\n const isFlipped = isFlipping && repeatIndex % 2 === 0\n const iterKeyframes = isFlipped\n ? flippedKeyframes\n : originalKeyframes\n const iterEase = isFlipped ? flippedEases : originalEase\n const iterStartOffset =\n (repeatIndex + 1) * (1 + repeatDelayUnits)\n\n /**\n * If repeatDelay is set, hold the previous iteration's\n * final value through the delay by inserting a keyframe\n * at the moment the next iteration begins.\n */\n if (repeatDelayUnits > 0) {\n valueKeyframesAsList.push(\n valueKeyframesAsList[\n valueKeyframesAsList.length - 1\n ]\n )\n times.push(iterStartOffset)\n ease.push(\"linear\")\n }\n\n valueKeyframesAsList.push(...iterKeyframes)\n\n for (\n let keyframeIndex = 0;\n keyframeIndex < iterKeyframes.length;\n keyframeIndex++\n ) {\n times.push(\n originalTimes[keyframeIndex] + iterStartOffset\n )\n ease.push(\n keyframeIndex === 0\n ? \"linear\"\n : getEasingForSegment(\n iterEase,\n keyframeIndex - 1\n )\n )\n }\n }\n\n normalizeTimes(times, repeat, repeatDelayUnits)\n }\n\n const targetTime = startTime + duration\n\n /**\n * Add keyframes, mapping offsets to absolute time.\n */\n addKeyframes(\n valueSequence,\n valueKeyframesAsList,\n ease as Easing | Easing[],\n times,\n startTime,\n targetTime\n )\n\n maxDuration = Math.max(calculatedDelay + duration, maxDuration)\n totalDuration = Math.max(targetTime, totalDuration)\n }\n\n if (isMotionValue(subject)) {\n const subjectSequence = getSubjectSequence(subject, sequences)\n resolveValueSequence(\n keyframes as AnyResolvedKeyframe,\n transition,\n getValueSequence(\"default\", subjectSequence)\n )\n } else {\n const subjects = resolveSubjects(\n subject,\n keyframes as DOMKeyframesDefinition,\n scope,\n elementCache\n )\n\n const numSubjects = subjects.length\n\n /**\n * For every element in this segment, process the defined values.\n */\n for (\n let subjectIndex = 0;\n subjectIndex < numSubjects;\n subjectIndex++\n ) {\n /**\n * Cast necessary, but we know these are of this type\n */\n keyframes = keyframes as DOMKeyframesDefinition\n transition = transition as DynamicAnimationOptions\n\n const thisSubject = subjects[subjectIndex]\n const subjectSequence = getSubjectSequence(\n thisSubject,\n sequences\n )\n\n for (const key in keyframes) {\n resolveValueSequence(\n keyframes[\n key as keyof typeof keyframes\n ] as UnresolvedValueKeyframe,\n getValueTransition(transition, key),\n getValueSequence(key, subjectSequence),\n subjectIndex,\n numSubjects\n )\n }\n }\n }\n\n prevTime = currentTime\n currentTime += maxDuration\n }\n\n /**\n * For every element and value combination create a new animation.\n */\n sequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key]\n\n /**\n * Arrange all the keyframes in ascending time order.\n */\n valueSequence.sort(compareByTime)\n\n const keyframes: UnresolvedValueKeyframe[] = []\n const valueOffset: number[] = []\n const valueEasing: Easing[] = []\n\n /**\n * For each keyframe, translate absolute times into\n * relative offsets based on the total duration of the timeline.\n */\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i]\n keyframes.push(value)\n valueOffset.push(progress(0, totalDuration, at))\n valueEasing.push(easing || \"easeOut\")\n }\n\n /**\n * If the first keyframe doesn't land on offset: 0\n * provide one by duplicating the initial keyframe. This ensures\n * it snaps to the first keyframe when the animation starts.\n */\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0)\n keyframes.unshift(keyframes[0])\n valueEasing.unshift(defaultSegmentEasing)\n }\n\n /**\n * If the last keyframe doesn't land on offset: 1\n * provide one with a null wildcard value. This will ensure it\n * stays static until the end of the animation.\n */\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1)\n keyframes.push(null)\n }\n\n if (!animationDefinitions.has(element)) {\n animationDefinitions.set(element, {\n keyframes: {},\n transition: {},\n })\n }\n\n const definition = animationDefinitions.get(element)!\n\n definition.keyframes[key] = keyframes\n\n /**\n * Exclude `type` from defaultTransition since springs have been\n * converted to duration-based easing functions in resolveValueSequence.\n * Including `type: \"spring\"` would cause JSAnimation to error when\n * the merged keyframes array has more than 2 keyframes.\n */\n const { type: _type, ...remainingDefaultTransition } =\n defaultTransition\n definition.transition[key] = {\n ...remainingDefaultTransition,\n duration: totalDuration,\n ease: valueEasing,\n times: valueOffset,\n ...sequenceTransition,\n }\n }\n })\n\n return animationDefinitions\n}\n\nfunction getSubjectSequence(\n subject: Element | MotionValue | O,\n sequences: Map\n): SequenceMap {\n !sequences.has(subject) && sequences.set(subject, {})\n return sequences.get(subject)!\n}\n\nfunction getValueSequence(name: string, sequences: SequenceMap): ValueSequence {\n if (!sequences[name]) sequences[name] = []\n return sequences[name]\n}\n\nfunction keyframesAsList(\n keyframes: UnresolvedValueKeyframe | UnresolvedValueKeyframe[]\n): UnresolvedValueKeyframe[] {\n return Array.isArray(keyframes) ? keyframes : [keyframes]\n}\n\nexport function getValueTransition(\n transition: DynamicAnimationOptions & At,\n key: string\n): DynamicAnimationOptions {\n return transition && transition[key as keyof typeof transition]\n ? {\n ...transition,\n ...(transition[key as keyof typeof transition] as Transition),\n }\n : { ...transition }\n}\n\nconst isNumber = (keyframe: unknown) => typeof keyframe === \"number\"\nconst isNumberKeyframesArray = (\n keyframes: UnresolvedValueKeyframe[]\n): keyframes is number[] => keyframes.every(isNumber)\n","import {\n HTMLVisualElement,\n isSVGElement,\n isSVGSVGElement,\n ObjectVisualElement,\n SVGVisualElement,\n visualElementStore,\n} from \"motion-dom\"\n\nexport function createDOMVisualElement(element: HTMLElement | SVGElement) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n transform: {},\n transformOrigin: {},\n style: {},\n vars: {},\n attrs: {},\n },\n latestValues: {},\n },\n }\n const node =\n isSVGElement(element) && !isSVGSVGElement(element)\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options)\n\n node.mount(element as any)\n\n visualElementStore.set(element, node)\n}\n\nexport function createObjectVisualElement(subject: Object) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n output: {},\n },\n latestValues: {},\n },\n }\n const node = new ObjectVisualElement(options)\n\n node.mount(subject)\n\n visualElementStore.set(subject, node)\n}\n","import {\n animateTarget,\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n AnyResolvedKeyframe,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n isMotionValue,\n MotionValue,\n TargetAndTransition,\n UnresolvedValueKeyframe,\n ValueAnimationTransition,\n visualElementStore,\n} from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\nimport { ObjectTarget } from \"../sequence/types\"\nimport {\n createDOMVisualElement,\n createObjectVisualElement,\n} from \"../utils/create-visual-element\"\nimport { isDOMKeyframes } from \"../utils/is-dom-keyframes\"\nimport { resolveSubjects } from \"./resolve-subjects\"\nimport { animateSingleValue } from \"motion-dom\"\n\nexport type AnimationSubject = Element | MotionValue | any\n\nfunction isSingleValue(\n subject: unknown,\n keyframes: unknown\n): subject is MotionValue | AnyResolvedKeyframe {\n return (\n isMotionValue(subject) ||\n typeof subject === \"number\" ||\n (typeof subject === \"string\" && !isDOMKeyframes(keyframes))\n )\n}\n\n/**\n * Animate a string\n */\nexport function animateSubject(\n value: string | MotionValue,\n keyframes: string | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a number\n */\nexport function animateSubject(\n value: number | MotionValue,\n keyframes: number | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a Element\n */\nexport function animateSubject(\n element: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a object\n */\nexport function animateSubject(\n object: O | O[],\n keyframes: ObjectTarget,\n options?: DynamicAnimationOptions\n): AnimationPlaybackControlsWithThen[]\n/**\n * Implementation\n */\nexport function animateSubject(\n subject:\n | MotionValue\n | MotionValue\n | number\n | string\n | ElementOrSelector\n | O\n | O[],\n keyframes:\n | number\n | string\n | UnresolvedValueKeyframe[]\n | UnresolvedValueKeyframe[]\n | DOMKeyframesDefinition\n | ObjectTarget,\n options?:\n | ValueAnimationTransition\n | ValueAnimationTransition\n | DynamicAnimationOptions,\n scope?: AnimationScope\n): AnimationPlaybackControlsWithThen[] {\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n if (isSingleValue(subject, keyframes)) {\n animations.push(\n animateSingleValue(\n subject,\n isDOMKeyframes(keyframes)\n ? (keyframes as any).default || keyframes\n : keyframes,\n options ? (options as any).default || options : options\n )\n )\n } else {\n // Gracefully handle null/undefined subjects (e.g., from querySelector returning null)\n if (subject == null) {\n return animations\n }\n\n const subjects = resolveSubjects(\n subject,\n keyframes as DOMKeyframesDefinition,\n scope\n )\n\n const numSubjects = subjects.length\n\n invariant(\n Boolean(numSubjects),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n for (let i = 0; i < numSubjects; i++) {\n const thisSubject = subjects[i]\n\n const createVisualElement =\n thisSubject instanceof Element\n ? createDOMVisualElement\n : createObjectVisualElement\n\n if (!visualElementStore.has(thisSubject)) {\n createVisualElement(thisSubject as any)\n }\n\n const visualElement = visualElementStore.get(thisSubject)!\n const transition = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (\n \"delay\" in transition &&\n typeof transition.delay === \"function\"\n ) {\n transition.delay = transition.delay(i, numSubjects)\n }\n\n animations.push(\n ...animateTarget(\n visualElement,\n { ...(keyframes as {}), transition } as TargetAndTransition,\n {}\n )\n )\n }\n }\n\n return animations\n}\n","import {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n motionValue,\n spring,\n} from \"motion-dom\"\nimport { createAnimationsFromSequence } from \"../sequence/create\"\nimport { AnimationSequence, SequenceOptions } from \"../sequence/types\"\nimport { animateSubject } from \"./subject\"\n\nexport function animateSequence(\n sequence: AnimationSequence,\n options?: SequenceOptions,\n scope?: AnimationScope\n) {\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n /**\n * Pre-process: replace function segments with MotionValue segments,\n * subscribe callbacks immediately\n */\n const processedSequence = sequence.map((segment) => {\n if (Array.isArray(segment) && typeof segment[0] === \"function\") {\n const callback = segment[0] as (value: any) => void\n const mv = motionValue(0)\n mv.on(\"change\", callback)\n\n if (segment.length === 1) {\n return [mv, [0, 1]] as any\n } else if (segment.length === 2) {\n return [mv, [0, 1], segment[1]] as any\n } else {\n return [mv, segment[1], segment[2]] as any\n }\n }\n return segment\n }) as AnimationSequence\n\n const animationDefinitions = createAnimationsFromSequence(\n processedSequence,\n options,\n scope,\n { spring }\n )\n\n animationDefinitions.forEach(({ keyframes, transition }, subject) => {\n animations.push(...animateSubject(subject, keyframes, transition))\n })\n\n return animations\n}\n","import type {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n MotionValue,\n UnresolvedValueKeyframe,\n ValueAnimationTransition,\n} from \"motion-dom\"\nimport { GroupAnimationWithThen } from \"motion-dom\"\nimport { removeItem } from \"motion-utils\"\nimport {\n AnimationSequence,\n ObjectTarget,\n SequenceOptions,\n} from \"../sequence/types\"\nimport { animateSequence } from \"./sequence\"\nimport { animateSubject } from \"./subject\"\n\nfunction isSequence(value: unknown): value is AnimationSequence {\n return Array.isArray(value) && value.some(Array.isArray)\n}\n\ninterface ScopedAnimateOptions {\n scope?: AnimationScope\n reduceMotion?: boolean\n skipAnimations?: boolean\n}\n\n/**\n * Creates an animation function that is optionally scoped\n * to a specific element.\n */\nexport function createScopedAnimate(options: ScopedAnimateOptions = {}) {\n const { scope, reduceMotion, skipAnimations } = options\n /**\n * Animate a sequence\n */\n function scopedAnimate(\n sequence: AnimationSequence,\n options?: SequenceOptions\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate a string\n */\n function scopedAnimate(\n value: string | MotionValue,\n keyframes: string | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate a number\n */\n function scopedAnimate(\n value: number | MotionValue,\n keyframes: number | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate a generic motion value\n */\n function scopedAnimate(\n value: V | MotionValue,\n keyframes: V | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate an Element\n */\n function scopedAnimate(\n element: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate an object\n */\n function scopedAnimate(\n object: O | O[],\n keyframes: ObjectTarget,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen\n /**\n * Implementation\n */\n function scopedAnimate(\n subjectOrSequence:\n | AnimationSequence\n | MotionValue\n | MotionValue\n | number\n | string\n | ElementOrSelector\n | O\n | O[],\n optionsOrKeyframes?:\n | SequenceOptions\n | number\n | string\n | UnresolvedValueKeyframe[]\n | UnresolvedValueKeyframe[]\n | DOMKeyframesDefinition\n | ObjectTarget,\n options?:\n | ValueAnimationTransition\n | ValueAnimationTransition\n | DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen {\n let animations: AnimationPlaybackControlsWithThen[] = []\n let animationOnComplete: VoidFunction | undefined\n\n const inherited: { reduceMotion?: boolean; skipAnimations?: boolean } =\n {}\n if (reduceMotion !== undefined) inherited.reduceMotion = reduceMotion\n if (skipAnimations !== undefined)\n inherited.skipAnimations = skipAnimations\n\n if (isSequence(subjectOrSequence)) {\n const { onComplete, ...sequenceOptions } =\n (optionsOrKeyframes as SequenceOptions) || {}\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete as VoidFunction\n }\n animations = animateSequence(\n subjectOrSequence,\n { ...inherited, ...sequenceOptions } as SequenceOptions,\n scope\n )\n } else {\n // Extract top-level onComplete so it doesn't get applied per-value\n const { onComplete, ...rest } = options || {}\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete as VoidFunction\n }\n animations = animateSubject(\n subjectOrSequence as ElementOrSelector,\n optionsOrKeyframes as DOMKeyframesDefinition,\n { ...inherited, ...rest } as DynamicAnimationOptions,\n scope\n )\n }\n\n const animation = new GroupAnimationWithThen(animations)\n\n if (animationOnComplete) {\n animation.finished.then(animationOnComplete)\n }\n\n if (scope) {\n scope.animations.push(animation)\n animation.finished.then(() => {\n removeItem(scope.animations, animation)\n })\n }\n\n return animation\n }\n\n return scopedAnimate\n}\n\nexport const animate = createScopedAnimate()\n","import {\n animationMapKey,\n AnimationPlaybackControls,\n AnimationScope,\n applyPxDefaults,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n fillWildcards,\n getAnimationMap,\n getComputedStyle,\n getValueTransition,\n NativeAnimation,\n NativeAnimationOptions,\n resolveElements,\n UnresolvedValueKeyframe,\n ValueKeyframe,\n} from \"motion-dom\"\nimport { invariant, secondsToMilliseconds } from \"motion-utils\"\n\ninterface AnimationDefinition {\n map: Map>\n key: string\n unresolvedKeyframes: UnresolvedValueKeyframe[]\n options: Omit & {\n keyframes?: ValueKeyframe[]\n }\n}\n\nexport function animateElements(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n) {\n // Gracefully handle null/undefined elements (e.g., from querySelector returning null)\n if (elementOrSelector == null) {\n return []\n }\n\n const elements = resolveElements(elementOrSelector, scope) as Array<\n HTMLElement | SVGElement\n >\n const numElements = elements.length\n\n invariant(\n Boolean(numElements),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions: AnimationDefinition[] = []\n\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i]\n const elementTransition: DynamicAnimationOptions = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements)\n }\n\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName as keyof typeof keyframes]!\n\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes]\n }\n\n const valueOptions = {\n ...getValueTransition(elementTransition as any, valueName),\n }\n\n valueOptions.duration &&= secondsToMilliseconds(\n valueOptions.duration\n )\n\n valueOptions.delay &&= secondsToMilliseconds(valueOptions.delay)\n\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element)\n const key = animationMapKey(\n valueName,\n valueOptions.pseudoElement || \"\"\n )\n const currentAnimation = map.get(key)\n currentAnimation && currentAnimation.stop()\n\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n options: {\n ...valueOptions,\n element,\n name: valueName,\n allowFlatten:\n !elementTransition.type && !elementTransition.ease,\n },\n })\n }\n }\n\n /**\n * Step 2: Resolve keyframes (read)\n */\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { unresolvedKeyframes, options: animationOptions } =\n animationDefinitions[i]\n\n const { element, name, pseudoElement } = animationOptions\n if (!pseudoElement && unresolvedKeyframes[0] === null) {\n unresolvedKeyframes[0] = getComputedStyle(element, name)\n }\n\n fillWildcards(unresolvedKeyframes)\n applyPxDefaults(unresolvedKeyframes, name)\n\n /**\n * If we only have one keyframe, explicitly read the initial keyframe\n * from the computed style. This is to ensure consistency with WAAPI behaviour\n * for restarting animations, for instance .play() after finish, when it\n * has one vs two keyframes.\n */\n if (!pseudoElement && unresolvedKeyframes.length < 2) {\n unresolvedKeyframes.unshift(getComputedStyle(element, name))\n }\n\n animationOptions.keyframes = unresolvedKeyframes as ValueKeyframe[]\n }\n\n /**\n * Step 3: Create new animations (write)\n */\n const animations: AnimationPlaybackControls[] = []\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { map, key, options: animationOptions } = animationDefinitions[i]\n const animation = new NativeAnimation(\n animationOptions as NativeAnimationOptions\n )\n\n map.set(key, animation)\n animation.finished.finally(() => map.delete(key))\n\n animations.push(animation)\n }\n\n return animations\n}\n","import {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n GroupAnimationWithThen,\n} from \"motion-dom\"\nimport { animateElements } from \"./animate-elements\"\n\nexport const createScopedWaapiAnimate = (scope?: AnimationScope) => {\n function scopedAnimate(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen {\n return new GroupAnimationWithThen(\n animateElements(\n elementOrSelector,\n keyframes as DOMKeyframesDefinition,\n options,\n scope\n )\n )\n }\n\n return scopedAnimate\n}\n\nexport const animateMini = /*@__PURE__*/ createScopedWaapiAnimate()\n","import { supportsScrollTimeline, supportsViewTimeline } from \"motion-dom\"\n\nexport function canUseNativeTimeline(target?: Element) {\n if (typeof window === \"undefined\") return false\n return target ? supportsViewTimeline() : supportsScrollTimeline()\n}\n","import { progress, velocityPerSecond } from \"motion-utils\"\nimport { AxisScrollInfo, ScrollInfo } from \"./types\"\n\n/**\n * A time in milliseconds, beyond which we consider the scroll velocity to be 0.\n */\nconst maxElapsed = 50\n\nconst createAxisInfo = (): AxisScrollInfo => ({\n current: 0,\n offset: [],\n progress: 0,\n scrollLength: 0,\n targetOffset: 0,\n targetLength: 0,\n containerLength: 0,\n velocity: 0,\n})\n\nexport const createScrollInfo = (): ScrollInfo => ({\n time: 0,\n x: createAxisInfo(),\n y: createAxisInfo(),\n})\n\nconst keys = {\n x: {\n length: \"Width\",\n position: \"Left\",\n },\n y: {\n length: \"Height\",\n position: \"Top\",\n },\n} as const\n\nfunction updateAxisInfo(\n element: Element,\n axisName: \"x\" | \"y\",\n info: ScrollInfo,\n time: number\n) {\n const axis = info[axisName]\n const { length, position } = keys[axisName]\n\n const prev = axis.current\n const prevTime = info.time\n\n axis.current = Math.abs(element[`scroll${position}`])\n axis.scrollLength = element[`scroll${length}`] - element[`client${length}`]\n\n axis.offset.length = 0\n axis.offset[0] = 0\n axis.offset[1] = axis.scrollLength\n axis.progress = progress(0, axis.scrollLength, axis.current)\n\n const elapsed = time - prevTime\n axis.velocity =\n elapsed > maxElapsed\n ? 0\n : velocityPerSecond(axis.current - prev, elapsed)\n}\n\nexport function updateScrollInfo(\n element: Element,\n info: ScrollInfo,\n time: number\n) {\n updateAxisInfo(element, \"x\", info, time)\n updateAxisInfo(element, \"y\", info, time)\n info.time = time\n}\n","import { isHTMLElement } from \"motion-dom\"\n\nexport function calcInset(element: Element, container: Element) {\n const inset = { x: 0, y: 0 }\n\n let current: Element | null = element\n while (current && current !== container) {\n if (isHTMLElement(current)) {\n inset.x += current.offsetLeft\n inset.y += current.offsetTop\n current = current.offsetParent\n } else if (current.tagName === \"svg\") {\n /**\n * This isn't an ideal approach to measuring the offset of tags.\n * It would be preferable, given they behave like HTMLElements in most ways\n * to use offsetLeft/Top. But these don't exist on . Likewise we\n * can't use .getBBox() like most SVG elements as these provide the offset\n * relative to the SVG itself, which for is usually 0x0.\n */\n const svgBoundingBox = current.getBoundingClientRect()\n current = current.parentElement!\n const parentBoundingBox = current.getBoundingClientRect()\n inset.x += svgBoundingBox.left - parentBoundingBox.left\n inset.y += svgBoundingBox.top - parentBoundingBox.top\n } else if (current instanceof SVGGraphicsElement) {\n const { x, y } = current.getBBox()\n inset.x += x\n inset.y += y\n\n let svg: SVGElement | null = null\n let parent: SVGElement = current.parentNode as SVGElement\n while (!svg) {\n if (parent.tagName === \"svg\") {\n svg = parent\n }\n parent = current.parentNode as SVGElement\n }\n current = svg\n } else {\n break\n }\n }\n\n return inset\n}\n","import { Edge, NamedEdges } from \"../types\"\n\nexport const namedEdges: Record = {\n start: 0,\n center: 0.5,\n end: 1,\n}\n\nexport function resolveEdge(edge: Edge, length: number, inset = 0) {\n let delta = 0\n\n /**\n * If we have this edge defined as a preset, replace the definition\n * with the numerical value.\n */\n if (edge in namedEdges) {\n edge = namedEdges[edge as NamedEdges]\n }\n\n /**\n * Handle unit values\n */\n if (typeof edge === \"string\") {\n const asNumber = parseFloat(edge)\n\n if (edge.endsWith(\"px\")) {\n delta = asNumber\n } else if (edge.endsWith(\"%\")) {\n edge = asNumber / 100\n } else if (edge.endsWith(\"vw\")) {\n delta = (asNumber / 100) * document.documentElement.clientWidth\n } else if (edge.endsWith(\"vh\")) {\n delta = (asNumber / 100) * document.documentElement.clientHeight\n } else {\n edge = asNumber\n }\n }\n\n /**\n * If the edge is defined as a number, handle as a progress value.\n */\n if (typeof edge === \"number\") {\n delta = length * edge\n }\n\n return inset + delta\n}\n","import { Edge, EdgeString, Intersection, ProgressIntersection } from \"../types\"\nimport { namedEdges, resolveEdge } from \"./edge\"\n\nconst defaultOffset: ProgressIntersection = [0, 0]\n\nexport function resolveOffset(\n offset: Edge | Intersection | ProgressIntersection,\n containerLength: number,\n targetLength: number,\n targetInset: number\n) {\n let offsetDefinition: ProgressIntersection | [EdgeString, EdgeString] =\n Array.isArray(offset) ? offset : defaultOffset\n\n let targetPoint = 0\n let containerPoint = 0\n\n if (typeof offset === \"number\") {\n /**\n * If we're provided offset: [0, 0.5, 1] then each number x should become\n * [x, x], so we default to the behaviour of mapping 0 => 0 of both target\n * and container etc.\n */\n offsetDefinition = [offset, offset]\n } else if (typeof offset === \"string\") {\n offset = offset.trim() as EdgeString\n\n if (offset.includes(\" \")) {\n offsetDefinition = offset.split(\" \") as [EdgeString, EdgeString]\n } else {\n /**\n * If we're provided a definition like \"100px\" then we want to apply\n * that only to the top of the target point, leaving the container at 0.\n * Whereas a named offset like \"end\" should be applied to both.\n */\n offsetDefinition = [offset, namedEdges[offset as keyof typeof namedEdges] ? offset : `0`]\n }\n }\n\n targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset)\n containerPoint = resolveEdge(offsetDefinition[1], containerLength)\n\n return targetPoint - containerPoint\n}\n","import { ProgressIntersection } from \"../types\"\n\nexport const ScrollOffset: Record = {\n Enter: [\n [0, 1],\n [1, 1],\n ],\n Exit: [\n [0, 0],\n [1, 0],\n ],\n Any: [\n [1, 0],\n [0, 1],\n ],\n All: [\n [0, 0],\n [1, 1],\n ],\n}\n","import { defaultOffset, interpolate } from \"motion-dom\"\nimport { clamp } from \"motion-utils\"\nimport { ScrollInfo, ScrollInfoOptions } from \"../types\"\nimport { calcInset } from \"./inset\"\nimport { resolveOffset } from \"./offset\"\nimport { ScrollOffset } from \"./presets\"\n\nconst point = { x: 0, y: 0 }\n\nfunction getTargetSize(target: Element) {\n return \"getBBox\" in target && target.tagName !== \"svg\"\n ? (target as SVGGraphicsElement).getBBox()\n : { width: target.clientWidth, height: target.clientHeight }\n}\n\nexport function resolveOffsets(\n container: Element,\n info: ScrollInfo,\n options: ScrollInfoOptions\n) {\n const { offset: offsetDefinition = ScrollOffset.All } = options\n const { target = container, axis = \"y\" } = options\n const lengthLabel = axis === \"y\" ? \"height\" : \"width\"\n\n const inset = target !== container ? calcInset(target, container) : point\n\n /**\n * Measure the target and container. If they're the same thing then we\n * use the container's scrollWidth/Height as the target, from there\n * all other calculations can remain the same.\n */\n const targetSize =\n target === container\n ? { width: container.scrollWidth, height: container.scrollHeight }\n : getTargetSize(target)\n\n const containerSize = {\n width: container.clientWidth,\n height: container.clientHeight,\n }\n\n /**\n * Reset the length of the resolved offset array rather than creating a new one.\n * TODO: More reusable data structures for targetSize/containerSize would also be good.\n */\n info[axis].offset.length = 0\n\n /**\n * Populate the offset array by resolving the user's offset definition into\n * a list of pixel scroll offets.\n */\n let hasChanged = !info[axis].interpolate\n\n const numOffsets = offsetDefinition.length\n for (let i = 0; i < numOffsets; i++) {\n const offset = resolveOffset(\n offsetDefinition[i],\n containerSize[lengthLabel],\n targetSize[lengthLabel],\n inset[axis]\n )\n\n if (!hasChanged && offset !== info[axis].interpolatorOffsets![i]) {\n hasChanged = true\n }\n\n info[axis].offset[i] = offset\n }\n\n /**\n * If the pixel scroll offsets have changed, create a new interpolator function\n * to map scroll value into a progress.\n */\n if (hasChanged) {\n info[axis].interpolate = interpolate(\n info[axis].offset,\n defaultOffset(offsetDefinition),\n { clamp: false }\n )\n\n info[axis].interpolatorOffsets = [...info[axis].offset]\n }\n\n info[axis].progress = clamp(\n 0,\n 1,\n info[axis].interpolate!(info[axis].current)\n )\n}\n","import { warnOnce } from \"motion-utils\"\nimport { updateScrollInfo } from \"./info\"\nimport { resolveOffsets } from \"./offsets/index\"\nimport {\n OnScrollHandler,\n OnScrollInfo,\n ScrollInfo,\n ScrollInfoOptions,\n} from \"./types\"\n\nfunction measure(\n container: Element,\n target: Element = container,\n info: ScrollInfo\n) {\n /**\n * Find inset of target within scrollable container\n */\n info.x.targetOffset = 0\n info.y.targetOffset = 0\n if (target !== container) {\n let node = target as HTMLElement\n while (node && node !== container) {\n info.x.targetOffset += node.offsetLeft\n info.y.targetOffset += node.offsetTop\n node = node.offsetParent as HTMLElement\n }\n }\n\n info.x.targetLength =\n target === container ? target.scrollWidth : target.clientWidth\n info.y.targetLength =\n target === container ? target.scrollHeight : target.clientHeight\n info.x.containerLength = container.clientWidth\n info.y.containerLength = container.clientHeight\n\n /**\n * In development mode ensure scroll containers aren't position: static as this makes\n * it difficult to measure their relative positions. The document scrolling element\n * is exempt: offsetParent measurements naturally resolve relative to the document.\n */\n if (process.env.NODE_ENV !== \"production\") {\n if (\n container &&\n target &&\n target !== container &&\n container !== document.documentElement &&\n container !== document.scrollingElement &&\n container !== document.body\n ) {\n warnOnce(\n getComputedStyle(container).position !== \"static\",\n \"Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.\"\n )\n }\n }\n}\n\nexport function createOnScrollHandler(\n element: Element,\n onScroll: OnScrollInfo,\n info: ScrollInfo,\n options: ScrollInfoOptions = {}\n): OnScrollHandler {\n return {\n measure: (time) => {\n measure(element, options.target, info)\n updateScrollInfo(element, info, time)\n\n if (options.offset || options.target) {\n resolveOffsets(element, info, options)\n }\n },\n notify: () => onScroll(info),\n }\n}\n","import { cancelFrame, frame, frameData, resize, Process } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { createScrollInfo } from \"./info\"\nimport { createOnScrollHandler } from \"./on-scroll-handler\"\nimport { OnScrollHandler, OnScrollInfo, ScrollInfoOptions } from \"./types\"\n\nconst scrollListeners = new WeakMap()\nconst resizeListeners = new WeakMap()\nconst onScrollHandlers = new WeakMap>()\nconst scrollSize = new WeakMap()\nconst dimensionCheckProcesses = new WeakMap()\n\nexport type ScrollTargets = Array\n\nconst getEventTarget = (element: Element) =>\n element === document.scrollingElement ? window : element\n\nexport function scrollInfo(\n onScroll: OnScrollInfo,\n {\n container = document.scrollingElement as Element,\n trackContentSize = false,\n ...options\n }: ScrollInfoOptions = {}\n) {\n if (!container) return noop as VoidFunction\n\n let containerHandlers = onScrollHandlers.get(container)\n\n /**\n * Get the onScroll handlers for this container.\n * If one isn't found, create a new one.\n */\n if (!containerHandlers) {\n containerHandlers = new Set()\n onScrollHandlers.set(container, containerHandlers)\n }\n\n /**\n * Create a new onScroll handler for the provided callback.\n */\n const info = createScrollInfo()\n const containerHandler = createOnScrollHandler(\n container,\n onScroll,\n info,\n options\n )\n containerHandlers.add(containerHandler)\n\n /**\n * Check if there's a scroll event listener for this container.\n * If not, create one.\n */\n if (!scrollListeners.has(container)) {\n const measureAll = () => {\n for (const handler of containerHandlers) {\n handler.measure(frameData.timestamp)\n }\n\n frame.preUpdate(notifyAll)\n }\n\n const notifyAll = () => {\n for (const handler of containerHandlers) {\n handler.notify()\n }\n }\n\n const listener = () => frame.read(measureAll)\n\n scrollListeners.set(container, listener)\n\n const target = getEventTarget(container)\n window.addEventListener(\"resize\", listener)\n if (container !== document.documentElement) {\n resizeListeners.set(container, resize(container, listener))\n }\n\n target.addEventListener(\"scroll\", listener)\n\n listener()\n }\n\n /**\n * Enable content size tracking if requested and not already enabled.\n */\n if (trackContentSize && !dimensionCheckProcesses.has(container)) {\n const listener = scrollListeners.get(container)!\n\n // Store initial scroll dimensions (object is reused to avoid allocation)\n const size = {\n width: container.scrollWidth,\n height: container.scrollHeight,\n }\n scrollSize.set(container, size)\n\n // Add frame-based scroll dimension checking to detect content changes\n const checkScrollDimensions: Process = () => {\n const newWidth = container.scrollWidth\n const newHeight = container.scrollHeight\n\n if (size.width !== newWidth || size.height !== newHeight) {\n listener()\n size.width = newWidth\n size.height = newHeight\n }\n }\n\n // Schedule with keepAlive=true to run every frame\n const dimensionCheckProcess = frame.read(checkScrollDimensions, true)\n dimensionCheckProcesses.set(container, dimensionCheckProcess)\n }\n\n const listener = scrollListeners.get(container)!\n frame.read(listener, false, true)\n\n return () => {\n cancelFrame(listener)\n\n /**\n * Check if we even have any handlers for this container.\n */\n const currentHandlers = onScrollHandlers.get(container)\n if (!currentHandlers) return\n\n currentHandlers.delete(containerHandler)\n\n if (currentHandlers.size) return\n\n /**\n * If no more handlers, remove the scroll listener too.\n */\n const scrollListener = scrollListeners.get(container)\n scrollListeners.delete(container)\n\n if (scrollListener) {\n getEventTarget(container).removeEventListener(\n \"scroll\",\n scrollListener\n )\n resizeListeners.get(container)?.()\n window.removeEventListener(\"resize\", scrollListener)\n }\n\n // Clean up scroll dimension checking\n const dimensionCheckProcess = dimensionCheckProcesses.get(container)\n if (dimensionCheckProcess) {\n cancelFrame(dimensionCheckProcess)\n dimensionCheckProcesses.delete(container)\n }\n scrollSize.delete(container)\n }\n}\n","import { ScrollOffset as ScrollOffsetPresets } from \"../offsets/presets\"\nimport { ProgressIntersection, ScrollOffset } from \"../types\"\n\ninterface ViewTimelineRange {\n rangeStart: string\n rangeEnd: string\n}\n\n/**\n * Maps from ProgressIntersection pairs used by Motion's preset offsets to\n * ViewTimeline named ranges. Returns undefined for unrecognised patterns,\n * which signals the caller to fall back to JS-based scroll tracking.\n */\nconst presets: [ProgressIntersection[], string][] = [\n [ScrollOffsetPresets.Enter, \"entry\"],\n [ScrollOffsetPresets.Exit, \"exit\"],\n [ScrollOffsetPresets.Any, \"cover\"],\n [ScrollOffsetPresets.All, \"contain\"],\n]\n\nconst stringToProgress: Record = {\n start: 0,\n end: 1,\n}\n\nfunction parseStringOffset(\n s: string\n): ProgressIntersection | undefined {\n const parts = s.trim().split(/\\s+/)\n if (parts.length !== 2) return undefined\n const a = stringToProgress[parts[0]]\n const b = stringToProgress[parts[1]]\n if (a === undefined || b === undefined) return undefined\n return [a, b]\n}\n\nfunction normaliseOffset(offset: ScrollOffset): ProgressIntersection[] | undefined {\n if (offset.length !== 2) return undefined\n const result: ProgressIntersection[] = []\n for (const item of offset) {\n if (Array.isArray(item)) {\n result.push(item as ProgressIntersection)\n } else if (typeof item === \"string\") {\n const parsed = parseStringOffset(item)\n if (!parsed) return undefined\n result.push(parsed)\n } else {\n return undefined\n }\n }\n return result\n}\n\nfunction matchesPreset(\n offset: ScrollOffset,\n preset: ProgressIntersection[]\n): boolean {\n const normalised = normaliseOffset(offset)\n if (!normalised) return false\n\n for (let i = 0; i < 2; i++) {\n const o = normalised[i]\n const p = preset[i]\n if (o[0] !== p[0] || o[1] !== p[1]) return false\n }\n return true\n}\n\nexport function offsetToViewTimelineRange(\n offset?: ScrollOffset\n): ViewTimelineRange | undefined {\n if (!offset) {\n return { rangeStart: \"contain 0%\", rangeEnd: \"contain 100%\" }\n }\n\n for (const [preset, name] of presets) {\n if (matchesPreset(offset, preset)) {\n return { rangeStart: `${name} 0%`, rangeEnd: `${name} 100%` }\n }\n }\n\n return undefined\n}\n","import { ProgressTimeline } from \"motion-dom\"\nimport { scrollInfo } from \"../track\"\nimport { ScrollOptionsWithDefaults } from \"../types\"\nimport { canUseNativeTimeline } from \"./can-use-native-timeline\"\nimport { offsetToViewTimelineRange } from \"./offset-to-range\"\n\ndeclare class ScrollTimeline implements ProgressTimeline {\n constructor(options: ScrollOptions)\n\n currentTime: null | { value: number }\n\n cancel?: VoidFunction\n}\n\ndeclare class ViewTimeline implements ProgressTimeline {\n constructor(options: { subject: Element; axis?: string })\n\n currentTime: null | { value: number }\n\n cancel?: VoidFunction\n}\n\nconst timelineCache = new Map<\n Element,\n Map>\n>()\n\nfunction scrollTimelineFallback(options: ScrollOptionsWithDefaults) {\n const currentTime = { value: 0 }\n\n const cancel = scrollInfo((info) => {\n currentTime.value = info[options.axis!].progress * 100\n }, options)\n\n return { currentTime, cancel }\n}\n\nexport function getTimeline({\n source,\n container,\n ...options\n}: ScrollOptionsWithDefaults): ProgressTimeline {\n const { axis } = options\n\n if (source) container = source\n\n let containerCache = timelineCache.get(container)\n if (!containerCache) {\n containerCache = new Map()\n timelineCache.set(container, containerCache)\n }\n\n const targetKey = options.target ?? \"self\"\n let targetCache = containerCache.get(targetKey)\n if (!targetCache) {\n targetCache = {}\n containerCache.set(targetKey, targetCache)\n }\n\n const axisKey = axis + (options.offset ?? []).join(\",\")\n\n if (!targetCache[axisKey]) {\n if (options.target && canUseNativeTimeline(options.target)) {\n const range = offsetToViewTimelineRange(options.offset)\n if (range) {\n targetCache[axisKey] = new ViewTimeline({\n subject: options.target,\n axis,\n })\n } else {\n targetCache[axisKey] = scrollTimelineFallback({\n container,\n ...options,\n })\n }\n } else if (canUseNativeTimeline()) {\n targetCache[axisKey] = new ScrollTimeline({\n source: container,\n axis,\n } as any)\n } else {\n targetCache[axisKey] = scrollTimelineFallback({\n container,\n ...options,\n })\n }\n }\n\n return targetCache[axisKey]!\n}\n","import { AnimationPlaybackControls, observeTimeline } from \"motion-dom\"\nimport { ScrollOptionsWithDefaults } from \"./types\"\nimport { canUseNativeTimeline } from \"./utils/can-use-native-timeline\"\nimport { getTimeline } from \"./utils/get-timeline\"\nimport { offsetToViewTimelineRange } from \"./utils/offset-to-range\"\n\nexport function attachToAnimation(\n animation: AnimationPlaybackControls,\n options: ScrollOptionsWithDefaults\n) {\n const timeline = getTimeline(options)\n\n const range = options.target\n ? offsetToViewTimelineRange(options.offset)\n : undefined\n\n /**\n * Use native timeline when:\n * - No target: ScrollTimeline (existing behaviour)\n * - Target with mappable offset: ViewTimeline with named range\n * - Target with unmappable offset: fall back to JS observe\n */\n const useNative = options.target\n ? canUseNativeTimeline(options.target) && !!range\n : canUseNativeTimeline()\n\n return animation.attachTimeline({\n timeline: useNative ? timeline : undefined,\n ...(range &&\n useNative && {\n rangeStart: range.rangeStart,\n rangeEnd: range.rangeEnd,\n }),\n observe: (valueAnimation) => {\n valueAnimation.pause()\n\n return observeTimeline((progress) => {\n valueAnimation.time =\n valueAnimation.iterationDuration * progress\n }, timeline)\n },\n })\n}\n","import { ScrollOptionsWithDefaults } from \"../types\"\n\n/**\n * Currently, we only support element tracking with `scrollInfo`, though in\n * the future we can also offer ViewTimeline support.\n */\nexport function isElementTracking(options?: ScrollOptionsWithDefaults) {\n return options && (options.target || options.offset)\n}\n","import { observeTimeline } from \"motion-dom\"\nimport { scrollInfo } from \"./track\"\nimport { OnScroll, OnScrollWithInfo, ScrollOptionsWithDefaults } from \"./types\"\nimport { getTimeline } from \"./utils/get-timeline\"\nimport { isElementTracking } from \"./utils/is-element-tracking\"\n\n/**\n * If the onScroll function has two arguments, it's expecting\n * more specific information about the scroll from scrollInfo.\n */\nfunction isOnScrollWithInfo(onScroll: OnScroll): onScroll is OnScrollWithInfo {\n return onScroll.length === 2\n}\n\nexport function attachToFunction(\n onScroll: OnScroll,\n options: ScrollOptionsWithDefaults\n) {\n if (isOnScrollWithInfo(onScroll) || isElementTracking(options)) {\n return scrollInfo((info) => {\n onScroll(info[options.axis!].progress, info)\n }, options)\n } else {\n return observeTimeline(onScroll, getTimeline(options))\n }\n}\n","import { AnimationPlaybackControls } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { attachToAnimation } from \"./attach-animation\"\nimport { attachToFunction } from \"./attach-function\"\nimport { OnScroll, ScrollOptions } from \"./types\"\n\nexport function scroll(\n onScroll: OnScroll | AnimationPlaybackControls,\n {\n axis = \"y\",\n container = document.scrollingElement as Element,\n ...options\n }: ScrollOptions = {}\n): VoidFunction {\n if (!container) return noop as VoidFunction\n\n const optionsWithDefaults = { axis, container, ...options }\n\n return typeof onScroll === \"function\"\n ? attachToFunction(onScroll, optionsWithDefaults)\n : attachToAnimation(onScroll, optionsWithDefaults)\n}\n","import { ElementOrSelector, resolveElements } from \"motion-dom\"\n\nexport type ViewChangeHandler = (entry: IntersectionObserverEntry) => void\n\ntype MarginValue = `${number}${\"px\" | \"%\"}`\ntype MarginType =\n | MarginValue\n | `${MarginValue} ${MarginValue}`\n | `${MarginValue} ${MarginValue} ${MarginValue}`\n | `${MarginValue} ${MarginValue} ${MarginValue} ${MarginValue}`\n\nexport interface InViewOptions {\n root?: Element | Document\n margin?: MarginType\n amount?: \"some\" | \"all\" | number\n}\n\nconst thresholds = {\n some: 0,\n all: 1,\n}\n\nexport function inView(\n elementOrSelector: ElementOrSelector,\n onStart: (\n element: Element,\n entry: IntersectionObserverEntry\n ) => void | ViewChangeHandler,\n { root, margin: rootMargin, amount = \"some\" }: InViewOptions = {}\n): VoidFunction {\n const elements = resolveElements(elementOrSelector)\n\n const activeIntersections = new WeakMap()\n\n const onIntersectionChange: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n const onEnd = activeIntersections.get(entry.target)\n\n /**\n * If there's no change to the intersection, we don't need to\n * do anything here.\n */\n if (entry.isIntersecting === Boolean(onEnd)) return\n\n if (entry.isIntersecting) {\n const newOnEnd = onStart(entry.target, entry)\n if (typeof newOnEnd === \"function\") {\n activeIntersections.set(entry.target, newOnEnd)\n } else {\n observer.unobserve(entry.target)\n }\n } else if (typeof onEnd === \"function\") {\n onEnd(entry)\n activeIntersections.delete(entry.target)\n }\n })\n }\n\n const observer = new IntersectionObserver(onIntersectionChange, {\n root,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholds[amount],\n })\n\n elements.forEach((element) => observer.observe(element))\n\n return () => observer.disconnect()\n}\n","import { Point } from \"motion-utils\"\n\nexport const distance = (a: number, b: number) => Math.abs(a - b)\n\nexport function distance2D(a: Point, b: Point): number {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x)\n const yDelta = distance(a.y, b.y)\n return Math.sqrt(xDelta ** 2 + yDelta ** 2)\n}\n"],"names":["resolveElements","removeItem","mixNumber","getEasingForSegment","defaultOffset","isGenerator","secondsToMilliseconds","createGeneratorEasing","fillOffset","warning","reverseEasing","isMotionValue","progress","isSVGElement","isSVGSVGElement","SVGVisualElement","HTMLVisualElement","visualElementStore","ObjectVisualElement","animateSingleValue","invariant","animateTarget","motionValue","spring","GroupAnimationWithThen","getValueTransition","getAnimationMap","animationMapKey","getComputedStyle","fillWildcards","applyPxDefaults","NativeAnimation","supportsViewTimeline","supportsScrollTimeline","velocityPerSecond","isHTMLElement","interpolate","clamp","warnOnce","noop","frameData","frame","resize","cancelFrame","ScrollOffsetPresets","observeTimeline"],"mappings":";;;;;;;AAEM,SAAU,cAAc,CAC1B,SAAkB,EAAA;AAElB,IAAA,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AACrE;;ACGM,SAAU,eAAe,CAC3B,OAQe,EACf,SAAmD,EACnD,KAAsB,EACtB,aAA6B,EAAA;AAE7B,IAAA,IAAI,OAAO,IAAI,IAAI,EAAE;AACjB,QAAA,OAAO,EAAE;IACb;IAEA,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,cAAc,CAAC,SAAS,CAAC,EAAE;QAC1D,OAAOA,yBAAe,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa,CAAC;IACzD;AAAO,SAAA,IAAI,OAAO,YAAY,QAAQ,EAAE;AACpC,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;IAC9B;AAAO,SAAA,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;AAC/B,QAAA,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;IAC3C;SAAO;QACH,OAAO,CAAC,OAAO,CAAC;IACpB;AACJ;;SCpCgB,uBAAuB,CACnC,QAAgB,EAChB,MAAc,EACd,WAAmB,EAAA;IAEnB,OAAO,QAAQ,IAAI,MAAM,GAAG,CAAC,CAAC,GAAG,WAAW,GAAG,MAAM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C,CAAC,CAAC,CAAC;AACjC,IAAA,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM,IAAI,CAAC,CAAC;AAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/feature-bundle-frRcWALD.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/feature-bundle-frRcWALD.js deleted file mode 100644 index 54cc5df1..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/feature-bundle-frRcWALD.js +++ /dev/null @@ -1,1656 +0,0 @@ -'use strict'; - -var motionDom = require('motion-dom'); -var React = require('react'); -var index = require('./index-6W16WHlG.js'); -var motionUtils = require('motion-utils'); -var jsxRuntime = require('react/jsx-runtime'); - -/** - * When a component is the child of `AnimatePresence`, it can use `usePresence` - * to access information about whether it's still present in the React tree. - * - * ```jsx - * import { usePresence } from "framer-motion" - * - * export const Component = () => { - * const [isPresent, safeToRemove] = usePresence() - * - * useEffect(() => { - * !isPresent && setTimeout(safeToRemove, 1000) - * }, [isPresent]) - * - * return
- * } - * ``` - * - * If `isPresent` is `false`, it means that a component has been removed from the tree, - * but `AnimatePresence` won't really remove it until `safeToRemove` has been called. - * - * @public - */ -function usePresence(subscribe = true) { - const context = React.useContext(index.PresenceContext); - if (context === null) - return [true, null]; - const { isPresent, onExitComplete, register } = context; - // It's safe to call the following hooks conditionally (after an early return) because the context will always - // either be null or non-null for the lifespan of the component. - const id = React.useId(); - React.useEffect(() => { - if (subscribe) { - return register(id); - } - }, [subscribe]); - const safeToRemove = React.useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]); - return !isPresent && onExitComplete ? [false, safeToRemove] : [true]; -} -/** - * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present. - * There is no `safeToRemove` function. - * - * ```jsx - * import { useIsPresent } from "framer-motion" - * - * export const Component = () => { - * const isPresent = useIsPresent() - * - * useEffect(() => { - * !isPresent && console.log("I've been removed!") - * }, [isPresent]) - * - * return
- * } - * ``` - * - * @public - */ -function useIsPresent() { - return isPresent(React.useContext(index.PresenceContext)); -} -function isPresent(context) { - return context === null ? true : context.isPresent; -} - -const createDomVisualElement = (Component, options) => { - /** - * Use explicit isSVG override if provided, otherwise auto-detect - */ - const isSVG = options.isSVG ?? index.isSVGComponent(Component); - return isSVG - ? new motionDom.SVGVisualElement(options) - : new motionDom.HTMLVisualElement(options, { - allowProjection: Component !== React.Fragment, - }); -}; - -class AnimationFeature extends motionDom.Feature { - /** - * We dynamically generate the AnimationState manager as it contains a reference - * to the underlying animation library. We only want to load that if we load this, - * so people can optionally code split it out using the `m` component. - */ - constructor(node) { - super(node); - node.animationState || (node.animationState = motionDom.createAnimationState(node)); - } - updateAnimationControlsSubscription() { - const { animate } = this.node.getProps(); - if (motionDom.isAnimationControls(animate)) { - this.unmountControls = animate.subscribe(this.node); - } - } - /** - * Subscribe any provided AnimationControls to the component's VisualElement - */ - mount() { - this.updateAnimationControlsSubscription(); - } - update() { - const { animate } = this.node.getProps(); - const { animate: prevAnimate } = this.node.prevProps || {}; - if (animate !== prevAnimate) { - this.updateAnimationControlsSubscription(); - } - } - unmount() { - this.node.animationState.reset(); - this.unmountControls?.(); - } -} - -let id = 0; -class ExitAnimationFeature extends motionDom.Feature { - constructor() { - super(...arguments); - this.id = id++; - this.isExitComplete = false; - } - update() { - if (!this.node.presenceContext) - return; - const { isPresent, onExitComplete } = this.node.presenceContext; - const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {}; - if (!this.node.animationState || isPresent === prevIsPresent) { - return; - } - if (isPresent && prevIsPresent === false) { - /** - * When re-entering, if the exit animation already completed - * (element is at rest), reset to initial values so the enter - * animation replays from the correct position. - */ - if (this.isExitComplete) { - const { initial, custom } = this.node.getProps(); - if (typeof initial === "string" || - (typeof initial === "object" && - initial !== null && - !Array.isArray(initial))) { - const resolved = motionDom.resolveVariant(this.node, initial, custom); - if (resolved) { - const { transition, transitionEnd, ...target } = resolved; - for (const key in target) { - this.node - .getValue(key) - ?.jump(target[key]); - } - } - } - this.node.animationState.reset(); - this.node.animationState.animateChanges(); - } - else { - this.node.animationState.setActive("exit", false); - } - this.isExitComplete = false; - return; - } - const exitAnimation = this.node.animationState.setActive("exit", !isPresent); - if (onExitComplete && !isPresent) { - exitAnimation.then(() => { - this.isExitComplete = true; - onExitComplete(this.id); - }); - } - } - mount() { - const { register, onExitComplete } = this.node.presenceContext || {}; - if (onExitComplete) { - onExitComplete(this.id); - } - if (register) { - this.unmount = register(this.id); - } - } - unmount() { } -} - -const animations = { - animation: { - Feature: AnimationFeature, - }, - exit: { - Feature: ExitAnimationFeature, - }, -}; - -function extractEventInfo(event) { - return { - point: { - x: event.pageX, - y: event.pageY, - }, - }; -} -const addPointerInfo = (handler) => (event) => motionDom.isPrimaryPointer(event) && handler(event, extractEventInfo(event)); - -function addPointerEvent(target, eventName, handler, options) { - return motionDom.addDomEvent(target, eventName, addPointerInfo(handler), options); -} - -// Fixes https://github.com/motiondivision/motion/issues/2270 -const getContextWindow = ({ current }) => { - return current ? current.ownerDocument.defaultView : null; -}; - -const distance = (a, b) => Math.abs(a - b); -function distance2D(a, b) { - // Multi-dimensional - const xDelta = distance(a.x, b.x); - const yDelta = distance(a.y, b.y); - return Math.sqrt(xDelta ** 2 + yDelta ** 2); -} - -const overflowStyles = /*#__PURE__*/ new Set(["auto", "scroll"]); -/** - * @internal - */ -class PanSession { - constructor(event, handlers, { transformPagePoint, contextWindow = window, dragSnapToOrigin = false, distanceThreshold = 3, element, } = {}) { - /** - * @internal - */ - this.startEvent = null; - /** - * @internal - */ - this.lastMoveEvent = null; - /** - * @internal - */ - this.lastMoveEventInfo = null; - /** - * Raw (untransformed) event info, re-transformed each frame - * so transformPagePoint sees the current parent matrix. - * @internal - */ - this.lastRawMoveEventInfo = null; - /** - * @internal - */ - this.handlers = {}; - /** - * @internal - */ - this.contextWindow = window; - /** - * Scroll positions of scrollable ancestors and window. - * @internal - */ - this.scrollPositions = new Map(); - /** - * Cleanup function for scroll listeners. - * @internal - */ - this.removeScrollListeners = null; - this.onElementScroll = (event) => { - this.handleScroll(event.target); - }; - this.onWindowScroll = () => { - this.handleScroll(window); - }; - this.updatePoint = () => { - if (!(this.lastMoveEvent && this.lastMoveEventInfo)) - return; - // Re-transform raw point through current transformPagePoint so - // animated parent transforms (e.g. rotation) are picked up each frame - if (this.lastRawMoveEventInfo) { - this.lastMoveEventInfo = transformPoint(this.lastRawMoveEventInfo, this.transformPagePoint); - } - const info = getPanInfo(this.lastMoveEventInfo, this.history); - const isPanStarted = this.startEvent !== null; - // Only start panning if the offset is larger than 3 pixels. If we make it - // any larger than this we'll want to reset the pointer history - // on the first update to avoid visual snapping to the cursor. - const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold; - if (!isPanStarted && !isDistancePastThreshold) - return; - const { point } = info; - const { timestamp } = motionDom.frameData; - this.history.push({ ...point, timestamp }); - const { onStart, onMove } = this.handlers; - if (!isPanStarted) { - onStart && onStart(this.lastMoveEvent, info); - this.startEvent = this.lastMoveEvent; - } - onMove && onMove(this.lastMoveEvent, info); - }; - this.handlePointerMove = (event, info) => { - this.lastMoveEvent = event; - this.lastRawMoveEventInfo = info; - this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint); - // Throttle mouse move event to once per frame - motionDom.frame.update(this.updatePoint, true); - }; - this.handlePointerUp = (event, info) => { - this.end(); - const { onEnd, onSessionEnd, resumeAnimation } = this.handlers; - // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked) - // This ensures constraint animations continue when interrupted by a click - if (this.dragSnapToOrigin || !this.startEvent) { - resumeAnimation && resumeAnimation(); - } - if (!(this.lastMoveEvent && this.lastMoveEventInfo)) - return; - const panInfo = getPanInfo(event.type === "pointercancel" - ? this.lastMoveEventInfo - : transformPoint(info, this.transformPagePoint), this.history); - if (this.startEvent && onEnd) { - onEnd(event, panInfo); - } - onSessionEnd && onSessionEnd(event, panInfo); - }; - // If we have more than one touch, don't start detecting this gesture - if (!motionDom.isPrimaryPointer(event)) - return; - this.dragSnapToOrigin = dragSnapToOrigin; - this.handlers = handlers; - this.transformPagePoint = transformPagePoint; - this.distanceThreshold = distanceThreshold; - this.contextWindow = contextWindow || window; - const info = extractEventInfo(event); - const initialInfo = transformPoint(info, this.transformPagePoint); - const { point } = initialInfo; - const { timestamp } = motionDom.frameData; - this.history = [{ ...point, timestamp }]; - const { onSessionStart } = handlers; - onSessionStart && - onSessionStart(event, getPanInfo(initialInfo, this.history)); - this.removeListeners = motionUtils.pipe(addPointerEvent(this.contextWindow, "pointermove", this.handlePointerMove), addPointerEvent(this.contextWindow, "pointerup", this.handlePointerUp), addPointerEvent(this.contextWindow, "pointercancel", this.handlePointerUp)); - // Start scroll tracking if element provided - if (element) { - this.startScrollTracking(element); - } - } - /** - * Start tracking scroll on ancestors and window. - */ - startScrollTracking(element) { - // Store initial scroll positions for scrollable ancestors - let current = element.parentElement; - while (current) { - const style = getComputedStyle(current); - if (overflowStyles.has(style.overflowX) || - overflowStyles.has(style.overflowY)) { - this.scrollPositions.set(current, { - x: current.scrollLeft, - y: current.scrollTop, - }); - } - current = current.parentElement; - } - // Track window scroll - this.scrollPositions.set(window, { - x: window.scrollX, - y: window.scrollY, - }); - // Capture listener catches element scroll events as they bubble - window.addEventListener("scroll", this.onElementScroll, { - capture: true, - }); - // Direct window scroll listener (window scroll doesn't bubble) - window.addEventListener("scroll", this.onWindowScroll); - this.removeScrollListeners = () => { - window.removeEventListener("scroll", this.onElementScroll, { - capture: true, - }); - window.removeEventListener("scroll", this.onWindowScroll); - }; - } - /** - * Handle scroll compensation during drag. - * - * For element scroll: adjusts history origin since pageX/pageY doesn't change. - * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change. - */ - handleScroll(target) { - const initial = this.scrollPositions.get(target); - if (!initial) - return; - const isWindow = target === window; - const current = isWindow - ? { x: window.scrollX, y: window.scrollY } - : { - x: target.scrollLeft, - y: target.scrollTop, - }; - const delta = { x: current.x - initial.x, y: current.y - initial.y }; - if (delta.x === 0 && delta.y === 0) - return; - if (isWindow) { - // Window scroll: pageX/pageY changes, so update lastMoveEventInfo - if (this.lastMoveEventInfo) { - this.lastMoveEventInfo.point.x += delta.x; - this.lastMoveEventInfo.point.y += delta.y; - } - } - else { - // Element scroll: pageX/pageY unchanged, so adjust history origin - if (this.history.length > 0) { - this.history[0].x -= delta.x; - this.history[0].y -= delta.y; - } - } - this.scrollPositions.set(target, current); - motionDom.frame.update(this.updatePoint, true); - } - updateHandlers(handlers) { - this.handlers = handlers; - } - end() { - this.removeListeners && this.removeListeners(); - this.removeScrollListeners && this.removeScrollListeners(); - this.scrollPositions.clear(); - motionDom.cancelFrame(this.updatePoint); - } -} -function transformPoint(info, transformPagePoint) { - return transformPagePoint ? { point: transformPagePoint(info.point) } : info; -} -function subtractPoint(a, b) { - return { x: a.x - b.x, y: a.y - b.y }; -} -function getPanInfo({ point }, history) { - return { - point, - delta: subtractPoint(point, lastDevicePoint(history)), - offset: subtractPoint(point, startDevicePoint(history)), - velocity: getVelocity(history, 0.1), - }; -} -function startDevicePoint(history) { - return history[0]; -} -function lastDevicePoint(history) { - return history[history.length - 1]; -} -function getVelocity(history, timeDelta) { - if (history.length < 2) { - return { x: 0, y: 0 }; - } - let i = history.length - 1; - let timestampedPoint = null; - const lastPoint = lastDevicePoint(history); - while (i >= 0) { - timestampedPoint = history[i]; - if (lastPoint.timestamp - timestampedPoint.timestamp > - motionUtils.secondsToMilliseconds(timeDelta)) { - break; - } - i--; - } - if (!timestampedPoint) { - return { x: 0, y: 0 }; - } - /** - * If the selected point is the pointer-down origin (history[0]), - * there are better movement points available, and the time gap - * is suspiciously large (>2x timeDelta), use the next point instead. - * This prevents stale pointer-down points from diluting velocity - * in hold-then-flick gestures. - */ - if (timestampedPoint === history[0] && - history.length > 2 && - lastPoint.timestamp - timestampedPoint.timestamp > - motionUtils.secondsToMilliseconds(timeDelta) * 2) { - timestampedPoint = history[1]; - } - const time = motionUtils.millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp); - if (time === 0) { - return { x: 0, y: 0 }; - } - const currentVelocity = { - x: (lastPoint.x - timestampedPoint.x) / time, - y: (lastPoint.y - timestampedPoint.y) / time, - }; - if (currentVelocity.x === Infinity) { - currentVelocity.x = 0; - } - if (currentVelocity.y === Infinity) { - currentVelocity.y = 0; - } - return currentVelocity; -} - -/** - * Apply constraints to a point. These constraints are both physical along an - * axis, and an elastic factor that determines how much to constrain the point - * by if it does lie outside the defined parameters. - */ -function applyConstraints(point, { min, max }, elastic) { - if (min !== undefined && point < min) { - // If we have a min point defined, and this is outside of that, constrain - point = elastic - ? motionDom.mixNumber(min, point, elastic.min) - : Math.max(point, min); - } - else if (max !== undefined && point > max) { - // If we have a max point defined, and this is outside of that, constrain - point = elastic - ? motionDom.mixNumber(max, point, elastic.max) - : Math.min(point, max); - } - return point; -} -/** - * Calculate constraints in terms of the viewport when defined relatively to the - * measured axis. This is measured from the nearest edge, so a max constraint of 200 - * on an axis with a max value of 300 would return a constraint of 500 - axis length - */ -function calcRelativeAxisConstraints(axis, min, max) { - return { - min: min !== undefined ? axis.min + min : undefined, - max: max !== undefined - ? axis.max + max - (axis.max - axis.min) - : undefined, - }; -} -/** - * Calculate constraints in terms of the viewport when - * defined relatively to the measured bounding box. - */ -function calcRelativeConstraints(layoutBox, { top, left, bottom, right }) { - return { - x: calcRelativeAxisConstraints(layoutBox.x, left, right), - y: calcRelativeAxisConstraints(layoutBox.y, top, bottom), - }; -} -/** - * Calculate viewport constraints when defined as another viewport-relative axis - */ -function calcViewportAxisConstraints(layoutAxis, constraintsAxis) { - let min = constraintsAxis.min - layoutAxis.min; - let max = constraintsAxis.max - layoutAxis.max; - // If the constraints axis is actually smaller than the layout axis then we can - // flip the constraints - if (constraintsAxis.max - constraintsAxis.min < - layoutAxis.max - layoutAxis.min) { - [min, max] = [max, min]; - } - return { min, max }; -} -/** - * Calculate viewport constraints when defined as another viewport-relative box - */ -function calcViewportConstraints(layoutBox, constraintsBox) { - return { - x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x), - y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y), - }; -} -/** - * Calculate a transform origin relative to the source axis, between 0-1, that results - * in an asthetically pleasing scale/transform needed to project from source to target. - */ -function calcOrigin(source, target) { - let origin = 0.5; - const sourceLength = motionDom.calcLength(source); - const targetLength = motionDom.calcLength(target); - if (targetLength > sourceLength) { - origin = motionUtils.progress(target.min, target.max - sourceLength, source.min); - } - else if (sourceLength > targetLength) { - origin = motionUtils.progress(source.min, source.max - targetLength, target.min); - } - return motionUtils.clamp(0, 1, origin); -} -/** - * Rebase the calculated viewport constraints relative to the layout.min point. - */ -function rebaseAxisConstraints(layout, constraints) { - const relativeConstraints = {}; - if (constraints.min !== undefined) { - relativeConstraints.min = constraints.min - layout.min; - } - if (constraints.max !== undefined) { - relativeConstraints.max = constraints.max - layout.min; - } - return relativeConstraints; -} -const defaultElastic = 0.35; -/** - * Accepts a dragElastic prop and returns resolved elastic values for each axis. - */ -function resolveDragElastic(dragElastic = defaultElastic) { - if (dragElastic === false) { - dragElastic = 0; - } - else if (dragElastic === true) { - dragElastic = defaultElastic; - } - return { - x: resolveAxisElastic(dragElastic, "left", "right"), - y: resolveAxisElastic(dragElastic, "top", "bottom"), - }; -} -function resolveAxisElastic(dragElastic, minLabel, maxLabel) { - return { - min: resolvePointElastic(dragElastic, minLabel), - max: resolvePointElastic(dragElastic, maxLabel), - }; -} -function resolvePointElastic(dragElastic, label) { - return typeof dragElastic === "number" - ? dragElastic - : dragElastic[label] || 0; -} - -const elementDragControls = new WeakMap(); -class VisualElementDragControls { - constructor(visualElement) { - this.openDragLock = null; - this.isDragging = false; - this.currentDirection = null; - this.originPoint = { x: 0, y: 0 }; - /** - * The permitted boundaries of travel, in pixels. - */ - this.constraints = false; - this.hasMutatedConstraints = false; - /** - * The per-axis resolved elastic values. - */ - this.elastic = motionDom.createBox(); - /** - * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments. - */ - this.latestPointerEvent = null; - /** - * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments. - */ - this.latestPanInfo = null; - this.visualElement = visualElement; - } - start(originEvent, { snapToCursor = false, distanceThreshold } = {}) { - /** - * Don't start dragging if this component is exiting - */ - const { presenceContext } = this.visualElement; - if (presenceContext && presenceContext.isPresent === false) - return; - const onSessionStart = (event) => { - if (snapToCursor) { - this.snapToCursor(extractEventInfo(event).point); - } - this.stopAnimation(); - }; - const onStart = (event, info) => { - // Attempt to grab the global drag gesture lock - maybe make this part of PanSession - const { drag, dragPropagation, onDragStart } = this.getProps(); - if (drag && !dragPropagation) { - if (this.openDragLock) - this.openDragLock(); - this.openDragLock = motionDom.setDragLock(drag); - // If we don 't have the lock, don't start dragging - if (!this.openDragLock) - return; - } - this.latestPointerEvent = event; - this.latestPanInfo = info; - this.isDragging = true; - this.currentDirection = null; - this.resolveConstraints(); - if (this.visualElement.projection) { - this.visualElement.projection.isAnimationBlocked = true; - this.visualElement.projection.target = undefined; - } - /** - * Record gesture origin and pointer offset - */ - motionDom.eachAxis((axis) => { - let current = this.getAxisMotionValue(axis).get() || 0; - /** - * If the MotionValue is a percentage value convert to px - */ - if (motionDom.percent.test(current)) { - const { projection } = this.visualElement; - if (projection && projection.layout) { - const measuredAxis = projection.layout.layoutBox[axis]; - if (measuredAxis) { - const length = motionDom.calcLength(measuredAxis); - current = length * (parseFloat(current) / 100); - } - } - } - this.originPoint[axis] = current; - }); - // Fire onDragStart event - if (onDragStart) { - motionDom.frame.update(() => onDragStart(event, info), false, true); - } - motionDom.addValueToWillChange(this.visualElement, "transform"); - const { animationState } = this.visualElement; - animationState && animationState.setActive("whileDrag", true); - }; - const onMove = (event, info) => { - this.latestPointerEvent = event; - this.latestPanInfo = info; - const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps(); - // If we didn't successfully receive the gesture lock, early return. - if (!dragPropagation && !this.openDragLock) - return; - const { offset } = info; - // Attempt to detect drag direction if directionLock is true - if (dragDirectionLock && this.currentDirection === null) { - this.currentDirection = getCurrentDirection(offset); - // If we've successfully set a direction, notify listener - if (this.currentDirection !== null) { - onDirectionLock && onDirectionLock(this.currentDirection); - } - return; - } - // Update each point with the latest position - this.updateAxis("x", info.point, offset); - this.updateAxis("y", info.point, offset); - /** - * Ideally we would leave the renderer to fire naturally at the end of - * this frame but if the element is about to change layout as the result - * of a re-render we want to ensure the browser can read the latest - * bounding box to ensure the pointer and element don't fall out of sync. - */ - this.visualElement.render(); - /** - * This must fire after the render call as it might trigger a state - * change which itself might trigger a layout update. - */ - if (onDrag) { - motionDom.frame.update(() => onDrag(event, info), false, true); - } - }; - const onSessionEnd = (event, info) => { - this.latestPointerEvent = event; - this.latestPanInfo = info; - this.stop(event, info); - this.latestPointerEvent = null; - this.latestPanInfo = null; - }; - const resumeAnimation = () => { - const { dragSnapToOrigin: snap } = this.getProps(); - if (snap || this.constraints) { - this.startAnimation({ x: 0, y: 0 }); - } - }; - const { dragSnapToOrigin } = this.getProps(); - this.panSession = new PanSession(originEvent, { - onSessionStart, - onStart, - onMove, - onSessionEnd, - resumeAnimation, - }, { - transformPagePoint: this.visualElement.getTransformPagePoint(), - dragSnapToOrigin, - distanceThreshold, - contextWindow: getContextWindow(this.visualElement), - element: this.visualElement.current, - }); - } - /** - * @internal - */ - stop(event, panInfo) { - const finalEvent = event || this.latestPointerEvent; - const finalPanInfo = panInfo || this.latestPanInfo; - const isDragging = this.isDragging; - this.cancel(); - if (!isDragging || !finalPanInfo || !finalEvent) - return; - const { velocity } = finalPanInfo; - this.startAnimation(velocity); - const { onDragEnd } = this.getProps(); - if (onDragEnd) { - motionDom.frame.postRender(() => onDragEnd(finalEvent, finalPanInfo)); - } - } - /** - * @internal - */ - cancel() { - this.isDragging = false; - const { projection, animationState } = this.visualElement; - if (projection) { - projection.isAnimationBlocked = false; - } - this.endPanSession(); - const { dragPropagation } = this.getProps(); - if (!dragPropagation && this.openDragLock) { - this.openDragLock(); - this.openDragLock = null; - } - animationState && animationState.setActive("whileDrag", false); - } - /** - * Clean up the pan session without modifying other drag state. - * This is used during unmount to ensure event listeners are removed - * without affecting projection animations or drag locks. - * @internal - */ - endPanSession() { - this.panSession && this.panSession.end(); - this.panSession = undefined; - } - updateAxis(axis, _point, offset) { - const { drag } = this.getProps(); - // If we're not dragging this axis, do an early return. - if (!offset || !shouldDrag(axis, drag, this.currentDirection)) - return; - const axisValue = this.getAxisMotionValue(axis); - let next = this.originPoint[axis] + offset[axis]; - // Apply constraints - if (this.constraints && this.constraints[axis]) { - next = applyConstraints(next, this.constraints[axis], this.elastic[axis]); - } - axisValue.set(next); - } - resolveConstraints() { - const { dragConstraints, dragElastic } = this.getProps(); - const layout = this.visualElement.projection && - !this.visualElement.projection.layout - ? this.visualElement.projection.measure(false) - : this.visualElement.projection?.layout; - const prevConstraints = this.constraints; - if (dragConstraints && index.isRefObject(dragConstraints)) { - if (!this.constraints) { - this.constraints = this.resolveRefConstraints(); - } - } - else { - if (dragConstraints && layout) { - this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints); - } - else { - this.constraints = false; - } - } - this.elastic = resolveDragElastic(dragElastic); - /** - * If we're outputting to external MotionValues, we want to rebase the measured constraints - * from viewport-relative to component-relative. This only applies to relative (non-ref) - * constraints, as ref-based constraints from calcViewportConstraints are already in the - * correct coordinate space for the motion value transform offset. - */ - if (prevConstraints !== this.constraints && - !index.isRefObject(dragConstraints) && - layout && - this.constraints && - !this.hasMutatedConstraints) { - motionDom.eachAxis((axis) => { - if (this.constraints !== false && - this.getAxisMotionValue(axis)) { - this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]); - } - }); - } - } - resolveRefConstraints() { - const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps(); - if (!constraints || !index.isRefObject(constraints)) - return false; - const constraintsElement = constraints.current; - motionUtils.invariant(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref"); - const { projection } = this.visualElement; - // TODO - if (!projection || !projection.layout) - return false; - /** - * Refresh the root scroll offset so the constraint's viewport box - * translates to correct page coordinates. The scroll captured at - * drag mount can be stale if the document was scrolled afterwards — - * e.g. via the browser restoring scroll on refresh, or an ancestor - * layout effect running after this element's mount (#2829). - * - * Clear the cached scroll first so `updateScroll` bypasses its - * per-animationId cache and re-reads the live value. - */ - if (projection.root) { - projection.root.scroll = undefined; - projection.root.updateScroll(); - } - const constraintsBox = motionDom.measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint()); - let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox); - /** - * If there's an onMeasureDragConstraints listener we call it and - * if different constraints are returned, set constraints to that - */ - if (onMeasureDragConstraints) { - const userConstraints = onMeasureDragConstraints(motionDom.convertBoxToBoundingBox(measuredConstraints)); - this.hasMutatedConstraints = !!userConstraints; - if (userConstraints) { - measuredConstraints = motionDom.convertBoundingBoxToBox(userConstraints); - } - } - return measuredConstraints; - } - startAnimation(velocity) { - const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps(); - const constraints = this.constraints || {}; - const momentumAnimations = motionDom.eachAxis((axis) => { - if (!shouldDrag(axis, drag, this.currentDirection)) { - return; - } - let transition = (constraints && constraints[axis]) || {}; - if (dragSnapToOrigin === true || - dragSnapToOrigin === axis) - transition = { min: 0, max: 0 }; - /** - * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame - * of spring animations so we should look into adding a disable spring option to `inertia`. - * We could do something here where we affect the `bounceStiffness` and `bounceDamping` - * using the value of `dragElastic`. - */ - const bounceStiffness = dragElastic ? 200 : 1000000; - const bounceDamping = dragElastic ? 40 : 10000000; - const inertia = { - type: "inertia", - velocity: dragMomentum ? velocity[axis] : 0, - bounceStiffness, - bounceDamping, - timeConstant: 750, - restDelta: 1, - restSpeed: 10, - ...dragTransition, - ...transition, - }; - // If we're not animating on an externally-provided `MotionValue` we can use the - // component's animation controls which will handle interactions with whileHover (etc), - // otherwise we just have to animate the `MotionValue` itself. - return this.startAxisValueAnimation(axis, inertia); - }); - // Run all animations and then resolve the new drag constraints. - return Promise.all(momentumAnimations).then(onDragTransitionEnd); - } - startAxisValueAnimation(axis, transition) { - const axisValue = this.getAxisMotionValue(axis); - motionDom.addValueToWillChange(this.visualElement, axis); - return axisValue.start(motionDom.animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false)); - } - stopAnimation() { - motionDom.eachAxis((axis) => this.getAxisMotionValue(axis).stop()); - } - /** - * Drag works differently depending on which props are provided. - * - * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values. - * - Otherwise, we apply the delta to the x/y motion values. - */ - getAxisMotionValue(axis) { - const dragKey = `_drag${axis.toUpperCase()}`; - const props = this.visualElement.getProps(); - const externalMotionValue = props[dragKey]; - return externalMotionValue - ? externalMotionValue - : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0); - } - snapToCursor(point) { - motionDom.eachAxis((axis) => { - const { drag } = this.getProps(); - // If we're not dragging this axis, do an early return. - if (!shouldDrag(axis, drag, this.currentDirection)) - return; - const { projection } = this.visualElement; - const axisValue = this.getAxisMotionValue(axis); - if (projection && projection.layout) { - const { min, max } = projection.layout.layoutBox[axis]; - /** - * The layout measurement includes the current transform value, - * so we need to add it back to get the correct snap position. - * This fixes an issue where elements with initial coordinates - * would snap to the wrong position on the first drag. - */ - const current = axisValue.get() || 0; - axisValue.set(point[axis] - motionDom.mixNumber(min, max, 0.5) + current); - } - }); - } - /** - * When the viewport resizes we want to check if the measured constraints - * have changed and, if so, reposition the element within those new constraints - * relative to where it was before the resize. - */ - scalePositionWithinConstraints() { - if (!this.visualElement.current) - return; - const { drag, dragConstraints } = this.getProps(); - const { projection } = this.visualElement; - if (!index.isRefObject(dragConstraints) || !projection || !this.constraints) - return; - /** - * Stop current animations as there can be visual glitching if we try to do - * this mid-animation - */ - this.stopAnimation(); - /** - * Record the relative position of the dragged element relative to the - * constraints box and save as a progress value. - */ - const boxProgress = { x: 0, y: 0 }; - motionDom.eachAxis((axis) => { - const axisValue = this.getAxisMotionValue(axis); - if (axisValue && this.constraints !== false) { - const latest = axisValue.get(); - boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]); - } - }); - /** - * Update the layout of this element and resolve the latest drag constraints - */ - const { transformTemplate } = this.visualElement.getProps(); - this.visualElement.current.style.transform = transformTemplate - ? transformTemplate({}, "") - : "none"; - projection.root && projection.root.updateScroll(); - projection.updateLayout(); - /** - * Reset constraints so resolveConstraints() will recalculate them - * with the freshly measured layout rather than returning the cached value. - */ - this.constraints = false; - this.resolveConstraints(); - /** - * For each axis, calculate the current progress of the layout axis - * within the new constraints. - */ - motionDom.eachAxis((axis) => { - if (!shouldDrag(axis, drag, null)) - return; - /** - * Calculate a new transform based on the previous box progress - */ - const axisValue = this.getAxisMotionValue(axis); - const { min, max } = this.constraints[axis]; - axisValue.set(motionDom.mixNumber(min, max, boxProgress[axis])); - }); - /** - * Flush the updated transform to the DOM synchronously to prevent - * a visual flash at the element's CSS layout position (0,0) when - * the transform was stripped for measurement. - */ - this.visualElement.render(); - } - addListeners() { - if (!this.visualElement.current) - return; - elementDragControls.set(this.visualElement, this); - const element = this.visualElement.current; - /** - * Attach a pointerdown event listener on this DOM element to initiate drag tracking. - */ - const stopPointerListener = addPointerEvent(element, "pointerdown", (event) => { - const { drag, dragListener = true } = this.getProps(); - const target = event.target; - /** - * Only block drag if clicking on a text input child element - * (input, textarea, select, contenteditable) where users might - * want to select text or interact with the control. - * - * Buttons and links don't block drag since they don't have - * click-and-move actions of their own. - */ - const isClickingTextInputChild = target !== element && motionDom.isElementTextInput(target); - if (drag && dragListener && !isClickingTextInputChild) { - this.start(event); - } - }); - /** - * If using ref-based constraints, observe both the draggable element - * and the constraint container for size changes via ResizeObserver. - * Setup is deferred because dragConstraints.current is null when - * addListeners first runs (React hasn't committed the ref yet). - */ - let stopResizeObservers; - const measureDragConstraints = () => { - const { dragConstraints } = this.getProps(); - if (index.isRefObject(dragConstraints) && dragConstraints.current) { - this.constraints = this.resolveRefConstraints(); - if (!stopResizeObservers) { - stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints()); - } - } - }; - const { projection } = this.visualElement; - const stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints); - if (projection && !projection.layout) { - projection.root && projection.root.updateScroll(); - projection.updateLayout(); - } - motionDom.frame.read(measureDragConstraints); - /** - * Attach a window resize listener to scale the draggable target within its defined - * constraints as the window resizes. - */ - const stopResizeListener = motionDom.addDomEvent(window, "resize", () => this.scalePositionWithinConstraints()); - /** - * If the element's layout changes, calculate the delta and apply that to - * the drag gesture's origin point. - */ - const stopLayoutUpdateListener = projection.addEventListener("didUpdate", (({ delta, hasLayoutChanged }) => { - if (this.isDragging && hasLayoutChanged) { - motionDom.eachAxis((axis) => { - const motionValue = this.getAxisMotionValue(axis); - if (!motionValue) - return; - this.originPoint[axis] += delta[axis].translate; - motionValue.set(motionValue.get() + delta[axis].translate); - }); - this.visualElement.render(); - } - })); - return () => { - stopResizeListener(); - stopPointerListener(); - stopMeasureLayoutListener(); - stopLayoutUpdateListener && stopLayoutUpdateListener(); - stopResizeObservers && stopResizeObservers(); - }; - } - getProps() { - const props = this.visualElement.getProps(); - const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props; - return { - ...props, - drag, - dragDirectionLock, - dragPropagation, - dragConstraints, - dragElastic, - dragMomentum, - }; - } -} -function skipFirstCall(callback) { - let isFirst = true; - return () => { - if (isFirst) { - isFirst = false; - return; - } - callback(); - }; -} -function startResizeObservers(element, constraintsElement, onResize) { - const stopElement = motionDom.resize(element, skipFirstCall(onResize)); - const stopContainer = motionDom.resize(constraintsElement, skipFirstCall(onResize)); - return () => { - stopElement(); - stopContainer(); - }; -} -function shouldDrag(direction, drag, currentDirection) { - return ((drag === true || drag === direction) && - (currentDirection === null || currentDirection === direction)); -} -/** - * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower - * than the provided threshold, return `null`. - * - * @param offset - The x/y offset from origin. - * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction. - */ -function getCurrentDirection(offset, lockThreshold = 10) { - let direction = null; - if (Math.abs(offset.y) > lockThreshold) { - direction = "y"; - } - else if (Math.abs(offset.x) > lockThreshold) { - direction = "x"; - } - return direction; -} - -class DragGesture extends motionDom.Feature { - constructor(node) { - super(node); - this.removeGroupControls = motionUtils.noop; - this.removeListeners = motionUtils.noop; - this.controls = new VisualElementDragControls(node); - } - mount() { - // If we've been provided a DragControls for manual control over the drag gesture, - // subscribe this component to it on mount. - const { dragControls } = this.node.getProps(); - if (dragControls) { - this.removeGroupControls = dragControls.subscribe(this.controls); - } - this.removeListeners = this.controls.addListeners() || motionUtils.noop; - } - update() { - const { dragControls } = this.node.getProps(); - const { dragControls: prevDragControls } = this.node.prevProps || {}; - if (dragControls !== prevDragControls) { - this.removeGroupControls(); - if (dragControls) { - this.removeGroupControls = dragControls.subscribe(this.controls); - } - } - } - unmount() { - this.removeGroupControls(); - this.removeListeners(); - /** - * In React 19, during list reorder reconciliation, components may - * briefly unmount and remount while the drag is still active. If we're - * actively dragging, we should NOT end the pan session - it will - * continue tracking pointer events via its window-level listeners. - * - * The pan session will be properly cleaned up when: - * 1. The drag ends naturally (pointerup/pointercancel) - * 2. The component is truly removed from the DOM - */ - if (!this.controls.isDragging) { - this.controls.endPanSession(); - } - } -} - -const asyncHandler = (handler) => (event, info) => { - if (handler) { - motionDom.frame.update(() => handler(event, info), false, true); - } -}; -class PanGesture extends motionDom.Feature { - constructor() { - super(...arguments); - this.removePointerDownListener = motionUtils.noop; - } - onPointerDown(pointerDownEvent) { - this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), { - transformPagePoint: this.node.getTransformPagePoint(), - contextWindow: getContextWindow(this.node), - }); - } - createPanHandlers() { - const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps(); - return { - onSessionStart: asyncHandler(onPanSessionStart), - onStart: asyncHandler(onPanStart), - onMove: asyncHandler(onPan), - onEnd: (event, info) => { - delete this.session; - if (onPanEnd) { - motionDom.frame.postRender(() => onPanEnd(event, info)); - } - }, - }; - } - mount() { - this.removePointerDownListener = addPointerEvent(this.node.current, "pointerdown", (event) => this.onPointerDown(event)); - } - update() { - this.session && this.session.updateHandlers(this.createPanHandlers()); - } - unmount() { - this.removePointerDownListener(); - this.session && this.session.end(); - } -} - -/** - * Track whether we've taken any snapshots yet. If not, - * we can safely skip notification of didUpdate. - * - * Difficult to capture in a test but to prevent flickering - * we must set this to true either on update or unmount. - * Running `next-env/layout-id` in Safari will show this behaviour if broken. - */ -let hasTakenAnySnapshot = false; -class MeasureLayoutWithContext extends React.Component { - /** - * This only mounts projection nodes for components that - * need measuring, we might want to do it for all components - * in order to incorporate transforms - */ - componentDidMount() { - const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props; - const { projection } = visualElement; - if (projection) { - if (layoutGroup.group) - layoutGroup.group.add(projection); - if (switchLayoutGroup && switchLayoutGroup.register && layoutId) { - switchLayoutGroup.register(projection); - } - if (hasTakenAnySnapshot) { - projection.root.didUpdate(); - } - projection.addEventListener("animationComplete", () => { - this.safeToRemove(); - }); - projection.setOptions({ - ...projection.options, - layoutDependency: this.props.layoutDependency, - onExitComplete: () => this.safeToRemove(), - }); - } - motionDom.globalProjectionState.hasEverUpdated = true; - } - getSnapshotBeforeUpdate(prevProps) { - const { layoutDependency, visualElement, drag, isPresent } = this.props; - const { projection } = visualElement; - if (!projection) - return null; - /** - * TODO: We use this data in relegate to determine whether to - * promote a previous element. There's no guarantee its presence data - * will have updated by this point - if a bug like this arises it will - * have to be that we markForRelegation and then find a new lead some other way, - * perhaps in didUpdate - */ - projection.isPresent = isPresent; - if (prevProps.layoutDependency !== layoutDependency) { - projection.setOptions({ - ...projection.options, - layoutDependency, - }); - } - hasTakenAnySnapshot = true; - if (drag || - prevProps.layoutDependency !== layoutDependency || - layoutDependency === undefined || - prevProps.isPresent !== isPresent) { - projection.willUpdate(); - } - else { - this.safeToRemove(); - } - if (prevProps.isPresent !== isPresent) { - if (isPresent) { - projection.promote(); - } - else if (!projection.relegate()) { - /** - * If there's another stack member taking over from this one, - * it's in charge of the exit animation and therefore should - * be in charge of the safe to remove. Otherwise we call it here. - */ - motionDom.frame.postRender(() => { - const stack = projection.getStack(); - if (!stack || !stack.members.length) { - this.safeToRemove(); - } - }); - } - } - return null; - } - componentDidUpdate() { - const { visualElement, layoutAnchor } = this.props; - const { projection } = visualElement; - if (projection) { - projection.options.layoutAnchor = layoutAnchor; - projection.root.didUpdate(); - motionDom.microtask.postRender(() => { - if (!projection.currentAnimation && projection.isLead()) { - this.safeToRemove(); - } - }); - } - } - componentWillUnmount() { - const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props; - const { projection } = visualElement; - hasTakenAnySnapshot = true; - if (projection) { - projection.scheduleCheckAfterUnmount(); - if (layoutGroup && layoutGroup.group) - layoutGroup.group.remove(projection); - if (promoteContext && promoteContext.deregister) - promoteContext.deregister(projection); - } - } - safeToRemove() { - const { safeToRemove } = this.props; - safeToRemove && safeToRemove(); - } - render() { - return null; - } -} -function MeasureLayout(props) { - const [isPresent, safeToRemove] = usePresence(); - const layoutGroup = React.useContext(index.LayoutGroupContext); - return (jsxRuntime.jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: React.useContext(index.SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove })); -} - -const drag = { - pan: { - Feature: PanGesture, - }, - drag: { - Feature: DragGesture, - ProjectionNode: motionDom.HTMLProjectionNode, - MeasureLayout, - }, -}; - -function handleHoverEvent(node, event, lifecycle) { - const { props } = node; - if (node.animationState && props.whileHover) { - node.animationState.setActive("whileHover", lifecycle === "Start"); - } - const eventName = ("onHover" + lifecycle); - const callback = props[eventName]; - if (callback) { - motionDom.frame.postRender(() => callback(event, extractEventInfo(event))); - } -} -class HoverGesture extends motionDom.Feature { - mount() { - const { current } = this.node; - if (!current) - return; - this.unmount = motionDom.hover(current, (_element, startEvent) => { - handleHoverEvent(this.node, startEvent, "Start"); - return (endEvent) => handleHoverEvent(this.node, endEvent, "End"); - }); - } - unmount() { } -} - -class FocusGesture extends motionDom.Feature { - constructor() { - super(...arguments); - this.isActive = false; - } - onFocus() { - let isFocusVisible = false; - /** - * If this element doesn't match focus-visible then don't - * apply whileHover. But, if matches throws that focus-visible - * is not a valid selector then in that browser outline styles will be applied - * to the element by default and we want to match that behaviour with whileFocus. - */ - try { - isFocusVisible = this.node.current.matches(":focus-visible"); - } - catch (e) { - isFocusVisible = true; - } - if (!isFocusVisible || !this.node.animationState) - return; - this.node.animationState.setActive("whileFocus", true); - this.isActive = true; - } - onBlur() { - if (!this.isActive || !this.node.animationState) - return; - this.node.animationState.setActive("whileFocus", false); - this.isActive = false; - } - mount() { - this.unmount = motionUtils.pipe(motionDom.addDomEvent(this.node.current, "focus", () => this.onFocus()), motionDom.addDomEvent(this.node.current, "blur", () => this.onBlur())); - } - unmount() { } -} - -function handlePressEvent(node, event, lifecycle) { - const { props } = node; - if (node.current instanceof HTMLButtonElement && node.current.disabled) { - return; - } - if (node.animationState && props.whileTap) { - node.animationState.setActive("whileTap", lifecycle === "Start"); - } - const eventName = ("onTap" + (lifecycle === "End" ? "" : lifecycle)); - const callback = props[eventName]; - if (callback) { - motionDom.frame.postRender(() => callback(event, extractEventInfo(event))); - } -} -class PressGesture extends motionDom.Feature { - mount() { - const { current } = this.node; - if (!current) - return; - const { globalTapTarget, propagate } = this.node.props; - this.unmount = motionDom.press(current, (_element, startEvent) => { - handlePressEvent(this.node, startEvent, "Start"); - return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? "End" : "Cancel"); - }, { - useGlobalTarget: globalTapTarget, - stopPropagation: propagate?.tap === false, - }); - } - unmount() { } -} - -/** - * Map an IntersectionHandler callback to an element. We only ever make one handler for one - * element, so even though these handlers might all be triggered by different - * observers, we can keep them in the same map. - */ -const observerCallbacks = new WeakMap(); -/** - * Multiple observers can be created for multiple element/document roots. Each with - * different settings. So here we store dictionaries of observers to each root, - * using serialised settings (threshold/margin) as lookup keys. - */ -const observers = new WeakMap(); -const fireObserverCallback = (entry) => { - const callback = observerCallbacks.get(entry.target); - callback && callback(entry); -}; -const fireAllObserverCallbacks = (entries) => { - entries.forEach(fireObserverCallback); -}; -function initIntersectionObserver({ root, ...options }) { - const lookupRoot = root || document; - /** - * If we don't have an observer lookup map for this root, create one. - */ - if (!observers.has(lookupRoot)) { - observers.set(lookupRoot, {}); - } - const rootObservers = observers.get(lookupRoot); - const key = JSON.stringify(options); - /** - * If we don't have an observer for this combination of root and settings, - * create one. - */ - if (!rootObservers[key]) { - rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options }); - } - return rootObservers[key]; -} -function observeIntersection(element, options, callback) { - const rootInteresectionObserver = initIntersectionObserver(options); - observerCallbacks.set(element, callback); - rootInteresectionObserver.observe(element); - return () => { - observerCallbacks.delete(element); - rootInteresectionObserver.unobserve(element); - }; -} - -const thresholdNames = { - some: 0, - all: 1, -}; -class InViewFeature extends motionDom.Feature { - constructor() { - super(...arguments); - this.hasEnteredView = false; - this.isInView = false; - } - startObserver() { - this.stopObserver?.(); - const { viewport = {} } = this.node.getProps(); - const { root, margin: rootMargin, amount = "some", once } = viewport; - const options = { - root: root ? root.current : undefined, - rootMargin, - threshold: typeof amount === "number" ? amount : thresholdNames[amount], - }; - const onIntersectionUpdate = (entry) => { - const { isIntersecting } = entry; - /** - * If there's been no change in the viewport state, early return. - */ - if (this.isInView === isIntersecting) - return; - this.isInView = isIntersecting; - /** - * Handle hasEnteredView. If this is only meant to run once, and - * element isn't visible, early return. Otherwise set hasEnteredView to true. - */ - if (once && !isIntersecting && this.hasEnteredView) { - return; - } - else if (isIntersecting) { - this.hasEnteredView = true; - } - if (this.node.animationState) { - this.node.animationState.setActive("whileInView", isIntersecting); - } - /** - * Use the latest committed props rather than the ones in scope - * when this observer is created - */ - const { onViewportEnter, onViewportLeave } = this.node.getProps(); - const callback = isIntersecting ? onViewportEnter : onViewportLeave; - callback && callback(entry); - }; - this.stopObserver = observeIntersection(this.node.current, options, onIntersectionUpdate); - } - mount() { - this.startObserver(); - } - update() { - if (typeof IntersectionObserver === "undefined") - return; - const { props, prevProps } = this.node; - const hasOptionsChanged = ["amount", "margin", "root"].some(hasViewportOptionChanged(props, prevProps)); - if (hasOptionsChanged) { - this.startObserver(); - } - } - unmount() { - this.stopObserver?.(); - this.hasEnteredView = false; - this.isInView = false; - } -} -function hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) { - return (name) => viewport[name] !== prevViewport[name]; -} - -const gestureAnimations = { - inView: { - Feature: InViewFeature, - }, - tap: { - Feature: PressGesture, - }, - focus: { - Feature: FocusGesture, - }, - hover: { - Feature: HoverGesture, - }, -}; - -const layout = { - layout: { - ProjectionNode: motionDom.HTMLProjectionNode, - MeasureLayout, - }, -}; - -const featureBundle = { - ...animations, - ...gestureAnimations, - ...drag, - ...layout, -}; - -exports.addPointerEvent = addPointerEvent; -exports.addPointerInfo = addPointerInfo; -exports.animations = animations; -exports.createDomVisualElement = createDomVisualElement; -exports.distance = distance; -exports.distance2D = distance2D; -exports.drag = drag; -exports.featureBundle = featureBundle; -exports.gestureAnimations = gestureAnimations; -exports.layout = layout; -exports.useIsPresent = useIsPresent; -exports.usePresence = usePresence; -//# sourceMappingURL=feature-bundle-frRcWALD.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/feature-bundle-frRcWALD.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/feature-bundle-frRcWALD.js.map deleted file mode 100644 index 7ecc489d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/feature-bundle-frRcWALD.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"feature-bundle-frRcWALD.js","sources":["../../src/components/AnimatePresence/use-presence.ts","../../src/render/dom/create-visual-element.ts","../../src/motion/features/animation/index.ts","../../src/motion/features/animation/exit.ts","../../src/motion/features/animations.ts","../../src/events/event-info.ts","../../src/events/add-pointer-event.ts","../../src/utils/get-context-window.ts","../../src/utils/distance.ts","../../src/gestures/pan/PanSession.ts","../../src/gestures/drag/utils/constraints.ts","../../src/gestures/drag/VisualElementDragControls.ts","../../src/gestures/drag/index.ts","../../src/gestures/pan/index.ts","../../src/motion/features/layout/MeasureLayout.tsx","../../src/motion/features/drag.ts","../../src/gestures/hover.ts","../../src/gestures/focus.ts","../../src/gestures/press.ts","../../src/motion/features/viewport/observers.ts","../../src/motion/features/viewport/index.ts","../../src/motion/features/gestures.ts","../../src/motion/features/layout.ts","../../src/render/components/motion/feature-bundle.ts"],"sourcesContent":["\"use client\"\n\nimport { useCallback, useContext, useEffect, useId } from \"react\"\nimport {\n PresenceContext,\n PresenceContextProps,\n} from \"../../context/PresenceContext\"\n\nexport type SafeToRemove = () => void\n\ntype AlwaysPresent = [true, null]\n\ntype Present = [true]\n\ntype NotPresent = [false, SafeToRemove]\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return
\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed from the tree,\n * but `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nexport function usePresence(\n subscribe: boolean = true\n): AlwaysPresent | Present | NotPresent {\n const context = useContext(PresenceContext)\n\n if (context === null) return [true, null]\n\n const { isPresent, onExitComplete, register } = context\n\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n\n const id = useId()\n useEffect(() => {\n if (subscribe) {\n return register(id)\n }\n }, [subscribe])\n\n const safeToRemove = useCallback(\n () => subscribe && onExitComplete && onExitComplete(id),\n [id, onExitComplete, subscribe]\n )\n\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true]\n}\n\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return
\n * }\n * ```\n *\n * @public\n */\nexport function useIsPresent() {\n return isPresent(useContext(PresenceContext))\n}\n\nexport function isPresent(context: PresenceContextProps | null) {\n return context === null ? true : context.isPresent\n}\n","import { HTMLVisualElement, SVGVisualElement } from \"motion-dom\"\nimport { ComponentType, Fragment } from \"react\"\nimport { CreateVisualElement, VisualElementOptions } from \"../types\"\nimport { isSVGComponent } from \"./utils/is-svg-component\"\n\nexport const createDomVisualElement: CreateVisualElement = (\n Component: string | ComponentType>,\n options: VisualElementOptions\n) => {\n /**\n * Use explicit isSVG override if provided, otherwise auto-detect\n */\n const isSVG = options.isSVG ?? isSVGComponent(Component)\n\n return isSVG\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options, {\n allowProjection: Component !== Fragment,\n })\n}\n","import {\n createAnimationState,\n Feature,\n isAnimationControls,\n type VisualElement,\n} from \"motion-dom\"\n\nexport class AnimationFeature extends Feature {\n unmountControls?: () => void\n\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node: VisualElement) {\n super(node)\n node.animationState ||= createAnimationState(node)\n }\n\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps()\n if (isAnimationControls(animate)) {\n this.unmountControls = animate.subscribe(this.node)\n }\n }\n\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription()\n }\n\n update() {\n const { animate } = this.node.getProps()\n const { animate: prevAnimate } = this.node.prevProps || {}\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription()\n }\n }\n\n unmount() {\n this.node.animationState!.reset()\n this.unmountControls?.()\n }\n}\n","import { Feature, resolveVariant } from \"motion-dom\"\n\nlet id = 0\n\nexport class ExitAnimationFeature extends Feature {\n private id: number = id++\n private isExitComplete = false\n\n update() {\n if (!this.node.presenceContext) return\n\n const { isPresent, onExitComplete } = this.node.presenceContext\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {}\n\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return\n }\n\n if (isPresent && prevIsPresent === false) {\n /**\n * When re-entering, if the exit animation already completed\n * (element is at rest), reset to initial values so the enter\n * animation replays from the correct position.\n */\n if (this.isExitComplete) {\n const { initial, custom } = this.node.getProps()\n\n if (\n typeof initial === \"string\" ||\n (typeof initial === \"object\" &&\n initial !== null &&\n !Array.isArray(initial))\n ) {\n const resolved = resolveVariant(\n this.node,\n initial,\n custom\n )\n if (resolved) {\n const { transition, transitionEnd, ...target } =\n resolved\n for (const key in target) {\n this.node\n .getValue(key)\n ?.jump(\n target[\n key as keyof typeof target\n ] as any\n )\n }\n }\n }\n\n this.node.animationState.reset()\n this.node.animationState.animateChanges()\n } else {\n this.node.animationState.setActive(\"exit\", false)\n }\n\n this.isExitComplete = false\n return\n }\n\n const exitAnimation = this.node.animationState.setActive(\n \"exit\",\n !isPresent\n )\n\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => {\n this.isExitComplete = true\n onExitComplete(this.id)\n })\n }\n }\n\n mount() {\n const { register, onExitComplete } = this.node.presenceContext || {}\n\n if (onExitComplete) {\n onExitComplete(this.id)\n }\n\n if (register) {\n this.unmount = register(this.id)\n }\n }\n\n unmount() {}\n}\n","import { AnimationFeature } from \"./animation\"\nimport { ExitAnimationFeature } from \"./animation/exit\"\nimport { FeaturePackages } from \"./types\"\n\nexport const animations: FeaturePackages = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n}\n","import { EventInfo, isPrimaryPointer } from \"motion-dom\"\n\nexport type EventListenerWithPointInfo = (\n e: PointerEvent,\n info: EventInfo\n) => void\n\nexport function extractEventInfo(event: PointerEvent): EventInfo {\n return {\n point: {\n x: event.pageX,\n y: event.pageY,\n },\n }\n}\n\nexport const addPointerInfo =\n (handler: EventListenerWithPointInfo): EventListener =>\n (event: PointerEvent) =>\n isPrimaryPointer(event) && handler(event, extractEventInfo(event))\n","import { addDomEvent } from \"motion-dom\"\nimport { addPointerInfo, EventListenerWithPointInfo } from \"./event-info\"\n\nexport function addPointerEvent(\n target: EventTarget,\n eventName: string,\n handler: EventListenerWithPointInfo,\n options?: AddEventListenerOptions\n) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options)\n}\n","import type { VisualElement } from \"motion-dom\"\n\n// Fixes https://github.com/motiondivision/motion/issues/2270\nexport const getContextWindow = ({ current }: VisualElement) => {\n return current ? current.ownerDocument.defaultView : null\n}\n","import { Point } from \"motion-utils\"\n\nexport const distance = (a: number, b: number) => Math.abs(a - b)\n\nexport function distance2D(a: Point, b: Point): number {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x)\n const yDelta = distance(a.y, b.y)\n return Math.sqrt(xDelta ** 2 + yDelta ** 2)\n}\n","import type { EventInfo, PanHandler } from \"motion-dom\"\nimport { cancelFrame, frame, frameData, isPrimaryPointer } from \"motion-dom\"\nimport {\n millisecondsToSeconds,\n pipe,\n Point,\n secondsToMilliseconds,\n TransformPoint,\n} from \"motion-utils\"\nimport { addPointerEvent } from \"../../events/add-pointer-event\"\nimport { extractEventInfo } from \"../../events/event-info\"\nimport { distance2D } from \"../../utils/distance\"\n\ninterface PanSessionHandlers {\n onSessionStart: PanHandler\n onStart: PanHandler\n onMove: PanHandler\n onEnd: PanHandler\n onSessionEnd: PanHandler\n resumeAnimation: () => void\n}\n\ninterface PanSessionOptions {\n transformPagePoint?: TransformPoint\n dragSnapToOrigin?: boolean | \"x\" | \"y\"\n distanceThreshold?: number\n contextWindow?: (Window & typeof globalThis) | null\n /**\n * Element being dragged. When provided, scroll events on its\n * ancestors and window are compensated so the gesture continues\n * smoothly during scroll.\n */\n element?: HTMLElement | null\n}\n\ninterface TimestampedPoint extends Point {\n timestamp: number\n}\n\nconst overflowStyles = /*#__PURE__*/ new Set([\"auto\", \"scroll\"])\n\n/**\n * @internal\n */\nexport class PanSession {\n /**\n * @internal\n */\n private history: TimestampedPoint[]\n\n /**\n * @internal\n */\n private startEvent: PointerEvent | null = null\n\n /**\n * @internal\n */\n private lastMoveEvent: PointerEvent | null = null\n\n /**\n * @internal\n */\n private lastMoveEventInfo: EventInfo | null = null\n\n /**\n * Raw (untransformed) event info, re-transformed each frame\n * so transformPagePoint sees the current parent matrix.\n * @internal\n */\n private lastRawMoveEventInfo: EventInfo | null = null\n\n /**\n * @internal\n */\n private transformPagePoint?: TransformPoint\n\n /**\n * @internal\n */\n private handlers: Partial = {}\n\n /**\n * @internal\n */\n private removeListeners: Function\n\n /**\n * For determining if an animation should resume after it is interupted\n *\n * @internal\n */\n private dragSnapToOrigin: boolean | \"x\" | \"y\"\n\n /**\n * The distance after which panning should start.\n *\n * @internal\n */\n private distanceThreshold: number\n\n /**\n * @internal\n */\n private contextWindow: PanSessionOptions[\"contextWindow\"] = window\n\n /**\n * Scroll positions of scrollable ancestors and window.\n * @internal\n */\n private scrollPositions: Map = new Map()\n\n /**\n * Cleanup function for scroll listeners.\n * @internal\n */\n private removeScrollListeners: (() => void) | null = null\n\n constructor(\n event: PointerEvent,\n handlers: Partial,\n {\n transformPagePoint,\n contextWindow = window,\n dragSnapToOrigin = false,\n distanceThreshold = 3,\n element,\n }: PanSessionOptions = {}\n ) {\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event)) return\n\n this.dragSnapToOrigin = dragSnapToOrigin\n this.handlers = handlers\n this.transformPagePoint = transformPagePoint\n this.distanceThreshold = distanceThreshold\n this.contextWindow = contextWindow || window\n\n const info = extractEventInfo(event)\n const initialInfo = transformPoint(info, this.transformPagePoint)\n const { point } = initialInfo\n\n const { timestamp } = frameData\n\n this.history = [{ ...point, timestamp }]\n\n const { onSessionStart } = handlers\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history))\n\n this.removeListeners = pipe(\n addPointerEvent(\n this.contextWindow,\n \"pointermove\",\n this.handlePointerMove\n ),\n addPointerEvent(\n this.contextWindow,\n \"pointerup\",\n this.handlePointerUp\n ),\n addPointerEvent(\n this.contextWindow,\n \"pointercancel\",\n this.handlePointerUp\n )\n )\n\n // Start scroll tracking if element provided\n if (element) {\n this.startScrollTracking(element)\n }\n }\n\n /**\n * Start tracking scroll on ancestors and window.\n */\n private startScrollTracking(element: HTMLElement): void {\n // Store initial scroll positions for scrollable ancestors\n let current = element.parentElement\n while (current) {\n const style = getComputedStyle(current)\n if (\n overflowStyles.has(style.overflowX) ||\n overflowStyles.has(style.overflowY)\n ) {\n this.scrollPositions.set(current, {\n x: current.scrollLeft,\n y: current.scrollTop,\n })\n }\n current = current.parentElement\n }\n\n // Track window scroll\n this.scrollPositions.set(window, {\n x: window.scrollX,\n y: window.scrollY,\n })\n\n // Capture listener catches element scroll events as they bubble\n window.addEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n })\n\n // Direct window scroll listener (window scroll doesn't bubble)\n window.addEventListener(\"scroll\", this.onWindowScroll)\n\n this.removeScrollListeners = () => {\n window.removeEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n })\n window.removeEventListener(\"scroll\", this.onWindowScroll)\n }\n }\n\n private onElementScroll = (event: Event): void => {\n this.handleScroll(event.target as Element)\n }\n\n private onWindowScroll = (): void => {\n this.handleScroll(window)\n }\n\n /**\n * Handle scroll compensation during drag.\n *\n * For element scroll: adjusts history origin since pageX/pageY doesn't change.\n * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.\n */\n private handleScroll(target: Element | Window): void {\n const initial = this.scrollPositions.get(target)\n if (!initial) return\n\n const isWindow = target === window\n const current = isWindow\n ? { x: window.scrollX, y: window.scrollY }\n : {\n x: (target as Element).scrollLeft,\n y: (target as Element).scrollTop,\n }\n\n const delta = { x: current.x - initial.x, y: current.y - initial.y }\n if (delta.x === 0 && delta.y === 0) return\n\n if (isWindow) {\n // Window scroll: pageX/pageY changes, so update lastMoveEventInfo\n if (this.lastMoveEventInfo) {\n this.lastMoveEventInfo.point.x += delta.x\n this.lastMoveEventInfo.point.y += delta.y\n }\n } else {\n // Element scroll: pageX/pageY unchanged, so adjust history origin\n if (this.history.length > 0) {\n this.history[0].x -= delta.x\n this.history[0].y -= delta.y\n }\n }\n\n this.scrollPositions.set(target, current)\n frame.update(this.updatePoint, true)\n }\n\n private updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return\n\n // Re-transform raw point through current transformPagePoint so\n // animated parent transforms (e.g. rotation) are picked up each frame\n if (this.lastRawMoveEventInfo) {\n this.lastMoveEventInfo = transformPoint(\n this.lastRawMoveEventInfo,\n this.transformPagePoint\n )\n }\n\n const info = getPanInfo(this.lastMoveEventInfo, this.history)\n const isPanStarted = this.startEvent !== null\n\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursor.\n const isDistancePastThreshold =\n distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold\n\n if (!isPanStarted && !isDistancePastThreshold) return\n\n const { point } = info\n const { timestamp } = frameData\n this.history.push({ ...point, timestamp })\n\n const { onStart, onMove } = this.handlers\n\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info)\n this.startEvent = this.lastMoveEvent\n }\n\n onMove && onMove(this.lastMoveEvent, info)\n }\n\n private handlePointerMove = (event: PointerEvent, info: EventInfo) => {\n this.lastMoveEvent = event\n this.lastRawMoveEventInfo = info\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint)\n\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true)\n }\n\n private handlePointerUp = (event: PointerEvent, info: EventInfo) => {\n this.end()\n\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers\n\n // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked)\n // This ensures constraint animations continue when interrupted by a click\n if (this.dragSnapToOrigin || !this.startEvent) {\n resumeAnimation && resumeAnimation()\n }\n if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return\n\n const panInfo = getPanInfo(\n event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint),\n this.history\n )\n\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo)\n }\n\n onSessionEnd && onSessionEnd(event, panInfo)\n }\n\n updateHandlers(handlers: Partial) {\n this.handlers = handlers\n }\n\n end() {\n this.removeListeners && this.removeListeners()\n this.removeScrollListeners && this.removeScrollListeners()\n this.scrollPositions.clear()\n cancelFrame(this.updatePoint)\n }\n}\n\nfunction transformPoint(\n info: EventInfo,\n transformPagePoint?: (point: Point) => Point\n) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info\n}\n\nfunction subtractPoint(a: Point, b: Point): Point {\n return { x: a.x - b.x, y: a.y - b.y }\n}\n\nfunction getPanInfo({ point }: EventInfo, history: TimestampedPoint[]) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n }\n}\n\nfunction startDevicePoint(history: TimestampedPoint[]): TimestampedPoint {\n return history[0]\n}\n\nfunction lastDevicePoint(history: TimestampedPoint[]): TimestampedPoint {\n return history[history.length - 1]\n}\n\nfunction getVelocity(history: TimestampedPoint[], timeDelta: number): Point {\n if (history.length < 2) {\n return { x: 0, y: 0 }\n }\n\n let i = history.length - 1\n let timestampedPoint: TimestampedPoint | null = null\n const lastPoint = lastDevicePoint(history)\n while (i >= 0) {\n timestampedPoint = history[i]\n if (\n lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)\n ) {\n break\n }\n i--\n }\n\n if (!timestampedPoint) {\n return { x: 0, y: 0 }\n }\n\n /**\n * If the selected point is the pointer-down origin (history[0]),\n * there are better movement points available, and the time gap\n * is suspiciously large (>2x timeDelta), use the next point instead.\n * This prevents stale pointer-down points from diluting velocity\n * in hold-then-flick gestures.\n */\n if (\n timestampedPoint === history[0] &&\n history.length > 2 &&\n lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta) * 2\n ) {\n timestampedPoint = history[1]\n }\n\n const time = millisecondsToSeconds(\n lastPoint.timestamp - timestampedPoint.timestamp\n )\n if (time === 0) {\n return { x: 0, y: 0 }\n }\n\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n }\n\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0\n }\n\n return currentVelocity\n}\n","import { calcLength, mixNumber, type DragElastic, type ResolvedConstraints } from \"motion-dom\"\nimport {\n Axis,\n BoundingBox,\n Box,\n progress as calcProgress,\n clamp,\n Point,\n} from \"motion-utils\"\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nexport function applyConstraints(\n point: number,\n { min, max }: Partial,\n elastic?: Axis\n): number {\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(min, point, elastic.min)\n : Math.max(point, min)\n } else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(max, point, elastic.max)\n : Math.min(point, max)\n }\n\n return point\n}\n\n/**\n * Calculates a min projection point based on a pointer, pointer progress\n * within the drag target, and constraints.\n *\n * For instance if an element was 100px width, we were dragging from 0.25\n * along this axis, the pointer is at 200px, and there were no constraints,\n * we would calculate a min projection point of 175px.\n */\nexport function calcConstrainedMinPoint(\n point: number,\n length: number,\n progress: number,\n constraints?: Partial,\n elastic?: Axis\n): number {\n // Calculate a min point for this axis and apply it to the current pointer\n const min = point - length * progress\n\n return constraints ? applyConstraints(min, constraints, elastic) : min\n}\n\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nexport function calcRelativeAxisConstraints(\n axis: Axis,\n min?: number,\n max?: number\n): Partial {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max:\n max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n }\n}\n\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nexport function calcRelativeConstraints(\n layoutBox: Box,\n { top, left, bottom, right }: Partial\n): ResolvedConstraints {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n }\n}\n\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nexport function calcViewportAxisConstraints(\n layoutAxis: Axis,\n constraintsAxis: Axis\n) {\n let min = constraintsAxis.min - layoutAxis.min\n let max = constraintsAxis.max - layoutAxis.max\n\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (\n constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min\n ) {\n ;[min, max] = [max, min]\n }\n\n return { min, max }\n}\n\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nexport function calcViewportConstraints(layoutBox: Box, constraintsBox: Box) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n }\n}\n\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nexport function calcOrigin(source: Axis, target: Axis): number {\n let origin = 0.5\n const sourceLength = calcLength(source)\n const targetLength = calcLength(target)\n\n if (targetLength > sourceLength) {\n origin = calcProgress(target.min, target.max - sourceLength, source.min)\n } else if (sourceLength > targetLength) {\n origin = calcProgress(source.min, source.max - targetLength, target.min)\n }\n\n return clamp(0, 1, origin)\n}\n\n/**\n * Calculate the relative progress of one constraints box relative to another.\n * Imagine a page scroll bar. At the top, this would return 0, at the bottom, 1.\n * Anywhere in-between, a value between 0 and 1.\n *\n * This also handles flipped constraints, for instance a draggable container within\n * a smaller viewport like a scrollable view.\n */\nexport function calcProgressWithinConstraints(\n layoutBox: Box,\n constraintsBox: Box\n): Point {\n return {\n x: calcOrigin(layoutBox.x, constraintsBox.x),\n y: calcOrigin(layoutBox.y, constraintsBox.y),\n }\n}\n\n/**\n * Calculate the an axis position based on two axes and a progress value.\n */\nexport function calcPositionFromProgress(\n axis: Axis,\n constraints: Axis,\n progress: number\n): Axis {\n const axisLength = axis.max - axis.min\n const min = mixNumber(\n constraints.min,\n constraints.max - axisLength,\n progress\n )\n return { min, max: min + axisLength }\n}\n\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nexport function rebaseAxisConstraints(\n layout: Axis,\n constraints: Partial\n): Partial {\n const relativeConstraints: Partial = {}\n\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min\n }\n\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min\n }\n\n return relativeConstraints\n}\n\nexport const defaultElastic = 0.35\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nexport function resolveDragElastic(\n dragElastic: DragElastic = defaultElastic\n): Box {\n if (dragElastic === false) {\n dragElastic = 0\n } else if (dragElastic === true) {\n dragElastic = defaultElastic\n }\n\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n }\n}\n\nexport function resolveAxisElastic(\n dragElastic: DragElastic,\n minLabel: string,\n maxLabel: string\n): Axis {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n }\n}\n\nexport function resolvePointElastic(\n dragElastic: DragElastic,\n label: string\n): number {\n return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label as keyof typeof dragElastic] || 0\n}\n","import {\n addValueToWillChange,\n animateMotionValue,\n calcLength,\n convertBoundingBoxToBox,\n convertBoxToBoundingBox,\n createBox,\n eachAxis,\n frame,\n isElementTextInput,\n measurePageBox,\n mixNumber,\n PanInfo,\n percent,\n ResolvedConstraints,\n resize,\n setDragLock,\n Transition,\n type VisualElement,\n} from \"motion-dom\"\nimport { Axis, Point, invariant } from \"motion-utils\"\nimport { addDomEvent, type LayoutUpdateData } from \"motion-dom\"\nimport { addPointerEvent } from \"../../events/add-pointer-event\"\nimport { extractEventInfo } from \"../../events/event-info\"\nimport { MotionProps } from \"../../motion/types\"\nimport { getContextWindow } from \"../../utils/get-context-window\"\nimport { isRefObject } from \"../../utils/is-ref-object\"\nimport { PanSession } from \"../pan/PanSession\"\nimport {\n applyConstraints,\n calcOrigin,\n calcRelativeConstraints,\n calcViewportConstraints,\n defaultElastic,\n rebaseAxisConstraints,\n resolveDragElastic,\n} from \"./utils/constraints\"\n\nexport const elementDragControls = new WeakMap<\n VisualElement,\n VisualElementDragControls\n>()\n\nexport interface DragControlOptions {\n /**\n * This distance after which dragging starts and a direction is locked in.\n *\n * @public\n */\n distanceThreshold?: number\n\n /**\n * Whether to immediately snap to the cursor when dragging starts.\n *\n * @public\n */\n snapToCursor?: boolean\n}\n\ntype DragDirection = \"x\" | \"y\"\n\nexport class VisualElementDragControls {\n private visualElement: VisualElement\n\n private panSession?: PanSession\n\n private openDragLock: VoidFunction | null = null\n\n isDragging = false\n private currentDirection: DragDirection | null = null\n\n private originPoint: Point = { x: 0, y: 0 }\n\n /**\n * The permitted boundaries of travel, in pixels.\n */\n private constraints: ResolvedConstraints | false = false\n\n private hasMutatedConstraints = false\n\n /**\n * The per-axis resolved elastic values.\n */\n private elastic = createBox()\n\n /**\n * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n private latestPointerEvent: PointerEvent | null = null\n\n /**\n * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n private latestPanInfo: PanInfo | null = null\n\n constructor(visualElement: VisualElement) {\n this.visualElement = visualElement\n }\n\n start(\n originEvent: PointerEvent,\n { snapToCursor = false, distanceThreshold }: DragControlOptions = {}\n ) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement\n if (presenceContext && presenceContext.isPresent === false) return\n\n const onSessionStart = (event: PointerEvent) => {\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point)\n }\n this.stopAnimation()\n }\n\n const onStart = (event: PointerEvent, info: PanInfo) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps()\n\n if (drag && !dragPropagation) {\n if (this.openDragLock) this.openDragLock()\n\n this.openDragLock = setDragLock(drag)\n\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock) return\n }\n\n this.latestPointerEvent = event\n this.latestPanInfo = info\n this.isDragging = true\n\n this.currentDirection = null\n\n this.resolveConstraints()\n\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true\n this.visualElement.projection.target = undefined\n }\n\n /**\n * Record gesture origin and pointer offset\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0\n\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement\n\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis]\n\n if (measuredAxis) {\n const length = calcLength(measuredAxis)\n current = length * (parseFloat(current) / 100)\n }\n }\n }\n\n this.originPoint[axis] = current\n })\n\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true)\n }\n\n addValueToWillChange(this.visualElement, \"transform\")\n\n const { animationState } = this.visualElement\n animationState && animationState.setActive(\"whileDrag\", true)\n }\n\n const onMove = (event: PointerEvent, info: PanInfo) => {\n this.latestPointerEvent = event\n this.latestPanInfo = info\n\n const {\n dragPropagation,\n dragDirectionLock,\n onDirectionLock,\n onDrag,\n } = this.getProps()\n\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock) return\n\n const { offset } = info\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset)\n\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection)\n }\n\n return\n }\n\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset)\n this.updateAxis(\"y\", info.point, offset)\n\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render()\n\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n if (onDrag) {\n frame.update(() => onDrag(event, info), false, true)\n }\n }\n\n const onSessionEnd = (event: PointerEvent, info: PanInfo) => {\n this.latestPointerEvent = event\n this.latestPanInfo = info\n\n this.stop(event, info)\n\n this.latestPointerEvent = null\n this.latestPanInfo = null\n }\n\n const resumeAnimation = () => {\n const { dragSnapToOrigin: snap } = this.getProps()\n if (snap || this.constraints) {\n this.startAnimation({ x: 0, y: 0 })\n }\n }\n\n const { dragSnapToOrigin } = this.getProps()\n this.panSession = new PanSession(\n originEvent,\n {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n },\n {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n distanceThreshold,\n contextWindow: getContextWindow(this.visualElement),\n element: this.visualElement.current,\n }\n )\n }\n\n /**\n * @internal\n */\n stop(event?: PointerEvent, panInfo?: PanInfo) {\n const finalEvent = event || this.latestPointerEvent\n const finalPanInfo = panInfo || this.latestPanInfo\n\n const isDragging = this.isDragging\n this.cancel()\n if (!isDragging || !finalPanInfo || !finalEvent) return\n\n const { velocity } = finalPanInfo\n this.startAnimation(velocity)\n\n const { onDragEnd } = this.getProps()\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(finalEvent, finalPanInfo))\n }\n }\n\n /**\n * @internal\n */\n cancel() {\n this.isDragging = false\n\n const { projection, animationState } = this.visualElement\n\n if (projection) {\n projection.isAnimationBlocked = false\n }\n\n this.endPanSession()\n\n const { dragPropagation } = this.getProps()\n\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock()\n this.openDragLock = null\n }\n\n animationState && animationState.setActive(\"whileDrag\", false)\n }\n\n /**\n * Clean up the pan session without modifying other drag state.\n * This is used during unmount to ensure event listeners are removed\n * without affecting projection animations or drag locks.\n * @internal\n */\n endPanSession() {\n this.panSession && this.panSession.end()\n this.panSession = undefined\n }\n\n private updateAxis(axis: DragDirection, _point: Point, offset?: Point) {\n const { drag } = this.getProps()\n\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection)) return\n\n const axisValue = this.getAxisMotionValue(axis)\n let next = this.originPoint[axis] + offset[axis]\n\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(\n next,\n this.constraints[axis],\n this.elastic[axis]\n )\n }\n\n axisValue.set(next)\n }\n\n private resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps()\n\n const layout =\n this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout\n\n const prevConstraints = this.constraints\n\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints()\n }\n } else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(\n layout.layoutBox,\n dragConstraints\n )\n } else {\n this.constraints = false\n }\n }\n\n this.elastic = resolveDragElastic(dragElastic)\n\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative. This only applies to relative (non-ref)\n * constraints, as ref-based constraints from calcViewportConstraints are already in the\n * correct coordinate space for the motion value transform offset.\n */\n if (\n prevConstraints !== this.constraints &&\n !isRefObject(dragConstraints) &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints\n ) {\n eachAxis((axis) => {\n if (\n this.constraints !== false &&\n this.getAxisMotionValue(axis)\n ) {\n this.constraints[axis] = rebaseAxisConstraints(\n layout.layoutBox[axis],\n this.constraints[axis]\n )\n }\n })\n }\n }\n\n private resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } =\n this.getProps()\n if (!constraints || !isRefObject(constraints)) return false\n\n const constraintsElement = constraints.current as HTMLElement\n\n invariant(\n constraintsElement !== null,\n \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\",\n \"drag-constraints-ref\"\n )\n\n const { projection } = this.visualElement\n\n // TODO\n if (!projection || !projection.layout) return false\n\n /**\n * Refresh the root scroll offset so the constraint's viewport box\n * translates to correct page coordinates. The scroll captured at\n * drag mount can be stale if the document was scrolled afterwards —\n * e.g. via the browser restoring scroll on refresh, or an ancestor\n * layout effect running after this element's mount (#2829).\n *\n * Clear the cached scroll first so `updateScroll` bypasses its\n * per-animationId cache and re-reads the live value.\n */\n if (projection.root) {\n projection.root.scroll = undefined\n projection.root.updateScroll()\n }\n\n const constraintsBox = measurePageBox(\n constraintsElement,\n projection.root!,\n this.visualElement.getTransformPagePoint()\n )\n\n let measuredConstraints = calcViewportConstraints(\n projection.layout.layoutBox,\n constraintsBox\n )\n\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(\n convertBoxToBoundingBox(measuredConstraints)\n )\n\n this.hasMutatedConstraints = !!userConstraints\n\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints)\n }\n }\n\n return measuredConstraints\n }\n\n private startAnimation(velocity: Point) {\n const {\n drag,\n dragMomentum,\n dragElastic,\n dragTransition,\n dragSnapToOrigin,\n onDragTransitionEnd,\n } = this.getProps()\n\n const constraints: Partial = this.constraints || {}\n\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return\n }\n\n let transition = (constraints && constraints[axis]) || {}\n\n if (\n dragSnapToOrigin === true ||\n (dragSnapToOrigin as unknown) === axis\n )\n transition = { min: 0, max: 0 }\n\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000\n const bounceDamping = dragElastic ? 40 : 10000000\n\n const inertia: Transition = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n }\n\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia)\n })\n\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd)\n }\n\n private startAxisValueAnimation(\n axis: DragDirection,\n transition: Transition\n ) {\n const axisValue = this.getAxisMotionValue(axis)\n\n addValueToWillChange(this.visualElement, axis)\n\n return axisValue.start(\n animateMotionValue(\n axis,\n axisValue,\n 0,\n transition,\n this.visualElement,\n false\n )\n )\n }\n\n private stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop())\n }\n\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n private getAxisMotionValue(axis: DragDirection) {\n const dragKey =\n `_drag${axis.toUpperCase()}` as `_drag${Uppercase}`\n const props = this.visualElement.getProps()\n const externalMotionValue = props[dragKey]\n\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(\n axis,\n this.visualElement.latestValues[axis] ?? 0\n )\n }\n\n private snapToCursor(point: Point) {\n eachAxis((axis) => {\n const { drag } = this.getProps()\n\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection)) return\n\n const { projection } = this.visualElement\n const axisValue = this.getAxisMotionValue(axis)\n\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis]\n\n /**\n * The layout measurement includes the current transform value,\n * so we need to add it back to get the correct snap position.\n * This fixes an issue where elements with initial coordinates\n * would snap to the wrong position on the first drag.\n */\n const current = axisValue.get() || 0\n\n axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current)\n }\n })\n }\n\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current) return\n\n const { drag, dragConstraints } = this.getProps()\n const { projection } = this.visualElement\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return\n\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation()\n\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 }\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis)\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get()\n boxProgress[axis] = calcOrigin(\n { min: latest, max: latest },\n this.constraints[axis] as Axis\n )\n }\n })\n\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps()\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\"\n projection.root && projection.root.updateScroll()\n projection.updateLayout()\n\n /**\n * Reset constraints so resolveConstraints() will recalculate them\n * with the freshly measured layout rather than returning the cached value.\n */\n this.constraints = false\n this.resolveConstraints()\n\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null)) return\n\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis)\n const { min, max } = (this.constraints as ResolvedConstraints)[\n axis\n ] as Axis\n axisValue.set(mixNumber(min, max, boxProgress[axis]))\n })\n\n /**\n * Flush the updated transform to the DOM synchronously to prevent\n * a visual flash at the element's CSS layout position (0,0) when\n * the transform was stripped for measurement.\n */\n this.visualElement.render()\n }\n\n addListeners() {\n if (!this.visualElement.current) return\n elementDragControls.set(this.visualElement, this)\n const element = this.visualElement.current\n\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(\n element,\n \"pointerdown\",\n (event) => {\n const { drag, dragListener = true } = this.getProps()\n const target = event.target as Element\n\n /**\n * Only block drag if clicking on a text input child element\n * (input, textarea, select, contenteditable) where users might\n * want to select text or interact with the control.\n *\n * Buttons and links don't block drag since they don't have\n * click-and-move actions of their own.\n */\n const isClickingTextInputChild =\n target !== element && isElementTextInput(target)\n\n if (drag && dragListener && !isClickingTextInputChild) {\n this.start(event)\n }\n }\n )\n\n /**\n * If using ref-based constraints, observe both the draggable element\n * and the constraint container for size changes via ResizeObserver.\n * Setup is deferred because dragConstraints.current is null when\n * addListeners first runs (React hasn't committed the ref yet).\n */\n let stopResizeObservers: VoidFunction | undefined\n\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps()\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints()\n\n if (!stopResizeObservers) {\n stopResizeObservers = startResizeObservers(\n element,\n dragConstraints.current as HTMLElement,\n () => this.scalePositionWithinConstraints()\n )\n }\n }\n }\n\n const { projection } = this.visualElement\n\n const stopMeasureLayoutListener = projection!.addEventListener(\n \"measure\",\n measureDragConstraints\n )\n\n if (projection && !projection!.layout) {\n projection.root && projection.root.updateScroll()\n projection.updateLayout()\n }\n\n frame.read(measureDragConstraints)\n\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () =>\n this.scalePositionWithinConstraints()\n )\n\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection!.addEventListener(\n \"didUpdate\",\n (({ delta, hasLayoutChanged }: LayoutUpdateData) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis)\n if (!motionValue) return\n\n this.originPoint[axis] += delta[axis].translate\n motionValue.set(\n motionValue.get() + delta[axis].translate\n )\n })\n\n this.visualElement.render()\n }\n }) as any\n )\n\n return () => {\n stopResizeListener()\n stopPointerListener()\n stopMeasureLayoutListener()\n stopLayoutUpdateListener && stopLayoutUpdateListener()\n stopResizeObservers && stopResizeObservers()\n }\n }\n\n getProps(): MotionProps {\n const props = this.visualElement.getProps()\n const {\n drag = false,\n dragDirectionLock = false,\n dragPropagation = false,\n dragConstraints = false,\n dragElastic = defaultElastic,\n dragMomentum = true,\n } = props\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n }\n }\n}\n\nfunction skipFirstCall(callback: VoidFunction): VoidFunction {\n let isFirst = true\n return () => {\n if (isFirst) {\n isFirst = false\n return\n }\n callback()\n }\n}\n\nfunction startResizeObservers(\n element: HTMLElement,\n constraintsElement: HTMLElement,\n onResize: VoidFunction\n): VoidFunction {\n const stopElement = resize(element, skipFirstCall(onResize))\n const stopContainer = resize(constraintsElement, skipFirstCall(onResize))\n return () => {\n stopElement()\n stopContainer()\n }\n}\n\nfunction shouldDrag(\n direction: DragDirection,\n drag: boolean | DragDirection | undefined,\n currentDirection: null | DragDirection\n) {\n return (\n (drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction)\n )\n}\n\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(\n offset: Point,\n lockThreshold = 10\n): DragDirection | null {\n let direction: DragDirection | null = null\n\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\"\n } else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\"\n }\n\n return direction\n}\n\nexport function expectsResolvedDragConstraints({\n dragConstraints,\n onMeasureDragConstraints,\n}: MotionProps) {\n return isRefObject(dragConstraints) && !!onMeasureDragConstraints\n}\n","import { Feature, type VisualElement } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { VisualElementDragControls } from \"./VisualElementDragControls\"\n\nexport class DragGesture extends Feature {\n controls: VisualElementDragControls\n\n removeGroupControls: Function = noop\n removeListeners: Function = noop\n\n constructor(node: VisualElement) {\n super(node)\n this.controls = new VisualElementDragControls(node)\n }\n\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps()\n\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls)\n }\n\n this.removeListeners = this.controls.addListeners() || noop\n }\n\n update() {\n const { dragControls } = this.node.getProps()\n const { dragControls: prevDragControls } = this.node.prevProps || {}\n\n if (dragControls !== prevDragControls) {\n this.removeGroupControls()\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls)\n }\n }\n }\n\n unmount() {\n this.removeGroupControls()\n this.removeListeners()\n /**\n * In React 19, during list reorder reconciliation, components may\n * briefly unmount and remount while the drag is still active. If we're\n * actively dragging, we should NOT end the pan session - it will\n * continue tracking pointer events via its window-level listeners.\n *\n * The pan session will be properly cleaned up when:\n * 1. The drag ends naturally (pointerup/pointercancel)\n * 2. The component is truly removed from the DOM\n */\n if (!this.controls.isDragging) {\n this.controls.endPanSession()\n }\n }\n}\n","import { Feature, frame, type PanInfo } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { addPointerEvent } from \"../../events/add-pointer-event\"\nimport { getContextWindow } from \"../../utils/get-context-window\"\nimport { PanSession } from \"./PanSession\"\n\ntype PanEventHandler = (event: PointerEvent, info: PanInfo) => void\nconst asyncHandler =\n (handler?: PanEventHandler) => (event: PointerEvent, info: PanInfo) => {\n if (handler) {\n frame.update(() => handler(event, info), false, true)\n }\n }\n\nexport class PanGesture extends Feature {\n private session?: PanSession\n\n private removePointerDownListener: Function = noop\n\n onPointerDown(pointerDownEvent: PointerEvent) {\n this.session = new PanSession(\n pointerDownEvent,\n this.createPanHandlers(),\n {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n }\n )\n }\n\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } =\n this.node.getProps()\n\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: asyncHandler(onPan),\n onEnd: (event: PointerEvent, info: PanInfo) => {\n delete this.session\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info))\n }\n },\n }\n }\n\n mount() {\n this.removePointerDownListener = addPointerEvent(\n this.node.current!,\n \"pointerdown\",\n (event: PointerEvent) => this.onPointerDown(event)\n )\n }\n\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers())\n }\n\n unmount() {\n this.removePointerDownListener()\n this.session && this.session.end()\n }\n}\n","\"use client\"\n\nimport { frame, microtask, globalProjectionState, type VisualElement } from \"motion-dom\"\nimport { Component, useContext } from \"react\"\nimport { usePresence } from \"../../../components/AnimatePresence/use-presence\"\nimport {\n LayoutGroupContext,\n LayoutGroupContextProps,\n} from \"../../../context/LayoutGroupContext\"\nimport { SwitchLayoutGroupContext } from \"../../../context/SwitchLayoutGroupContext\"\nimport { MotionProps } from \"../../types\"\n\ninterface MeasureContextProps {\n layoutGroup: LayoutGroupContextProps\n switchLayoutGroup?: SwitchLayoutGroupContext\n isPresent: boolean\n safeToRemove?: VoidFunction | null\n}\n\ntype MeasureProps = MotionProps &\n MeasureContextProps & { visualElement: VisualElement }\n\n/**\n * Track whether we've taken any snapshots yet. If not,\n * we can safely skip notification of didUpdate.\n *\n * Difficult to capture in a test but to prevent flickering\n * we must set this to true either on update or unmount.\n * Running `next-env/layout-id` in Safari will show this behaviour if broken.\n */\nlet hasTakenAnySnapshot = false\n\nclass MeasureLayoutWithContext extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } =\n this.props\n const { projection } = visualElement\n\n if (projection) {\n if (layoutGroup.group) layoutGroup.group.add(projection)\n\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection)\n }\n\n if (hasTakenAnySnapshot) {\n projection.root!.didUpdate()\n }\n\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove()\n })\n projection.setOptions({\n ...projection.options,\n layoutDependency: this.props.layoutDependency,\n onExitComplete: () => this.safeToRemove(),\n })\n }\n\n globalProjectionState.hasEverUpdated = true\n }\n\n getSnapshotBeforeUpdate(prevProps: MeasureProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props\n const { projection } = visualElement\n\n if (!projection) return null\n\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent\n\n if (prevProps.layoutDependency !== layoutDependency) {\n projection.setOptions({\n ...projection.options,\n layoutDependency,\n })\n }\n\n hasTakenAnySnapshot = true\n\n if (\n drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined ||\n prevProps.isPresent !== isPresent\n ) {\n projection.willUpdate()\n } else {\n this.safeToRemove()\n }\n\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote()\n } else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack()\n if (!stack || !stack.members.length) {\n this.safeToRemove()\n }\n })\n }\n }\n\n return null\n }\n\n componentDidUpdate() {\n const { visualElement, layoutAnchor } = this.props\n const { projection } = visualElement\n if (projection) {\n projection.options.layoutAnchor = layoutAnchor\n\n projection.root!.didUpdate()\n\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove()\n }\n })\n }\n }\n\n componentWillUnmount() {\n const {\n visualElement,\n layoutGroup,\n switchLayoutGroup: promoteContext,\n } = this.props\n const { projection } = visualElement\n\n hasTakenAnySnapshot = true\n\n if (projection) {\n projection.scheduleCheckAfterUnmount()\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection)\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection)\n }\n }\n\n safeToRemove() {\n const { safeToRemove } = this.props\n safeToRemove && safeToRemove()\n }\n\n render() {\n return null\n }\n}\n\nexport function MeasureLayout(\n props: MotionProps & { visualElement: VisualElement }\n) {\n const [isPresent, safeToRemove] = usePresence()\n const layoutGroup = useContext(LayoutGroupContext)\n\n return (\n \n )\n}\n","import { DragGesture } from \"../../gestures/drag\"\nimport { PanGesture } from \"../../gestures/pan\"\nimport { HTMLProjectionNode } from \"../../projection\"\nimport { MeasureLayout } from \"./layout/MeasureLayout\"\nimport { FeaturePackages } from \"./types\"\n\nexport const drag: FeaturePackages = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n}\n","import { Feature, frame, hover, type VisualElement } from \"motion-dom\"\nimport { extractEventInfo } from \"../events/event-info\"\n\nfunction handleHoverEvent(\n node: VisualElement,\n event: PointerEvent,\n lifecycle: \"Start\" | \"End\"\n) {\n const { props } = node\n\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\")\n }\n\n const eventName = (\"onHover\" + lifecycle) as \"onHoverStart\" | \"onHoverEnd\"\n const callback = props[eventName]\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)))\n }\n}\n\nexport class HoverGesture extends Feature {\n mount() {\n const { current } = this.node\n if (!current) return\n\n this.unmount = hover(current, (_element, startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\")\n\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\")\n })\n }\n\n unmount() {}\n}\n","import { Feature, addDomEvent } from \"motion-dom\"\nimport { pipe } from \"motion-utils\"\n\nexport class FocusGesture extends Feature {\n private isActive = false\n\n onFocus() {\n let isFocusVisible = false\n\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current!.matches(\":focus-visible\")\n } catch (e) {\n isFocusVisible = true\n }\n\n if (!isFocusVisible || !this.node.animationState) return\n\n this.node.animationState.setActive(\"whileFocus\", true)\n this.isActive = true\n }\n\n onBlur() {\n if (!this.isActive || !this.node.animationState) return\n this.node.animationState.setActive(\"whileFocus\", false)\n this.isActive = false\n }\n\n mount() {\n this.unmount = pipe(\n addDomEvent(this.node.current!, \"focus\", () => this.onFocus()),\n addDomEvent(this.node.current!, \"blur\", () => this.onBlur())\n ) as VoidFunction\n }\n\n unmount() {}\n}\n","import { Feature, frame, press, type VisualElement } from \"motion-dom\"\nimport { extractEventInfo } from \"../events/event-info\"\n\nfunction handlePressEvent(\n node: VisualElement,\n event: PointerEvent,\n lifecycle: \"Start\" | \"End\" | \"Cancel\"\n) {\n const { props } = node\n\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return\n }\n\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\")\n }\n\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle)) as\n | \"onTapStart\"\n | \"onTap\"\n | \"onTapCancel\"\n\n const callback = props[eventName]\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)))\n }\n}\n\nexport class PressGesture extends Feature {\n mount() {\n const { current } = this.node\n if (!current) return\n\n const { globalTapTarget, propagate } = this.node.props\n\n this.unmount = press(\n current,\n (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\")\n\n return (endEvent, { success }) =>\n handlePressEvent(\n this.node,\n endEvent,\n success ? \"End\" : \"Cancel\"\n )\n },\n {\n useGlobalTarget: globalTapTarget,\n stopPropagation: propagate?.tap === false,\n }\n )\n }\n\n unmount() {}\n}\n","type IntersectionHandler = (entry: IntersectionObserverEntry) => void\n\ninterface ElementIntersectionObservers {\n [key: string]: IntersectionObserver\n}\n\n/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap()\n\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap<\n Element | Document,\n ElementIntersectionObservers\n>()\n\nconst fireObserverCallback = (entry: IntersectionObserverEntry) => {\n const callback = observerCallbacks.get(entry.target)\n callback && callback(entry)\n}\n\nconst fireAllObserverCallbacks: IntersectionObserverCallback = (entries) => {\n entries.forEach(fireObserverCallback)\n}\n\nfunction initIntersectionObserver({\n root,\n ...options\n}: IntersectionObserverInit): IntersectionObserver {\n const lookupRoot = root || document\n\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {})\n }\n const rootObservers = observers.get(lookupRoot)!\n\n const key = JSON.stringify(options)\n\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(\n fireAllObserverCallbacks,\n { root, ...options }\n )\n }\n\n return rootObservers[key]\n}\n\nexport function observeIntersection(\n element: Element,\n options: IntersectionObserverInit,\n callback: IntersectionHandler\n) {\n const rootInteresectionObserver = initIntersectionObserver(options)\n\n observerCallbacks.set(element, callback)\n rootInteresectionObserver.observe(element)\n\n return () => {\n observerCallbacks.delete(element)\n rootInteresectionObserver.unobserve(element)\n }\n}\n","import { Feature } from \"motion-dom\"\nimport { MotionProps } from \"../../types\"\nimport { observeIntersection } from \"./observers\"\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n}\n\nexport class InViewFeature extends Feature {\n private hasEnteredView = false\n\n private isInView = false\n\n private stopObserver?: () => void\n\n private startObserver() {\n this.stopObserver?.()\n\n const { viewport = {} } = this.node.getProps()\n const { root, margin: rootMargin, amount = \"some\", once } = viewport\n\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold:\n typeof amount === \"number\" ? amount : thresholdNames[amount],\n }\n\n const onIntersectionUpdate = (entry: IntersectionObserverEntry) => {\n const { isIntersecting } = entry\n\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting) return\n\n this.isInView = isIntersecting\n\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return\n } else if (isIntersecting) {\n this.hasEnteredView = true\n }\n\n if (this.node.animationState) {\n this.node.animationState.setActive(\n \"whileInView\",\n isIntersecting\n )\n }\n\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps()\n const callback = isIntersecting ? onViewportEnter : onViewportLeave\n callback && callback(entry)\n }\n\n this.stopObserver = observeIntersection(\n this.node.current!,\n options,\n onIntersectionUpdate\n )\n }\n\n mount() {\n this.startObserver()\n }\n\n update() {\n if (typeof IntersectionObserver === \"undefined\") return\n\n const { props, prevProps } = this.node\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(\n hasViewportOptionChanged(props, prevProps)\n )\n\n if (hasOptionsChanged) {\n this.startObserver()\n }\n }\n\n unmount() {\n this.stopObserver?.()\n this.hasEnteredView = false\n this.isInView = false\n }\n}\n\nfunction hasViewportOptionChanged(\n { viewport = {} }: MotionProps,\n { viewport: prevViewport = {} }: MotionProps = {}\n) {\n return (name: keyof typeof viewport) =>\n viewport[name] !== prevViewport[name]\n}\n","import { HoverGesture } from \"../../gestures/hover\"\nimport { FocusGesture } from \"../../gestures/focus\"\nimport { PressGesture } from \"../../gestures/press\"\nimport { InViewFeature } from \"./viewport\"\nimport { FeaturePackages } from \"./types\"\n\nexport const gestureAnimations: FeaturePackages = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n}\n","import { HTMLProjectionNode } from \"motion-dom\"\nimport { MeasureLayout } from \"./layout/MeasureLayout\"\nimport { FeaturePackages } from \"./types\"\n\nexport const layout: FeaturePackages = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n}\n","import { animations } from \"../../../motion/features/animations\"\nimport { drag } from \"../../../motion/features/drag\"\nimport { gestureAnimations } from \"../../../motion/features/gestures\"\nimport { layout } from \"../../../motion/features/layout\"\n\nexport const featureBundle = {\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout,\n}\n"],"names":["useContext","PresenceContext","useId","useEffect","useCallback","isSVGComponent","SVGVisualElement","HTMLVisualElement","Fragment","Feature","createAnimationState","isAnimationControls","resolveVariant","isPrimaryPointer","addDomEvent","frameData","frame","pipe","cancelFrame","secondsToMilliseconds","millisecondsToSeconds","mixNumber","calcLength","calcProgress","clamp","createBox","setDragLock","eachAxis","percent","addValueToWillChange","isRefObject","invariant","measurePageBox","convertBoxToBoundingBox","convertBoundingBoxToBox","animateMotionValue","isElementTextInput","resize","noop","Component","globalProjectionState","microtask","LayoutGroupContext","_jsx","SwitchLayoutGroupContext","HTMLProjectionNode","hover","press"],"mappings":";;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACG,SAAU,WAAW,CACvB,SAAA,GAAqB,IAAI,EAAA;AAEzB,IAAA,MAAM,OAAO,GAAGA,gBAAU,CAACC,qBAAe,CAAC;IAE3C,IAAI,OAAO,KAAK,IAAI;AAAE,QAAA,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;IAEzC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,OAAO;;;AAKvD,IAAA,MAAM,EAAE,GAAGC,WAAK,EAAE;IAClBC,eAAS,CAAC,MAAK;QACX,IAAI,SAAS,EAAE;AACX,YAAA,OAAO,QAAQ,CAAC,EAAE,CAAC;QACvB;AACJ,IAAA,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAEf,MAAM,YAAY,GAAGC,iBAAW,CAC5B,MAAM,SAAS,IAAI,cAAc,IAAI,cAAc,CAAC,EAAE,CAAC,EACvD,CAAC,EAAE,EAAE,cAAc,EAAE,SAAS,CAAC,CAClC;AAED,IAAA,OAAO,CAAC,SAAS,IAAI,cAAc,GAAG,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;AACxE;AAEA;;;;;;;;;;;;;;;;;;;AAmBG;SACa,YAAY,GAAA;AACxB,IAAA,OAAO,SAAS,CAACJ,gBAAU,CAACC,qBAAe,CAAC,CAAC;AACjD;AAEM,SAAU,SAAS,CAAC,OAAoC,EAAA;AAC1D,IAAA,OAAO,OAAO,KAAK,IAAI,GAAG,IAAI,G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c,GAAG,KAAK;AAC3B,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK;IACzB;AACH;AAED,SAAS,wBAAwB,CAC7B,EAAE,QAAQ,GAAG,EAAE,EAAe,EAC9B,EAAE,QAAQ,EAAE,YAAY,GAAG,EAAE,KAAkB,EAAE,EAAA;AAEjD,IAAA,OAAO,CAAC,IAA2B,KAC/B,QAAQ,CAAC,IAAI,CAAC,KAAK,YAAY,CAAC,IAAI,CAAC;AAC7C;;AChGO,MAAM,iBAAiB,GAAoB;AAC9C,IAAA,MAAM,EAAE;AACJ,QAAA,OAAO,EAAE,aAAa;AACzB,KAAA;AACD,IAAA,GAAG,EAAE;AACD,QAAA,OAAO,EAAE,YAAY;AACxB,KAAA;AACD,IAAA,KAAK,EAAE;AACH,QAAA,OAAO,EAAE,YAAY;AACxB,KAAA;AACD,IAAA,KAAK,EAAE;AACH,QAAA,OAAO,EAAE,YAAY;AACxB,KAAA;;;ACdE,MAAM,MAAM,GAAoB;AACnC,IAAA,MAAM,EAAE;AACJ,QAAA,cAAc,EAAEoC,4BAAkB;QAClC,aAAa;AAChB,KAAA;;;ACHE,MAAM,aAAa,GAAG;AACzB,IAAA,GAAG,UAAU;AACb,IAAA,GAAG,iBAAiB;AACpB,IAAA,GAAG,IAAI;AACP,IAAA,GAAG,MAAM;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index-6W16WHlG.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index-6W16WHlG.js deleted file mode 100644 index c4a6c6f6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index-6W16WHlG.js +++ /dev/null @@ -1,802 +0,0 @@ -'use strict'; - -var jsxRuntime = require('react/jsx-runtime'); -var motionUtils = require('motion-utils'); -var React = require('react'); -var motionDom = require('motion-dom'); - -const LayoutGroupContext = React.createContext({}); - -/** - * Creates a constant value over the lifecycle of a component. - * - * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer - * a guarantee that it won't re-run for performance reasons later on. By using `useConstant` - * you can ensure that initialisers don't execute twice or more. - */ -function useConstant(init) { - const ref = React.useRef(null); - if (ref.current === null) { - ref.current = init(); - } - return ref.current; -} - -const isBrowser = typeof window !== "undefined"; - -const useIsomorphicLayoutEffect = isBrowser ? React.useLayoutEffect : React.useEffect; - -/** - * @public - */ -const PresenceContext = -/* @__PURE__ */ React.createContext(null); - -/** - * @public - */ -const MotionConfigContext = React.createContext({ - transformPagePoint: (p) => p, - isStatic: false, - reducedMotion: "never", -}); - -const LazyContext = React.createContext({ strict: false }); - -const featureProps = { - animation: [ - "animate", - "variants", - "whileHover", - "whileTap", - "exit", - "whileInView", - "whileFocus", - "whileDrag", - ], - exit: ["exit"], - drag: ["drag", "dragControls"], - focus: ["whileFocus"], - hover: ["whileHover", "onHoverStart", "onHoverEnd"], - tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"], - pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"], - inView: ["whileInView", "onViewportEnter", "onViewportLeave"], - layout: ["layout", "layoutId"], -}; -let isInitialized = false; -/** - * Initialize feature definitions with isEnabled checks. - * This must be called before any motion components are rendered. - */ -function initFeatureDefinitions() { - if (isInitialized) - return; - const initialFeatureDefinitions = {}; - for (const key in featureProps) { - initialFeatureDefinitions[key] = { - isEnabled: (props) => featureProps[key].some((name) => !!props[name]), - }; - } - motionDom.setFeatureDefinitions(initialFeatureDefinitions); - isInitialized = true; -} -/** - * Get the current feature definitions, initializing if needed. - */ -function getInitializedFeatureDefinitions() { - initFeatureDefinitions(); - return motionDom.getFeatureDefinitions(); -} - -function loadFeatures(features) { - const featureDefinitions = getInitializedFeatureDefinitions(); - for (const key in features) { - featureDefinitions[key] = { - ...featureDefinitions[key], - ...features[key], - }; - } - motionDom.setFeatureDefinitions(featureDefinitions); -} - -/** - * A list of all valid MotionProps. - * - * @privateRemarks - * This doesn't throw if a `MotionProp` name is missing - it should. - */ -const validMotionProps = new Set([ - "animate", - "exit", - "variants", - "initial", - "style", - "values", - "variants", - "transition", - "transformTemplate", - "custom", - "inherit", - "onBeforeLayoutMeasure", - "onAnimationStart", - "onAnimationComplete", - "onUpdate", - "onDragStart", - "onDrag", - "onDragEnd", - "onMeasureDragConstraints", - "onDirectionLock", - "onDragTransitionEnd", - "_dragX", - "_dragY", - "onHoverStart", - "onHoverEnd", - "onViewportEnter", - "onViewportLeave", - "globalTapTarget", - "propagate", - "ignoreStrict", - "viewport", -]); -/** - * Check whether a prop name is a valid `MotionProp` key. - * - * @param key - Name of the property to check - * @returns `true` is key is a valid `MotionProp`. - * - * @public - */ -function isValidMotionProp(key) { - return (key.startsWith("while") || - (key.startsWith("drag") && key !== "draggable") || - key.startsWith("layout") || - key.startsWith("onTap") || - key.startsWith("onPan") || - key.startsWith("onLayout") || - validMotionProps.has(key)); -} - -let shouldForward = (key) => !isValidMotionProp(key); -function loadExternalIsValidProp(isValidProp) { - if (typeof isValidProp !== "function") - return; - // Explicitly filter our events - shouldForward = (key) => key.startsWith("on") ? !isValidMotionProp(key) : isValidProp(key); -} -/** - * Emotion and Styled Components both allow users to pass through arbitrary props to their components - * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which - * of these should be passed to the underlying DOM node. - * - * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props - * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props - * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of - * `@emotion/is-prop-valid`, however to fix this problem we need to use it. - * - * By making it an optionalDependency we can offer this functionality only in the situations where it's - * actually required. - */ -try { - /** - * We attempt to import this package but require won't be defined in esm environments, in that case - * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed - * in favour of explicit injection. - * - * String concatenation prevents bundlers like webpack (e.g. Storybook) - * from statically resolving this optional dependency at build time. - */ - const emotionPkg = "@emotion/is-prop-" + "valid"; - loadExternalIsValidProp(require(emotionPkg).default); -} -catch { - // We don't need to actually do anything here - the fallback is the existing `isPropValid`. -} -function filterProps(props, isDom, forwardMotionProps) { - const filteredProps = {}; - for (const key in props) { - /** - * values is considered a valid prop by Emotion, so if it's present - * this will be rendered out to the DOM unless explicitly filtered. - * - * We check the type as it could be used with the `feColorMatrix` - * element, which we support. - */ - if (key === "values" && typeof props.values === "object") - continue; - if (motionDom.isMotionValue(props[key])) - continue; - if (shouldForward(key) || - (forwardMotionProps === true && isValidMotionProp(key)) || - (!isDom && !isValidMotionProp(key)) || - // If trying to use native HTML drag events, forward drag listeners - (props["draggable"] && - key.startsWith("onDrag"))) { - filteredProps[key] = - props[key]; - } - } - return filteredProps; -} - -/** - * We keep these listed separately as we use the lowercase tag names as part - * of the runtime bundle to detect SVG components - */ -const lowercaseSVGElements = [ - "animate", - "circle", - "defs", - "desc", - "ellipse", - "g", - "image", - "line", - "filter", - "marker", - "mask", - "metadata", - "path", - "pattern", - "polygon", - "polyline", - "rect", - "stop", - "switch", - "symbol", - "svg", - "text", - "tspan", - "use", - "view", -]; - -function isSVGComponent(Component) { - if ( - /** - * If it's not a string, it's a custom React component. Currently we only support - * HTML custom React components. - */ - typeof Component !== "string" || - /** - * If it contains a dash, the element is a custom HTML webcomponent. - */ - Component.includes("-")) { - return false; - } - else if ( - /** - * If it's in our list of lowercase SVG tags, it's an SVG component - */ - lowercaseSVGElements.indexOf(Component) > -1 || - /** - * If it contains a capital letter, it's an SVG component - */ - /[A-Z]/u.test(Component)) { - return true; - } - return false; -} - -const MotionContext = /* @__PURE__ */ React.createContext({}); - -function getCurrentTreeVariants(props, context) { - if (motionDom.isControllingVariants(props)) { - const { initial, animate } = props; - return { - initial: initial === false || motionDom.isVariantLabel(initial) - ? initial - : undefined, - animate: motionDom.isVariantLabel(animate) ? animate : undefined, - }; - } - return props.inherit !== false ? context : {}; -} - -function useCreateMotionContext(props) { - const { initial, animate } = getCurrentTreeVariants(props, React.useContext(MotionContext)); - return React.useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]); -} -function variantLabelsAsDependency(prop) { - return Array.isArray(prop) ? prop.join(" ") : prop; -} - -const createHtmlRenderState = () => ({ - style: {}, - transform: {}, - transformOrigin: {}, - vars: {}, -}); - -function copyRawValuesOnly(target, source, props) { - for (const key in source) { - if (!motionDom.isMotionValue(source[key]) && !motionDom.isForcedMotionValue(key, props)) { - target[key] = source[key]; - } - } -} -function useInitialMotionValues({ transformTemplate }, visualState) { - return React.useMemo(() => { - const state = createHtmlRenderState(); - motionDom.buildHTMLStyles(state, visualState, transformTemplate); - return Object.assign({}, state.vars, state.style); - }, [visualState]); -} -function useStyle(props, visualState) { - const styleProp = props.style || {}; - const style = {}; - /** - * Copy non-Motion Values straight into style - */ - copyRawValuesOnly(style, styleProp, props); - Object.assign(style, useInitialMotionValues(props, visualState)); - return style; -} -function useHTMLProps(props, visualState) { - // The `any` isn't ideal but it is the type of createElement props argument - const htmlProps = {}; - const style = useStyle(props, visualState); - if (props.drag && props.dragListener !== false) { - // Disable the ghost element when a user drags - htmlProps.draggable = false; - // Disable text selection - style.userSelect = - style.WebkitUserSelect = - style.WebkitTouchCallout = - "none"; - // Disable scrolling on the draggable direction - style.touchAction = - props.drag === true - ? "none" - : `pan-${props.drag === "x" ? "y" : "x"}`; - } - if (props.tabIndex === undefined && - (props.onTap || props.onTapStart || props.whileTap)) { - htmlProps.tabIndex = 0; - } - htmlProps.style = style; - return htmlProps; -} - -const createSvgRenderState = () => ({ - ...createHtmlRenderState(), - attrs: {}, -}); - -function useSVGProps(props, visualState, _isStatic, Component) { - const visualProps = React.useMemo(() => { - const state = createSvgRenderState(); - motionDom.buildSVGAttrs(state, visualState, motionDom.isSVGTag(Component), props.transformTemplate, props.style); - return { - ...state.attrs, - style: { ...state.style }, - }; - }, [visualState]); - if (props.style) { - const rawStyles = {}; - copyRawValuesOnly(rawStyles, props.style, props); - visualProps.style = { ...rawStyles, ...visualProps.style }; - } - return visualProps; -} - -function useRender(Component, props, ref, { latestValues, }, isStatic, forwardMotionProps = false, isSVG) { - const useVisualProps = (isSVG ?? isSVGComponent(Component)) ? useSVGProps : useHTMLProps; - const visualProps = useVisualProps(props, latestValues, isStatic, Component); - const filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps); - const elementProps = Component !== React.Fragment ? { ...filteredProps, ...visualProps, ref } : {}; - /** - * If component has been handed a motion value as its child, - * memoise its initial value and render that. Subsequent updates - * will be handled by the onChange handler - */ - const { children } = props; - const renderedChildren = React.useMemo(() => (motionDom.isMotionValue(children) ? children.get() : children), [children]); - return React.createElement(Component, { - ...elementProps, - children: renderedChildren, - }); -} - -function makeState({ scrapeMotionValuesFromProps, createRenderState, }, props, context, presenceContext) { - const state = { - latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps), - renderState: createRenderState(), - }; - return state; -} -function makeLatestValues(props, context, presenceContext, scrapeMotionValues) { - const values = {}; - const motionValues = scrapeMotionValues(props, {}); - for (const key in motionValues) { - values[key] = motionDom.resolveMotionValue(motionValues[key]); - } - let { initial, animate } = props; - const isControllingVariants = motionDom.isControllingVariants(props); - const isVariantNode = motionDom.isVariantNode(props); - if (context && - isVariantNode && - !isControllingVariants && - props.inherit !== false) { - if (initial === undefined) - initial = context.initial; - if (animate === undefined) - animate = context.animate; - } - let isInitialAnimationBlocked = presenceContext - ? presenceContext.initial === false - : false; - isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false; - const variantToSet = isInitialAnimationBlocked ? animate : initial; - if (variantToSet && - typeof variantToSet !== "boolean" && - !motionDom.isAnimationControls(variantToSet)) { - const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet]; - for (let i = 0; i < list.length; i++) { - const resolved = motionDom.resolveVariantFromProps(props, list[i]); - if (resolved) { - const { transitionEnd, transition, ...target } = resolved; - for (const key in target) { - let valueTarget = target[key]; - if (Array.isArray(valueTarget)) { - /** - * Take final keyframe if the initial animation is blocked because - * we want to initialise at the end of that blocked animation. - */ - const index = isInitialAnimationBlocked - ? valueTarget.length - 1 - : 0; - valueTarget = valueTarget[index]; - } - if (valueTarget !== null) { - values[key] = valueTarget; - } - } - for (const key in transitionEnd) { - values[key] = transitionEnd[key]; - } - } - } - } - return values; -} -const makeUseVisualState = (config) => (props, isStatic) => { - const context = React.useContext(MotionContext); - const presenceContext = React.useContext(PresenceContext); - const make = () => makeState(config, props, context, presenceContext); - return isStatic ? make() : useConstant(make); -}; - -const useHTMLVisualState = /*@__PURE__*/ makeUseVisualState({ - scrapeMotionValuesFromProps: motionDom.scrapeHTMLMotionValuesFromProps, - createRenderState: createHtmlRenderState, -}); - -const useSVGVisualState = /*@__PURE__*/ makeUseVisualState({ - scrapeMotionValuesFromProps: motionDom.scrapeSVGMotionValuesFromProps, - createRenderState: createSvgRenderState, -}); - -const motionComponentSymbol = Symbol.for("motionComponentSymbol"); - -/** - * Creates a ref function that, when called, hydrates the provided - * external ref and VisualElement. - */ -function useMotionRef(visualState, visualElement, externalRef) { - /** - * Store externalRef in a ref to avoid including it in the useCallback - * dependency array. Including externalRef in dependencies causes issues - * with libraries like Radix UI that create new callback refs on each render - * when using asChild - this would cause the callback to be recreated, - * triggering element remounts and breaking AnimatePresence exit animations. - */ - const externalRefContainer = React.useRef(externalRef); - React.useInsertionEffect(() => { - externalRefContainer.current = externalRef; - }); - // Store cleanup function returned by callback refs (React 19 feature) - const refCleanup = React.useRef(null); - return React.useCallback((instance) => { - if (instance) { - visualState.onMount?.(instance); - } - if (visualElement) { - instance ? visualElement.mount(instance) : visualElement.unmount(); - } - const ref = externalRefContainer.current; - if (typeof ref === "function") { - if (instance) { - const cleanup = ref(instance); - if (typeof cleanup === "function") { - refCleanup.current = cleanup; - } - } - else if (refCleanup.current) { - refCleanup.current(); - refCleanup.current = null; - } - else { - ref(instance); - } - } - else if (ref) { - ref.current = instance; - } - }, [visualElement]); -} - -/** - * Internal, exported only for usage in Framer - */ -const SwitchLayoutGroupContext = React.createContext({}); - -function isRefObject(ref) { - return (ref && - typeof ref === "object" && - Object.prototype.hasOwnProperty.call(ref, "current")); -} - -function useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor, isSVG) { - const { visualElement: parent } = React.useContext(MotionContext); - const lazyContext = React.useContext(LazyContext); - const presenceContext = React.useContext(PresenceContext); - const motionConfig = React.useContext(MotionConfigContext); - const reducedMotionConfig = motionConfig.reducedMotion; - const skipAnimations = motionConfig.skipAnimations; - const visualElementRef = React.useRef(null); - /** - * Track whether the component has been through React's commit phase. - * Used to detect when LazyMotion features load after the component has mounted. - */ - const hasMountedOnce = React.useRef(false); - /** - * If we haven't preloaded a renderer, check to see if we have one lazy-loaded - */ - createVisualElement = - createVisualElement || - lazyContext.renderer; - if (!visualElementRef.current && createVisualElement) { - visualElementRef.current = createVisualElement(Component, { - visualState, - parent, - props, - presenceContext, - blockInitialAnimation: presenceContext - ? presenceContext.initial === false - : false, - reducedMotionConfig, - skipAnimations, - isSVG, - }); - /** - * If the component has already mounted before features loaded (e.g. via - * LazyMotion with async feature loading), we need to force the initial - * animation to run. Otherwise state changes that occurred before features - * loaded will be lost and the element will snap to its final state. - */ - if (hasMountedOnce.current && visualElementRef.current) { - visualElementRef.current.manuallyAnimateOnMount = true; - } - } - const visualElement = visualElementRef.current; - /** - * Load Motion gesture and animation features. These are rendered as renderless - * components so each feature can optionally make use of React lifecycle methods. - */ - const initialLayoutGroupConfig = React.useContext(SwitchLayoutGroupContext); - if (visualElement && - !visualElement.projection && - ProjectionNodeConstructor && - (visualElement.type === "html" || visualElement.type === "svg")) { - createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig); - } - const isMounted = React.useRef(false); - React.useInsertionEffect(() => { - /** - * Check the component has already mounted before calling - * `update` unnecessarily. This ensures we skip the initial update. - */ - if (visualElement && isMounted.current) { - visualElement.update(props, presenceContext); - } - }); - /** - * Cache this value as we want to know whether HandoffAppearAnimations - * was present on initial render - it will be deleted after this. - */ - const optimisedAppearId = props[motionDom.optimizedAppearDataAttribute]; - const wantsHandoff = React.useRef(Boolean(optimisedAppearId) && - typeof window !== "undefined" && - !window.MotionHandoffIsComplete?.(optimisedAppearId) && - window.MotionHasOptimisedAnimation?.(optimisedAppearId)); - useIsomorphicLayoutEffect(() => { - /** - * Track that this component has mounted. This is used to detect when - * LazyMotion features load after the component has already committed. - */ - hasMountedOnce.current = true; - if (!visualElement) - return; - isMounted.current = true; - window.MotionIsMounted = true; - visualElement.updateFeatures(); - visualElement.scheduleRenderMicrotask(); - /** - * Ideally this function would always run in a useEffect. - * - * However, if we have optimised appear animations to handoff from, - * it needs to happen synchronously to ensure there's no flash of - * incorrect styles in the event of a hydration error. - * - * So if we detect a situtation where optimised appear animations - * are running, we use useLayoutEffect to trigger animations. - */ - if (wantsHandoff.current && visualElement.animationState) { - visualElement.animationState.animateChanges(); - } - }); - React.useEffect(() => { - if (!visualElement) - return; - if (!wantsHandoff.current && visualElement.animationState) { - visualElement.animationState.animateChanges(); - } - if (wantsHandoff.current) { - // This ensures all future calls to animateChanges() in this component will run in useEffect - queueMicrotask(() => { - window.MotionHandoffMarkAsComplete?.(optimisedAppearId); - }); - wantsHandoff.current = false; - } - /** - * Now we've finished triggering animations for this element we - * can wipe the enteringChildren set for the next render. - */ - visualElement.enteringChildren = undefined; - }); - return visualElement; -} -function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) { - const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutAnchor, layoutCrossfade, } = props; - visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"] - ? undefined - : getClosestProjectingNode(visualElement.parent)); - visualElement.projection.setOptions({ - layoutId, - layout, - alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)), - visualElement, - /** - * TODO: Update options in an effect. This could be tricky as it'll be too late - * to update by the time layout animations run. - * We also need to fix this safeToRemove by linking it up to the one returned by usePresence, - * ensuring it gets called if there's no potential layout animations. - * - */ - animationType: typeof layout === "string" ? layout : "both", - initialPromotionConfig, - crossfade: layoutCrossfade, - layoutScroll, - layoutRoot, - layoutAnchor, - }); -} -function getClosestProjectingNode(visualElement) { - if (!visualElement) - return undefined; - return visualElement.options.allowProjection !== false - ? visualElement.projection - : getClosestProjectingNode(visualElement.parent); -} - -/** - * Create a `motion` component. - * - * This function accepts a Component argument, which can be either a string (ie "div" - * for `motion.div`), or an actual React component. - * - * Alongside this is a config option which provides a way of rendering the provided - * component "offline", or outside the React render cycle. - */ -function createMotionComponent(Component, { forwardMotionProps = false, type } = {}, preloadedFeatures, createVisualElement) { - preloadedFeatures && loadFeatures(preloadedFeatures); - /** - * Determine whether to use SVG or HTML rendering based on: - * 1. Explicit `type` option (highest priority) - * 2. Auto-detection via `isSVGComponent` - */ - const isSVG = type ? type === "svg" : isSVGComponent(Component); - const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState; - function MotionDOMComponent(props, externalRef) { - /** - * If we need to measure the element we load this functionality in a - * separate class component in order to gain access to getSnapshotBeforeUpdate. - */ - let MeasureLayout; - const configAndProps = { - ...React.useContext(MotionConfigContext), - ...props, - layoutId: useLayoutId(props), - }; - const { isStatic } = configAndProps; - const context = useCreateMotionContext(props); - const visualState = useVisualState(props, isStatic); - if (!isStatic && typeof window !== "undefined") { - useStrictMode(configAndProps, preloadedFeatures); - const layoutProjection = getProjectionFunctionality(configAndProps); - MeasureLayout = layoutProjection.MeasureLayout; - /** - * Create a VisualElement for this component. A VisualElement provides a common - * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as - * providing a way of rendering to these APIs outside of the React render loop - * for more performant animations and interactions - */ - context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode, isSVG); - } - /** - * The mount order and hierarchy is specific to ensure our element ref - * is hydrated by the time features fire their effects. - */ - return (jsxRuntime.jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsxRuntime.jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, forwardMotionProps, isSVG)] })); - } - MotionDOMComponent.displayName = `motion.${typeof Component === "string" - ? Component - : `create(${Component.displayName ?? Component.name ?? ""})`}`; - const ForwardRefMotionComponent = React.forwardRef(MotionDOMComponent); - ForwardRefMotionComponent[motionComponentSymbol] = Component; - return ForwardRefMotionComponent; -} -function useLayoutId({ layoutId }) { - const layoutGroupId = React.useContext(LayoutGroupContext).id; - return layoutGroupId && layoutId !== undefined - ? layoutGroupId + "-" + layoutId - : layoutId; -} -function useStrictMode(configAndProps, preloadedFeatures) { - const isStrict = React.useContext(LazyContext).strict; - /** - * If we're in development mode, check to make sure we're not rendering a motion component - * as a child of LazyMotion, as this will break the file-size benefits of using it. - */ - if (process.env.NODE_ENV !== "production" && - preloadedFeatures && - isStrict) { - const strictMessage = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead."; - configAndProps.ignoreStrict - ? motionUtils.warning(false, strictMessage, "lazy-strict-mode") - : motionUtils.invariant(false, strictMessage, "lazy-strict-mode"); - } -} -function getProjectionFunctionality(props) { - const featureDefinitions = getInitializedFeatureDefinitions(); - const { drag, layout } = featureDefinitions; - if (!drag && !layout) - return {}; - const combined = { ...drag, ...layout }; - return { - MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props) - ? combined.MeasureLayout - : undefined, - ProjectionNode: combined.ProjectionNode, - }; -} - -exports.LayoutGroupContext = LayoutGroupContext; -exports.LazyContext = LazyContext; -exports.MotionConfigContext = MotionConfigContext; -exports.MotionContext = MotionContext; -exports.PresenceContext = PresenceContext; -exports.SwitchLayoutGroupContext = SwitchLayoutGroupContext; -exports.createMotionComponent = createMotionComponent; -exports.filterProps = filterProps; -exports.isBrowser = isBrowser; -exports.isRefObject = isRefObject; -exports.isSVGComponent = isSVGComponent; -exports.isValidMotionProp = isValidMotionProp; -exports.loadExternalIsValidProp = loadExternalIsValidProp; -exports.loadFeatures = loadFeatures; -exports.makeUseVisualState = makeUseVisualState; -exports.motionComponentSymbol = motionComponentSymbol; -exports.useConstant = useConstant; -exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect; -//# sourceMappingURL=index-6W16WHlG.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index-6W16WHlG.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index-6W16WHlG.js.map deleted file mode 100644 index 8d464988..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index-6W16WHlG.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-6W16WHlG.js","sources":["../../src/context/LayoutGroupContext.ts","../../src/utils/use-constant.ts","../../src/utils/is-browser.ts","../../src/utils/use-isomorphic-effect.ts","../../src/context/PresenceContext.ts","../../src/context/MotionConfigContext.tsx","../../src/context/LazyContext.ts","../../src/motion/features/definitions.ts","../../src/motion/features/load-features.ts","../../src/motion/utils/valid-prop.ts","../../src/render/dom/utils/filter-props.ts","../../src/render/svg/lowercase-elements.ts","../../src/render/dom/utils/is-svg-component.ts","../../src/context/MotionContext/index.ts","../../src/context/MotionContext/utils.ts","../../src/context/MotionContext/create.ts","../../src/render/html/utils/create-render-state.ts","../../src/render/html/use-props.ts","../../src/render/svg/utils/create-render-state.ts","../../src/render/svg/use-props.ts","../../src/render/dom/use-render.ts","../../src/motion/utils/use-visual-state.ts","../../src/render/html/use-html-visual-state.ts","../../src/render/svg/use-svg-visual-state.ts","../../src/motion/utils/symbol.ts","../../src/motion/utils/use-motion-ref.ts","../../src/context/SwitchLayoutGroupContext.ts","../../src/utils/is-ref-object.ts","../../src/motion/utils/use-visual-element.ts","../../src/motion/index.tsx"],"sourcesContent":["\"use client\"\n\nimport { createContext } from \"react\"\nimport type { NodeGroup } from \"motion-dom\"\n\nexport interface LayoutGroupContextProps {\n id?: string\n group?: NodeGroup\n forceRender?: VoidFunction\n}\n\nexport const LayoutGroupContext = createContext({})\n","\"use client\"\n\nimport { useRef } from \"react\"\n\ntype Init = () => T\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nexport function useConstant(init: Init) {\n const ref = useRef(null)\n\n if (ref.current === null) {\n ref.current = init()\n }\n\n return ref.current\n}\n","export const isBrowser = typeof window !== \"undefined\"\n","\"use client\"\n\nimport { useEffect, useLayoutEffect } from \"react\"\nimport { isBrowser } from \"./is-browser\"\n\nexport const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect\n","\"use client\"\n\nimport { createContext } from \"react\"\nimport type { PresenceContextProps } from \"motion-dom\"\n\nexport type { PresenceContextProps }\n\n/**\n * @public\n */\nexport const PresenceContext =\n /* @__PURE__ */ createContext(null)\n","\"use client\"\n\nimport type { Transition } from \"motion-dom\"\nimport { TransformPoint } from \"motion-utils\"\nimport { createContext } from \"react\"\n\nexport type ReducedMotionConfig = \"always\" | \"never\" | \"user\"\n\n/**\n * @public\n */\nexport interface MotionConfigContext {\n /**\n * Internal, exported only for usage in Framer\n */\n transformPagePoint: TransformPoint\n\n /**\n * Internal. Determines whether this is a static context ie the Framer canvas. If so,\n * it'll disable all dynamic functionality.\n */\n isStatic: boolean\n\n /**\n * Defines a new default transition for the entire tree.\n *\n * @public\n */\n transition?: Transition\n\n /**\n * If true, will respect the device prefersReducedMotion setting by switching\n * transform animations off.\n *\n * @public\n */\n reducedMotion?: ReducedMotionConfig\n\n /**\n * A custom `nonce` attribute used when wanting to enforce a Content Security Policy (CSP).\n * For more details see:\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles\n *\n * @public\n */\n nonce?: string\n\n /**\n * If true, all animations will be skipped and values will be set instantly.\n * Useful for E2E tests and visual regression testing.\n *\n * @public\n */\n skipAnimations?: boolean\n\n}\n\n/**\n * @public\n */\nexport const MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n})\n","\"use client\"\n\nimport { createContext } from \"react\"\nimport { CreateVisualElement } from \"../render/types\"\n\nexport interface LazyContextProps {\n renderer?: CreateVisualElement\n strict: boolean\n}\n\nexport const LazyContext = createContext({ strict: false })\n","import { getFeatureDefinitions, setFeatureDefinitions } from \"motion-dom\"\nimport { MotionProps } from \"../types\"\nimport { FeatureDefinitions } from \"./types\"\n\nconst featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n}\n\nlet isInitialized = false\n\n/**\n * Initialize feature definitions with isEnabled checks.\n * This must be called before any motion components are rendered.\n */\nexport function initFeatureDefinitions() {\n if (isInitialized) return\n\n const initialFeatureDefinitions: Partial = {}\n\n for (const key in featureProps) {\n initialFeatureDefinitions[\n key as keyof typeof initialFeatureDefinitions\n ] = {\n isEnabled: (props: MotionProps) =>\n featureProps[key as keyof typeof featureProps].some(\n (name: string) => !!props[name as keyof typeof props]\n ),\n }\n }\n\n setFeatureDefinitions(initialFeatureDefinitions)\n isInitialized = true\n}\n\n/**\n * Get the current feature definitions, initializing if needed.\n */\nexport function getInitializedFeatureDefinitions(): Partial {\n initFeatureDefinitions()\n return getFeatureDefinitions()\n}\n","import { setFeatureDefinitions } from \"motion-dom\"\nimport { getInitializedFeatureDefinitions } from \"./definitions\"\nimport { FeaturePackages } from \"./types\"\n\nexport function loadFeatures(features: FeaturePackages) {\n const featureDefinitions = getInitializedFeatureDefinitions()\n\n for (const key in features) {\n featureDefinitions[key as keyof typeof featureDefinitions] = {\n ...featureDefinitions[key as keyof typeof featureDefinitions],\n ...features[key as keyof typeof features],\n } as any\n }\n\n setFeatureDefinitions(featureDefinitions)\n}\n","import { MotionProps } from \"../types\"\n\n/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"custom\",\n \"inherit\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"globalTapTarget\",\n \"propagate\",\n \"ignoreStrict\",\n \"viewport\",\n])\n\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nexport function isValidMotionProp(key: string) {\n return (\n key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n key.startsWith(\"onLayout\") ||\n validMotionProps.has(key as keyof MotionProps)\n )\n}\n","import { isMotionValue } from \"motion-dom\"\nimport type { MotionProps } from \"../../../motion/types\"\nimport { isValidMotionProp } from \"../../../motion/utils/valid-prop\"\n\nlet shouldForward = (key: string) => !isValidMotionProp(key)\n\nexport type IsValidProp = (key: string) => boolean\n\nexport function loadExternalIsValidProp(isValidProp?: IsValidProp) {\n if (typeof isValidProp !== \"function\") return\n\n // Explicitly filter our events\n shouldForward = (key: string) =>\n key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key)\n}\n\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n *\n * String concatenation prevents bundlers like webpack (e.g. Storybook)\n * from statically resolving this optional dependency at build time.\n */\n const emotionPkg = \"@emotion/is-prop-\" + \"valid\"\n loadExternalIsValidProp(require(emotionPkg).default)\n} catch {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\n\nexport function filterProps(\n props: MotionProps,\n isDom: boolean,\n forwardMotionProps: boolean\n) {\n const filteredProps: MotionProps = {}\n\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\") continue\n\n if (isMotionValue(props[key as keyof typeof props])) continue\n\n if (\n shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\" as keyof MotionProps] &&\n key.startsWith(\"onDrag\"))\n ) {\n filteredProps[key as keyof MotionProps] =\n props[key as keyof MotionProps]\n }\n }\n\n return filteredProps\n}\n","/**\n * We keep these listed separately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nexport const lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n]\n","import * as React from \"react\"\nimport { lowercaseSVGElements } from \"../../svg/lowercase-elements\"\n\nexport function isSVGComponent(Component: string | React.ComponentType) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")\n ) {\n return false\n } else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/u.test(Component)\n ) {\n return true\n }\n\n return false\n}\n","\"use client\"\n\nimport type { VisualElement } from \"motion-dom\"\nimport { createContext } from \"react\"\n\nexport interface MotionContextProps {\n visualElement?: VisualElement\n initial?: false | string | string[]\n animate?: string | string[]\n}\n\nexport const MotionContext = /* @__PURE__ */ createContext(\n {}\n)\n","import { isControllingVariants, isVariantLabel } from \"motion-dom\"\nimport type { MotionContextProps } from \".\"\nimport { MotionProps } from \"../../motion/types\"\n\nexport function getCurrentTreeVariants(\n props: MotionProps,\n context: MotionContextProps\n): MotionContextProps {\n if (isControllingVariants(props)) {\n const { initial, animate } = props\n return {\n initial:\n initial === false || isVariantLabel(initial)\n ? (initial as any)\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n }\n }\n return props.inherit !== false ? context : {}\n}\n","\"use client\"\n\nimport { useContext, useMemo } from \"react\"\nimport { MotionContext, type MotionContextProps } from \".\"\nimport { MotionProps } from \"../../motion/types\"\nimport { getCurrentTreeVariants } from \"./utils\"\n\nexport function useCreateMotionContext(\n props: MotionProps\n): MotionContextProps {\n const { initial, animate } = getCurrentTreeVariants(\n props,\n useContext(MotionContext)\n )\n\n return useMemo(\n () => ({ initial, animate }),\n [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]\n )\n}\n\nfunction variantLabelsAsDependency(\n prop: undefined | string | string[] | boolean\n) {\n return Array.isArray(prop) ? prop.join(\" \") : prop\n}\n","import { HTMLRenderState } from \"../types\"\n\nexport const createHtmlRenderState = (): HTMLRenderState => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {},\n})\n","\"use client\"\n\nimport { AnyResolvedKeyframe, buildHTMLStyles, isForcedMotionValue, isMotionValue, MotionValue } from \"motion-dom\"\nimport { HTMLProps, useMemo } from \"react\"\nimport { MotionProps } from \"../../motion/types\"\nimport { ResolvedValues } from \"../types\"\nimport { createHtmlRenderState } from \"./utils/create-render-state\"\n\nexport function copyRawValuesOnly(\n target: ResolvedValues,\n source: { [key: string]: AnyResolvedKeyframe | MotionValue },\n props: MotionProps\n) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key] as AnyResolvedKeyframe\n }\n }\n}\n\nfunction useInitialMotionValues(\n { transformTemplate }: MotionProps,\n visualState: ResolvedValues\n) {\n return useMemo(() => {\n const state = createHtmlRenderState()\n\n buildHTMLStyles(state, visualState, transformTemplate)\n\n return Object.assign({}, state.vars, state.style)\n }, [visualState])\n}\n\nfunction useStyle(\n props: MotionProps,\n visualState: ResolvedValues\n): ResolvedValues {\n const styleProp = props.style || {}\n const style = {}\n\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp as any, props)\n\n Object.assign(style, useInitialMotionValues(props, visualState))\n\n return style\n}\n\nexport function useHTMLProps(\n props: MotionProps & HTMLProps,\n visualState: ResolvedValues\n) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps: any = {}\n const style = useStyle(props, visualState)\n\n if (props.drag && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false\n\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\"\n\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`\n }\n\n if (\n props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)\n ) {\n htmlProps.tabIndex = 0\n }\n\n htmlProps.style = style\n\n return htmlProps\n}\n","import { createHtmlRenderState } from \"../../html/utils/create-render-state\"\nimport { SVGRenderState } from \"../types\"\n\nexport const createSvgRenderState = (): SVGRenderState => ({\n ...createHtmlRenderState(),\n attrs: {},\n})\n","\"use client\"\n\nimport { buildSVGAttrs, isSVGTag } from \"motion-dom\"\nimport { useMemo } from \"react\"\nimport { MotionProps } from \"../../motion/types\"\nimport { copyRawValuesOnly } from \"../html/use-props\"\nimport { ResolvedValues } from \"../types\"\nimport { createSvgRenderState } from \"./utils/create-render-state\"\n\nexport function useSVGProps(\n props: MotionProps,\n visualState: ResolvedValues,\n _isStatic: boolean,\n Component: string | React.ComponentType>\n) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState()\n\n buildSVGAttrs(\n state,\n visualState,\n isSVGTag(Component),\n props.transformTemplate,\n props.style\n )\n\n return {\n ...state.attrs,\n style: { ...state.style },\n }\n }, [visualState])\n\n if (props.style) {\n const rawStyles = {}\n copyRawValuesOnly(rawStyles, props.style as any, props)\n visualProps.style = { ...rawStyles, ...visualProps.style }\n }\n\n return visualProps\n}\n","\"use client\"\n\nimport { isMotionValue } from \"motion-dom\"\nimport { Fragment, createElement, useMemo } from \"react\"\nimport { MotionProps } from \"../../motion/types\"\nimport { VisualState } from \"../../motion/utils/use-visual-state\"\nimport { HTMLRenderState } from \"../html/types\"\nimport { useHTMLProps } from \"../html/use-props\"\nimport { SVGRenderState } from \"../svg/types\"\nimport { useSVGProps } from \"../svg/use-props\"\nimport { DOMMotionComponents } from \"./types\"\nimport { filterProps } from \"./utils/filter-props\"\nimport { isSVGComponent } from \"./utils/is-svg-component\"\n\nexport function useRender<\n Props = {},\n TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n Component: TagName | string | React.ComponentType,\n props: MotionProps,\n ref: React.Ref,\n {\n latestValues,\n }: VisualState,\n isStatic: boolean,\n forwardMotionProps: boolean = false,\n isSVG?: boolean\n) {\n const useVisualProps =\n (isSVG ?? isSVGComponent(Component)) ? useSVGProps : useHTMLProps\n\n const visualProps = useVisualProps(\n props as any,\n latestValues,\n isStatic,\n Component as any\n )\n const filteredProps = filterProps(\n props,\n typeof Component === \"string\",\n forwardMotionProps\n )\n const elementProps =\n Component !== Fragment ? { ...filteredProps, ...visualProps, ref } : {}\n\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props\n const renderedChildren = useMemo(\n () => (isMotionValue(children) ? children.get() : children),\n [children]\n )\n\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n })\n}\n","\"use client\"\n\nimport {\n AnyResolvedKeyframe,\n isAnimationControls,\n isControllingVariants as checkIsControllingVariants,\n isVariantNode as checkIsVariantNode,\n ResolvedValues,\n resolveVariantFromProps,\n} from \"motion-dom\"\nimport { useContext } from \"react\"\nimport { MotionContext, MotionContextProps } from \"../../context/MotionContext\"\nimport {\n PresenceContext,\n type PresenceContextProps,\n} from \"../../context/PresenceContext\"\nimport { ScrapeMotionValuesFromProps } from \"../../render/types\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { resolveMotionValue } from \"motion-dom\"\nimport { MotionProps } from \"../types\"\n\nexport interface VisualState {\n renderState: RenderState\n latestValues: ResolvedValues\n onMount?: (instance: Instance) => void\n}\n\nexport type UseVisualState = (\n props: MotionProps,\n isStatic: boolean\n) => VisualState\n\nexport interface UseVisualStateConfig {\n scrapeMotionValuesFromProps: ScrapeMotionValuesFromProps\n createRenderState: () => RenderState\n}\n\nfunction makeState(\n {\n scrapeMotionValuesFromProps,\n createRenderState,\n }: UseVisualStateConfig,\n props: MotionProps,\n context: MotionContextProps,\n presenceContext: PresenceContextProps | null\n) {\n const state: VisualState = {\n latestValues: makeLatestValues(\n props,\n context,\n presenceContext,\n scrapeMotionValuesFromProps\n ),\n renderState: createRenderState(),\n }\n\n return state\n}\n\nfunction makeLatestValues(\n props: MotionProps,\n context: MotionContextProps,\n presenceContext: PresenceContextProps | null,\n scrapeMotionValues: ScrapeMotionValuesFromProps\n) {\n const values: ResolvedValues = {}\n\n const motionValues = scrapeMotionValues(props, {})\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key])\n }\n\n let { initial, animate } = props\n const isControllingVariants = checkIsControllingVariants(props)\n const isVariantNode = checkIsVariantNode(props)\n\n if (\n context &&\n isVariantNode &&\n !isControllingVariants &&\n props.inherit !== false\n ) {\n if (initial === undefined) initial = context.initial\n if (animate === undefined) animate = context.animate\n }\n\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false\n\n const variantToSet = isInitialAnimationBlocked ? animate : initial\n\n if (\n variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)\n ) {\n const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet]\n for (let i = 0; i < list.length; i++) {\n const resolved = resolveVariantFromProps(props, list[i] as any)\n if (resolved) {\n const { transitionEnd, transition, ...target } = resolved\n for (const key in target) {\n let valueTarget = target[key as keyof typeof target]\n\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0\n valueTarget = valueTarget[index] as any\n }\n\n if (valueTarget !== null) {\n values[key] = valueTarget as AnyResolvedKeyframe\n }\n }\n for (const key in transitionEnd) {\n values[key] = transitionEnd[\n key as keyof typeof transitionEnd\n ] as AnyResolvedKeyframe\n }\n }\n }\n }\n\n return values\n}\n\nexport const makeUseVisualState =\n (config: UseVisualStateConfig): UseVisualState =>\n (props: MotionProps, isStatic: boolean): VisualState => {\n const context = useContext(MotionContext)\n const presenceContext = useContext(PresenceContext)\n const make = () => makeState(config, props, context, presenceContext)\n\n return isStatic ? make() : useConstant(make)\n }\n","\"use client\"\n\nimport { scrapeHTMLMotionValuesFromProps } from \"motion-dom\"\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\"\nimport { createHtmlRenderState } from \"./utils/create-render-state\"\n\nexport const useHTMLVisualState = /*@__PURE__*/ makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeHTMLMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n})\n","\"use client\"\n\nimport { scrapeSVGMotionValuesFromProps } from \"motion-dom\"\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\"\nimport { createSvgRenderState } from \"./utils/create-render-state\"\n\nexport const useSVGVisualState = /*@__PURE__*/ makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeSVGMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n})\n","export const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\")\n","\"use client\"\n\nimport type { VisualElement } from \"motion-dom\"\nimport * as React from \"react\"\nimport { useCallback, useInsertionEffect, useRef } from \"react\"\nimport { VisualState } from \"./use-visual-state\"\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nexport function useMotionRef(\n visualState: VisualState,\n visualElement?: VisualElement | null,\n externalRef?: React.Ref\n): React.Ref {\n /**\n * Store externalRef in a ref to avoid including it in the useCallback\n * dependency array. Including externalRef in dependencies causes issues\n * with libraries like Radix UI that create new callback refs on each render\n * when using asChild - this would cause the callback to be recreated,\n * triggering element remounts and breaking AnimatePresence exit animations.\n */\n const externalRefContainer = useRef(externalRef)\n useInsertionEffect(() => {\n externalRefContainer.current = externalRef\n })\n\n // Store cleanup function returned by callback refs (React 19 feature)\n const refCleanup = useRef<(() => void) | null>(null)\n\n return useCallback(\n (instance: Instance) => {\n if (instance) {\n visualState.onMount?.(instance)\n }\n\n if (visualElement) {\n instance ? visualElement.mount(instance) : visualElement.unmount()\n }\n\n const ref = externalRefContainer.current\n if (typeof ref === \"function\") {\n if (instance) {\n const cleanup = ref(instance)\n if (typeof cleanup === \"function\") {\n refCleanup.current = cleanup\n }\n } else if (refCleanup.current) {\n refCleanup.current()\n refCleanup.current = null\n } else {\n ref(instance)\n }\n } else if (ref) {\n ;(ref as React.MutableRefObject).current = instance\n }\n },\n [visualElement]\n )\n}\n","\"use client\"\n\nimport type { Transition, IProjectionNode } from \"motion-dom\"\nimport { createContext } from \"react\"\n\nexport interface SwitchLayoutGroup {\n register?: (member: IProjectionNode) => void\n deregister?: (member: IProjectionNode) => void\n}\n\nexport type SwitchLayoutGroupContext = SwitchLayoutGroup &\n InitialPromotionConfig\n\nexport type InitialPromotionConfig = {\n /**\n * The initial transition to use when the elements in this group mount (and automatically promoted).\n * Subsequent updates should provide a transition in the promote method.\n */\n transition?: Transition\n /**\n * If the follow tree should preserve its opacity when the lead is promoted on mount\n */\n shouldPreserveFollowOpacity?: (member: IProjectionNode) => boolean\n}\n\n/**\n * Internal, exported only for usage in Framer\n */\nexport const SwitchLayoutGroupContext = createContext(\n {}\n)\n","import { MutableRefObject } from \"./safe-react-types\"\n\nexport function isRefObject(ref: any): ref is MutableRefObject {\n return (\n ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\")\n )\n}\n","\"use client\"\n\nimport {\n optimizedAppearDataAttribute,\n type HTMLRenderState,\n type SVGRenderState,\n type VisualElement,\n} from \"motion-dom\"\nimport * as React from \"react\"\nimport { useContext, useEffect, useInsertionEffect, useRef } from \"react\"\nimport { LazyContext } from \"../../context/LazyContext\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { MotionContext } from \"../../context/MotionContext\"\nimport { PresenceContext } from \"../../context/PresenceContext\"\nimport {\n InitialPromotionConfig,\n SwitchLayoutGroupContext,\n} from \"../../context/SwitchLayoutGroupContext\"\nimport { MotionProps } from \"../../motion/types\"\nimport type { IProjectionNode } from \"motion-dom\"\nimport { DOMMotionComponents } from \"../../render/dom/types\"\nimport { CreateVisualElement } from \"../../render/types\"\nimport { isRefObject } from \"../../utils/is-ref-object\"\nimport { useIsomorphicLayoutEffect } from \"../../utils/use-isomorphic-effect\"\nimport { VisualState } from \"./use-visual-state\"\n\nexport function useVisualElement<\n Props,\n TagName extends keyof DOMMotionComponents | string\n>(\n Component: TagName | string | React.ComponentType,\n visualState:\n | VisualState\n | VisualState,\n props: MotionProps & Partial,\n createVisualElement?: CreateVisualElement,\n ProjectionNodeConstructor?: any,\n isSVG?: boolean\n): VisualElement | undefined {\n const { visualElement: parent } = useContext(MotionContext)\n const lazyContext = useContext(LazyContext)\n const presenceContext = useContext(PresenceContext)\n const motionConfig = useContext(MotionConfigContext)\n const reducedMotionConfig = motionConfig.reducedMotion\n const skipAnimations = motionConfig.skipAnimations\n\n const visualElementRef = useRef | null>(null)\n\n /**\n * Track whether the component has been through React's commit phase.\n * Used to detect when LazyMotion features load after the component has mounted.\n */\n const hasMountedOnce = useRef(false)\n\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement =\n createVisualElement ||\n (lazyContext.renderer as CreateVisualElement)\n\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n skipAnimations,\n isSVG,\n })\n\n /**\n * If the component has already mounted before features loaded (e.g. via\n * LazyMotion with async feature loading), we need to force the initial\n * animation to run. Otherwise state changes that occurred before features\n * loaded will be lost and the element will snap to its final state.\n */\n if (hasMountedOnce.current && visualElementRef.current) {\n visualElementRef.current.manuallyAnimateOnMount = true\n }\n }\n\n const visualElement = visualElementRef.current\n\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext)\n\n if (\n visualElement &&\n !visualElement.projection &&\n ProjectionNodeConstructor &&\n (visualElement.type === \"html\" || visualElement.type === \"svg\")\n ) {\n createProjectionNode(\n visualElementRef.current!,\n props,\n ProjectionNodeConstructor,\n initialLayoutGroupConfig\n )\n }\n\n const isMounted = useRef(false)\n useInsertionEffect(() => {\n /**\n * Check the component has already mounted before calling\n * `update` unnecessarily. This ensures we skip the initial update.\n */\n if (visualElement && isMounted.current) {\n visualElement.update(props, presenceContext)\n }\n })\n\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const optimisedAppearId =\n props[optimizedAppearDataAttribute as keyof typeof props]\n const wantsHandoff = useRef(\n Boolean(optimisedAppearId) &&\n typeof window !== \"undefined\" &&\n !window.MotionHandoffIsComplete?.(optimisedAppearId) &&\n window.MotionHasOptimisedAnimation?.(optimisedAppearId)\n )\n\n useIsomorphicLayoutEffect(() => {\n /**\n * Track that this component has mounted. This is used to detect when\n * LazyMotion features load after the component has already committed.\n */\n hasMountedOnce.current = true\n\n if (!visualElement) return\n\n isMounted.current = true\n window.MotionIsMounted = true\n\n visualElement.updateFeatures()\n visualElement.scheduleRenderMicrotask()\n\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges()\n }\n })\n\n useEffect(() => {\n if (!visualElement) return\n\n if (!wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges()\n }\n\n if (wantsHandoff.current) {\n // This ensures all future calls to animateChanges() in this component will run in useEffect\n queueMicrotask(() => {\n window.MotionHandoffMarkAsComplete?.(optimisedAppearId)\n })\n\n wantsHandoff.current = false\n }\n\n /**\n * Now we've finished triggering animations for this element we\n * can wipe the enteringChildren set for the next render.\n */\n visualElement.enteringChildren = undefined\n })\n\n return visualElement!\n}\n\nfunction createProjectionNode(\n visualElement: VisualElement,\n props: MotionProps,\n ProjectionNodeConstructor: any,\n initialPromotionConfig?: InitialPromotionConfig\n) {\n const {\n layoutId,\n layout,\n drag,\n dragConstraints,\n layoutScroll,\n layoutRoot,\n layoutAnchor,\n layoutCrossfade,\n } = props\n\n visualElement.projection = new ProjectionNodeConstructor(\n visualElement.latestValues,\n props[\"data-framer-portal-id\"]\n ? undefined\n : getClosestProjectingNode(visualElement.parent)\n ) as IProjectionNode\n\n visualElement.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout:\n Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement,\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig,\n crossfade: layoutCrossfade,\n layoutScroll,\n layoutRoot,\n layoutAnchor,\n })\n}\n\nfunction getClosestProjectingNode(\n visualElement?: VisualElement<\n unknown,\n unknown,\n { allowProjection?: boolean }\n >\n): IProjectionNode | undefined {\n if (!visualElement) return undefined\n\n return visualElement.options.allowProjection !== false\n ? visualElement.projection\n : getClosestProjectingNode(visualElement.parent)\n}\n","\"use client\"\n\nimport { invariant, warning } from \"motion-utils\"\nimport * as React from \"react\"\nimport { forwardRef, useContext } from \"react\"\nimport { LayoutGroupContext } from \"../context/LayoutGroupContext\"\nimport { LazyContext } from \"../context/LazyContext\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\nimport { MotionContext } from \"../context/MotionContext\"\nimport { useCreateMotionContext } from \"../context/MotionContext/create\"\nimport { DOMMotionComponents } from \"../render/dom/types\"\nimport { useRender } from \"../render/dom/use-render\"\nimport { isSVGComponent } from \"../render/dom/utils/is-svg-component\"\nimport { HTMLRenderState } from \"../render/html/types\"\nimport { useHTMLVisualState } from \"../render/html/use-html-visual-state\"\nimport { SVGRenderState } from \"../render/svg/types\"\nimport { useSVGVisualState } from \"../render/svg/use-svg-visual-state\"\nimport { CreateVisualElement } from \"../render/types\"\nimport { getInitializedFeatureDefinitions } from \"./features/definitions\"\nimport { loadFeatures } from \"./features/load-features\"\nimport { FeatureBundle, FeaturePackages } from \"./features/types\"\nimport { MotionProps } from \"./types\"\nimport { motionComponentSymbol } from \"./utils/symbol\"\nimport { useMotionRef } from \"./utils/use-motion-ref\"\nimport { useVisualElement } from \"./utils/use-visual-element\"\n\nexport interface MotionComponentConfig<\n TagName extends keyof DOMMotionComponents | string = \"div\"\n> {\n preloadedFeatures?: FeatureBundle\n createVisualElement?: CreateVisualElement\n Component: TagName | React.ComponentType>\n forwardMotionProps?: boolean\n}\n\nexport type MotionComponentProps = {\n [K in Exclude]?: Props[K]\n} & MotionProps\n\nexport type MotionComponent = T extends keyof DOMMotionComponents\n ? DOMMotionComponents[T]\n : React.ComponentType<\n Omit, \"children\"> & {\n children?: \"children\" extends keyof P\n ? P[\"children\"] | MotionComponentProps

[\"children\"]\n : MotionComponentProps

[\"children\"]\n }\n >\n\nexport interface MotionComponentOptions {\n forwardMotionProps?: boolean\n /**\n * Specify whether the component renders an HTML or SVG element.\n * This is useful when wrapping custom SVG components that need\n * SVG-specific attribute handling (like viewBox animation).\n * By default, Motion auto-detects based on the component name,\n * but custom React components are always treated as HTML.\n */\n type?: \"html\" | \"svg\"\n}\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nexport function createMotionComponent<\n Props,\n TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n Component: TagName | string | React.ComponentType,\n { forwardMotionProps = false, type }: MotionComponentOptions = {},\n preloadedFeatures?: FeaturePackages,\n createVisualElement?: CreateVisualElement\n) {\n preloadedFeatures && loadFeatures(preloadedFeatures)\n\n /**\n * Determine whether to use SVG or HTML rendering based on:\n * 1. Explicit `type` option (highest priority)\n * 2. Auto-detection via `isSVGComponent`\n */\n const isSVG = type ? type === \"svg\" : isSVGComponent(Component)\n const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState\n\n function MotionDOMComponent(\n props: MotionComponentProps,\n externalRef?: React.Ref\n ) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout: undefined | React.ComponentType\n\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n }\n\n const { isStatic } = configAndProps\n\n const context = useCreateMotionContext(props)\n\n const visualState = useVisualState(props, isStatic)\n\n if (!isStatic && typeof window !== \"undefined\") {\n useStrictMode(configAndProps, preloadedFeatures)\n\n const layoutProjection = getProjectionFunctionality(configAndProps)\n MeasureLayout = layoutProjection.MeasureLayout\n\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(\n Component,\n visualState,\n configAndProps,\n createVisualElement,\n layoutProjection.ProjectionNode,\n isSVG\n )\n }\n\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (\n \n {MeasureLayout && context.visualElement ? (\n \n ) : null}\n {useRender(\n Component,\n props,\n useMotionRef<\n HTMLElement | SVGElement,\n HTMLRenderState | SVGRenderState\n >(visualState, context.visualElement, externalRef),\n visualState,\n isStatic,\n forwardMotionProps,\n isSVG\n )}\n \n )\n }\n\n MotionDOMComponent.displayName = `motion.${\n typeof Component === \"string\"\n ? Component\n : `create(${Component.displayName ?? Component.name ?? \"\"})`\n }`\n\n const ForwardRefMotionComponent = forwardRef(MotionDOMComponent as any)\n ;(ForwardRefMotionComponent as any)[motionComponentSymbol] = Component\n\n return ForwardRefMotionComponent as MotionComponent\n}\n\nfunction useLayoutId({ layoutId }: MotionProps) {\n const layoutGroupId = useContext(LayoutGroupContext).id\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId\n}\n\nfunction useStrictMode(\n configAndProps: MotionProps,\n preloadedFeatures?: FeaturePackages\n) {\n const isStrict = useContext(LazyContext).strict\n\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (\n process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict\n ) {\n const strictMessage =\n \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\"\n configAndProps.ignoreStrict\n ? warning(false, strictMessage, \"lazy-strict-mode\")\n : invariant(false, strictMessage, \"lazy-strict-mode\")\n }\n}\n\nfunction getProjectionFunctionality(props: MotionProps) {\n const featureDefinitions = getInitializedFeatureDefinitions()\n const { drag, layout } = featureDefinitions\n\n if (!drag && !layout) return {}\n\n const combined = { ...drag, ...layout }\n\n return {\n MeasureLayout:\n drag?.isEnabled(props) || layout?.isEnabled(props)\n ? combined.MeasureLayout\n : undefined,\n ProjectionNode: combined.ProjectionNode,\n }\n}\n"],"names":["createContext","useRef","useLayoutEffect","useEffect","setFeatureDefinitions","getFeatureDefinitions","isMotionValue","isControllingVariants","isVariantLabel","useContext","useMemo","isForcedMotionValue","buildHTMLStyles","buildSVGAttrs","isSVGTag","Fragment","createElement","resolveMotionValue","checkIsControllingVariants","checkIsVariantNode","isAnimationControls","resolveVariantFromProps","scrapeHTMLMotionValuesFromProps","scrapeSVGMotionValuesFromProps","useInsertionEffect","useCallback","optimizedAppearDataAttribute","_jsxs","_jsx","forwardRef","warning","invariant"],"mappings":";;;;;;;MAWa,kBAAkB,GAAGA,mBAAa,CAA0B,EAAE;;ACL3E;;;;;;AAMG;AACG,SAAU,WAAW,CAAI,IAAa,EAAA;AACxC,IAAA,MAAM,GAAG,GAAGC,YAAM,CAAW,IAAI,CAAC;AAElC,IAAA,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI,EAAE;AACtB,QAAA,GAAG,CAAC,OAAO,GAAG,IAAI,EAAE;IACxB;IAEA,OAAO,GAAG,CAAC,OAAO;AACtB;;MCrBa,SAAS,GAAG,OAAO,MAAM,KAAK;;ACKpC,MAAM,yBAAyB,GAAG,SAAS,GAAGC,qBAAe,GAAGC;;ACEvE;;AAEG;MACU,eAAe;AACxB,gBAAgBH,mBAAa,CAA8B,IAAI;;AC8CnE;;AAEG;AACI,MAAM,mBAAmB,GAAGA,mBAAa,CAAsB;AAClE,IAAA,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC;AAC5B,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,aAAa,EAAE,OAAO;AACzB,CAAA;;ACtDM,MAAM,WAAW,GAAGA,mBAAa,CAAmB,EAAE,MAAM,EAAE,KAAK,EAAE;;ACN5E,MAAM,YAAY,GAAG;AACjB,IAAA,SAAS,EAAE;QACP,SAAS;QACT,UAAU;QACV,YAAY;QACZ,UAAU;QACV,MAAM;QACN,aAAa;QACb,YAAY;QACZ,WAAW;AACd,KAAA;IACD,IAAI,EAAE,CAAC,MAAM,CAAC;AACd,IAAA,IAAI,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC;IAC9B,KAAK,EAAE,CAAC,YAAY,CAAC;AACrB,IAAA,KAAK,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,YAAY,CAAC;IACnD,GAAG,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,aA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,GAAG,IAAI,EAAE,GAAG,MAAM,EAAE;IAEvC,OAAO;AACH,QAAA,aAAa,EACT,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,EAAE,SAAS,CAAC,KAAK;cAC3C,QAAQ,CAAC;AACX,cAAE,SAAS;QACnB,cAAc,EAAE,QAAQ,CAAC,cAAc;KAC1C;AACL;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index.js deleted file mode 100644 index 42ab6019..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index.js +++ /dev/null @@ -1,3706 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var jsxRuntime = require('react/jsx-runtime'); -var React = require('react'); -var index = require('./index-6W16WHlG.js'); -var motionDom = require('motion-dom'); -var featureBundle = require('./feature-bundle-frRcWALD.js'); -var motionUtils = require('motion-utils'); - -function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n.default = e; - return Object.freeze(n); -} - -var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React); - -/** - * Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx - */ -/** - * Set a given ref to a given value - * This utility takes care of different types of refs: callback refs and RefObject(s) - */ -function setRef(ref, value) { - if (typeof ref === "function") { - return ref(value); - } - else if (ref !== null && ref !== undefined) { - ref.current = value; - } -} -/** - * A utility to compose multiple refs together - * Accepts callback refs and RefObject(s) - */ -function composeRefs(...refs) { - return (node) => { - let hasCleanup = false; - const cleanups = refs.map((ref) => { - const cleanup = setRef(ref, node); - if (!hasCleanup && typeof cleanup === "function") { - hasCleanup = true; - } - return cleanup; - }); - // React <19 will log an error to the console if a callback ref returns a - // value. We don't use ref cleanups internally so this will only happen if a - // user's ref callback returns a value, which we only expect if they are - // using the cleanup functionality added in React 19. - if (hasCleanup) { - return () => { - for (let i = 0; i < cleanups.length; i++) { - const cleanup = cleanups[i]; - if (typeof cleanup === "function") { - cleanup(); - } - else { - setRef(refs[i], null); - } - } - }; - } - }; -} -/** - * A custom hook that composes multiple refs - * Accepts callback refs and RefObject(s) - */ -function useComposedRefs(...refs) { - // eslint-disable-next-line react-hooks/exhaustive-deps - return React__namespace.useCallback(composeRefs(...refs), refs); -} - -/** - * Measurement functionality has to be within a separate component - * to leverage snapshot lifecycle. - */ -class PopChildMeasure extends React__namespace.Component { - getSnapshotBeforeUpdate(prevProps) { - const element = this.props.childRef.current; - if (motionDom.isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) { - const parent = element.offsetParent; - const parentWidth = motionDom.isHTMLElement(parent) - ? parent.offsetWidth || 0 - : 0; - const parentHeight = motionDom.isHTMLElement(parent) - ? parent.offsetHeight || 0 - : 0; - const computedStyle = getComputedStyle(element); - const size = this.props.sizeRef.current; - size.height = parseFloat(computedStyle.height); - size.width = parseFloat(computedStyle.width); - size.top = element.offsetTop; - size.left = element.offsetLeft; - size.right = parentWidth - size.width - size.left; - size.bottom = parentHeight - size.height - size.top; - size.direction = computedStyle.direction; - } - return null; - } - /** - * Required with getSnapshotBeforeUpdate to stop React complaining. - */ - componentDidUpdate() { } - render() { - return this.props.children; - } -} -function PopChild({ children, isPresent, anchorX, anchorY, root, pop }) { - const id = React.useId(); - const ref = React.useRef(null); - const size = React.useRef({ - width: 0, - height: 0, - top: 0, - left: 0, - right: 0, - bottom: 0, - direction: "ltr", - }); - const { nonce } = React.useContext(index.MotionConfigContext); - /** - * In React 19, refs are passed via props.ref instead of element.ref. - * We check props.ref first (React 19) and fall back to element.ref (React 18). - */ - const childRef = children.props?.ref ?? - children?.ref; - const composedRef = useComposedRefs(ref, childRef); - /** - * We create and inject a style block so we can apply this explicit - * sizing in a non-destructive manner by just deleting the style block. - * - * We can't apply size via render as the measurement happens - * in getSnapshotBeforeUpdate (post-render), likewise if we apply the - * styles directly on the DOM node, we might be overwriting - * styles set via the style prop. - */ - React.useInsertionEffect(() => { - const { width, height, top, left, right, bottom, direction } = size.current; - if (isPresent || pop === false || !ref.current || !width || !height) - return; - const isRTL = direction === "rtl"; - const x = anchorX === "left" - ? (isRTL ? `right: ${right}` : `left: ${left}`) - : (isRTL ? `left: ${left}` : `right: ${right}`); - const y = anchorY === "bottom" ? `bottom: ${bottom}` : `top: ${top}`; - ref.current.dataset.motionPopId = id; - const style = document.createElement("style"); - if (nonce) - style.nonce = nonce; - const parent = root ?? document.head; - parent.appendChild(style); - if (style.sheet) { - style.sheet.insertRule(` - [data-motion-pop-id="${id}"] { - position: absolute !important; - width: ${width}px !important; - height: ${height}px !important; - ${x}px !important; - ${y}px !important; - } - `); - } - return () => { - ref.current?.removeAttribute("data-motion-pop-id"); - if (parent.contains(style)) { - parent.removeChild(style); - } - }; - }, [isPresent]); - return (jsxRuntime.jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false - ? children - : React__namespace.cloneElement(children, { ref: composedRef }) })); -} - -const PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => { - const presenceChildren = index.useConstant(newChildrenMap); - const id = React.useId(); - let isReusedContext = true; - let context = React.useMemo(() => { - isReusedContext = false; - return { - id, - initial, - isPresent, - custom, - onExitComplete: (childId) => { - presenceChildren.set(childId, true); - for (const isComplete of presenceChildren.values()) { - if (!isComplete) - return; // can stop searching when any is incomplete - } - onExitComplete && onExitComplete(); - }, - register: (childId) => { - presenceChildren.set(childId, false); - return () => presenceChildren.delete(childId); - }, - }; - }, [isPresent, presenceChildren, onExitComplete]); - /** - * If the presence of a child affects the layout of the components around it, - * we want to make a new context value to ensure they get re-rendered - * so they can detect that layout change. - */ - if (presenceAffectsLayout && isReusedContext) { - context = { ...context }; - } - React.useMemo(() => { - presenceChildren.forEach((_, key) => presenceChildren.set(key, false)); - }, [isPresent]); - /** - * If there's no `motion` components to fire exit animations, we want to remove this - * component immediately. - */ - React__namespace.useEffect(() => { - !isPresent && - !presenceChildren.size && - onExitComplete && - onExitComplete(); - }, [isPresent]); - children = (jsxRuntime.jsx(PopChild, { pop: mode === "popLayout", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children })); - return (jsxRuntime.jsx(index.PresenceContext.Provider, { value: context, children: children })); -}; -function newChildrenMap() { - return new Map(); -} - -const getChildKey = (child) => child.key || ""; -function onlyElements(children) { - const filtered = []; - // We use forEach here instead of map as map mutates the component key by preprending `.$` - React.Children.forEach(children, (child) => { - if (React.isValidElement(child)) - filtered.push(child); - }); - return filtered; -} - -/** - * `AnimatePresence` enables the animation of components that have been removed from the tree. - * - * When adding/removing more than a single child, every child **must** be given a unique `key` prop. - * - * Any `motion` components that have an `exit` property defined will animate out when removed from - * the tree. - * - * ```jsx - * import { motion, AnimatePresence } from 'framer-motion' - * - * export const Items = ({ items }) => ( - * - * {items.map(item => ( - * - * ))} - * - * ) - * ``` - * - * You can sequence exit animations throughout a tree using variants. - * - * If a child contains multiple `motion` components with `exit` props, it will only unmount the child - * once all `motion` components have finished animating out. Likewise, any components using - * `usePresence` all need to call `safeToRemove`. - * - * @public - */ -const AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = "sync", propagate = false, anchorX = "left", anchorY = "top", root }) => { - const [isParentPresent, safeToRemove] = featureBundle.usePresence(propagate); - /** - * Filter any children that aren't ReactElements. We can only track components - * between renders with a props.key. - */ - const presentChildren = React.useMemo(() => onlyElements(children), [children]); - /** - * Track the keys of the currently rendered children. This is used to - * determine which children are exiting. - */ - const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey); - /** - * If `initial={false}` we only want to pass this to components in the first render. - */ - const isInitialRender = React.useRef(true); - /** - * A ref containing the currently present children. When all exit animations - * are complete, we use this to re-render the component with the latest children - * *committed* rather than the latest children *rendered*. - */ - const pendingPresentChildren = React.useRef(presentChildren); - /** - * Track which exiting children have finished animating out. - */ - const exitComplete = index.useConstant(() => new Map()); - /** - * Track which components are currently processing exit to prevent duplicate processing. - */ - const exitingComponents = React.useRef(new Set()); - /** - * Save children to render as React state. To ensure this component is concurrent-safe, - * we check for exiting children via an effect. - */ - const [diffedChildren, setDiffedChildren] = React.useState(presentChildren); - const [renderedChildren, setRenderedChildren] = React.useState(presentChildren); - index.useIsomorphicLayoutEffect(() => { - isInitialRender.current = false; - pendingPresentChildren.current = presentChildren; - /** - * Update complete status of exiting children. - */ - for (let i = 0; i < renderedChildren.length; i++) { - const key = getChildKey(renderedChildren[i]); - if (!presentKeys.includes(key)) { - if (exitComplete.get(key) !== true) { - exitComplete.set(key, false); - } - } - else { - exitComplete.delete(key); - exitingComponents.current.delete(key); - } - } - }, [renderedChildren, presentKeys.length, presentKeys.join("-")]); - const exitingChildren = []; - if (presentChildren !== diffedChildren) { - let nextChildren = [...presentChildren]; - /** - * Loop through all the currently rendered components and decide which - * are exiting. - */ - for (let i = 0; i < renderedChildren.length; i++) { - const child = renderedChildren[i]; - const key = getChildKey(child); - if (!presentKeys.includes(key)) { - nextChildren.splice(i, 0, child); - exitingChildren.push(child); - } - } - /** - * If we're in "wait" mode, and we have exiting children, we want to - * only render these until they've all exited. - */ - if (mode === "wait" && exitingChildren.length) { - nextChildren = exitingChildren; - } - setRenderedChildren(onlyElements(nextChildren)); - setDiffedChildren(presentChildren); - /** - * Early return to ensure once we've set state with the latest diffed - * children, we can immediately re-render. - */ - return null; - } - if (process.env.NODE_ENV !== "production" && - mode === "wait" && - renderedChildren.length > 1) { - console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`); - } - /** - * If we've been provided a forceRender function by the LayoutGroupContext, - * we can use it to force a re-render amongst all surrounding components once - * all components have finished animating out. - */ - const { forceRender } = React.useContext(index.LayoutGroupContext); - return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderedChildren.map((child) => { - const key = getChildKey(child); - const isPresent = propagate && !isParentPresent - ? false - : presentChildren === renderedChildren || - presentKeys.includes(key); - const onExit = () => { - if (exitingComponents.current.has(key)) { - return; - } - if (exitComplete.has(key)) { - exitingComponents.current.add(key); - exitComplete.set(key, true); - } - else { - return; - } - let isEveryExitComplete = true; - exitComplete.forEach((isExitComplete) => { - if (!isExitComplete) - isEveryExitComplete = false; - }); - if (isEveryExitComplete) { - forceRender?.(); - setRenderedChildren(pendingPresentChildren.current); - propagate && safeToRemove?.(); - onExitComplete && onExitComplete(); - } - }; - return (jsxRuntime.jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial - ? undefined - : false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, anchorY: anchorY, children: child }, key)); - }) })); -}; - -/** - * Note: Still used by components generated by old versions of Framer - * - * @deprecated - */ -const DeprecatedLayoutGroupContext = React.createContext(null); - -function useIsMounted() { - const isMounted = React.useRef(false); - index.useIsomorphicLayoutEffect(() => { - isMounted.current = true; - return () => { - isMounted.current = false; - }; - }, []); - return isMounted; -} - -function useForceUpdate() { - const isMounted = useIsMounted(); - const [forcedRenderCount, setForcedRenderCount] = React.useState(0); - const forceRender = React.useCallback(() => { - isMounted.current && setForcedRenderCount(forcedRenderCount + 1); - }, [forcedRenderCount]); - /** - * Defer this to the end of the next animation frame in case there are multiple - * synchronous calls. - */ - const deferredForceRender = React.useCallback(() => motionDom.frame.postRender(forceRender), [forceRender]); - return [deferredForceRender, forcedRenderCount]; -} - -const shouldInheritGroup = (inherit) => inherit === true; -const shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === "id"; -const LayoutGroup = ({ children, id, inherit = true }) => { - const layoutGroupContext = React.useContext(index.LayoutGroupContext); - const deprecatedLayoutGroupContext = React.useContext(DeprecatedLayoutGroupContext); - const [forceRender, key] = useForceUpdate(); - const context = React.useRef(null); - const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext; - if (context.current === null) { - if (shouldInheritId(inherit) && upstreamId) { - id = id ? upstreamId + "-" + id : upstreamId; - } - context.current = { - id, - group: shouldInheritGroup(inherit) - ? layoutGroupContext.group || motionDom.nodeGroup() - : motionDom.nodeGroup(), - }; - } - const memoizedContext = React.useMemo(() => ({ ...context.current, forceRender }), [key]); - return (jsxRuntime.jsx(index.LayoutGroupContext.Provider, { value: memoizedContext, children: children })); -}; - -/** - * Used in conjunction with the `m` component to reduce bundle size. - * - * `m` is a version of the `motion` component that only loads functionality - * critical for the initial render. - * - * `LazyMotion` can then be used to either synchronously or asynchronously - * load animation and gesture support. - * - * ```jsx - * // Synchronous loading - * import { LazyMotion, m, domAnimation } from "framer-motion" - * - * function App() { - * return ( - * - * - * - * ) - * } - * - * // Asynchronous loading - * import { LazyMotion, m } from "framer-motion" - * - * function App() { - * return ( - * import('./path/to/domAnimation')}> - * - * - * ) - * } - * ``` - * - * @public - */ -function LazyMotion({ children, features, strict = false }) { - const [, setIsLoaded] = React.useState(!isLazyBundle(features)); - const loadedRenderer = React.useRef(undefined); - /** - * If this is a synchronous load, load features immediately - */ - if (!isLazyBundle(features)) { - const { renderer, ...loadedFeatures } = features; - loadedRenderer.current = renderer; - index.loadFeatures(loadedFeatures); - } - React.useEffect(() => { - if (isLazyBundle(features)) { - features().then(({ renderer, ...loadedFeatures }) => { - index.loadFeatures(loadedFeatures); - loadedRenderer.current = renderer; - setIsLoaded(true); - }); - } - }, []); - return (jsxRuntime.jsx(index.LazyContext.Provider, { value: { renderer: loadedRenderer.current, strict }, children: children })); -} -function isLazyBundle(features) { - return typeof features === "function"; -} - -/** - * `MotionConfig` is used to set configuration options for all children `motion` components. - * - * ```jsx - * import { motion, MotionConfig } from "framer-motion" - * - * export function App() { - * return ( - * - * - * - * ) - * } - * ``` - * - * @public - */ -function MotionConfig({ children, isValidProp, ...config }) { - isValidProp && index.loadExternalIsValidProp(isValidProp); - /** - * Inherit props from any parent MotionConfig components - */ - const parentConfig = React.useContext(index.MotionConfigContext); - config = { ...parentConfig, ...config }; - config.transition = motionDom.resolveTransition(config.transition, parentConfig.transition); - /** - * Don't allow isStatic to change between renders as it affects how many hooks - * motion components fire. - */ - config.isStatic = index.useConstant(() => config.isStatic); - /** - * Creating a new config context object will re-render every `motion` component - * every time it renders. So we only want to create a new one sparingly. - */ - const context = React.useMemo(() => config, [ - JSON.stringify(config.transition), - config.transformPagePoint, - config.reducedMotion, - config.skipAnimations, - ]); - return (jsxRuntime.jsx(index.MotionConfigContext.Provider, { value: context, children: children })); -} - -const ReorderContext = React.createContext(null); - -function createMotionProxy(preloadedFeatures, createVisualElement) { - if (typeof Proxy === "undefined") { - return index.createMotionComponent; - } - /** - * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc. - * Rather than generating them anew every render. - */ - const componentCache = new Map(); - const factory = (Component, options) => { - return index.createMotionComponent(Component, options, preloadedFeatures, createVisualElement); - }; - /** - * Support for deprecated`motion(Component)` pattern - */ - const deprecatedFactoryFunction = (Component, options) => { - if (process.env.NODE_ENV !== "production") { - motionUtils.warnOnce(false, "motion() is deprecated. Use motion.create() instead."); - } - return factory(Component, options); - }; - return new Proxy(deprecatedFactoryFunction, { - /** - * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc. - * The prop name is passed through as `key` and we can use that to generate a `motion` - * DOM component with that name. - */ - get: (_target, key) => { - if (key === "create") - return factory; - /** - * If this element doesn't exist in the component cache, create it and cache. - */ - if (!componentCache.has(key)) { - componentCache.set(key, index.createMotionComponent(key, undefined, preloadedFeatures, createVisualElement)); - } - return componentCache.get(key); - }, - }); -} - -const motion = /*@__PURE__*/ createMotionProxy(featureBundle.featureBundle, featureBundle.createDomVisualElement); - -function checkReorder(order, value, offset, velocity) { - if (!velocity) - return order; - const index = order.findIndex((item) => item.value === value); - if (index === -1) - return order; - const nextOffset = velocity > 0 ? 1 : -1; - const nextItem = order[index + nextOffset]; - if (!nextItem) - return order; - const item = order[index]; - const nextLayout = nextItem.layout; - const nextItemCenter = motionDom.mixNumber(nextLayout.min, nextLayout.max, 0.5); - if ((nextOffset === 1 && item.layout.max + offset > nextItemCenter) || - (nextOffset === -1 && item.layout.min + offset < nextItemCenter)) { - return motionUtils.moveItem(order, index, index + nextOffset); - } - return order; -} - -function ReorderGroupComponent({ children, as = "ul", axis = "y", onReorder, values, ...props }, externalRef) { - const Component = index.useConstant(() => motion[as]); - const order = []; - const isReordering = React.useRef(false); - const groupRef = React.useRef(null); - motionUtils.invariant(Boolean(values), "Reorder.Group must be provided a values prop", "reorder-values"); - const context = { - axis, - groupRef, - registerItem: (value, layout) => { - // If the entry was already added, update it rather than adding it again - const idx = order.findIndex((entry) => value === entry.value); - if (idx !== -1) { - order[idx].layout = layout[axis]; - } - else { - order.push({ value: value, layout: layout[axis] }); - } - order.sort(compareMin); - }, - updateOrder: (item, offset, velocity) => { - if (isReordering.current) - return; - const newOrder = checkReorder(order, item, offset, velocity); - if (order !== newOrder) { - isReordering.current = true; - // Find which two values swapped and apply that swap - // to the full values array. This preserves unmeasured - // items (e.g. in virtualized lists). - const newValues = [...values]; - for (let i = 0; i < newOrder.length; i++) { - if (order[i].value !== newOrder[i].value) { - const a = values.indexOf(order[i].value); - const b = values.indexOf(newOrder[i].value); - if (a !== -1 && b !== -1) { - [newValues[a], newValues[b]] = [newValues[b], newValues[a]]; - } - break; - } - } - onReorder(newValues); - } - }, - }; - React.useEffect(() => { - isReordering.current = false; - }); - // Combine refs if external ref is provided - const setRef = (element) => { - groupRef.current = element; - if (typeof externalRef === "function") { - externalRef(element); - } - else if (externalRef) { - externalRef.current = element; - } - }; - /** - * Disable browser scroll anchoring on the group container. - * When items reorder, scroll anchoring can cause the browser to adjust - * the scroll position, which interferes with drag position calculations. - */ - const groupStyle = { - overflowAnchor: "none", - ...props.style, - }; - return (jsxRuntime.jsx(Component, { ...props, style: groupStyle, ref: setRef, ignoreStrict: true, children: jsxRuntime.jsx(ReorderContext.Provider, { value: context, children: children }) })); -} -const ReorderGroup = /*@__PURE__*/ React.forwardRef(ReorderGroupComponent); -function compareMin(a, b) { - return a.layout.min - b.layout.min; -} - -/** - * Creates a `MotionValue` to track the state and velocity of a value. - * - * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop. - * - * ```jsx - * export const MyComponent = () => { - * const scale = useMotionValue(1) - * - * return - * } - * ``` - * - * @param initial - The initial state. - * - * @public - */ -function useMotionValue(initial) { - const value = index.useConstant(() => motionDom.motionValue(initial)); - /** - * If this motion value is being used in static mode, like on - * the Framer canvas, force components to rerender when the motion - * value is updated. - */ - const { isStatic } = React.useContext(index.MotionConfigContext); - if (isStatic) { - const [, setLatest] = React.useState(initial); - React.useEffect(() => value.on("change", setLatest), []); - } - return value; -} - -function useCombineMotionValues(values, combineValues) { - /** - * Initialise the returned motion value. This remains the same between renders. - */ - const value = useMotionValue(combineValues()); - /** - * Create a function that will update the template motion value with the latest values. - * This is pre-bound so whenever a motion value updates it can schedule its - * execution in Framesync. If it's already been scheduled it won't be fired twice - * in a single frame. - */ - const updateValue = () => value.set(combineValues()); - /** - * Synchronously update the motion value with the latest values during the render. - * This ensures that within a React render, the styles applied to the DOM are up-to-date. - */ - updateValue(); - /** - * Subscribe to all motion values found within the template. Whenever any of them change, - * schedule an update. - */ - index.useIsomorphicLayoutEffect(() => { - const scheduleUpdate = () => motionDom.frame.preRender(updateValue, false, true); - const subscriptions = values.map((v) => v.on("change", scheduleUpdate)); - return () => { - subscriptions.forEach((unsubscribe) => unsubscribe()); - motionDom.cancelFrame(updateValue); - }; - }); - return value; -} - -function useComputed(compute) { - /** - * Open session of collectMotionValues. Any MotionValue that calls get() - * will be saved into this array. - */ - motionDom.collectMotionValues.current = []; - compute(); - const value = useCombineMotionValues(motionDom.collectMotionValues.current, compute); - /** - * Synchronously close session of collectMotionValues. - */ - motionDom.collectMotionValues.current = undefined; - return value; -} - -function useTransform(input, inputRangeOrTransformer, outputRangeOrMap, options) { - if (typeof input === "function") { - return useComputed(input); - } - /** - * Detect if outputRangeOrMap is an output map (object with keys) - * rather than an output range (array). - */ - const isOutputMap = outputRangeOrMap !== undefined && - !Array.isArray(outputRangeOrMap) && - typeof inputRangeOrTransformer !== "function"; - if (isOutputMap) { - return useMapTransform(input, inputRangeOrTransformer, outputRangeOrMap, options); - } - const outputRange = outputRangeOrMap; - const transformer = typeof inputRangeOrTransformer === "function" - ? inputRangeOrTransformer - : motionDom.transform(inputRangeOrTransformer, outputRange, options); - const result = Array.isArray(input) - ? useListTransform(input, transformer) - : useListTransform([input], ([latest]) => transformer(latest)); - const inputAccelerate = !Array.isArray(input) - ? input.accelerate - : undefined; - if (inputAccelerate && - !inputAccelerate.isTransformed && - typeof inputRangeOrTransformer !== "function" && - Array.isArray(outputRangeOrMap) && - options?.clamp !== false) { - result.accelerate = { - ...inputAccelerate, - times: inputRangeOrTransformer, - keyframes: outputRangeOrMap, - isTransformed: true, - ...(options?.ease ? { ease: options.ease } : {}), - }; - } - return result; -} -function useListTransform(values, transformer) { - const latest = index.useConstant(() => []); - return useCombineMotionValues(values, () => { - latest.length = 0; - const numValues = values.length; - for (let i = 0; i < numValues; i++) { - latest[i] = values[i].get(); - } - return transformer(latest); - }); -} -function useMapTransform(inputValue, inputRange, outputMap, options) { - /** - * Capture keys once to ensure hooks are called in consistent order. - */ - const keys = index.useConstant(() => Object.keys(outputMap)); - const output = index.useConstant(() => ({})); - for (const key of keys) { - output[key] = useTransform(inputValue, inputRange, outputMap[key], options); - } - return output; -} - -const threshold = 50; -const maxSpeed = 25; -const overflowStyles = new Set(["auto", "scroll"]); -// Track initial scroll limits per scrollable element (Bug 1 fix) -const initialScrollLimits = new WeakMap(); -const activeScrollEdge = new WeakMap(); -// Track which group element is currently dragging to clear state on end -let currentGroupElement = null; -function resetAutoScrollState() { - if (currentGroupElement) { - const scrollableAncestor = findScrollableAncestor(currentGroupElement, "y"); - if (scrollableAncestor) { - activeScrollEdge.delete(scrollableAncestor); - initialScrollLimits.delete(scrollableAncestor); - } - // Also try x axis - const scrollableAncestorX = findScrollableAncestor(currentGroupElement, "x"); - if (scrollableAncestorX && scrollableAncestorX !== scrollableAncestor) { - activeScrollEdge.delete(scrollableAncestorX); - initialScrollLimits.delete(scrollableAncestorX); - } - currentGroupElement = null; - } -} -function isScrollableElement(element, axis) { - const style = getComputedStyle(element); - const overflow = axis === "x" ? style.overflowX : style.overflowY; - const isDocumentScroll = element === document.body || - element === document.documentElement; - return overflowStyles.has(overflow) || isDocumentScroll; -} -function findScrollableAncestor(element, axis) { - let current = element?.parentElement; - while (current) { - if (isScrollableElement(current, axis)) { - return current; - } - current = current.parentElement; - } - return null; -} -function getScrollAmount(pointerPosition, scrollElement, axis) { - const rect = scrollElement.getBoundingClientRect(); - const start = axis === "x" ? Math.max(0, rect.left) : Math.max(0, rect.top); - const end = axis === "x" ? Math.min(window.innerWidth, rect.right) : Math.min(window.innerHeight, rect.bottom); - const distanceFromStart = pointerPosition - start; - const distanceFromEnd = end - pointerPosition; - if (distanceFromStart < threshold) { - const intensity = 1 - distanceFromStart / threshold; - return { amount: -maxSpeed * intensity * intensity, edge: "start" }; - } - else if (distanceFromEnd < threshold) { - const intensity = 1 - distanceFromEnd / threshold; - return { amount: maxSpeed * intensity * intensity, edge: "end" }; - } - return { amount: 0, edge: null }; -} -function autoScrollIfNeeded(groupElement, pointerPosition, axis, velocity) { - if (!groupElement) - return; - // Track the group element for cleanup - currentGroupElement = groupElement; - const scrollableAncestor = findScrollableAncestor(groupElement, axis); - if (!scrollableAncestor) - return; - // Convert pointer position from page coordinates to viewport coordinates. - // The gesture system uses pageX/pageY but getBoundingClientRect() returns - // viewport-relative coordinates, so we need to account for page scroll. - const viewportPointerPosition = pointerPosition - (axis === "x" ? window.scrollX : window.scrollY); - const { amount: scrollAmount, edge } = getScrollAmount(viewportPointerPosition, scrollableAncestor, axis); - // If not in any threshold zone, clear all state - if (edge === null) { - activeScrollEdge.delete(scrollableAncestor); - initialScrollLimits.delete(scrollableAncestor); - return; - } - const currentActiveEdge = activeScrollEdge.get(scrollableAncestor); - const isDocumentScroll = scrollableAncestor === document.body || - scrollableAncestor === document.documentElement; - // If not currently scrolling this edge, check velocity to see if we should start - if (currentActiveEdge !== edge) { - // Only start scrolling if velocity is towards the edge - const shouldStart = (edge === "start" && velocity < 0) || - (edge === "end" && velocity > 0); - if (!shouldStart) - return; - // Activate this edge - activeScrollEdge.set(scrollableAncestor, edge); - // Record initial scroll limit (prevents infinite scroll) - const maxScroll = axis === "x" - ? scrollableAncestor.scrollWidth - (isDocumentScroll ? window.innerWidth : scrollableAncestor.clientWidth) - : scrollableAncestor.scrollHeight - (isDocumentScroll ? window.innerHeight : scrollableAncestor.clientHeight); - initialScrollLimits.set(scrollableAncestor, maxScroll); - } - // Cap scrolling at initial limit (prevents infinite scroll) - if (scrollAmount > 0) { - const initialLimit = initialScrollLimits.get(scrollableAncestor); - const currentScroll = axis === "x" - ? (isDocumentScroll ? window.scrollX : scrollableAncestor.scrollLeft) - : (isDocumentScroll ? window.scrollY : scrollableAncestor.scrollTop); - if (currentScroll >= initialLimit) - return; - } - // Apply scroll - if (axis === "x") { - if (isDocumentScroll) { - window.scrollBy({ left: scrollAmount }); - } - else { - scrollableAncestor.scrollLeft += scrollAmount; - } - } - else { - if (isDocumentScroll) { - window.scrollBy({ top: scrollAmount }); - } - else { - scrollableAncestor.scrollTop += scrollAmount; - } - } -} - -function useDefaultMotionValue(value, defaultValue = 0) { - return motionDom.isMotionValue(value) ? value : useMotionValue(defaultValue); -} -function ReorderItemComponent({ children, style = {}, value, as = "li", onDrag, onDragEnd, layout = true, ...props }, externalRef) { - const Component = index.useConstant(() => motion[as]); - const context = React.useContext(ReorderContext); - const point = { - x: useDefaultMotionValue(style.x), - y: useDefaultMotionValue(style.y), - }; - const zIndex = useTransform([point.x, point.y], ([latestX, latestY]) => latestX || latestY ? 1 : "unset"); - motionUtils.invariant(Boolean(context), "Reorder.Item must be a child of Reorder.Group", "reorder-item-child"); - const { axis, registerItem, updateOrder, groupRef } = context; - return (jsxRuntime.jsx(Component, { drag: axis, ...props, dragSnapToOrigin: true, style: { ...style, x: point.x, y: point.y, zIndex }, layout: layout, onDrag: (event, gesturePoint) => { - const { velocity, point: pointerPoint } = gesturePoint; - const offset = point[axis].get(); - // Always attempt to update order - checkReorder handles the logic - updateOrder(value, offset, velocity[axis]); - autoScrollIfNeeded(groupRef.current, pointerPoint[axis], axis, velocity[axis]); - onDrag && onDrag(event, gesturePoint); - }, onDragEnd: (event, gesturePoint) => { - resetAutoScrollState(); - onDragEnd && onDragEnd(event, gesturePoint); - }, onLayoutMeasure: (measured) => { - registerItem(value, measured); - }, ref: externalRef, ignoreStrict: true, children: children })); -} -const ReorderItem = /*@__PURE__*/ React.forwardRef(ReorderItemComponent); - -var namespace = /*#__PURE__*/Object.freeze({ - __proto__: null, - Group: ReorderGroup, - Item: ReorderItem -}); - -function isDOMKeyframes(keyframes) { - return typeof keyframes === "object" && !Array.isArray(keyframes); -} - -function resolveSubjects(subject, keyframes, scope, selectorCache) { - if (subject == null) { - return []; - } - if (typeof subject === "string" && isDOMKeyframes(keyframes)) { - return motionDom.resolveElements(subject, scope, selectorCache); - } - else if (subject instanceof NodeList) { - return Array.from(subject); - } - else if (Array.isArray(subject)) { - return subject.filter((s) => s != null); - } - else { - return [subject]; - } -} - -function calculateRepeatDuration(duration, repeat, repeatDelay) { - return duration * (repeat + 1) + repeatDelay * repeat; -} - -/** - * Given a absolute or relative time definition and current/prev time state of the sequence, - * calculate an absolute time for the next keyframes. - */ -function calcNextTime(current, next, prev, labels) { - if (typeof next === "number") { - return next; - } - else if (next.startsWith("-") || next.startsWith("+")) { - return Math.max(0, current + parseFloat(next)); - } - else if (next === "<") { - return prev; - } - else if (next.startsWith("<")) { - return Math.max(0, prev + parseFloat(next.slice(1))); - } - else { - return labels.get(next) ?? current; - } -} - -function eraseKeyframes(sequence, startTime, endTime) { - for (let i = 0; i < sequence.length; i++) { - const keyframe = sequence[i]; - if (keyframe.at > startTime && keyframe.at < endTime) { - motionUtils.removeItem(sequence, keyframe); - // If we remove this item we have to push the pointer back one - i--; - } - } -} -function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) { - /** - * Erase every existing value between currentTime and targetTime, - * this will essentially splice this timeline into any currently - * defined ones. - */ - eraseKeyframes(sequence, startTime, endTime); - for (let i = 0; i < keyframes.length; i++) { - sequence.push({ - value: keyframes[i], - at: motionDom.mixNumber(startTime, endTime, offset[i]), - easing: motionUtils.getEasingForSegment(easing, i), - }); - } -} - -/** - * Take an array of times that represent repeated keyframes. For instance - * if we have original times of [0, 0.5, 1] then our repeated times will - * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back - * down to a 0-1 scale. - * - * `repeatDelayUnits` is the repeatDelay expressed in units of a single - * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`. - */ -function normalizeTimes(times, repeat, repeatDelayUnits = 0) { - const totalUnits = repeat + 1 + repeat * repeatDelayUnits; - for (let i = 0; i < times.length; i++) { - times[i] = times[i] / totalUnits; - } -} - -function compareByTime(a, b) { - if (a.at === b.at) { - if (a.value === null) - return 1; - if (b.value === null) - return -1; - return 0; - } - else { - return a.at - b.at; - } -} - -const defaultSegmentEasing = "easeInOut"; -const MAX_REPEAT = 20; -function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) { - const defaultDuration = defaultTransition.duration || 0.3; - const animationDefinitions = new Map(); - const sequences = new Map(); - const elementCache = {}; - const timeLabels = new Map(); - let prevTime = 0; - let currentTime = 0; - let totalDuration = 0; - /** - * Build the timeline by mapping over the sequence array and converting - * the definitions into keyframes and offsets with absolute time values. - * These will later get converted into relative offsets in a second pass. - */ - for (let i = 0; i < sequence.length; i++) { - const segment = sequence[i]; - /** - * If this is a timeline label, mark it and skip the rest of this iteration. - */ - if (typeof segment === "string") { - timeLabels.set(segment, currentTime); - continue; - } - else if (!Array.isArray(segment)) { - timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels)); - continue; - } - let [subject, keyframes, transition = {}] = segment; - /** - * If a relative or absolute time value has been specified we need to resolve - * it in relation to the currentTime. - */ - if (transition.at !== undefined) { - currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels); - } - /** - * Keep track of the maximum duration in this definition. This will be - * applied to currentTime once the definition has been parsed. - */ - let maxDuration = 0; - const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => { - const valueKeyframesAsList = keyframesAsList(valueKeyframes); - const { delay = 0, times = motionDom.defaultOffset(valueKeyframesAsList), type = defaultTransition.type || "keyframes", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition; - let { ease = defaultTransition.ease || "easeOut", duration } = valueTransition; - /** - * Resolve stagger() if defined. - */ - const calculatedDelay = typeof delay === "function" - ? delay(elementIndex, numSubjects) - : delay; - /** - * If this animation should and can use a spring, generate a spring easing function. - */ - const numKeyframes = valueKeyframesAsList.length; - const createGenerator = motionDom.isGenerator(type) - ? type - : generators?.[type || "keyframes"]; - if (numKeyframes <= 2 && createGenerator) { - /** - * As we're creating an easing function from a spring, - * ideally we want to generate it using the real distance - * between the two keyframes. However this isn't always - * possible - in these situations we use 0-100. - */ - let absoluteDelta = 100; - if (numKeyframes === 2 && - isNumberKeyframesArray(valueKeyframesAsList)) { - const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0]; - absoluteDelta = Math.abs(delta); - } - const springTransition = { - ...defaultTransition, - ...remainingTransition, - }; - if (duration !== undefined) { - springTransition.duration = motionUtils.secondsToMilliseconds(duration); - } - const springEasing = motionDom.createGeneratorEasing(springTransition, absoluteDelta, createGenerator); - ease = springEasing.ease; - duration = springEasing.duration; - } - duration ?? (duration = defaultDuration); - const startTime = currentTime + calculatedDelay; - /** - * If there's only one time offset of 0, fill in a second with length 1 - */ - if (times.length === 1 && times[0] === 0) { - times[1] = 1; - } - /** - * Fill out if offset if fewer offsets than keyframes - */ - const remainder = times.length - valueKeyframesAsList.length; - remainder > 0 && motionDom.fillOffset(times, remainder); - /** - * If only one value has been set, ie [1], push a null to the start of - * the keyframe array. This will let us mark a keyframe at this point - * that will later be hydrated with the previous value. - */ - valueKeyframesAsList.length === 1 && - valueKeyframesAsList.unshift(null); - /** - * Segments can't express `repeat: Infinity` or very large - * counts — they'd leave dead time after the segment or - * explode the keyframe array. Ignore with a warning. - */ - if (repeat) { - motionUtils.warning(repeat < MAX_REPEAT, `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`); - } - if (repeat && repeat < MAX_REPEAT) { - /** - * Express repeatDelay in units of a single iteration's duration - * so it can be added to the per-iteration time offsets below - * before they're normalized to 0-1. - */ - const repeatDelayUnits = duration > 0 ? repeatDelay / duration : 0; - duration = calculateRepeatDuration(duration, repeat, repeatDelay); - const originalKeyframes = [...valueKeyframesAsList]; - const originalTimes = [...times]; - ease = Array.isArray(ease) ? [...ease] : [ease]; - const originalEase = [...ease]; - /** - * For reverse/mirror, alternate iterations play the segment - * backwards. mirror matches JSAnimation's mirroredGenerator: - * reversed keyframes, easings unchanged. reverse matches - * JSAnimation's iterationProgress = 1 - p: reversed - * keyframes, easing array reversed AND each function easing - * mapped through reverseEasing (string easings unchanged — - * they're resolved later by the keyframes engine). - */ - const isFlipping = repeatType === "reverse" || repeatType === "mirror"; - let flippedKeyframes = originalKeyframes; - let flippedEases = originalEase; - if (isFlipping) { - flippedKeyframes = [...originalKeyframes].reverse(); - if (repeatType === "reverse") { - flippedEases = [...originalEase] - .reverse() - .map((e) => typeof e === "function" - ? motionUtils.reverseEasing(e) - : e); - } - } - for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) { - const isFlipped = isFlipping && repeatIndex % 2 === 0; - const iterKeyframes = isFlipped - ? flippedKeyframes - : originalKeyframes; - const iterEase = isFlipped ? flippedEases : originalEase; - const iterStartOffset = (repeatIndex + 1) * (1 + repeatDelayUnits); - /** - * If repeatDelay is set, hold the previous iteration's - * final value through the delay by inserting a keyframe - * at the moment the next iteration begins. - */ - if (repeatDelayUnits > 0) { - valueKeyframesAsList.push(valueKeyframesAsList[valueKeyframesAsList.length - 1]); - times.push(iterStartOffset); - ease.push("linear"); - } - valueKeyframesAsList.push(...iterKeyframes); - for (let keyframeIndex = 0; keyframeIndex < iterKeyframes.length; keyframeIndex++) { - times.push(originalTimes[keyframeIndex] + iterStartOffset); - ease.push(keyframeIndex === 0 - ? "linear" - : motionUtils.getEasingForSegment(iterEase, keyframeIndex - 1)); - } - } - normalizeTimes(times, repeat, repeatDelayUnits); - } - const targetTime = startTime + duration; - /** - * Add keyframes, mapping offsets to absolute time. - */ - addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime); - maxDuration = Math.max(calculatedDelay + duration, maxDuration); - totalDuration = Math.max(targetTime, totalDuration); - }; - if (motionDom.isMotionValue(subject)) { - const subjectSequence = getSubjectSequence(subject, sequences); - resolveValueSequence(keyframes, transition, getValueSequence("default", subjectSequence)); - } - else { - const subjects = resolveSubjects(subject, keyframes, scope, elementCache); - const numSubjects = subjects.length; - /** - * For every element in this segment, process the defined values. - */ - for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) { - /** - * Cast necessary, but we know these are of this type - */ - keyframes = keyframes; - transition = transition; - const thisSubject = subjects[subjectIndex]; - const subjectSequence = getSubjectSequence(thisSubject, sequences); - for (const key in keyframes) { - resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects); - } - } - } - prevTime = currentTime; - currentTime += maxDuration; - } - /** - * For every element and value combination create a new animation. - */ - sequences.forEach((valueSequences, element) => { - for (const key in valueSequences) { - const valueSequence = valueSequences[key]; - /** - * Arrange all the keyframes in ascending time order. - */ - valueSequence.sort(compareByTime); - const keyframes = []; - const valueOffset = []; - const valueEasing = []; - /** - * For each keyframe, translate absolute times into - * relative offsets based on the total duration of the timeline. - */ - for (let i = 0; i < valueSequence.length; i++) { - const { at, value, easing } = valueSequence[i]; - keyframes.push(value); - valueOffset.push(motionUtils.progress(0, totalDuration, at)); - valueEasing.push(easing || "easeOut"); - } - /** - * If the first keyframe doesn't land on offset: 0 - * provide one by duplicating the initial keyframe. This ensures - * it snaps to the first keyframe when the animation starts. - */ - if (valueOffset[0] !== 0) { - valueOffset.unshift(0); - keyframes.unshift(keyframes[0]); - valueEasing.unshift(defaultSegmentEasing); - } - /** - * If the last keyframe doesn't land on offset: 1 - * provide one with a null wildcard value. This will ensure it - * stays static until the end of the animation. - */ - if (valueOffset[valueOffset.length - 1] !== 1) { - valueOffset.push(1); - keyframes.push(null); - } - if (!animationDefinitions.has(element)) { - animationDefinitions.set(element, { - keyframes: {}, - transition: {}, - }); - } - const definition = animationDefinitions.get(element); - definition.keyframes[key] = keyframes; - /** - * Exclude `type` from defaultTransition since springs have been - * converted to duration-based easing functions in resolveValueSequence. - * Including `type: "spring"` would cause JSAnimation to error when - * the merged keyframes array has more than 2 keyframes. - */ - const { type: _type, ...remainingDefaultTransition } = defaultTransition; - definition.transition[key] = { - ...remainingDefaultTransition, - duration: totalDuration, - ease: valueEasing, - times: valueOffset, - ...sequenceTransition, - }; - } - }); - return animationDefinitions; -} -function getSubjectSequence(subject, sequences) { - !sequences.has(subject) && sequences.set(subject, {}); - return sequences.get(subject); -} -function getValueSequence(name, sequences) { - if (!sequences[name]) - sequences[name] = []; - return sequences[name]; -} -function keyframesAsList(keyframes) { - return Array.isArray(keyframes) ? keyframes : [keyframes]; -} -function getValueTransition(transition, key) { - return transition && transition[key] - ? { - ...transition, - ...transition[key], - } - : { ...transition }; -} -const isNumber = (keyframe) => typeof keyframe === "number"; -const isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber); - -function createDOMVisualElement(element) { - const options = { - presenceContext: null, - props: {}, - visualState: { - renderState: { - transform: {}, - transformOrigin: {}, - style: {}, - vars: {}, - attrs: {}, - }, - latestValues: {}, - }, - }; - const node = motionDom.isSVGElement(element) && !motionDom.isSVGSVGElement(element) - ? new motionDom.SVGVisualElement(options) - : new motionDom.HTMLVisualElement(options); - node.mount(element); - motionDom.visualElementStore.set(element, node); -} -function createObjectVisualElement(subject) { - const options = { - presenceContext: null, - props: {}, - visualState: { - renderState: { - output: {}, - }, - latestValues: {}, - }, - }; - const node = new motionDom.ObjectVisualElement(options); - node.mount(subject); - motionDom.visualElementStore.set(subject, node); -} - -function isSingleValue(subject, keyframes) { - return (motionDom.isMotionValue(subject) || - typeof subject === "number" || - (typeof subject === "string" && !isDOMKeyframes(keyframes))); -} -/** - * Implementation - */ -function animateSubject(subject, keyframes, options, scope) { - const animations = []; - if (isSingleValue(subject, keyframes)) { - animations.push(motionDom.animateSingleValue(subject, isDOMKeyframes(keyframes) - ? keyframes.default || keyframes - : keyframes, options ? options.default || options : options)); - } - else { - // Gracefully handle null/undefined subjects (e.g., from querySelector returning null) - if (subject == null) { - return animations; - } - const subjects = resolveSubjects(subject, keyframes, scope); - const numSubjects = subjects.length; - motionUtils.invariant(Boolean(numSubjects), "No valid elements provided.", "no-valid-elements"); - for (let i = 0; i < numSubjects; i++) { - const thisSubject = subjects[i]; - const createVisualElement = thisSubject instanceof Element - ? createDOMVisualElement - : createObjectVisualElement; - if (!motionDom.visualElementStore.has(thisSubject)) { - createVisualElement(thisSubject); - } - const visualElement = motionDom.visualElementStore.get(thisSubject); - const transition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if ("delay" in transition && - typeof transition.delay === "function") { - transition.delay = transition.delay(i, numSubjects); - } - animations.push(...motionDom.animateTarget(visualElement, { ...keyframes, transition }, {})); - } - } - return animations; -} - -function animateSequence(sequence, options, scope) { - const animations = []; - /** - * Pre-process: replace function segments with MotionValue segments, - * subscribe callbacks immediately - */ - const processedSequence = sequence.map((segment) => { - if (Array.isArray(segment) && typeof segment[0] === "function") { - const callback = segment[0]; - const mv = motionDom.motionValue(0); - mv.on("change", callback); - if (segment.length === 1) { - return [mv, [0, 1]]; - } - else if (segment.length === 2) { - return [mv, [0, 1], segment[1]]; - } - else { - return [mv, segment[1], segment[2]]; - } - } - return segment; - }); - const animationDefinitions = createAnimationsFromSequence(processedSequence, options, scope, { spring: motionDom.spring }); - animationDefinitions.forEach(({ keyframes, transition }, subject) => { - animations.push(...animateSubject(subject, keyframes, transition)); - }); - return animations; -} - -function isSequence(value) { - return Array.isArray(value) && value.some(Array.isArray); -} -/** - * Creates an animation function that is optionally scoped - * to a specific element. - */ -function createScopedAnimate(options = {}) { - const { scope, reduceMotion, skipAnimations } = options; - /** - * Implementation - */ - function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) { - let animations = []; - let animationOnComplete; - const inherited = {}; - if (reduceMotion !== undefined) - inherited.reduceMotion = reduceMotion; - if (skipAnimations !== undefined) - inherited.skipAnimations = skipAnimations; - if (isSequence(subjectOrSequence)) { - const { onComplete, ...sequenceOptions } = optionsOrKeyframes || {}; - if (typeof onComplete === "function") { - animationOnComplete = onComplete; - } - animations = animateSequence(subjectOrSequence, { ...inherited, ...sequenceOptions }, scope); - } - else { - // Extract top-level onComplete so it doesn't get applied per-value - const { onComplete, ...rest } = options || {}; - if (typeof onComplete === "function") { - animationOnComplete = onComplete; - } - animations = animateSubject(subjectOrSequence, optionsOrKeyframes, { ...inherited, ...rest }, scope); - } - const animation = new motionDom.GroupAnimationWithThen(animations); - if (animationOnComplete) { - animation.finished.then(animationOnComplete); - } - if (scope) { - scope.animations.push(animation); - animation.finished.then(() => { - motionUtils.removeItem(scope.animations, animation); - }); - } - return animation; - } - return scopedAnimate; -} -const animate = createScopedAnimate(); - -function animateElements(elementOrSelector, keyframes, options, scope) { - // Gracefully handle null/undefined elements (e.g., from querySelector returning null) - if (elementOrSelector == null) { - return []; - } - const elements = motionDom.resolveElements(elementOrSelector, scope); - const numElements = elements.length; - motionUtils.invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements"); - /** - * WAAPI doesn't support interrupting animations. - * - * Therefore, starting animations requires a three-step process: - * 1. Stop existing animations (write styles to DOM) - * 2. Resolve keyframes (read styles from DOM) - * 3. Create new animations (write styles to DOM) - * - * The hybrid `animate()` function uses AsyncAnimation to resolve - * keyframes before creating new animations, which removes style - * thrashing. Here, we have much stricter filesize constraints. - * Therefore we do this in a synchronous way that ensures that - * at least within `animate()` calls there is no style thrashing. - * - * In the motion-native-animate-mini-interrupt benchmark this - * was 80% faster than a single loop. - */ - const animationDefinitions = []; - /** - * Step 1: Build options and stop existing animations (write) - */ - for (let i = 0; i < numElements; i++) { - const element = elements[i]; - const elementTransition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if (typeof elementTransition.delay === "function") { - elementTransition.delay = elementTransition.delay(i, numElements); - } - for (const valueName in keyframes) { - let valueKeyframes = keyframes[valueName]; - if (!Array.isArray(valueKeyframes)) { - valueKeyframes = [valueKeyframes]; - } - const valueOptions = { - ...motionDom.getValueTransition(elementTransition, valueName), - }; - valueOptions.duration && (valueOptions.duration = motionUtils.secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = motionUtils.secondsToMilliseconds(valueOptions.delay)); - /** - * If there's an existing animation playing on this element then stop it - * before creating a new one. - */ - const map = motionDom.getAnimationMap(element); - const key = motionDom.animationMapKey(valueName, valueOptions.pseudoElement || ""); - const currentAnimation = map.get(key); - currentAnimation && currentAnimation.stop(); - animationDefinitions.push({ - map, - key, - unresolvedKeyframes: valueKeyframes, - options: { - ...valueOptions, - element, - name: valueName, - allowFlatten: !elementTransition.type && !elementTransition.ease, - }, - }); - } - } - /** - * Step 2: Resolve keyframes (read) - */ - for (let i = 0; i < animationDefinitions.length; i++) { - const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i]; - const { element, name, pseudoElement } = animationOptions; - if (!pseudoElement && unresolvedKeyframes[0] === null) { - unresolvedKeyframes[0] = motionDom.getComputedStyle(element, name); - } - motionDom.fillWildcards(unresolvedKeyframes); - motionDom.applyPxDefaults(unresolvedKeyframes, name); - /** - * If we only have one keyframe, explicitly read the initial keyframe - * from the computed style. This is to ensure consistency with WAAPI behaviour - * for restarting animations, for instance .play() after finish, when it - * has one vs two keyframes. - */ - if (!pseudoElement && unresolvedKeyframes.length < 2) { - unresolvedKeyframes.unshift(motionDom.getComputedStyle(element, name)); - } - animationOptions.keyframes = unresolvedKeyframes; - } - /** - * Step 3: Create new animations (write) - */ - const animations = []; - for (let i = 0; i < animationDefinitions.length; i++) { - const { map, key, options: animationOptions } = animationDefinitions[i]; - const animation = new motionDom.NativeAnimation(animationOptions); - map.set(key, animation); - animation.finished.finally(() => map.delete(key)); - animations.push(animation); - } - return animations; -} - -const createScopedWaapiAnimate = (scope) => { - function scopedAnimate(elementOrSelector, keyframes, options) { - return new motionDom.GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope)); - } - return scopedAnimate; -}; -const animateMini = /*@__PURE__*/ createScopedWaapiAnimate(); - -function canUseNativeTimeline(target) { - if (typeof window === "undefined") - return false; - return target ? motionDom.supportsViewTimeline() : motionDom.supportsScrollTimeline(); -} - -/** - * A time in milliseconds, beyond which we consider the scroll velocity to be 0. - */ -const maxElapsed = 50; -const createAxisInfo = () => ({ - current: 0, - offset: [], - progress: 0, - scrollLength: 0, - targetOffset: 0, - targetLength: 0, - containerLength: 0, - velocity: 0, -}); -const createScrollInfo = () => ({ - time: 0, - x: createAxisInfo(), - y: createAxisInfo(), -}); -const keys = { - x: { - length: "Width", - position: "Left", - }, - y: { - length: "Height", - position: "Top", - }, -}; -function updateAxisInfo(element, axisName, info, time) { - const axis = info[axisName]; - const { length, position } = keys[axisName]; - const prev = axis.current; - const prevTime = info.time; - axis.current = Math.abs(element[`scroll${position}`]); - axis.scrollLength = element[`scroll${length}`] - element[`client${length}`]; - axis.offset.length = 0; - axis.offset[0] = 0; - axis.offset[1] = axis.scrollLength; - axis.progress = motionUtils.progress(0, axis.scrollLength, axis.current); - const elapsed = time - prevTime; - axis.velocity = - elapsed > maxElapsed - ? 0 - : motionUtils.velocityPerSecond(axis.current - prev, elapsed); -} -function updateScrollInfo(element, info, time) { - updateAxisInfo(element, "x", info, time); - updateAxisInfo(element, "y", info, time); - info.time = time; -} - -function calcInset(element, container) { - const inset = { x: 0, y: 0 }; - let current = element; - while (current && current !== container) { - if (motionDom.isHTMLElement(current)) { - inset.x += current.offsetLeft; - inset.y += current.offsetTop; - current = current.offsetParent; - } - else if (current.tagName === "svg") { - /** - * This isn't an ideal approach to measuring the offset of tags. - * It would be preferable, given they behave like HTMLElements in most ways - * to use offsetLeft/Top. But these don't exist on . Likewise we - * can't use .getBBox() like most SVG elements as these provide the offset - * relative to the SVG itself, which for is usually 0x0. - */ - const svgBoundingBox = current.getBoundingClientRect(); - current = current.parentElement; - const parentBoundingBox = current.getBoundingClientRect(); - inset.x += svgBoundingBox.left - parentBoundingBox.left; - inset.y += svgBoundingBox.top - parentBoundingBox.top; - } - else if (current instanceof SVGGraphicsElement) { - const { x, y } = current.getBBox(); - inset.x += x; - inset.y += y; - let svg = null; - let parent = current.parentNode; - while (!svg) { - if (parent.tagName === "svg") { - svg = parent; - } - parent = current.parentNode; - } - current = svg; - } - else { - break; - } - } - return inset; -} - -const namedEdges = { - start: 0, - center: 0.5, - end: 1, -}; -function resolveEdge(edge, length, inset = 0) { - let delta = 0; - /** - * If we have this edge defined as a preset, replace the definition - * with the numerical value. - */ - if (edge in namedEdges) { - edge = namedEdges[edge]; - } - /** - * Handle unit values - */ - if (typeof edge === "string") { - const asNumber = parseFloat(edge); - if (edge.endsWith("px")) { - delta = asNumber; - } - else if (edge.endsWith("%")) { - edge = asNumber / 100; - } - else if (edge.endsWith("vw")) { - delta = (asNumber / 100) * document.documentElement.clientWidth; - } - else if (edge.endsWith("vh")) { - delta = (asNumber / 100) * document.documentElement.clientHeight; - } - else { - edge = asNumber; - } - } - /** - * If the edge is defined as a number, handle as a progress value. - */ - if (typeof edge === "number") { - delta = length * edge; - } - return inset + delta; -} - -const defaultOffset = [0, 0]; -function resolveOffset(offset, containerLength, targetLength, targetInset) { - let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset; - let targetPoint = 0; - let containerPoint = 0; - if (typeof offset === "number") { - /** - * If we're provided offset: [0, 0.5, 1] then each number x should become - * [x, x], so we default to the behaviour of mapping 0 => 0 of both target - * and container etc. - */ - offsetDefinition = [offset, offset]; - } - else if (typeof offset === "string") { - offset = offset.trim(); - if (offset.includes(" ")) { - offsetDefinition = offset.split(" "); - } - else { - /** - * If we're provided a definition like "100px" then we want to apply - * that only to the top of the target point, leaving the container at 0. - * Whereas a named offset like "end" should be applied to both. - */ - offsetDefinition = [offset, namedEdges[offset] ? offset : `0`]; - } - } - targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset); - containerPoint = resolveEdge(offsetDefinition[1], containerLength); - return targetPoint - containerPoint; -} - -const ScrollOffset = { - Enter: [ - [0, 1], - [1, 1], - ], - Exit: [ - [0, 0], - [1, 0], - ], - Any: [ - [1, 0], - [0, 1], - ], - All: [ - [0, 0], - [1, 1], - ], -}; - -const point = { x: 0, y: 0 }; -function getTargetSize(target) { - return "getBBox" in target && target.tagName !== "svg" - ? target.getBBox() - : { width: target.clientWidth, height: target.clientHeight }; -} -function resolveOffsets(container, info, options) { - const { offset: offsetDefinition = ScrollOffset.All } = options; - const { target = container, axis = "y" } = options; - const lengthLabel = axis === "y" ? "height" : "width"; - const inset = target !== container ? calcInset(target, container) : point; - /** - * Measure the target and container. If they're the same thing then we - * use the container's scrollWidth/Height as the target, from there - * all other calculations can remain the same. - */ - const targetSize = target === container - ? { width: container.scrollWidth, height: container.scrollHeight } - : getTargetSize(target); - const containerSize = { - width: container.clientWidth, - height: container.clientHeight, - }; - /** - * Reset the length of the resolved offset array rather than creating a new one. - * TODO: More reusable data structures for targetSize/containerSize would also be good. - */ - info[axis].offset.length = 0; - /** - * Populate the offset array by resolving the user's offset definition into - * a list of pixel scroll offets. - */ - let hasChanged = !info[axis].interpolate; - const numOffsets = offsetDefinition.length; - for (let i = 0; i < numOffsets; i++) { - const offset = resolveOffset(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]); - if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) { - hasChanged = true; - } - info[axis].offset[i] = offset; - } - /** - * If the pixel scroll offsets have changed, create a new interpolator function - * to map scroll value into a progress. - */ - if (hasChanged) { - info[axis].interpolate = motionDom.interpolate(info[axis].offset, motionDom.defaultOffset(offsetDefinition), { clamp: false }); - info[axis].interpolatorOffsets = [...info[axis].offset]; - } - info[axis].progress = motionUtils.clamp(0, 1, info[axis].interpolate(info[axis].current)); -} - -function measure(container, target = container, info) { - /** - * Find inset of target within scrollable container - */ - info.x.targetOffset = 0; - info.y.targetOffset = 0; - if (target !== container) { - let node = target; - while (node && node !== container) { - info.x.targetOffset += node.offsetLeft; - info.y.targetOffset += node.offsetTop; - node = node.offsetParent; - } - } - info.x.targetLength = - target === container ? target.scrollWidth : target.clientWidth; - info.y.targetLength = - target === container ? target.scrollHeight : target.clientHeight; - info.x.containerLength = container.clientWidth; - info.y.containerLength = container.clientHeight; - /** - * In development mode ensure scroll containers aren't position: static as this makes - * it difficult to measure their relative positions. The document scrolling element - * is exempt: offsetParent measurements naturally resolve relative to the document. - */ - if (process.env.NODE_ENV !== "production") { - if (container && - target && - target !== container && - container !== document.documentElement && - container !== document.scrollingElement && - container !== document.body) { - motionUtils.warnOnce(getComputedStyle(container).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly."); - } - } -} -function createOnScrollHandler(element, onScroll, info, options = {}) { - return { - measure: (time) => { - measure(element, options.target, info); - updateScrollInfo(element, info, time); - if (options.offset || options.target) { - resolveOffsets(element, info, options); - } - }, - notify: () => onScroll(info), - }; -} - -const scrollListeners = new WeakMap(); -const resizeListeners = new WeakMap(); -const onScrollHandlers = new WeakMap(); -const scrollSize = new WeakMap(); -const dimensionCheckProcesses = new WeakMap(); -const getEventTarget = (element) => element === document.scrollingElement ? window : element; -function scrollInfo(onScroll, { container = document.scrollingElement, trackContentSize = false, ...options } = {}) { - if (!container) - return motionUtils.noop; - let containerHandlers = onScrollHandlers.get(container); - /** - * Get the onScroll handlers for this container. - * If one isn't found, create a new one. - */ - if (!containerHandlers) { - containerHandlers = new Set(); - onScrollHandlers.set(container, containerHandlers); - } - /** - * Create a new onScroll handler for the provided callback. - */ - const info = createScrollInfo(); - const containerHandler = createOnScrollHandler(container, onScroll, info, options); - containerHandlers.add(containerHandler); - /** - * Check if there's a scroll event listener for this container. - * If not, create one. - */ - if (!scrollListeners.has(container)) { - const measureAll = () => { - for (const handler of containerHandlers) { - handler.measure(motionDom.frameData.timestamp); - } - motionDom.frame.preUpdate(notifyAll); - }; - const notifyAll = () => { - for (const handler of containerHandlers) { - handler.notify(); - } - }; - const listener = () => motionDom.frame.read(measureAll); - scrollListeners.set(container, listener); - const target = getEventTarget(container); - window.addEventListener("resize", listener); - if (container !== document.documentElement) { - resizeListeners.set(container, motionDom.resize(container, listener)); - } - target.addEventListener("scroll", listener); - listener(); - } - /** - * Enable content size tracking if requested and not already enabled. - */ - if (trackContentSize && !dimensionCheckProcesses.has(container)) { - const listener = scrollListeners.get(container); - // Store initial scroll dimensions (object is reused to avoid allocation) - const size = { - width: container.scrollWidth, - height: container.scrollHeight, - }; - scrollSize.set(container, size); - // Add frame-based scroll dimension checking to detect content changes - const checkScrollDimensions = () => { - const newWidth = container.scrollWidth; - const newHeight = container.scrollHeight; - if (size.width !== newWidth || size.height !== newHeight) { - listener(); - size.width = newWidth; - size.height = newHeight; - } - }; - // Schedule with keepAlive=true to run every frame - const dimensionCheckProcess = motionDom.frame.read(checkScrollDimensions, true); - dimensionCheckProcesses.set(container, dimensionCheckProcess); - } - const listener = scrollListeners.get(container); - motionDom.frame.read(listener, false, true); - return () => { - motionDom.cancelFrame(listener); - /** - * Check if we even have any handlers for this container. - */ - const currentHandlers = onScrollHandlers.get(container); - if (!currentHandlers) - return; - currentHandlers.delete(containerHandler); - if (currentHandlers.size) - return; - /** - * If no more handlers, remove the scroll listener too. - */ - const scrollListener = scrollListeners.get(container); - scrollListeners.delete(container); - if (scrollListener) { - getEventTarget(container).removeEventListener("scroll", scrollListener); - resizeListeners.get(container)?.(); - window.removeEventListener("resize", scrollListener); - } - // Clean up scroll dimension checking - const dimensionCheckProcess = dimensionCheckProcesses.get(container); - if (dimensionCheckProcess) { - motionDom.cancelFrame(dimensionCheckProcess); - dimensionCheckProcesses.delete(container); - } - scrollSize.delete(container); - }; -} - -/** - * Maps from ProgressIntersection pairs used by Motion's preset offsets to - * ViewTimeline named ranges. Returns undefined for unrecognised patterns, - * which signals the caller to fall back to JS-based scroll tracking. - */ -const presets = [ - [ScrollOffset.Enter, "entry"], - [ScrollOffset.Exit, "exit"], - [ScrollOffset.Any, "cover"], - [ScrollOffset.All, "contain"], -]; -const stringToProgress = { - start: 0, - end: 1, -}; -function parseStringOffset(s) { - const parts = s.trim().split(/\s+/); - if (parts.length !== 2) - return undefined; - const a = stringToProgress[parts[0]]; - const b = stringToProgress[parts[1]]; - if (a === undefined || b === undefined) - return undefined; - return [a, b]; -} -function normaliseOffset(offset) { - if (offset.length !== 2) - return undefined; - const result = []; - for (const item of offset) { - if (Array.isArray(item)) { - result.push(item); - } - else if (typeof item === "string") { - const parsed = parseStringOffset(item); - if (!parsed) - return undefined; - result.push(parsed); - } - else { - return undefined; - } - } - return result; -} -function matchesPreset(offset, preset) { - const normalised = normaliseOffset(offset); - if (!normalised) - return false; - for (let i = 0; i < 2; i++) { - const o = normalised[i]; - const p = preset[i]; - if (o[0] !== p[0] || o[1] !== p[1]) - return false; - } - return true; -} -function offsetToViewTimelineRange(offset) { - if (!offset) { - return { rangeStart: "contain 0%", rangeEnd: "contain 100%" }; - } - for (const [preset, name] of presets) { - if (matchesPreset(offset, preset)) { - return { rangeStart: `${name} 0%`, rangeEnd: `${name} 100%` }; - } - } - return undefined; -} - -const timelineCache = new Map(); -function scrollTimelineFallback(options) { - const currentTime = { value: 0 }; - const cancel = scrollInfo((info) => { - currentTime.value = info[options.axis].progress * 100; - }, options); - return { currentTime, cancel }; -} -function getTimeline({ source, container, ...options }) { - const { axis } = options; - if (source) - container = source; - let containerCache = timelineCache.get(container); - if (!containerCache) { - containerCache = new Map(); - timelineCache.set(container, containerCache); - } - const targetKey = options.target ?? "self"; - let targetCache = containerCache.get(targetKey); - if (!targetCache) { - targetCache = {}; - containerCache.set(targetKey, targetCache); - } - const axisKey = axis + (options.offset ?? []).join(","); - if (!targetCache[axisKey]) { - if (options.target && canUseNativeTimeline(options.target)) { - const range = offsetToViewTimelineRange(options.offset); - if (range) { - targetCache[axisKey] = new ViewTimeline({ - subject: options.target, - axis, - }); - } - else { - targetCache[axisKey] = scrollTimelineFallback({ - container, - ...options, - }); - } - } - else if (canUseNativeTimeline()) { - targetCache[axisKey] = new ScrollTimeline({ - source: container, - axis, - }); - } - else { - targetCache[axisKey] = scrollTimelineFallback({ - container, - ...options, - }); - } - } - return targetCache[axisKey]; -} - -function attachToAnimation(animation, options) { - const timeline = getTimeline(options); - const range = options.target - ? offsetToViewTimelineRange(options.offset) - : undefined; - /** - * Use native timeline when: - * - No target: ScrollTimeline (existing behaviour) - * - Target with mappable offset: ViewTimeline with named range - * - Target with unmappable offset: fall back to JS observe - */ - const useNative = options.target - ? canUseNativeTimeline(options.target) && !!range - : canUseNativeTimeline(); - return animation.attachTimeline({ - timeline: useNative ? timeline : undefined, - ...(range && - useNative && { - rangeStart: range.rangeStart, - rangeEnd: range.rangeEnd, - }), - observe: (valueAnimation) => { - valueAnimation.pause(); - return motionDom.observeTimeline((progress) => { - valueAnimation.time = - valueAnimation.iterationDuration * progress; - }, timeline); - }, - }); -} - -/** - * Currently, we only support element tracking with `scrollInfo`, though in - * the future we can also offer ViewTimeline support. - */ -function isElementTracking(options) { - return options && (options.target || options.offset); -} - -/** - * If the onScroll function has two arguments, it's expecting - * more specific information about the scroll from scrollInfo. - */ -function isOnScrollWithInfo(onScroll) { - return onScroll.length === 2; -} -function attachToFunction(onScroll, options) { - if (isOnScrollWithInfo(onScroll) || isElementTracking(options)) { - return scrollInfo((info) => { - onScroll(info[options.axis].progress, info); - }, options); - } - else { - return motionDom.observeTimeline(onScroll, getTimeline(options)); - } -} - -function scroll(onScroll, { axis = "y", container = document.scrollingElement, ...options } = {}) { - if (!container) - return motionUtils.noop; - const optionsWithDefaults = { axis, container, ...options }; - return typeof onScroll === "function" - ? attachToFunction(onScroll, optionsWithDefaults) - : attachToAnimation(onScroll, optionsWithDefaults); -} - -const thresholds = { - some: 0, - all: 1, -}; -function inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = "some" } = {}) { - const elements = motionDom.resolveElements(elementOrSelector); - const activeIntersections = new WeakMap(); - const onIntersectionChange = (entries) => { - entries.forEach((entry) => { - const onEnd = activeIntersections.get(entry.target); - /** - * If there's no change to the intersection, we don't need to - * do anything here. - */ - if (entry.isIntersecting === Boolean(onEnd)) - return; - if (entry.isIntersecting) { - const newOnEnd = onStart(entry.target, entry); - if (typeof newOnEnd === "function") { - activeIntersections.set(entry.target, newOnEnd); - } - else { - observer.unobserve(entry.target); - } - } - else if (typeof onEnd === "function") { - onEnd(entry); - activeIntersections.delete(entry.target); - } - }); - }; - const observer = new IntersectionObserver(onIntersectionChange, { - root, - rootMargin, - threshold: typeof amount === "number" ? amount : thresholds[amount], - }); - elements.forEach((element) => observer.observe(element)); - return () => observer.disconnect(); -} - -const m = /*@__PURE__*/ createMotionProxy(); - -function useUnmountEffect(callback) { - return React.useEffect(() => () => callback(), []); -} - -/** - * @public - */ -const domAnimation = { - renderer: featureBundle.createDomVisualElement, - ...featureBundle.animations, - ...featureBundle.gestureAnimations, -}; - -/** - * @public - */ -const domMax = { - ...domAnimation, - ...featureBundle.drag, - ...featureBundle.layout, -}; - -/** - * @public - */ -const domMin = { - renderer: featureBundle.createDomVisualElement, - ...featureBundle.animations, -}; - -function useMotionValueEvent(value, event, callback) { - /** - * useInsertionEffect will create subscriptions before any other - * effects will run. Effects run upwards through the tree so it - * can be that binding a useLayoutEffect higher up the tree can - * miss changes from lower down the tree. - */ - React.useInsertionEffect(() => value.on(event, callback), [value, event, callback]); -} - -const createScrollMotionValues = () => ({ - scrollX: motionDom.motionValue(0), - scrollY: motionDom.motionValue(0), - scrollXProgress: motionDom.motionValue(0), - scrollYProgress: motionDom.motionValue(0), -}); -const isRefPending = (ref) => { - if (!ref) - return false; - return !ref.current; -}; -function makeAccelerateConfig(axis, options, container, target) { - return { - // Refs attach child-first; defer so target.current is populated - // before scroll() reads it. - factory: (animation) => { - let cleanup; - const start = () => { - // A provided ref may be hydrated by an effect declared after - // useScroll (or in a parent). Don't attach to the window - // scroll in the meantime — that result gets cached and would - // permanently mistrack. Wait until the ref resolves. - if (isRefPending(container) || isRefPending(target)) { - motionDom.microtask.read(start); - return; - } - cleanup = scroll(animation, { - ...options, - axis, - container: container?.current || undefined, - target: target?.current || undefined, - }); - }; - motionDom.microtask.read(start); - return () => { - motionDom.cancelMicrotask(start); - cleanup?.(); - }; - }, - times: [0, 1], - keyframes: [0, 1], - ease: (v) => v, - duration: 1, - }; -} -function canAccelerateScroll(target, offset) { - if (typeof window === "undefined") - return false; - return target - ? motionDom.supportsViewTimeline() && !!offsetToViewTimelineRange(offset) - : motionDom.supportsScrollTimeline(); -} -function useScroll({ container, target, ...options } = {}) { - const values = index.useConstant(createScrollMotionValues); - if (canAccelerateScroll(target, options.offset)) { - values.scrollXProgress.accelerate = makeAccelerateConfig("x", options, container, target); - values.scrollYProgress.accelerate = makeAccelerateConfig("y", options, container, target); - } - const scrollAnimation = React.useRef(null); - const needsStart = React.useRef(false); - const start = React.useCallback(() => { - scrollAnimation.current = scroll((_progress, { x, y, }) => { - values.scrollX.set(x.current); - values.scrollXProgress.set(x.progress); - values.scrollY.set(y.current); - values.scrollYProgress.set(y.progress); - }, { - ...options, - container: container?.current || undefined, - target: target?.current || undefined, - }); - return () => { - scrollAnimation.current?.(); - }; - }, [container, target, JSON.stringify(options.offset)]); - index.useIsomorphicLayoutEffect(() => { - needsStart.current = false; - if (isRefPending(container) || isRefPending(target)) { - needsStart.current = true; - return; - } - else { - return start(); - } - }, [start]); - React.useEffect(() => { - if (!needsStart.current) - return; - // Defer to a microtask so any sibling/parent effect that hydrates the - // ref has a chance to run first. - let cleanup; - const tryStart = () => { - const containerPending = isRefPending(container); - const targetPending = isRefPending(target); - motionUtils.invariant(!containerPending, "Container ref is defined but not hydrated", "use-scroll-ref"); - motionUtils.invariant(!targetPending, "Target ref is defined but not hydrated", "use-scroll-ref"); - if (!containerPending && !targetPending) - cleanup = start(); - }; - motionDom.microtask.read(tryStart); - return () => { - motionDom.cancelMicrotask(tryStart); - cleanup?.(); - }; - }, [start]); - return values; -} - -/** - * @deprecated useElementScroll is deprecated. Convert to useScroll({ container: ref }) - */ -function useElementScroll(ref) { - if (process.env.NODE_ENV === "development") { - motionUtils.warnOnce(false, "useElementScroll is deprecated. Convert to useScroll({ container: ref })."); - } - return useScroll({ container: ref }); -} - -/** - * @deprecated useViewportScroll is deprecated. Convert to useScroll() - */ -function useViewportScroll() { - if (process.env.NODE_ENV !== "production") { - motionUtils.warnOnce(false, "useViewportScroll is deprecated. Convert to useScroll()."); - } - return useScroll(); -} - -/** - * Combine multiple motion values into a new one using a string template literal. - * - * ```jsx - * import { - * motion, - * useSpring, - * useMotionValue, - * useMotionTemplate - * } from "framer-motion" - * - * function Component() { - * const shadowX = useSpring(0) - * const shadowY = useMotionValue(0) - * const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))` - * - * return - * } - * ``` - * - * @public - */ -function useMotionTemplate(fragments, ...values) { - /** - * Create a function that will build a string from the latest motion values. - */ - const numFragments = fragments.length; - function buildValue() { - let output = ``; - for (let i = 0; i < numFragments; i++) { - output += fragments[i]; - const value = values[i]; - if (value) { - output += motionDom.isMotionValue(value) ? value.get() : value; - } - } - return output; - } - return useCombineMotionValues(values.filter(motionDom.isMotionValue), buildValue); -} - -function useFollowValue(source, options = {}) { - const { isStatic } = React.useContext(index.MotionConfigContext); - const getFromSource = () => (motionDom.isMotionValue(source) ? source.get() : source); - // isStatic will never change, allowing early hooks return - if (isStatic) { - return useTransform(getFromSource); - } - const value = useMotionValue(getFromSource()); - React.useInsertionEffect(() => { - return motionDom.attachFollow(value, source, options); - }, [value, JSON.stringify(options)]); - return value; -} - -function useSpring(source, options = {}) { - return useFollowValue(source, { type: "spring", ...options }); -} - -function useAnimationFrame(callback) { - const initialTimestamp = React.useRef(0); - const { isStatic } = React.useContext(index.MotionConfigContext); - React.useEffect(() => { - if (isStatic) - return; - const provideTimeSinceStart = ({ timestamp, delta }) => { - if (!initialTimestamp.current) - initialTimestamp.current = timestamp; - callback(timestamp - initialTimestamp.current, delta); - }; - motionDom.frame.update(provideTimeSinceStart, true); - return () => motionDom.cancelFrame(provideTimeSinceStart); - }, [callback]); -} - -function useTime() { - const time = useMotionValue(0); - useAnimationFrame((t) => time.set(t)); - return time; -} - -/** - * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes. - * - * ```javascript - * const x = useMotionValue(0) - * const xVelocity = useVelocity(x) - * const xAcceleration = useVelocity(xVelocity) - * ``` - * - * @public - */ -function useVelocity(value) { - const velocity = useMotionValue(value.getVelocity()); - const updateVelocity = () => { - const latest = value.getVelocity(); - velocity.set(latest); - /** - * If we still have velocity, schedule an update for the next frame - * to keep checking until it is zero. - */ - if (latest) - motionDom.frame.update(updateVelocity); - }; - useMotionValueEvent(value, "change", () => { - // Schedule an update to this value at the end of the current frame. - motionDom.frame.update(updateVelocity, false, true); - }); - return velocity; -} - -class WillChangeMotionValue extends motionDom.MotionValue { - constructor() { - super(...arguments); - this.isEnabled = false; - } - add(name) { - if (motionDom.transformProps.has(name) || motionDom.acceleratedValues.has(name)) { - this.isEnabled = true; - this.update(); - } - } - update() { - this.set(this.isEnabled ? "transform" : "auto"); - } -} - -function useWillChange() { - return index.useConstant(() => new WillChangeMotionValue("auto")); -} - -/** - * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting. - * - * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing - * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion. - * - * It will actively respond to changes and re-render your components with the latest setting. - * - * ```jsx - * export function Sidebar({ isOpen }) { - * const shouldReduceMotion = useReducedMotion() - * const closedX = shouldReduceMotion ? 0 : "-100%" - * - * return ( - * - * ) - * } - * ``` - * - * @return boolean - * - * @public - */ -function useReducedMotion() { - /** - * Lazy initialisation of prefersReducedMotion - */ - !motionDom.hasReducedMotionListener.current && motionDom.initPrefersReducedMotion(); - const [shouldReduceMotion] = React.useState(motionDom.prefersReducedMotion.current); - if (process.env.NODE_ENV !== "production") { - motionUtils.warnOnce(shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"); - } - /** - * TODO See if people miss automatically updating shouldReduceMotion setting - */ - return shouldReduceMotion; -} - -function useReducedMotionConfig() { - const reducedMotionPreference = useReducedMotion(); - const { reducedMotion } = React.useContext(index.MotionConfigContext); - if (reducedMotion === "never") { - return false; - } - else if (reducedMotion === "always") { - return true; - } - else { - return reducedMotionPreference; - } -} - -function stopAnimation(visualElement) { - visualElement.values.forEach((value) => value.stop()); -} -function setVariants(visualElement, variantLabels) { - const reversedLabels = [...variantLabels].reverse(); - reversedLabels.forEach((key) => { - const variant = visualElement.getVariant(key); - variant && motionDom.setTarget(visualElement, variant); - if (visualElement.variantChildren) { - visualElement.variantChildren.forEach((child) => { - setVariants(child, variantLabels); - }); - } - }); -} -function setValues(visualElement, definition) { - if (Array.isArray(definition)) { - return setVariants(visualElement, definition); - } - else if (typeof definition === "string") { - return setVariants(visualElement, [definition]); - } - else { - motionDom.setTarget(visualElement, definition); - } -} -/** - * @public - */ -function animationControls() { - /** - * Track whether the host component has mounted. - */ - let hasMounted = false; - /** - * A collection of linked component animation controls. - */ - const subscribers = new Set(); - const controls = { - subscribe(visualElement) { - subscribers.add(visualElement); - return () => void subscribers.delete(visualElement); - }, - start(definition, transitionOverride) { - motionUtils.invariant(hasMounted, "controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook."); - const animations = []; - subscribers.forEach((visualElement) => { - animations.push(motionDom.animateVisualElement(visualElement, definition, { - transitionOverride, - })); - }); - return Promise.all(animations); - }, - set(definition) { - motionUtils.invariant(hasMounted, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."); - return subscribers.forEach((visualElement) => { - setValues(visualElement, definition); - }); - }, - stop() { - subscribers.forEach((visualElement) => { - stopAnimation(visualElement); - }); - }, - mount() { - hasMounted = true; - return () => { - hasMounted = false; - controls.stop(); - }; - }, - }; - return controls; -} - -function useAnimate() { - const scope = index.useConstant(() => ({ - current: null, // Will be hydrated by React - animations: [], - })); - const reduceMotion = useReducedMotionConfig() ?? undefined; - const { skipAnimations } = React.useContext(index.MotionConfigContext); - const animate = React.useMemo(() => createScopedAnimate({ scope, reduceMotion, skipAnimations }), [scope, reduceMotion, skipAnimations]); - useUnmountEffect(() => { - scope.animations.forEach((animation) => animation.stop()); - scope.animations.length = 0; - }); - return [scope, animate]; -} - -function useAnimateMini() { - const scope = index.useConstant(() => ({ - current: null, // Will be hydrated by React - animations: [], - })); - const animate = index.useConstant(() => createScopedWaapiAnimate(scope)); - useUnmountEffect(() => { - scope.animations.forEach((animation) => animation.stop()); - }); - return [scope, animate]; -} - -/** - * Creates `LegacyAnimationControls`, which can be used to manually start, stop - * and sequence animations on one or more components. - * - * The returned `LegacyAnimationControls` should be passed to the `animate` property - * of the components you want to animate. - * - * These components can then be animated with the `start` method. - * - * ```jsx - * import * as React from 'react' - * import { motion, useAnimation } from 'framer-motion' - * - * export function MyComponent(props) { - * const controls = useAnimation() - * - * controls.start({ - * x: 100, - * transition: { duration: 0.5 }, - * }) - * - * return - * } - * ``` - * - * @returns Animation controller with `start` and `stop` methods - * - * @public - */ -function useAnimationControls() { - const controls = index.useConstant(animationControls); - index.useIsomorphicLayoutEffect(controls.mount, []); - return controls; -} -const useAnimation = useAnimationControls; - -function usePresenceData() { - const context = React.useContext(index.PresenceContext); - return context ? context.custom : undefined; -} - -/** - * Attaches an event listener directly to the provided DOM element. - * - * Bypassing React's event system can be desirable, for instance when attaching non-passive - * event handlers. - * - * ```jsx - * const ref = useRef(null) - * - * useDomEvent(ref, 'wheel', onWheel, { passive: false }) - * - * return

- * ``` - * - * @param ref - React.RefObject that's been provided to the element you want to bind the listener to. - * @param eventName - Name of the event you want listen for. - * @param handler - Function to fire when receiving the event. - * @param options - Options to pass to `Event.addEventListener`. - * - * @public - */ -function useDomEvent(ref, eventName, handler, options) { - React.useEffect(() => { - const element = ref.current; - if (handler && element) { - return motionDom.addDomEvent(element, eventName, handler, options); - } - }, [ref, eventName, handler, options]); -} - -/** - * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components. - * - * ```jsx - * const dragControls = useDragControls() - * - * function startDrag(event) { - * dragControls.start(event, { snapToCursor: true }) - * } - * - * return ( - * <> - *
- * - * - * ) - * ``` - * - * @public - */ -class DragControls { - constructor() { - this.componentControls = new Set(); - } - /** - * Subscribe a component's internal `VisualElementDragControls` to the user-facing API. - * - * @internal - */ - subscribe(controls) { - this.componentControls.add(controls); - return () => this.componentControls.delete(controls); - } - /** - * Start a drag gesture on every `motion` component that has this set of drag controls - * passed into it via the `dragControls` prop. - * - * ```jsx - * dragControls.start(e, { - * snapToCursor: true - * }) - * ``` - * - * @param event - PointerEvent - * @param options - Options - * - * @public - */ - start(event, options) { - this.componentControls.forEach((controls) => { - controls.start(event.nativeEvent || event, options); - }); - } - /** - * Cancels a drag gesture. - * - * ```jsx - * dragControls.cancel() - * ``` - * - * @public - */ - cancel() { - this.componentControls.forEach((controls) => { - controls.cancel(); - }); - } - /** - * Stops a drag gesture. - * - * ```jsx - * dragControls.stop() - * ``` - * - * @public - */ - stop() { - this.componentControls.forEach((controls) => { - controls.stop(); - }); - } -} -const createDragControls = () => new DragControls(); -/** - * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop - * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we - * might want to initiate that dragging from a different component than the draggable one. - * - * By creating a `dragControls` using the `useDragControls` hook, we can pass this into - * the draggable component's `dragControls` prop. It exposes a `start` method - * that can start dragging from pointer events on other components. - * - * ```jsx - * const dragControls = useDragControls() - * - * function startDrag(event) { - * dragControls.start(event, { snapToCursor: true }) - * } - * - * return ( - * <> - *
- * - * - * ) - * ``` - * - * @public - */ -function useDragControls() { - return index.useConstant(createDragControls); -} - -/** - * Checks if a component is a `motion` component. - */ -function isMotionComponent(component) { - return (component !== null && - typeof component === "object" && - index.motionComponentSymbol in component); -} - -/** - * Unwraps a `motion` component and returns either a string for `motion.div` or - * the React component for `motion(Component)`. - * - * If the component is not a `motion` component it returns undefined. - */ -function unwrapMotionComponent(component) { - if (isMotionComponent(component)) { - return component[index.motionComponentSymbol]; - } - return undefined; -} - -function useInstantLayoutTransition() { - return startTransition; -} -function startTransition(callback) { - if (!motionDom.rootProjectionNode.current) - return; - motionDom.rootProjectionNode.current.isUpdating = false; - motionDom.rootProjectionNode.current.blockUpdate(); - callback && callback(); -} - -function useResetProjection() { - const reset = React.useCallback(() => { - const root = motionDom.rootProjectionNode.current; - if (!root) - return; - root.resetTree(); - }, []); - return reset; -} - -/** - * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments. - * - * An index value can be passed to the returned `cycle` function to cycle to a specific index. - * - * ```jsx - * import * as React from "react" - * import { motion, useCycle } from "framer-motion" - * - * export const MyComponent = () => { - * const [x, cycleX] = useCycle(0, 50, 100) - * - * return ( - * cycleX()} - * /> - * ) - * } - * ``` - * - * @param items - items to cycle through - * @returns [currentState, cycleState] - * - * @public - */ -function useCycle(...items) { - const index = React.useRef(0); - const [item, setItem] = React.useState(items[index.current]); - const runCycle = React.useCallback((next) => { - index.current = - typeof next !== "number" - ? motionUtils.wrap(0, items.length, index.current + 1) - : next; - setItem(items[index.current]); - }, - // The array will change on each call, but by putting items.length at - // the front of this array, we guarantee the dependency comparison will match up - // eslint-disable-next-line react-hooks/exhaustive-deps - [items.length, ...items]); - return [item, runCycle]; -} - -function useInView(ref, { root, margin, amount, once = false, initial = false, } = {}) { - const [isInView, setInView] = React.useState(initial); - React.useEffect(() => { - if (!ref.current || (once && isInView)) - return; - const onEnter = () => { - setInView(true); - return once ? undefined : () => setInView(false); - }; - const options = { - root: (root && root.current) || undefined, - margin, - amount, - }; - return inView(ref.current, onEnter, options); - }, [root, ref, margin, once, amount]); - return isInView; -} - -function useInstantTransition() { - const [forceUpdate, forcedRenderCount] = useForceUpdate(); - const startInstantLayoutTransition = useInstantLayoutTransition(); - const unlockOnFrameRef = React.useRef(-1); - React.useEffect(() => { - /** - * Unblock after two animation frames, otherwise this will unblock too soon. - */ - motionDom.frame.postRender(() => motionDom.frame.postRender(() => { - /** - * If the callback has been called again after the effect - * triggered this 2 frame delay, don't unblock animations. This - * prevents the previous effect from unblocking the current - * instant transition too soon. This becomes more likely when - * used in conjunction with React.startTransition(). - */ - if (forcedRenderCount !== unlockOnFrameRef.current) - return; - motionUtils.MotionGlobalConfig.instantAnimations = false; - })); - }, [forcedRenderCount]); - return (callback) => { - startInstantLayoutTransition(() => { - motionUtils.MotionGlobalConfig.instantAnimations = true; - forceUpdate(); - callback(); - unlockOnFrameRef.current = forcedRenderCount + 1; - }); - }; -} -function disableInstantTransitions() { - motionUtils.MotionGlobalConfig.instantAnimations = false; -} - -function usePageInView() { - const [isInView, setIsInView] = React.useState(true); - React.useEffect(() => { - const handleVisibilityChange = () => setIsInView(!document.hidden); - if (document.hidden) { - handleVisibilityChange(); - } - document.addEventListener("visibilitychange", handleVisibilityChange); - return () => { - document.removeEventListener("visibilitychange", handleVisibilityChange); - }; - }, []); - return isInView; -} - -/** - * Creates a `transformPagePoint` function that accounts for SVG viewBox scaling. - * - * When dragging SVG elements inside an SVG with a viewBox that differs from - * the rendered dimensions (e.g., `viewBox="0 0 100 100"` but rendered at 500x500 pixels), - * pointer coordinates need to be transformed to match the SVG's coordinate system. - * - * @example - * ```jsx - * function App() { - * const svgRef = useRef(null) - * - * return ( - * - * - * - * - * - * ) - * } - * ``` - * - * @param svgRef - A React ref to the SVG element - * @returns A transformPagePoint function for use with MotionConfig - * - * @public - */ -function transformViewBoxPoint(svgRef) { - return (point) => { - const svg = svgRef.current; - if (!svg) { - return point; - } - // Get the viewBox attribute - const viewBox = svg.viewBox?.baseVal; - if (!viewBox || (viewBox.width === 0 && viewBox.height === 0)) { - // No viewBox or empty viewBox - no transformation needed - return point; - } - // Get the rendered dimensions of the SVG - const bbox = svg.getBoundingClientRect(); - if (bbox.width === 0 || bbox.height === 0) { - return point; - } - // Calculate scale factors - const scaleX = viewBox.width / bbox.width; - const scaleY = viewBox.height / bbox.height; - // Get the SVG's position on the page - const svgX = bbox.left + window.scrollX; - const svgY = bbox.top + window.scrollY; - // Transform the point: - // 1. Calculate position relative to SVG - // 2. Scale by viewBox/viewport ratio - // 3. Add back the SVG position (but in SVG coordinates) - return { - x: (point.x - svgX) * scaleX + svgX, - y: (point.y - svgY) * scaleY + svgY, - }; - }; -} - -/** - * Creates a `transformPagePoint` function that corrects pointer coordinates - * for a parent container with CSS transforms (rotation, scale, skew). - * - * When dragging elements inside a transformed parent, pointer coordinates - * need to be transformed through the inverse of the parent's transform - * so the drag offset is in local space. - * - * Works with both static and continuously animating transforms. - * - * @example - * ```jsx - * function App() { - * const ref = useRef(null) - * - * return ( - * - * - * - * - * - * ) - * } - * ``` - * - * @param parentRef - A React ref to the transformed parent element - * @returns A transformPagePoint function for use with MotionConfig - * - * @public - */ -function correctParentTransform(parentRef) { - return (point) => { - const parent = parentRef.current; - if (!parent) - return point; - const inv = getInverseMatrix(parent); - if (!inv) - return point; - // Get center of rotation in page space - const rect = parent.getBoundingClientRect(); - const cx = rect.left + window.scrollX + rect.width / 2; - const cy = rect.top + window.scrollY + rect.height / 2; - // Transform (point - center) through inverse, then add center back - const dx = point.x - cx; - const dy = point.y - cy; - return { - x: cx + inv.a * dx + inv.c * dy, - y: cy + inv.b * dx + inv.d * dy, - }; - }; -} -function getInverseMatrix(element) { - const { transform } = getComputedStyle(element); - if (!transform || transform === "none") - return null; - const match = transform.match(/^matrix3d\((.*)\)$/u) || - transform.match(/^matrix\((.*)\)$/u); - if (!match) - return null; - const v = match[1].split(",").map(Number); - const is3d = transform.startsWith("matrix3d"); - const a = v[0], b = v[1]; - const c = is3d ? v[4] : v[2]; - const d = is3d ? v[5] : v[3]; - const det = a * d - b * c; - if (Math.abs(det) < 1e-10) - return null; - return { a: d / det, b: -b / det, c: -c / det, d: a / det }; -} - -const appearAnimationStore = new Map(); -const appearComplete = new Map(); - -const appearStoreId = (elementId, valueName) => { - const key = motionDom.transformProps.has(valueName) ? "transform" : valueName; - return `${elementId}: ${key}`; -}; - -function handoffOptimizedAppearAnimation(elementId, valueName, frame) { - const storeId = appearStoreId(elementId, valueName); - const optimisedAnimation = appearAnimationStore.get(storeId); - if (!optimisedAnimation) { - return null; - } - const { animation, startTime } = optimisedAnimation; - function cancelAnimation() { - window.MotionCancelOptimisedAnimation?.(elementId, valueName, frame); - } - /** - * We can cancel the animation once it's finished now that we've synced - * with Motion. - * - * Prefer onfinish over finished as onfinish is backwards compatible with - * older browsers. - */ - animation.onfinish = cancelAnimation; - if (startTime === null || window.MotionHandoffIsComplete?.(elementId)) { - /** - * If the startTime is null, this animation is the Paint Ready detection animation - * and we can cancel it immediately without handoff. - * - * Or if we've already handed off the animation then we're now interrupting it. - * In which case we need to cancel it. - */ - cancelAnimation(); - return null; - } - else { - return startTime; - } -} - -/** - * A single time to use across all animations to manually set startTime - * and ensure they're all in sync. - */ -let startFrameTime; -/** - * A dummy animation to detect when Chrome is ready to start - * painting the page and hold off from triggering the real animation - * until then. We only need one animation to detect paint ready. - * - * https://bugs.chromium.org/p/chromium/issues/detail?id=1406850 - */ -let readyAnimation; -/** - * Keep track of animations that were suspended vs cancelled so we - * can easily resume them when we're done measuring layout. - */ -const suspendedAnimations = new Set(); -function resumeSuspendedAnimations() { - suspendedAnimations.forEach((data) => { - data.animation.play(); - data.animation.startTime = data.startTime; - }); - suspendedAnimations.clear(); -} -function startOptimizedAppearAnimation(element, name, keyframes, options, onReady) { - // Prevent optimised appear animations if Motion has already started animating. - if (window.MotionIsMounted) { - return; - } - const id = element.dataset[motionDom.optimizedAppearDataId]; - if (!id) - return; - window.MotionHandoffAnimation = handoffOptimizedAppearAnimation; - const storeId = appearStoreId(id, name); - if (!readyAnimation) { - readyAnimation = motionDom.startWaapiAnimation(element, name, [keyframes[0], keyframes[0]], - /** - * 10 secs is basically just a super-safe duration to give Chrome - * long enough to get the animation ready. - */ - { duration: 10000, ease: "linear" }); - appearAnimationStore.set(storeId, { - animation: readyAnimation, - startTime: null, - }); - /** - * If there's no readyAnimation then there's been no instantiation - * of handoff animations. - */ - window.MotionHandoffAnimation = handoffOptimizedAppearAnimation; - window.MotionHasOptimisedAnimation = (elementId, valueName) => { - if (!elementId) - return false; - /** - * Keep a map of elementIds that have started animating. We check - * via ID instead of Element because of hydration errors and - * pre-hydration checks. We also actively record IDs as they start - * animating rather than simply checking for data-appear-id as - * this attrbute might be present but not lead to an animation, for - * instance if the element's appear animation is on a different - * breakpoint. - */ - if (!valueName) { - return appearComplete.has(elementId); - } - const animationId = appearStoreId(elementId, valueName); - return Boolean(appearAnimationStore.get(animationId)); - }; - window.MotionHandoffMarkAsComplete = (elementId) => { - if (appearComplete.has(elementId)) { - appearComplete.set(elementId, true); - } - }; - window.MotionHandoffIsComplete = (elementId) => { - return appearComplete.get(elementId) === true; - }; - /** - * We only need to cancel transform animations as - * they're the ones that will interfere with the - * layout animation measurements. - */ - window.MotionCancelOptimisedAnimation = (elementId, valueName, frame, canResume) => { - const animationId = appearStoreId(elementId, valueName); - const data = appearAnimationStore.get(animationId); - if (!data) - return; - if (frame && canResume === undefined) { - /** - * Wait until the end of the subsequent frame to cancel the animation - * to ensure we don't remove the animation before the main thread has - * had a chance to resolve keyframes and render. - */ - frame.postRender(() => { - frame.postRender(() => { - data.animation.cancel(); - }); - }); - } - else { - data.animation.cancel(); - } - if (frame && canResume) { - suspendedAnimations.add(data); - frame.render(resumeSuspendedAnimations); - } - else { - appearAnimationStore.delete(animationId); - /** - * If there are no more animations left, we can remove the cancel function. - * This will let us know when we can stop checking for conflicting layout animations. - */ - if (!appearAnimationStore.size) { - window.MotionCancelOptimisedAnimation = undefined; - } - } - }; - window.MotionCheckAppearSync = (visualElement, valueName, value) => { - const appearId = motionDom.getOptimisedAppearId(visualElement); - if (!appearId) - return; - const valueIsOptimised = window.MotionHasOptimisedAnimation?.(appearId, valueName); - const externalAnimationValue = visualElement.props.values?.[valueName]; - if (!valueIsOptimised || !externalAnimationValue) - return; - const removeSyncCheck = value.on("change", (latestValue) => { - if (externalAnimationValue.get() !== latestValue) { - window.MotionCancelOptimisedAnimation?.(appearId, valueName); - removeSyncCheck(); - } - }); - return removeSyncCheck; - }; - } - const startAnimation = () => { - readyAnimation.cancel(); - const appearAnimation = motionDom.startWaapiAnimation(element, name, keyframes, options); - /** - * Record the time of the first started animation. We call performance.now() once - * here and once in handoff to ensure we're getting - * close to a frame-locked time. This keeps all animations in sync. - */ - if (startFrameTime === undefined) { - startFrameTime = performance.now(); - } - appearAnimation.startTime = startFrameTime; - appearAnimationStore.set(storeId, { - animation: appearAnimation, - startTime: startFrameTime, - }); - if (onReady) - onReady(appearAnimation); - }; - appearComplete.set(id, false); - if (readyAnimation.ready) { - readyAnimation.ready.then(startAnimation).catch(motionUtils.noop); - } - else { - startAnimation(); - } -} - -const createObject = () => ({}); -class StateVisualElement extends motionDom.VisualElement { - constructor() { - super(...arguments); - this.measureInstanceViewportBox = motionDom.createBox; - } - build() { } - resetTransform() { } - restoreTransform() { } - removeValueFromRenderState() { } - renderInstance() { } - scrapeMotionValuesFromProps() { - return createObject(); - } - getBaseTargetFromProps() { - return undefined; - } - readValueFromInstance(_state, key, options) { - return options.initialState[key] || 0; - } - sortInstanceNodePosition() { - return 0; - } -} -const useVisualState = index.makeUseVisualState({ - scrapeMotionValuesFromProps: createObject, - createRenderState: createObject, -}); -/** - * This is not an officially supported API and may be removed - * on any version. - */ -function useAnimatedState(initialState) { - const [animationState, setAnimationState] = React.useState(initialState); - const visualState = useVisualState({}, false); - const element = index.useConstant(() => { - return new StateVisualElement({ - props: { - onUpdate: (v) => { - setAnimationState({ ...v }); - }, - }, - visualState, - presenceContext: null, - }, { initialState }); - }); - React.useLayoutEffect(() => { - element.mount({}); - return () => element.unmount(); - }, [element]); - const startAnimation = index.useConstant(() => (animationDefinition) => { - return motionDom.animateVisualElement(element, animationDefinition); - }); - return [animationState, startAnimation]; -} - -let id = 0; -const AnimateSharedLayout = ({ children }) => { - React__namespace.useEffect(() => { - motionUtils.invariant(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations"); - }, []); - return (jsxRuntime.jsx(LayoutGroup, { id: index.useConstant(() => `asl-${id++}`), children: children })); -}; - -// Keep things reasonable and avoid scale: Infinity. In practise we might need -// to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1] -// to simply hide content at unreasonable scales. -const maxScale = 100000; -const invertScale = (scale) => scale > 0.001 ? 1 / scale : maxScale; -let hasWarned = false; -/** - * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse - * of their respective parent scales. - * - * This is useful for undoing the distortion of content when scaling a parent component. - * - * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent. - * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output - * of those instead. - * - * ```jsx - * const MyComponent = () => { - * const { scaleX, scaleY } = useInvertedScale() - * return - * } - * ``` - * - * @deprecated - */ -function useInvertedScale(scale) { - let parentScaleX = useMotionValue(1); - let parentScaleY = useMotionValue(1); - const { visualElement } = React.useContext(index.MotionContext); - motionUtils.invariant(!!(scale || visualElement), "If no scale values are provided, useInvertedScale must be used within a child of another motion component."); - motionUtils.warning(hasWarned, "useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."); - hasWarned = true; - if (scale) { - parentScaleX = scale.scaleX || parentScaleX; - parentScaleY = scale.scaleY || parentScaleY; - } - else if (visualElement) { - parentScaleX = visualElement.getValue("scaleX", 1); - parentScaleY = visualElement.getValue("scaleY", 1); - } - const scaleX = useTransform(parentScaleX, invertScale); - const scaleY = useTransform(parentScaleY, invertScale); - return { scaleX, scaleY }; -} - -exports.LayoutGroupContext = index.LayoutGroupContext; -exports.MotionConfigContext = index.MotionConfigContext; -exports.MotionContext = index.MotionContext; -exports.PresenceContext = index.PresenceContext; -exports.SwitchLayoutGroupContext = index.SwitchLayoutGroupContext; -exports.filterProps = index.filterProps; -exports.isBrowser = index.isBrowser; -exports.isValidMotionProp = index.isValidMotionProp; -exports.makeUseVisualState = index.makeUseVisualState; -exports.useIsomorphicLayoutEffect = index.useIsomorphicLayoutEffect; -Object.defineProperty(exports, "VisualElement", { - enumerable: true, - get: function () { return motionDom.VisualElement; } -}); -Object.defineProperty(exports, "addScaleCorrector", { - enumerable: true, - get: function () { return motionDom.addScaleCorrector; } -}); -Object.defineProperty(exports, "animateVisualElement", { - enumerable: true, - get: function () { return motionDom.animateVisualElement; } -}); -Object.defineProperty(exports, "arc", { - enumerable: true, - get: function () { return motionDom.arc; } -}); -Object.defineProperty(exports, "buildTransform", { - enumerable: true, - get: function () { return motionDom.buildTransform; } -}); -Object.defineProperty(exports, "calcLength", { - enumerable: true, - get: function () { return motionDom.calcLength; } -}); -Object.defineProperty(exports, "createBox", { - enumerable: true, - get: function () { return motionDom.createBox; } -}); -Object.defineProperty(exports, "delay", { - enumerable: true, - get: function () { return motionDom.delay; } -}); -Object.defineProperty(exports, "optimizedAppearDataAttribute", { - enumerable: true, - get: function () { return motionDom.optimizedAppearDataAttribute; } -}); -Object.defineProperty(exports, "resolveMotionValue", { - enumerable: true, - get: function () { return motionDom.resolveMotionValue; } -}); -Object.defineProperty(exports, "visualElementStore", { - enumerable: true, - get: function () { return motionDom.visualElementStore; } -}); -exports.addPointerEvent = featureBundle.addPointerEvent; -exports.addPointerInfo = featureBundle.addPointerInfo; -exports.animations = featureBundle.animations; -exports.distance = featureBundle.distance; -exports.distance2D = featureBundle.distance2D; -exports.useIsPresent = featureBundle.useIsPresent; -exports.usePresence = featureBundle.usePresence; -Object.defineProperty(exports, "MotionGlobalConfig", { - enumerable: true, - get: function () { return motionUtils.MotionGlobalConfig; } -}); -exports.AnimatePresence = AnimatePresence; -exports.AnimateSharedLayout = AnimateSharedLayout; -exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext; -exports.DragControls = DragControls; -exports.LayoutGroup = LayoutGroup; -exports.LazyMotion = LazyMotion; -exports.MotionConfig = MotionConfig; -exports.PopChild = PopChild; -exports.PresenceChild = PresenceChild; -exports.Reorder = namespace; -exports.WillChangeMotionValue = WillChangeMotionValue; -exports.animate = animate; -exports.animateMini = animateMini; -exports.animationControls = animationControls; -exports.correctParentTransform = correctParentTransform; -exports.createScopedAnimate = createScopedAnimate; -exports.disableInstantTransitions = disableInstantTransitions; -exports.domAnimation = domAnimation; -exports.domMax = domMax; -exports.domMin = domMin; -exports.inView = inView; -exports.isMotionComponent = isMotionComponent; -exports.m = m; -exports.motion = motion; -exports.scroll = scroll; -exports.scrollInfo = scrollInfo; -exports.startOptimizedAppearAnimation = startOptimizedAppearAnimation; -exports.transformViewBoxPoint = transformViewBoxPoint; -exports.unwrapMotionComponent = unwrapMotionComponent; -exports.useAnimate = useAnimate; -exports.useAnimateMini = useAnimateMini; -exports.useAnimation = useAnimation; -exports.useAnimationControls = useAnimationControls; -exports.useAnimationFrame = useAnimationFrame; -exports.useComposedRefs = useComposedRefs; -exports.useCycle = useCycle; -exports.useDeprecatedAnimatedState = useAnimatedState; -exports.useDeprecatedInvertedScale = useInvertedScale; -exports.useDomEvent = useDomEvent; -exports.useDragControls = useDragControls; -exports.useElementScroll = useElementScroll; -exports.useFollowValue = useFollowValue; -exports.useForceUpdate = useForceUpdate; -exports.useInView = useInView; -exports.useInstantLayoutTransition = useInstantLayoutTransition; -exports.useInstantTransition = useInstantTransition; -exports.useMotionTemplate = useMotionTemplate; -exports.useMotionValue = useMotionValue; -exports.useMotionValueEvent = useMotionValueEvent; -exports.usePageInView = usePageInView; -exports.usePresenceData = usePresenceData; -exports.useReducedMotion = useReducedMotion; -exports.useReducedMotionConfig = useReducedMotionConfig; -exports.useResetProjection = useResetProjection; -exports.useScroll = useScroll; -exports.useSpring = useSpring; -exports.useTime = useTime; -exports.useTransform = useTransform; -exports.useUnmountEffect = useUnmountEffect; -exports.useVelocity = useVelocity; -exports.useViewportScroll = useViewportScroll; -exports.useWillChange = useWillChange; -Object.keys(motionDom).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return motionDom[k]; } - }); -}); -Object.keys(motionUtils).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return motionUtils[k]; } - }); -}); -//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index.js.map deleted file mode 100644 index 75943bc8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../../src/utils/use-composed-ref.ts","../../src/components/AnimatePresence/PopChild.tsx","../../src/components/AnimatePresence/PresenceChild.tsx","../../src/components/AnimatePresence/utils.ts","../../src/components/AnimatePresence/index.tsx","../../src/context/DeprecatedLayoutGroupContext.ts","../../src/utils/use-is-mounted.ts","../../src/utils/use-force-update.ts","../../src/components/LayoutGroup/index.tsx","../../src/components/LazyMotion/index.tsx","../../src/components/MotionConfig/index.tsx","../../src/context/ReorderContext.ts","../../src/render/components/create-proxy.ts","../../src/render/components/motion/proxy.ts","../../src/components/Reorder/utils/check-reorder.ts","../../src/components/Reorder/Group.tsx","../../src/value/use-motion-value.ts","../../src/value/use-combine-values.ts","../../src/value/use-computed.ts","../../src/value/use-transform.ts","../../src/components/Reorder/utils/auto-scroll.ts","../../src/components/Reorder/Item.tsx","../../src/animation/utils/is-dom-keyframes.ts","../../src/animation/animate/resolve-subjects.ts","../../src/animation/sequence/utils/calc-repeat-duration.ts","../../src/animation/sequence/utils/calc-time.ts","../../src/animation/sequence/utils/edit.ts","../../src/animation/sequence/utils/normalize-times.ts","../../src/animation/sequence/utils/sort.ts","../../src/animation/sequence/create.ts","../../src/animation/utils/create-visual-element.ts","../../src/animation/animate/subject.ts","../../src/animation/animate/sequence.ts","../../src/animation/animate/index.ts","../../src/animation/animators/waapi/animate-elements.ts","../../src/animation/animators/waapi/animate-style.ts","../../src/render/dom/scroll/utils/can-use-native-timeline.ts","../../src/render/dom/scroll/info.ts","../../src/render/dom/scroll/offsets/inset.ts","../../src/render/dom/scroll/offsets/edge.ts","../../src/render/dom/scroll/offsets/offset.ts","../../src/render/dom/scroll/offsets/presets.ts","../../src/render/dom/scroll/offsets/index.ts","../../src/render/dom/scroll/on-scroll-handler.ts","../../src/render/dom/scroll/track.ts","../../src/render/dom/scroll/utils/offset-to-range.ts","../../src/render/dom/scroll/utils/get-timeline.ts","../../src/render/dom/scroll/attach-animation.ts","../../src/render/dom/scroll/utils/is-element-tracking.ts","../../src/render/dom/scroll/attach-function.ts","../../src/render/dom/scroll/index.ts","../../src/render/dom/viewport/index.ts","../../src/render/components/m/proxy.ts","../../src/utils/use-unmount-effect.ts","../../src/render/dom/features-animation.ts","../../src/render/dom/features-max.ts","../../src/render/dom/features-min.ts","../../src/utils/use-motion-value-event.ts","../../src/value/use-scroll.ts","../../src/value/scroll/use-element-scroll.ts","../../src/value/scroll/use-viewport-scroll.ts","../../src/value/use-motion-template.ts","../../src/value/use-follow-value.ts","../../src/value/use-spring.ts","../../src/utils/use-animation-frame.ts","../../src/value/use-time.ts","../../src/value/use-velocity.ts","../../src/value/use-will-change/WillChangeMotionValue.ts","../../src/value/use-will-change/index.ts","../../src/utils/reduced-motion/use-reduced-motion.ts","../../src/utils/reduced-motion/use-reduced-motion-config.ts","../../src/animation/hooks/animation-controls.ts","../../src/animation/hooks/use-animate.ts","../../src/animation/hooks/use-animate-style.ts","../../src/animation/hooks/use-animation.ts","../../src/components/AnimatePresence/use-presence-data.ts","../../src/events/use-dom-event.ts","../../src/gestures/drag/use-drag-controls.ts","../../src/motion/utils/is-motion-component.ts","../../src/motion/utils/unwrap-motion-component.ts","../../src/projection/use-instant-layout-transition.ts","../../src/projection/use-reset-projection.ts","../../src/utils/use-cycle.ts","../../src/utils/use-in-view.ts","../../src/utils/use-instant-transition.ts","../../src/utils/use-page-in-view.ts","../../src/utils/transform-viewbox-point.ts","../../src/utils/transform-rotated-parent.ts","../../src/animation/optimized-appear/store.ts","../../src/animation/optimized-appear/store-id.ts","../../src/animation/optimized-appear/handoff.ts","../../src/animation/optimized-appear/start.ts","../../src/animation/hooks/use-animated-state.ts","../../src/components/AnimateSharedLayout.tsx","../../src/value/use-inverted-scale.ts"],"sourcesContent":["/**\n * Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx\n */\nimport * as React from \"react\"\n\ntype PossibleRef = React.Ref | undefined\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */\nfunction setRef(ref: PossibleRef, value: T): void | (() => void) {\n if (typeof ref === \"function\") {\n return ref(value)\n } else if (ref !== null && ref !== undefined) {\n ;(ref as React.MutableRefObject).current = value\n }\n}\n\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */\nfunction composeRefs(...refs: PossibleRef[]): React.RefCallback {\n return (node) => {\n let hasCleanup = false\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node)\n if (!hasCleanup && typeof cleanup === \"function\") {\n hasCleanup = true\n }\n return cleanup\n })\n // React <19 will log an error to the console if a callback ref returns a\n // value. We don't use ref cleanups internally so this will only happen if a\n // user's ref callback returns a value, which we only expect if they are\n // using the cleanup functionality added in React 19.\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i]\n if (typeof cleanup === \"function\") {\n cleanup()\n } else {\n setRef(refs[i], null)\n }\n }\n }\n }\n }\n}\n\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */\nfunction useComposedRefs(...refs: PossibleRef[]): React.RefCallback {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs)\n}\n\nexport { useComposedRefs }\n","\"use client\"\n\nimport { isHTMLElement } from \"motion-dom\"\nimport * as React from \"react\"\nimport { useContext, useId, useInsertionEffect, useRef } from \"react\"\n\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { useComposedRefs } from \"../../utils/use-composed-ref\"\n\ninterface Size {\n width: number\n height: number\n top: number\n left: number\n right: number\n bottom: number\n direction: string\n}\n\ninterface Props {\n children: React.ReactElement\n isPresent: boolean\n anchorX?: \"left\" | \"right\"\n anchorY?: \"top\" | \"bottom\"\n root?: HTMLElement | ShadowRoot\n pop?: boolean\n}\n\ninterface MeasureProps extends Props {\n childRef: React.RefObject\n sizeRef: React.RefObject\n}\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps: MeasureProps) {\n const element = this.props.childRef.current\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0\n\n const computedStyle = getComputedStyle(element)\n const size = this.props.sizeRef.current!\n size.height = parseFloat(computedStyle.height)\n size.width = parseFloat(computedStyle.width)\n size.top = element.offsetTop\n size.left = element.offsetLeft\n size.right = parentWidth - size.width - size.left\n size.bottom = parentHeight - size.height - size.top\n size.direction = computedStyle.direction\n }\n\n return null\n }\n\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() {}\n\n render() {\n return this.props.children\n }\n}\n\nexport function PopChild({ children, isPresent, anchorX, anchorY, root, pop }: Props) {\n const id = useId()\n const ref = useRef(null)\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n })\n const { nonce } = useContext(MotionConfigContext)\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n */\n const childRef =\n (children.props as { ref?: React.Ref })?.ref ??\n (children as unknown as { ref?: React.Ref })?.ref\n const composedRef = useComposedRefs(ref, childRef)\n\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left, right, bottom, direction } = size.current\n if (isPresent || pop === false || !ref.current || !width || !height) return\n\n const isRTL = direction === \"rtl\"\n const x = anchorX === \"left\"\n ? (isRTL ? `right: ${right}` : `left: ${left}`)\n : (isRTL ? `left: ${left}` : `right: ${right}`)\n const y = anchorY === \"bottom\" ? `bottom: ${bottom}` : `top: ${top}`\n\n ref.current.dataset.motionPopId = id\n\n const style = document.createElement(\"style\")\n if (nonce) style.nonce = nonce\n\n const parent = root ?? document.head\n parent.appendChild(style)\n\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n ${x}px !important;\n ${y}px !important;\n }\n `)\n }\n\n return () => {\n ref.current?.removeAttribute(\"data-motion-pop-id\")\n if (parent.contains(style)) {\n parent.removeChild(style)\n }\n }\n }, [isPresent])\n\n return (\n \n {pop === false\n ? children\n : React.cloneElement(children as any, { ref: composedRef })}\n \n )\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { useId, useMemo } from \"react\"\nimport {\n PresenceContext,\n type PresenceContextProps,\n} from \"../../context/PresenceContext\"\nimport { VariantLabels } from \"../../motion/types\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { PopChild } from \"./PopChild\"\n\ninterface PresenceChildProps {\n children: React.ReactElement\n isPresent: boolean\n onExitComplete?: () => void\n initial?: false | VariantLabels\n custom?: any\n presenceAffectsLayout: boolean\n mode: \"sync\" | \"popLayout\" | \"wait\"\n anchorX?: \"left\" | \"right\"\n anchorY?: \"top\" | \"bottom\"\n root?: HTMLElement | ShadowRoot\n}\n\nexport const PresenceChild = ({\n children,\n initial,\n isPresent,\n onExitComplete,\n custom,\n presenceAffectsLayout,\n mode,\n anchorX,\n anchorY,\n root\n}: PresenceChildProps) => {\n const presenceChildren = useConstant(newChildrenMap)\n const id = useId()\n\n let isReusedContext = true\n let context = useMemo((): PresenceContextProps => {\n isReusedContext = false\n return {\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId: string) => {\n presenceChildren.set(childId, true)\n\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete) return // can stop searching when any is incomplete\n }\n\n onExitComplete && onExitComplete()\n },\n register: (childId: string) => {\n presenceChildren.set(childId, false)\n return () => presenceChildren.delete(childId)\n },\n }\n }, [isPresent, presenceChildren, onExitComplete])\n\n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n if (presenceAffectsLayout && isReusedContext) {\n context = { ...context }\n }\n\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false))\n }, [isPresent])\n\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete()\n }, [isPresent])\n\n children = (\n \n {children}\n \n )\n\n return (\n \n {children}\n \n )\n}\n\nfunction newChildrenMap(): Map {\n return new Map()\n}\n","import { isValidElement, Children, ReactElement, ReactNode } from \"react\"\n\nexport type ComponentKey = string | number\n\nexport const getChildKey = (child: ReactElement): ComponentKey =>\n child.key || \"\"\n\nexport function onlyElements(children: ReactNode): ReactElement[] {\n const filtered: ReactElement[] = []\n\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child)) filtered.push(child)\n })\n\n return filtered\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { useContext, useMemo, useRef, useState } from \"react\"\nimport { LayoutGroupContext } from \"../../context/LayoutGroupContext\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useIsomorphicLayoutEffect } from \"../../utils/use-isomorphic-effect\"\nimport { PresenceChild } from \"./PresenceChild\"\nimport { AnimatePresenceProps } from \"./types\"\nimport { usePresence } from \"./use-presence\"\nimport { ComponentKey, getChildKey, onlyElements } from \"./utils\"\n\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * \n * {items.map(item => (\n * \n * ))}\n * \n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nexport const AnimatePresence = ({\n children,\n custom,\n initial = true,\n onExitComplete,\n presenceAffectsLayout = true,\n mode = \"sync\",\n propagate = false,\n anchorX = \"left\",\n anchorY = \"top\",\n root\n}: React.PropsWithChildren) => {\n const [isParentPresent, safeToRemove] = usePresence(propagate)\n\n /**\n * Filter any children that aren't ReactElements. We can only track components\n * between renders with a props.key.\n */\n const presentChildren = useMemo(() => onlyElements(children), [children])\n\n /**\n * Track the keys of the currently rendered children. This is used to\n * determine which children are exiting.\n */\n const presentKeys =\n propagate && !isParentPresent ? [] : presentChildren.map(getChildKey)\n\n /**\n * If `initial={false}` we only want to pass this to components in the first render.\n */\n const isInitialRender = useRef(true)\n\n /**\n * A ref containing the currently present children. When all exit animations\n * are complete, we use this to re-render the component with the latest children\n * *committed* rather than the latest children *rendered*.\n */\n const pendingPresentChildren = useRef(presentChildren)\n\n /**\n * Track which exiting children have finished animating out.\n */\n const exitComplete = useConstant(() => new Map())\n\n /**\n * Track which components are currently processing exit to prevent duplicate processing.\n */\n const exitingComponents = useRef(new Set())\n\n /**\n * Save children to render as React state. To ensure this component is concurrent-safe,\n * we check for exiting children via an effect.\n */\n const [diffedChildren, setDiffedChildren] = useState(presentChildren)\n const [renderedChildren, setRenderedChildren] = useState(presentChildren)\n\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false\n pendingPresentChildren.current = presentChildren\n\n /**\n * Update complete status of exiting children.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i])\n\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false)\n }\n } else {\n exitComplete.delete(key)\n exitingComponents.current.delete(key)\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")])\n\n const exitingChildren: any[] = []\n\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren]\n\n /**\n * Loop through all the currently rendered components and decide which\n * are exiting.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const child = renderedChildren[i]\n const key = getChildKey(child)\n\n if (!presentKeys.includes(key)) {\n nextChildren.splice(i, 0, child)\n exitingChildren.push(child)\n }\n }\n\n /**\n * If we're in \"wait\" mode, and we have exiting children, we want to\n * only render these until they've all exited.\n */\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren\n }\n\n setRenderedChildren(onlyElements(nextChildren))\n setDiffedChildren(presentChildren)\n\n /**\n * Early return to ensure once we've set state with the latest diffed\n * children, we can immediately re-render.\n */\n return null\n }\n\n if (\n process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n renderedChildren.length > 1\n ) {\n console.warn(\n `You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`\n )\n }\n\n /**\n * If we've been provided a forceRender function by the LayoutGroupContext,\n * we can use it to force a re-render amongst all surrounding components once\n * all components have finished animating out.\n */\n const { forceRender } = useContext(LayoutGroupContext)\n\n return (\n <>\n {renderedChildren.map((child) => {\n const key = getChildKey(child)\n\n const isPresent =\n propagate && !isParentPresent\n ? false\n : presentChildren === renderedChildren ||\n presentKeys.includes(key)\n\n const onExit = () => {\n if (exitingComponents.current.has(key)) {\n return\n }\n\n if (exitComplete.has(key)) {\n exitingComponents.current.add(key)\n exitComplete.set(key, true)\n } else {\n return\n }\n\n let isEveryExitComplete = true\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete) isEveryExitComplete = false\n })\n\n if (isEveryExitComplete) {\n forceRender?.()\n setRenderedChildren(pendingPresentChildren.current)\n\n propagate && safeToRemove?.()\n\n onExitComplete && onExitComplete()\n }\n }\n\n return (\n \n {child}\n \n )\n })}\n \n )\n}\n","\"use client\"\n\nimport { createContext } from \"react\"\n\n/**\n * Note: Still used by components generated by old versions of Framer\n *\n * @deprecated\n */\nexport const DeprecatedLayoutGroupContext = createContext(null)\n","\"use client\"\n\nimport { useRef } from \"react\"\nimport { useIsomorphicLayoutEffect } from \"./use-isomorphic-effect\"\n\nexport function useIsMounted() {\n const isMounted = useRef(false)\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true\n\n return () => {\n isMounted.current = false\n }\n }, [])\n\n return isMounted\n}\n","\"use client\"\n\nimport { frame } from \"motion-dom\"\nimport { useCallback, useState } from \"react\"\nimport { useIsMounted } from \"./use-is-mounted\"\n\nexport function useForceUpdate(): [VoidFunction, number] {\n const isMounted = useIsMounted()\n const [forcedRenderCount, setForcedRenderCount] = useState(0)\n\n const forceRender = useCallback(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1)\n }, [forcedRenderCount])\n\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n const deferredForceRender = useCallback(\n () => frame.postRender(forceRender),\n [forceRender]\n )\n\n return [deferredForceRender, forcedRenderCount]\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { MutableRefObject, useContext, useMemo, useRef } from \"react\"\nimport {\n LayoutGroupContext,\n LayoutGroupContextProps,\n} from \"../../context/LayoutGroupContext\"\nimport { DeprecatedLayoutGroupContext } from \"../../context/DeprecatedLayoutGroupContext\"\nimport { nodeGroup } from \"../../projection\"\nimport { useForceUpdate } from \"../../utils/use-force-update\"\n\ntype InheritOption = boolean | \"id\"\n\nexport interface Props {\n id?: string\n inherit?: InheritOption\n}\n\nconst shouldInheritGroup = (inherit: InheritOption) => inherit === true\nconst shouldInheritId = (inherit: InheritOption) =>\n shouldInheritGroup(inherit === true) || inherit === \"id\"\n\nexport const LayoutGroup: React.FunctionComponent<\n React.PropsWithChildren\n> = ({ children, id, inherit = true }) => {\n const layoutGroupContext = useContext(LayoutGroupContext)\n const deprecatedLayoutGroupContext = useContext(\n DeprecatedLayoutGroupContext\n )\n const [forceRender, key] = useForceUpdate()\n const context = useRef(\n null\n ) as MutableRefObject\n\n const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext\n if (context.current === null) {\n if (shouldInheritId(inherit) && upstreamId) {\n id = id ? upstreamId + \"-\" + id : upstreamId\n }\n\n context.current = {\n id,\n group: shouldInheritGroup(inherit)\n ? layoutGroupContext.group || nodeGroup()\n : nodeGroup(),\n }\n }\n\n const memoizedContext = useMemo(\n () => ({ ...context.current, forceRender }),\n [key]\n )\n\n return (\n \n {children}\n \n )\n}\n","\"use client\"\n\nimport { useEffect, useRef, useState } from \"react\"\nimport { LazyContext } from \"../../context/LazyContext\"\nimport { loadFeatures } from \"../../motion/features/load-features\"\nimport { FeatureBundle, LazyFeatureBundle } from \"../../motion/features/types\"\nimport { CreateVisualElement } from \"../../render/types\"\nimport { LazyProps } from \"./types\"\n\n/**\n * Used in conjunction with the `m` component to reduce bundle size.\n *\n * `m` is a version of the `motion` component that only loads functionality\n * critical for the initial render.\n *\n * `LazyMotion` can then be used to either synchronously or asynchronously\n * load animation and gesture support.\n *\n * ```jsx\n * // Synchronous loading\n * import { LazyMotion, m, domAnimation } from \"framer-motion\"\n *\n * function App() {\n * return (\n * \n * \n * \n * )\n * }\n *\n * // Asynchronous loading\n * import { LazyMotion, m } from \"framer-motion\"\n *\n * function App() {\n * return (\n * import('./path/to/domAnimation')}>\n * \n * \n * )\n * }\n * ```\n *\n * @public\n */\nexport function LazyMotion({ children, features, strict = false }: LazyProps) {\n const [, setIsLoaded] = useState(!isLazyBundle(features))\n const loadedRenderer = useRef(undefined)\n\n /**\n * If this is a synchronous load, load features immediately\n */\n if (!isLazyBundle(features)) {\n const { renderer, ...loadedFeatures } = features\n loadedRenderer.current = renderer\n loadFeatures(loadedFeatures)\n }\n\n useEffect(() => {\n if (isLazyBundle(features)) {\n features().then(({ renderer, ...loadedFeatures }) => {\n loadFeatures(loadedFeatures)\n loadedRenderer.current = renderer\n setIsLoaded(true)\n })\n }\n }, [])\n\n return (\n \n {children}\n \n )\n}\n\nfunction isLazyBundle(\n features: FeatureBundle | LazyFeatureBundle\n): features is LazyFeatureBundle {\n return typeof features === \"function\"\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { useContext, useMemo } from \"react\"\nimport { resolveTransition } from \"motion-dom\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport {\n loadExternalIsValidProp,\n IsValidProp,\n} from \"../../render/dom/utils/filter-props\"\nimport { useConstant } from \"../../utils/use-constant\"\n\nexport interface MotionConfigProps extends Partial {\n children?: React.ReactNode\n isValidProp?: IsValidProp\n}\n\n/**\n * `MotionConfig` is used to set configuration options for all children `motion` components.\n *\n * ```jsx\n * import { motion, MotionConfig } from \"framer-motion\"\n *\n * export function App() {\n * return (\n * \n * \n * \n * )\n * }\n * ```\n *\n * @public\n */\nexport function MotionConfig({\n children,\n isValidProp,\n ...config\n}: MotionConfigProps) {\n isValidProp && loadExternalIsValidProp(isValidProp)\n\n /**\n * Inherit props from any parent MotionConfig components\n */\n const parentConfig = useContext(MotionConfigContext)\n config = { ...parentConfig, ...config }\n\n config.transition = resolveTransition(\n config.transition,\n parentConfig.transition\n )\n\n /**\n * Don't allow isStatic to change between renders as it affects how many hooks\n * motion components fire.\n */\n config.isStatic = useConstant(() => config.isStatic)\n\n /**\n * Creating a new config context object will re-render every `motion` component\n * every time it renders. So we only want to create a new one sparingly.\n */\n const context = useMemo(\n () => config,\n [\n JSON.stringify(config.transition),\n config.transformPagePoint,\n config.reducedMotion,\n config.skipAnimations,\n ]\n )\n\n return (\n \n {children}\n \n )\n}\n","\"use client\"\n\nimport { createContext } from \"react\"\nimport { ReorderContextProps } from \"../components/Reorder/types\"\n\nexport const ReorderContext = createContext | null>(\n null\n)\n","import { warnOnce } from \"motion-utils\"\nimport { createMotionComponent, MotionComponentOptions } from \"../../motion\"\nimport { FeaturePackages } from \"../../motion/features/types\"\nimport { MotionProps } from \"../../motion/types\"\nimport { DOMMotionComponents } from \"../dom/types\"\nimport { CreateVisualElement } from \"../types\"\n\n/**\n * I'd rather the return type of `custom` to be implicit but this throws\n * incorrect relative paths in the exported types and API Extractor throws\n * a wobbly.\n */\ntype ComponentProps = React.PropsWithoutRef &\n React.RefAttributes\nexport type CustomDomComponent = React.ComponentType<\n ComponentProps\n>\n\ntype MotionProxy = typeof createMotionComponent &\n DOMMotionComponents & { create: typeof createMotionComponent }\n\nexport function createMotionProxy(\n preloadedFeatures?: FeaturePackages,\n createVisualElement?: CreateVisualElement\n): MotionProxy {\n if (typeof Proxy === \"undefined\") {\n return createMotionComponent as MotionProxy\n }\n\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n const componentCache = new Map()\n\n const factory = (Component: string, options?: MotionComponentOptions) => {\n return createMotionComponent(\n Component,\n options,\n preloadedFeatures,\n createVisualElement\n )\n }\n\n /**\n * Support for deprecated`motion(Component)` pattern\n */\n const deprecatedFactoryFunction = (\n Component: string,\n options?: MotionComponentOptions\n ) => {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n false,\n \"motion() is deprecated. Use motion.create() instead.\"\n )\n }\n return factory(Component, options)\n }\n\n return new Proxy(deprecatedFactoryFunction, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: (_target, key: string) => {\n if (key === \"create\") return factory\n\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(\n key,\n createMotionComponent(\n key,\n undefined,\n preloadedFeatures,\n createVisualElement\n )\n )\n }\n\n return componentCache.get(key)!\n },\n }) as MotionProxy\n}\n","import { createDomVisualElement } from \"../../dom/create-visual-element\"\nimport { createMotionProxy } from \"../create-proxy\"\nimport { featureBundle } from \"./feature-bundle\"\n\nexport const motion = /*@__PURE__*/ createMotionProxy(\n featureBundle,\n createDomVisualElement\n)\n","import { mixNumber } from \"motion-dom\"\nimport { moveItem } from \"motion-utils\"\nimport { ItemData } from \"../types\"\n\nexport function checkReorder(\n order: ItemData[],\n value: T,\n offset: number,\n velocity: number\n): ItemData[] {\n if (!velocity) return order\n\n const index = order.findIndex((item) => item.value === value)\n\n if (index === -1) return order\n\n const nextOffset = velocity > 0 ? 1 : -1\n const nextItem = order[index + nextOffset]\n\n if (!nextItem) return order\n\n const item = order[index]\n const nextLayout = nextItem.layout\n const nextItemCenter = mixNumber(nextLayout.min, nextLayout.max, 0.5)\n\n if (\n (nextOffset === 1 && item.layout.max + offset > nextItemCenter) ||\n (nextOffset === -1 && item.layout.min + offset < nextItemCenter)\n ) {\n return moveItem(order, index, index + nextOffset)\n }\n\n return order\n}\n","\"use client\"\n\nimport { invariant } from \"motion-utils\"\nimport * as React from \"react\"\nimport { forwardRef, FunctionComponent, JSX, useEffect, useRef } from \"react\"\nimport { ReorderContext } from \"../../context/ReorderContext\"\nimport { motion } from \"../../render/components/motion/proxy\"\nimport { HTMLMotionProps } from \"../../render/html/types\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport {\n DefaultGroupElement,\n ItemData,\n ReorderContextProps,\n ReorderElementTag,\n} from \"./types\"\nimport { checkReorder } from \"./utils/check-reorder\"\n\nexport interface Props<\n V,\n TagName extends ReorderElementTag = DefaultGroupElement\n> {\n /**\n * A HTML element to render this component as. Defaults to `\"ul\"`.\n *\n * @public\n */\n as?: TagName\n\n /**\n * The axis to reorder along. By default, items will be draggable on this axis.\n * To make draggable on both axes, set ``\n *\n * @public\n */\n axis?: \"x\" | \"y\"\n\n /**\n * A callback to fire with the new value order. For instance, if the values\n * are provided as a state from `useState`, this could be the set state function.\n *\n * @public\n */\n onReorder: (newOrder: V[]) => void\n\n /**\n * The latest values state.\n *\n * ```jsx\n * function Component() {\n * const [items, setItems] = useState([0, 1, 2])\n *\n * return (\n * \n * {items.map((item) => )}\n * \n * )\n * }\n * ```\n *\n * @public\n */\n values: V[]\n}\n\ntype ReorderGroupProps<\n V,\n TagName extends ReorderElementTag = DefaultGroupElement\n> = Props &\n Omit, \"values\"> &\n React.PropsWithChildren<{}>\n\nexport function ReorderGroupComponent<\n V,\n TagName extends ReorderElementTag = DefaultGroupElement\n>(\n {\n children,\n as = \"ul\" as TagName,\n axis = \"y\",\n onReorder,\n values,\n ...props\n }: ReorderGroupProps,\n externalRef?: React.ForwardedRef\n): JSX.Element {\n const Component = useConstant(\n () => motion[as as keyof typeof motion]\n ) as FunctionComponent<\n React.PropsWithChildren & { ref?: React.Ref }>\n >\n\n const order: ItemData[] = []\n const isReordering = useRef(false)\n const groupRef = useRef(null)\n\n invariant(\n Boolean(values),\n \"Reorder.Group must be provided a values prop\",\n \"reorder-values\"\n )\n\n const context: ReorderContextProps = {\n axis,\n groupRef,\n registerItem: (value, layout) => {\n // If the entry was already added, update it rather than adding it again\n const idx = order.findIndex((entry) => value === entry.value)\n if (idx !== -1) {\n order[idx].layout = layout[axis]\n } else {\n order.push({ value: value, layout: layout[axis] })\n }\n order.sort(compareMin)\n },\n updateOrder: (item, offset, velocity) => {\n if (isReordering.current) return\n\n const newOrder = checkReorder(order, item, offset, velocity)\n\n if (order !== newOrder) {\n isReordering.current = true\n\n // Find which two values swapped and apply that swap\n // to the full values array. This preserves unmeasured\n // items (e.g. in virtualized lists).\n const newValues = [...values]\n for (let i = 0; i < newOrder.length; i++) {\n if (order[i].value !== newOrder[i].value) {\n const a = values.indexOf(order[i].value)\n const b = values.indexOf(newOrder[i].value)\n if (a !== -1 && b !== -1) {\n ;[newValues[a], newValues[b]] = [newValues[b], newValues[a]]\n }\n break\n }\n }\n onReorder(newValues)\n }\n },\n }\n\n useEffect(() => {\n isReordering.current = false\n })\n\n // Combine refs if external ref is provided\n const setRef = (element: Element | null) => {\n ;(groupRef as React.MutableRefObject).current = element\n if (typeof externalRef === \"function\") {\n externalRef(element)\n } else if (externalRef) {\n ;(\n externalRef as React.MutableRefObject\n ).current = element\n }\n }\n\n /**\n * Disable browser scroll anchoring on the group container.\n * When items reorder, scroll anchoring can cause the browser to adjust\n * the scroll position, which interferes with drag position calculations.\n */\n const groupStyle = {\n overflowAnchor: \"none\" as const,\n ...props.style,\n }\n\n return (\n \n \n {children}\n \n \n )\n}\n\nexport const ReorderGroup = /*@__PURE__*/ forwardRef(ReorderGroupComponent) as <\n Values extends any[],\n TagName extends ReorderElementTag = DefaultGroupElement\n>(\n props: Omit<\n ReorderGroupProps,\n \"values\" | \"onReorder\"\n > & {\n values: Values\n onReorder: (newOrder: Values) => void\n } & { ref?: React.ForwardedRef }\n) => ReturnType\n\nfunction compareMin(a: ItemData, b: ItemData) {\n return a.layout.min - b.layout.min\n}\n","\"use client\"\n\nimport { motionValue, MotionValue } from \"motion-dom\"\nimport { useContext, useEffect, useState } from \"react\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\nimport { useConstant } from \"../utils/use-constant\"\n\n/**\n * Creates a `MotionValue` to track the state and velocity of a value.\n *\n * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const scale = useMotionValue(1)\n *\n * return \n * }\n * ```\n *\n * @param initial - The initial state.\n *\n * @public\n */\nexport function useMotionValue(initial: T): MotionValue {\n const value = useConstant(() => motionValue(initial))\n\n /**\n * If this motion value is being used in static mode, like on\n * the Framer canvas, force components to rerender when the motion\n * value is updated.\n */\n const { isStatic } = useContext(MotionConfigContext)\n if (isStatic) {\n const [, setLatest] = useState(initial)\n useEffect(() => value.on(\"change\", setLatest), [])\n }\n\n return value\n}\n","\"use client\"\n\nimport { cancelFrame, frame, MotionValue } from \"motion-dom\"\nimport { useIsomorphicLayoutEffect } from \"../utils/use-isomorphic-effect\"\nimport { useMotionValue } from \"./use-motion-value\"\n\nexport function useCombineMotionValues(\n values: MotionValue[],\n combineValues: () => R\n) {\n /**\n * Initialise the returned motion value. This remains the same between renders.\n */\n const value = useMotionValue(combineValues())\n\n /**\n * Create a function that will update the template motion value with the latest values.\n * This is pre-bound so whenever a motion value updates it can schedule its\n * execution in Framesync. If it's already been scheduled it won't be fired twice\n * in a single frame.\n */\n const updateValue = () => value.set(combineValues())\n\n /**\n * Synchronously update the motion value with the latest values during the render.\n * This ensures that within a React render, the styles applied to the DOM are up-to-date.\n */\n updateValue()\n\n /**\n * Subscribe to all motion values found within the template. Whenever any of them change,\n * schedule an update.\n */\n useIsomorphicLayoutEffect(() => {\n const scheduleUpdate = () => frame.preRender(updateValue, false, true)\n const subscriptions = values.map((v) => v.on(\"change\", scheduleUpdate))\n\n return () => {\n subscriptions.forEach((unsubscribe) => unsubscribe())\n cancelFrame(updateValue)\n }\n })\n\n return value\n}\n","\"use client\"\n\nimport { collectMotionValues, type MotionValue } from \"motion-dom\"\nimport { useCombineMotionValues } from \"./use-combine-values\"\n\nexport function useComputed(compute: () => O): MotionValue {\n /**\n * Open session of collectMotionValues. Any MotionValue that calls get()\n * will be saved into this array.\n */\n collectMotionValues.current = []\n\n compute()\n\n const value = useCombineMotionValues(collectMotionValues.current, compute)\n\n /**\n * Synchronously close session of collectMotionValues.\n */\n collectMotionValues.current = undefined\n\n return value\n}\n","\"use client\"\n\nimport {\n AnyResolvedKeyframe,\n MotionValue,\n transform,\n TransformOptions,\n} from \"motion-dom\"\nimport { useConstant } from \"../utils/use-constant\"\nimport { useCombineMotionValues } from \"./use-combine-values\"\nimport { useComputed } from \"./use-computed\"\n\nexport type InputRange = number[]\ntype SingleTransformer = (input: I) => O\ntype MultiTransformer = (input: I[]) => O\ntype Transformer =\n | SingleTransformer\n /**\n * Ideally, this would be typed in all instances, but to type this\n * more accurately requires the tuple support in TypeScript 4:\n * https://gist.github.com/InventingWithMonster/c4d23752a0fae7888596c4ff6d92733a\n */\n | MultiTransformer\n\ninterface OutputMap {\n [key: string]: O[]\n}\n\n/**\n * Create multiple `MotionValue`s that transform the output of another `MotionValue` by mapping it from one range of values into multiple output ranges.\n *\n * @remarks\n *\n * This is useful when you want to derive multiple values from a single input value.\n * The keys of the output map must remain constant across renders.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const { opacity, scale } = useTransform(x, [0, 100], {\n * opacity: [0, 1],\n * scale: [0.5, 1]\n * })\n *\n * return (\n * \n * )\n * }\n * ```\n *\n * @param inputValue - `MotionValue`\n * @param inputRange - A linear series of numbers (either all increasing or decreasing)\n * @param outputMap - An object where keys map to output ranges. Each output range must be the same length as `inputRange`.\n * @param options - Transform options applied to all outputs\n *\n * @returns An object with the same keys as `outputMap`, where each value is a `MotionValue`\n *\n * @public\n */\nexport function useTransform>(\n inputValue: MotionValue,\n inputRange: InputRange,\n outputMap: T,\n options?: TransformOptions\n): { [K in keyof T]: MotionValue }\n\n/**\n * Create a `MotionValue` that transforms the output of another `MotionValue` by mapping it from one range of values into another.\n *\n * @remarks\n *\n * Given an input range of `[-200, -100, 100, 200]` and an output range of\n * `[0, 1, 1, 0]`, the returned `MotionValue` will:\n *\n * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`.\n * - When provided a value between `-100` and `100`, will return `1`.\n * - When provided a value between `100` and `200`, will return a value between `1` and `0`\n *\n *\n * The input range must be a linear series of numbers. The output range\n * can be any value type supported by Motion: numbers, colors, shadows, etc.\n *\n * Every value in the output range must be of the same type and in the same format.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const xRange = [-200, -100, 100, 200]\n * const opacityRange = [0, 1, 1, 0]\n * const opacity = useTransform(x, xRange, opacityRange)\n *\n * return (\n * \n * )\n * }\n * ```\n *\n * @param inputValue - `MotionValue`\n * @param inputRange - A linear series of numbers (either all increasing or decreasing)\n * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`.\n * @param options -\n *\n * - clamp: boolean. Clamp values to within the given range. Defaults to `true`\n * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each.\n *\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useTransform(\n value: MotionValue,\n inputRange: InputRange,\n outputRange: O[],\n options?: TransformOptions\n): MotionValue\n\n/**\n * Create a `MotionValue` that transforms the output of another `MotionValue` through a function.\n * In this example, `y` will always be double `x`.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(10)\n * const y = useTransform(x, value => value * 2)\n *\n * return \n * }\n * ```\n *\n * @param input - A `MotionValue` that will pass its latest value through `transform` to update the returned `MotionValue`.\n * @param transform - A function that accepts the latest value from `input` and returns a new value.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useTransform(\n input: MotionValue,\n transformer: SingleTransformer\n): MotionValue\n\n/**\n * Pass an array of `MotionValue`s and a function to combine them. In this example, `z` will be the `x` multiplied by `y`.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const z = useTransform([x, y], ([latestX, latestY]) => latestX * latestY)\n *\n * return \n * }\n * ```\n *\n * @param input - An array of `MotionValue`s that will pass their latest values through `transform` to update the returned `MotionValue`.\n * @param transform - A function that accepts the latest values from `input` and returns a new value.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useTransform(\n input:\n | MotionValue[]\n | MotionValue[]\n | MotionValue[],\n transformer: MultiTransformer\n): MotionValue\nexport function useTransform(transformer: () => O): MotionValue\n\nexport function useTransform(\n input:\n | MotionValue\n | MotionValue[]\n | MotionValue[]\n | MotionValue[]\n | (() => O),\n inputRangeOrTransformer?: InputRange | Transformer,\n outputRangeOrMap?: O[] | OutputMap,\n options?: TransformOptions\n): MotionValue | { [key in K]: MotionValue } {\n if (typeof input === \"function\") {\n return useComputed(input)\n }\n\n /**\n * Detect if outputRangeOrMap is an output map (object with keys)\n * rather than an output range (array).\n */\n const isOutputMap =\n outputRangeOrMap !== undefined &&\n !Array.isArray(outputRangeOrMap) &&\n typeof inputRangeOrTransformer !== \"function\"\n\n if (isOutputMap) {\n return useMapTransform(\n input as MotionValue,\n inputRangeOrTransformer as InputRange,\n outputRangeOrMap as OutputMap,\n options\n ) as { [key in K]: MotionValue }\n }\n\n const outputRange = outputRangeOrMap as O[] | undefined\n const transformer =\n typeof inputRangeOrTransformer === \"function\"\n ? inputRangeOrTransformer\n : transform(inputRangeOrTransformer!, outputRange!, options)\n\n const result = Array.isArray(input)\n ? useListTransform(\n input,\n transformer as MultiTransformer\n )\n : useListTransform([input], ([latest]) =>\n (transformer as SingleTransformer)(latest)\n )\n\n const inputAccelerate = !Array.isArray(input)\n ? (input as MotionValue).accelerate\n : undefined\n\n if (\n inputAccelerate &&\n !inputAccelerate.isTransformed &&\n typeof inputRangeOrTransformer !== \"function\" &&\n Array.isArray(outputRangeOrMap) &&\n options?.clamp !== false\n ) {\n result.accelerate = {\n ...inputAccelerate,\n times: inputRangeOrTransformer as number[],\n keyframes: outputRangeOrMap,\n isTransformed: true,\n ...(options?.ease ? { ease: options.ease } : {}),\n }\n }\n\n return result\n}\n\nfunction useListTransform(\n values: MotionValue[],\n transformer: MultiTransformer\n): MotionValue {\n const latest = useConstant(() => [])\n\n return useCombineMotionValues(values, () => {\n latest.length = 0\n const numValues = values.length\n for (let i = 0; i < numValues; i++) {\n latest[i] = values[i].get()\n }\n\n return transformer(latest)\n })\n}\n\nfunction useMapTransform(\n inputValue: MotionValue,\n inputRange: InputRange,\n outputMap: OutputMap,\n options?: TransformOptions\n): { [key: string]: MotionValue } {\n /**\n * Capture keys once to ensure hooks are called in consistent order.\n */\n const keys = useConstant(() => Object.keys(outputMap))\n const output = useConstant<{ [key: string]: MotionValue }>(() => ({}))\n\n for (const key of keys) {\n output[key] = useTransform(inputValue, inputRange, outputMap[key], options)\n }\n\n return output\n}\n","const threshold = 50\nconst maxSpeed = 25\n\nconst overflowStyles = new Set([\"auto\", \"scroll\"])\n\n// Track initial scroll limits per scrollable element (Bug 1 fix)\nconst initialScrollLimits = new WeakMap()\n\n// Track auto-scroll active state per edge: \"start\" (top/left) or \"end\" (bottom/right)\ntype ActiveEdge = \"start\" | \"end\" | null\nconst activeScrollEdge = new WeakMap()\n\n// Track which group element is currently dragging to clear state on end\nlet currentGroupElement: Element | null = null\n\nexport function resetAutoScrollState(): void {\n if (currentGroupElement) {\n const scrollableAncestor = findScrollableAncestor(\n currentGroupElement,\n \"y\"\n )\n if (scrollableAncestor) {\n activeScrollEdge.delete(scrollableAncestor)\n initialScrollLimits.delete(scrollableAncestor)\n }\n // Also try x axis\n const scrollableAncestorX = findScrollableAncestor(\n currentGroupElement,\n \"x\"\n )\n if (scrollableAncestorX && scrollableAncestorX !== scrollableAncestor) {\n activeScrollEdge.delete(scrollableAncestorX)\n initialScrollLimits.delete(scrollableAncestorX)\n }\n currentGroupElement = null\n }\n}\n\nfunction isScrollableElement(element: Element, axis: \"x\" | \"y\"): boolean {\n const style = getComputedStyle(element)\n const overflow = axis === \"x\" ? style.overflowX : style.overflowY\n\n const isDocumentScroll =\n element === document.body ||\n element === document.documentElement\n\n return overflowStyles.has(overflow) || isDocumentScroll\n}\n\nfunction findScrollableAncestor(\n element: Element | null,\n axis: \"x\" | \"y\"\n): HTMLElement | null {\n let current = element?.parentElement\n while (current) {\n if (isScrollableElement(current, axis)) {\n return current\n }\n current = current.parentElement\n }\n return null\n}\n\nfunction getScrollAmount(\n pointerPosition: number,\n scrollElement: HTMLElement,\n axis: \"x\" | \"y\"\n): { amount: number; edge: ActiveEdge } {\n const rect = scrollElement.getBoundingClientRect()\n\n const start = axis === \"x\" ? Math.max(0, rect.left) : Math.max(0, rect.top)\n const end = axis === \"x\" ? Math.min(window.innerWidth, rect.right) : Math.min(window.innerHeight, rect.bottom)\n\n const distanceFromStart = pointerPosition - start\n const distanceFromEnd = end - pointerPosition\n\n if (distanceFromStart < threshold) {\n const intensity = 1 - distanceFromStart / threshold\n return { amount: -maxSpeed * intensity * intensity, edge: \"start\" }\n } else if (distanceFromEnd < threshold) {\n const intensity = 1 - distanceFromEnd / threshold\n return { amount: maxSpeed * intensity * intensity, edge: \"end\" }\n }\n\n return { amount: 0, edge: null }\n}\n\nexport function autoScrollIfNeeded(\n groupElement: Element | null,\n pointerPosition: number,\n axis: \"x\" | \"y\",\n velocity: number\n): void {\n if (!groupElement) return\n\n // Track the group element for cleanup\n currentGroupElement = groupElement\n\n const scrollableAncestor = findScrollableAncestor(groupElement, axis)\n if (!scrollableAncestor) return\n\n // Convert pointer position from page coordinates to viewport coordinates.\n // The gesture system uses pageX/pageY but getBoundingClientRect() returns\n // viewport-relative coordinates, so we need to account for page scroll.\n const viewportPointerPosition =\n pointerPosition - (axis === \"x\" ? window.scrollX : window.scrollY)\n\n const { amount: scrollAmount, edge } = getScrollAmount(\n viewportPointerPosition,\n scrollableAncestor,\n axis\n )\n\n // If not in any threshold zone, clear all state\n if (edge === null) {\n activeScrollEdge.delete(scrollableAncestor)\n initialScrollLimits.delete(scrollableAncestor)\n return\n }\n\n const currentActiveEdge = activeScrollEdge.get(scrollableAncestor)\n\n const isDocumentScroll =\n scrollableAncestor === document.body ||\n scrollableAncestor === document.documentElement\n\n // If not currently scrolling this edge, check velocity to see if we should start\n if (currentActiveEdge !== edge) {\n // Only start scrolling if velocity is towards the edge\n const shouldStart =\n (edge === \"start\" && velocity < 0) ||\n (edge === \"end\" && velocity > 0)\n if (!shouldStart) return\n\n // Activate this edge\n activeScrollEdge.set(scrollableAncestor, edge)\n\n // Record initial scroll limit (prevents infinite scroll)\n const maxScroll =\n axis === \"x\"\n ? scrollableAncestor.scrollWidth - (isDocumentScroll ? window.innerWidth : scrollableAncestor.clientWidth)\n : scrollableAncestor.scrollHeight - (isDocumentScroll ? window.innerHeight : scrollableAncestor.clientHeight)\n\n initialScrollLimits.set(scrollableAncestor, maxScroll)\n }\n\n // Cap scrolling at initial limit (prevents infinite scroll)\n if (scrollAmount > 0) {\n const initialLimit = initialScrollLimits.get(scrollableAncestor)!\n const currentScroll =\n axis === \"x\"\n ? (isDocumentScroll ? window.scrollX : scrollableAncestor.scrollLeft)\n : (isDocumentScroll ? window.scrollY : scrollableAncestor.scrollTop)\n if (currentScroll >= initialLimit) return\n }\n\n // Apply scroll\n if (axis === \"x\") {\n if (isDocumentScroll) {\n window.scrollBy({ left: scrollAmount })\n } else {\n scrollableAncestor.scrollLeft += scrollAmount\n }\n } else {\n if (isDocumentScroll) {\n window.scrollBy({ top: scrollAmount })\n } else {\n scrollableAncestor.scrollTop += scrollAmount\n }\n }\n}\n","\"use client\"\n\nimport { isMotionValue } from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\nimport * as React from \"react\"\nimport { forwardRef, FunctionComponent, useContext } from \"react\"\nimport { ReorderContext } from \"../../context/ReorderContext\"\nimport { motion } from \"../../render/components/motion/proxy\"\nimport { HTMLMotionProps } from \"../../render/html/types\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useMotionValue } from \"../../value/use-motion-value\"\nimport { useTransform } from \"../../value/use-transform\"\n\nimport { DefaultItemElement, ReorderElementTag } from \"./types\"\nimport {\n autoScrollIfNeeded,\n resetAutoScrollState,\n} from \"./utils/auto-scroll\"\n\nexport interface Props<\n V,\n TagName extends ReorderElementTag = DefaultItemElement\n> {\n /**\n * A HTML element to render this component as. Defaults to `\"li\"`.\n *\n * @public\n */\n as?: TagName\n\n /**\n * The value in the list that this component represents.\n *\n * @public\n */\n value: V\n\n /**\n * A subset of layout options primarily used to disable layout=\"size\"\n *\n * @public\n * @default true\n */\n layout?: true | \"position\"\n}\n\nfunction useDefaultMotionValue(value: any, defaultValue: number = 0) {\n return isMotionValue(value) ? value : useMotionValue(defaultValue)\n}\n\ntype ReorderItemProps<\n V,\n TagName extends ReorderElementTag = DefaultItemElement\n> = Props &\n Omit, \"value\" | \"layout\"> &\n React.PropsWithChildren<{}>\n\nexport function ReorderItemComponent<\n V,\n TagName extends ReorderElementTag = DefaultItemElement\n>(\n {\n children,\n style = {},\n value,\n as = \"li\" as TagName,\n onDrag,\n onDragEnd,\n layout = true,\n ...props\n }: ReorderItemProps,\n externalRef?: React.ForwardedRef\n): React.JSX.Element {\n const Component = useConstant(\n () => motion[as as keyof typeof motion]\n ) as FunctionComponent<\n React.PropsWithChildren & { ref?: React.Ref }>\n >\n\n const context = useContext(ReorderContext)\n const point = {\n x: useDefaultMotionValue(style.x),\n y: useDefaultMotionValue(style.y),\n }\n\n const zIndex = useTransform([point.x, point.y], ([latestX, latestY]) =>\n latestX || latestY ? 1 : \"unset\"\n )\n\n invariant(\n Boolean(context),\n \"Reorder.Item must be a child of Reorder.Group\",\n \"reorder-item-child\"\n )\n\n const { axis, registerItem, updateOrder, groupRef } = context!\n\n return (\n {\n const { velocity, point: pointerPoint } = gesturePoint\n const offset = point[axis].get()\n\n // Always attempt to update order - checkReorder handles the logic\n updateOrder(value, offset, velocity[axis])\n\n autoScrollIfNeeded(\n groupRef.current,\n pointerPoint[axis],\n axis,\n velocity[axis]\n )\n\n onDrag && onDrag(event, gesturePoint)\n }}\n onDragEnd={(event, gesturePoint) => {\n resetAutoScrollState()\n onDragEnd && onDragEnd(event, gesturePoint)\n }}\n onLayoutMeasure={(measured) => {\n registerItem(value, measured)\n }}\n ref={externalRef}\n ignoreStrict\n >\n {children}\n \n )\n}\n\nexport const ReorderItem = /*@__PURE__*/ forwardRef(ReorderItemComponent) as <\n V,\n TagName extends ReorderElementTag = DefaultItemElement\n>(\n props: ReorderItemProps & { ref?: React.ForwardedRef }\n) => ReturnType\n","import { DOMKeyframesDefinition } from \"motion-dom\"\n\nexport function isDOMKeyframes(\n keyframes: unknown\n): keyframes is DOMKeyframesDefinition {\n return typeof keyframes === \"object\" && !Array.isArray(keyframes)\n}\n","import {\n AnimationScope,\n DOMKeyframesDefinition,\n SelectorCache,\n resolveElements,\n} from \"motion-dom\"\nimport { ObjectTarget } from \"../sequence/types\"\nimport { isDOMKeyframes } from \"../utils/is-dom-keyframes\"\n\nexport function resolveSubjects(\n subject:\n | string\n | Element\n | Element[]\n | NodeListOf\n | O\n | O[]\n | null\n | undefined,\n keyframes: DOMKeyframesDefinition | ObjectTarget,\n scope?: AnimationScope,\n selectorCache?: SelectorCache\n) {\n if (subject == null) {\n return []\n }\n\n if (typeof subject === \"string\" && isDOMKeyframes(keyframes)) {\n return resolveElements(subject, scope, selectorCache)\n } else if (subject instanceof NodeList) {\n return Array.from(subject)\n } else if (Array.isArray(subject)) {\n return subject.filter((s) => s != null)\n } else {\n return [subject]\n }\n}\n","export function calculateRepeatDuration(\n duration: number,\n repeat: number,\n repeatDelay: number\n): number {\n return duration * (repeat + 1) + repeatDelay * repeat\n}\n","import { SequenceTime } from \"../types\"\n\n/**\n * Given a absolute or relative time definition and current/prev time state of the sequence,\n * calculate an absolute time for the next keyframes.\n */\nexport function calcNextTime(\n current: number,\n next: SequenceTime,\n prev: number,\n labels: Map\n): number {\n if (typeof next === \"number\") {\n return next\n } else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next))\n } else if (next === \"<\") {\n return prev\n } else if (next.startsWith(\"<\")) {\n return Math.max(0, prev + parseFloat(next.slice(1)))\n } else {\n return labels.get(next) ?? current\n }\n}\n","import { mixNumber, UnresolvedValueKeyframe } from \"motion-dom\"\nimport { Easing, getEasingForSegment, removeItem } from \"motion-utils\"\nimport type { ValueSequence } from \"../types\"\n\nexport function eraseKeyframes(\n sequence: ValueSequence,\n startTime: number,\n endTime: number\n): void {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i]\n\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe)\n\n // If we remove this item we have to push the pointer back one\n i--\n }\n }\n}\n\nexport function addKeyframes(\n sequence: ValueSequence,\n keyframes: UnresolvedValueKeyframe[],\n easing: Easing | Easing[],\n offset: number[],\n startTime: number,\n endTime: number\n): void {\n /**\n * Erase every existing value between currentTime and targetTime,\n * this will essentially splice this timeline into any currently\n * defined ones.\n */\n eraseKeyframes(sequence, startTime, endTime)\n\n for (let i = 0; i < keyframes.length; i++) {\n sequence.push({\n value: keyframes[i],\n at: mixNumber(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i),\n })\n }\n}\n","/**\n * Take an array of times that represent repeated keyframes. For instance\n * if we have original times of [0, 0.5, 1] then our repeated times will\n * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back\n * down to a 0-1 scale.\n *\n * `repeatDelayUnits` is the repeatDelay expressed in units of a single\n * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`.\n */\nexport function normalizeTimes(\n times: number[],\n repeat: number,\n repeatDelayUnits = 0\n): void {\n const totalUnits = repeat + 1 + repeat * repeatDelayUnits\n for (let i = 0; i < times.length; i++) {\n times[i] = times[i] / totalUnits\n }\n}\n","import { AbsoluteKeyframe } from \"../types\"\n\nexport function compareByTime(\n a: AbsoluteKeyframe,\n b: AbsoluteKeyframe\n): number {\n if (a.at === b.at) {\n if (a.value === null) return 1\n if (b.value === null) return -1\n return 0\n } else {\n return a.at - b.at\n }\n}\n","import {\n AnimationScope,\n createGeneratorEasing,\n defaultOffset,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n fillOffset,\n GeneratorFactory,\n isGenerator,\n isMotionValue,\n Transition,\n UnresolvedValueKeyframe,\n type AnyResolvedKeyframe,\n type MotionValue,\n} from \"motion-dom\"\nimport {\n Easing,\n getEasingForSegment,\n progress,\n reverseEasing,\n secondsToMilliseconds,\n warning,\n} from \"motion-utils\"\nimport { resolveSubjects } from \"../animate/resolve-subjects\"\nimport {\n AnimationSequence,\n At,\n ResolvedAnimationDefinitions,\n SequenceMap,\n SequenceOptions,\n ValueSequence,\n} from \"./types\"\nimport { calculateRepeatDuration } from \"./utils/calc-repeat-duration\"\nimport { calcNextTime } from \"./utils/calc-time\"\nimport { addKeyframes } from \"./utils/edit\"\nimport { normalizeTimes } from \"./utils/normalize-times\"\nimport { compareByTime } from \"./utils/sort\"\n\nconst defaultSegmentEasing = \"easeInOut\"\n\nconst MAX_REPEAT = 20\n\nexport function createAnimationsFromSequence(\n sequence: AnimationSequence,\n { defaultTransition = {}, ...sequenceTransition }: SequenceOptions = {},\n scope?: AnimationScope,\n generators?: { [key: string]: GeneratorFactory }\n): ResolvedAnimationDefinitions {\n const defaultDuration = defaultTransition.duration || 0.3\n const animationDefinitions: ResolvedAnimationDefinitions = new Map()\n const sequences = new Map()\n const elementCache = {}\n const timeLabels = new Map()\n\n let prevTime = 0\n let currentTime = 0\n let totalDuration = 0\n\n /**\n * Build the timeline by mapping over the sequence array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i]\n\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime)\n continue\n } else if (!Array.isArray(segment)) {\n timeLabels.set(\n segment.name,\n calcNextTime(currentTime, segment.at, prevTime, timeLabels)\n )\n continue\n }\n\n let [subject, keyframes, transition = {}] = segment\n\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (transition.at !== undefined) {\n currentTime = calcNextTime(\n currentTime,\n transition.at,\n prevTime,\n timeLabels\n )\n }\n\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0\n\n const resolveValueSequence = (\n valueKeyframes: UnresolvedValueKeyframe | UnresolvedValueKeyframe[],\n valueTransition: Transition | DynamicAnimationOptions,\n valueSequence: ValueSequence,\n elementIndex = 0,\n numSubjects = 0\n ) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes)\n const {\n delay = 0,\n times = defaultOffset(valueKeyframesAsList),\n type = defaultTransition.type || \"keyframes\",\n repeat,\n repeatType,\n repeatDelay = 0,\n ...remainingTransition\n } = valueTransition\n let { ease = defaultTransition.ease || \"easeOut\", duration } =\n valueTransition\n\n /**\n * Resolve stagger() if defined.\n */\n const calculatedDelay =\n typeof delay === \"function\"\n ? delay(elementIndex, numSubjects)\n : delay\n\n /**\n * If this animation should and can use a spring, generate a spring easing function.\n */\n const numKeyframes = valueKeyframesAsList.length\n const createGenerator = isGenerator(type)\n ? type\n : generators?.[type || \"keyframes\"]\n\n if (numKeyframes <= 2 && createGenerator) {\n /**\n * As we're creating an easing function from a spring,\n * ideally we want to generate it using the real distance\n * between the two keyframes. However this isn't always\n * possible - in these situations we use 0-100.\n */\n let absoluteDelta = 100\n if (\n numKeyframes === 2 &&\n isNumberKeyframesArray(valueKeyframesAsList)\n ) {\n const delta =\n valueKeyframesAsList[1] - valueKeyframesAsList[0]\n absoluteDelta = Math.abs(delta)\n }\n\n const springTransition = {\n ...defaultTransition,\n ...remainingTransition,\n }\n if (duration !== undefined) {\n springTransition.duration = secondsToMilliseconds(duration)\n }\n\n const springEasing = createGeneratorEasing(\n springTransition,\n absoluteDelta,\n createGenerator\n )\n\n ease = springEasing.ease\n duration = springEasing.duration\n }\n\n duration ??= defaultDuration\n\n const startTime = currentTime + calculatedDelay\n\n /**\n * If there's only one time offset of 0, fill in a second with length 1\n */\n if (times.length === 1 && times[0] === 0) {\n times[1] = 1\n }\n\n /**\n * Fill out if offset if fewer offsets than keyframes\n */\n const remainder = times.length - valueKeyframesAsList.length\n remainder > 0 && fillOffset(times, remainder)\n\n /**\n * If only one value has been set, ie [1], push a null to the start of\n * the keyframe array. This will let us mark a keyframe at this point\n * that will later be hydrated with the previous value.\n */\n valueKeyframesAsList.length === 1 &&\n valueKeyframesAsList.unshift(null)\n\n /**\n * Segments can't express `repeat: Infinity` or very large\n * counts — they'd leave dead time after the segment or\n * explode the keyframe array. Ignore with a warning.\n */\n if (repeat) {\n warning(\n repeat < MAX_REPEAT,\n `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`\n )\n }\n\n if (repeat && repeat < MAX_REPEAT) {\n /**\n * Express repeatDelay in units of a single iteration's duration\n * so it can be added to the per-iteration time offsets below\n * before they're normalized to 0-1.\n */\n const repeatDelayUnits =\n duration > 0 ? repeatDelay / duration : 0\n\n duration = calculateRepeatDuration(\n duration,\n repeat,\n repeatDelay\n )\n\n const originalKeyframes = [...valueKeyframesAsList]\n const originalTimes = [...times]\n ease = Array.isArray(ease) ? [...ease] : [ease]\n const originalEase = [...ease]\n\n /**\n * For reverse/mirror, alternate iterations play the segment\n * backwards. mirror matches JSAnimation's mirroredGenerator:\n * reversed keyframes, easings unchanged. reverse matches\n * JSAnimation's iterationProgress = 1 - p: reversed\n * keyframes, easing array reversed AND each function easing\n * mapped through reverseEasing (string easings unchanged —\n * they're resolved later by the keyframes engine).\n */\n const isFlipping =\n repeatType === \"reverse\" || repeatType === \"mirror\"\n let flippedKeyframes = originalKeyframes\n let flippedEases = originalEase\n if (isFlipping) {\n flippedKeyframes = [...originalKeyframes].reverse()\n if (repeatType === \"reverse\") {\n flippedEases = [...originalEase]\n .reverse()\n .map((e) =>\n typeof e === \"function\"\n ? reverseEasing(e)\n : e\n )\n }\n }\n\n for (\n let repeatIndex = 0;\n repeatIndex < repeat;\n repeatIndex++\n ) {\n const isFlipped = isFlipping && repeatIndex % 2 === 0\n const iterKeyframes = isFlipped\n ? flippedKeyframes\n : originalKeyframes\n const iterEase = isFlipped ? flippedEases : originalEase\n const iterStartOffset =\n (repeatIndex + 1) * (1 + repeatDelayUnits)\n\n /**\n * If repeatDelay is set, hold the previous iteration's\n * final value through the delay by inserting a keyframe\n * at the moment the next iteration begins.\n */\n if (repeatDelayUnits > 0) {\n valueKeyframesAsList.push(\n valueKeyframesAsList[\n valueKeyframesAsList.length - 1\n ]\n )\n times.push(iterStartOffset)\n ease.push(\"linear\")\n }\n\n valueKeyframesAsList.push(...iterKeyframes)\n\n for (\n let keyframeIndex = 0;\n keyframeIndex < iterKeyframes.length;\n keyframeIndex++\n ) {\n times.push(\n originalTimes[keyframeIndex] + iterStartOffset\n )\n ease.push(\n keyframeIndex === 0\n ? \"linear\"\n : getEasingForSegment(\n iterEase,\n keyframeIndex - 1\n )\n )\n }\n }\n\n normalizeTimes(times, repeat, repeatDelayUnits)\n }\n\n const targetTime = startTime + duration\n\n /**\n * Add keyframes, mapping offsets to absolute time.\n */\n addKeyframes(\n valueSequence,\n valueKeyframesAsList,\n ease as Easing | Easing[],\n times,\n startTime,\n targetTime\n )\n\n maxDuration = Math.max(calculatedDelay + duration, maxDuration)\n totalDuration = Math.max(targetTime, totalDuration)\n }\n\n if (isMotionValue(subject)) {\n const subjectSequence = getSubjectSequence(subject, sequences)\n resolveValueSequence(\n keyframes as AnyResolvedKeyframe,\n transition,\n getValueSequence(\"default\", subjectSequence)\n )\n } else {\n const subjects = resolveSubjects(\n subject,\n keyframes as DOMKeyframesDefinition,\n scope,\n elementCache\n )\n\n const numSubjects = subjects.length\n\n /**\n * For every element in this segment, process the defined values.\n */\n for (\n let subjectIndex = 0;\n subjectIndex < numSubjects;\n subjectIndex++\n ) {\n /**\n * Cast necessary, but we know these are of this type\n */\n keyframes = keyframes as DOMKeyframesDefinition\n transition = transition as DynamicAnimationOptions\n\n const thisSubject = subjects[subjectIndex]\n const subjectSequence = getSubjectSequence(\n thisSubject,\n sequences\n )\n\n for (const key in keyframes) {\n resolveValueSequence(\n keyframes[\n key as keyof typeof keyframes\n ] as UnresolvedValueKeyframe,\n getValueTransition(transition, key),\n getValueSequence(key, subjectSequence),\n subjectIndex,\n numSubjects\n )\n }\n }\n }\n\n prevTime = currentTime\n currentTime += maxDuration\n }\n\n /**\n * For every element and value combination create a new animation.\n */\n sequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key]\n\n /**\n * Arrange all the keyframes in ascending time order.\n */\n valueSequence.sort(compareByTime)\n\n const keyframes: UnresolvedValueKeyframe[] = []\n const valueOffset: number[] = []\n const valueEasing: Easing[] = []\n\n /**\n * For each keyframe, translate absolute times into\n * relative offsets based on the total duration of the timeline.\n */\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i]\n keyframes.push(value)\n valueOffset.push(progress(0, totalDuration, at))\n valueEasing.push(easing || \"easeOut\")\n }\n\n /**\n * If the first keyframe doesn't land on offset: 0\n * provide one by duplicating the initial keyframe. This ensures\n * it snaps to the first keyframe when the animation starts.\n */\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0)\n keyframes.unshift(keyframes[0])\n valueEasing.unshift(defaultSegmentEasing)\n }\n\n /**\n * If the last keyframe doesn't land on offset: 1\n * provide one with a null wildcard value. This will ensure it\n * stays static until the end of the animation.\n */\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1)\n keyframes.push(null)\n }\n\n if (!animationDefinitions.has(element)) {\n animationDefinitions.set(element, {\n keyframes: {},\n transition: {},\n })\n }\n\n const definition = animationDefinitions.get(element)!\n\n definition.keyframes[key] = keyframes\n\n /**\n * Exclude `type` from defaultTransition since springs have been\n * converted to duration-based easing functions in resolveValueSequence.\n * Including `type: \"spring\"` would cause JSAnimation to error when\n * the merged keyframes array has more than 2 keyframes.\n */\n const { type: _type, ...remainingDefaultTransition } =\n defaultTransition\n definition.transition[key] = {\n ...remainingDefaultTransition,\n duration: totalDuration,\n ease: valueEasing,\n times: valueOffset,\n ...sequenceTransition,\n }\n }\n })\n\n return animationDefinitions\n}\n\nfunction getSubjectSequence(\n subject: Element | MotionValue | O,\n sequences: Map\n): SequenceMap {\n !sequences.has(subject) && sequences.set(subject, {})\n return sequences.get(subject)!\n}\n\nfunction getValueSequence(name: string, sequences: SequenceMap): ValueSequence {\n if (!sequences[name]) sequences[name] = []\n return sequences[name]\n}\n\nfunction keyframesAsList(\n keyframes: UnresolvedValueKeyframe | UnresolvedValueKeyframe[]\n): UnresolvedValueKeyframe[] {\n return Array.isArray(keyframes) ? keyframes : [keyframes]\n}\n\nexport function getValueTransition(\n transition: DynamicAnimationOptions & At,\n key: string\n): DynamicAnimationOptions {\n return transition && transition[key as keyof typeof transition]\n ? {\n ...transition,\n ...(transition[key as keyof typeof transition] as Transition),\n }\n : { ...transition }\n}\n\nconst isNumber = (keyframe: unknown) => typeof keyframe === \"number\"\nconst isNumberKeyframesArray = (\n keyframes: UnresolvedValueKeyframe[]\n): keyframes is number[] => keyframes.every(isNumber)\n","import {\n HTMLVisualElement,\n isSVGElement,\n isSVGSVGElement,\n ObjectVisualElement,\n SVGVisualElement,\n visualElementStore,\n} from \"motion-dom\"\n\nexport function createDOMVisualElement(element: HTMLElement | SVGElement) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n transform: {},\n transformOrigin: {},\n style: {},\n vars: {},\n attrs: {},\n },\n latestValues: {},\n },\n }\n const node =\n isSVGElement(element) && !isSVGSVGElement(element)\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options)\n\n node.mount(element as any)\n\n visualElementStore.set(element, node)\n}\n\nexport function createObjectVisualElement(subject: Object) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n output: {},\n },\n latestValues: {},\n },\n }\n const node = new ObjectVisualElement(options)\n\n node.mount(subject)\n\n visualElementStore.set(subject, node)\n}\n","import {\n animateTarget,\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n AnyResolvedKeyframe,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n isMotionValue,\n MotionValue,\n TargetAndTransition,\n UnresolvedValueKeyframe,\n ValueAnimationTransition,\n visualElementStore,\n} from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\nimport { ObjectTarget } from \"../sequence/types\"\nimport {\n createDOMVisualElement,\n createObjectVisualElement,\n} from \"../utils/create-visual-element\"\nimport { isDOMKeyframes } from \"../utils/is-dom-keyframes\"\nimport { resolveSubjects } from \"./resolve-subjects\"\nimport { animateSingleValue } from \"motion-dom\"\n\nexport type AnimationSubject = Element | MotionValue | any\n\nfunction isSingleValue(\n subject: unknown,\n keyframes: unknown\n): subject is MotionValue | AnyResolvedKeyframe {\n return (\n isMotionValue(subject) ||\n typeof subject === \"number\" ||\n (typeof subject === \"string\" && !isDOMKeyframes(keyframes))\n )\n}\n\n/**\n * Animate a string\n */\nexport function animateSubject(\n value: string | MotionValue,\n keyframes: string | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a number\n */\nexport function animateSubject(\n value: number | MotionValue,\n keyframes: number | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a Element\n */\nexport function animateSubject(\n element: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a object\n */\nexport function animateSubject(\n object: O | O[],\n keyframes: ObjectTarget,\n options?: DynamicAnimationOptions\n): AnimationPlaybackControlsWithThen[]\n/**\n * Implementation\n */\nexport function animateSubject(\n subject:\n | MotionValue\n | MotionValue\n | number\n | string\n | ElementOrSelector\n | O\n | O[],\n keyframes:\n | number\n | string\n | UnresolvedValueKeyframe[]\n | UnresolvedValueKeyframe[]\n | DOMKeyframesDefinition\n | ObjectTarget,\n options?:\n | ValueAnimationTransition\n | ValueAnimationTransition\n | DynamicAnimationOptions,\n scope?: AnimationScope\n): AnimationPlaybackControlsWithThen[] {\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n if (isSingleValue(subject, keyframes)) {\n animations.push(\n animateSingleValue(\n subject,\n isDOMKeyframes(keyframes)\n ? (keyframes as any).default || keyframes\n : keyframes,\n options ? (options as any).default || options : options\n )\n )\n } else {\n // Gracefully handle null/undefined subjects (e.g., from querySelector returning null)\n if (subject == null) {\n return animations\n }\n\n const subjects = resolveSubjects(\n subject,\n keyframes as DOMKeyframesDefinition,\n scope\n )\n\n const numSubjects = subjects.length\n\n invariant(\n Boolean(numSubjects),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n for (let i = 0; i < numSubjects; i++) {\n const thisSubject = subjects[i]\n\n const createVisualElement =\n thisSubject instanceof Element\n ? createDOMVisualElement\n : createObjectVisualElement\n\n if (!visualElementStore.has(thisSubject)) {\n createVisualElement(thisSubject as any)\n }\n\n const visualElement = visualElementStore.get(thisSubject)!\n const transition = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (\n \"delay\" in transition &&\n typeof transition.delay === \"function\"\n ) {\n transition.delay = transition.delay(i, numSubjects)\n }\n\n animations.push(\n ...animateTarget(\n visualElement,\n { ...(keyframes as {}), transition } as TargetAndTransition,\n {}\n )\n )\n }\n }\n\n return animations\n}\n","import {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n motionValue,\n spring,\n} from \"motion-dom\"\nimport { createAnimationsFromSequence } from \"../sequence/create\"\nimport { AnimationSequence, SequenceOptions } from \"../sequence/types\"\nimport { animateSubject } from \"./subject\"\n\nexport function animateSequence(\n sequence: AnimationSequence,\n options?: SequenceOptions,\n scope?: AnimationScope\n) {\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n /**\n * Pre-process: replace function segments with MotionValue segments,\n * subscribe callbacks immediately\n */\n const processedSequence = sequence.map((segment) => {\n if (Array.isArray(segment) && typeof segment[0] === \"function\") {\n const callback = segment[0] as (value: any) => void\n const mv = motionValue(0)\n mv.on(\"change\", callback)\n\n if (segment.length === 1) {\n return [mv, [0, 1]] as any\n } else if (segment.length === 2) {\n return [mv, [0, 1], segment[1]] as any\n } else {\n return [mv, segment[1], segment[2]] as any\n }\n }\n return segment\n }) as AnimationSequence\n\n const animationDefinitions = createAnimationsFromSequence(\n processedSequence,\n options,\n scope,\n { spring }\n )\n\n animationDefinitions.forEach(({ keyframes, transition }, subject) => {\n animations.push(...animateSubject(subject, keyframes, transition))\n })\n\n return animations\n}\n","import type {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n MotionValue,\n UnresolvedValueKeyframe,\n ValueAnimationTransition,\n} from \"motion-dom\"\nimport { GroupAnimationWithThen } from \"motion-dom\"\nimport { removeItem } from \"motion-utils\"\nimport {\n AnimationSequence,\n ObjectTarget,\n SequenceOptions,\n} from \"../sequence/types\"\nimport { animateSequence } from \"./sequence\"\nimport { animateSubject } from \"./subject\"\n\nfunction isSequence(value: unknown): value is AnimationSequence {\n return Array.isArray(value) && value.some(Array.isArray)\n}\n\ninterface ScopedAnimateOptions {\n scope?: AnimationScope\n reduceMotion?: boolean\n skipAnimations?: boolean\n}\n\n/**\n * Creates an animation function that is optionally scoped\n * to a specific element.\n */\nexport function createScopedAnimate(options: ScopedAnimateOptions = {}) {\n const { scope, reduceMotion, skipAnimations } = options\n /**\n * Animate a sequence\n */\n function scopedAnimate(\n sequence: AnimationSequence,\n options?: SequenceOptions\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate a string\n */\n function scopedAnimate(\n value: string | MotionValue,\n keyframes: string | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate a number\n */\n function scopedAnimate(\n value: number | MotionValue,\n keyframes: number | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate a generic motion value\n */\n function scopedAnimate(\n value: V | MotionValue,\n keyframes: V | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate an Element\n */\n function scopedAnimate(\n element: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate an object\n */\n function scopedAnimate(\n object: O | O[],\n keyframes: ObjectTarget,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen\n /**\n * Implementation\n */\n function scopedAnimate(\n subjectOrSequence:\n | AnimationSequence\n | MotionValue\n | MotionValue\n | number\n | string\n | ElementOrSelector\n | O\n | O[],\n optionsOrKeyframes?:\n | SequenceOptions\n | number\n | string\n | UnresolvedValueKeyframe[]\n | UnresolvedValueKeyframe[]\n | DOMKeyframesDefinition\n | ObjectTarget,\n options?:\n | ValueAnimationTransition\n | ValueAnimationTransition\n | DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen {\n let animations: AnimationPlaybackControlsWithThen[] = []\n let animationOnComplete: VoidFunction | undefined\n\n const inherited: { reduceMotion?: boolean; skipAnimations?: boolean } =\n {}\n if (reduceMotion !== undefined) inherited.reduceMotion = reduceMotion\n if (skipAnimations !== undefined)\n inherited.skipAnimations = skipAnimations\n\n if (isSequence(subjectOrSequence)) {\n const { onComplete, ...sequenceOptions } =\n (optionsOrKeyframes as SequenceOptions) || {}\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete as VoidFunction\n }\n animations = animateSequence(\n subjectOrSequence,\n { ...inherited, ...sequenceOptions } as SequenceOptions,\n scope\n )\n } else {\n // Extract top-level onComplete so it doesn't get applied per-value\n const { onComplete, ...rest } = options || {}\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete as VoidFunction\n }\n animations = animateSubject(\n subjectOrSequence as ElementOrSelector,\n optionsOrKeyframes as DOMKeyframesDefinition,\n { ...inherited, ...rest } as DynamicAnimationOptions,\n scope\n )\n }\n\n const animation = new GroupAnimationWithThen(animations)\n\n if (animationOnComplete) {\n animation.finished.then(animationOnComplete)\n }\n\n if (scope) {\n scope.animations.push(animation)\n animation.finished.then(() => {\n removeItem(scope.animations, animation)\n })\n }\n\n return animation\n }\n\n return scopedAnimate\n}\n\nexport const animate = createScopedAnimate()\n","import {\n animationMapKey,\n AnimationPlaybackControls,\n AnimationScope,\n applyPxDefaults,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n fillWildcards,\n getAnimationMap,\n getComputedStyle,\n getValueTransition,\n NativeAnimation,\n NativeAnimationOptions,\n resolveElements,\n UnresolvedValueKeyframe,\n ValueKeyframe,\n} from \"motion-dom\"\nimport { invariant, secondsToMilliseconds } from \"motion-utils\"\n\ninterface AnimationDefinition {\n map: Map>\n key: string\n unresolvedKeyframes: UnresolvedValueKeyframe[]\n options: Omit & {\n keyframes?: ValueKeyframe[]\n }\n}\n\nexport function animateElements(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n) {\n // Gracefully handle null/undefined elements (e.g., from querySelector returning null)\n if (elementOrSelector == null) {\n return []\n }\n\n const elements = resolveElements(elementOrSelector, scope) as Array<\n HTMLElement | SVGElement\n >\n const numElements = elements.length\n\n invariant(\n Boolean(numElements),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions: AnimationDefinition[] = []\n\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i]\n const elementTransition: DynamicAnimationOptions = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements)\n }\n\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName as keyof typeof keyframes]!\n\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes]\n }\n\n const valueOptions = {\n ...getValueTransition(elementTransition as any, valueName),\n }\n\n valueOptions.duration &&= secondsToMilliseconds(\n valueOptions.duration\n )\n\n valueOptions.delay &&= secondsToMilliseconds(valueOptions.delay)\n\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element)\n const key = animationMapKey(\n valueName,\n valueOptions.pseudoElement || \"\"\n )\n const currentAnimation = map.get(key)\n currentAnimation && currentAnimation.stop()\n\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n options: {\n ...valueOptions,\n element,\n name: valueName,\n allowFlatten:\n !elementTransition.type && !elementTransition.ease,\n },\n })\n }\n }\n\n /**\n * Step 2: Resolve keyframes (read)\n */\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { unresolvedKeyframes, options: animationOptions } =\n animationDefinitions[i]\n\n const { element, name, pseudoElement } = animationOptions\n if (!pseudoElement && unresolvedKeyframes[0] === null) {\n unresolvedKeyframes[0] = getComputedStyle(element, name)\n }\n\n fillWildcards(unresolvedKeyframes)\n applyPxDefaults(unresolvedKeyframes, name)\n\n /**\n * If we only have one keyframe, explicitly read the initial keyframe\n * from the computed style. This is to ensure consistency with WAAPI behaviour\n * for restarting animations, for instance .play() after finish, when it\n * has one vs two keyframes.\n */\n if (!pseudoElement && unresolvedKeyframes.length < 2) {\n unresolvedKeyframes.unshift(getComputedStyle(element, name))\n }\n\n animationOptions.keyframes = unresolvedKeyframes as ValueKeyframe[]\n }\n\n /**\n * Step 3: Create new animations (write)\n */\n const animations: AnimationPlaybackControls[] = []\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { map, key, options: animationOptions } = animationDefinitions[i]\n const animation = new NativeAnimation(\n animationOptions as NativeAnimationOptions\n )\n\n map.set(key, animation)\n animation.finished.finally(() => map.delete(key))\n\n animations.push(animation)\n }\n\n return animations\n}\n","import {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n GroupAnimationWithThen,\n} from \"motion-dom\"\nimport { animateElements } from \"./animate-elements\"\n\nexport const createScopedWaapiAnimate = (scope?: AnimationScope) => {\n function scopedAnimate(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen {\n return new GroupAnimationWithThen(\n animateElements(\n elementOrSelector,\n keyframes as DOMKeyframesDefinition,\n options,\n scope\n )\n )\n }\n\n return scopedAnimate\n}\n\nexport const animateMini = /*@__PURE__*/ createScopedWaapiAnimate()\n","import { supportsScrollTimeline, supportsViewTimeline } from \"motion-dom\"\n\nexport function canUseNativeTimeline(target?: Element) {\n if (typeof window === \"undefined\") return false\n return target ? supportsViewTimeline() : supportsScrollTimeline()\n}\n","import { progress, velocityPerSecond } from \"motion-utils\"\nimport { AxisScrollInfo, ScrollInfo } from \"./types\"\n\n/**\n * A time in milliseconds, beyond which we consider the scroll velocity to be 0.\n */\nconst maxElapsed = 50\n\nconst createAxisInfo = (): AxisScrollInfo => ({\n current: 0,\n offset: [],\n progress: 0,\n scrollLength: 0,\n targetOffset: 0,\n targetLength: 0,\n containerLength: 0,\n velocity: 0,\n})\n\nexport const createScrollInfo = (): ScrollInfo => ({\n time: 0,\n x: createAxisInfo(),\n y: createAxisInfo(),\n})\n\nconst keys = {\n x: {\n length: \"Width\",\n position: \"Left\",\n },\n y: {\n length: \"Height\",\n position: \"Top\",\n },\n} as const\n\nfunction updateAxisInfo(\n element: Element,\n axisName: \"x\" | \"y\",\n info: ScrollInfo,\n time: number\n) {\n const axis = info[axisName]\n const { length, position } = keys[axisName]\n\n const prev = axis.current\n const prevTime = info.time\n\n axis.current = Math.abs(element[`scroll${position}`])\n axis.scrollLength = element[`scroll${length}`] - element[`client${length}`]\n\n axis.offset.length = 0\n axis.offset[0] = 0\n axis.offset[1] = axis.scrollLength\n axis.progress = progress(0, axis.scrollLength, axis.current)\n\n const elapsed = time - prevTime\n axis.velocity =\n elapsed > maxElapsed\n ? 0\n : velocityPerSecond(axis.current - prev, elapsed)\n}\n\nexport function updateScrollInfo(\n element: Element,\n info: ScrollInfo,\n time: number\n) {\n updateAxisInfo(element, \"x\", info, time)\n updateAxisInfo(element, \"y\", info, time)\n info.time = time\n}\n","import { isHTMLElement } from \"motion-dom\"\n\nexport function calcInset(element: Element, container: Element) {\n const inset = { x: 0, y: 0 }\n\n let current: Element | null = element\n while (current && current !== container) {\n if (isHTMLElement(current)) {\n inset.x += current.offsetLeft\n inset.y += current.offsetTop\n current = current.offsetParent\n } else if (current.tagName === \"svg\") {\n /**\n * This isn't an ideal approach to measuring the offset of tags.\n * It would be preferable, given they behave like HTMLElements in most ways\n * to use offsetLeft/Top. But these don't exist on . Likewise we\n * can't use .getBBox() like most SVG elements as these provide the offset\n * relative to the SVG itself, which for is usually 0x0.\n */\n const svgBoundingBox = current.getBoundingClientRect()\n current = current.parentElement!\n const parentBoundingBox = current.getBoundingClientRect()\n inset.x += svgBoundingBox.left - parentBoundingBox.left\n inset.y += svgBoundingBox.top - parentBoundingBox.top\n } else if (current instanceof SVGGraphicsElement) {\n const { x, y } = current.getBBox()\n inset.x += x\n inset.y += y\n\n let svg: SVGElement | null = null\n let parent: SVGElement = current.parentNode as SVGElement\n while (!svg) {\n if (parent.tagName === \"svg\") {\n svg = parent\n }\n parent = current.parentNode as SVGElement\n }\n current = svg\n } else {\n break\n }\n }\n\n return inset\n}\n","import { Edge, NamedEdges } from \"../types\"\n\nexport const namedEdges: Record = {\n start: 0,\n center: 0.5,\n end: 1,\n}\n\nexport function resolveEdge(edge: Edge, length: number, inset = 0) {\n let delta = 0\n\n /**\n * If we have this edge defined as a preset, replace the definition\n * with the numerical value.\n */\n if (edge in namedEdges) {\n edge = namedEdges[edge as NamedEdges]\n }\n\n /**\n * Handle unit values\n */\n if (typeof edge === \"string\") {\n const asNumber = parseFloat(edge)\n\n if (edge.endsWith(\"px\")) {\n delta = asNumber\n } else if (edge.endsWith(\"%\")) {\n edge = asNumber / 100\n } else if (edge.endsWith(\"vw\")) {\n delta = (asNumber / 100) * document.documentElement.clientWidth\n } else if (edge.endsWith(\"vh\")) {\n delta = (asNumber / 100) * document.documentElement.clientHeight\n } else {\n edge = asNumber\n }\n }\n\n /**\n * If the edge is defined as a number, handle as a progress value.\n */\n if (typeof edge === \"number\") {\n delta = length * edge\n }\n\n return inset + delta\n}\n","import { Edge, EdgeString, Intersection, ProgressIntersection } from \"../types\"\nimport { namedEdges, resolveEdge } from \"./edge\"\n\nconst defaultOffset: ProgressIntersection = [0, 0]\n\nexport function resolveOffset(\n offset: Edge | Intersection | ProgressIntersection,\n containerLength: number,\n targetLength: number,\n targetInset: number\n) {\n let offsetDefinition: ProgressIntersection | [EdgeString, EdgeString] =\n Array.isArray(offset) ? offset : defaultOffset\n\n let targetPoint = 0\n let containerPoint = 0\n\n if (typeof offset === \"number\") {\n /**\n * If we're provided offset: [0, 0.5, 1] then each number x should become\n * [x, x], so we default to the behaviour of mapping 0 => 0 of both target\n * and container etc.\n */\n offsetDefinition = [offset, offset]\n } else if (typeof offset === \"string\") {\n offset = offset.trim() as EdgeString\n\n if (offset.includes(\" \")) {\n offsetDefinition = offset.split(\" \") as [EdgeString, EdgeString]\n } else {\n /**\n * If we're provided a definition like \"100px\" then we want to apply\n * that only to the top of the target point, leaving the container at 0.\n * Whereas a named offset like \"end\" should be applied to both.\n */\n offsetDefinition = [offset, namedEdges[offset as keyof typeof namedEdges] ? offset : `0`]\n }\n }\n\n targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset)\n containerPoint = resolveEdge(offsetDefinition[1], containerLength)\n\n return targetPoint - containerPoint\n}\n","import { ProgressIntersection } from \"../types\"\n\nexport const ScrollOffset: Record = {\n Enter: [\n [0, 1],\n [1, 1],\n ],\n Exit: [\n [0, 0],\n [1, 0],\n ],\n Any: [\n [1, 0],\n [0, 1],\n ],\n All: [\n [0, 0],\n [1, 1],\n ],\n}\n","import { defaultOffset, interpolate } from \"motion-dom\"\nimport { clamp } from \"motion-utils\"\nimport { ScrollInfo, ScrollInfoOptions } from \"../types\"\nimport { calcInset } from \"./inset\"\nimport { resolveOffset } from \"./offset\"\nimport { ScrollOffset } from \"./presets\"\n\nconst point = { x: 0, y: 0 }\n\nfunction getTargetSize(target: Element) {\n return \"getBBox\" in target && target.tagName !== \"svg\"\n ? (target as SVGGraphicsElement).getBBox()\n : { width: target.clientWidth, height: target.clientHeight }\n}\n\nexport function resolveOffsets(\n container: Element,\n info: ScrollInfo,\n options: ScrollInfoOptions\n) {\n const { offset: offsetDefinition = ScrollOffset.All } = options\n const { target = container, axis = \"y\" } = options\n const lengthLabel = axis === \"y\" ? \"height\" : \"width\"\n\n const inset = target !== container ? calcInset(target, container) : point\n\n /**\n * Measure the target and container. If they're the same thing then we\n * use the container's scrollWidth/Height as the target, from there\n * all other calculations can remain the same.\n */\n const targetSize =\n target === container\n ? { width: container.scrollWidth, height: container.scrollHeight }\n : getTargetSize(target)\n\n const containerSize = {\n width: container.clientWidth,\n height: container.clientHeight,\n }\n\n /**\n * Reset the length of the resolved offset array rather than creating a new one.\n * TODO: More reusable data structures for targetSize/containerSize would also be good.\n */\n info[axis].offset.length = 0\n\n /**\n * Populate the offset array by resolving the user's offset definition into\n * a list of pixel scroll offets.\n */\n let hasChanged = !info[axis].interpolate\n\n const numOffsets = offsetDefinition.length\n for (let i = 0; i < numOffsets; i++) {\n const offset = resolveOffset(\n offsetDefinition[i],\n containerSize[lengthLabel],\n targetSize[lengthLabel],\n inset[axis]\n )\n\n if (!hasChanged && offset !== info[axis].interpolatorOffsets![i]) {\n hasChanged = true\n }\n\n info[axis].offset[i] = offset\n }\n\n /**\n * If the pixel scroll offsets have changed, create a new interpolator function\n * to map scroll value into a progress.\n */\n if (hasChanged) {\n info[axis].interpolate = interpolate(\n info[axis].offset,\n defaultOffset(offsetDefinition),\n { clamp: false }\n )\n\n info[axis].interpolatorOffsets = [...info[axis].offset]\n }\n\n info[axis].progress = clamp(\n 0,\n 1,\n info[axis].interpolate!(info[axis].current)\n )\n}\n","import { warnOnce } from \"motion-utils\"\nimport { updateScrollInfo } from \"./info\"\nimport { resolveOffsets } from \"./offsets/index\"\nimport {\n OnScrollHandler,\n OnScrollInfo,\n ScrollInfo,\n ScrollInfoOptions,\n} from \"./types\"\n\nfunction measure(\n container: Element,\n target: Element = container,\n info: ScrollInfo\n) {\n /**\n * Find inset of target within scrollable container\n */\n info.x.targetOffset = 0\n info.y.targetOffset = 0\n if (target !== container) {\n let node = target as HTMLElement\n while (node && node !== container) {\n info.x.targetOffset += node.offsetLeft\n info.y.targetOffset += node.offsetTop\n node = node.offsetParent as HTMLElement\n }\n }\n\n info.x.targetLength =\n target === container ? target.scrollWidth : target.clientWidth\n info.y.targetLength =\n target === container ? target.scrollHeight : target.clientHeight\n info.x.containerLength = container.clientWidth\n info.y.containerLength = container.clientHeight\n\n /**\n * In development mode ensure scroll containers aren't position: static as this makes\n * it difficult to measure their relative positions. The document scrolling element\n * is exempt: offsetParent measurements naturally resolve relative to the document.\n */\n if (process.env.NODE_ENV !== \"production\") {\n if (\n container &&\n target &&\n target !== container &&\n container !== document.documentElement &&\n container !== document.scrollingElement &&\n container !== document.body\n ) {\n warnOnce(\n getComputedStyle(container).position !== \"static\",\n \"Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.\"\n )\n }\n }\n}\n\nexport function createOnScrollHandler(\n element: Element,\n onScroll: OnScrollInfo,\n info: ScrollInfo,\n options: ScrollInfoOptions = {}\n): OnScrollHandler {\n return {\n measure: (time) => {\n measure(element, options.target, info)\n updateScrollInfo(element, info, time)\n\n if (options.offset || options.target) {\n resolveOffsets(element, info, options)\n }\n },\n notify: () => onScroll(info),\n }\n}\n","import { cancelFrame, frame, frameData, resize, Process } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { createScrollInfo } from \"./info\"\nimport { createOnScrollHandler } from \"./on-scroll-handler\"\nimport { OnScrollHandler, OnScrollInfo, ScrollInfoOptions } from \"./types\"\n\nconst scrollListeners = new WeakMap()\nconst resizeListeners = new WeakMap()\nconst onScrollHandlers = new WeakMap>()\nconst scrollSize = new WeakMap()\nconst dimensionCheckProcesses = new WeakMap()\n\nexport type ScrollTargets = Array\n\nconst getEventTarget = (element: Element) =>\n element === document.scrollingElement ? window : element\n\nexport function scrollInfo(\n onScroll: OnScrollInfo,\n {\n container = document.scrollingElement as Element,\n trackContentSize = false,\n ...options\n }: ScrollInfoOptions = {}\n) {\n if (!container) return noop as VoidFunction\n\n let containerHandlers = onScrollHandlers.get(container)\n\n /**\n * Get the onScroll handlers for this container.\n * If one isn't found, create a new one.\n */\n if (!containerHandlers) {\n containerHandlers = new Set()\n onScrollHandlers.set(container, containerHandlers)\n }\n\n /**\n * Create a new onScroll handler for the provided callback.\n */\n const info = createScrollInfo()\n const containerHandler = createOnScrollHandler(\n container,\n onScroll,\n info,\n options\n )\n containerHandlers.add(containerHandler)\n\n /**\n * Check if there's a scroll event listener for this container.\n * If not, create one.\n */\n if (!scrollListeners.has(container)) {\n const measureAll = () => {\n for (const handler of containerHandlers) {\n handler.measure(frameData.timestamp)\n }\n\n frame.preUpdate(notifyAll)\n }\n\n const notifyAll = () => {\n for (const handler of containerHandlers) {\n handler.notify()\n }\n }\n\n const listener = () => frame.read(measureAll)\n\n scrollListeners.set(container, listener)\n\n const target = getEventTarget(container)\n window.addEventListener(\"resize\", listener)\n if (container !== document.documentElement) {\n resizeListeners.set(container, resize(container, listener))\n }\n\n target.addEventListener(\"scroll\", listener)\n\n listener()\n }\n\n /**\n * Enable content size tracking if requested and not already enabled.\n */\n if (trackContentSize && !dimensionCheckProcesses.has(container)) {\n const listener = scrollListeners.get(container)!\n\n // Store initial scroll dimensions (object is reused to avoid allocation)\n const size = {\n width: container.scrollWidth,\n height: container.scrollHeight,\n }\n scrollSize.set(container, size)\n\n // Add frame-based scroll dimension checking to detect content changes\n const checkScrollDimensions: Process = () => {\n const newWidth = container.scrollWidth\n const newHeight = container.scrollHeight\n\n if (size.width !== newWidth || size.height !== newHeight) {\n listener()\n size.width = newWidth\n size.height = newHeight\n }\n }\n\n // Schedule with keepAlive=true to run every frame\n const dimensionCheckProcess = frame.read(checkScrollDimensions, true)\n dimensionCheckProcesses.set(container, dimensionCheckProcess)\n }\n\n const listener = scrollListeners.get(container)!\n frame.read(listener, false, true)\n\n return () => {\n cancelFrame(listener)\n\n /**\n * Check if we even have any handlers for this container.\n */\n const currentHandlers = onScrollHandlers.get(container)\n if (!currentHandlers) return\n\n currentHandlers.delete(containerHandler)\n\n if (currentHandlers.size) return\n\n /**\n * If no more handlers, remove the scroll listener too.\n */\n const scrollListener = scrollListeners.get(container)\n scrollListeners.delete(container)\n\n if (scrollListener) {\n getEventTarget(container).removeEventListener(\n \"scroll\",\n scrollListener\n )\n resizeListeners.get(container)?.()\n window.removeEventListener(\"resize\", scrollListener)\n }\n\n // Clean up scroll dimension checking\n const dimensionCheckProcess = dimensionCheckProcesses.get(container)\n if (dimensionCheckProcess) {\n cancelFrame(dimensionCheckProcess)\n dimensionCheckProcesses.delete(container)\n }\n scrollSize.delete(container)\n }\n}\n","import { ScrollOffset as ScrollOffsetPresets } from \"../offsets/presets\"\nimport { ProgressIntersection, ScrollOffset } from \"../types\"\n\ninterface ViewTimelineRange {\n rangeStart: string\n rangeEnd: string\n}\n\n/**\n * Maps from ProgressIntersection pairs used by Motion's preset offsets to\n * ViewTimeline named ranges. Returns undefined for unrecognised patterns,\n * which signals the caller to fall back to JS-based scroll tracking.\n */\nconst presets: [ProgressIntersection[], string][] = [\n [ScrollOffsetPresets.Enter, \"entry\"],\n [ScrollOffsetPresets.Exit, \"exit\"],\n [ScrollOffsetPresets.Any, \"cover\"],\n [ScrollOffsetPresets.All, \"contain\"],\n]\n\nconst stringToProgress: Record = {\n start: 0,\n end: 1,\n}\n\nfunction parseStringOffset(\n s: string\n): ProgressIntersection | undefined {\n const parts = s.trim().split(/\\s+/)\n if (parts.length !== 2) return undefined\n const a = stringToProgress[parts[0]]\n const b = stringToProgress[parts[1]]\n if (a === undefined || b === undefined) return undefined\n return [a, b]\n}\n\nfunction normaliseOffset(offset: ScrollOffset): ProgressIntersection[] | undefined {\n if (offset.length !== 2) return undefined\n const result: ProgressIntersection[] = []\n for (const item of offset) {\n if (Array.isArray(item)) {\n result.push(item as ProgressIntersection)\n } else if (typeof item === \"string\") {\n const parsed = parseStringOffset(item)\n if (!parsed) return undefined\n result.push(parsed)\n } else {\n return undefined\n }\n }\n return result\n}\n\nfunction matchesPreset(\n offset: ScrollOffset,\n preset: ProgressIntersection[]\n): boolean {\n const normalised = normaliseOffset(offset)\n if (!normalised) return false\n\n for (let i = 0; i < 2; i++) {\n const o = normalised[i]\n const p = preset[i]\n if (o[0] !== p[0] || o[1] !== p[1]) return false\n }\n return true\n}\n\nexport function offsetToViewTimelineRange(\n offset?: ScrollOffset\n): ViewTimelineRange | undefined {\n if (!offset) {\n return { rangeStart: \"contain 0%\", rangeEnd: \"contain 100%\" }\n }\n\n for (const [preset, name] of presets) {\n if (matchesPreset(offset, preset)) {\n return { rangeStart: `${name} 0%`, rangeEnd: `${name} 100%` }\n }\n }\n\n return undefined\n}\n","import { ProgressTimeline } from \"motion-dom\"\nimport { scrollInfo } from \"../track\"\nimport { ScrollOptionsWithDefaults } from \"../types\"\nimport { canUseNativeTimeline } from \"./can-use-native-timeline\"\nimport { offsetToViewTimelineRange } from \"./offset-to-range\"\n\ndeclare class ScrollTimeline implements ProgressTimeline {\n constructor(options: ScrollOptions)\n\n currentTime: null | { value: number }\n\n cancel?: VoidFunction\n}\n\ndeclare class ViewTimeline implements ProgressTimeline {\n constructor(options: { subject: Element; axis?: string })\n\n currentTime: null | { value: number }\n\n cancel?: VoidFunction\n}\n\nconst timelineCache = new Map<\n Element,\n Map>\n>()\n\nfunction scrollTimelineFallback(options: ScrollOptionsWithDefaults) {\n const currentTime = { value: 0 }\n\n const cancel = scrollInfo((info) => {\n currentTime.value = info[options.axis!].progress * 100\n }, options)\n\n return { currentTime, cancel }\n}\n\nexport function getTimeline({\n source,\n container,\n ...options\n}: ScrollOptionsWithDefaults): ProgressTimeline {\n const { axis } = options\n\n if (source) container = source\n\n let containerCache = timelineCache.get(container)\n if (!containerCache) {\n containerCache = new Map()\n timelineCache.set(container, containerCache)\n }\n\n const targetKey = options.target ?? \"self\"\n let targetCache = containerCache.get(targetKey)\n if (!targetCache) {\n targetCache = {}\n containerCache.set(targetKey, targetCache)\n }\n\n const axisKey = axis + (options.offset ?? []).join(\",\")\n\n if (!targetCache[axisKey]) {\n if (options.target && canUseNativeTimeline(options.target)) {\n const range = offsetToViewTimelineRange(options.offset)\n if (range) {\n targetCache[axisKey] = new ViewTimeline({\n subject: options.target,\n axis,\n })\n } else {\n targetCache[axisKey] = scrollTimelineFallback({\n container,\n ...options,\n })\n }\n } else if (canUseNativeTimeline()) {\n targetCache[axisKey] = new ScrollTimeline({\n source: container,\n axis,\n } as any)\n } else {\n targetCache[axisKey] = scrollTimelineFallback({\n container,\n ...options,\n })\n }\n }\n\n return targetCache[axisKey]!\n}\n","import { AnimationPlaybackControls, observeTimeline } from \"motion-dom\"\nimport { ScrollOptionsWithDefaults } from \"./types\"\nimport { canUseNativeTimeline } from \"./utils/can-use-native-timeline\"\nimport { getTimeline } from \"./utils/get-timeline\"\nimport { offsetToViewTimelineRange } from \"./utils/offset-to-range\"\n\nexport function attachToAnimation(\n animation: AnimationPlaybackControls,\n options: ScrollOptionsWithDefaults\n) {\n const timeline = getTimeline(options)\n\n const range = options.target\n ? offsetToViewTimelineRange(options.offset)\n : undefined\n\n /**\n * Use native timeline when:\n * - No target: ScrollTimeline (existing behaviour)\n * - Target with mappable offset: ViewTimeline with named range\n * - Target with unmappable offset: fall back to JS observe\n */\n const useNative = options.target\n ? canUseNativeTimeline(options.target) && !!range\n : canUseNativeTimeline()\n\n return animation.attachTimeline({\n timeline: useNative ? timeline : undefined,\n ...(range &&\n useNative && {\n rangeStart: range.rangeStart,\n rangeEnd: range.rangeEnd,\n }),\n observe: (valueAnimation) => {\n valueAnimation.pause()\n\n return observeTimeline((progress) => {\n valueAnimation.time =\n valueAnimation.iterationDuration * progress\n }, timeline)\n },\n })\n}\n","import { ScrollOptionsWithDefaults } from \"../types\"\n\n/**\n * Currently, we only support element tracking with `scrollInfo`, though in\n * the future we can also offer ViewTimeline support.\n */\nexport function isElementTracking(options?: ScrollOptionsWithDefaults) {\n return options && (options.target || options.offset)\n}\n","import { observeTimeline } from \"motion-dom\"\nimport { scrollInfo } from \"./track\"\nimport { OnScroll, OnScrollWithInfo, ScrollOptionsWithDefaults } from \"./types\"\nimport { getTimeline } from \"./utils/get-timeline\"\nimport { isElementTracking } from \"./utils/is-element-tracking\"\n\n/**\n * If the onScroll function has two arguments, it's expecting\n * more specific information about the scroll from scrollInfo.\n */\nfunction isOnScrollWithInfo(onScroll: OnScroll): onScroll is OnScrollWithInfo {\n return onScroll.length === 2\n}\n\nexport function attachToFunction(\n onScroll: OnScroll,\n options: ScrollOptionsWithDefaults\n) {\n if (isOnScrollWithInfo(onScroll) || isElementTracking(options)) {\n return scrollInfo((info) => {\n onScroll(info[options.axis!].progress, info)\n }, options)\n } else {\n return observeTimeline(onScroll, getTimeline(options))\n }\n}\n","import { AnimationPlaybackControls } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { attachToAnimation } from \"./attach-animation\"\nimport { attachToFunction } from \"./attach-function\"\nimport { OnScroll, ScrollOptions } from \"./types\"\n\nexport function scroll(\n onScroll: OnScroll | AnimationPlaybackControls,\n {\n axis = \"y\",\n container = document.scrollingElement as Element,\n ...options\n }: ScrollOptions = {}\n): VoidFunction {\n if (!container) return noop as VoidFunction\n\n const optionsWithDefaults = { axis, container, ...options }\n\n return typeof onScroll === \"function\"\n ? attachToFunction(onScroll, optionsWithDefaults)\n : attachToAnimation(onScroll, optionsWithDefaults)\n}\n","import { ElementOrSelector, resolveElements } from \"motion-dom\"\n\nexport type ViewChangeHandler = (entry: IntersectionObserverEntry) => void\n\ntype MarginValue = `${number}${\"px\" | \"%\"}`\ntype MarginType =\n | MarginValue\n | `${MarginValue} ${MarginValue}`\n | `${MarginValue} ${MarginValue} ${MarginValue}`\n | `${MarginValue} ${MarginValue} ${MarginValue} ${MarginValue}`\n\nexport interface InViewOptions {\n root?: Element | Document\n margin?: MarginType\n amount?: \"some\" | \"all\" | number\n}\n\nconst thresholds = {\n some: 0,\n all: 1,\n}\n\nexport function inView(\n elementOrSelector: ElementOrSelector,\n onStart: (\n element: Element,\n entry: IntersectionObserverEntry\n ) => void | ViewChangeHandler,\n { root, margin: rootMargin, amount = \"some\" }: InViewOptions = {}\n): VoidFunction {\n const elements = resolveElements(elementOrSelector)\n\n const activeIntersections = new WeakMap()\n\n const onIntersectionChange: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n const onEnd = activeIntersections.get(entry.target)\n\n /**\n * If there's no change to the intersection, we don't need to\n * do anything here.\n */\n if (entry.isIntersecting === Boolean(onEnd)) return\n\n if (entry.isIntersecting) {\n const newOnEnd = onStart(entry.target, entry)\n if (typeof newOnEnd === \"function\") {\n activeIntersections.set(entry.target, newOnEnd)\n } else {\n observer.unobserve(entry.target)\n }\n } else if (typeof onEnd === \"function\") {\n onEnd(entry)\n activeIntersections.delete(entry.target)\n }\n })\n }\n\n const observer = new IntersectionObserver(onIntersectionChange, {\n root,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholds[amount],\n })\n\n elements.forEach((element) => observer.observe(element))\n\n return () => observer.disconnect()\n}\n","import { createMotionProxy } from \"../create-proxy\"\n\nexport const m = /*@__PURE__*/ createMotionProxy()\n","\"use client\"\n\nimport { useEffect } from \"react\"\n\nexport function useUnmountEffect(callback: () => void) {\n return useEffect(() => () => callback(), [])\n}\n","\"use client\"\n\nimport { animations } from \"../../motion/features/animations\"\nimport { gestureAnimations } from \"../../motion/features/gestures\"\nimport { FeatureBundle } from \"../../motion/features/types\"\nimport { createDomVisualElement } from \"./create-visual-element\"\n\n/**\n * @public\n */\nexport const domAnimation: FeatureBundle = {\n renderer: createDomVisualElement,\n ...animations,\n ...gestureAnimations,\n}\n","\"use client\"\n\nimport { drag } from \"../../motion/features/drag\"\nimport { layout } from \"../../motion/features/layout\"\nimport { FeatureBundle } from \"../../motion/features/types\"\nimport { domAnimation } from \"./features-animation\"\n\n/**\n * @public\n */\nexport const domMax: FeatureBundle = {\n ...domAnimation,\n ...drag,\n ...layout,\n}\n","\"use client\"\n\nimport { animations } from \"../../motion/features/animations\"\nimport { FeatureBundle } from \"../../motion/features/types\"\nimport { createDomVisualElement } from \"./create-visual-element\"\n\n/**\n * @public\n */\nexport const domMin: FeatureBundle = {\n renderer: createDomVisualElement,\n ...animations,\n}\n","\"use client\"\n\nimport { MotionValue, MotionValueEventCallbacks } from \"motion-dom\"\nimport { useInsertionEffect } from \"react\"\n\nexport function useMotionValueEvent<\n V,\n EventName extends keyof MotionValueEventCallbacks\n>(\n value: MotionValue,\n event: EventName,\n callback: MotionValueEventCallbacks[EventName]\n) {\n /**\n * useInsertionEffect will create subscriptions before any other\n * effects will run. Effects run upwards through the tree so it\n * can be that binding a useLayoutEffect higher up the tree can\n * miss changes from lower down the tree.\n */\n useInsertionEffect(\n () => value.on(event, callback),\n [value, event, callback]\n )\n}\n","\"use client\"\n\nimport {\n AnimationPlaybackControls,\n cancelMicrotask,\n microtask,\n motionValue,\n supportsScrollTimeline,\n supportsViewTimeline,\n} from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\nimport { RefObject, useCallback, useEffect, useRef } from \"react\"\nimport { scroll } from \"../render/dom/scroll\"\nimport { ScrollInfoOptions } from \"../render/dom/scroll/types\"\nimport { offsetToViewTimelineRange } from \"../render/dom/scroll/utils/offset-to-range\"\nimport { useConstant } from \"../utils/use-constant\"\nimport { useIsomorphicLayoutEffect } from \"../utils/use-isomorphic-effect\"\n\nexport interface UseScrollOptions\n extends Omit {\n container?: RefObject\n target?: RefObject\n}\n\nconst createScrollMotionValues = () => ({\n scrollX: motionValue(0),\n scrollY: motionValue(0),\n scrollXProgress: motionValue(0),\n scrollYProgress: motionValue(0),\n})\n\nconst isRefPending = (ref?: RefObject) => {\n if (!ref) return false\n return !ref.current\n}\n\nfunction makeAccelerateConfig(\n axis: \"x\" | \"y\",\n options: Omit,\n container?: RefObject,\n target?: RefObject\n) {\n return {\n // Refs attach child-first; defer so target.current is populated\n // before scroll() reads it.\n factory: (animation: AnimationPlaybackControls) => {\n let cleanup: VoidFunction | undefined\n const start = () => {\n // A provided ref may be hydrated by an effect declared after\n // useScroll (or in a parent). Don't attach to the window\n // scroll in the meantime — that result gets cached and would\n // permanently mistrack. Wait until the ref resolves.\n if (isRefPending(container) || isRefPending(target)) {\n microtask.read(start)\n return\n }\n cleanup = scroll(animation, {\n ...options,\n axis,\n container: container?.current || undefined,\n target: target?.current || undefined,\n })\n }\n microtask.read(start)\n return () => {\n cancelMicrotask(start)\n cleanup?.()\n }\n },\n times: [0, 1],\n keyframes: [0, 1],\n ease: (v: number) => v,\n duration: 1,\n }\n}\n\nfunction canAccelerateScroll(\n target?: RefObject,\n offset?: ScrollInfoOptions[\"offset\"]\n) {\n if (typeof window === \"undefined\") return false\n return target\n ? supportsViewTimeline() && !!offsetToViewTimelineRange(offset)\n : supportsScrollTimeline()\n}\n\nexport function useScroll({\n container,\n target,\n ...options\n}: UseScrollOptions = {}) {\n const values = useConstant(createScrollMotionValues)\n\n if (canAccelerateScroll(target, options.offset)) {\n values.scrollXProgress.accelerate = makeAccelerateConfig(\n \"x\",\n options,\n container,\n target\n )\n values.scrollYProgress.accelerate = makeAccelerateConfig(\n \"y\",\n options,\n container,\n target\n )\n }\n\n const scrollAnimation = useRef(null)\n const needsStart = useRef(false)\n\n const start = useCallback(() => {\n scrollAnimation.current = scroll(\n (\n _progress: number,\n {\n x,\n y,\n }: {\n x: { current: number; progress: number }\n y: { current: number; progress: number }\n }\n ) => {\n values.scrollX.set(x.current)\n values.scrollXProgress.set(x.progress)\n values.scrollY.set(y.current)\n values.scrollYProgress.set(y.progress)\n },\n {\n ...options,\n container: container?.current || undefined,\n target: target?.current || undefined,\n }\n )\n\n return () => {\n scrollAnimation.current?.()\n }\n }, [container, target, JSON.stringify(options.offset)])\n\n useIsomorphicLayoutEffect(() => {\n needsStart.current = false\n\n if (isRefPending(container) || isRefPending(target)) {\n needsStart.current = true\n return\n } else {\n return start()\n }\n }, [start])\n\n useEffect(() => {\n if (!needsStart.current) return\n\n // Defer to a microtask so any sibling/parent effect that hydrates the\n // ref has a chance to run first.\n let cleanup: VoidFunction | undefined\n const tryStart = () => {\n const containerPending = isRefPending(container)\n const targetPending = isRefPending(target)\n invariant(\n !containerPending,\n \"Container ref is defined but not hydrated\",\n \"use-scroll-ref\"\n )\n invariant(\n !targetPending,\n \"Target ref is defined but not hydrated\",\n \"use-scroll-ref\"\n )\n if (!containerPending && !targetPending) cleanup = start()\n }\n microtask.read(tryStart)\n\n return () => {\n cancelMicrotask(tryStart)\n cleanup?.()\n }\n }, [start])\n\n return values\n}\n","import { warnOnce } from \"motion-utils\"\nimport { RefObject } from \"react\"\nimport { useScroll } from \"../use-scroll\"\n\n/**\n * @deprecated useElementScroll is deprecated. Convert to useScroll({ container: ref })\n */\nexport function useElementScroll(ref: RefObject) {\n if (process.env.NODE_ENV === \"development\") {\n warnOnce(\n false,\n \"useElementScroll is deprecated. Convert to useScroll({ container: ref }).\"\n )\n }\n\n return useScroll({ container: ref })\n}\n","import { warnOnce } from \"motion-utils\"\nimport { useScroll } from \"../use-scroll\"\n\n/**\n * @deprecated useViewportScroll is deprecated. Convert to useScroll()\n */\nexport function useViewportScroll() {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n false,\n \"useViewportScroll is deprecated. Convert to useScroll().\"\n )\n }\n return useScroll()\n}\n","\"use client\"\n\nimport { isMotionValue, MotionValue } from \"motion-dom\"\nimport { useCombineMotionValues } from \"./use-combine-values\"\n\n/**\n * Combine multiple motion values into a new one using a string template literal.\n *\n * ```jsx\n * import {\n * motion,\n * useSpring,\n * useMotionValue,\n * useMotionTemplate\n * } from \"framer-motion\"\n *\n * function Component() {\n * const shadowX = useSpring(0)\n * const shadowY = useMotionValue(0)\n * const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))`\n *\n * return \n * }\n * ```\n *\n * @public\n */\nexport function useMotionTemplate(\n fragments: TemplateStringsArray,\n ...values: Array\n) {\n /**\n * Create a function that will build a string from the latest motion values.\n */\n const numFragments = fragments.length\n\n function buildValue() {\n let output = ``\n\n for (let i = 0; i < numFragments; i++) {\n output += fragments[i]\n const value = values[i]\n if (value) {\n output += isMotionValue(value) ? value.get() : value\n }\n }\n\n return output\n }\n\n return useCombineMotionValues(values.filter(isMotionValue), buildValue)\n}\n","\"use client\"\n\nimport {\n AnyResolvedKeyframe,\n attachFollow,\n FollowValueOptions,\n isMotionValue,\n MotionValue,\n} from \"motion-dom\"\nimport { useContext, useInsertionEffect } from \"react\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\nimport { useMotionValue } from \"./use-motion-value\"\nimport { useTransform } from \"./use-transform\"\n\n/**\n * Creates a `MotionValue` that, when `set`, will use the specified animation transition to animate to its new state.\n *\n * Unlike `useSpring` which is limited to spring animations, `useFollowValue` accepts any motion transition\n * including spring, tween, inertia, and keyframes.\n *\n * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber\n * to another `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * // Spring animation (default)\n * const x = useFollowValue(0, { stiffness: 300 })\n *\n * // Tween animation\n * const y = useFollowValue(0, { type: \"tween\", duration: 0.5, ease: \"easeOut\" })\n *\n * // Track another MotionValue with spring\n * const source = useMotionValue(0)\n * const z = useFollowValue(source, { type: \"spring\", damping: 10 })\n *\n * // Inertia animation\n * const w = useFollowValue(0, { type: \"inertia\", velocity: 100 })\n * ```\n *\n * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will animate towards that value using the specified transition.\n * @param options - Animation transition options. Supports all transition types: spring, tween, inertia, keyframes.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useFollowValue(\n source: MotionValue,\n options?: FollowValueOptions\n): MotionValue\nexport function useFollowValue(\n source: string,\n options?: FollowValueOptions\n): MotionValue\nexport function useFollowValue(\n source: MotionValue,\n options?: FollowValueOptions\n): MotionValue\nexport function useFollowValue(\n source: number,\n options?: FollowValueOptions\n): MotionValue\nexport function useFollowValue(\n source: MotionValue | MotionValue | AnyResolvedKeyframe,\n options: FollowValueOptions = {}\n) {\n const { isStatic } = useContext(MotionConfigContext)\n const getFromSource = () => (isMotionValue(source) ? source.get() : source)\n\n // isStatic will never change, allowing early hooks return\n if (isStatic) {\n return useTransform(getFromSource)\n }\n\n const value = useMotionValue(getFromSource())\n\n useInsertionEffect(() => {\n return attachFollow(value, source, options)\n }, [value, JSON.stringify(options)])\n\n return value\n}\n","\"use client\"\n\nimport { FollowValueOptions, MotionValue, SpringOptions } from \"motion-dom\"\nimport { useFollowValue } from \"./use-follow-value\"\n\ntype UseSpringOptions = SpringOptions &\n Pick\n\n/**\n * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.\n *\n * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber\n * to another `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useSpring(0, { stiffness: 300 })\n * const y = useSpring(x, { damping: 10 })\n * ```\n *\n * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value.\n * @param springConfig - Configuration options for the spring.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useSpring(\n source: MotionValue,\n options?: UseSpringOptions\n): MotionValue\nexport function useSpring(\n source: string,\n options?: UseSpringOptions\n): MotionValue\nexport function useSpring(\n source: MotionValue,\n options?: UseSpringOptions\n): MotionValue\nexport function useSpring(\n source: number,\n options?: UseSpringOptions\n): MotionValue\nexport function useSpring(\n source: MotionValue | MotionValue | string | number,\n options: UseSpringOptions = {}\n): MotionValue | MotionValue {\n return useFollowValue(source as any, { type: \"spring\", ...options })\n}\n","\"use client\"\n\nimport { cancelFrame, frame, FrameData } from \"motion-dom\"\nimport { useContext, useEffect, useRef } from \"react\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\n\nexport type FrameCallback = (timestamp: number, delta: number) => void\n\nexport function useAnimationFrame(callback: FrameCallback) {\n const initialTimestamp = useRef(0)\n const { isStatic } = useContext(MotionConfigContext)\n\n useEffect(() => {\n if (isStatic) return\n\n const provideTimeSinceStart = ({ timestamp, delta }: FrameData) => {\n if (!initialTimestamp.current) initialTimestamp.current = timestamp\n\n callback(timestamp - initialTimestamp.current, delta)\n }\n\n frame.update(provideTimeSinceStart, true)\n return () => cancelFrame(provideTimeSinceStart)\n }, [callback])\n}\n","\"use client\"\n\nimport { useAnimationFrame } from \"../utils/use-animation-frame\"\nimport { useMotionValue } from \"./use-motion-value\"\n\nexport function useTime() {\n const time = useMotionValue(0)\n useAnimationFrame((t) => time.set(t))\n return time\n}\n","\"use client\"\n\nimport { frame, MotionValue } from \"motion-dom\"\nimport { useMotionValueEvent } from \"../utils/use-motion-value-event\"\nimport { useMotionValue } from \"./use-motion-value\"\n/**\n * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.\n *\n * ```javascript\n * const x = useMotionValue(0)\n * const xVelocity = useVelocity(x)\n * const xAcceleration = useVelocity(xVelocity)\n * ```\n *\n * @public\n */\nexport function useVelocity(value: MotionValue): MotionValue {\n const velocity = useMotionValue(value.getVelocity())\n\n const updateVelocity = () => {\n const latest = value.getVelocity()\n velocity.set(latest)\n\n /**\n * If we still have velocity, schedule an update for the next frame\n * to keep checking until it is zero.\n */\n if (latest) frame.update(updateVelocity)\n }\n\n useMotionValueEvent(value, \"change\", () => {\n // Schedule an update to this value at the end of the current frame.\n frame.update(updateVelocity, false, true)\n })\n\n return velocity\n}\n","import {\n acceleratedValues,\n MotionValue,\n transformProps,\n type WillChange,\n} from \"motion-dom\"\n\nexport class WillChangeMotionValue\n extends MotionValue\n implements WillChange\n{\n private isEnabled = false\n\n add(name: string) {\n if (transformProps.has(name) || acceleratedValues.has(name)) {\n this.isEnabled = true\n this.update()\n }\n }\n\n private update() {\n this.set(this.isEnabled ? \"transform\" : \"auto\")\n }\n}\n","\"use client\"\n\nimport type { WillChange } from \"motion-dom\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { WillChangeMotionValue } from \"./WillChangeMotionValue\"\n\nexport function useWillChange(): WillChange {\n return useConstant(() => new WillChangeMotionValue(\"auto\"))\n}\n","\"use client\"\n\nimport {\n hasReducedMotionListener,\n initPrefersReducedMotion,\n prefersReducedMotion,\n} from \"motion-dom\"\nimport { warnOnce } from \"motion-utils\"\nimport { useState } from \"react\"\n\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * \n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nexport function useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasReducedMotionListener.current && initPrefersReducedMotion()\n\n const [shouldReduceMotion] = useState(prefersReducedMotion.current)\n\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n shouldReduceMotion !== true,\n \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\",\n \"reduced-motion-disabled\"\n )\n }\n\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n\n return shouldReduceMotion\n}\n","\"use client\"\n\nimport { useContext } from \"react\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { useReducedMotion } from \"./use-reduced-motion\"\n\nexport function useReducedMotionConfig() {\n const reducedMotionPreference = useReducedMotion()\n const { reducedMotion } = useContext(MotionConfigContext)\n\n if (reducedMotion === \"never\") {\n return false\n } else if (reducedMotion === \"always\") {\n return true\n } else {\n return reducedMotionPreference\n }\n}\n","import {\n animateVisualElement,\n setTarget,\n type AnimationDefinition,\n type LegacyAnimationControls,\n type VisualElement,\n} from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\n\nfunction stopAnimation(visualElement: VisualElement) {\n visualElement.values.forEach((value) => value.stop())\n}\n\nfunction setVariants(visualElement: VisualElement, variantLabels: string[]) {\n const reversedLabels = [...variantLabels].reverse()\n\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key)\n variant && setTarget(visualElement, variant)\n\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((child) => {\n setVariants(child, variantLabels)\n })\n }\n })\n}\n\nexport function setValues(\n visualElement: VisualElement,\n definition: AnimationDefinition\n) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition)\n } else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition])\n } else {\n setTarget(visualElement, definition as any)\n }\n}\n\n/**\n * @public\n */\nexport function animationControls(): LegacyAnimationControls {\n /**\n * Track whether the host component has mounted.\n */\n let hasMounted = false\n\n /**\n * A collection of linked component animation controls.\n */\n const subscribers = new Set()\n\n const controls: LegacyAnimationControls = {\n subscribe(visualElement) {\n subscribers.add(visualElement)\n return () => void subscribers.delete(visualElement)\n },\n\n start(definition, transitionOverride) {\n invariant(\n hasMounted,\n \"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.\"\n )\n\n const animations: Array> = []\n subscribers.forEach((visualElement) => {\n animations.push(\n animateVisualElement(visualElement, definition, {\n transitionOverride,\n })\n )\n })\n\n return Promise.all(animations)\n },\n\n set(definition) {\n invariant(\n hasMounted,\n \"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.\"\n )\n\n return subscribers.forEach((visualElement) => {\n setValues(visualElement, definition)\n })\n },\n\n stop() {\n subscribers.forEach((visualElement) => {\n stopAnimation(visualElement)\n })\n },\n\n mount() {\n hasMounted = true\n\n return () => {\n hasMounted = false\n controls.stop()\n }\n },\n }\n\n return controls\n}\n","\"use client\"\n\nimport { useContext, useMemo } from \"react\"\nimport { AnimationScope } from \"motion-dom\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useUnmountEffect } from \"../../utils/use-unmount-effect\"\nimport { useReducedMotionConfig } from \"../../utils/reduced-motion/use-reduced-motion-config\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { createScopedAnimate } from \"../animate\"\n\nexport function useAnimate() {\n const scope: AnimationScope = useConstant(() => ({\n current: null!, // Will be hydrated by React\n animations: [],\n }))\n\n const reduceMotion = useReducedMotionConfig() ?? undefined\n const { skipAnimations } = useContext(MotionConfigContext)\n\n const animate = useMemo(\n () => createScopedAnimate({ scope, reduceMotion, skipAnimations }),\n [scope, reduceMotion, skipAnimations]\n )\n\n useUnmountEffect(() => {\n scope.animations.forEach((animation) => animation.stop())\n scope.animations.length = 0\n })\n\n return [scope, animate] as [AnimationScope, typeof animate]\n}\n","\"use client\"\n\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useUnmountEffect } from \"../../utils/use-unmount-effect\"\nimport { createScopedWaapiAnimate } from \"../animators/waapi/animate-style\"\nimport { AnimationScope } from \"motion-dom\"\n\nexport function useAnimateMini() {\n const scope: AnimationScope = useConstant(() => ({\n current: null!, // Will be hydrated by React\n animations: [],\n }))\n\n const animate = useConstant(() => createScopedWaapiAnimate(scope))\n\n useUnmountEffect(() => {\n scope.animations.forEach((animation) => animation.stop())\n })\n\n return [scope, animate] as [AnimationScope, typeof animate]\n}\n","\"use client\"\n\nimport { LegacyAnimationControls } from \"motion-dom\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useIsomorphicLayoutEffect } from \"../../utils/use-isomorphic-effect\"\nimport { animationControls } from \"./animation-controls\"\n\n/**\n * Creates `LegacyAnimationControls`, which can be used to manually start, stop\n * and sequence animations on one or more components.\n *\n * The returned `LegacyAnimationControls` should be passed to the `animate` property\n * of the components you want to animate.\n *\n * These components can then be animated with the `start` method.\n *\n * ```jsx\n * import * as React from 'react'\n * import { motion, useAnimation } from 'framer-motion'\n *\n * export function MyComponent(props) {\n * const controls = useAnimation()\n *\n * controls.start({\n * x: 100,\n * transition: { duration: 0.5 },\n * })\n *\n * return \n * }\n * ```\n *\n * @returns Animation controller with `start` and `stop` methods\n *\n * @public\n */\nexport function useAnimationControls(): LegacyAnimationControls {\n const controls = useConstant(animationControls)\n\n useIsomorphicLayoutEffect(controls.mount, [])\n\n return controls\n}\n\nexport const useAnimation = useAnimationControls\n","\"use client\"\n\nimport { useContext } from \"react\"\nimport { PresenceContext } from \"../../context/PresenceContext\"\n\nexport function usePresenceData() {\n const context = useContext(PresenceContext)\n return context ? context.custom : undefined\n}\n","\"use client\"\n\nimport { RefObject, useEffect } from \"react\"\nimport { addDomEvent } from \"motion-dom\"\n\n/**\n * Attaches an event listener directly to the provided DOM element.\n *\n * Bypassing React's event system can be desirable, for instance when attaching non-passive\n * event handlers.\n *\n * ```jsx\n * const ref = useRef(null)\n *\n * useDomEvent(ref, 'wheel', onWheel, { passive: false })\n *\n * return
\n * ```\n *\n * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.\n * @param eventName - Name of the event you want listen for.\n * @param handler - Function to fire when receiving the event.\n * @param options - Options to pass to `Event.addEventListener`.\n *\n * @public\n */\nexport function useDomEvent(\n ref: RefObject,\n eventName: string,\n handler?: EventListener | undefined,\n options?: AddEventListenerOptions\n) {\n useEffect(() => {\n const element = ref.current\n\n if (handler && element) {\n return addDomEvent(element, eventName, handler, options)\n }\n }, [ref, eventName, handler, options])\n}\n","import * as React from \"react\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport {\n DragControlOptions,\n VisualElementDragControls,\n} from \"./VisualElementDragControls\"\n\n/**\n * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n *
\n * \n * \n * )\n * ```\n *\n * @public\n */\nexport class DragControls {\n private componentControls = new Set()\n\n /**\n * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.\n *\n * @internal\n */\n subscribe(controls: VisualElementDragControls): () => void {\n this.componentControls.add(controls)\n\n return () => this.componentControls.delete(controls)\n }\n\n /**\n * Start a drag gesture on every `motion` component that has this set of drag controls\n * passed into it via the `dragControls` prop.\n *\n * ```jsx\n * dragControls.start(e, {\n * snapToCursor: true\n * })\n * ```\n *\n * @param event - PointerEvent\n * @param options - Options\n *\n * @public\n */\n start(\n event: React.PointerEvent | PointerEvent,\n options?: DragControlOptions\n ) {\n this.componentControls.forEach((controls) => {\n controls.start(\n (event as React.PointerEvent).nativeEvent || event,\n options\n )\n })\n }\n\n /**\n * Cancels a drag gesture.\n *\n * ```jsx\n * dragControls.cancel()\n * ```\n *\n * @public\n */\n cancel() {\n this.componentControls.forEach((controls) => {\n controls.cancel()\n })\n }\n\n /**\n * Stops a drag gesture.\n *\n * ```jsx\n * dragControls.stop()\n * ```\n *\n * @public\n */\n stop() {\n this.componentControls.forEach((controls) => {\n controls.stop()\n })\n }\n}\n\nconst createDragControls = () => new DragControls()\n\n/**\n * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop\n * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we\n * might want to initiate that dragging from a different component than the draggable one.\n *\n * By creating a `dragControls` using the `useDragControls` hook, we can pass this into\n * the draggable component's `dragControls` prop. It exposes a `start` method\n * that can start dragging from pointer events on other components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n *
\n * \n * \n * )\n * ```\n *\n * @public\n */\nexport function useDragControls() {\n return useConstant(createDragControls)\n}\n","import { motionComponentSymbol } from \"./symbol\"\n\n/**\n * Checks if a component is a `motion` component.\n */\nexport function isMotionComponent(component: React.ComponentType | string) {\n return (\n component !== null &&\n typeof component === \"object\" &&\n motionComponentSymbol in component\n )\n}\n","import { isMotionComponent } from \"./is-motion-component\"\nimport { motionComponentSymbol } from \"./symbol\"\n\n/**\n * Unwraps a `motion` component and returns either a string for `motion.div` or\n * the React component for `motion(Component)`.\n *\n * If the component is not a `motion` component it returns undefined.\n */\nexport function unwrapMotionComponent(\n component: React.ComponentType | string\n): React.ComponentType | string | undefined {\n if (isMotionComponent(component)) {\n return component[motionComponentSymbol as keyof typeof component]\n }\n\n return undefined\n}\n","import { rootProjectionNode } from \"motion-dom\"\n\nexport function useInstantLayoutTransition(): (\n cb?: (() => void) | undefined\n) => void {\n return startTransition\n}\n\nfunction startTransition(callback?: () => void) {\n if (!rootProjectionNode.current) return\n rootProjectionNode.current.isUpdating = false\n rootProjectionNode.current.blockUpdate()\n callback && callback()\n}\n","import { useCallback } from \"react\";\nimport { rootProjectionNode } from \"motion-dom\"\n\nexport function useResetProjection() {\n const reset = useCallback(() => {\n const root = rootProjectionNode.current\n if (!root) return\n root.resetTree()\n }, [])\n\n return reset\n}\n","\"use client\"\n\nimport { wrap } from \"motion-utils\"\nimport { useCallback, useRef, useState } from \"react\"\n\nexport type Cycle = (i?: number) => void\n\nexport type CycleState = [T, Cycle]\n\n/**\n * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.\n *\n * An index value can be passed to the returned `cycle` function to cycle to a specific index.\n *\n * ```jsx\n * import * as React from \"react\"\n * import { motion, useCycle } from \"framer-motion\"\n *\n * export const MyComponent = () => {\n * const [x, cycleX] = useCycle(0, 50, 100)\n *\n * return (\n * cycleX()}\n * />\n * )\n * }\n * ```\n *\n * @param items - items to cycle through\n * @returns [currentState, cycleState]\n *\n * @public\n */\nexport function useCycle(...items: T[]): CycleState {\n const index = useRef(0)\n const [item, setItem] = useState(items[index.current])\n\n const runCycle = useCallback(\n (next?: number) => {\n index.current =\n typeof next !== \"number\"\n ? wrap(0, items.length, index.current + 1)\n : next\n\n setItem(items[index.current])\n },\n // The array will change on each call, but by putting items.length at\n // the front of this array, we guarantee the dependency comparison will match up\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [items.length, ...items]\n )\n return [item, runCycle]\n}\n","\"use client\"\n\nimport { RefObject, useEffect, useState } from \"react\"\nimport { inView, InViewOptions } from \"../render/dom/viewport\"\n\nexport interface UseInViewOptions\n extends Omit {\n root?: RefObject\n once?: boolean\n amount?: \"some\" | \"all\" | number\n initial?: boolean\n}\n\nexport function useInView(\n ref: RefObject,\n {\n root,\n margin,\n amount,\n once = false,\n initial = false,\n }: UseInViewOptions = {}\n) {\n const [isInView, setInView] = useState(initial)\n\n useEffect(() => {\n if (!ref.current || (once && isInView)) return\n\n const onEnter = () => {\n setInView(true)\n\n return once ? undefined : () => setInView(false)\n }\n\n const options: InViewOptions = {\n root: (root && root.current) || undefined,\n margin,\n amount,\n }\n\n return inView(ref.current, onEnter, options)\n }, [root, ref, margin, once, amount])\n\n return isInView\n}\n","\"use client\"\n\nimport { frame } from \"motion-dom\"\nimport { MotionGlobalConfig } from \"motion-utils\"\nimport { useEffect, useRef } from \"react\"\nimport { useInstantLayoutTransition } from \"../projection/use-instant-layout-transition\"\nimport { useForceUpdate } from \"./use-force-update\"\n\nexport function useInstantTransition() {\n const [forceUpdate, forcedRenderCount] = useForceUpdate()\n const startInstantLayoutTransition = useInstantLayoutTransition()\n const unlockOnFrameRef = useRef(-1)\n\n useEffect(() => {\n /**\n * Unblock after two animation frames, otherwise this will unblock too soon.\n */\n frame.postRender(() =>\n frame.postRender(() => {\n /**\n * If the callback has been called again after the effect\n * triggered this 2 frame delay, don't unblock animations. This\n * prevents the previous effect from unblocking the current\n * instant transition too soon. This becomes more likely when\n * used in conjunction with React.startTransition().\n */\n if (forcedRenderCount !== unlockOnFrameRef.current) return\n MotionGlobalConfig.instantAnimations = false\n })\n )\n }, [forcedRenderCount])\n\n return (callback: () => void) => {\n startInstantLayoutTransition(() => {\n MotionGlobalConfig.instantAnimations = true\n forceUpdate()\n callback()\n unlockOnFrameRef.current = forcedRenderCount + 1\n })\n }\n}\n\nexport function disableInstantTransitions() {\n MotionGlobalConfig.instantAnimations = false\n}\n","\"use client\"\n\nimport { useEffect, useState } from \"react\"\n\nexport function usePageInView() {\n const [isInView, setIsInView] = useState(true)\n\n useEffect(() => {\n const handleVisibilityChange = () => setIsInView(!document.hidden)\n\n if (document.hidden) {\n handleVisibilityChange()\n }\n\n document.addEventListener(\"visibilitychange\", handleVisibilityChange)\n\n return () => {\n document.removeEventListener(\n \"visibilitychange\",\n handleVisibilityChange\n )\n }\n }, [])\n\n return isInView\n}\n","import type { Point, TransformPoint } from \"motion-utils\"\nimport type { RefObject } from \"react\"\n\n/**\n * Creates a `transformPagePoint` function that accounts for SVG viewBox scaling.\n *\n * When dragging SVG elements inside an SVG with a viewBox that differs from\n * the rendered dimensions (e.g., `viewBox=\"0 0 100 100\"` but rendered at 500x500 pixels),\n * pointer coordinates need to be transformed to match the SVG's coordinate system.\n *\n * @example\n * ```jsx\n * function App() {\n * const svgRef = useRef(null)\n *\n * return (\n * \n * \n * \n * \n * \n * )\n * }\n * ```\n *\n * @param svgRef - A React ref to the SVG element\n * @returns A transformPagePoint function for use with MotionConfig\n *\n * @public\n */\nexport function transformViewBoxPoint(\n svgRef: RefObject\n): TransformPoint {\n return (point: Point): Point => {\n const svg = svgRef.current\n if (!svg) {\n return point\n }\n\n // Get the viewBox attribute\n const viewBox = svg.viewBox?.baseVal\n if (!viewBox || (viewBox.width === 0 && viewBox.height === 0)) {\n // No viewBox or empty viewBox - no transformation needed\n return point\n }\n\n // Get the rendered dimensions of the SVG\n const bbox = svg.getBoundingClientRect()\n if (bbox.width === 0 || bbox.height === 0) {\n return point\n }\n\n // Calculate scale factors\n const scaleX = viewBox.width / bbox.width\n const scaleY = viewBox.height / bbox.height\n\n // Get the SVG's position on the page\n const svgX = bbox.left + window.scrollX\n const svgY = bbox.top + window.scrollY\n\n // Transform the point:\n // 1. Calculate position relative to SVG\n // 2. Scale by viewBox/viewport ratio\n // 3. Add back the SVG position (but in SVG coordinates)\n return {\n x: (point.x - svgX) * scaleX + svgX,\n y: (point.y - svgY) * scaleY + svgY,\n }\n }\n}\n","import type { Point, TransformPoint } from \"motion-utils\"\nimport type { RefObject } from \"react\"\n\n/**\n * Creates a `transformPagePoint` function that corrects pointer coordinates\n * for a parent container with CSS transforms (rotation, scale, skew).\n *\n * When dragging elements inside a transformed parent, pointer coordinates\n * need to be transformed through the inverse of the parent's transform\n * so the drag offset is in local space.\n *\n * Works with both static and continuously animating transforms.\n *\n * @example\n * ```jsx\n * function App() {\n * const ref = useRef(null)\n *\n * return (\n * \n * \n * \n * \n * \n * )\n * }\n * ```\n *\n * @param parentRef - A React ref to the transformed parent element\n * @returns A transformPagePoint function for use with MotionConfig\n *\n * @public\n */\nexport function correctParentTransform(\n parentRef: RefObject\n): TransformPoint {\n return (point: Point): Point => {\n const parent = parentRef.current\n if (!parent) return point\n\n const inv = getInverseMatrix(parent)\n if (!inv) return point\n\n // Get center of rotation in page space\n const rect = parent.getBoundingClientRect()\n const cx = rect.left + window.scrollX + rect.width / 2\n const cy = rect.top + window.scrollY + rect.height / 2\n\n // Transform (point - center) through inverse, then add center back\n const dx = point.x - cx\n const dy = point.y - cy\n return {\n x: cx + inv.a * dx + inv.c * dy,\n y: cy + inv.b * dx + inv.d * dy,\n }\n }\n}\n\ninterface InverseMatrix {\n a: number\n b: number\n c: number\n d: number\n}\n\nfunction getInverseMatrix(element: HTMLElement): InverseMatrix | null {\n const { transform } = getComputedStyle(element)\n if (!transform || transform === \"none\") return null\n\n const match =\n transform.match(/^matrix3d\\((.*)\\)$/u) ||\n transform.match(/^matrix\\((.*)\\)$/u)\n if (!match) return null\n\n const v = match[1].split(\",\").map(Number)\n const is3d = transform.startsWith(\"matrix3d\")\n const a = v[0],\n b = v[1]\n const c = is3d ? v[4] : v[2]\n const d = is3d ? v[5] : v[3]\n\n const det = a * d - b * c\n if (Math.abs(det) < 1e-10) return null\n\n return { a: d / det, b: -b / det, c: -c / det, d: a / det }\n}\n","export interface AppearStoreEntry {\n animation: Animation\n startTime: number | null\n}\n\nexport type AppearElementId = string\n\nexport type IsComplete = boolean\n\nexport const appearAnimationStore = new Map()\n\nexport const appearComplete = new Map()\n","import { transformProps } from \"motion-dom\"\n\nexport const appearStoreId = (elementId: string, valueName: string) => {\n const key = transformProps.has(valueName) ? \"transform\" : valueName\n\n return `${elementId}: ${key}`\n}\n","import type { Batcher } from \"motion-dom\"\nimport { appearAnimationStore } from \"./store\"\nimport { appearStoreId } from \"./store-id\"\n\nexport function handoffOptimizedAppearAnimation(\n elementId: string,\n valueName: string,\n frame: Batcher\n): number | null {\n const storeId = appearStoreId(elementId, valueName)\n const optimisedAnimation = appearAnimationStore.get(storeId)\n\n if (!optimisedAnimation) {\n return null\n }\n\n const { animation, startTime } = optimisedAnimation\n\n function cancelAnimation() {\n window.MotionCancelOptimisedAnimation?.(elementId, valueName, frame)\n }\n\n /**\n * We can cancel the animation once it's finished now that we've synced\n * with Motion.\n *\n * Prefer onfinish over finished as onfinish is backwards compatible with\n * older browsers.\n */\n animation.onfinish = cancelAnimation\n\n if (startTime === null || window.MotionHandoffIsComplete?.(elementId)) {\n /**\n * If the startTime is null, this animation is the Paint Ready detection animation\n * and we can cancel it immediately without handoff.\n *\n * Or if we've already handed off the animation then we're now interrupting it.\n * In which case we need to cancel it.\n */\n cancelAnimation()\n return null\n } else {\n return startTime\n }\n}\n","import {\n AnyResolvedKeyframe,\n Batcher,\n getOptimisedAppearId,\n MotionValue,\n optimizedAppearDataId,\n startWaapiAnimation,\n ValueAnimationTransition,\n type WithAppearProps,\n} from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { handoffOptimizedAppearAnimation } from \"./handoff\"\nimport { appearAnimationStore, appearComplete, AppearStoreEntry } from \"./store\"\nimport { appearStoreId } from \"./store-id\"\n\n/**\n * A single time to use across all animations to manually set startTime\n * and ensure they're all in sync.\n */\nlet startFrameTime: number\n\n/**\n * A dummy animation to detect when Chrome is ready to start\n * painting the page and hold off from triggering the real animation\n * until then. We only need one animation to detect paint ready.\n *\n * https://bugs.chromium.org/p/chromium/issues/detail?id=1406850\n */\nlet readyAnimation: Animation\n\n/**\n * Keep track of animations that were suspended vs cancelled so we\n * can easily resume them when we're done measuring layout.\n */\nconst suspendedAnimations = new Set()\n\nfunction resumeSuspendedAnimations() {\n suspendedAnimations.forEach((data) => {\n data.animation.play()\n data.animation.startTime = data.startTime\n })\n suspendedAnimations.clear()\n}\n\nexport function startOptimizedAppearAnimation(\n element: HTMLElement,\n name: string,\n keyframes: string[] | number[],\n options: ValueAnimationTransition,\n onReady?: (animation: Animation) => void\n): void {\n // Prevent optimised appear animations if Motion has already started animating.\n if (window.MotionIsMounted) {\n return\n }\n\n const id = element.dataset[optimizedAppearDataId]\n if (!id) return\n\n window.MotionHandoffAnimation = handoffOptimizedAppearAnimation\n\n const storeId = appearStoreId(id, name)\n if (!readyAnimation) {\n readyAnimation = startWaapiAnimation(\n element,\n name,\n [keyframes[0] as number, keyframes[0] as number],\n /**\n * 10 secs is basically just a super-safe duration to give Chrome\n * long enough to get the animation ready.\n */\n { duration: 10000, ease: \"linear\" }\n )\n\n appearAnimationStore.set(storeId, {\n animation: readyAnimation,\n startTime: null,\n })\n\n /**\n * If there's no readyAnimation then there's been no instantiation\n * of handoff animations.\n */\n window.MotionHandoffAnimation = handoffOptimizedAppearAnimation\n\n window.MotionHasOptimisedAnimation = (\n elementId?: string,\n valueName?: string\n ) => {\n if (!elementId) return false\n\n /**\n * Keep a map of elementIds that have started animating. We check\n * via ID instead of Element because of hydration errors and\n * pre-hydration checks. We also actively record IDs as they start\n * animating rather than simply checking for data-appear-id as\n * this attrbute might be present but not lead to an animation, for\n * instance if the element's appear animation is on a different\n * breakpoint.\n */\n if (!valueName) {\n return appearComplete.has(elementId)\n }\n\n const animationId = appearStoreId(elementId, valueName)\n return Boolean(appearAnimationStore.get(animationId))\n }\n\n window.MotionHandoffMarkAsComplete = (elementId: string): void => {\n if (appearComplete.has(elementId)) {\n appearComplete.set(elementId, true)\n }\n }\n\n window.MotionHandoffIsComplete = (elementId: string): boolean => {\n return appearComplete.get(elementId) === true\n }\n\n /**\n * We only need to cancel transform animations as\n * they're the ones that will interfere with the\n * layout animation measurements.\n */\n window.MotionCancelOptimisedAnimation = (\n elementId: string,\n valueName: string,\n frame?: Batcher,\n canResume?: boolean\n ) => {\n const animationId = appearStoreId(elementId, valueName)\n const data = appearAnimationStore.get(animationId)\n\n if (!data) return\n\n if (frame && canResume === undefined) {\n /**\n * Wait until the end of the subsequent frame to cancel the animation\n * to ensure we don't remove the animation before the main thread has\n * had a chance to resolve keyframes and render.\n */\n frame.postRender(() => {\n frame.postRender(() => {\n data.animation.cancel()\n })\n })\n } else {\n data.animation.cancel()\n }\n\n if (frame && canResume) {\n suspendedAnimations.add(data)\n frame.render(resumeSuspendedAnimations)\n } else {\n appearAnimationStore.delete(animationId)\n\n /**\n * If there are no more animations left, we can remove the cancel function.\n * This will let us know when we can stop checking for conflicting layout animations.\n */\n if (!appearAnimationStore.size) {\n window.MotionCancelOptimisedAnimation = undefined\n }\n }\n }\n\n window.MotionCheckAppearSync = (\n visualElement: WithAppearProps,\n valueName: string,\n value: MotionValue\n ) => {\n const appearId = getOptimisedAppearId(visualElement)\n\n if (!appearId) return\n\n const valueIsOptimised = window.MotionHasOptimisedAnimation?.(\n appearId,\n valueName\n )\n const externalAnimationValue =\n visualElement.props.values?.[valueName]\n\n if (!valueIsOptimised || !externalAnimationValue) return\n\n const removeSyncCheck = value.on(\n \"change\",\n (latestValue: AnyResolvedKeyframe) => {\n if (externalAnimationValue.get() !== latestValue) {\n window.MotionCancelOptimisedAnimation?.(\n appearId,\n valueName\n )\n removeSyncCheck()\n }\n }\n )\n\n return removeSyncCheck\n }\n }\n\n const startAnimation = () => {\n readyAnimation.cancel()\n\n const appearAnimation = startWaapiAnimation(\n element,\n name,\n keyframes,\n options\n )\n\n /**\n * Record the time of the first started animation. We call performance.now() once\n * here and once in handoff to ensure we're getting\n * close to a frame-locked time. This keeps all animations in sync.\n */\n if (startFrameTime === undefined) {\n startFrameTime = performance.now()\n }\n\n appearAnimation.startTime = startFrameTime\n\n appearAnimationStore.set(storeId, {\n animation: appearAnimation,\n startTime: startFrameTime,\n })\n\n if (onReady) onReady(appearAnimation)\n }\n\n appearComplete.set(id, false)\n\n if (readyAnimation.ready) {\n readyAnimation.ready.then(startAnimation).catch(noop)\n } else {\n startAnimation()\n }\n}\n","\"use client\"\n\nimport {\n animateVisualElement,\n createBox,\n ResolvedValues,\n TargetAndTransition,\n VisualElement,\n} from \"motion-dom\"\nimport { useLayoutEffect, useState } from \"react\"\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\"\nimport { useConstant } from \"../../utils/use-constant\"\n\ninterface AnimatedStateOptions {\n initialState: ResolvedValues\n}\n\nconst createObject = () => ({})\n\nclass StateVisualElement extends VisualElement<\n ResolvedValues,\n {},\n AnimatedStateOptions\n> {\n type: \"state\"\n build() {}\n measureInstanceViewportBox = createBox\n resetTransform() {}\n restoreTransform() {}\n removeValueFromRenderState() {}\n renderInstance() {}\n scrapeMotionValuesFromProps() {\n return createObject()\n }\n getBaseTargetFromProps() {\n return undefined\n }\n\n readValueFromInstance(\n _state: ResolvedValues,\n key: string,\n options: AnimatedStateOptions\n ) {\n return options.initialState[key] || 0\n }\n\n sortInstanceNodePosition() {\n return 0\n }\n}\n\nconst useVisualState = makeUseVisualState({\n scrapeMotionValuesFromProps: createObject,\n createRenderState: createObject,\n})\n\n/**\n * This is not an officially supported API and may be removed\n * on any version.\n */\nexport function useAnimatedState(initialState: any) {\n const [animationState, setAnimationState] = useState(initialState)\n const visualState = useVisualState({}, false)\n\n const element = useConstant(() => {\n return new StateVisualElement(\n {\n props: {\n onUpdate: (v) => {\n setAnimationState({ ...v })\n },\n },\n visualState,\n presenceContext: null,\n },\n { initialState }\n )\n })\n\n useLayoutEffect(() => {\n element.mount({})\n return () => element.unmount()\n }, [element])\n\n const startAnimation = useConstant(\n () => (animationDefinition: TargetAndTransition) => {\n return animateVisualElement(element, animationDefinition)\n }\n )\n\n return [animationState, startAnimation]\n}\n","\"use client\"\n\nimport { invariant } from \"motion-utils\"\nimport * as React from \"react\"\nimport { useConstant } from \"../utils/use-constant\"\nimport { LayoutGroup } from \"./LayoutGroup\"\n\nlet id = 0\nexport const AnimateSharedLayout: React.FunctionComponent<\n React.PropsWithChildren\n> = ({ children }: React.PropsWithChildren<{}>) => {\n React.useEffect(() => {\n invariant(\n false,\n \"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations\"\n )\n }, [])\n\n return (\n `asl-${id++}`)}>\n {children}\n \n )\n}\n","\"use client\"\n\nimport { MotionValue } from \"motion-dom\"\nimport { invariant, warning } from \"motion-utils\"\nimport { useContext } from \"react\"\nimport { MotionContext } from \"../context/MotionContext\"\nimport { useMotionValue } from \"./use-motion-value\"\nimport { useTransform } from \"./use-transform\"\n\ninterface ScaleMotionValues {\n scaleX: MotionValue\n scaleY: MotionValue\n}\n\n// Keep things reasonable and avoid scale: Infinity. In practise we might need\n// to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1]\n// to simply hide content at unreasonable scales.\nconst maxScale = 100000\nexport const invertScale = (scale: number) =>\n scale > 0.001 ? 1 / scale : maxScale\n\nlet hasWarned = false\n\n/**\n * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse\n * of their respective parent scales.\n *\n * This is useful for undoing the distortion of content when scaling a parent component.\n *\n * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent.\n * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output\n * of those instead.\n *\n * ```jsx\n * const MyComponent = () => {\n * const { scaleX, scaleY } = useInvertedScale()\n * return \n * }\n * ```\n *\n * @deprecated\n */\nexport function useInvertedScale(\n scale?: Partial\n): ScaleMotionValues {\n let parentScaleX = useMotionValue(1)\n let parentScaleY = useMotionValue(1)\n const { visualElement } = useContext(MotionContext)\n\n invariant(\n !!(scale || visualElement),\n \"If no scale values are provided, useInvertedScale must be used within a child of another motion component.\"\n )\n\n warning(\n hasWarned,\n \"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead.\"\n )\n\n hasWarned = true\n\n if (scale) {\n parentScaleX = scale.scaleX || parentScaleX\n parentScaleY = scale.scaleY || parentScaleY\n } else if (visualElement) {\n parentScaleX = visualElement.getValue(\"scaleX\", 1)\n parentScaleY = visualElement.getValue(\"scaleY\", 1)\n }\n\n const scaleX = useTransform(parentScaleX, invertScale)\n const scaleY = useTransform(parentScaleY, invertScale)\n\n return { scaleX, scaleY }\n}\n"],"names":["React","isHTMLElement","useId","useRef","useContext","MotionConfigContext","useInsertionEffect","_jsx","useConstant","useMemo","PresenceContext","Children","isValidElement","usePresence","useState","useIsomorphicLayoutEffect","LayoutGroupContext","createContext","useCallback","frame","nodeGroup","loadFeatures","useEffect","LazyContext","loadExternalIsValidProp","resolveTransition","createMotionComponent","warnOnce","featureBundle","createDomVisualElement","mixNumber","moveItem","invariant","forwardRef","motionValue","cancelFrame","collectMotionValues","transform","isMotionValue","resolveElements","removeItem","getEasingForSegment","defaultOffset","isGenerator","secondsToMilliseconds","createGeneratorEasing","fillOffset","warning","reverseEasing","progress","isSVGElement","isSVGSVGElement","SVGVisualElement","HTMLVisualElement","visualElementStore","ObjectVisualElement","animateSingleValue","animateTarget","spring","GroupAnimationWithThen","getValueTransition","getAnimationMap","animationMapKey","getComputedStyle","fillWildcards","applyPxDefaults","NativeAnimation","supportsViewTimeline","supportsScrollTimeline","velocityPerSecond","interpolate","clamp","noop","frameData","resize","ScrollOffsetPresets","observeTimeline","animations","gestureAnimations","drag","layout","microtask","cancelMicrotask","attachFollow","MotionValue","transformProps","acceleratedValues","hasReducedMotionListener","initPrefersReducedMotion","prefersReducedMotion","setTarget","animateVisualElement","addDomEvent","motionComponentSymbol","rootProjectionNode","wrap","MotionGlobalConfig","optimizedAppearDataId","startWaapiAnimation","getOptimisedAppearId","VisualElement","createBox","makeUseVisualState","useLayoutEffect","MotionContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG;AAKH;;;AAGG;AACH,SAAS,MAAM,CAAI,GAAmB,EAAE,KAAQ,EAAA;AAC5C,IAAA,IAAI,OAAO,GAAG,KAAK,U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;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/m.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/m.js deleted file mode 100644 index fc7aab95..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/m.js +++ /dev/null @@ -1,403 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var index = require('./index-6W16WHlG.js'); -require('react/jsx-runtime'); -require('motion-utils'); -require('react'); -require('motion-dom'); - -function createMinimalMotionComponent(Component, options) { - return index.createMotionComponent(Component, options); -} - -/** - * HTML components - */ -const MotionA = /*@__PURE__*/ createMinimalMotionComponent("a"); -const MotionAbbr = /*@__PURE__*/ createMinimalMotionComponent("abbr"); -const MotionAddress = -/*@__PURE__*/ createMinimalMotionComponent("address"); -const MotionArea = /*@__PURE__*/ createMinimalMotionComponent("area"); -const MotionArticle = -/*@__PURE__*/ createMinimalMotionComponent("article"); -const MotionAside = /*@__PURE__*/ createMinimalMotionComponent("aside"); -const MotionAudio = /*@__PURE__*/ createMinimalMotionComponent("audio"); -const MotionB = /*@__PURE__*/ createMinimalMotionComponent("b"); -const MotionBase = /*@__PURE__*/ createMinimalMotionComponent("base"); -const MotionBdi = /*@__PURE__*/ createMinimalMotionComponent("bdi"); -const MotionBdo = /*@__PURE__*/ createMinimalMotionComponent("bdo"); -const MotionBig = /*@__PURE__*/ createMinimalMotionComponent("big"); -const MotionBlockquote = -/*@__PURE__*/ createMinimalMotionComponent("blockquote"); -const MotionBody = /*@__PURE__*/ createMinimalMotionComponent("body"); -const MotionButton = /*@__PURE__*/ createMinimalMotionComponent("button"); -const MotionCanvas = /*@__PURE__*/ createMinimalMotionComponent("canvas"); -const MotionCaption = -/*@__PURE__*/ createMinimalMotionComponent("caption"); -const MotionCite = /*@__PURE__*/ createMinimalMotionComponent("cite"); -const MotionCode = /*@__PURE__*/ createMinimalMotionComponent("code"); -const MotionCol = /*@__PURE__*/ createMinimalMotionComponent("col"); -const MotionColgroup = -/*@__PURE__*/ createMinimalMotionComponent("colgroup"); -const MotionData = /*@__PURE__*/ createMinimalMotionComponent("data"); -const MotionDatalist = -/*@__PURE__*/ createMinimalMotionComponent("datalist"); -const MotionDd = /*@__PURE__*/ createMinimalMotionComponent("dd"); -const MotionDel = /*@__PURE__*/ createMinimalMotionComponent("del"); -const MotionDetails = -/*@__PURE__*/ createMinimalMotionComponent("details"); -const MotionDfn = /*@__PURE__*/ createMinimalMotionComponent("dfn"); -const MotionDialog = /*@__PURE__*/ createMinimalMotionComponent("dialog"); -const MotionDiv = /*@__PURE__*/ createMinimalMotionComponent("div"); -const MotionDl = /*@__PURE__*/ createMinimalMotionComponent("dl"); -const MotionDt = /*@__PURE__*/ createMinimalMotionComponent("dt"); -const MotionEm = /*@__PURE__*/ createMinimalMotionComponent("em"); -const MotionEmbed = /*@__PURE__*/ createMinimalMotionComponent("embed"); -const MotionFieldset = -/*@__PURE__*/ createMinimalMotionComponent("fieldset"); -const MotionFigcaption = -/*@__PURE__*/ createMinimalMotionComponent("figcaption"); -const MotionFigure = /*@__PURE__*/ createMinimalMotionComponent("figure"); -const MotionFooter = /*@__PURE__*/ createMinimalMotionComponent("footer"); -const MotionForm = /*@__PURE__*/ createMinimalMotionComponent("form"); -const MotionH1 = /*@__PURE__*/ createMinimalMotionComponent("h1"); -const MotionH2 = /*@__PURE__*/ createMinimalMotionComponent("h2"); -const MotionH3 = /*@__PURE__*/ createMinimalMotionComponent("h3"); -const MotionH4 = /*@__PURE__*/ createMinimalMotionComponent("h4"); -const MotionH5 = /*@__PURE__*/ createMinimalMotionComponent("h5"); -const MotionH6 = /*@__PURE__*/ createMinimalMotionComponent("h6"); -const MotionHead = /*@__PURE__*/ createMinimalMotionComponent("head"); -const MotionHeader = /*@__PURE__*/ createMinimalMotionComponent("header"); -const MotionHgroup = /*@__PURE__*/ createMinimalMotionComponent("hgroup"); -const MotionHr = /*@__PURE__*/ createMinimalMotionComponent("hr"); -const MotionHtml = /*@__PURE__*/ createMinimalMotionComponent("html"); -const MotionI = /*@__PURE__*/ createMinimalMotionComponent("i"); -const MotionIframe = /*@__PURE__*/ createMinimalMotionComponent("iframe"); -const MotionImg = /*@__PURE__*/ createMinimalMotionComponent("img"); -const MotionInput = /*@__PURE__*/ createMinimalMotionComponent("input"); -const MotionIns = /*@__PURE__*/ createMinimalMotionComponent("ins"); -const MotionKbd = /*@__PURE__*/ createMinimalMotionComponent("kbd"); -const MotionKeygen = /*@__PURE__*/ createMinimalMotionComponent("keygen"); -const MotionLabel = /*@__PURE__*/ createMinimalMotionComponent("label"); -const MotionLegend = /*@__PURE__*/ createMinimalMotionComponent("legend"); -const MotionLi = /*@__PURE__*/ createMinimalMotionComponent("li"); -const MotionLink = /*@__PURE__*/ createMinimalMotionComponent("link"); -const MotionMain = /*@__PURE__*/ createMinimalMotionComponent("main"); -const MotionMap = /*@__PURE__*/ createMinimalMotionComponent("map"); -const MotionMark = /*@__PURE__*/ createMinimalMotionComponent("mark"); -const MotionMenu = /*@__PURE__*/ createMinimalMotionComponent("menu"); -const MotionMenuitem = -/*@__PURE__*/ createMinimalMotionComponent("menuitem"); -const MotionMeter = /*@__PURE__*/ createMinimalMotionComponent("meter"); -const MotionNav = /*@__PURE__*/ createMinimalMotionComponent("nav"); -const MotionObject = /*@__PURE__*/ createMinimalMotionComponent("object"); -const MotionOl = /*@__PURE__*/ createMinimalMotionComponent("ol"); -const MotionOptgroup = -/*@__PURE__*/ createMinimalMotionComponent("optgroup"); -const MotionOption = /*@__PURE__*/ createMinimalMotionComponent("option"); -const MotionOutput = /*@__PURE__*/ createMinimalMotionComponent("output"); -const MotionP = /*@__PURE__*/ createMinimalMotionComponent("p"); -const MotionParam = /*@__PURE__*/ createMinimalMotionComponent("param"); -const MotionPicture = -/*@__PURE__*/ createMinimalMotionComponent("picture"); -const MotionPre = /*@__PURE__*/ createMinimalMotionComponent("pre"); -const MotionProgress = -/*@__PURE__*/ createMinimalMotionComponent("progress"); -const MotionQ = /*@__PURE__*/ createMinimalMotionComponent("q"); -const MotionRp = /*@__PURE__*/ createMinimalMotionComponent("rp"); -const MotionRt = /*@__PURE__*/ createMinimalMotionComponent("rt"); -const MotionRuby = /*@__PURE__*/ createMinimalMotionComponent("ruby"); -const MotionS = /*@__PURE__*/ createMinimalMotionComponent("s"); -const MotionSamp = /*@__PURE__*/ createMinimalMotionComponent("samp"); -const MotionScript = /*@__PURE__*/ createMinimalMotionComponent("script"); -const MotionSection = -/*@__PURE__*/ createMinimalMotionComponent("section"); -const MotionSelect = /*@__PURE__*/ createMinimalMotionComponent("select"); -const MotionSmall = /*@__PURE__*/ createMinimalMotionComponent("small"); -const MotionSource = /*@__PURE__*/ createMinimalMotionComponent("source"); -const MotionSpan = /*@__PURE__*/ createMinimalMotionComponent("span"); -const MotionStrong = /*@__PURE__*/ createMinimalMotionComponent("strong"); -const MotionStyle = /*@__PURE__*/ createMinimalMotionComponent("style"); -const MotionSub = /*@__PURE__*/ createMinimalMotionComponent("sub"); -const MotionSummary = -/*@__PURE__*/ createMinimalMotionComponent("summary"); -const MotionSup = /*@__PURE__*/ createMinimalMotionComponent("sup"); -const MotionTable = /*@__PURE__*/ createMinimalMotionComponent("table"); -const MotionTbody = /*@__PURE__*/ createMinimalMotionComponent("tbody"); -const MotionTd = /*@__PURE__*/ createMinimalMotionComponent("td"); -const MotionTextarea = -/*@__PURE__*/ createMinimalMotionComponent("textarea"); -const MotionTfoot = /*@__PURE__*/ createMinimalMotionComponent("tfoot"); -const MotionTh = /*@__PURE__*/ createMinimalMotionComponent("th"); -const MotionThead = /*@__PURE__*/ createMinimalMotionComponent("thead"); -const MotionTime = /*@__PURE__*/ createMinimalMotionComponent("time"); -const MotionTitle = /*@__PURE__*/ createMinimalMotionComponent("title"); -const MotionTr = /*@__PURE__*/ createMinimalMotionComponent("tr"); -const MotionTrack = /*@__PURE__*/ createMinimalMotionComponent("track"); -const MotionU = /*@__PURE__*/ createMinimalMotionComponent("u"); -const MotionUl = /*@__PURE__*/ createMinimalMotionComponent("ul"); -const MotionVideo = /*@__PURE__*/ createMinimalMotionComponent("video"); -const MotionWbr = /*@__PURE__*/ createMinimalMotionComponent("wbr"); -const MotionWebview = -/*@__PURE__*/ createMinimalMotionComponent("webview"); -/** - * SVG components - */ -const MotionAnimate = -/*@__PURE__*/ createMinimalMotionComponent("animate"); -const MotionCircle = /*@__PURE__*/ createMinimalMotionComponent("circle"); -const MotionDefs = /*@__PURE__*/ createMinimalMotionComponent("defs"); -const MotionDesc = /*@__PURE__*/ createMinimalMotionComponent("desc"); -const MotionEllipse = -/*@__PURE__*/ createMinimalMotionComponent("ellipse"); -const MotionG = /*@__PURE__*/ createMinimalMotionComponent("g"); -const MotionImage = /*@__PURE__*/ createMinimalMotionComponent("image"); -const MotionLine = /*@__PURE__*/ createMinimalMotionComponent("line"); -const MotionFilter = /*@__PURE__*/ createMinimalMotionComponent("filter"); -const MotionMarker = /*@__PURE__*/ createMinimalMotionComponent("marker"); -const MotionMask = /*@__PURE__*/ createMinimalMotionComponent("mask"); -const MotionMetadata = -/*@__PURE__*/ createMinimalMotionComponent("metadata"); -const MotionPath = /*@__PURE__*/ createMinimalMotionComponent("path"); -const MotionPattern = -/*@__PURE__*/ createMinimalMotionComponent("pattern"); -const MotionPolygon = -/*@__PURE__*/ createMinimalMotionComponent("polygon"); -const MotionPolyline = -/*@__PURE__*/ createMinimalMotionComponent("polyline"); -const MotionRect = /*@__PURE__*/ createMinimalMotionComponent("rect"); -const MotionStop = /*@__PURE__*/ createMinimalMotionComponent("stop"); -const MotionSvg = /*@__PURE__*/ createMinimalMotionComponent("svg"); -const MotionSymbol = /*@__PURE__*/ createMinimalMotionComponent("symbol"); -const MotionText = /*@__PURE__*/ createMinimalMotionComponent("text"); -const MotionTspan = /*@__PURE__*/ createMinimalMotionComponent("tspan"); -const MotionUse = /*@__PURE__*/ createMinimalMotionComponent("use"); -const MotionView = /*@__PURE__*/ createMinimalMotionComponent("view"); -const MotionClipPath = -/*@__PURE__*/ createMinimalMotionComponent("clipPath"); -const MotionFeBlend = -/*@__PURE__*/ createMinimalMotionComponent("feBlend"); -const MotionFeColorMatrix = -/*@__PURE__*/ createMinimalMotionComponent("feColorMatrix"); -const MotionFeComponentTransfer = -/*@__PURE__*/ createMinimalMotionComponent("feComponentTransfer"); -const MotionFeComposite = -/*@__PURE__*/ createMinimalMotionComponent("feComposite"); -const MotionFeConvolveMatrix = -/*@__PURE__*/ createMinimalMotionComponent("feConvolveMatrix"); -const MotionFeDiffuseLighting = -/*@__PURE__*/ createMinimalMotionComponent("feDiffuseLighting"); -const MotionFeDisplacementMap = -/*@__PURE__*/ createMinimalMotionComponent("feDisplacementMap"); -const MotionFeDistantLight = -/*@__PURE__*/ createMinimalMotionComponent("feDistantLight"); -const MotionFeDropShadow = -/*@__PURE__*/ createMinimalMotionComponent("feDropShadow"); -const MotionFeFlood = -/*@__PURE__*/ createMinimalMotionComponent("feFlood"); -const MotionFeFuncA = -/*@__PURE__*/ createMinimalMotionComponent("feFuncA"); -const MotionFeFuncB = -/*@__PURE__*/ createMinimalMotionComponent("feFuncB"); -const MotionFeFuncG = -/*@__PURE__*/ createMinimalMotionComponent("feFuncG"); -const MotionFeFuncR = -/*@__PURE__*/ createMinimalMotionComponent("feFuncR"); -const MotionFeGaussianBlur = -/*@__PURE__*/ createMinimalMotionComponent("feGaussianBlur"); -const MotionFeImage = -/*@__PURE__*/ createMinimalMotionComponent("feImage"); -const MotionFeMerge = -/*@__PURE__*/ createMinimalMotionComponent("feMerge"); -const MotionFeMergeNode = -/*@__PURE__*/ createMinimalMotionComponent("feMergeNode"); -const MotionFeMorphology = -/*@__PURE__*/ createMinimalMotionComponent("feMorphology"); -const MotionFeOffset = -/*@__PURE__*/ createMinimalMotionComponent("feOffset"); -const MotionFePointLight = -/*@__PURE__*/ createMinimalMotionComponent("fePointLight"); -const MotionFeSpecularLighting = -/*@__PURE__*/ createMinimalMotionComponent("feSpecularLighting"); -const MotionFeSpotLight = -/*@__PURE__*/ createMinimalMotionComponent("feSpotLight"); -const MotionFeTile = /*@__PURE__*/ createMinimalMotionComponent("feTile"); -const MotionFeTurbulence = -/*@__PURE__*/ createMinimalMotionComponent("feTurbulence"); -const MotionForeignObject = -/*@__PURE__*/ createMinimalMotionComponent("foreignObject"); -const MotionLinearGradient = -/*@__PURE__*/ createMinimalMotionComponent("linearGradient"); -const MotionRadialGradient = -/*@__PURE__*/ createMinimalMotionComponent("radialGradient"); -const MotionTextPath = -/*@__PURE__*/ createMinimalMotionComponent("textPath"); - -exports.a = MotionA; -exports.abbr = MotionAbbr; -exports.address = MotionAddress; -exports.animate = MotionAnimate; -exports.area = MotionArea; -exports.article = MotionArticle; -exports.aside = MotionAside; -exports.audio = MotionAudio; -exports.b = MotionB; -exports.base = MotionBase; -exports.bdi = MotionBdi; -exports.bdo = MotionBdo; -exports.big = MotionBig; -exports.blockquote = MotionBlockquote; -exports.body = MotionBody; -exports.button = MotionButton; -exports.canvas = MotionCanvas; -exports.caption = MotionCaption; -exports.circle = MotionCircle; -exports.cite = MotionCite; -exports.clipPath = MotionClipPath; -exports.code = MotionCode; -exports.col = MotionCol; -exports.colgroup = MotionColgroup; -exports.create = createMinimalMotionComponent; -exports.data = MotionData; -exports.datalist = MotionDatalist; -exports.dd = MotionDd; -exports.defs = MotionDefs; -exports.del = MotionDel; -exports.desc = MotionDesc; -exports.details = MotionDetails; -exports.dfn = MotionDfn; -exports.dialog = MotionDialog; -exports.div = MotionDiv; -exports.dl = MotionDl; -exports.dt = MotionDt; -exports.ellipse = MotionEllipse; -exports.em = MotionEm; -exports.embed = MotionEmbed; -exports.feBlend = MotionFeBlend; -exports.feColorMatrix = MotionFeColorMatrix; -exports.feComponentTransfer = MotionFeComponentTransfer; -exports.feComposite = MotionFeComposite; -exports.feConvolveMatrix = MotionFeConvolveMatrix; -exports.feDiffuseLighting = MotionFeDiffuseLighting; -exports.feDisplacementMap = MotionFeDisplacementMap; -exports.feDistantLight = MotionFeDistantLight; -exports.feDropShadow = MotionFeDropShadow; -exports.feFlood = MotionFeFlood; -exports.feFuncA = MotionFeFuncA; -exports.feFuncB = MotionFeFuncB; -exports.feFuncG = MotionFeFuncG; -exports.feFuncR = MotionFeFuncR; -exports.feGaussianBlur = MotionFeGaussianBlur; -exports.feImage = MotionFeImage; -exports.feMerge = MotionFeMerge; -exports.feMergeNode = MotionFeMergeNode; -exports.feMorphology = MotionFeMorphology; -exports.feOffset = MotionFeOffset; -exports.fePointLight = MotionFePointLight; -exports.feSpecularLighting = MotionFeSpecularLighting; -exports.feSpotLight = MotionFeSpotLight; -exports.feTile = MotionFeTile; -exports.feTurbulence = MotionFeTurbulence; -exports.fieldset = MotionFieldset; -exports.figcaption = MotionFigcaption; -exports.figure = MotionFigure; -exports.filter = MotionFilter; -exports.footer = MotionFooter; -exports.foreignObject = MotionForeignObject; -exports.form = MotionForm; -exports.g = MotionG; -exports.h1 = MotionH1; -exports.h2 = MotionH2; -exports.h3 = MotionH3; -exports.h4 = MotionH4; -exports.h5 = MotionH5; -exports.h6 = MotionH6; -exports.head = MotionHead; -exports.header = MotionHeader; -exports.hgroup = MotionHgroup; -exports.hr = MotionHr; -exports.html = MotionHtml; -exports.i = MotionI; -exports.iframe = MotionIframe; -exports.image = MotionImage; -exports.img = MotionImg; -exports.input = MotionInput; -exports.ins = MotionIns; -exports.kbd = MotionKbd; -exports.keygen = MotionKeygen; -exports.label = MotionLabel; -exports.legend = MotionLegend; -exports.li = MotionLi; -exports.line = MotionLine; -exports.linearGradient = MotionLinearGradient; -exports.link = MotionLink; -exports.main = MotionMain; -exports.map = MotionMap; -exports.mark = MotionMark; -exports.marker = MotionMarker; -exports.mask = MotionMask; -exports.menu = MotionMenu; -exports.menuitem = MotionMenuitem; -exports.metadata = MotionMetadata; -exports.meter = MotionMeter; -exports.nav = MotionNav; -exports.object = MotionObject; -exports.ol = MotionOl; -exports.optgroup = MotionOptgroup; -exports.option = MotionOption; -exports.output = MotionOutput; -exports.p = MotionP; -exports.param = MotionParam; -exports.path = MotionPath; -exports.pattern = MotionPattern; -exports.picture = MotionPicture; -exports.polygon = MotionPolygon; -exports.polyline = MotionPolyline; -exports.pre = MotionPre; -exports.progress = MotionProgress; -exports.q = MotionQ; -exports.radialGradient = MotionRadialGradient; -exports.rect = MotionRect; -exports.rp = MotionRp; -exports.rt = MotionRt; -exports.ruby = MotionRuby; -exports.s = MotionS; -exports.samp = MotionSamp; -exports.script = MotionScript; -exports.section = MotionSection; -exports.select = MotionSelect; -exports.small = MotionSmall; -exports.source = MotionSource; -exports.span = MotionSpan; -exports.stop = MotionStop; -exports.strong = MotionStrong; -exports.style = MotionStyle; -exports.sub = MotionSub; -exports.summary = MotionSummary; -exports.sup = MotionSup; -exports.svg = MotionSvg; -exports.symbol = MotionSymbol; -exports.table = MotionTable; -exports.tbody = MotionTbody; -exports.td = MotionTd; -exports.text = MotionText; -exports.textPath = MotionTextPath; -exports.textarea = MotionTextarea; -exports.tfoot = MotionTfoot; -exports.th = MotionTh; -exports.thead = MotionThead; -exports.time = MotionTime; -exports.title = MotionTitle; -exports.tr = MotionTr; -exports.track = MotionTrack; -exports.tspan = MotionTspan; -exports.u = MotionU; -exports.ul = MotionUl; -exports.use = MotionUse; -exports.video = MotionVideo; -exports.view = MotionView; -exports.wbr = MotionWbr; -exports.webview = MotionWebview; -//# sourceMappingURL=m.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/m.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/m.js.map deleted file mode 100644 index 9fcc06bf..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/m.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"m.js","sources":["../../src/render/components/m/create.ts","../../src/render/components/m/elements.ts"],"sourcesContent":["import { createMotionComponent, MotionComponentOptions } from \"../../../motion\"\nimport { DOMMotionComponents } from \"../../dom/types\"\n\nexport function createMinimalMotionComponent<\n Props,\n TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n Component: TagName | string | React.ComponentType,\n options?: MotionComponentOptions\n) {\n return createMotionComponent(Component, options)\n}\n","\"use client\"\n\nimport { createMinimalMotionComponent } from \"./create\"\n\n/**\n * HTML components\n */\nexport const MotionA = /*@__PURE__*/ createMinimalMotionComponent(\"a\")\nexport const MotionAbbr = /*@__PURE__*/ createMinimalMotionComponent(\"abbr\")\nexport const MotionAddress =\n /*@__PURE__*/ createMinimalMotionComponent(\"address\")\nexport const MotionArea = /*@__PURE__*/ createMinimalMotionComponent(\"area\")\nexport const MotionArticle =\n /*@__PURE__*/ createMinimalMotionComponent(\"article\")\nexport const MotionAside = /*@__PURE__*/ createMinimalMotionComponent(\"aside\")\nexport const MotionAudio = /*@__PURE__*/ createMinimalMotionComponent(\"audio\")\nexport const MotionB = /*@__PURE__*/ createMinimalMotionComponent(\"b\")\nexport const MotionBase = /*@__PURE__*/ createMinimalMotionComponent(\"base\")\nexport const MotionBdi = /*@__PURE__*/ createMinimalMotionComponent(\"bdi\")\nexport const MotionBdo = /*@__PURE__*/ createMinimalMotionComponent(\"bdo\")\nexport const MotionBig = /*@__PURE__*/ createMinimalMotionComponent(\"big\")\nexport const MotionBlockquote =\n /*@__PURE__*/ createMinimalMotionComponent(\"blockquote\")\nexport const MotionBody = /*@__PURE__*/ createMinimalMotionComponent(\"body\")\nexport const MotionButton = /*@__PURE__*/ createMinimalMotionComponent(\"button\")\nexport const MotionCanvas = /*@__PURE__*/ createMinimalMotionComponent(\"canvas\")\nexport const MotionCaption =\n /*@__PURE__*/ createMinimalMotionComponent(\"caption\")\nexport const MotionCite = /*@__PURE__*/ createMinimalMotionComponent(\"cite\")\nexport const MotionCode = /*@__PURE__*/ createMinimalMotionComponent(\"code\")\nexport const MotionCol = /*@__PURE__*/ createMinimalMotionComponent(\"col\")\nexport const MotionColgroup =\n /*@__PURE__*/ createMinimalMotionComponent(\"colgroup\")\nexport const MotionData = /*@__PURE__*/ createMinimalMotionComponent(\"data\")\nexport const MotionDatalist =\n /*@__PURE__*/ createMinimalMotionComponent(\"datalist\")\nexport const MotionDd = /*@__PURE__*/ createMinimalMotionComponent(\"dd\")\nexport const MotionDel = /*@__PURE__*/ createMinimalMotionComponent(\"del\")\nexport const MotionDetails =\n /*@__PURE__*/ createMinimalMotionComponent(\"details\")\nexport const MotionDfn = /*@__PURE__*/ createMinimalMotionComponent(\"dfn\")\nexport const MotionDialog = /*@__PURE__*/ createMinimalMotionComponent(\"dialog\")\nexport const MotionDiv = /*@__PURE__*/ createMinimalMotionComponent(\"div\")\nexport const MotionDl = /*@__PURE__*/ createMinimalMotionComponent(\"dl\")\nexport const MotionDt = /*@__PURE__*/ createMinimalMotionComponent(\"dt\")\nexport const MotionEm = /*@__PURE__*/ createMinimalMotionComponent(\"em\")\nexport const MotionEmbed = /*@__PURE__*/ createMinimalMotionComponent(\"embed\")\nexport const MotionFieldset =\n /*@__PURE__*/ createMinimalMotionComponent(\"fieldset\")\nexport const MotionFigcaption =\n /*@__PURE__*/ createMinimalMotionComponent(\"figcaption\")\nexport const MotionFigure = /*@__PURE__*/ createMinimalMotionComponent(\"figure\")\nexport const MotionFooter = /*@__PURE__*/ createMinimalMotionComponent(\"footer\")\nexport const MotionForm = /*@__PURE__*/ createMinimalMotionComponent(\"form\")\nexport const MotionH1 = /*@__PURE__*/ createMinimalMotionComponent(\"h1\")\nexport const MotionH2 = /*@__PURE__*/ createMinimalMotionComponent(\"h2\")\nexport const MotionH3 = /*@__PURE__*/ createMinimalMotionComponent(\"h3\")\nexport const MotionH4 = /*@__PURE__*/ createMinimalMotionComponent(\"h4\")\nexport const MotionH5 = /*@__PURE__*/ createMinimalMotionComponent(\"h5\")\nexport const MotionH6 = /*@__PURE__*/ createMinimalMotionComponent(\"h6\")\nexport const MotionHead = /*@__PURE__*/ createMinimalMotionComponent(\"head\")\nexport const MotionHeader = /*@__PURE__*/ createMinimalMotionComponent(\"header\")\nexport const MotionHgroup = /*@__PURE__*/ createMinimalMotionComponent(\"hgroup\")\nexport const MotionHr = /*@__PURE__*/ createMinimalMotionComponent(\"hr\")\nexport const MotionHtml = /*@__PURE__*/ createMinimalMotionComponent(\"html\")\nexport const MotionI = /*@__PURE__*/ createMinimalMotionComponent(\"i\")\nexport const MotionIframe = /*@__PURE__*/ createMinimalMotionComponent(\"iframe\")\nexport const MotionImg = /*@__PURE__*/ createMinimalMotionComponent(\"img\")\nexport const MotionInput = /*@__PURE__*/ createMinimalMotionComponent(\"input\")\nexport const MotionIns = /*@__PURE__*/ createMinimalMotionComponent(\"ins\")\nexport const MotionKbd = /*@__PURE__*/ createMinimalMotionComponent(\"kbd\")\nexport const MotionKeygen = /*@__PURE__*/ createMinimalMotionComponent(\"keygen\")\nexport const MotionLabel = /*@__PURE__*/ createMinimalMotionComponent(\"label\")\nexport const MotionLegend = /*@__PURE__*/ createMinimalMotionComponent(\"legend\")\nexport const MotionLi = /*@__PURE__*/ createMinimalMotionComponent(\"li\")\nexport const MotionLink = /*@__PURE__*/ createMinimalMotionComponent(\"link\")\nexport const MotionMain = /*@__PURE__*/ createMinimalMotionComponent(\"main\")\nexport const MotionMap = /*@__PURE__*/ createMinimalMotionComponent(\"map\")\nexport const MotionMark = /*@__PURE__*/ createMinimalMotionComponent(\"mark\")\nexport const MotionMenu = /*@__PURE__*/ createMinimalMotionComponent(\"menu\")\nexport const MotionMenuitem =\n /*@__PURE__*/ createMinimalMotionComponent(\"menuitem\")\nexport const MotionMeter = /*@__PURE__*/ createMinimalMotionComponent(\"meter\")\nexport const MotionNav = /*@__PURE__*/ createMinimalMotionComponent(\"nav\")\nexport const MotionObject = /*@__PURE__*/ createMinimalMotionComponent(\"object\")\nexport const MotionOl = /*@__PURE__*/ createMinimalMotionComponent(\"ol\")\nexport const MotionOptgroup =\n /*@__PURE__*/ createMinimalMotionComponent(\"optgroup\")\nexport const MotionOption = /*@__PURE__*/ createMinimalMotionComponent(\"option\")\nexport const MotionOutput = /*@__PURE__*/ createMinimalMotionComponent(\"output\")\nexport const MotionP = /*@__PURE__*/ createMinimalMotionComponent(\"p\")\nexport const MotionParam = /*@__PURE__*/ createMinimalMotionComponent(\"param\")\nexport const MotionPicture =\n /*@__PURE__*/ createMinimalMotionComponent(\"picture\")\nexport const MotionPre = /*@__PURE__*/ createMinimalMotionComponent(\"pre\")\nexport const MotionProgress =\n /*@__PURE__*/ createMinimalMotionComponent(\"progress\")\nexport const MotionQ = /*@__PURE__*/ createMinimalMotionComponent(\"q\")\nexport const MotionRp = /*@__PURE__*/ createMinimalMotionComponent(\"rp\")\nexport const MotionRt = /*@__PURE__*/ createMinimalMotionComponent(\"rt\")\nexport const MotionRuby = /*@__PURE__*/ createMinimalMotionComponent(\"ruby\")\nexport const MotionS = /*@__PURE__*/ createMinimalMotionComponent(\"s\")\nexport const MotionSamp = /*@__PURE__*/ createMinimalMotionComponent(\"samp\")\nexport const MotionScript = /*@__PURE__*/ createMinimalMotionComponent(\"script\")\nexport const MotionSection =\n /*@__PURE__*/ createMinimalMotionComponent(\"section\")\nexport const MotionSelect = /*@__PURE__*/ createMinimalMotionComponent(\"select\")\nexport const MotionSmall = /*@__PURE__*/ createMinimalMotionComponent(\"small\")\nexport const MotionSource = /*@__PURE__*/ createMinimalMotionComponent(\"source\")\nexport const MotionSpan = /*@__PURE__*/ createMinimalMotionComponent(\"span\")\nexport const MotionStrong = /*@__PURE__*/ createMinimalMotionComponent(\"strong\")\nexport const MotionStyle = /*@__PURE__*/ createMinimalMotionComponent(\"style\")\nexport const MotionSub = /*@__PURE__*/ createMinimalMotionComponent(\"sub\")\nexport const MotionSummary =\n /*@__PURE__*/ createMinimalMotionComponent(\"summary\")\nexport const MotionSup = /*@__PURE__*/ createMinimalMotionComponent(\"sup\")\nexport const MotionTable = /*@__PURE__*/ createMinimalMotionComponent(\"table\")\nexport const MotionTbody = /*@__PURE__*/ createMinimalMotionComponent(\"tbody\")\nexport const MotionTd = /*@__PURE__*/ createMinimalMotionComponent(\"td\")\nexport const MotionTextarea =\n /*@__PURE__*/ createMinimalMotionComponent(\"textarea\")\nexport const MotionTfoot = /*@__PURE__*/ createMinimalMotionComponent(\"tfoot\")\nexport const MotionTh = /*@__PURE__*/ createMinimalMotionComponent(\"th\")\nexport const MotionThead = /*@__PURE__*/ createMinimalMotionComponent(\"thead\")\nexport const MotionTime = /*@__PURE__*/ createMinimalMotionComponent(\"time\")\nexport const MotionTitle = /*@__PURE__*/ createMinimalMotionComponent(\"title\")\nexport const MotionTr = /*@__PURE__*/ createMinimalMotionComponent(\"tr\")\nexport const MotionTrack = /*@__PURE__*/ createMinimalMotionComponent(\"track\")\nexport const MotionU = /*@__PURE__*/ createMinimalMotionComponent(\"u\")\nexport const MotionUl = /*@__PURE__*/ createMinimalMotionComponent(\"ul\")\nexport const MotionVideo = /*@__PURE__*/ createMinimalMotionComponent(\"video\")\nexport const MotionWbr = /*@__PURE__*/ createMinimalMotionComponent(\"wbr\")\nexport const MotionWebview =\n /*@__PURE__*/ createMinimalMotionComponent(\"webview\")\n\n/**\n * SVG components\n */\nexport const MotionAnimate =\n /*@__PURE__*/ createMinimalMotionComponent(\"animate\")\nexport const MotionCircle = /*@__PURE__*/ createMinimalMotionComponent(\"circle\")\nexport const MotionDefs = /*@__PURE__*/ createMinimalMotionComponent(\"defs\")\nexport const MotionDesc = /*@__PURE__*/ createMinimalMotionComponent(\"desc\")\nexport const MotionEllipse =\n /*@__PURE__*/ createMinimalMotionComponent(\"ellipse\")\nexport const MotionG = /*@__PURE__*/ createMinimalMotionComponent(\"g\")\nexport const MotionImage = /*@__PURE__*/ createMinimalMotionComponent(\"image\")\nexport const MotionLine = /*@__PURE__*/ createMinimalMotionComponent(\"line\")\nexport const MotionFilter = /*@__PURE__*/ createMinimalMotionComponent(\"filter\")\nexport const MotionMarker = /*@__PURE__*/ createMinimalMotionComponent(\"marker\")\nexport const MotionMask = /*@__PURE__*/ createMinimalMotionComponent(\"mask\")\nexport const MotionMetadata =\n /*@__PURE__*/ createMinimalMotionComponent(\"metadata\")\nexport const MotionPath = /*@__PURE__*/ createMinimalMotionComponent(\"path\")\nexport const MotionPattern =\n /*@__PURE__*/ createMinimalMotionComponent(\"pattern\")\nexport const MotionPolygon =\n /*@__PURE__*/ createMinimalMotionComponent(\"polygon\")\nexport const MotionPolyline =\n /*@__PURE__*/ createMinimalMotionComponent(\"polyline\")\nexport const MotionRect = /*@__PURE__*/ createMinimalMotionComponent(\"rect\")\nexport const MotionStop = /*@__PURE__*/ createMinimalMotionComponent(\"stop\")\nexport const MotionSvg = /*@__PURE__*/ createMinimalMotionComponent(\"svg\")\nexport const MotionSymbol = /*@__PURE__*/ createMinimalMotionComponent(\"symbol\")\nexport const MotionText = /*@__PURE__*/ createMinimalMotionComponent(\"text\")\nexport const MotionTspan = /*@__PURE__*/ createMinimalMotionComponent(\"tspan\")\nexport const MotionUse = /*@__PURE__*/ createMinimalMotionComponent(\"use\")\nexport const MotionView = /*@__PURE__*/ createMinimalMotionComponent(\"view\")\nexport const MotionClipPath =\n /*@__PURE__*/ createMinimalMotionComponent(\"clipPath\")\nexport const MotionFeBlend =\n /*@__PURE__*/ createMinimalMotionComponent(\"feBlend\")\nexport const MotionFeColorMatrix =\n /*@__PURE__*/ createMinimalMotionComponent(\"feColorMatrix\")\nexport const MotionFeComponentTransfer =\n /*@__PURE__*/ createMinimalMotionComponent(\"feComponentTransfer\")\nexport const MotionFeComposite =\n /*@__PURE__*/ createMinimalMotionComponent(\"feComposite\")\nexport const MotionFeConvolveMatrix =\n /*@__PURE__*/ createMinimalMotionComponent(\"feConvolveMatrix\")\nexport const MotionFeDiffuseLighting =\n /*@__PURE__*/ createMinimalMotionComponent(\"feDiffuseLighting\")\nexport const MotionFeDisplacementMap =\n /*@__PURE__*/ createMinimalMotionComponent(\"feDisplacementMap\")\nexport const MotionFeDistantLight =\n /*@__PURE__*/ createMinimalMotionComponent(\"feDistantLight\")\nexport const MotionFeDropShadow =\n /*@__PURE__*/ createMinimalMotionComponent(\"feDropShadow\")\nexport const MotionFeFlood =\n /*@__PURE__*/ createMinimalMotionComponent(\"feFlood\")\nexport const MotionFeFuncA =\n /*@__PURE__*/ createMinimalMotionComponent(\"feFuncA\")\nexport const MotionFeFuncB =\n /*@__PURE__*/ createMinimalMotionComponent(\"feFuncB\")\nexport const MotionFeFuncG =\n /*@__PURE__*/ createMinimalMotionComponent(\"feFuncG\")\nexport const MotionFeFuncR =\n /*@__PURE__*/ createMinimalMotionComponent(\"feFuncR\")\nexport const MotionFeGaussianBlur =\n /*@__PURE__*/ createMinimalMotionComponent(\"feGaussianBlur\")\nexport const MotionFeImage =\n /*@__PURE__*/ createMinimalMotionComponent(\"feImage\")\nexport const MotionFeMerge =\n /*@__PURE__*/ createMinimalMotionComponent(\"feMerge\")\nexport const MotionFeMergeNode =\n /*@__PURE__*/ createMinimalMotionComponent(\"feMergeNode\")\nexport const MotionFeMorphology =\n /*@__PURE__*/ createMinimalMotionComponent(\"feMorphology\")\nexport const MotionFeOffset =\n /*@__PURE__*/ createMinimalMotionComponent(\"feOffset\")\nexport const MotionFePointLight =\n /*@__PURE__*/ createMinimalMotionComponent(\"fePointLight\")\nexport const MotionFeSpecularLighting =\n /*@__PURE__*/ createMinimalMotionComponent(\"feSpecularLighting\")\nexport const MotionFeSpotLight =\n /*@__PURE__*/ createMinimalMotionComponent(\"feSpotLight\")\nexport const MotionFeTile = /*@__PURE__*/ createMinimalMotionComponent(\"feTile\")\nexport const MotionFeTurbulence =\n /*@__PURE__*/ createMinimalMotionComponent(\"feTurbulence\")\nexport const MotionForeignObject =\n /*@__PURE__*/ createMinimalMotionComponent(\"foreignObject\")\nexport const MotionLinearGradient =\n /*@__PURE__*/ createMinimalMotionComponent(\"linearGradient\")\nexport const MotionRadialGradient =\n /*@__PURE__*/ createMinimalMotionComponent(\"radialGradient\")\nexport const MotionTextPath =\n /*@__PURE__*/ createMinimalM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B,cAAc,4BAA4B,CAAC,aAAa;MAC/C,kBAAkB;AAC3B,cAAc,4BAA4B,CAAC,cAAc;MAChD,cAAc;AACvB,cAAc,4BAA4B,CAAC,UAAU;MAC5C,kBAAkB;AAC3B,cAAc,4BAA4B,CAAC,cAAc;MAChD,wBAAwB;AACjC,cAAc,4BAA4B,CAAC,oBAAoB;MACtD,iBAAiB;AAC1B,cAAc,4BAA4B,CAAC,aAAa;AACrD,MAAM,YAAY,iBAAiB,4BAA4B,CAAC,QAAQ;MAClE,kBAAkB;AAC3B,cAAc,4BAA4B,CAAC,cAAc;MAChD,mBAAmB;AAC5B,cAAc,4BAA4B,CAAC,eAAe;MACjD,oBAAoB;AAC7B,cAAc,4BAA4B,CAAC,gBAAgB;MAClD,oBAAoB;AAC7B,cAAc,4BAA4B,CAAC,gBAAgB;MAClD,cAAc;AACvB,cAAc,4BAA4B,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/mini.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/mini.js deleted file mode 100644 index d00b5e1e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/mini.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var react = require('react'); -var motionDom = require('motion-dom'); -var motionUtils = require('motion-utils'); - -/** - * Creates a constant value over the lifecycle of a component. - * - * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer - * a guarantee that it won't re-run for performance reasons later on. By using `useConstant` - * you can ensure that initialisers don't execute twice or more. - */ -function useConstant(init) { - const ref = react.useRef(null); - if (ref.current === null) { - ref.current = init(); - } - return ref.current; -} - -function useUnmountEffect(callback) { - return react.useEffect(() => () => callback(), []); -} - -function animateElements(elementOrSelector, keyframes, options, scope) { - // Gracefully handle null/undefined elements (e.g., from querySelector returning null) - if (elementOrSelector == null) { - return []; - } - const elements = motionDom.resolveElements(elementOrSelector, scope); - const numElements = elements.length; - motionUtils.invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements"); - /** - * WAAPI doesn't support interrupting animations. - * - * Therefore, starting animations requires a three-step process: - * 1. Stop existing animations (write styles to DOM) - * 2. Resolve keyframes (read styles from DOM) - * 3. Create new animations (write styles to DOM) - * - * The hybrid `animate()` function uses AsyncAnimation to resolve - * keyframes before creating new animations, which removes style - * thrashing. Here, we have much stricter filesize constraints. - * Therefore we do this in a synchronous way that ensures that - * at least within `animate()` calls there is no style thrashing. - * - * In the motion-native-animate-mini-interrupt benchmark this - * was 80% faster than a single loop. - */ - const animationDefinitions = []; - /** - * Step 1: Build options and stop existing animations (write) - */ - for (let i = 0; i < numElements; i++) { - const element = elements[i]; - const elementTransition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if (typeof elementTransition.delay === "function") { - elementTransition.delay = elementTransition.delay(i, numElements); - } - for (const valueName in keyframes) { - let valueKeyframes = keyframes[valueName]; - if (!Array.isArray(valueKeyframes)) { - valueKeyframes = [valueKeyframes]; - } - const valueOptions = { - ...motionDom.getValueTransition(elementTransition, valueName), - }; - valueOptions.duration && (valueOptions.duration = motionUtils.secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = motionUtils.secondsToMilliseconds(valueOptions.delay)); - /** - * If there's an existing animation playing on this element then stop it - * before creating a new one. - */ - const map = motionDom.getAnimationMap(element); - const key = motionDom.animationMapKey(valueName, valueOptions.pseudoElement || ""); - const currentAnimation = map.get(key); - currentAnimation && currentAnimation.stop(); - animationDefinitions.push({ - map, - key, - unresolvedKeyframes: valueKeyframes, - options: { - ...valueOptions, - element, - name: valueName, - allowFlatten: !elementTransition.type && !elementTransition.ease, - }, - }); - } - } - /** - * Step 2: Resolve keyframes (read) - */ - for (let i = 0; i < animationDefinitions.length; i++) { - const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i]; - const { element, name, pseudoElement } = animationOptions; - if (!pseudoElement && unresolvedKeyframes[0] === null) { - unresolvedKeyframes[0] = motionDom.getComputedStyle(element, name); - } - motionDom.fillWildcards(unresolvedKeyframes); - motionDom.applyPxDefaults(unresolvedKeyframes, name); - /** - * If we only have one keyframe, explicitly read the initial keyframe - * from the computed style. This is to ensure consistency with WAAPI behaviour - * for restarting animations, for instance .play() after finish, when it - * has one vs two keyframes. - */ - if (!pseudoElement && unresolvedKeyframes.length < 2) { - unresolvedKeyframes.unshift(motionDom.getComputedStyle(element, name)); - } - animationOptions.keyframes = unresolvedKeyframes; - } - /** - * Step 3: Create new animations (write) - */ - const animations = []; - for (let i = 0; i < animationDefinitions.length; i++) { - const { map, key, options: animationOptions } = animationDefinitions[i]; - const animation = new motionDom.NativeAnimation(animationOptions); - map.set(key, animation); - animation.finished.finally(() => map.delete(key)); - animations.push(animation); - } - return animations; -} - -const createScopedWaapiAnimate = (scope) => { - function scopedAnimate(elementOrSelector, keyframes, options) { - return new motionDom.GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope)); - } - return scopedAnimate; -}; - -function useAnimateMini() { - const scope = useConstant(() => ({ - current: null, // Will be hydrated by React - animations: [], - })); - const animate = useConstant(() => createScopedWaapiAnimate(scope)); - useUnmountEffect(() => { - scope.animations.forEach((animation) => animation.stop()); - }); - return [scope, animate]; -} - -exports.useAnimate = useAnimateMini; -//# sourceMappingURL=mini.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/mini.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/mini.js.map deleted file mode 100644 index bc1c0774..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/cjs/mini.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mini.js","sources":["../../src/utils/use-constant.ts","../../src/utils/use-unmount-effect.ts","../../src/animation/animators/waapi/animate-elements.ts","../../src/animation/animators/waapi/animate-style.ts","../../src/animation/hooks/use-animate-style.ts"],"sourcesContent":["\"use client\"\n\nimport { useRef } from \"react\"\n\ntype Init = () => T\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nexport function useConstant(init: Init) {\n const ref = useRef(null)\n\n if (ref.current === null) {\n ref.current = init()\n }\n\n return ref.current\n}\n","\"use client\"\n\nimport { useEffect } from \"react\"\n\nexport function useUnmountEffect(callback: () => void) {\n return useEffect(() => () => callback(), [])\n}\n","import {\n animationMapKey,\n AnimationPlaybackControls,\n AnimationScope,\n applyPxDefaults,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n fillWildcards,\n getAnimationMap,\n getComputedStyle,\n getValueTransition,\n NativeAnimation,\n NativeAnimationOptions,\n resolveElements,\n UnresolvedValueKeyframe,\n ValueKeyframe,\n} from \"motion-dom\"\nimport { invariant, secondsToMilliseconds } from \"motion-utils\"\n\ninterface AnimationDefinition {\n map: Map>\n key: string\n unresolvedKeyframes: UnresolvedValueKeyframe[]\n options: Omit & {\n keyframes?: ValueKeyframe[]\n }\n}\n\nexport function animateElements(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n) {\n // Gracefully handle null/undefined elements (e.g., from querySelector returning null)\n if (elementOrSelector == null) {\n return []\n }\n\n const elements = resolveElements(elementOrSelector, scope) as Array<\n HTMLElement | SVGElement\n >\n const numElements = elements.length\n\n invariant(\n Boolean(numElements),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions: AnimationDefinition[] = []\n\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i]\n const elementTransition: DynamicAnimationOptions = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements)\n }\n\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName as keyof typeof keyframes]!\n\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes]\n }\n\n const valueOptions = {\n ...getValueTransition(elementTransition as any, valueName),\n }\n\n valueOptions.duration &&= secondsToMilliseconds(\n valueOptions.duration\n )\n\n valueOptions.delay &&= secondsToMilliseconds(valueOptions.delay)\n\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element)\n const key = animationMapKey(\n valueName,\n valueOptions.pseudoElement || \"\"\n )\n const currentAnimation = map.get(key)\n currentAnimation && currentAnimation.stop()\n\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n options: {\n ...valueOptions,\n element,\n name: valueName,\n allowFlatten:\n !elementTransition.type && !elementTransition.ease,\n },\n })\n }\n }\n\n /**\n * Step 2: Resolve keyframes (read)\n */\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { unresolvedKeyframes, options: animationOptions } =\n animationDefinitions[i]\n\n const { element, name, pseudoElement } = animationOptions\n if (!pseudoElement && unresolvedKeyframes[0] === null) {\n unresolvedKeyframes[0] = getComputedStyle(element, name)\n }\n\n fillWildcards(unresolvedKeyframes)\n applyPxDefaults(unresolvedKeyframes, name)\n\n /**\n * If we only have one keyframe, explicitly read the initial keyframe\n * from the computed style. This is to ensure consistency with WAAPI behaviour\n * for restarting animations, for instance .play() after finish, when it\n * has one vs two keyframes.\n */\n if (!pseudoElement && unresolvedKeyframes.length < 2) {\n unresolvedKeyframes.unshift(getComputedStyle(element, name))\n }\n\n animationOptions.keyframes = unresolvedKeyframes as ValueKeyframe[]\n }\n\n /**\n * Step 3: Create new animations (write)\n */\n const animations: AnimationPlaybackControls[] = []\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { map, key, options: animationOptions } = animationDefinitions[i]\n const animation = new NativeAnimation(\n animationOptions as NativeAnimationOptions\n )\n\n map.set(key, animation)\n animation.finished.finally(() => map.delete(key))\n\n animations.push(animation)\n }\n\n return animations\n}\n","import {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n GroupAnimationWithThen,\n} from \"motion-dom\"\nimport { animateElements } from \"./animate-elements\"\n\nexport const createScopedWaapiAnimate = (scope?: AnimationScope) => {\n function scopedAnimate(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen {\n return new GroupAnimationWithThen(\n animateElements(\n elementOrSelector,\n keyframes as DOMKeyframesDefinition,\n options,\n scope\n )\n )\n }\n\n return scopedAnimate\n}\n\nexport const animateMini = /*@__PURE__*/ createScopedWaapiAnimate()\n","\"use client\"\n\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useUnmountEffect } from \"../../utils/use-unmount-effect\"\nimport { createScopedWaapiAnimate } from \"../animators/waapi/animate-style\"\nimport { AnimationScope } from \"motion-dom\"\n\nexport function useAnimateMini() {\n const scope: AnimationScope = useConstant(() => ({\n current: null!, // Will be hydrated by React\n animations: [],\n }))\n\n const animate = useConstant(() => createScopedWaapiAnimate(scope))\n\n useUnmountEffect(() => {\n scope.animations.forEach((animation) => animation.stop())\n })\n\n return [scope, animate] as [AnimationScope, typeof animate]\n}\n"],"names":["useRef","useEffect","resolveElements","invariant","getValueTransition","secondsToMilliseconds","getAnimationMap","animationMapKey","getComputedStyle","fillWildcards","applyPxDefaults","NativeAnimation","GroupAnimationWithThen"],"mappings":";;;;;;;;AAMA;;;;;;AAMG;AACG,SAAU,WAAW,CAAI,IAAa,EAAA;AACxC,IAAA,MAAM,GAAG,GAAGA,YAAM,CAAW,IAAI,CAAC;AAElC,IAAA,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI,EAAE;AACtB,QAAA,GAAG,CAAC,OAAO,GAAG,IAAI,EAAE;IACxB;IAEA,OAAO,GAAG,CAAC,OAAO;AACtB;;ACjBM,SAAU,gBAAgB,CAAC,QAAoB,EAAA;AACjD,IAAA,OAAOC,eAAS,CAAC,MAAM,MAAM,QAAQ,EAAE,EAAE,EAAE,CAAC;AAChD;;ACuBM,SAAU,eAAe,CAC3B,iBAAoC,EACpC,SAAiC,EACjC,OAAiC,EACjC,KAAsB,EAAA;;AAGtB,IAAA,IAAI,iBAAiB,IAAI,IAAI,EAAE;AAC3B,QAAA,OAAO,EAAE;IACb;IAEA,MAAM,QAAQ,GAAGC,yBAAe,CAAC,iBAAiB,EAAE,KAAK,CAExD;AACD,IAAA,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;IAEnCC,qBAAS,CACL,OAAO,CAAC,WAAW,CAAC,EACpB,6BAA6B,EAC7B,mBAAmB,CACtB;AAED;;;;;;;;;;;;;;;;AAgBG;IACH,MAAM,oBAAoB,GAA0B,EAAE;AAEtD;;AAEG;AACH,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE;AAClC,QAAA,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G,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC;AACvB,QAAA,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAEjD,QAAA,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;IAC9B;AAEA,IAAA,OAAO,UAAU;AACrB;;ACnKO,MAAM,wBAAwB,GAAG,CAAC,KAAsB,KAAI;AAC/D,IAAA,SAAS,aAAa,CAClB,iBAAoC,EACpC,SAAiC,EACjC,OAAiC,EAAA;AAEjC,QAAA,OAAO,IAAIC,gCAAsB,CAC7B,eAAe,CACX,iBAAiB,EACjB,SAAmC,EACnC,OAAO,EACP,KAAK,CACR,CACJ;IACL;AAEA,IAAA,OAAO,aAAa;AACxB,CAAC;;SCpBe,cAAc,GAAA;AAC1B,IAAA,MAAM,KAAK,GAAsB,WAAW,CAAC,OAAO;QAChD,OAAO,EAAE,IAAK;AACd,QAAA,UAAU,EAAE,EAAE;AACjB,KAAA,CAAC,CAAC;AAEH,IAAA,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAElE,gBAAgB,CAAC,MAAK;AAClB,QAAA,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,IAAI,EAAE,CAAC;AAC7D,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,CAAC,KAAK,EAAE,OAAO,CAAwC;AAClE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/client.d.ts b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/client.d.ts deleted file mode 100644 index 9781baf6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/client.d.ts +++ /dev/null @@ -1,367 +0,0 @@ -import { CSSProperties, PropsWithoutRef, RefAttributes, JSX, SVGAttributes } from 'react'; -import { MotionNodeOptions, MotionValue, TransformProperties, SVGPathProperties } from 'motion-dom'; - -type MotionValueString = MotionValue; -type MotionValueNumber = MotionValue; -type MotionValueAny = MotionValue; -type AnyMotionValue = MotionValueNumber | MotionValueString | MotionValueAny; -type MotionValueHelper = T | AnyMotionValue; -type MakeMotionHelper = { - [K in keyof T]: MotionValueHelper; -}; -type MakeCustomValueTypeHelper = MakeMotionHelper; -type MakeMotion = MakeCustomValueTypeHelper; -type MotionCSS = MakeMotion>; -/** - * @public - */ -type MotionTransform = MakeMotion; -type MotionSVGProps = MakeMotion; -/** - * @public - */ -interface MotionStyle$1 extends MotionCSS, MotionTransform, MotionSVGProps { -} -/** - * Props for `motion` components. - * - * @public - */ -interface MotionProps extends MotionNodeOptions { - /** - * - * The React DOM `style` prop, enhanced with support for `MotionValue`s and separate `transform` values. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * - * return - * } - * ``` - */ - style?: MotionStyle$1; - children?: React.ReactNode | MotionValueNumber | MotionValueString; -} - -interface HTMLElements { - a: HTMLAnchorElement; - abbr: HTMLElement; - address: HTMLElement; - area: HTMLAreaElement; - article: HTMLElement; - aside: HTMLElement; - audio: HTMLAudioElement; - b: HTMLElement; - base: HTMLBaseElement; - bdi: HTMLElement; - bdo: HTMLElement; - big: HTMLElement; - blockquote: HTMLQuoteElement; - body: HTMLBodyElement; - br: HTMLBRElement; - button: HTMLButtonElement; - canvas: HTMLCanvasElement; - caption: HTMLElement; - center: HTMLElement; - cite: HTMLElement; - code: HTMLElement; - col: HTMLTableColElement; - colgroup: HTMLTableColElement; - data: HTMLDataElement; - datalist: HTMLDataListElement; - dd: HTMLElement; - del: HTMLModElement; - details: HTMLDetailsElement; - dfn: HTMLElement; - dialog: HTMLDialogElement; - div: HTMLDivElement; - dl: HTMLDListElement; - dt: HTMLElement; - em: HTMLElement; - embed: HTMLEmbedElement; - fieldset: HTMLFieldSetElement; - figcaption: HTMLElement; - figure: HTMLElement; - footer: HTMLElement; - form: HTMLFormElement; - h1: HTMLHeadingElement; - h2: HTMLHeadingElement; - h3: HTMLHeadingElement; - h4: HTMLHeadingElement; - h5: HTMLHeadingElement; - h6: HTMLHeadingElement; - head: HTMLHeadElement; - header: HTMLElement; - hgroup: HTMLElement; - hr: HTMLHRElement; - html: HTMLHtmlElement; - i: HTMLElement; - iframe: HTMLIFrameElement; - img: HTMLImageElement; - input: HTMLInputElement; - ins: HTMLModElement; - kbd: HTMLElement; - keygen: HTMLElement; - label: HTMLLabelElement; - legend: HTMLLegendElement; - li: HTMLLIElement; - link: HTMLLinkElement; - main: HTMLElement; - map: HTMLMapElement; - mark: HTMLElement; - menu: HTMLElement; - menuitem: HTMLElement; - meta: HTMLMetaElement; - meter: HTMLMeterElement; - nav: HTMLElement; - noindex: HTMLElement; - noscript: HTMLElement; - object: HTMLObjectElement; - ol: HTMLOListElement; - optgroup: HTMLOptGroupElement; - option: HTMLOptionElement; - output: HTMLOutputElement; - p: HTMLParagraphElement; - param: HTMLParamElement; - picture: HTMLElement; - pre: HTMLPreElement; - progress: HTMLProgressElement; - q: HTMLQuoteElement; - rp: HTMLElement; - rt: HTMLElement; - ruby: HTMLElement; - s: HTMLElement; - samp: HTMLElement; - search: HTMLElement; - slot: HTMLSlotElement; - script: HTMLScriptElement; - section: HTMLElement; - select: HTMLSelectElement; - small: HTMLElement; - source: HTMLSourceElement; - span: HTMLSpanElement; - strong: HTMLElement; - style: HTMLStyleElement; - sub: HTMLElement; - summary: HTMLElement; - sup: HTMLElement; - table: HTMLTableElement; - template: HTMLTemplateElement; - tbody: HTMLTableSectionElement; - td: HTMLTableDataCellElement; - textarea: HTMLTextAreaElement; - tfoot: HTMLTableSectionElement; - th: HTMLTableHeaderCellElement; - thead: HTMLTableSectionElement; - time: HTMLTimeElement; - title: HTMLTitleElement; - tr: HTMLTableRowElement; - track: HTMLTrackElement; - u: HTMLElement; - ul: HTMLUListElement; - var: HTMLElement; - video: HTMLVideoElement; - wbr: HTMLElement; - webview: HTMLWebViewElement; -} - -/** - * @public - */ -type ForwardRefComponent = { - readonly $$typeof: symbol; -} & ((props: PropsWithoutRef

& RefAttributes) => JSX.Element); -type AttributesWithoutMotionProps = { - [K in Exclude]?: Attributes[K]; -}; -/** - * @public - */ -type HTMLMotionProps = AttributesWithoutMotionProps & MotionProps; - -interface SVGAttributesWithoutMotionProps extends Pick, Exclude, keyof MotionProps>> { -} -/** - * Blanket-accept any SVG attribute as a `MotionValue` - * @public - */ -type SVGAttributesAsMotionValues = MakeMotion>; -/** - * @public - */ -interface SVGMotionProps extends SVGAttributesAsMotionValues, MotionProps { -} - -/** - * HTML components - */ -declare const MotionA: ForwardRefComponent>; -declare const MotionAbbr: ForwardRefComponent>; -declare const MotionAddress: ForwardRefComponent>; -declare const MotionArea: ForwardRefComponent>; -declare const MotionArticle: ForwardRefComponent>; -declare const MotionAside: ForwardRefComponent>; -declare const MotionAudio: ForwardRefComponent>; -declare const MotionB: ForwardRefComponent>; -declare const MotionBase: ForwardRefComponent>; -declare const MotionBdi: ForwardRefComponent>; -declare const MotionBdo: ForwardRefComponent>; -declare const MotionBig: ForwardRefComponent>; -declare const MotionBlockquote: ForwardRefComponent>; -declare const MotionBody: ForwardRefComponent>; -declare const MotionButton: ForwardRefComponent>; -declare const MotionCanvas: ForwardRefComponent>; -declare const MotionCaption: ForwardRefComponent>; -declare const MotionCite: ForwardRefComponent>; -declare const MotionCode: ForwardRefComponent>; -declare const MotionCol: ForwardRefComponent>; -declare const MotionColgroup: ForwardRefComponent>; -declare const MotionData: ForwardRefComponent>; -declare const MotionDatalist: ForwardRefComponent>; -declare const MotionDd: ForwardRefComponent>; -declare const MotionDel: ForwardRefComponent>; -declare const MotionDetails: ForwardRefComponent>; -declare const MotionDfn: ForwardRefComponent>; -declare const MotionDialog: ForwardRefComponent>; -declare const MotionDiv: ForwardRefComponent>; -declare const MotionDl: ForwardRefComponent>; -declare const MotionDt: ForwardRefComponent>; -declare const MotionEm: ForwardRefComponent>; -declare const MotionEmbed: ForwardRefComponent>; -declare const MotionFieldset: ForwardRefComponent>; -declare const MotionFigcaption: ForwardRefComponent>; -declare const MotionFigure: ForwardRefComponent>; -declare const MotionFooter: ForwardRefComponent>; -declare const MotionForm: ForwardRefComponent>; -declare const MotionH1: ForwardRefComponent>; -declare const MotionH2: ForwardRefComponent>; -declare const MotionH3: ForwardRefComponent>; -declare const MotionH4: ForwardRefComponent>; -declare const MotionH5: ForwardRefComponent>; -declare const MotionH6: ForwardRefComponent>; -declare const MotionHead: ForwardRefComponent>; -declare const MotionHeader: ForwardRefComponent>; -declare const MotionHgroup: ForwardRefComponent>; -declare const MotionHr: ForwardRefComponent>; -declare const MotionHtml: ForwardRefComponent>; -declare const MotionI: ForwardRefComponent>; -declare const MotionIframe: ForwardRefComponent>; -declare const MotionImg: ForwardRefComponent>; -declare const MotionInput: ForwardRefComponent>; -declare const MotionIns: ForwardRefComponent>; -declare const MotionKbd: ForwardRefComponent>; -declare const MotionKeygen: ForwardRefComponent>; -declare const MotionLabel: ForwardRefComponent>; -declare const MotionLegend: ForwardRefComponent>; -declare const MotionLi: ForwardRefComponent>; -declare const MotionLink: ForwardRefComponent>; -declare const MotionMain: ForwardRefComponent>; -declare const MotionMap: ForwardRefComponent>; -declare const MotionMark: ForwardRefComponent>; -declare const MotionMenu: ForwardRefComponent>; -declare const MotionMenuitem: ForwardRefComponent>; -declare const MotionMeter: ForwardRefComponent>; -declare const MotionNav: ForwardRefComponent>; -declare const MotionObject: ForwardRefComponent>; -declare const MotionOl: ForwardRefComponent>; -declare const MotionOptgroup: ForwardRefComponent>; -declare const MotionOption: ForwardRefComponent>; -declare const MotionOutput: ForwardRefComponent>; -declare const MotionP: ForwardRefComponent>; -declare const MotionParam: ForwardRefComponent>; -declare const MotionPicture: ForwardRefComponent>; -declare const MotionPre: ForwardRefComponent>; -declare const MotionProgress: ForwardRefComponent>; -declare const MotionQ: ForwardRefComponent>; -declare const MotionRp: ForwardRefComponent>; -declare const MotionRt: ForwardRefComponent>; -declare const MotionRuby: ForwardRefComponent>; -declare const MotionS: ForwardRefComponent>; -declare const MotionSamp: ForwardRefComponent>; -declare const MotionScript: ForwardRefComponent>; -declare const MotionSection: ForwardRefComponent>; -declare const MotionSelect: ForwardRefComponent>; -declare const MotionSmall: ForwardRefComponent>; -declare const MotionSource: ForwardRefComponent>; -declare const MotionSpan: ForwardRefComponent>; -declare const MotionStrong: ForwardRefComponent>; -declare const MotionStyle: ForwardRefComponent>; -declare const MotionSub: ForwardRefComponent>; -declare const MotionSummary: ForwardRefComponent>; -declare const MotionSup: ForwardRefComponent>; -declare const MotionTable: ForwardRefComponent>; -declare const MotionTbody: ForwardRefComponent>; -declare const MotionTd: ForwardRefComponent>; -declare const MotionTextarea: ForwardRefComponent>; -declare const MotionTfoot: ForwardRefComponent>; -declare const MotionTh: ForwardRefComponent>; -declare const MotionThead: ForwardRefComponent>; -declare const MotionTime: ForwardRefComponent>; -declare const MotionTitle: ForwardRefComponent>; -declare const MotionTr: ForwardRefComponent>; -declare const MotionTrack: ForwardRefComponent>; -declare const MotionU: ForwardRefComponent>; -declare const MotionUl: ForwardRefComponent>; -declare const MotionVideo: ForwardRefComponent>; -declare const MotionWbr: ForwardRefComponent>; -declare const MotionWebview: ForwardRefComponent>; -/** - * SVG components - */ -declare const MotionAnimate: ForwardRefComponent>; -declare const MotionCircle: ForwardRefComponent>; -declare const MotionDefs: ForwardRefComponent>; -declare const MotionDesc: ForwardRefComponent>; -declare const MotionEllipse: ForwardRefComponent>; -declare const MotionG: ForwardRefComponent>; -declare const MotionImage: ForwardRefComponent>; -declare const MotionLine: ForwardRefComponent>; -declare const MotionFilter: ForwardRefComponent>; -declare const MotionMarker: ForwardRefComponent>; -declare const MotionMask: ForwardRefComponent>; -declare const MotionMetadata: ForwardRefComponent>; -declare const MotionPath: ForwardRefComponent>; -declare const MotionPattern: ForwardRefComponent>; -declare const MotionPolygon: ForwardRefComponent>; -declare const MotionPolyline: ForwardRefComponent>; -declare const MotionRect: ForwardRefComponent>; -declare const MotionStop: ForwardRefComponent>; -declare const MotionSvg: ForwardRefComponent>; -declare const MotionSymbol: ForwardRefComponent>; -declare const MotionText: ForwardRefComponent>; -declare const MotionTspan: ForwardRefComponent>; -declare const MotionUse: ForwardRefComponent>; -declare const MotionView: ForwardRefComponent>; -declare const MotionClipPath: ForwardRefComponent>; -declare const MotionFeBlend: ForwardRefComponent>; -declare const MotionFeColorMatrix: ForwardRefComponent>; -declare const MotionFeComponentTransfer: ForwardRefComponent>; -declare const MotionFeComposite: ForwardRefComponent>; -declare const MotionFeConvolveMatrix: ForwardRefComponent>; -declare const MotionFeDiffuseLighting: ForwardRefComponent>; -declare const MotionFeDisplacementMap: ForwardRefComponent>; -declare const MotionFeDistantLight: ForwardRefComponent>; -declare const MotionFeDropShadow: ForwardRefComponent>; -declare const MotionFeFlood: ForwardRefComponent>; -declare const MotionFeFuncA: ForwardRefComponent>; -declare const MotionFeFuncB: ForwardRefComponent>; -declare const MotionFeFuncG: ForwardRefComponent>; -declare const MotionFeFuncR: ForwardRefComponent>; -declare const MotionFeGaussianBlur: ForwardRefComponent>; -declare const MotionFeImage: ForwardRefComponent>; -declare const MotionFeMerge: ForwardRefComponent>; -declare const MotionFeMergeNode: ForwardRefComponent>; -declare const MotionFeMorphology: ForwardRefComponent>; -declare const MotionFeOffset: ForwardRefComponent>; -declare const MotionFePointLight: ForwardRefComponent>; -declare const MotionFeSpecularLighting: ForwardRefComponent>; -declare const MotionFeSpotLight: ForwardRefComponent>; -declare const MotionFeTile: ForwardRefComponent>; -declare const MotionFeTurbulence: ForwardRefComponent>; -declare const MotionForeignObject: ForwardRefComponent>; -declare const MotionLinearGradient: ForwardRefComponent>; -declare const MotionRadialGradient: ForwardRefComponent>; -declare const MotionTextPath: ForwardRefComponent>; - -export { MotionA as a, MotionAbbr as abbr, MotionAddress as address, MotionAnimate as animate, MotionArea as area, MotionArticle as article, MotionAside as aside, MotionAudio as audio, MotionB as b, MotionBase as base, MotionBdi as bdi, MotionBdo as bdo, MotionBig as big, MotionBlockquote as blockquote, MotionBody as body, MotionButton as button, MotionCanvas as canvas, MotionCaption as caption, MotionCircle as circle, MotionCite as cite, MotionClipPath as clipPath, MotionCode as code, MotionCol as col, MotionColgroup as colgroup, MotionData as data, MotionDatalist as datalist, MotionDd as dd, MotionDefs as defs, MotionDel as del, MotionDesc as desc, MotionDetails as details, MotionDfn as dfn, MotionDialog as dialog, MotionDiv as div, MotionDl as dl, MotionDt as dt, MotionEllipse as ellipse, MotionEm as em, MotionEmbed as embed, MotionFeBlend as feBlend, MotionFeColorMatrix as feColorMatrix, MotionFeComponentTransfer as feComponentTransfer, MotionFeComposite as feComposite, MotionFeConvolveMatrix as feConvolveMatrix, MotionFeDiffuseLighting as feDiffuseLighting, MotionFeDisplacementMap as feDisplacementMap, MotionFeDistantLight as feDistantLight, MotionFeDropShadow as feDropShadow, MotionFeFlood as feFlood, MotionFeFuncA as feFuncA, MotionFeFuncB as feFuncB, MotionFeFuncG as feFuncG, MotionFeFuncR as feFuncR, MotionFeGaussianBlur as feGaussianBlur, MotionFeImage as feImage, MotionFeMerge as feMerge, MotionFeMergeNode as feMergeNode, MotionFeMorphology as feMorphology, MotionFeOffset as feOffset, MotionFePointLight as fePointLight, MotionFeSpecularLighting as feSpecularLighting, MotionFeSpotLight as feSpotLight, MotionFeTile as feTile, MotionFeTurbulence as feTurbulence, MotionFieldset as fieldset, MotionFigcaption as figcaption, MotionFigure as figure, MotionFilter as filter, MotionFooter as footer, MotionForeignObject as foreignObject, MotionForm as form, MotionG as g, MotionH1 as h1, MotionH2 as h2, MotionH3 as h3, MotionH4 as h4, MotionH5 as h5, MotionH6 as h6, MotionHead as head, MotionHeader as header, MotionHgroup as hgroup, MotionHr as hr, MotionHtml as html, MotionI as i, MotionIframe as iframe, MotionImage as image, MotionImg as img, MotionInput as input, MotionIns as ins, MotionKbd as kbd, MotionKeygen as keygen, MotionLabel as label, MotionLegend as legend, MotionLi as li, MotionLine as line, MotionLinearGradient as linearGradient, MotionLink as link, MotionMain as main, MotionMap as map, MotionMark as mark, MotionMarker as marker, MotionMask as mask, MotionMenu as menu, MotionMenuitem as menuitem, MotionMetadata as metadata, MotionMeter as meter, MotionNav as nav, MotionObject as object, MotionOl as ol, MotionOptgroup as optgroup, MotionOption as option, MotionOutput as output, MotionP as p, MotionParam as param, MotionPath as path, MotionPattern as pattern, MotionPicture as picture, MotionPolygon as polygon, MotionPolyline as polyline, MotionPre as pre, MotionProgress as progress, MotionQ as q, MotionRadialGradient as radialGradient, MotionRect as rect, MotionRp as rp, MotionRt as rt, MotionRuby as ruby, MotionS as s, MotionSamp as samp, MotionScript as script, MotionSection as section, MotionSelect as select, MotionSmall as small, MotionSource as source, MotionSpan as span, MotionStop as stop, MotionStrong as strong, MotionStyle as style, MotionSub as sub, MotionSummary as summary, MotionSup as sup, MotionSvg as svg, MotionSymbol as symbol, MotionTable as table, MotionTbody as tbody, MotionTd as td, MotionText as text, MotionTextPath as textPath, MotionTextarea as textarea, MotionTfoot as tfoot, MotionTh as th, MotionThead as thead, MotionTime as time, MotionTitle as title, MotionTr as tr, MotionTrack as track, MotionTspan as tspan, MotionU as u, MotionUl as ul, MotionUse as use, MotionVideo as video, MotionView as view, MotionWbr as wbr, MotionWebview as webview }; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/debug.d.ts b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/debug.d.ts deleted file mode 100644 index a4901bc1..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/debug.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from 'motion-dom'; -export { recordStats } from 'motion-dom'; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom-mini.d.ts b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom-mini.d.ts deleted file mode 100644 index 36f39d81..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom-mini.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { UnresolvedValueKeyframe, AnimationOptions, MotionValue, Transition, ElementOrSelector, DOMKeyframesDefinition, AnimationPlaybackOptions, GroupAnimationWithThen, AnimationPlaybackControlsWithThen } from 'motion-dom'; - -/** - * Lifecycle callbacks are not supported on individual sequence segments - * because segments are consolidated into a single animation per subject. - * Use sequence-level options (e.g. SequenceOptions.onComplete) instead. - */ -type LifecycleCallbacks = "onUpdate" | "onPlay" | "onComplete" | "onRepeat" | "onStop"; -/** - * Distributive Omit preserves union branches (unlike plain Omit). - */ -type DistributiveOmit = T extends any ? Omit : never; -type SegmentTransitionOptions = DistributiveOmit & At; -type SegmentValueTransitionOptions = DistributiveOmit & At; -type ObjectTarget = { - [K in keyof O]?: O[K] | UnresolvedValueKeyframe[]; -}; -type SequenceTime = number | "<" | `+${number}` | `-${number}` | `${string}`; -type SequenceLabel = string; -interface SequenceLabelWithTime { - name: SequenceLabel; - at: SequenceTime; -} -interface At { - at?: SequenceTime; -} -type MotionValueSegment = [ - MotionValue, - UnresolvedValueKeyframe | UnresolvedValueKeyframe[] -]; -type MotionValueSegmentWithTransition = [ - MotionValue, - UnresolvedValueKeyframe | UnresolvedValueKeyframe[], - SegmentValueTransitionOptions -]; -type DOMSegment = [ElementOrSelector, DOMKeyframesDefinition]; -type DOMSegmentWithTransition = [ - ElementOrSelector, - DOMKeyframesDefinition, - SegmentTransitionOptions -]; -type ObjectSegment = [O, ObjectTarget]; -type ObjectSegmentWithTransition = [ - O, - ObjectTarget, - SegmentTransitionOptions -]; -type SequenceProgressCallback = (value: any) => void; -type FunctionSegment = [SequenceProgressCallback] | [SequenceProgressCallback, SegmentTransitionOptions] | [ - SequenceProgressCallback, - UnresolvedValueKeyframe | UnresolvedValueKeyframe[], - SegmentTransitionOptions -]; -type Segment = ObjectSegment | ObjectSegmentWithTransition | SequenceLabel | SequenceLabelWithTime | MotionValueSegment | MotionValueSegmentWithTransition | DOMSegment | DOMSegmentWithTransition | FunctionSegment; -type AnimationSequence = Segment[]; -interface SequenceOptions extends AnimationPlaybackOptions { - delay?: number; - duration?: number; - defaultTransition?: Transition; - reduceMotion?: boolean; - skipAnimations?: boolean; - onComplete?: () => void; -} - -declare function animateSequence(definition: AnimationSequence, options?: SequenceOptions): GroupAnimationWithThen; - -declare const animateMini: (elementOrSelector: ElementOrSelector, keyframes: DOMKeyframesDefinition, options?: AnimationOptions) => AnimationPlaybackControlsWithThen; - -export { animateMini as animate, animateSequence }; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom-mini.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom-mini.js deleted file mode 100644 index 61a02285..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom-mini.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function n(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let i=()=>{},s=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(i=(t,e,i)=>{t||"undefined"==typeof console||console.warn(n(e,i))},s=(t,e,i)=>{if(!t)throw new Error(n(e,i))});const o=t=>t,a=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1},r=t=>1e3*t,l=t=>t/1e3;function u(t,e){return n=t,Array.isArray(n)&&"number"!=typeof n[0]?t[((t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t})(0,t.length,e)]:t;var n}const h=(t,e,n)=>t+(e-t)*n,c=2e4;function f(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(function(t){let e=0,n=t.next(e);for(;!n.done&&e=c?1/0:e}(i),c);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:l(s)}}function d(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=a(0,e,i);t.push(h(n,1,s))}}function m(t){const e=[0];return d(e,t.length-1),e}const p=t=>null!==t;class g{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}function y(t){for(let e=1;et.startsWith("--");const T={};function b(t,e){const n=function(t){let e;return()=>(void 0===e&&(e=t()),e)}(t);return()=>T[e]??n()}const v=b(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),S=b(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),k=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,E={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:k([0,.65,.55,1]),circOut:k([.55,0,1,.45]),backIn:k([.31,.01,.66,-.59]),backOut:k([.33,1.53,.69,.99])};function w(t,e){return t?"function"==typeof t?S()?((t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;eArray.isArray(t)&&"number"==typeof t[0])(t)?k(t):Array.isArray(t)?t.map(t=>w(t,e)||E.easeOut):E[t]:void 0}function M(t){return"function"==typeof t&&"applyToOptions"in t}class B extends g{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:r,onComplete:l}=t;this.isPseudoElement=Boolean(o),this.allowFlatten=a,this.options=t,s("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=function({type:t,...e}){return M(t)&&S()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:r="easeOut",times:l}={},u){const h={[e]:n};l&&(h.offset=l);const c=w(r,s);Array.isArray(c)&&(h.easing=c);const f={delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(h,f)}(e,n,i,u,o),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=function(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(p),a=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return a&&void 0!==i?i:o[a]}(i,this.options,r,this.speed);this.updateMotionValue&&this.updateMotionValue(t),function(t,e,n){A(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return l(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+l(t)}get time(){return l(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=r(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&v()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),o):i(this)}}class x{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return I(this.animations,"duration")}get iterationDuration(){return I(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function I(t,e){let n=0;for(let i=0;in&&(n=s)}return n}class O extends x{then(t,e){return this.finished.finally(t).then(()=>{})}}const F=new WeakMap,R=(t,e="")=>`${t}:${e}`;function W(t){let e=F.get(t);return e||(e=new Map,F.set(t,e)),e}function $(t,e){const n=t?.[e]??t?.default??t;return n!==t?function(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}(n,t):n}const P=t=>Boolean(t&&t.getVelocity),N=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function V(t,e){for(let n=0;nnull!=t)}function D(t,e){const n=window.getComputedStyle(t);return A(e)?n.getPropertyValue(e):n[e]}function q(t,e,n,i){return null==t?[]:"string"==typeof t&&function(t){return"object"==typeof t&&!Array.isArray(t)}(e)?L(t,0,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function C(t,e,n){return t*(e+1)+n*e}function K(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function _(t,n,i,s,o,a){!function(t,n,i){for(let s=0;sn&&o.at"number"==typeof t,J=t=>t.every(G);function Q(t,e,n,i){if(null==t)return[];const o=L(t),a=o.length;s(Boolean(a),"No valid elements provided.","no-valid-elements");const l=[];for(let t=0;te.delete(n)),u.push(s)}return u}const Z=(()=>function(t,e,n){return new O(Q(t,e,n))})();t.animate=Z,t.animateSequence=function(t,e){const n=[];return function(t,{defaultTransition:e={},...n}={},s,o){const l=e.duration||.3,h=new Map,c=new Map,p={},g=new Map;let y=0,A=0,T=0;for(let n=0;n{const c=X(t),{delay:p=0,times:g=m(c),type:y=e.type||"keyframes",repeat:b,repeatType:S,repeatDelay:k=0,...E}=n;let{ease:w=e.ease||"easeOut",duration:B}=n;const x="function"==typeof p?p(a,h):p,I=c.length,O=M(y)?y:o?.[y||"keyframes"];if(I<=2&&O){let t=100;if(2===I&&J(c)){const e=c[1]-c[0];t=Math.abs(e)}const n={...e,...E};void 0!==B&&(n.duration=r(B));const i=f(n,t,O);w=i.ease,B=i.duration}B??(B=l);const F=A+x;1===g.length&&0===g[0]&&(g[1]=1);const R=g.length-c.length;if(R>0&&d(g,R),1===c.length&&c.unshift(null),b&&i(b<20,`Sequence segments can't repeat ${b} times — ignoring repeat option. Use a value below 20 or apply repeat at the sequence level instead.`),b&&b<20){const t=B>0?k/B:0;B=C(B,b,k);const e=[...c],n=[...g];w=Array.isArray(w)?[...w]:[w];const i=[...w],s="reverse"===S||"mirror"===S;let o=e,a=i;s&&(o=[...e].reverse(),"reverse"===S&&(a=[...i].reverse().map(t=>{return"function"==typeof t?(e=t,t=>1-e(1-t)):t;var e})));for(let r=0;r0&&(c.push(c[c.length-1]),g.push(d),w.push("linear")),c.push(...h);for(let t=0;t{for(const s in t){const o=t[s];o.sort(z);const r=[],l=[],u=[];for(let t=0;t{n.push(...Q(i,t,e))}),new O(n)}}); diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom.d.ts b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom.d.ts deleted file mode 100644 index 52de5ea6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom.d.ts +++ /dev/null @@ -1,304 +0,0 @@ -import { AnyResolvedKeyframe, UnresolvedValueKeyframe, AnimationOptions, MotionValue, Transition, ElementOrSelector, DOMKeyframesDefinition, AnimationPlaybackOptions, AnimationPlaybackControlsWithThen, ValueAnimationTransition, AnimationScope, AnimationPlaybackControls } from 'motion-dom'; -export * from 'motion-dom'; -export { DelayedFunction, delayInSeconds as delay } from 'motion-dom'; -import { Easing, EasingFunction, Point } from 'motion-utils'; -export * from 'motion-utils'; - -/** - * Lifecycle callbacks are not supported on individual sequence segments - * because segments are consolidated into a single animation per subject. - * Use sequence-level options (e.g. SequenceOptions.onComplete) instead. - */ -type LifecycleCallbacks = "onUpdate" | "onPlay" | "onComplete" | "onRepeat" | "onStop"; -/** - * Distributive Omit preserves union branches (unlike plain Omit). - */ -type DistributiveOmit = T extends any ? Omit : never; -type SegmentTransitionOptions = DistributiveOmit & At; -type SegmentValueTransitionOptions = DistributiveOmit & At; -type ObjectTarget = { - [K in keyof O]?: O[K] | UnresolvedValueKeyframe[]; -}; -type SequenceTime = number | "<" | `+${number}` | `-${number}` | `${string}`; -type SequenceLabel = string; -interface SequenceLabelWithTime { - name: SequenceLabel; - at: SequenceTime; -} -interface At { - at?: SequenceTime; -} -type MotionValueSegment = [ - MotionValue, - UnresolvedValueKeyframe | UnresolvedValueKeyframe[] -]; -type MotionValueSegmentWithTransition = [ - MotionValue, - UnresolvedValueKeyframe | UnresolvedValueKeyframe[], - SegmentValueTransitionOptions -]; -type DOMSegment = [ElementOrSelector, DOMKeyframesDefinition]; -type DOMSegmentWithTransition = [ - ElementOrSelector, - DOMKeyframesDefinition, - SegmentTransitionOptions -]; -type ObjectSegment = [O, ObjectTarget]; -type ObjectSegmentWithTransition = [ - O, - ObjectTarget, - SegmentTransitionOptions -]; -type SequenceProgressCallback = (value: any) => void; -type FunctionSegment = [SequenceProgressCallback] | [SequenceProgressCallback, SegmentTransitionOptions] | [ - SequenceProgressCallback, - UnresolvedValueKeyframe | UnresolvedValueKeyframe[], - SegmentTransitionOptions -]; -type Segment = ObjectSegment | ObjectSegmentWithTransition | SequenceLabel | SequenceLabelWithTime | MotionValueSegment | MotionValueSegmentWithTransition | DOMSegment | DOMSegmentWithTransition | FunctionSegment; -type AnimationSequence = Segment[]; -interface SequenceOptions extends AnimationPlaybackOptions { - delay?: number; - duration?: number; - defaultTransition?: Transition; - reduceMotion?: boolean; - skipAnimations?: boolean; - onComplete?: () => void; -} -interface AbsoluteKeyframe { - value: AnyResolvedKeyframe | null; - at: number; - easing?: Easing; -} -type ValueSequence = AbsoluteKeyframe[]; -interface SequenceMap { - [key: string]: ValueSequence; -} -type ResolvedAnimationDefinition = { - keyframes: { - [key: string]: UnresolvedValueKeyframe[]; - }; - transition: { - [key: string]: Transition; - }; -}; -type ResolvedAnimationDefinitions = Map; - -interface ScopedAnimateOptions { - scope?: AnimationScope; - reduceMotion?: boolean; - skipAnimations?: boolean; -} -/** - * Creates an animation function that is optionally scoped - * to a specific element. - */ -declare function createScopedAnimate(options?: ScopedAnimateOptions): { - (sequence: AnimationSequence, options?: SequenceOptions): AnimationPlaybackControlsWithThen; - (value: string | MotionValue, keyframes: string | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (value: number | MotionValue, keyframes: number | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (value: V | MotionValue, keyframes: V | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (element: ElementOrSelector, keyframes: DOMKeyframesDefinition, options?: AnimationOptions): AnimationPlaybackControlsWithThen; - (object: O | O[], keyframes: ObjectTarget, options?: AnimationOptions): AnimationPlaybackControlsWithThen; -}; -declare const animate: { - (sequence: AnimationSequence, options?: SequenceOptions): AnimationPlaybackControlsWithThen; - (value: string | MotionValue, keyframes: string | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (value: number | MotionValue, keyframes: number | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (value: V | MotionValue, keyframes: V | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (element: ElementOrSelector, keyframes: DOMKeyframesDefinition, options?: AnimationOptions): AnimationPlaybackControlsWithThen; - (object: O | O[], keyframes: ObjectTarget, options?: AnimationOptions): AnimationPlaybackControlsWithThen; -}; - -declare const animateMini: (elementOrSelector: ElementOrSelector, keyframes: DOMKeyframesDefinition, options?: AnimationOptions) => AnimationPlaybackControlsWithThen; - -interface ScrollOptions { - source?: HTMLElement; - container?: Element; - target?: Element; - axis?: "x" | "y"; - offset?: ScrollOffset; -} -type OnScrollProgress = (progress: number) => void; -type OnScrollWithInfo = (progress: number, info: ScrollInfo) => void; -type OnScroll = OnScrollProgress | OnScrollWithInfo; -interface AxisScrollInfo { - current: number; - offset: number[]; - progress: number; - scrollLength: number; - velocity: number; - targetOffset: number; - targetLength: number; - containerLength: number; - interpolatorOffsets?: number[]; - interpolate?: EasingFunction; -} -interface ScrollInfo { - time: number; - x: AxisScrollInfo; - y: AxisScrollInfo; -} -type OnScrollInfo = (info: ScrollInfo) => void; -type SupportedEdgeUnit = "px" | "vw" | "vh" | "%"; -type EdgeUnit = `${number}${SupportedEdgeUnit}`; -type NamedEdges = "start" | "end" | "center"; -type EdgeString = NamedEdges | EdgeUnit | `${number}`; -type Edge = EdgeString | number; -type ProgressIntersection = [number, number]; -type Intersection = `${Edge} ${Edge}`; -type ScrollOffset = Array; -interface ScrollInfoOptions { - container?: Element; - target?: Element; - axis?: "x" | "y"; - offset?: ScrollOffset; - /** - * When true, enables per-frame checking of scrollWidth/scrollHeight - * to detect content size changes and recalculate scroll progress. - * - * @default false - */ - trackContentSize?: boolean; -} - -declare function scroll(onScroll: OnScroll | AnimationPlaybackControls, { axis, container, ...options }?: ScrollOptions): VoidFunction; - -declare function scrollInfo(onScroll: OnScrollInfo, { container, trackContentSize, ...options }?: ScrollInfoOptions): VoidFunction; - -type ViewChangeHandler = (entry: IntersectionObserverEntry) => void; -type MarginValue = `${number}${"px" | "%"}`; -type MarginType = MarginValue | `${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue} ${MarginValue}`; -interface InViewOptions { - root?: Element | Document; - margin?: MarginType; - amount?: "some" | "all" | number; -} -declare function inView(elementOrSelector: ElementOrSelector, onStart: (element: Element, entry: IntersectionObserverEntry) => void | ViewChangeHandler, { root, margin: rootMargin, amount }?: InViewOptions): VoidFunction; - -interface HTMLElements { - a: HTMLAnchorElement; - abbr: HTMLElement; - address: HTMLElement; - area: HTMLAreaElement; - article: HTMLElement; - aside: HTMLElement; - audio: HTMLAudioElement; - b: HTMLElement; - base: HTMLBaseElement; - bdi: HTMLElement; - bdo: HTMLElement; - big: HTMLElement; - blockquote: HTMLQuoteElement; - body: HTMLBodyElement; - br: HTMLBRElement; - button: HTMLButtonElement; - canvas: HTMLCanvasElement; - caption: HTMLElement; - center: HTMLElement; - cite: HTMLElement; - code: HTMLElement; - col: HTMLTableColElement; - colgroup: HTMLTableColElement; - data: HTMLDataElement; - datalist: HTMLDataListElement; - dd: HTMLElement; - del: HTMLModElement; - details: HTMLDetailsElement; - dfn: HTMLElement; - dialog: HTMLDialogElement; - div: HTMLDivElement; - dl: HTMLDListElement; - dt: HTMLElement; - em: HTMLElement; - embed: HTMLEmbedElement; - fieldset: HTMLFieldSetElement; - figcaption: HTMLElement; - figure: HTMLElement; - footer: HTMLElement; - form: HTMLFormElement; - h1: HTMLHeadingElement; - h2: HTMLHeadingElement; - h3: HTMLHeadingElement; - h4: HTMLHeadingElement; - h5: HTMLHeadingElement; - h6: HTMLHeadingElement; - head: HTMLHeadElement; - header: HTMLElement; - hgroup: HTMLElement; - hr: HTMLHRElement; - html: HTMLHtmlElement; - i: HTMLElement; - iframe: HTMLIFrameElement; - img: HTMLImageElement; - input: HTMLInputElement; - ins: HTMLModElement; - kbd: HTMLElement; - keygen: HTMLElement; - label: HTMLLabelElement; - legend: HTMLLegendElement; - li: HTMLLIElement; - link: HTMLLinkElement; - main: HTMLElement; - map: HTMLMapElement; - mark: HTMLElement; - menu: HTMLElement; - menuitem: HTMLElement; - meta: HTMLMetaElement; - meter: HTMLMeterElement; - nav: HTMLElement; - noindex: HTMLElement; - noscript: HTMLElement; - object: HTMLObjectElement; - ol: HTMLOListElement; - optgroup: HTMLOptGroupElement; - option: HTMLOptionElement; - output: HTMLOutputElement; - p: HTMLParagraphElement; - param: HTMLParamElement; - picture: HTMLElement; - pre: HTMLPreElement; - progress: HTMLProgressElement; - q: HTMLQuoteElement; - rp: HTMLElement; - rt: HTMLElement; - ruby: HTMLElement; - s: HTMLElement; - samp: HTMLElement; - search: HTMLElement; - slot: HTMLSlotElement; - script: HTMLScriptElement; - section: HTMLElement; - select: HTMLSelectElement; - small: HTMLElement; - source: HTMLSourceElement; - span: HTMLSpanElement; - strong: HTMLElement; - style: HTMLStyleElement; - sub: HTMLElement; - summary: HTMLElement; - sup: HTMLElement; - table: HTMLTableElement; - template: HTMLTemplateElement; - tbody: HTMLTableSectionElement; - td: HTMLTableDataCellElement; - textarea: HTMLTextAreaElement; - tfoot: HTMLTableSectionElement; - th: HTMLTableHeaderCellElement; - thead: HTMLTableSectionElement; - time: HTMLTimeElement; - title: HTMLTitleElement; - tr: HTMLTableRowElement; - track: HTMLTrackElement; - u: HTMLElement; - ul: HTMLUListElement; - var: HTMLElement; - video: HTMLVideoElement; - wbr: HTMLElement; - webview: HTMLWebViewElement; -} - -declare const distance: (a: number, b: number) => number; -declare function distance2D(a: Point, b: Point): number; - -export { type AbsoluteKeyframe, type AnimationSequence, type At, type DOMSegment, type DOMSegmentWithTransition, type FunctionSegment, type HTMLElements, type MotionValueSegment, type MotionValueSegmentWithTransition, type ObjectSegment, type ObjectSegmentWithTransition, type ObjectTarget, type ResolvedAnimationDefinition, type ResolvedAnimationDefinitions, type Segment, type SegmentTransitionOptions, type SegmentValueTransitionOptions, type SequenceLabel, type SequenceLabelWithTime, type SequenceMap, type SequenceOptions, type SequenceProgressCallback, type SequenceTime, type ValueSequence, animate, animateMini, createScopedAnimate, distance, distance2D, inView, scroll, scrollInfo }; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom.js deleted file mode 100644 index 72b55256..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/dom.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(s(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(s(e,n))});const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>"object"==typeof t&&null!==t,l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(...t)=>t.reduce((t,e)=>n=>e(t(n))),d=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class p{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s1e3*t,f=t=>t/1e3,y=(t,e)=>e?t*(1e3/e):0,g=new Set;const v=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},x=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function T(t,e,n,i){if(t===e&&n===i)return u;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=x(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:x(s(t),e,i)}const w=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,b=t=>e=>1-t(1-e),S=T(.33,1.53,.69,.99),A=b(S),V=w(A),P=t=>t>=1?1:(t*=2)<1?.5*A(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),M=b(E),k=w(E),D=T(.42,0,1,1),R=T(0,0,.58,1),B=T(.42,0,.58,1);const C=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return C(t)?t[v(0,t.length,e)]:t}const L=t=>Array.isArray(t)&&"number"==typeof t[0],O={linear:u,easeIn:D,easeInOut:B,easeOut:R,circIn:E,circInOut:k,circOut:M,backIn:A,backInOut:V,backOut:S,anticipate:P},F=e=>{if(L(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return T(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==O[e],`Invalid easing type '${e}'`,"invalid-easing-type"),O[e]):e},I=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],W={value:null,addProjectionMetrics:null};function N(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=I.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(c),e&&W.value&&W.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(t))}};return u}(r,e?n:void 0),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,y=()=>{const r=o.useManualTiming,a=r?s.timestamp:performance.now();n=!1,r||(s.delta=i?1e3/60:Math.max(Math.min(a-s.timestamp,40),1)),s.timestamp=a,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),m.process(s),f.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))};return{schedule:I.reduce((e,o)=>{const r=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(y)),r.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e(void 0===Y&&H.set(z.isProcessing||o.useManualTiming?z.timestamp:performance.now()),Y),set:t=>{Y=t,queueMicrotask(X)}},G={layout:0,mainThread:0,waapi:0},q=t=>e=>"string"==typeof e&&e.startsWith(t),Z=q("--"),_=q("var(--"),J=t=>!!_(t)&&Q.test(t.split("/*")[0].trim()),Q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function tt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const et={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},nt={...et,transform:t=>i(0,1,t)},it={...et,default:1},st=t=>Math.round(1e5*t)/1e5,ot=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const rt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,at=(t,e)=>n=>Boolean("string"==typeof n&&rt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),lt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(ot);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},ct={...et,transform:t=>Math.round((t=>i(0,255,t))(t))},ut={test:at("rgb","red"),parse:lt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ct.transform(t)+", "+ct.transform(e)+", "+ct.transform(n)+", "+st(nt.transform(i))+")"};const ht={test:at("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:ut.transform},dt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),pt=dt("deg"),mt=dt("%"),ft=dt("px"),yt=dt("vh"),gt=dt("vw"),vt=(()=>({...mt,parse:t=>mt.parse(t)/100,transform:t=>mt.transform(100*t)}))(),xt={test:at("hsl","hue"),parse:lt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+mt.transform(st(e))+", "+mt.transform(st(n))+", "+st(nt.transform(i))+")"},Tt={test:t=>ut.test(t)||ht.test(t)||xt.test(t),parse:t=>ut.test(t)?ut.parse(t):xt.test(t)?xt.parse(t):ht.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ut.transform(t):xt.transform(t),getAnimatableNone:t=>{const e=Tt.parse(t);return e.alpha=0,Tt.transform(e)}},wt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const bt="number",St="color",At=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Vt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(At,t=>(Tt.test(t)?(i.color.push(o),s.push(St),n.push(Tt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(bt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Pt({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:Tt.test(n)?Tt.getAnimatableNone(n):n;var n};const Mt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(ot)?.length||0)+(t.match(wt)?.length||0)>0},parse:function(t){return Vt(t).values},createTransformer:function(t){return Pt(Vt(t))},getAnimatableNone:function(t){const e=Vt(t);return Pt(e)(e.values.map((t,n)=>Et(t,e.split[n])))}};function kt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Dt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=kt(a,i,t+1/3),o=kt(a,i,t),r=kt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Rt(t,e){return n=>n>0?e:t}const Bt=(t,e,n)=>t+(e-t)*n,Ct=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},jt=[ht,ut,xt];function Lt(e){const n=(i=e,jt.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(e);return n===xt&&(s=Dt(s)),s}const Ot=(t,e)=>{const n=Lt(t),i=Lt(e);if(!n||!i)return Rt(t,e);const s={...n};return t=>(s.red=Ct(n.red,i.red,t),s.green=Ct(n.green,i.green,t),s.blue=Ct(n.blue,i.blue,t),s.alpha=Bt(n.alpha,i.alpha,t),ut.transform(s))},Ft=new Set(["none","hidden"]);function It(t,e){return Ft.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Wt(t,e){return n=>Bt(t,e,n)}function Nt(t){return"number"==typeof t?Wt:"string"==typeof t?J(t)?Rt:Tt.test(t)?Ot:zt:Array.isArray(t)?Ut:"object"==typeof t?Tt.test(t)?Ot:$t:Rt}function Ut(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Nt(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in i)n[e]=i[e](t);return n}}const zt=(e,n)=>{const i=Mt.createTransformer(n),s=Vt(e),o=Vt(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Ft.has(e)&&!o.values.length||Ft.has(n)&&!s.values.length?It(e,n):h(Ut(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>U.update(e,t),stop:()=>$(e),now:()=>z.isProcessing?z.timestamp:H.now()}},Xt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e=Ht?1/0:e}function qt(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Gt(i),Ht);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:f(s)}}const Zt=100,_t=10,Jt=1,Qt=0,te=800,ee=.3,ne=.3,ie={granular:.01,default:2},se={granular:.005,default:.5},oe=.01,re=10,ae=.05,le=1;function ce(t,e){return t*Math.sqrt(1-e*e)}const ue=.001;const he=["duration","bounce"],de=["stiffness","damping","mass"];function pe(t,e){return e.some(e=>void 0!==t[e])}function me(e){let n={velocity:Qt,stiffness:Zt,damping:_t,mass:Jt,isResolvedFromDuration:!1,...e};if(!pe(e,de)&&pe(e,he))if(n.velocity=0,e.visualDuration){const t=e.visualDuration,s=2*Math.PI/(1.2*t),o=s*s,r=2*i(.05,1,1-(e.bounce||0))*Math.sqrt(o);n={...n,mass:Jt,stiffness:o,damping:r}}else{const s=function({duration:e=te,bounce:n=ee,velocity:s=Qt,mass:o=Jt}){let r,a;t.warning(e<=m(re),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=i(ae,le,l),e=i(oe,re,f(e)),l<1?(r=t=>{const n=t*l,i=n*e,o=n-s,r=ce(t,l),a=Math.exp(-i);return ue-o/r*a},a=t=>{const n=t*l*e,i=n*s+s,o=Math.pow(l,2)*Math.pow(t,2)*e,a=Math.exp(-n),c=ce(Math.pow(t,2),l);return(-r(t)+ue>0?-1:1)*((i-o)*a)/c}):(r=t=>Math.exp(-t*e)*((t-s)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(s-t)));const c=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(r,a,5/e);if(e=m(e),isNaN(c))return{stiffness:Zt,damping:_t,duration:e};{const t=Math.pow(c,2)*o;return{stiffness:t,damping:2*l*Math.sqrt(o*t),duration:e}}}({...e,velocity:0});n={...n,...s,mass:Jt},n.isResolvedFromDuration=!0}return n}function fe(t=ne,e=ee){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:p}=me({...n,velocity:-f(n.velocity||0)}),y=d||0,g=c/(2*Math.sqrt(l*u)),v=r-o,x=f(Math.sqrt(l/u)),T=Math.abs(v)<5;let w,b,S,A,V,P;if(i||(i=T?ie.granular:ie.default),s||(s=T?se.granular:se.default),g<1)S=ce(x,g),A=(y+g*x*v)/S,w=t=>{const e=Math.exp(-g*x*t);return r-e*(A*Math.sin(S*t)+v*Math.cos(S*t))},V=g*x*A+v*S,P=g*x*v-A*S,b=t=>Math.exp(-g*x*t)*(V*Math.sin(S*t)+P*Math.cos(S*t));else if(1===g){w=t=>r-Math.exp(-x*t)*(v+(y+x*v)*t);const t=y+x*v;b=e=>Math.exp(-x*e)*(x*t*e-y)}else{const t=x*Math.sqrt(g*g-1);w=e=>{const n=Math.exp(-g*x*e),i=Math.min(t*e,300);return r-n*((y+g*x*v)*Math.sinh(i)+t*v*Math.cosh(i))/t};const e=(y+g*x*v)/t,n=g*x*e-v*t,i=g*x*v-e*t;b=e=>{const s=Math.exp(-g*x*e),o=Math.min(t*e,300);return s*(n*Math.sinh(o)+i*Math.cosh(o))}}const E={calculatedDuration:p&&h||null,velocity:t=>m(b(t)),next:t=>{if(!p&&g<1){const e=Math.exp(-g*x*t),n=Math.sin(S*t),o=Math.cos(S*t),l=r-e*(A*n+v*o),c=m(e*(V*n+P*o));return a.done=Math.abs(c)<=i&&Math.abs(r-l)<=s,a.value=a.done?r:l,a}const e=w(t);if(p)a.done=t>=h;else{const n=m(b(t));a.done=Math.abs(n)<=i&&Math.abs(r-e)<=s}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(Gt(E),Ht),e=Xt(e=>E.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return E}fe.applyToOptions=t=>{const e=qt(t,100,fe);return t.ease=e.ease,t.duration=m(e.duration),t.type="keyframes",t};function ye(t,e,n){const i=Math.max(e-5,0);return y(n-t(i),e-i)}function ge({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?y:n};let T,w;const b=t=>{var e;(e=d.value,void 0!==a&&el)&&(T=t,w=fe({keyframes:[d.value,p(d.value)],velocity:ye(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==T||(e=!0,x(t),b(t)),void 0!==T&&t>=T?w.next(t-T):(!e&&x(t),d)}}}function ve(e,n,{clamp:s=!0,ease:r,mixer:a}={}){const l=e.length;if(t.invariant(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const p=function(t,e,n){const i=[],s=n||o.mix||Kt,r=t.length-1;for(let n=0;n{if(c&&t1)for(;if(i(e[0],e[l-1],t)):f}function xe(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=d(0,e,i);t.push(Bt(n,1,s))}}function Te(t){const e=[0];return xe(e,t.length-1),e}function we(t,e){return t.map(t=>t*e)}function be(t,e){return t.map(()=>e||B).splice(0,t.length-1)}function Se({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=C(i)?i.map(F):F(i),o={done:!1,value:e[0]},r=ve(we(n&&n.length===e.length?n:Te(e),t),e,{ease:Array.isArray(s)?s:be(e,s)});return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}const Ae=t=>null!==t;function Ve(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Ae),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Pe={decay:ge,inertia:ge,tween:Se,keyframes:Se,spring:fe};function Ee(t){"string"==typeof t.type&&(t.type=Pe[t.type])}class Me{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const ke=t=>t/100;class De extends Me{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==H.now()&&this.tick(H.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},G.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Ee(t);const{type:e=Se,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Se;a!==Se&&"number"!=typeof r[0]&&(this.mixKeyframes=h(ke,Kt(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Gt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x,T=this.currentTime,w=n;if(h){const t=Math.min(this.currentTime,s)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(w=r)),T=i(0,1,n)*a}v?(this.delayState.value=u[0],x=this.delayState):x=w.next(T),o&&!v&&(x.value=o(x.value));let{done:b}=x;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==ge&&(x.value=Ve(u,this.options,y,this.speed)),f&&f(x.value),S&&this.finish(),x}then(t,e){return this.finished.then(t,e)}get duration(){return f(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(this.currentTime)}set time(t){t=m(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return ye(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(H.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=f(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Yt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(H.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,G.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Re(t){for(let e=1;e180*t/Math.PI,Ce=t=>{const e=Be(Math.atan2(t[1],t[0]));return Le(e)},je={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ce,rotateZ:Ce,skewX:t=>Be(Math.atan(t[1])),skewY:t=>Be(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Le=t=>((t%=360)<0&&(t+=360),t),Oe=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fe=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ie={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Oe,scaleY:Fe,scale:t=>(Oe(t)+Fe(t))/2,rotateX:t=>Le(Be(Math.atan2(t[6],t[5]))),rotateY:t=>Le(Be(Math.atan2(-t[2],t[0]))),rotateZ:Ce,rotate:Ce,skewX:t=>Be(Math.atan(t[4])),skewY:t=>Be(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function We(t){return t.includes("scale")?1:0}function Ne(t,e){if(!t||"none"===t)return We(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Ie,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=je,s=e}if(!s)return We(e);const o=i[e],r=s[1].split(",").map($e);return"function"==typeof o?o(r):r[o]}const Ue=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ne(n,e)};function $e(t){return parseFloat(t.trim())}const ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ke=(()=>new Set([...ze,"pathRotation"]))(),Ye=t=>t===et||t===ft,Xe=new Set(["x","y","z"]),He=ze.filter(t=>!Xe.has(t));const Ge={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ne(e,"x"),y:(t,{transform:e})=>Ne(e,"y")};Ge.translateX=Ge.x,Ge.translateY=Ge.y;const qe=new Set;let Ze=!1,_e=!1,Je=!1;function Qe(){if(_e){const t=Array.from(qe).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return He.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}_e=!1,Ze=!1,qe.forEach(t=>t.complete(Je)),qe.clear()}function tn(){qe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(_e=!0)})}function en(){Je=!0,tn(),Qe(),Je=!1}class nn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(qe.add(this),Ze||(Ze=!0,U.read(tn),U.resolveKeyframes(Qe))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}Re(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),qe.delete(this)}cancel(){"scheduled"===this.state&&(qe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const sn=t=>t.startsWith("--");function on(t,e,n){sn(e)?t.style.setProperty(e,n):t.style[e]=n}const rn={};function an(t,e){const n=c(t);return()=>rn[e]??n()}const ln=an(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),cn=an(()=>void 0!==window.ViewTimeline,"viewTimeline"),un=an(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),hn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,dn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:hn([0,.65,.55,1]),circOut:hn([.55,0,1,.45]),backIn:hn([.31,.01,.66,-.59]),backOut:hn([.33,1.53,.69,.99])};function pn(t,e){return t?"function"==typeof t?un()?Xt(t,e):"ease-out":L(t)?hn(t):Array.isArray(t)?t.map(t=>pn(t,e)||dn.easeOut):dn[t]:void 0}function mn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=pn(a,s);Array.isArray(h)&&(u.easing=h),W.value&&G.waapi++;const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(d.pseudoElement=c);const p=t.animate(u,d);return W.value&&p.finished.finally(()=>{G.waapi--}),p}function fn(t){return"function"==typeof t&&"applyToOptions"in t}function yn({type:t,...e}){return fn(t)&&un()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class gn extends Me{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=yn(e);this.animation=mn(n,i,s,c,o),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Ve(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t),on(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return f(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=m(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ln()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),u):i(this)}}const vn={anticipate:P,backInOut:V,circInOut:k};function xn(t){"string"==typeof t.ease&&t.ease in vn&&(t.ease=vn[t.ease])}class Tn extends gn{constructor(t){xn(t),Ee(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new De({...r,autoplay:!1}),l=Math.max(10,H.now()-this.startTime),c=i(0,10,l-10),u=a.sample(l).value,{name:h}=this.options;o&&h&&on(o,h,u),e.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const wn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Mt.test(t)&&"0"!==t||t.startsWith("url(")));function bn(t){t.duration=0,t.type="keyframes"}const Sn=new Set(["opacity","clipPath","filter","transform"]),An=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Vn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Pn=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function En(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Pn()&&n&&(Sn.has(n)||Vn.has(n)&&function(t){for(let e=0;e{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=H.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...u},d=c?.KeyframeResolver||nn;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:h,onUpdate:d}=i;this.resolvedAt=H.now();let p=!0;(function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=wn(o,n),l=wn(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},f=p&&!h&&En(m),y=m.motionValue?.owner?.current;let g;if(f)try{g=new Tn({...m,element:y})}catch{g=new De(m)}else g=new De(m);g.finished.then(()=>{this.notifyFinished()}).catch(u),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),en()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class kn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Dn(this.animations,"duration")}get iterationDuration(){return Dn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Dn(t,e){let n=0;for(let i=0;in&&(n=s)}return n}class Rn extends kn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Bn extends gn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Cn=new WeakMap,jn=(t,e="")=>`${t}:${e}`;function Ln(t){let e=Cn.get(t);return e||(e=new Map,Cn.set(t,e)),e}function On(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Fn={current:void 0};class In{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=H.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=H.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new p);const n=this.events[t].add(e);return"change"===t?()=>{n(),U.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Fn.current&&Fn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=H.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return y(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wn(t,e){return new In(t,e)}function Nn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Un(t,e){const n=t?.[e]??t?.default??t;return n!==t?Nn(n,t):n}const $n={type:"spring",stiffness:500,damping:25,restSpeed:10},zn={type:"keyframes",duration:.8},Kn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yn=(t,{keyframes:e})=>e.length>2?zn:Ke.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:$n:Kn,Xn=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Hn(t){for(const e in t)if(!Xn.has(e))return!0;return!1}const Gn=(t,e,n,i={},s,r)=>a=>{const l=Un(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=m(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};Hn(l)||Object.assign(h,Yn(t,h)),h.duration&&(h.duration=m(h.duration)),h.repeatDelay&&(h.repeatDelay=m(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(bn(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,bn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=Ve(h.keyframes,l);if(void 0!==t)return void U.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new De(h):new Mn(h)};function qn(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function Zn(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function _n(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const Jn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qn(t){const e=Jn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function ti(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=Qn(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return J(o)?ti(o,n,i+1):o}function ei(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ni(t,e,n,i){if("function"==typeof e){const[s,o]=ei(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=ei(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function ii(t,e,n){const i=t.getProps();return ni(i,e,void 0!==n?n:i.custom,t)}const si=new Set(["width","height","top","left","right","bottom",...ze]),oi=t=>Array.isArray(t);function ri(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wn(n))}function ai(t){return oi(t)?t[t.length-1]||0:t}function li(t,e){const n=ii(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){ri(t,e,ai(o[e]))}}const ci=t=>Boolean(t&&t.getVelocity);function ui(t){return Boolean(ci(t)&&t.add)}function hi(t,e){const n=t.getValue("willChange");if(ui(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function di(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const pi="framerAppearId",mi="data-"+di(pi);function fi(t){return t.props[mi]}function yi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function gi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Nn(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState&&t.animationState.getState()[s],p=o?.path;p&&p.animateVisualElement(t,a,o,n,h);for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&yi(d,e))continue;const r={delay:n,...Un(o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){U.update(()=>i.set(s));continue}let p=!1;if(window.MotionHandoffAnimation){const n=fi(t);if(n){const t=window.MotionHandoffAnimation(n,e,U);null!==t&&(r.startTime=t,p=!0)}}hi(t,e);const m=c??t.shouldReduceMotion;i.start(Gn(e,i,s,m&&si.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>U.update(()=>{r&&li(t,r)});h.length?Promise.all(h).then(e):e()}return h}function vi(t,e,n={}){const i=ii(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(gi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(vi(l,e,{...r,delay:n+("function"==typeof i?0:i)+On(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function xi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>vi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=vi(t,e,n);else{const s="function"==typeof e?ii(t,e,n.custom):e;i=Promise.all(gi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Ti=t=>e=>e.test(t),wi=[et,ft,mt,pt,gt,yt,{test:t=>"auto"===t,parse:t=>t}],bi=t=>wi.find(Ti(t));function Si(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const Ai=new Set(["brightness","contrast","saturate","opacity"]);function Vi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(ot)||[];if(!i)return t;const s=n.replace(i,"");let o=Ai.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Pi=/\b([a-z-]*)\(.*?\)/gu,Ei={...Mt,getAnimatableNone:t=>{const e=t.match(Pi);return e?e.map(Vi).join(" "):t}},Mi={...Mt,getAnimatableNone:t=>{const e=Mt.parse(t);return Mt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},ki={...et,transform:Math.round},Di={rotate:pt,pathRotation:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:pt,skewX:pt,skewY:pt,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:nt,originX:vt,originY:vt,originZ:ft},Ri={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,top:ft,right:ft,bottom:ft,left:ft,inset:ft,insetBlock:ft,insetBlockStart:ft,insetBlockEnd:ft,insetInline:ft,insetInlineStart:ft,insetInlineEnd:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,paddingBlock:ft,paddingBlockStart:ft,paddingBlockEnd:ft,paddingInline:ft,paddingInlineStart:ft,paddingInlineEnd:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,marginBlock:ft,marginBlockStart:ft,marginBlockEnd:ft,marginInline:ft,marginInlineStart:ft,marginInlineEnd:ft,fontSize:ft,backgroundPositionX:ft,backgroundPositionY:ft,...Di,zIndex:ki,fillOpacity:nt,strokeOpacity:nt,numOctaves:ki},Bi={...Ri,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:Ei,WebkitFilter:Ei,mask:Mi,WebkitMask:Mi},Ci=t=>Bi[t],ji=new Set([Ei,Mi]);function Li(t,e){let n=Ci(t);return ji.has(n)||(n=Mt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Oi=new Set(["auto","none","0"]);class Fi extends nn{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Ii=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function Wi(t,e){for(let n=0;n{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0});function Ui(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function $i(t){return(e,n)=>{const i=Ui(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const zi=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ki{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const r=()=>{const i=e.get();this.latest[t]=s?zi(i,Ri[t]):i,n&&U.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&$(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}}function Yi(t){const e=new WeakMap;return(n,i)=>{const s=e.get(n)??new Ki;e.set(n,s);const o=[];for(const e in i){const r=i[e],a=t(n,s,e,r);o.push(a)}return()=>{for(const t of o)t()}}}const Xi=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?di(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},Hi=$i(Yi(Xi)),Gi=Yi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function qi(t){return a(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const Zi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const _i=new Set(["originX","originY","originZ"]),Ji=(t,e,n,i)=>{let s,o;return Ke.has(n)?(e.get("transform")||(qi(t)||e.get("transformBox")||Ji(t,e,"transformBox",new In("fill-box")),e.set("transform",new In("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=sn(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},Qi=$i(Yi(Ji));const ts=$i(Yi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return U.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new In("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Xi(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Ji:Xi)(t,e,n,i)}));const{schedule:es,cancel:ns}=N(queueMicrotask,!1),is={x:!1,y:!1};function ss(){return is.x||is.y}function os(t,e){const n=Ui(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const rs=(t,e)=>!!e&&(t===e||rs(t,e.parentElement)),as=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,ls=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function cs(t){return ls.has(t.tagName)||!0===t.isContentEditable}const us=new Set(["INPUT","SELECT","TEXTAREA"]);const hs=new WeakSet;function ds(t){return e=>{"Enter"===e.key&&t(e)}}function ps(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function ms(t){return as(t)&&!ss()}const fs=new WeakSet;function ys(t,e){const n=window.getComputedStyle(t);return sn(e)?n.getPropertyValue(e):n[e]}function gs(t){return a(t)&&"ownerSVGElement"in t}const vs=new WeakMap;let xs;const Ts=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:gs(i)&&"getBBox"in i?i.getBBox()[e]:i[n],ws=Ts("inline","width","offsetWidth"),bs=Ts("block","height","offsetHeight");function Ss({target:t,borderBoxSize:e}){vs.get(t)?.forEach(n=>{n(t,{get width(){return ws(t,e)},get height(){return bs(t,e)}})})}function As(t){t.forEach(Ss)}function Vs(t,e){xs||"undefined"!=typeof ResizeObserver&&(xs=new ResizeObserver(As));const n=Ui(t);return n.forEach(t=>{let n=vs.get(t);n||(n=new Set,vs.set(t,n)),n.add(e),xs?.observe(t)}),()=>{n.forEach(t=>{const n=vs.get(t);n?.delete(e),n?.size||xs?.unobserve(t)})}}const Ps=new Set;let Es;function Ms(t){return Ps.add(t),Es||(Es=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ps.forEach(e=>e(t))},window.addEventListener("resize",Es)),()=>{Ps.delete(t),Ps.size||"function"!=typeof Es||(window.removeEventListener("resize",Es),Es=void 0)}}function ks(t,e){return"function"==typeof t?Ms(t):Vs(t,e)}function Ds(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return U.preUpdate(i,!0),()=>$(i)}function Rs(){const{value:t}=W;null!==t?(t.frameloop.rate.push(z.delta),t.animations.mainThread.push(G.mainThread),t.animations.waapi.push(G.waapi),t.animations.layout.push(G.layout)):$(Rs)}function Bs(t){return t.reduce((t,e)=>t+e,0)/t.length}function Cs(t,e=Bs){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const js=t=>Math.round(1e3/t);function Ls(){W.value=null,W.addProjectionMetrics=null}function Os(){const{value:t}=W;if(!t)throw new Error("Stats are not being measured");Ls(),$(Rs);const e={frameloop:{setup:Cs(t.frameloop.setup),rate:Cs(t.frameloop.rate),read:Cs(t.frameloop.read),resolveKeyframes:Cs(t.frameloop.resolveKeyframes),preUpdate:Cs(t.frameloop.preUpdate),update:Cs(t.frameloop.update),preRender:Cs(t.frameloop.preRender),render:Cs(t.frameloop.render),postRender:Cs(t.frameloop.postRender)},animations:{mainThread:Cs(t.animations.mainThread),waapi:Cs(t.animations.waapi),layout:Cs(t.animations.layout)},layoutProjection:{nodes:Cs(t.layoutProjection.nodes),calculatedTargetDeltas:Cs(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Cs(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=js(n.min),n.max=js(n.max),n.avg=js(n.avg),[n.min,n.max]=[n.max,n.min],e}function Fs(t){return gs(t)&&"svg"===t.tagName}function Is(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Ws(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=ve(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function Ns(t,e){const n=Wn(ci(t)?t.get():t);return Us(n,t,e),n}function Us(t,e,n={}){const i=t.get();let s,o=null,r=i;const a="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,l=()=>{o&&(o.stop(),o=null),t.animation=void 0},c=()=>{(()=>{const e=zs(t.get()),i=zs(r);if(e===i)return void l();const a=o?o.getGeneratorVelocity():t.getVelocity();l(),o=new De({keyframes:[e,i],velocity:a,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s})})(),t.animation=o??void 0,t.events.animationStart?.notify(),o?.then(()=>{t.animation=void 0,t.events.animationComplete?.notify()})};if(t.attach((t,e)=>{r=t,s=t=>e($s(t,a)),U.postRender(c)},l),ci(e)){let i=!0===n.skipInitialAnimation;const s=e.on("change",e=>{i?(i=!1,t.jump($s(e,a),!1)):t.set($s(e,a))}),o=t.on("destroy",s);return()=>{s(),o()}}return l}function $s(t,e){return e?t+e:t}function zs(t){return"number"==typeof t?t:parseFloat(t)}function Ks(t){const e=[];Fn.current=e;const n=t();Fn.current=void 0;const i=Wn(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>U.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),$(i)})}(e,i,t),i}const Ys=[...wi,Tt,Mt],Xs=t=>Ys.find(Ti(t));function Hs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Gs={},qs=null;const Zs=(t,e)=>{Gs[t]=e},_s=()=>{qs||(qs=document.createElement("style"),qs.id="motion-view");let t="";for(const e in Gs){const n=Gs[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}qs.textContent=t,document.head.appendChild(qs),Gs={}},Js=()=>{qs&&qs.parentElement&&qs.parentElement.removeChild(qs)};function Qs(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function to(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function eo(){return document.getAnimations().filter(to)}const no=["layout","enter","exit","new","old"];function io(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new kn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Zs(":root",{"view-transition-name":"none"}),Zs("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),_s();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{Js()}),new Promise(t=>{s.ready.then(()=>{const e=eo(),s=[];n.forEach((t,e)=>{for(const n of no){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...Un(i,t),...Un(r,t)},l=Hs(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof o.delay&&(o.delay=o.delay(0,1)),o.duration&&(o.duration=m(o.duration)),o.delay&&(o.delay=m(o.delay));const c=new gn({...o,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});s.push(c)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=Qs(o);if(!r)continue;const a=n.get(r.layer);if(a)so(a,"enter")&&so(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Bn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...Un(i,n)};o.duration&&(o.duration=m(o.duration)),o=yn(o);const a=pn(o.ease,o.duration);e.updateTiming({delay:m(o.delay??0),duration:o.duration,easing:a}),s.push(new Bn(t))}}t(new kn(s))})})}function so(t,e){return t?.[e]?.keyframes.opacity}let oo=[],ro=null;function ao(){ro=null;const[t]=oo;var e;t&&(n(oo,e=t),ro=e,io(e).then(t=>{e.notifyReady(t),t.finished.finally(ao)}))}function lo(){for(let t=oo.length-1;t>=0;t--){const e=oo[t],{interrupt:n}=e.options;if("immediate"===n){const n=oo.slice(0,t+1).map(t=>t.update),i=oo.slice(t+1);e.update=()=>{n.forEach(t=>t())},oo=[e,...i];break}}ro&&"immediate"!==oo[0]?.options.interrupt||ao()}class co{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=u,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,oo.push(n),es.render(lo)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const uo=()=>({translate:0,scale:1,origin:0,originPoint:0}),ho=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),po=()=>({min:0,max:0}),mo=()=>({x:{min:0,max:0},y:{min:0,max:0}}),fo=new WeakMap;function yo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function go(t){return"string"==typeof t||Array.isArray(t)}const vo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xo=["initial",...vo];function To(t){return yo(t.animate)||xo.some(e=>go(t[e]))}function wo(t){return Boolean(To(t)||t.variants)}function bo(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ci(s))t.addValue(i,s);else if(ci(o))t.addValue(i,Wn(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Wn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const So={current:null},Ao={current:!1},Vo="undefined"!=typeof window;function Po(){if(Ao.current=!0,Vo)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>So.current=t.matches;t.addEventListener("change",e),e()}else So.current=!1}const Eo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Mo={};class ko{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=nn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=H.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ao.current||Po(),this.shouldReduceMotion=So.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),$(this.notifyUpdate),$(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Sn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new gn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:m(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=Ke.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&U.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Mo){const e=Mo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Wn(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):!Xs(n)&&Mt.test(e)&&(n=Li(t,e)),this.setBaseTarget(t,ci(n)?n.get():n)),ci(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=ni(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||ci(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){es.render(this.render)}}class Do extends ko{constructor(){super(...arguments),this.KeyframeResolver=Fi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ci(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ro({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Bo(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Co(t){return void 0===t||1===t}function jo({scale:t,scaleX:e,scaleY:n}){return!Co(t)||!Co(e)||!Co(n)}function Lo(t){return jo(t)||Oo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Oo(t){return Fo(t.x)||Fo(t.y)}function Fo(t){return t&&"0%"!==t}function Io(t,e,n){return n+e*(t-n)}function Wo(t,e,n,i,s){return void 0!==s&&(t=Io(t,s,i)),Io(t,n,i)+e}function No(t,e=0,n=1,i,s){t.min=Wo(t.min,e,n,i,s),t.max=Wo(t.max,e,n,i,s)}function Uo(t,{x:e,y:n}){No(t.x,e.translate,e.scale,e.originPoint),No(t.y,n.translate,n.scale,n.originPoint)}const $o=.999999999999,zo=1.0000000000001;function Ko(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a$o&&(e.x=1),e.y$o&&(e.y=1)}function Yo(t,e){t.min+=e,t.max+=e}function Xo(t,e,n,i,s=.5){No(t,e,n,Bt(t.min,t.max,s),i)}function Ho(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function Go(t,e,n){const i=n??t;Xo(t.x,Ho(e.x,i.x),e.scaleX,e.scale,e.originX),Xo(t.y,Ho(e.y,i.y),e.scaleY,e.scale,e.originY)}function qo(t,e){return Ro(Bo(t.getBoundingClientRect(),e))}const Zo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_o=ze.length;function Jo(t,e,n){let i="",s=!0;for(let o=0;o<_o;o++){const r=ze[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=zi(a,Ri[r]);if(!l){s=!1;i+=`${Zo[r]||r}(${t}) `}n&&(e[r]=t)}}const o=t.pathRotation;return o&&(s=!1,i+=`rotate(${zi(o,Ri.pathRotation)}) `),i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Qo(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(Ke.has(t))r=!0;else if(Z(t))s[t]=n;else{const e=zi(n,Ri[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Jo(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function tr(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function er(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const nr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ft.test(t))return t;t=parseFloat(t)}return`${er(t,e.target.x)}% ${er(t,e.target.y)}%`}},ir={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Mt.parse(t);if(s.length>5)return i;const o=Mt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Bt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},sr={borderRadius:{...nr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nr,borderTopRightRadius:nr,borderBottomLeftRadius:nr,borderBottomRightRadius:nr,boxShadow:ir};function or(t,{layout:e,layoutId:n}){return Ke.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!sr[t]||"opacity"===t)}function rr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ci(i[e])||s&&ci(s[e])||or(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class ar extends Do{constructor(){super(...arguments),this.type="html",this.renderInstance=tr}readValueFromInstance(t,e){if(Ke.has(e))return this.projection?.isProjecting?We(e):Ue(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Z(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return qo(t,e)}build(t,e,n){Qo(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return rr(t,e,n)}}class lr extends ko{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const cr={offset:"stroke-dashoffset",array:"stroke-dasharray"},ur={offset:"strokeDashoffset",array:"strokeDasharray"};function hr(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?cr:ur;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const dr=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function pr(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Qo(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const t of dr)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&hr(h,s,o,r,!1)}const mr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),fr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function yr(t,e,n,i){tr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(mr.has(n)?n:di(n),e.attrs[n])}function gr(t,e,n){const i=rr(t,e,n);for(const n in t)if(ci(t[n])||ci(e[n])){i[-1!==ze.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class vr extends Do{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mo}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ke.has(e)){const t=Ci(e);return t&&t.default||0}return e=mr.has(e)?e:di(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return gr(t,e,n)}build(t,e,n){pr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){yr(t,e,0,i)}mount(t){this.isSVGTag=fr(t.tagName),super.mount(t)}}const xr=xo.length;function Tr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Tr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Cr(t,e,n,i){Br(t.x,e.x,n.x,i?i.originX:void 0),Br(t.y,e.y,n.y,i?i.originY:void 0)}function jr(t,e,n,i=0){const s=i?Bt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Dr(e)}function Lr(t,e,n,i){jr(t.x,e.x,n.x,i?.x),jr(t.y,e.y,n.y,i?.y)}function Or(t,e,n,i=0){const s=i?Bt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Dr(e)}function Fr(t,e,n,i){Or(t.x,e.x,n.x,i?.x),Or(t.y,e.y,n.y,i?.y)}function Ir(t,e,n,i,s){return t=Io(t-=e,1/n,i),void 0!==s&&(t=Io(t,1/s,i)),t}function Wr(t,e=0,n=1,i=.5,s,o=t,r=t){if(mt.test(e)){e=parseFloat(e);e=Bt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Bt(o.min,o.max,i);t===o&&(a-=e),t.min=Ir(t.min,e,n,a,s),t.max=Ir(t.max,e,n,a,s)}function Nr(t,e,[n,i,s],o,r){Wr(t,e[n],e[i],e[s],e.scale,o,r)}const Ur=["x","scaleX","originX"],$r=["y","scaleY","originY"];function zr(t,e,n,i){Nr(t.x,e,Ur,n?n.x:void 0,i?i.x:void 0),Nr(t.y,e,$r,n?n.y:void 0,i?i.y:void 0)}function Kr(t){return 0===t.translate&&1===t.scale}function Yr(t){return Kr(t.x)&&Kr(t.y)}function Xr(t,e){return t.min===e.min&&t.max===e.max}function Hr(t,e){return Xr(t.x,e.x)&&Xr(t.y,e.y)}function Gr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function qr(t,e){return Gr(t.x,e.x)&&Gr(t.y,e.y)}function Zr(t){return Dr(t.x)/Dr(t.y)}function _r(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Jr(t){return[t("x"),t("y")]}function Qr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,pathRotation:s,rotateX:o,rotateY:r,skewX:a,skewY:l}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotate(${s}deg) `),o&&(i+=`rotateX(${o}deg) `),r&&(i+=`rotateY(${r}deg) `),a&&(i+=`skewX(${a}deg) `),l&&(i+=`skewY(${l}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const ta=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ea=ta.length,na=t=>"string"==typeof t?parseFloat(t):t,ia=t=>"number"==typeof t||ft.test(t);function sa(t,e,n,i,s,o){s?(t.opacity=Bt(0,n.opacity??1,ra(i)),t.opacityExit=Bt(e.opacity??1,0,aa(i))):o&&(t.opacity=Bt(e.opacity??1,n.opacity??1,i));for(let s=0;sie?1:n(d(t,e,i))}function ca(t,e,n){const i=ci(t)?t:Wn(t);return i.start(Gn("",i,e,n)),i.animation}function ua(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const ha=(t,e)=>t.depth-e.depth;class da{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ha),this.isDirty=!1,this.children.forEach(t)}}function pa(t,e){const n=H.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&($(i),t(o-e))};return U.setup(i,!0),()=>$(i)}function ma(t,e){return pa(t,m(e))}function fa(t){return ci(t)?t.get():t}class ya{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(n(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const ga={hasAnimatedSinceResize:!0,hasEverUpdated:!1},va={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},xa=["","X","Y","Z"];let Ta=0;function wa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function ba(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=fi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&ba(i)}function Sa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=Ta++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,W.value&&(va.nodes=va.calculatedTargetDeltas=va.calculatedProjections=0),this.nodes.forEach(Pa),this.nodes.forEach(La),this.nodes.forEach(Oa),this.nodes.forEach(Ea),W.addProjectionMetrics&&W.addProjectionMetrics(va)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;U.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=pa(s,250),ga.hasAnimatedSinceResize&&(ga.hasAnimatedSinceResize=!1,this.nodes.forEach(ja)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||$a,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!qr(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Un(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||ja(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),$(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Fa),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ba(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Dr(this.snapshot.measuredBox.x)||Dr(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t{const n=e/1e3,i=p?.(n);var c,m,f,y;i?(r.x.translate=i.x,r.x.scale=Bt(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Bt(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(Wa(r.x,t.x,n),Wa(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fr(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,y=n,Na(c.x,m.x,f.x,y),Na(c.y,m.y,f.y,y),d&&Hr(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Mr(d,this.relativeTarget)),l&&(this.animationValues=o,sa(o,s,this.latestValues,n,h,u)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&($(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.update(()=>{ga.hasAnimatedSinceResize=!0,G.layout++,this.motionValue||(this.motionValue=Wn(0)),this.motionValue.jump(0,!1),this.currentAnimation=ca(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{G.layout--},onComplete:()=>{G.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Xa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Dr(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Dr(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Mr(e,n),Go(e,s),Cr(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new ya);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&wa("z",t,i,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(ka),this.root.sharedNodes.clear()}}}function Aa(t){t.updateLayout()}function Va(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)Jr(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Dr(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";Er(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else Xa(s,e.layoutBox,n)&&Jr(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Dr(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Cr(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Cr(a,t.applyTransform(i,!0),e.measuredBox):Cr(a,n,e.layoutBox);const l=!Yr(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};Fr(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};Fr(l,n,o.layoutBox,r),qr(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Pa(t){W.value&&va.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Ea(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ma(t){t.clearSnapshot()}function ka(t){t.clearMeasurements()}function Da(t){t.isLayoutDirty=!0,t.updateLayout()}function Ra(t){t.isLayoutDirty=!1}function Ba(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Ca(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ja(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function La(t){t.resolveTargetDelta()}function Oa(t){t.calcProjection()}function Fa(t){t.resetSkewAndRotation()}function Ia(t){t.removeLeadSnapshot()}function Wa(t,e,n){t.translate=Bt(e.translate,0,n),t.scale=Bt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Na(t,e,n,i){t.min=Bt(e.min,n.min,i),t.max=Bt(e.max,n.max,i)}function Ua(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const $a={duration:.45,ease:[.4,0,.1,1]},za=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ka=za("applewebkit/")&&!za("chrome/")?Math.round:u;function Ya(t){t.min=Ka(t.min),t.max=Ka(t.max)}function Xa(t,e,n){return"position"===t||"preserve-aspect"===t&&!Rr(Zr(e),Zr(n),.2)}function Ha(t){return t!==t.root&&t.scroll?.wasRoot}const Ga=Sa({attachResizeListener:(t,e)=>ua(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),qa=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Za={current:void 0},_a=Sa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Za.current){const t=new Ga({});t.mount(window),t.setOptions({layoutScroll:!0}),Za.current=t}return Za.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ja="[data-layout], [data-layout-id]",Qa=()=>{};function tl(t){const e=Array.from(t.querySelectorAll(Ja));return t instanceof Element&&t.matches(Ja)&&(e.includes(t)||e.unshift(t)),e}function el(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e}}function nl(t,e,n){const i=fo.get(t),s=i??new ar({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&s.projection||(s.projection=new _a(s.latestValues,e)),s.projection.setOptions({...n,visualElement:s}),s.current?s.projection.instance||s.projection.mount(t):s.mount(t),i||fo.set(t,s),{element:t,visualElement:s,projection:s.projection}}function il(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const sl=U,ol=I.reduce((t,e)=>(t[e]=t=>$(t),t),{});function rl(t){return"object"==typeof t&&!Array.isArray(t)}function al(t,e,n,i){return null==t?[]:"string"==typeof t&&rl(e)?Ui(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function ll(t,e,n){return t*(e+1)+n*e}function cl(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function ul(t,e,i,s,o,r){!function(t,e,i){for(let s=0;se&&o.at"number"==typeof t,vl=t=>t.every(gl);function xl(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=gs(t)&&!Fs(t)?new vr(e):new ar(e);n.mount(t),fo.set(t,n)}function Tl(t){const e=new lr({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),fo.set(t,e)}function wl(e,n,i,s){const o=[];if(function(t,e){return ci(t)||"number"==typeof t||"string"==typeof t&&!rl(e)}(e,n))o.push(ca(e,rl(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=al(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t{const c=fl(e),{delay:u=0,times:h=Te(c),type:d=n.type||"keyframes",repeat:y,repeatType:g,repeatDelay:x=0,...T}=i;let{ease:w=n.ease||"easeOut",duration:S}=i;const A="function"==typeof u?u(a,l):u,V=c.length,P=fn(d)?d:o?.[d||"keyframes"];if(V<=2&&P){let t=100;if(2===V&&vl(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...n,...T};void 0!==S&&(e.duration=m(S));const i=qt(e,t,P);w=i.ease,S=i.duration}S??(S=r);const E=p+A;1===h.length&&0===h[0]&&(h[1]=1);const M=h.length-c.length;if(M>0&&xe(h,M),1===c.length&&c.unshift(null),y&&t.warning(y<20,`Sequence segments can't repeat ${y} times — ignoring repeat option. Use a value below 20 or apply repeat at the sequence level instead.`),y&&y<20){const t=S>0?x/S:0;S=ll(S,y,x);const e=[...c],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w],s="reverse"===g||"mirror"===g;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===g&&(r=[...i].reverse().map(t=>"function"==typeof t?b(t):t)));for(let a=0;a0&&(c.push(c[c.length-1]),h.push(p),w.push("linear")),c.push(...u);for(let t=0;t{for(const s in t){const o=t[s];o.sort(dl);const r=[],l=[],c=[];for(let t=0;t{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=Wn(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:fe});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...wl(n,t,e))}),s}function Sl(t={}){const{scope:e,reduceMotion:i,skipAnimations:s}=t;return function(t,o,r){let a,l=[];const c={};if(void 0!==i&&(c.reduceMotion=i),void 0!==s&&(c.skipAnimations=s),u=t,Array.isArray(u)&&u.some(Array.isArray)){const{onComplete:n,...i}=o||{};"function"==typeof n&&(a=n),l=bl(t,{...c,...i},e)}else{const{onComplete:n,...i}=r||{};"function"==typeof n&&(a=n),l=wl(t,o,{...c,...i},e)}var u;const h=new Rn(l);return a&&h.finished.then(a),e&&(e.animations.push(h),h.finished.then(()=>{n(e.animations,h)})),h}}const Al=Sl();const Vl=e=>function(n,i,s){return new Rn(function(e,n,i,s){if(null==e)return[];const o=Ui(e,s),r=o.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;te.delete(n)),l.push(s)}return l}(n,i,s,e))},Pl=Vl();function El(t){return"undefined"!=typeof window&&(t?cn():ln())}const Ml={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function kl(t,e,n,i){const s=n[e],{length:o,position:r}=Ml[e],a=s.current,l=n.time;s.current=Math.abs(t[`scroll${r}`]),s.scrollLength=t[`scroll${o}`]-t[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=d(0,s.scrollLength,s.current);const c=i-l;s.velocity=c>50?0:y(s.current-a,c)}const Dl={start:0,center:.5,end:1};function Rl(t,e,n=0){let i=0;if(t in Dl&&(t=Dl[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Bl=[0,0];function Cl(t,e,n,i){let s=Array.isArray(t)?t:Bl,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Dl[t]?t:"0"]),o=Rl(s[0],n,i),r=Rl(s[1],e),o-r}const jl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Ll={x:0,y:0};function Ol(t,e,n){const{offset:s=jl.All}=n,{target:o=t,axis:r="y"}=n,a="y"===r?"height":"width",l=o!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(qi(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(o,t):Ll,c=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let h=!e[r].interpolate;const d=s.length;for(let t=0;t{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),function(t,e,n){kl(t,"x",e,n),kl(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Ol(t,n,i)},notify:()=>e(n)}}const Il=new WeakMap,Wl=new WeakMap,Nl=new WeakMap,Ul=new WeakMap,$l=new WeakMap,zl=t=>t===document.scrollingElement?window:t;function Kl(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return u;let s=Nl.get(e);s||(s=new Set,Nl.set(e,s));const o=Fl(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(s.add(o),!Il.has(e)){const t=()=>{for(const t of s)t.measure(z.timestamp);U.preUpdate(n)},n=()=>{for(const t of s)t.notify()},i=()=>U.read(t);Il.set(e,i);const o=zl(e);window.addEventListener("resize",i),e!==document.documentElement&&Wl.set(e,ks(e,i)),o.addEventListener("scroll",i),i()}if(n&&!$l.has(e)){const t=Il.get(e),n={width:e.scrollWidth,height:e.scrollHeight};Ul.set(e,n);const i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=U.read(i,!0);$l.set(e,s)}const r=Il.get(e);return U.read(r,!1,!0),()=>{$(r);const t=Nl.get(e);if(!t)return;if(t.delete(o),t.size)return;const n=Il.get(e);Il.delete(e),n&&(zl(e).removeEventListener("scroll",n),Wl.get(e)?.(),window.removeEventListener("resize",n));const i=$l.get(e);i&&($(i),$l.delete(e)),Ul.delete(e)}}const Yl=[[jl.Enter,"entry"],[jl.Exit,"exit"],[jl.Any,"cover"],[jl.All,"contain"]],Xl={start:0,end:1};function Hl(t){const e=t.trim().split(/\s+/);if(2!==e.length)return;const n=Xl[e[0]],i=Xl[e[1]];return void 0!==n&&void 0!==i?[n,i]:void 0}function Gl(t,e){const n=function(t){if(2!==t.length)return;const e=[];for(const n of t)if(Array.isArray(n))e.push(n);else{if("string"!=typeof n)return;{const t=Hl(n);if(!t)return;e.push(t)}}return e}(t);if(!n)return!1;for(let t=0;t<2;t++){const i=n[t],s=e[t];if(i[0]!==s[0]||i[1]!==s[1])return!1}return!0}function ql(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of Yl)if(Gl(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const Zl=new Map;function _l(t){const e={value:0},n=Kl(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}function Jl({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);let s=Zl.get(e);s||(s=new Map,Zl.set(e,s));const o=n.target??"self";let r=s.get(o);r||(r={},s.set(o,r));const a=i+(n.offset??[]).join(",");if(!r[a])if(n.target&&El(n.target)){const t=ql(n.offset);r[a]=t?new ViewTimeline({subject:n.target,axis:i}):_l({container:e,...n})}else El()?r[a]=new ScrollTimeline({source:e,axis:i}):r[a]=_l({container:e,...n});return r[a]}const Ql={some:0,all:1};const tc=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=Mn,t.DOMKeyframesResolver=Fi,t.DOMVisualElement=Do,t.DocumentProjectionNode=Ga,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=da,t.GroupAnimation=kn,t.GroupAnimationWithThen=Rn,t.HTMLProjectionNode=_a,t.HTMLVisualElement=ar,t.JSAnimation=De,t.KeyframeResolver=nn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=Qa,this.rejectReady=Qa,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),U.postRender(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=tl(this.scope),e=this.buildRecords(t);e.forEach(({projection:t})=>{const e=Boolean(t.currentAnimation),n=Boolean(t.options.layoutId);if(e&&n){const e=function(t){const e=t.targetWithTransforms||t.target;if(!e)return;const n={x:{min:0,max:0},y:{min:0,max:0}},i={x:{min:0,max:0},y:{min:0,max:0}};return Mr(n,e),Mr(i,e),{animationId:t.root?.animationId??0,measuredBox:n,layoutBox:i,latestValues:t.animationValues||t.latestValues||{},source:t.id}}(t);e?t.snapshot=e:t.snapshot&&(t.snapshot=void 0)}else t.snapshot&&(t.currentAnimation||t.isProjecting())&&(t.snapshot=void 0);t.isPresent=!0,t.willUpdate()}),await this.updateDom();const n=tl(this.scope),i=this.buildRecords(n);this.handleExitingElements(e,i),i.forEach(({projection:t})=>{const e=t.instance,n=t.resumeFrom?.instance;if(!e||!n)return;if(!("style"in e))return;const i=e.style.transform,s=n.style.transform;i&&s&&i===s&&(e.style.transform="",e.style.transformOrigin="")}),i.forEach(({projection:t})=>{t.isPresent=!0});const s=function(t,e){const n=t[0]||e[0];return n?.projection.root}(i,e);s?.didUpdate(),await new Promise(t=>{U.postRender(()=>t())});const o=function(t){const e=new Set;return t.forEach(t=>{const n=t.projection.currentAnimation;n&&e.add(n)}),Array.from(e)}(i);return new kn(o)}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=il(i,n,this.scope),{layout:s,layoutId:o}=el(i),r=(o?this.sharedTransitions.get(o):void 0)||this.defaultOptions,a=nl(i,t?.projection,{layout:s,layoutId:o,animationType:"string"==typeof s?s:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e){const n=new Set(e.map(t=>t.element));t.forEach(t=>{n.has(t.element)||(t.projection.options.layoutId&&(t.projection.isPresent=!1,t.projection.relegate()),t.visualElement.unmount(),fo.delete(t.element))});const i=new Set(t.map(t=>t.element));e.forEach(({element:t,projection:e})=>{i.has(t)&&e.resumeFrom&&!e.resumeFrom.instance&&!e.isLead()&&(e.resumeFrom=void 0,e.snapshot=void 0)})}},t.MotionGlobalConfig=o,t.MotionValue=In,t.NativeAnimation=gn,t.NativeAnimationExtended=Tn,t.NativeAnimationWrapper=Bn,t.NodeStack=ya,t.ObjectVisualElement=lr,t.SVGVisualElement=vr,t.SubscriptionManager=p,t.ViewTransitionBuilder=co,t.VisualElement=ko,t.acceleratedValues=Sn,t.activeAnimations=G,t.addAttrValue=Xi,t.addDomEvent=ua,t.addScaleCorrector=function(t){for(const e in t)sr[e]=t[e],Z(e)&&(sr[e].isCSSVariable=!0)},t.addStyleValue=Ji,t.addUniqueItem=e,t.addValueToWillChange=hi,t.alpha=nt,t.analyseComplexValue=Vt,t.animate=Al,t.animateMini=Pl,t.animateMotionValue=Gn,t.animateSingleValue=ca,t.animateTarget=gi,t.animateValue=function(t){return new De(t)},t.animateVariant=vi,t.animateView=function(t,e={}){return new co(t,e)},t.animateVisualElement=xi,t.animationMapKey=jn,t.anticipate=P,t.applyAxisDelta=No,t.applyBoxDelta=Uo,t.applyGeneratorOptions=yn,t.applyPointDelta=Wo,t.applyPxDefaults=Wi,t.applyTreeDeltas=Ko,t.arc=function(t={}){const e=function({strength:t=.5,peak:e=.5,direction:n,rotate:i=!1}={}){const s=!0===i?1:"number"==typeof i?i:0;let o;return(i,r)=>{const a=r.x-i.x,l=r.y-i.y;let c;c="cw"===n?-t:"ccw"===n?t:(Math.abs(a)>=Math.abs(l)?a:l)<0?-t:t;let u=_n(i.x,i.y,r.x,r.y,c,e);if(void 0===n){const t=Math.abs(a){const e={x:qn(t,i.x,u.x,r.x),y:qn(t,i.y,u.y,r.y)};if(s){const n=Zn(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=v(-180,180,n-o)*s}return e}}}(t),n={interpolateProjection(t){const n=t.x.translate,i=t.y.translate;if(!(Math.sqrt(n*n+i*i)<20))return e({x:n,y:i},{x:0,y:0})},animateVisualElement(t,n,i,s,o){if(!("x"in n)&&!("y"in n))return;const r=t.getValue("x",t.latestValues.x??0),a=t.getValue("y",t.latestValues.y??0),l=n.x,c=n.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=e({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t.getValue("pathRotation",0):void 0,y={delay:s,...Un(i||{},"x")};delete y.path;const g=Wn(0);g.start(Gn("",g,[0,1e3],{...y,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),g.animation&&o.push(g.animation),delete n.x,delete n.y}};return n},t.aspectRatio=Zr,t.attachFollow=Us,t.attachSpring=function(t,e,n){return Us(t,e,{type:"spring",...n})},t.attrEffect=Hi,t.axisDeltaEquals=_r,t.axisEquals=Xr,t.axisEqualsRounded=Gr,t.backIn=A,t.backInOut=V,t.backOut=S,t.boxEquals=Hr,t.boxEqualsRounded=qr,t.buildHTMLStyles=Qo,t.buildProjectionTransform=Qr,t.buildSVGAttrs=pr,t.buildSVGPath=hr,t.buildTransform=Jo,t.calcAxisDelta=Br,t.calcBoxDelta=Cr,t.calcChildStagger=On,t.calcGeneratorDuration=Gt,t.calcLength=Dr,t.calcRelativeAxis=jr,t.calcRelativeAxisPosition=Or,t.calcRelativeBox=Lr,t.calcRelativePosition=Fr,t.camelCaseAttributes=mr,t.camelToDash=di,t.cancelFrame=$,t.cancelMicrotask=ns,t.cancelSync=ol,t.checkVariantsDidChange=Ar,t.circIn=E,t.circInOut=k,t.circOut=M,t.clamp=i,t.cleanDirtyNodes=Ea,t.collectMotionValues=Fn,t.color=Tt,t.compareByDepth=ha,t.complex=Mt,t.containsCSSVariable=tt,t.convertBoundingBoxToBox=Ro,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=we,t.copyAxisDeltaInto=kr,t.copyAxisInto=Er,t.copyBoxInto=Mr,t.correctBorderRadius=nr,t.correctBoxShadow=ir,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>xi(t,e,n)))}(t),n=Pr(),i=!0,s=!1;const o=e=>(n,i)=>{const s=ii(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=Tr(t.parent)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;ed&&y,w=!1;const b=Array.isArray(f)?f:[f];let S=b.reduce(o(p),{});!1===g&&(S={});const{prevResolvedValues:A={}}=m,V={...A,...S},P=e=>{T=!0,u.has(e)&&(w=!0,u.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in V){const e=S[t],n=A[t];if(h.hasOwnProperty(t))continue;let i=!1;i=oi(e)&&oi(n)?!wr(e,n)||x:e!==n,i?null!=e?P(t):u.add(t):void 0!==e&&u.has(t)?P(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=S,m.isActive&&(h={...h,...S}),(i||s)&&t.blockInitialAnimation&&(T=!1);const E=v&&x;T&&(!E||w)&&c.push(...b.map(e=>{const n={type:p};if("string"==typeof e&&(i||s)&&!E&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=ii(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=On(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof a.initial){const n=ii(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let p=Boolean(c.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,s=!1,p?e(c):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Pr(),s=!0}}},t.createAxis=po,t.createAxisDelta=uo,t.createBox=mo,t.createDelta=ho,t.createGeneratorEasing=qt,t.createProjectionNode=Sa,t.createRenderBatcher=N,t.createScopedAnimate=Sl,t.cubicBezier=T,t.cubicBezierAsString=hn,t.defaultEasing=be,t.defaultOffset=Te,t.defaultTransformValue=We,t.defaultValueTypes=Bi,t.degrees=pt,t.delay=ma,t.delayInSeconds=ma,t.dimensionValueTypes=wi,t.distance=tc,t.distance2D=function(t,e){const n=tc(t.x,e.x),i=tc(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=Jr,t.easeIn=D,t.easeInOut=B,t.easeOut=R,t.easingDefinitionToFunction=F,t.fillOffset=xe,t.fillWildcards=Re,t.findDimensionValueType=bi,t.findValueType=Xs,t.flushKeyframeResolvers=en,t.followValue=Ns,t.frame=U,t.frameData=z,t.frameSteps=K,t.generateLinearEasing=Xt,t.getAnimatableNone=Li,t.getAnimationMap=Ln,t.getComputedStyle=ys,t.getDefaultTransition=Yn,t.getDefaultValueType=Ci,t.getEasingForSegment=j,t.getFeatureDefinitions=function(){return Mo},t.getFinalKeyframe=Ve,t.getMixer=Nt,t.getOptimisedAppearId=fi,t.getOriginIndex=Is,t.getValueAsType=zi,t.getValueTransition=Un,t.getVariableValue=ti,t.getVariantContext=Tr,t.getViewAnimationLayerInfo=Qs,t.getViewAnimations=eo,t.globalProjectionState=ga,t.has2DTranslate=Oo,t.hasReducedMotionListener=Ao,t.hasScale=jo,t.hasTransform=Lo,t.hasWarned=function(t){return g.has(t)},t.hex=ht,t.hover=function(t,e,n={}){const[i,s,o]=os(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||ss())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=xt,t.hslaToRgba=Dt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Ui(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Ql[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=ge,t.initPrefersReducedMotion=Po,t.interpolate=ve,t.invisibleValues=Ft,t.isAnimationControls=yo,t.isBezierDefinition=L,t.isCSSVariableName=Z,t.isCSSVariableToken=J,t.isControllingVariants=To,t.isDeltaZero=Yr,t.isDragActive=ss,t.isDragging=is,t.isEasingArray=C,t.isElementKeyboardAccessible=cs,t.isElementTextInput=function(t){return us.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=or,t.isGenerator=fn,t.isHTMLElement=qi,t.isKeyframesTarget=oi,t.isMotionValue=ci,t.isNear=Rr,t.isNodeOrChild=rs,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=as,t.isSVGElement=gs,t.isSVGSVGElement=Fs,t.isSVGTag=fr,t.isTransitionDefined=Hn,t.isVariantLabel=go,t.isVariantNode=wo,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&un()||!e||"string"==typeof e&&(e in dn||un())||L(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=ui,t.isZeroValueString=l,t.keyframes=Se,t.makeAnimationInstant=bn,t.mapEasingToNativeEasing=pn,t.mapValue=function(t,e,n,i){const s=Ws(e,n,i);return Ks(()=>s(t.get()))},t.maxGeneratorDuration=Ht,t.measurePageBox=function(t,e,n){const i=qo(t,n),{scroll:s}=e;return s&&(Yo(i.x,s.offset.x),Yo(i.y,s.offset.y)),i},t.measureViewportBox=qo,t.memo=c,t.microtask=es,t.millisecondsToSeconds=f,t.mirrorEasing=w,t.mix=Kt,t.mixArray=Ut,t.mixColor=Ot,t.mixComplex=zt,t.mixImmediate=Rt,t.mixLinearColor=Ct,t.mixNumber=Bt,t.mixObject=$t,t.mixValues=sa,t.mixVisibility=It,t.motionValue=Wn,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&it.forEach(qa);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=u,t.number=et,t.numberValueTypes=Ri,t.observeTimeline=Ds,t.optimizedAppearDataAttribute=mi,t.optimizedAppearDataId=pi,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:Ui(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=Qn,t.parseValueFromTransform=Ne,t.percent=mt,t.pipe=h,t.pixelsToPercent=er,t.positionalKeys=si,t.prefersReducedMotion=So,t.press=function(t,e,n={}){const[i,s,o]=os(t,n),r=t=>{const i=t.currentTarget;if(!ms(t))return;if(fs.has(t))return;hs.add(i),n.stopPropagation&&fs.add(t);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),hs.has(i)&&hs.delete(i),ms(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||rs(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),qi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=ds(()=>{if(hs.has(n))return;ps(n,"down");const t=ds(()=>{ps(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>ps(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),cs(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=d,t.progressPercentage=vt,t.propEffect=Gi,t.propagateDirtyNodes=Pa,t.px=ft,t.readTransformValue=Ue,t.recordStats=function(){if(W.value)throw Ls(),new Error("Stats are already being measured");const t=W;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},U.postRender(Rs,!0),Os},t.removeAxisDelta=Wr,t.removeAxisTransforms=Nr,t.removeBoxTransforms=zr,t.removeItem=n,t.removePointDelta=Ir,t.renderHTML=tr,t.renderSVG=yr,t.resize=ks,t.resolveElements=Ui,t.resolveMotionValue=fa,t.resolveTransition=Nn,t.resolveVariant=ii,t.resolveVariantFromProps=ni,t.reverseEasing=b,t.rgbUnit=ct,t.rgba=ut,t.rootProjectionNode=Za,t.scale=it,t.scaleCorrectors=sr,t.scalePoint=Io,t.scrapeHTMLMotionValuesFromProps=rr,t.scrapeSVGMotionValuesFromProps=gr,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return u;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||function(t){return t&&(t.target||t.offset)}(e)?Kl(n=>{t(n[e.axis].progress,n)},e):Ds(t,Jl(e))}(t,s):function(t,e){const n=Jl(e),i=e.target?ql(e.offset):void 0,s=e.target?El(e.target)&&!!i:El();return t.attachTimeline({timeline:s?n:void 0,...i&&s&&{rangeStart:i.rangeStart,rangeEnd:i.rangeEnd},observe:t=>(t.pause(),Ds(e=>{t.time=t.iterationDuration*e},n))})}(t,s)},t.scrollInfo=Kl,t.secondsToMilliseconds=m,t.setDragLock=function(t){return"x"===t||"y"===t?is[t]?null:(is[t]=!0,()=>{is[t]=!1}):is.x||is.y?null:(is.x=is.y=!0,()=>{is.x=is.y=!1})},t.setFeatureDefinitions=function(t){Mo=t},t.setStyle=on,t.setTarget=li,t.spring=fe,t.springValue=function(t,e){return Ns(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:Is(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=F(i)(l/e)*e}return e+l}},t.startWaapiAnimation=mn,t.statsBuffer=W,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=Qi,t.supportedWaapiEasing=dn,t.supportsBrowserAnimation=En,t.supportsFlags=rn,t.supportsLinearEasing=un,t.supportsPartialKeyframes=Ni,t.supportsScrollTimeline=ln,t.supportsViewTimeline=cn,t.svgEffect=ts,t.sync=sl,t.testValueType=Ti,t.time=H,t.transform=Ws,t.transformAxis=Xo,t.transformBox=Go,t.transformBoxPoints=Bo,t.transformPropOrder=ze,t.transformProps=Ke,t.transformValue=Ks,t.transformValueTypes=Di,t.translateAxis=Yo,t.updateMotionValuesFromProps=bo,t.variantPriorityOrder=vo,t.variantProps=xo,t.velocityPerSecond=y,t.vh=yt,t.visualElementStore=fo,t.vw=gt,t.warnOnce=function(t,e,n){t||g.has(e)||(console.warn(s(e,n)),g.add(e))},t.wrap=v}); diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/index.mjs deleted file mode 100644 index 0e98ea4f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/index.mjs +++ /dev/null @@ -1,58 +0,0 @@ -import { GroupAnimationWithThen } from 'motion-dom'; -import { removeItem } from 'motion-utils'; -import { animateSequence } from './sequence.mjs'; -import { animateSubject } from './subject.mjs'; - -function isSequence(value) { - return Array.isArray(value) && value.some(Array.isArray); -} -/** - * Creates an animation function that is optionally scoped - * to a specific element. - */ -function createScopedAnimate(options = {}) { - const { scope, reduceMotion, skipAnimations } = options; - /** - * Implementation - */ - function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) { - let animations = []; - let animationOnComplete; - const inherited = {}; - if (reduceMotion !== undefined) - inherited.reduceMotion = reduceMotion; - if (skipAnimations !== undefined) - inherited.skipAnimations = skipAnimations; - if (isSequence(subjectOrSequence)) { - const { onComplete, ...sequenceOptions } = optionsOrKeyframes || {}; - if (typeof onComplete === "function") { - animationOnComplete = onComplete; - } - animations = animateSequence(subjectOrSequence, { ...inherited, ...sequenceOptions }, scope); - } - else { - // Extract top-level onComplete so it doesn't get applied per-value - const { onComplete, ...rest } = options || {}; - if (typeof onComplete === "function") { - animationOnComplete = onComplete; - } - animations = animateSubject(subjectOrSequence, optionsOrKeyframes, { ...inherited, ...rest }, scope); - } - const animation = new GroupAnimationWithThen(animations); - if (animationOnComplete) { - animation.finished.then(animationOnComplete); - } - if (scope) { - scope.animations.push(animation); - animation.finished.then(() => { - removeItem(scope.animations, animation); - }); - } - return animation; - } - return scopedAnimate; -} -const animate = createScopedAnimate(); - -export { animate, createScopedAnimate }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/index.mjs.map deleted file mode 100644 index 9fe05f8c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/animation/animate/index.ts"],"sourcesContent":["import type {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n MotionValue,\n UnresolvedValueKeyframe,\n ValueAnimationTransition,\n} from \"motion-dom\"\nimport { GroupAnimationWithThen } from \"motion-dom\"\nimport { removeItem } from \"motion-utils\"\nimport {\n AnimationSequence,\n ObjectTarget,\n SequenceOptions,\n} from \"../sequence/types\"\nimport { animateSequence } from \"./sequence\"\nimport { animateSubject } from \"./subject\"\n\nfunction isSequence(value: unknown): value is AnimationSequence {\n return Array.isArray(value) && value.some(Array.isArray)\n}\n\ninterface ScopedAnimateOptions {\n scope?: AnimationScope\n reduceMotion?: boolean\n skipAnimations?: boolean\n}\n\n/**\n * Creates an animation function that is optionally scoped\n * to a specific element.\n */\nexport function createScopedAnimate(options: ScopedAnimateOptions = {}) {\n const { scope, reduceMotion, skipAnimations } = options\n /**\n * Animate a sequence\n */\n function scopedAnimate(\n sequence: AnimationSequence,\n options?: SequenceOptions\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate a string\n */\n function scopedAnimate(\n value: string | MotionValue,\n keyframes: string | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate a number\n */\n function scopedAnimate(\n value: number | MotionValue,\n keyframes: number | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate a generic motion value\n */\n function scopedAnimate(\n value: V | MotionValue,\n keyframes: V | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate an Element\n */\n function scopedAnimate(\n element: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen\n /**\n * Animate an object\n */\n function scopedAnimate(\n object: O | O[],\n keyframes: ObjectTarget,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen\n /**\n * Implementation\n */\n function scopedAnimate(\n subjectOrSequence:\n | AnimationSequence\n | MotionValue\n | MotionValue\n | number\n | string\n | ElementOrSelector\n | O\n | O[],\n optionsOrKeyframes?:\n | SequenceOptions\n | number\n | string\n | UnresolvedValueKeyframe[]\n | UnresolvedValueKeyframe[]\n | DOMKeyframesDefinition\n | ObjectTarget,\n options?:\n | ValueAnimationTransition\n | ValueAnimationTransition\n | DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen {\n let animations: AnimationPlaybackControlsWithThen[] = []\n let animationOnComplete: VoidFunction | undefined\n\n const inherited: { reduceMotion?: boolean; skipAnimations?: boolean } =\n {}\n if (reduceMotion !== undefined) inherited.reduceMotion = reduceMotion\n if (skipAnimations !== undefined)\n inherited.skipAnimations = skipAnimations\n\n if (isSequence(subjectOrSequence)) {\n const { onComplete, ...sequenceOptions } =\n (optionsOrKeyframes as SequenceOptions) || {}\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete as VoidFunction\n }\n animations = animateSequence(\n subjectOrSequence,\n { ...inherited, ...sequenceOptions } as SequenceOptions,\n scope\n )\n } else {\n // Extract top-level onComplete so it doesn't get applied per-value\n const { onComplete, ...rest } = options || {}\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete as VoidFunction\n }\n animations = animateSubject(\n subjectOrSequence as ElementOrSelector,\n optionsOrKeyframes as DOMKeyframesDefinition,\n { ...inherited, ...rest } as DynamicAnimationOptions,\n scope\n )\n }\n\n const animation = new GroupAnimationWithThen(animations)\n\n if (animationOnComplete) {\n animation.finished.then(animationOnComplete)\n }\n\n if (scope) {\n scope.animations.push(animation)\n animation.finished.then(() => {\n removeItem(scope.animations, animation)\n })\n }\n\n return animation\n }\n\n return scopedAnimate\n}\n\nexport const animate = createScopedAnimate()\n"],"names":[],"mappings":";;;;;AAoBA,SAAS,UAAU,CAAC,KAAc,EAAA;AAC9B,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;AAC5D;AAQA;;;AAGG;AACG,SAAU,mBAAmB,CAAC,OAAA,GAAgC,EAAE,EAAA;IAClE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,OAAO;AAgDvD;;AAEG;AACH,IAAA,SAAS,aAAa,CAClB,iBAQS,EACT,kBAOqB,EACrB,OAG6B,EAAA;QAE7B,IAAI,UAAU,GAAwC,EAAE;AACxD,QAAA,IAAI,mBAA6C;QAEjD,MAAM,SAAS,GACX,EAAE;QACN,IAAI,YAAY,KAAK,SAAS;AAAE,YAAA,SAAS,CAAC,YAAY,GAAG,YAAY;QACrE,IAAI,cAAc,KAAK,SAAS;AAC5B,YAAA,SAAS,CAAC,cAAc,GAAG,cAAc;AAE7C,QAAA,IAAI,UAAU,CAAC,iBAAiB,CAAC,EAAE;YAC/B,MAAM,EAAE,UAAU,EAAE,GAAG,eAAe,EAAE,GACnC,kBAAsC,IAAI,EAAE;AACjD,YAAA,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;gBAClC,mBAAmB,GAAG,UAA0B;YACpD;AACA,YAAA,UAAU,GAAG,eAAe,CACxB,iBAAiB,EACjB,EAAE,GAAG,SAAS,EAAE,GAAG,eAAe,EAAqB,EACvD,KAAK,CACR;QACL;aAAO;;YAEH,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,IAAI,EAAE;AAC7C,YAAA,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;gBAClC,mBAAmB,GAAG,UAA0B;YACpD;AACA,YAAA,UAAU,GAAG,cAAc,CACvB,iBAAsC,EACtC,kBAA4C,EAC5C,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,EAA6B,EACpD,KAAK,CACR;QACL;AAEA,QAAA,MAAM,SAAS,GAAG,IAAI,sBAAsB,CAAC,UAAU,CAAC;QAExD,IAAI,mBAAmB,EAAE;AACrB,YAAA,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC;QAChD;QAEA,IAAI,KAAK,EAAE;AACP,YAAA,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;AAChC,YAAA,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAK;AACzB,gBAAA,UAAU,CAAC,KAAK,CAAC,UAAU,EAAE,SAAS,CAAC;AAC3C,YAAA,CAAC,CAAC;QACN;AAEA,QAAA,OAAO,SAAS;IACpB;AAEA,IAAA,OAAO,aAAa;AACxB;AAEO,MAAM,OAAO,GAAG,mBAAmB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs deleted file mode 100644 index 3888e741..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import { resolveElements } from 'motion-dom'; -import { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs'; - -function resolveSubjects(subject, keyframes, scope, selectorCache) { - if (subject == null) { - return []; - } - if (typeof subject === "string" && isDOMKeyframes(keyframes)) { - return resolveElements(subject, scope, selectorCache); - } - else if (subject instanceof NodeList) { - return Array.from(subject); - } - else if (Array.isArray(subject)) { - return subject.filter((s) => s != null); - } - else { - return [subject]; - } -} - -export { resolveSubjects }; -//# sourceMappingURL=resolve-subjects.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs.map deleted file mode 100644 index 0429e097..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-subjects.mjs","sources":["../../../../src/animation/animate/resolve-subjects.ts"],"sourcesContent":["import {\n AnimationScope,\n DOMKeyframesDefinition,\n SelectorCache,\n resolveElements,\n} from \"motion-dom\"\nimport { ObjectTarget } from \"../sequence/types\"\nimport { isDOMKeyframes } from \"../utils/is-dom-keyframes\"\n\nexport function resolveSubjects(\n subject:\n | string\n | Element\n | Element[]\n | NodeListOf\n | O\n | O[]\n | null\n | undefined,\n keyframes: DOMKeyframesDefinition | ObjectTarget,\n scope?: AnimationScope,\n selectorCache?: SelectorCache\n) {\n if (subject == null) {\n return []\n }\n\n if (typeof subject === \"string\" && isDOMKeyframes(keyframes)) {\n return resolveElements(subject, scope, selectorCache)\n } else if (subject instanceof NodeList) {\n return Array.from(subject)\n } else if (Array.isArray(subject)) {\n return subject.filter((s) => s != null)\n } else {\n return [subject]\n }\n}\n"],"names":[],"mappings":";;;AASM,SAAU,eAAe,CAC3B,OAQe,EACf,SAAmD,EACnD,KAAsB,EACtB,aAA6B,EAAA;AAE7B,IAAA,IAAI,OAAO,IAAI,IAAI,EAAE;AACjB,QAAA,OAAO,EAAE;IACb;IAEA,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,cAAc,CAAC,SAAS,CAAC,EAAE;QAC1D,OAAO,eAAe,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa,CAAC;IACzD;AAAO,SAAA,IAAI,OAAO,YAAY,QAAQ,EAAE;AACpC,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;IAC9B;AAAO,SAAA,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;AAC/B,QAAA,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;IAC3C;SAAO;QACH,OAAO,CAAC,OAAO,CAAC;IACpB;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/sequence.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/sequence.mjs deleted file mode 100644 index c19af7ac..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/sequence.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import { motionValue, spring } from 'motion-dom'; -import { createAnimationsFromSequence } from '../sequence/create.mjs'; -import { animateSubject } from './subject.mjs'; - -function animateSequence(sequence, options, scope) { - const animations = []; - /** - * Pre-process: replace function segments with MotionValue segments, - * subscribe callbacks immediately - */ - const processedSequence = sequence.map((segment) => { - if (Array.isArray(segment) && typeof segment[0] === "function") { - const callback = segment[0]; - const mv = motionValue(0); - mv.on("change", callback); - if (segment.length === 1) { - return [mv, [0, 1]]; - } - else if (segment.length === 2) { - return [mv, [0, 1], segment[1]]; - } - else { - return [mv, segment[1], segment[2]]; - } - } - return segment; - }); - const animationDefinitions = createAnimationsFromSequence(processedSequence, options, scope, { spring }); - animationDefinitions.forEach(({ keyframes, transition }, subject) => { - animations.push(...animateSubject(subject, keyframes, transition)); - }); - return animations; -} - -export { animateSequence }; -//# sourceMappingURL=sequence.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/sequence.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/sequence.mjs.map deleted file mode 100644 index 871f6c3c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/sequence.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sequence.mjs","sources":["../../../../src/animation/animate/sequence.ts"],"sourcesContent":["import {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n motionValue,\n spring,\n} from \"motion-dom\"\nimport { createAnimationsFromSequence } from \"../sequence/create\"\nimport { AnimationSequence, SequenceOptions } from \"../sequence/types\"\nimport { animateSubject } from \"./subject\"\n\nexport function animateSequence(\n sequence: AnimationSequence,\n options?: SequenceOptions,\n scope?: AnimationScope\n) {\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n /**\n * Pre-process: replace function segments with MotionValue segments,\n * subscribe callbacks immediately\n */\n const processedSequence = sequence.map((segment) => {\n if (Array.isArray(segment) && typeof segment[0] === \"function\") {\n const callback = segment[0] as (value: any) => void\n const mv = motionValue(0)\n mv.on(\"change\", callback)\n\n if (segment.length === 1) {\n return [mv, [0, 1]] as any\n } else if (segment.length === 2) {\n return [mv, [0, 1], segment[1]] as any\n } else {\n return [mv, segment[1], segment[2]] as any\n }\n }\n return segment\n }) as AnimationSequence\n\n const animationDefinitions = createAnimationsFromSequence(\n processedSequence,\n options,\n scope,\n { spring }\n )\n\n animationDefinitions.forEach(({ keyframes, transition }, subject) => {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AG,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACtE,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,UAAU;AACrB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/subject.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/subject.mjs deleted file mode 100644 index c509d689..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/subject.mjs +++ /dev/null @@ -1,54 +0,0 @@ -import { animateSingleValue, visualElementStore, animateTarget, isMotionValue } from 'motion-dom'; -import { invariant } from 'motion-utils'; -import { createDOMVisualElement, createObjectVisualElement } from '../utils/create-visual-element.mjs'; -import { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs'; -import { resolveSubjects } from './resolve-subjects.mjs'; - -function isSingleValue(subject, keyframes) { - return (isMotionValue(subject) || - typeof subject === "number" || - (typeof subject === "string" && !isDOMKeyframes(keyframes))); -} -/** - * Implementation - */ -function animateSubject(subject, keyframes, options, scope) { - const animations = []; - if (isSingleValue(subject, keyframes)) { - animations.push(animateSingleValue(subject, isDOMKeyframes(keyframes) - ? keyframes.default || keyframes - : keyframes, options ? options.default || options : options)); - } - else { - // Gracefully handle null/undefined subjects (e.g., from querySelector returning null) - if (subject == null) { - return animations; - } - const subjects = resolveSubjects(subject, keyframes, scope); - const numSubjects = subjects.length; - invariant(Boolean(numSubjects), "No valid elements provided.", "no-valid-elements"); - for (let i = 0; i < numSubjects; i++) { - const thisSubject = subjects[i]; - const createVisualElement = thisSubject instanceof Element - ? createDOMVisualElement - : createObjectVisualElement; - if (!visualElementStore.has(thisSubject)) { - createVisualElement(thisSubject); - } - const visualElement = visualElementStore.get(thisSubject); - const transition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if ("delay" in transition && - typeof transition.delay === "function") { - transition.delay = transition.delay(i, numSubjects); - } - animations.push(...animateTarget(visualElement, { ...keyframes, transition }, {})); - } - } - return animations; -} - -export { animateSubject }; -//# sourceMappingURL=subject.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/subject.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/subject.mjs.map deleted file mode 100644 index f366b187..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animate/subject.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subject.mjs","sources":["../../../../src/animation/animate/subject.ts"],"sourcesContent":["import {\n animateTarget,\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n AnyResolvedKeyframe,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n isMotionValue,\n MotionValue,\n TargetAndTransition,\n UnresolvedValueKeyframe,\n ValueAnimationTransition,\n visualElementStore,\n} from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\nimport { ObjectTarget } from \"../sequence/types\"\nimport {\n createDOMVisualElement,\n createObjectVisualElement,\n} from \"../utils/create-visual-element\"\nimport { isDOMKeyframes } from \"../utils/is-dom-keyframes\"\nimport { resolveSubjects } from \"./resolve-subjects\"\nimport { animateSingleValue } from \"motion-dom\"\n\nexport type AnimationSubject = Element | MotionValue | any\n\nfunction isSingleValue(\n subject: unknown,\n keyframes: unknown\n): subject is MotionValue | AnyResolvedKeyframe {\n return (\n isMotionValue(subject) ||\n typeof subject === \"number\" ||\n (typeof subject === \"string\" && !isDOMKeyframes(keyframes))\n )\n}\n\n/**\n * Animate a string\n */\nexport function animateSubject(\n value: string | MotionValue,\n keyframes: string | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a number\n */\nexport function animateSubject(\n value: number | MotionValue,\n keyframes: number | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a Element\n */\nexport function animateSubject(\n element: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a object\n */\nexport function animateSubject(\n object: O | O[],\n keyframes: ObjectTarget,\n options?: DynamicAnimationOptions\n): AnimationPlaybackControlsWithThen[]\n/**\n * Implementation\n */\nexport function animateSubject(\n subject:\n | MotionValue\n | MotionValue\n | number\n | string\n | ElementOrSelector\n | O\n | O[],\n keyframes:\n | number\n | string\n | UnresolvedValueKeyframe[]\n | UnresolvedValueKeyframe[]\n | DOMKeyframesDefinition\n | ObjectTarget,\n options?:\n | ValueAnimationTransition\n | ValueAnimationTransition\n | DynamicAnimationOptions,\n scope?: AnimationScope\n): AnimationPlaybackControlsWithThen[] {\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n if (isSingleValue(subject, keyframes)) {\n animations.push(\n animateSingleValue(\n subject,\n isDOMKeyframes(keyframes)\n ? (keyframes as any).default || keyframes\n : keyframes,\n options ? (options as any).default || options : options\n )\n )\n } else {\n // Gracefully handle null/undefined subjects (e.g., from querySelector returning null)\n if (subject == null) {\n return animations\n }\n\n const subjects = resolveSubjects(\n subject,\n keyframes as DOMKeyframesDefinition,\n scope\n )\n\n const numSubjects = subjects.length\n\n invariant(\n Boolean(numSubjects),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n for (let i = 0; i < numSubjects; i++) {\n const thisSubject = subjects[i]\n\n const createVisualElement =\n thisSubject instanceof Element\n ? createDOMVisualElement\n : createObjectVisualElement\n\n if (!visualElementStore.has(thisSubject)) {\n createVisualElement(thisSubject as any)\n }\n\n const visualElement = visualElementStore.get(thisSubject)!\n const transition = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (\n \"delay\" in transition &&\n typeof transition.delay === \"function\"\n ) {\n transition.delay = transition.delay(i, numSubjects)\n }\n\n animations.push(\n ...animateTarget(\n visualElement,\n { ...(keyframes as {}), transition } as TargetAndTransition,\n {}\n )\n )\n }\n }\n\n return animations\n}\n"],"names":[],"mappings":";;;;;;AA2BA,SAAS,aAAa,CAClB,OAAgB,EAChB,SAAkB,EAAA;AAElB,IAAA,QACI,aAAa,CAAC,OAAO,CAAC;QACtB,OAAO,OAAO,KAAK,QAAQ;AAC3B,SAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AAEnE;AAmCA;;AAEG;AACG,SAAU,cAAc,CAC1B,OAOS,EACT,SAMqB,EACrB,OAG6B,EAC7B,KAAsB,EAAA;IAEtB,MAAM,UAAU,GAAwC,EAAE;AAE1D,IAAA,IAAI,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE;QACnC,UAAU,CAAC,IAAI,CACX,kBAAkB,CACd,OAAO,EACP,cAAc,CAAC,SAAS;AACpB,cAAG,SAAiB,CAAC,OAAO,IAAI;AAChC,cAAE,SAAS,EACf,OAAO,GAAI,OAAe,CAAC,OAAO,IAAI,OAAO,GAAG,OAAO,CAC1D,CACJ;IACL;SAAO;;AAEH,QAAA,IAAI,OAAO,IAAI,IAAI,EAAE;AACjB,YAAA,OAAO,UAAU;QACrB;QAEA,MAAM,QAAQ,GAAG,eAAe,CAC5B,OAAO,EACP,SAAmC,EACnC,KAAK,CACR;AAED,QAAA,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;QAEnC,SAAS,CACL,OAAO,CAAC,WAAW,CAAC,EACpB,6BAA6B,EAC7B,mBAAmB,CACtB;AAED,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE;AAClC,YAAA,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC;AAE/B,YAAA,MAAM,mBAAmB,GACrB,WAAW,YAAY;AACnB,kBAAE;kBACA,yBAAyB;YAEnC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;gBACtC,mBAAmB,CAAC,WAAkB,CAAC;YAC3C;YAEA,MAAM,aAAa,GAAG,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAE;AAC1D,YAAA,MAAM,UAAU,GAAG,EAAE,GAAG,OAAO,EAAE;AAEjC;;AAEG;YACH,IACI,OAAO,IAAI,UAAU;AACrB,gBAAA,OAAO,UAAU,CAAC,KAAK,KAAK,UAAU,EACxC;gBACE,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC;YACvD;AAEA,YAAA,UAAU,CAAC,IAAI,CACX,GAAG,aAAa,CACZ,aAAa,EACb,EAAE,GAAI,SAAgB,EAAE,UAAU,EAAyB,EAC3D,EAAE,CACL,CACJ;QACL;IACJ;AAEA,IAAA,OAAO,UAAU;AACrB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs deleted file mode 100644 index ce716455..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +++ /dev/null @@ -1,110 +0,0 @@ -import { resolveElements, getValueTransition, getAnimationMap, animationMapKey, getComputedStyle, fillWildcards, applyPxDefaults, NativeAnimation } from 'motion-dom'; -import { invariant, secondsToMilliseconds } from 'motion-utils'; - -function animateElements(elementOrSelector, keyframes, options, scope) { - // Gracefully handle null/undefined elements (e.g., from querySelector returning null) - if (elementOrSelector == null) { - return []; - } - const elements = resolveElements(elementOrSelector, scope); - const numElements = elements.length; - invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements"); - /** - * WAAPI doesn't support interrupting animations. - * - * Therefore, starting animations requires a three-step process: - * 1. Stop existing animations (write styles to DOM) - * 2. Resolve keyframes (read styles from DOM) - * 3. Create new animations (write styles to DOM) - * - * The hybrid `animate()` function uses AsyncAnimation to resolve - * keyframes before creating new animations, which removes style - * thrashing. Here, we have much stricter filesize constraints. - * Therefore we do this in a synchronous way that ensures that - * at least within `animate()` calls there is no style thrashing. - * - * In the motion-native-animate-mini-interrupt benchmark this - * was 80% faster than a single loop. - */ - const animationDefinitions = []; - /** - * Step 1: Build options and stop existing animations (write) - */ - for (let i = 0; i < numElements; i++) { - const element = elements[i]; - const elementTransition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if (typeof elementTransition.delay === "function") { - elementTransition.delay = elementTransition.delay(i, numElements); - } - for (const valueName in keyframes) { - let valueKeyframes = keyframes[valueName]; - if (!Array.isArray(valueKeyframes)) { - valueKeyframes = [valueKeyframes]; - } - const valueOptions = { - ...getValueTransition(elementTransition, valueName), - }; - valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay)); - /** - * If there's an existing animation playing on this element then stop it - * before creating a new one. - */ - const map = getAnimationMap(element); - const key = animationMapKey(valueName, valueOptions.pseudoElement || ""); - const currentAnimation = map.get(key); - currentAnimation && currentAnimation.stop(); - animationDefinitions.push({ - map, - key, - unresolvedKeyframes: valueKeyframes, - options: { - ...valueOptions, - element, - name: valueName, - allowFlatten: !elementTransition.type && !elementTransition.ease, - }, - }); - } - } - /** - * Step 2: Resolve keyframes (read) - */ - for (let i = 0; i < animationDefinitions.length; i++) { - const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i]; - const { element, name, pseudoElement } = animationOptions; - if (!pseudoElement && unresolvedKeyframes[0] === null) { - unresolvedKeyframes[0] = getComputedStyle(element, name); - } - fillWildcards(unresolvedKeyframes); - applyPxDefaults(unresolvedKeyframes, name); - /** - * If we only have one keyframe, explicitly read the initial keyframe - * from the computed style. This is to ensure consistency with WAAPI behaviour - * for restarting animations, for instance .play() after finish, when it - * has one vs two keyframes. - */ - if (!pseudoElement && unresolvedKeyframes.length < 2) { - unresolvedKeyframes.unshift(getComputedStyle(element, name)); - } - animationOptions.keyframes = unresolvedKeyframes; - } - /** - * Step 3: Create new animations (write) - */ - const animations = []; - for (let i = 0; i < animationDefinitions.length; i++) { - const { map, key, options: animationOptions } = animationDefinitions[i]; - const animation = new NativeAnimation(animationOptions); - map.set(key, animation); - animation.finished.finally(() => map.delete(key)); - animations.push(animation); - } - return animations; -} - -export { animateElements }; -//# sourceMappingURL=animate-elements.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs.map deleted file mode 100644 index ee9f79e0..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animate-elements.mjs","sources":["../../../../../src/animation/animators/waapi/animate-elements.ts"],"sourcesContent":["import {\n animationMapKey,\n AnimationPlaybackControls,\n AnimationScope,\n applyPxDefaults,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n fillWildcards,\n getAnimationMap,\n getComputedStyle,\n getValueTransition,\n NativeAnimation,\n NativeAnimationOptions,\n resolveElements,\n UnresolvedValueKeyframe,\n ValueKeyframe,\n} from \"motion-dom\"\nimport { invariant, secondsToMilliseconds } from \"motion-utils\"\n\ninterface AnimationDefinition {\n map: Map>\n key: string\n unresolvedKeyframes: UnresolvedValueKeyframe[]\n options: Omit & {\n keyframes?: ValueKeyframe[]\n }\n}\n\nexport function animateElements(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n) {\n // Gracefully handle null/undefined elements (e.g., from querySelector returning null)\n if (elementOrSelector == null) {\n return []\n }\n\n const elements = resolveElements(elementOrSelector, scope) as Array<\n HTMLElement | SVGElement\n >\n const numElements = elements.length\n\n invariant(\n Boolean(numElements),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions: AnimationDefinition[] = []\n\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i]\n const elementTransition: DynamicAnimationOptions = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements)\n }\n\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName as keyof typeof keyframes]!\n\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes]\n }\n\n const valueOptions = {\n ...getValueTransition(elementTransition as any, valueName),\n }\n\n valueOptions.duration &&= secondsToMilliseconds(\n valueOptions.duration\n )\n\n valueOptions.delay &&= secondsToMilliseconds(valueOptions.delay)\n\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element)\n const key = animationMapKey(\n valueName,\n valueOptions.pseudoElement || \"\"\n )\n const currentAnimation = map.get(key)\n currentAnimation && currentAnimation.stop()\n\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n options: {\n ...valueOptions,\n element,\n name: valueName,\n allowFlatten:\n !elementTransition.type && !elementTransition.ease,\n },\n })\n }\n }\n\n /**\n * Step 2: Resolve keyframes (read)\n */\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { unresolvedKeyframes, options: animationOptions } =\n animationDefinitions[i]\n\n const { element, name, pseudoElement } = animationOptions\n if (!pseudoElement && unresolvedKeyframes[0] === null) {\n unresolvedKeyframes[0] = getComputedStyle(element, name)\n }\n\n fillWildcards(unresolvedKeyframes)\n applyPxDefaults(unresolvedKeyframes, name)\n\n /**\n * If we only have one keyframe, explicitly read the initial keyframe\n * from the computed style. This is to ensure consistency with WAAPI behaviour\n * for restarting animations, for instance .play() after finish, when it\n * has one vs two keyframes.\n */\n if (!pseudoElement && unresolvedKeyframes.length < 2) {\n unresolvedKeyframes.unshift(getComputedStyle(element, name))\n }\n\n animationOptions.keyframes = unresolvedKeyframes as ValueKeyframe[]\n }\n\n /**\n * Step 3: Create new animations (write)\n */\n const animations: AnimationPlaybackControls[] = []\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { map, key, options: animationOptions } = animationDefinitions[i]\n const animation = new NativeAnimation(\n animationOptions as NativeAnimationOptions\n )\n\n map.set(key, animation)\n animation.finished.finally(() => map.delete(key))\n\n animations.push(animation)\n }\n\n return animations\n}\n"],"names":[],"mappings":";;;AA6BM,SAAU,eAAe,CAC3B,iBAAoC,EACpC,SAAiC,EACjC,OAAiC,EACjC,KAAsB,EAAA;;AAGtB,IAAA,IAAI,iBAAiB,IAAI,IAAI,EAAE;AAC3B,QAAA,OAAO,EAAE;IACb;IAEA,MAAM,QAAQ,GAAG,eAAe,CAAC,iBAAiB,EAAE,KAAK,CAExD;AACD,IAAA,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;IAEnC,SAAS,CACL,OAAO,CAAC,WAAW,CAAC,EACpB,6BAA6B,EAC7B,mBAAmB,CACtB;AAED;;;;;;;;;;;;;;;;AAgBG;IACH,MAAM,oBAAoB,GAA0B,EAAE;AAEtD;;AAEG;AACH,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAA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CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC;AACvB,QAAA,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAEjD,QAAA,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;IAC9B;AAEA,IAAA,OAAO,UAAU;AACrB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs deleted file mode 100644 index b4a8bf09..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { GroupAnimationWithThen } from 'motion-dom'; -import { createAnimationsFromSequence } from '../../sequence/create.mjs'; -import { animateElements } from './animate-elements.mjs'; - -function animateSequence(definition, options) { - const animations = []; - createAnimationsFromSequence(definition, options).forEach(({ keyframes, transition }, element) => { - animations.push(...animateElements(element, keyframes, transition)); - }); - return new GroupAnimationWithThen(animations); -} - -export { animateSequence }; -//# sourceMappingURL=animate-sequence.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs.map deleted file mode 100644 index 07108a2b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animate-sequence.mjs","sources":["../../../../../src/animation/animators/waapi/animate-sequence.ts"],"sourcesContent":["import { AnimationPlaybackControls, GroupAnimationWithThen } from \"motion-dom\"\nimport { createAnimationsFromSequence } from \"../../sequence/create\"\nimport { AnimationSequence, SequenceOptions } from \"../../sequence/types\"\nimport { animateElements } from \"./animate-elements\"\n\nexport function animateSequence(\n definition: AnimationSequence,\n options?: SequenceOptions\n) {\n const animations: AnimationPlaybackControls[] = []\n\n createAnimationsFromSequence(definition, options).forEach(\n ({ keyframes, transition }, element: Element) => {\n animations.push(...animateElements(element, keyframes, transition))\n }\n )\n\n return new GroupAnimationWithThen(animations)\n}\n"],"names":[],"mappings":";;;;AAKM,SAAU,eAAe,CAC3B,UAA6B,EAC7B,OAAyB,EAAA;IAEzB,MAAM,UAAU,GAAgC,EAAE;AAElD,IAAA,4BAA4B,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,OAAO,CACrD,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,OAAgB,KAAI;AAC5C,QAAA,UAAU,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACvE,IAAA,CAAC,CACJ;AAED,IAAA,OAAO,IAAI,sBAAsB,CAAC,UAAU,CAAC;AACjD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs deleted file mode 100644 index 070daf12..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +++ /dev/null @@ -1,13 +0,0 @@ -import { GroupAnimationWithThen } from 'motion-dom'; -import { animateElements } from './animate-elements.mjs'; - -const createScopedWaapiAnimate = (scope) => { - function scopedAnimate(elementOrSelector, keyframes, options) { - return new GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope)); - } - return scopedAnimate; -}; -const animateMini = /*@__PURE__*/ createScopedWaapiAnimate(); - -export { animateMini, createScopedWaapiAnimate }; -//# sourceMappingURL=animate-style.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs.map deleted file mode 100644 index eda8aac4..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animate-style.mjs","sources":["../../../../../src/animation/animators/waapi/animate-style.ts"],"sourcesContent":["import {\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n GroupAnimationWithThen,\n} from \"motion-dom\"\nimport { animateElements } from \"./animate-elements\"\n\nexport const createScopedWaapiAnimate = (scope?: AnimationScope) => {\n function scopedAnimate(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions\n ): AnimationPlaybackControlsWithThen {\n return new GroupAnimationWithThen(\n animateElements(\n elementOrSelector,\n keyframes as DOMKeyframesDefinition,\n options,\n scope\n )\n )\n }\n\n return scopedAnimate\n}\n\nexport const animateMini = /*@__PURE__*/ createScopedWaapiAnimate()\n"],"names":[],"mappings":";;;AAUO,MAAM,wBAAwB,GAAG,CAAC,KAAsB,KAAI;AAC/D,IAAA,SAAS,aAAa,CAClB,iBAAoC,EACpC,SAAiC,EACjC,OAAiC,EAAA;AAEjC,QAAA,OAAO,IAAI,sBAAsB,CAC7B,eAAe,CACX,iBAAiB,EACjB,SAAmC,EACnC,OAAO,EACP,KAAK,CACR,CACJ;IACL;AAEA,IAAA,OAAO,aAAa;AACxB;MAEa,WAAW,iBAAiB,wBAAwB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs deleted file mode 100644 index 7fd8c213..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs +++ /dev/null @@ -1,80 +0,0 @@ -import { animateVisualElement, setTarget } from 'motion-dom'; -import { invariant } from 'motion-utils'; - -function stopAnimation(visualElement) { - visualElement.values.forEach((value) => value.stop()); -} -function setVariants(visualElement, variantLabels) { - const reversedLabels = [...variantLabels].reverse(); - reversedLabels.forEach((key) => { - const variant = visualElement.getVariant(key); - variant && setTarget(visualElement, variant); - if (visualElement.variantChildren) { - visualElement.variantChildren.forEach((child) => { - setVariants(child, variantLabels); - }); - } - }); -} -function setValues(visualElement, definition) { - if (Array.isArray(definition)) { - return setVariants(visualElement, definition); - } - else if (typeof definition === "string") { - return setVariants(visualElement, [definition]); - } - else { - setTarget(visualElement, definition); - } -} -/** - * @public - */ -function animationControls() { - /** - * Track whether the host component has mounted. - */ - let hasMounted = false; - /** - * A collection of linked component animation controls. - */ - const subscribers = new Set(); - const controls = { - subscribe(visualElement) { - subscribers.add(visualElement); - return () => void subscribers.delete(visualElement); - }, - start(definition, transitionOverride) { - invariant(hasMounted, "controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook."); - const animations = []; - subscribers.forEach((visualElement) => { - animations.push(animateVisualElement(visualElement, definition, { - transitionOverride, - })); - }); - return Promise.all(animations); - }, - set(definition) { - invariant(hasMounted, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."); - return subscribers.forEach((visualElement) => { - setValues(visualElement, definition); - }); - }, - stop() { - subscribers.forEach((visualElement) => { - stopAnimation(visualElement); - }); - }, - mount() { - hasMounted = true; - return () => { - hasMounted = false; - controls.stop(); - }; - }, - }; - return controls; -} - -export { animationControls, setValues }; -//# sourceMappingURL=animation-controls.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.map deleted file mode 100644 index 3fd62d2b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animation-controls.mjs","sources":["../../../../src/animation/hooks/animation-controls.ts"],"sourcesContent":["import {\n animateVisualElement,\n setTarget,\n type AnimationDefinition,\n type LegacyAnimationControls,\n type VisualElement,\n} from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\n\nfunction stopAnimation(visualElement: VisualElement) {\n visualElement.values.forEach((value) => value.stop())\n}\n\nfunction setVariants(visualElement: VisualElement, variantLabels: string[]) {\n const reversedLabels = [...variantLabels].reverse()\n\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key)\n variant && setTarget(visualElement, variant)\n\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((child) => {\n setVariants(child, variantLabels)\n })\n }\n })\n}\n\nexport function setValues(\n visualElement: VisualElement,\n definition: AnimationDefinition\n) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition)\n } else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition])\n } else {\n setTarget(visualElement, definition as any)\n }\n}\n\n/**\n * @public\n */\nexport function animationControls(): LegacyAnimationControls {\n /**\n * Track whether the host component has mounted.\n */\n let hasMounted = false\n\n /**\n * A collection of linked component animation controls.\n */\n const subscribers = new Set()\n\n const controls: LegacyAnimationControls = {\n subscribe(visualElement) {\n subscribers.add(visualElement)\n return () => void subscribers.delete(visualElement)\n },\n\n start(definition, transitionOverride) {\n invariant(\n hasMounted,\n \"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.\"\n )\n\n const animations: Array> = []\n subscribers.forEach((visualElement) => {\n animations.push(\n animateVisualElement(visualElement, definition, {\n transitionOverride,\n })\n )\n })\n\n return Promise.all(animations)\n },\n\n set(definition) {\n invariant(\n hasMounted,\n \"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.\"\n )\n\n return subscribers.forEach((visualElement) => {\n setValues(visualElement, definition)\n })\n },\n\n stop() {\n subscribers.forEach((visualElement) => {\n stopAnimation(visualElement)\n })\n },\n\n mount() {\n hasMounted = true\n\n return () => {\n hasMounted = false\n controls.stop()\n }\n },\n }\n\n return controls\n}\n"],"names":[],"mappings":";;;AASA,SAAS,aAAa,CAAC,aAA4B,EAAA;AAC/C,IAAA,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,EAAE,CAAC;AACzD;AAEA,SAAS,WAAW,CAAC,aAA4B,EAAE,aAAuB,EAAA;IACtE,MAAM,cAAc,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,OAAO,EAAE;AAEnD,IAAA,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;QAC3B,MAAM,OAAO,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC;AAC7C,QAAA,OAAO,IAAI,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC;AAE5C,QAAA,IAAI,aAAa,CAAC,eAAe,EAAE;YAC/B,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AAC5C,gBAAA,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC;AACrC,YAAA,CAAC,CAAC;QACN;AACJ,IAAA,CAAC,CAAC;AACN;AAEM,SAAU,SAAS,CACrB,aAA4B,EAC5B,UAA+B,EAAA;AAE/B,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC3B,QAAA,OAAO,WAAW,CAAC,aAAa,EAAE,UAAU,CAAC;IACjD;AAAO,SAAA,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QACvC,OAAO,WAAW,CAAC,aAAa,EAAE,CAAC,UAAU,CAAC,CAAC;IACnD;SAAO;AACH,QAAA,SAAS,CAAC,aAAa,EAAE,UAAiB,CAAC;IAC/C;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,IAAA,OAAO,QAAQ;AACnB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate-style.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate-style.mjs deleted file mode 100644 index b2715b83..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate-style.mjs +++ /dev/null @@ -1,19 +0,0 @@ -"use client"; -import { useConstant } from '../../utils/use-constant.mjs'; -import { useUnmountEffect } from '../../utils/use-unmount-effect.mjs'; -import { createScopedWaapiAnimate } from '../animators/waapi/animate-style.mjs'; - -function useAnimateMini() { - const scope = useConstant(() => ({ - current: null, // Will be hydrated by React - animations: [], - })); - const animate = useConstant(() => createScopedWaapiAnimate(scope)); - useUnmountEffect(() => { - scope.animations.forEach((animation) => animation.stop()); - }); - return [scope, animate]; -} - -export { useAnimateMini }; -//# sourceMappingURL=use-animate-style.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate-style.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate-style.mjs.map deleted file mode 100644 index 2ccff9f8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate-style.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-animate-style.mjs","sources":["../../../../src/animation/hooks/use-animate-style.ts"],"sourcesContent":["\"use client\"\n\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useUnmountEffect } from \"../../utils/use-unmount-effect\"\nimport { createScopedWaapiAnimate } from \"../animators/waapi/animate-style\"\nimport { AnimationScope } from \"motion-dom\"\n\nexport function useAnimateMini() {\n const scope: AnimationScope = useConstant(() => ({\n current: null!, // Will be hydrated by React\n animations: [],\n }))\n\n const animate = useConstant(() => createScopedWaapiAnimate(scope))\n\n useUnmountEffect(() => {\n scope.animations.forEach((animation) => animation.stop())\n })\n\n return [scope, animate] as [AnimationScope, typeof animate]\n}\n"],"names":[],"mappings":";;;;;;AAQI;;AAEI;AACH;AAED;;AAGI;AACJ;AAEA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs deleted file mode 100644 index 2bcd19bb..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs +++ /dev/null @@ -1,25 +0,0 @@ -"use client"; -import { useContext, useMemo } from 'react'; -import { useConstant } from '../../utils/use-constant.mjs'; -import { useUnmountEffect } from '../../utils/use-unmount-effect.mjs'; -import { useReducedMotionConfig } from '../../utils/reduced-motion/use-reduced-motion-config.mjs'; -import { MotionConfigContext } from '../../context/MotionConfigContext.mjs'; -import { createScopedAnimate } from '../animate/index.mjs'; - -function useAnimate() { - const scope = useConstant(() => ({ - current: null, // Will be hydrated by React - animations: [], - })); - const reduceMotion = useReducedMotionConfig() ?? undefined; - const { skipAnimations } = useContext(MotionConfigContext); - const animate = useMemo(() => createScopedAnimate({ scope, reduceMotion, skipAnimations }), [scope, reduceMotion, skipAnimations]); - useUnmountEffect(() => { - scope.animations.forEach((animation) => animation.stop()); - scope.animations.length = 0; - }); - return [scope, animate]; -} - -export { useAnimate }; -//# sourceMappingURL=use-animate.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs.map deleted file mode 100644 index 8c23b7e4..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-animate.mjs","sources":["../../../../src/animation/hooks/use-animate.ts"],"sourcesContent":["\"use client\"\n\nimport { useContext, useMemo } from \"react\"\nimport { AnimationScope } from \"motion-dom\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useUnmountEffect } from \"../../utils/use-unmount-effect\"\nimport { useReducedMotionConfig } from \"../../utils/reduced-motion/use-reduced-motion-config\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { createScopedAnimate } from \"../animate\"\n\nexport function useAnimate() {\n const scope: AnimationScope = useConstant(() => ({\n current: null!, // Will be hydrated by React\n animations: [],\n }))\n\n const reduceMotion = useReducedMotionConfig() ?? undefined\n const { skipAnimations } = useContext(MotionConfigContext)\n\n const animate = useMemo(\n () => createScopedAnimate({ scope, reduceMotion, skipAnimations }),\n [scope, reduceMotion, skipAnimations]\n )\n\n useUnmountEffect(() => {\n scope.animations.forEach((animation) => animation.stop())\n scope.animations.length = 0\n })\n\n return [scope, animate] as [AnimationScope, typeof animate]\n}\n"],"names":[],"mappings":";;;;;;;;;AAWI;;AAEI;AACH;AAED;;;;AASI;AACA;AACJ;AAEA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs deleted file mode 100644 index 2f48d0fe..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs +++ /dev/null @@ -1,64 +0,0 @@ -"use client"; -import { animateVisualElement, VisualElement, createBox } from 'motion-dom'; -import { useState, useLayoutEffect } from 'react'; -import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs'; -import { useConstant } from '../../utils/use-constant.mjs'; - -const createObject = () => ({}); -class StateVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.measureInstanceViewportBox = createBox; - } - build() { } - resetTransform() { } - restoreTransform() { } - removeValueFromRenderState() { } - renderInstance() { } - scrapeMotionValuesFromProps() { - return createObject(); - } - getBaseTargetFromProps() { - return undefined; - } - readValueFromInstance(_state, key, options) { - return options.initialState[key] || 0; - } - sortInstanceNodePosition() { - return 0; - } -} -const useVisualState = makeUseVisualState({ - scrapeMotionValuesFromProps: createObject, - createRenderState: createObject, -}); -/** - * This is not an officially supported API and may be removed - * on any version. - */ -function useAnimatedState(initialState) { - const [animationState, setAnimationState] = useState(initialState); - const visualState = useVisualState({}, false); - const element = useConstant(() => { - return new StateVisualElement({ - props: { - onUpdate: (v) => { - setAnimationState({ ...v }); - }, - }, - visualState, - presenceContext: null, - }, { initialState }); - }); - useLayoutEffect(() => { - element.mount({}); - return () => element.unmount(); - }, [element]); - const startAnimation = useConstant(() => (animationDefinition) => { - return animateVisualElement(element, animationDefinition); - }); - return [animationState, startAnimation]; -} - -export { useAnimatedState }; -//# sourceMappingURL=use-animated-state.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs.map deleted file mode 100644 index 480d4019..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-animated-state.mjs","sources":["../../../../src/animation/hooks/use-animated-state.ts"],"sourcesContent":["\"use client\"\n\nimport {\n animateVisualElement,\n createBox,\n ResolvedValues,\n TargetAndTransition,\n VisualElement,\n} from \"motion-dom\"\nimport { useLayoutEffect, useState } from \"react\"\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\"\nimport { useConstant } from \"../../utils/use-constant\"\n\ninterface AnimatedStateOptions {\n initialState: ResolvedValues\n}\n\nconst createObject = () => ({})\n\nclass StateVisualElement extends VisualElement<\n ResolvedValues,\n {},\n AnimatedStateOptions\n> {\n type: \"state\"\n build() {}\n measureInstanceViewportBox = createBox\n resetTransform() {}\n restoreTransform() {}\n removeValueFromRenderState() {}\n renderInstance() {}\n scrapeMotionValuesFromProps() {\n return createObject()\n }\n getBaseTargetFromProps() {\n return undefined\n }\n\n readValueFromInstance(\n _state: ResolvedValues,\n key: string,\n options: AnimatedStateOptions\n ) {\n return options.initialState[key] || 0\n }\n\n sortInstanceNodePosition() {\n return 0\n }\n}\n\nconst useVisualState = makeUseVisualState({\n scrapeMotionValuesFromProps: createObject,\n createRenderState: createObject,\n})\n\n/**\n * This is not an officially supported API and may be removed\n * on any version.\n */\nexport function useAnimatedState(initialState: any) {\n const [animationState, setAnimationState] = useState(initialState)\n const visualState = useVisualState({}, false)\n\n const element = useConstant(() => {\n return new StateVisualElement(\n {\n props: {\n onUpdate: (v) => {\n setAnimationState({ ...v })\n },\n },\n visualState,\n presenceContext: null,\n },\n { initialState }\n )\n })\n\n useLayoutEffect(() => {\n element.mount({})\n return () => element.unmount()\n }, [element])\n\n const startAnimation = useConstant(\n () => (animationDefinition: TargetAndTransition) => {\n return animateVisualElement(element, animationDefinition)\n }\n )\n\n return [animationState, startAnimation]\n}\n"],"names":[],"mappings":";;;;;;AAiBA;AAEA;AAAA;;;;AAMI;AAEA;AACA;AACA;AACA;;;;;AAKI;;AAGJ;;;;AASI;;AAEP;AAED;AACI;AACA;AACH;AAED;;;AAGG;AACG;;;AAIF;;AAGY;AACI;AACI;;AAEP;;AAED;AACH;AAGT;;AAGI;AACA;AACJ;;AAIQ;AACJ;AAGJ;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs deleted file mode 100644 index b40fbe95..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs +++ /dev/null @@ -1,43 +0,0 @@ -"use client"; -import { useConstant } from '../../utils/use-constant.mjs'; -import { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs'; -import { animationControls } from './animation-controls.mjs'; - -/** - * Creates `LegacyAnimationControls`, which can be used to manually start, stop - * and sequence animations on one or more components. - * - * The returned `LegacyAnimationControls` should be passed to the `animate` property - * of the components you want to animate. - * - * These components can then be animated with the `start` method. - * - * ```jsx - * import * as React from 'react' - * import { motion, useAnimation } from 'framer-motion' - * - * export function MyComponent(props) { - * const controls = useAnimation() - * - * controls.start({ - * x: 100, - * transition: { duration: 0.5 }, - * }) - * - * return - * } - * ``` - * - * @returns Animation controller with `start` and `stop` methods - * - * @public - */ -function useAnimationControls() { - const controls = useConstant(animationControls); - useIsomorphicLayoutEffect(controls.mount, []); - return controls; -} -const useAnimation = useAnimationControls; - -export { useAnimation, useAnimationControls }; -//# sourceMappingURL=use-animation.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs.map deleted file mode 100644 index bea4be52..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-animation.mjs","sources":["../../../../src/animation/hooks/use-animation.ts"],"sourcesContent":["\"use client\"\n\nimport { LegacyAnimationControls } from \"motion-dom\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useIsomorphicLayoutEffect } from \"../../utils/use-isomorphic-effect\"\nimport { animationControls } from \"./animation-controls\"\n\n/**\n * Creates `LegacyAnimationControls`, which can be used to manually start, stop\n * and sequence animations on one or more components.\n *\n * The returned `LegacyAnimationControls` should be passed to the `animate` property\n * of the components you want to animate.\n *\n * These components can then be animated with the `start` method.\n *\n * ```jsx\n * import * as React from 'react'\n * import { motion, useAnimation } from 'framer-motion'\n *\n * export function MyComponent(props) {\n * const controls = useAnimation()\n *\n * controls.start({\n * x: 100,\n * transition: { duration: 0.5 },\n * })\n *\n * return \n * }\n * ```\n *\n * @returns Animation controller with `start` and `stop` methods\n *\n * @public\n */\nexport function useAnimationControls(): LegacyAnimationControls {\n const controls = useConstant(animationControls)\n\n useIsomorphicLayoutEffect(controls.mount, [])\n\n return controls\n}\n\nexport const useAnimation = useAnimationControls\n"],"names":[],"mappings":";;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;;AAEC;AAEA;AAEA;AACJ;AAEO;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs deleted file mode 100644 index ebdd478d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs +++ /dev/null @@ -1,39 +0,0 @@ -import { appearAnimationStore } from './store.mjs'; -import { appearStoreId } from './store-id.mjs'; - -function handoffOptimizedAppearAnimation(elementId, valueName, frame) { - const storeId = appearStoreId(elementId, valueName); - const optimisedAnimation = appearAnimationStore.get(storeId); - if (!optimisedAnimation) { - return null; - } - const { animation, startTime } = optimisedAnimation; - function cancelAnimation() { - window.MotionCancelOptimisedAnimation?.(elementId, valueName, frame); - } - /** - * We can cancel the animation once it's finished now that we've synced - * with Motion. - * - * Prefer onfinish over finished as onfinish is backwards compatible with - * older browsers. - */ - animation.onfinish = cancelAnimation; - if (startTime === null || window.MotionHandoffIsComplete?.(elementId)) { - /** - * If the startTime is null, this animation is the Paint Ready detection animation - * and we can cancel it immediately without handoff. - * - * Or if we've already handed off the animation then we're now interrupting it. - * In which case we need to cancel it. - */ - cancelAnimation(); - return null; - } - else { - return startTime; - } -} - -export { handoffOptimizedAppearAnimation }; -//# sourceMappingURL=handoff.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs.map deleted file mode 100644 index 94affb52..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handoff.mjs","sources":["../../../../src/animation/optimized-appear/handoff.ts"],"sourcesContent":["import type { Batcher } from \"motion-dom\"\nimport { appearAnimationStore } from \"./store\"\nimport { appearStoreId } from \"./store-id\"\n\nexport function handoffOptimizedAppearAnimation(\n elementId: string,\n valueName: string,\n frame: Batcher\n): number | null {\n const storeId = appearStoreId(elementId, valueName)\n const optimisedAnimation = appearAnimationStore.get(storeId)\n\n if (!optimisedAnimation) {\n return null\n }\n\n const { animation, startTime } = optimisedAnimation\n\n function cancelAnimation() {\n window.MotionCancelOptimisedAnimation?.(elementId, valueName, frame)\n }\n\n /**\n * We can cancel the animation once it's finished now that we've synced\n * with Motion.\n *\n * Prefer onfinish over finished as onfinish is backwards compatible with\n * older browsers.\n */\n animation.onfinish = cancelAnimation\n\n if (startTime === null || window.MotionHandoffIsComplete?.(elementId)) {\n /**\n * If the startTime is null, this animation is the Paint Ready detection animation\n * and we can cancel it immediately without handoff.\n *\n * Or if we've already handed off the animation then we're now interrupting it.\n * In which case we need to cancel it.\n */\n cancelAnimation()\n return null\n } else {\n return startTime\n }\n}\n"],"names":[],"mappings":";;;SAIgB,+BAA+B,CAC3C,SAAiB,EACjB,SAAiB,EACjB,KAAc,EAAA;IAEd,MAAM,OAAO,GAAG,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC;IACnD,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC;IAE5D,IAAI,CAAC,kBAAkB,EAAE;AACrB,QAAA,OAAO,IAAI;IACf;AAEA,IAAA,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,kBAAkB;AAEnD,IAAA,SAAS,eAAe,GAAA;QACpB,MAAM,CAAC,8BAA8B,GAAG,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC;IACxE;AAEA;;;;;;AAMG;AACH,IAAA,SAAS,CAAC,QAAQ,GAAG,eAAe;AAEpC,IAAA,IAAI,SAAS,KAAK,IAAI,IAAI,MAAM,CAAC,uBAAuB,GAAG,SAAS,CAAC,EAAE;AACnE;;;;;;AAMG;AACH,QAAA,eAAe,EAAE;AACjB,QAAA,OAAO,IAAI;IACf;SAAO;AACH,QAAA,OAAO,SAAS;IACpB;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs deleted file mode 100644 index e5261855..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs +++ /dev/null @@ -1,170 +0,0 @@ -import { optimizedAppearDataId, startWaapiAnimation, getOptimisedAppearId } from 'motion-dom'; -import { noop } from 'motion-utils'; -import { handoffOptimizedAppearAnimation } from './handoff.mjs'; -import { appearAnimationStore, appearComplete } from './store.mjs'; -import { appearStoreId } from './store-id.mjs'; - -/** - * A single time to use across all animations to manually set startTime - * and ensure they're all in sync. - */ -let startFrameTime; -/** - * A dummy animation to detect when Chrome is ready to start - * painting the page and hold off from triggering the real animation - * until then. We only need one animation to detect paint ready. - * - * https://bugs.chromium.org/p/chromium/issues/detail?id=1406850 - */ -let readyAnimation; -/** - * Keep track of animations that were suspended vs cancelled so we - * can easily resume them when we're done measuring layout. - */ -const suspendedAnimations = new Set(); -function resumeSuspendedAnimations() { - suspendedAnimations.forEach((data) => { - data.animation.play(); - data.animation.startTime = data.startTime; - }); - suspendedAnimations.clear(); -} -function startOptimizedAppearAnimation(element, name, keyframes, options, onReady) { - // Prevent optimised appear animations if Motion has already started animating. - if (window.MotionIsMounted) { - return; - } - const id = element.dataset[optimizedAppearDataId]; - if (!id) - return; - window.MotionHandoffAnimation = handoffOptimizedAppearAnimation; - const storeId = appearStoreId(id, name); - if (!readyAnimation) { - readyAnimation = startWaapiAnimation(element, name, [keyframes[0], keyframes[0]], - /** - * 10 secs is basically just a super-safe duration to give Chrome - * long enough to get the animation ready. - */ - { duration: 10000, ease: "linear" }); - appearAnimationStore.set(storeId, { - animation: readyAnimation, - startTime: null, - }); - /** - * If there's no readyAnimation then there's been no instantiation - * of handoff animations. - */ - window.MotionHandoffAnimation = handoffOptimizedAppearAnimation; - window.MotionHasOptimisedAnimation = (elementId, valueName) => { - if (!elementId) - return false; - /** - * Keep a map of elementIds that have started animating. We check - * via ID instead of Element because of hydration errors and - * pre-hydration checks. We also actively record IDs as they start - * animating rather than simply checking for data-appear-id as - * this attrbute might be present but not lead to an animation, for - * instance if the element's appear animation is on a different - * breakpoint. - */ - if (!valueName) { - return appearComplete.has(elementId); - } - const animationId = appearStoreId(elementId, valueName); - return Boolean(appearAnimationStore.get(animationId)); - }; - window.MotionHandoffMarkAsComplete = (elementId) => { - if (appearComplete.has(elementId)) { - appearComplete.set(elementId, true); - } - }; - window.MotionHandoffIsComplete = (elementId) => { - return appearComplete.get(elementId) === true; - }; - /** - * We only need to cancel transform animations as - * they're the ones that will interfere with the - * layout animation measurements. - */ - window.MotionCancelOptimisedAnimation = (elementId, valueName, frame, canResume) => { - const animationId = appearStoreId(elementId, valueName); - const data = appearAnimationStore.get(animationId); - if (!data) - return; - if (frame && canResume === undefined) { - /** - * Wait until the end of the subsequent frame to cancel the animation - * to ensure we don't remove the animation before the main thread has - * had a chance to resolve keyframes and render. - */ - frame.postRender(() => { - frame.postRender(() => { - data.animation.cancel(); - }); - }); - } - else { - data.animation.cancel(); - } - if (frame && canResume) { - suspendedAnimations.add(data); - frame.render(resumeSuspendedAnimations); - } - else { - appearAnimationStore.delete(animationId); - /** - * If there are no more animations left, we can remove the cancel function. - * This will let us know when we can stop checking for conflicting layout animations. - */ - if (!appearAnimationStore.size) { - window.MotionCancelOptimisedAnimation = undefined; - } - } - }; - window.MotionCheckAppearSync = (visualElement, valueName, value) => { - const appearId = getOptimisedAppearId(visualElement); - if (!appearId) - return; - const valueIsOptimised = window.MotionHasOptimisedAnimation?.(appearId, valueName); - const externalAnimationValue = visualElement.props.values?.[valueName]; - if (!valueIsOptimised || !externalAnimationValue) - return; - const removeSyncCheck = value.on("change", (latestValue) => { - if (externalAnimationValue.get() !== latestValue) { - window.MotionCancelOptimisedAnimation?.(appearId, valueName); - removeSyncCheck(); - } - }); - return removeSyncCheck; - }; - } - const startAnimation = () => { - readyAnimation.cancel(); - const appearAnimation = startWaapiAnimation(element, name, keyframes, options); - /** - * Record the time of the first started animation. We call performance.now() once - * here and once in handoff to ensure we're getting - * close to a frame-locked time. This keeps all animations in sync. - */ - if (startFrameTime === undefined) { - startFrameTime = performance.now(); - } - appearAnimation.startTime = startFrameTime; - appearAnimationStore.set(storeId, { - animation: appearAnimation, - startTime: startFrameTime, - }); - if (onReady) - onReady(appearAnimation); - }; - appearComplete.set(id, false); - if (readyAnimation.ready) { - readyAnimation.ready.then(startAnimation).catch(noop); - } - else { - startAnimation(); - } -} - -export { startOptimizedAppearAnimation }; -//# sourceMappingURL=start.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs.map deleted file mode 100644 index 316ebffc..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"start.mjs","sources":["../../../../src/animation/optimized-appear/start.ts"],"sourcesContent":["import {\n AnyResolvedKeyframe,\n Batcher,\n getOptimisedAppearId,\n MotionValue,\n optimizedAppearDataId,\n startWaapiAnimation,\n ValueAnimationTransition,\n type WithAppearProps,\n} from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { handoffOptimizedAppearAnimation } from \"./handoff\"\nimport { appearAnimationStore, appearComplete, AppearStoreEntry } from \"./store\"\nimport { appearStoreId } from \"./store-id\"\n\n/**\n * A single time to use across all animations to manually set startTime\n * and ensure they're all in sync.\n */\nlet startFrameTime: number\n\n/**\n * A dummy animation to detect when Chrome is ready to start\n * painting the page and hold off from triggering the real animation\n * until then. We only need one animation to detect paint ready.\n *\n * https://bugs.chromium.org/p/chromium/issues/detail?id=1406850\n */\nlet readyAnimation: Animation\n\n/**\n * Keep track of animations that were suspended vs cancelled so we\n * can easily resume them when we're done measuring layout.\n */\nconst suspendedAnimations = new Set()\n\nfunction resumeSuspendedAnimations() {\n suspendedAnimations.forEach((data) => {\n data.animation.play()\n data.animation.startTime = data.startTime\n })\n suspendedAnimations.clear()\n}\n\nexport function startOptimizedAppearAnimation(\n element: HTMLElement,\n name: string,\n keyframes: string[] | number[],\n options: ValueAnimationTransition,\n onReady?: (animation: Animation) => void\n): void {\n // Prevent optimised appear animations if Motion has already started animating.\n if (window.MotionIsMounted) {\n return\n }\n\n const id = element.dataset[optimizedAppearDataId]\n if (!id) return\n\n window.MotionHandoffAnimation = handoffOptimizedAppearAnimation\n\n const storeId = appearStoreId(id, name)\n if (!readyAnimation) {\n readyAnimation = startWaapiAnimation(\n element,\n name,\n [keyframes[0] as number, keyframes[0] as number],\n /**\n * 10 secs is basically just a super-safe duration to give Chrome\n * long enough to get the animation ready.\n */\n { duration: 10000, ease: \"linear\" }\n )\n\n appearAnimationStore.set(storeId, {\n animation: readyAnimation,\n startTime: null,\n })\n\n /**\n * If there's no readyAnimation then there's been no instantiation\n * of handoff animations.\n */\n window.MotionHandoffAnimation = handoffOptimizedAppearAnimation\n\n window.MotionHasOptimisedAnimation = (\n elementId?: string,\n valueName?: string\n ) => {\n if (!elementId) return false\n\n /**\n * Keep a map of elementIds that have started animating. We check\n * via ID instead of Element because of hydration errors and\n * pre-hydration checks. We also actively record IDs as they start\n * animating rather than simply checking for data-appear-id as\n * this attrbute might be present but not lead to an animation, for\n * instance if the element's appear animation is on a different\n * breakpoint.\n */\n if (!valueName) {\n return appearComplete.has(elementId)\n }\n\n const animationId = appearStoreId(elementId, valueName)\n return Boolean(appearAnimationStore.get(animationId))\n }\n\n window.MotionHandoffMarkAsComplete = (elementId: string): void => {\n if (appearComplete.has(elementId)) {\n appearComplete.set(elementId, true)\n }\n }\n\n window.MotionHandoffIsComplete = (elementId: string): boolean => {\n return appearComplete.get(elementId) === true\n }\n\n /**\n * We only need to cancel transform animations as\n * they're the ones that will interfere with the\n * layout animation measurements.\n */\n window.MotionCancelOptimisedAnimation = (\n elementId: string,\n valueName: string,\n frame?: Batcher,\n canResume?: boolean\n ) => {\n const animationId = appearStoreId(elementId, valueName)\n const data = appearAnimationStore.get(animationId)\n\n if (!data) return\n\n if (frame && canResume === undefined) {\n /**\n * Wait until the end of the subsequent frame to cancel the animation\n * to ensure we don't remove the animation before the main thread has\n * had a chance to resolve keyframes and render.\n */\n frame.postRender(() => {\n frame.postRender(() => {\n data.animation.cancel()\n })\n })\n } else {\n data.animation.cancel()\n }\n\n if (frame && canResume) {\n suspendedAnimations.add(data)\n frame.render(resumeSuspendedAnimations)\n } else {\n appearAnimationStore.delete(animationId)\n\n /**\n * If there are no more animations left, we can remove the cancel function.\n * This will let us know when we can stop checking for conflicting layout animations.\n */\n if (!appearAnimationStore.size) {\n window.MotionCancelOptimisedAnimation = undefined\n }\n }\n }\n\n window.MotionCheckAppearSync = (\n visualElement: WithAppearProps,\n valueName: string,\n value: MotionValue\n ) => {\n const appearId = getOptimisedAppearId(visualElement)\n\n if (!appearId) return\n\n const valueIsOptimised = window.MotionHasOptimisedAnimation?.(\n appearId,\n valueName\n )\n const externalAnimationValue =\n visualElement.props.values?.[valueName]\n\n if (!valueIsOptimised || !externalAnimationValue) return\n\n const removeSyncCheck = value.on(\n \"change\",\n (latestValue: AnyResolvedKeyframe) => {\n if (externalAnimationValue.get() !== latestValue) {\n window.MotionCancelOptimisedAnimation?.(\n appearId,\n valueName\n )\n removeSyncCheck()\n }\n }\n )\n\n return removeSyncCheck\n }\n }\n\n const startAnimation = () => {\n readyAnimation.cancel()\n\n const appearAnimation = startWaapiAnimation(\n element,\n name,\n keyframes,\n options\n )\n\n /**\n * Record the time of the first started animation. We call performance.now() once\n * here and once in handoff to ensure we're getting\n * close to a frame-locked time. This keeps all animations in sync.\n */\n if (startFrameTime === undefined) {\n startFrameTime = performance.now()\n }\n\n appearAnimation.startTime = startFrameTime\n\n appearAnimationStore.set(storeId, {\n animation: appearAnimation,\n startTime: startFrameTime,\n })\n\n if (onReady) onReady(appearAnimation)\n }\n\n appearComplete.set(id, false)\n\n if (readyAnimation.ready) {\n readyAnimation.ready.then(startAnimation).catch(noop)\n } else {\n startAnimation()\n }\n}\n"],"names":[],"mappings":";;;;;;AAeA;;;AAGG;AACH,IAAI,cAAsB;AAE1B;;;;;;AAMG;AACH,IAAI,cAAyB;AAE7B;;;AAGG;AACH,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAoB;AAEvD,SAAS,yBAAyB,GAAA;AAC9B,IAAA,mBAAmB,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AACjC,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;QACrB,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS;AAC7C,IAAA,CAAC,CAAC;IACF,mBAAmB,CAAC,KAAK,EAAE;AAC/B;AAEM,SAAU,6BAA6B,CACzC,OAAoB,EACpB,IAAY,EACZ,SAA8B,EAC9B,OAAkD,EAClD,OAAwC,EAAA;;AAGxC,IAAA,IAAI,MAAM,CAAC,eAAe,EAAE;QACxB;IACJ;IAEA,MAAM,E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QAAA,cAAc,EAAE;IACpB;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs deleted file mode 100644 index 3db6ef48..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { transformProps } from 'motion-dom'; - -const appearStoreId = (elementId, valueName) => { - const key = transformProps.has(valueName) ? "transform" : valueName; - return `${elementId}: ${key}`; -}; - -export { appearStoreId }; -//# sourceMappingURL=store-id.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs.map deleted file mode 100644 index 372f254b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"store-id.mjs","sources":["../../../../src/animation/optimized-appear/store-id.ts"],"sourcesContent":["import { transformProps } from \"motion-dom\"\n\nexport const appearStoreId = (elementId: string, valueName: string) => {\n const key = transformProps.has(valueName) ? \"transform\" : valueName\n\n return `${elementId}: ${key}`\n}\n"],"names":[],"mappings":";;MAEa,aAAa,GAAG,CAAC,SAAiB,EAAE,SAAiB,KAAI;AAClE,IAAA,MAAM,GAAG,GAAG,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,WAAW,GAAG,SAAS;AAEnE,IAAA,OAAO,CAAA,EAAG,SAAS,CAAA,EAAA,EAAK,GAAG,EAAE;AACjC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs deleted file mode 100644 index a6cfa5ec..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs +++ /dev/null @@ -1,5 +0,0 @@ -const appearAnimationStore = new Map(); -const appearComplete = new Map(); - -export { appearAnimationStore, appearComplete }; -//# sourceMappingURL=store.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs.map deleted file mode 100644 index 18a44b30..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"store.mjs","sources":["../../../../src/animation/optimized-appear/store.ts"],"sourcesContent":["export interface AppearStoreEntry {\n animation: Animation\n startTime: number | null\n}\n\nexport type AppearElementId = string\n\nexport type IsComplete = boolean\n\nexport const appearAnimationStore = new Map()\n\nexport const appearComplete = new Map()\n"],"names":[],"mappings":"AASO,MAAM,oBAAoB,GAAG,IAAI,GAAG;AAEpC,MAAM,cAAc,GAAG,IAAI,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/create.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/create.mjs deleted file mode 100644 index 0756f04c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/create.mjs +++ /dev/null @@ -1,308 +0,0 @@ -import { isMotionValue, defaultOffset, isGenerator, createGeneratorEasing, fillOffset } from 'motion-dom'; -import { progress, secondsToMilliseconds, warning, reverseEasing, getEasingForSegment } from 'motion-utils'; -import { resolveSubjects } from '../animate/resolve-subjects.mjs'; -import { calculateRepeatDuration } from './utils/calc-repeat-duration.mjs'; -import { calcNextTime } from './utils/calc-time.mjs'; -import { addKeyframes } from './utils/edit.mjs'; -import { normalizeTimes } from './utils/normalize-times.mjs'; -import { compareByTime } from './utils/sort.mjs'; - -const defaultSegmentEasing = "easeInOut"; -const MAX_REPEAT = 20; -function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) { - const defaultDuration = defaultTransition.duration || 0.3; - const animationDefinitions = new Map(); - const sequences = new Map(); - const elementCache = {}; - const timeLabels = new Map(); - let prevTime = 0; - let currentTime = 0; - let totalDuration = 0; - /** - * Build the timeline by mapping over the sequence array and converting - * the definitions into keyframes and offsets with absolute time values. - * These will later get converted into relative offsets in a second pass. - */ - for (let i = 0; i < sequence.length; i++) { - const segment = sequence[i]; - /** - * If this is a timeline label, mark it and skip the rest of this iteration. - */ - if (typeof segment === "string") { - timeLabels.set(segment, currentTime); - continue; - } - else if (!Array.isArray(segment)) { - timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels)); - continue; - } - let [subject, keyframes, transition = {}] = segment; - /** - * If a relative or absolute time value has been specified we need to resolve - * it in relation to the currentTime. - */ - if (transition.at !== undefined) { - currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels); - } - /** - * Keep track of the maximum duration in this definition. This will be - * applied to currentTime once the definition has been parsed. - */ - let maxDuration = 0; - const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => { - const valueKeyframesAsList = keyframesAsList(valueKeyframes); - const { delay = 0, times = defaultOffset(valueKeyframesAsList), type = defaultTransition.type || "keyframes", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition; - let { ease = defaultTransition.ease || "easeOut", duration } = valueTransition; - /** - * Resolve stagger() if defined. - */ - const calculatedDelay = typeof delay === "function" - ? delay(elementIndex, numSubjects) - : delay; - /** - * If this animation should and can use a spring, generate a spring easing function. - */ - const numKeyframes = valueKeyframesAsList.length; - const createGenerator = isGenerator(type) - ? type - : generators?.[type || "keyframes"]; - if (numKeyframes <= 2 && createGenerator) { - /** - * As we're creating an easing function from a spring, - * ideally we want to generate it using the real distance - * between the two keyframes. However this isn't always - * possible - in these situations we use 0-100. - */ - let absoluteDelta = 100; - if (numKeyframes === 2 && - isNumberKeyframesArray(valueKeyframesAsList)) { - const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0]; - absoluteDelta = Math.abs(delta); - } - const springTransition = { - ...defaultTransition, - ...remainingTransition, - }; - if (duration !== undefined) { - springTransition.duration = secondsToMilliseconds(duration); - } - const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator); - ease = springEasing.ease; - duration = springEasing.duration; - } - duration ?? (duration = defaultDuration); - const startTime = currentTime + calculatedDelay; - /** - * If there's only one time offset of 0, fill in a second with length 1 - */ - if (times.length === 1 && times[0] === 0) { - times[1] = 1; - } - /** - * Fill out if offset if fewer offsets than keyframes - */ - const remainder = times.length - valueKeyframesAsList.length; - remainder > 0 && fillOffset(times, remainder); - /** - * If only one value has been set, ie [1], push a null to the start of - * the keyframe array. This will let us mark a keyframe at this point - * that will later be hydrated with the previous value. - */ - valueKeyframesAsList.length === 1 && - valueKeyframesAsList.unshift(null); - /** - * Segments can't express `repeat: Infinity` or very large - * counts — they'd leave dead time after the segment or - * explode the keyframe array. Ignore with a warning. - */ - if (repeat) { - warning(repeat < MAX_REPEAT, `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`); - } - if (repeat && repeat < MAX_REPEAT) { - /** - * Express repeatDelay in units of a single iteration's duration - * so it can be added to the per-iteration time offsets below - * before they're normalized to 0-1. - */ - const repeatDelayUnits = duration > 0 ? repeatDelay / duration : 0; - duration = calculateRepeatDuration(duration, repeat, repeatDelay); - const originalKeyframes = [...valueKeyframesAsList]; - const originalTimes = [...times]; - ease = Array.isArray(ease) ? [...ease] : [ease]; - const originalEase = [...ease]; - /** - * For reverse/mirror, alternate iterations play the segment - * backwards. mirror matches JSAnimation's mirroredGenerator: - * reversed keyframes, easings unchanged. reverse matches - * JSAnimation's iterationProgress = 1 - p: reversed - * keyframes, easing array reversed AND each function easing - * mapped through reverseEasing (string easings unchanged — - * they're resolved later by the keyframes engine). - */ - const isFlipping = repeatType === "reverse" || repeatType === "mirror"; - let flippedKeyframes = originalKeyframes; - let flippedEases = originalEase; - if (isFlipping) { - flippedKeyframes = [...originalKeyframes].reverse(); - if (repeatType === "reverse") { - flippedEases = [...originalEase] - .reverse() - .map((e) => typeof e === "function" - ? reverseEasing(e) - : e); - } - } - for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) { - const isFlipped = isFlipping && repeatIndex % 2 === 0; - const iterKeyframes = isFlipped - ? flippedKeyframes - : originalKeyframes; - const iterEase = isFlipped ? flippedEases : originalEase; - const iterStartOffset = (repeatIndex + 1) * (1 + repeatDelayUnits); - /** - * If repeatDelay is set, hold the previous iteration's - * final value through the delay by inserting a keyframe - * at the moment the next iteration begins. - */ - if (repeatDelayUnits > 0) { - valueKeyframesAsList.push(valueKeyframesAsList[valueKeyframesAsList.length - 1]); - times.push(iterStartOffset); - ease.push("linear"); - } - valueKeyframesAsList.push(...iterKeyframes); - for (let keyframeIndex = 0; keyframeIndex < iterKeyframes.length; keyframeIndex++) { - times.push(originalTimes[keyframeIndex] + iterStartOffset); - ease.push(keyframeIndex === 0 - ? "linear" - : getEasingForSegment(iterEase, keyframeIndex - 1)); - } - } - normalizeTimes(times, repeat, repeatDelayUnits); - } - const targetTime = startTime + duration; - /** - * Add keyframes, mapping offsets to absolute time. - */ - addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime); - maxDuration = Math.max(calculatedDelay + duration, maxDuration); - totalDuration = Math.max(targetTime, totalDuration); - }; - if (isMotionValue(subject)) { - const subjectSequence = getSubjectSequence(subject, sequences); - resolveValueSequence(keyframes, transition, getValueSequence("default", subjectSequence)); - } - else { - const subjects = resolveSubjects(subject, keyframes, scope, elementCache); - const numSubjects = subjects.length; - /** - * For every element in this segment, process the defined values. - */ - for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) { - /** - * Cast necessary, but we know these are of this type - */ - keyframes = keyframes; - transition = transition; - const thisSubject = subjects[subjectIndex]; - const subjectSequence = getSubjectSequence(thisSubject, sequences); - for (const key in keyframes) { - resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects); - } - } - } - prevTime = currentTime; - currentTime += maxDuration; - } - /** - * For every element and value combination create a new animation. - */ - sequences.forEach((valueSequences, element) => { - for (const key in valueSequences) { - const valueSequence = valueSequences[key]; - /** - * Arrange all the keyframes in ascending time order. - */ - valueSequence.sort(compareByTime); - const keyframes = []; - const valueOffset = []; - const valueEasing = []; - /** - * For each keyframe, translate absolute times into - * relative offsets based on the total duration of the timeline. - */ - for (let i = 0; i < valueSequence.length; i++) { - const { at, value, easing } = valueSequence[i]; - keyframes.push(value); - valueOffset.push(progress(0, totalDuration, at)); - valueEasing.push(easing || "easeOut"); - } - /** - * If the first keyframe doesn't land on offset: 0 - * provide one by duplicating the initial keyframe. This ensures - * it snaps to the first keyframe when the animation starts. - */ - if (valueOffset[0] !== 0) { - valueOffset.unshift(0); - keyframes.unshift(keyframes[0]); - valueEasing.unshift(defaultSegmentEasing); - } - /** - * If the last keyframe doesn't land on offset: 1 - * provide one with a null wildcard value. This will ensure it - * stays static until the end of the animation. - */ - if (valueOffset[valueOffset.length - 1] !== 1) { - valueOffset.push(1); - keyframes.push(null); - } - if (!animationDefinitions.has(element)) { - animationDefinitions.set(element, { - keyframes: {}, - transition: {}, - }); - } - const definition = animationDefinitions.get(element); - definition.keyframes[key] = keyframes; - /** - * Exclude `type` from defaultTransition since springs have been - * converted to duration-based easing functions in resolveValueSequence. - * Including `type: "spring"` would cause JSAnimation to error when - * the merged keyframes array has more than 2 keyframes. - */ - const { type: _type, ...remainingDefaultTransition } = defaultTransition; - definition.transition[key] = { - ...remainingDefaultTransition, - duration: totalDuration, - ease: valueEasing, - times: valueOffset, - ...sequenceTransition, - }; - } - }); - return animationDefinitions; -} -function getSubjectSequence(subject, sequences) { - !sequences.has(subject) && sequences.set(subject, {}); - return sequences.get(subject); -} -function getValueSequence(name, sequences) { - if (!sequences[name]) - sequences[name] = []; - return sequences[name]; -} -function keyframesAsList(keyframes) { - return Array.isArray(keyframes) ? keyframes : [keyframes]; -} -function getValueTransition(transition, key) { - return transition && transition[key] - ? { - ...transition, - ...transition[key], - } - : { ...transition }; -} -const isNumber = (keyframe) => typeof keyframe === "number"; -const isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber); - -export { createAnimationsFromSequence, getValueTransition }; -//# sourceMappingURL=create.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/create.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/create.mjs.map deleted file mode 100644 index a9abdf03..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/create.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create.mjs","sources":["../../../../src/animation/sequence/create.ts"],"sourcesContent":["import {\n AnimationScope,\n createGeneratorEasing,\n defaultOffset,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n fillOffset,\n GeneratorFactory,\n isGenerator,\n isMotionValue,\n Transition,\n UnresolvedValueKeyframe,\n type AnyResolvedKeyframe,\n type MotionValue,\n} from \"motion-dom\"\nimport {\n Easing,\n getEasingForSegment,\n progress,\n reverseEasing,\n secondsToMilliseconds,\n warning,\n} from \"motion-utils\"\nimport { resolveSubjects } from \"../animate/resolve-subjects\"\nimport {\n AnimationSequence,\n At,\n ResolvedAnimationDefinitions,\n SequenceMap,\n SequenceOptions,\n ValueSequence,\n} from \"./types\"\nimport { calculateRepeatDuration } from \"./utils/calc-repeat-duration\"\nimport { calcNextTime } from \"./utils/calc-time\"\nimport { addKeyframes } from \"./utils/edit\"\nimport { normalizeTimes } from \"./utils/normalize-times\"\nimport { compareByTime } from \"./utils/sort\"\n\nconst defaultSegmentEasing = \"easeInOut\"\n\nconst MAX_REPEAT = 20\n\nexport function createAnimationsFromSequence(\n sequence: AnimationSequence,\n { defaultTransition = {}, ...sequenceTransition }: SequenceOptions = {},\n scope?: AnimationScope,\n generators?: { [key: string]: GeneratorFactory }\n): ResolvedAnimationDefinitions {\n const defaultDuration = defaultTransition.duration || 0.3\n const animationDefinitions: ResolvedAnimationDefinitions = new Map()\n const sequences = new Map()\n const elementCache = {}\n const timeLabels = new Map()\n\n let prevTime = 0\n let currentTime = 0\n let totalDuration = 0\n\n /**\n * Build the timeline by mapping over the sequence array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i]\n\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime)\n continue\n } else if (!Array.isArray(segment)) {\n timeLabels.set(\n segment.name,\n calcNextTime(currentTime, segment.at, prevTime, timeLabels)\n )\n continue\n }\n\n let [subject, keyframes, transition = {}] = segment\n\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (transition.at !== undefined) {\n currentTime = calcNextTime(\n currentTime,\n transition.at,\n prevTime,\n timeLabels\n )\n }\n\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0\n\n const resolveValueSequence = (\n valueKeyframes: UnresolvedValueKeyframe | UnresolvedValueKeyframe[],\n valueTransition: Transition | DynamicAnimationOptions,\n valueSequence: ValueSequence,\n elementIndex = 0,\n numSubjects = 0\n ) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes)\n const {\n delay = 0,\n times = defaultOffset(valueKeyframesAsList),\n type = defaultTransition.type || \"keyframes\",\n repeat,\n repeatType,\n repeatDelay = 0,\n ...remainingTransition\n } = valueTransition\n let { ease = defaultTransition.ease || \"easeOut\", duration } =\n valueTransition\n\n /**\n * Resolve stagger() if defined.\n */\n const calculatedDelay =\n typeof delay === \"function\"\n ? delay(elementIndex, numSubjects)\n : delay\n\n /**\n * If this animation should and can use a spring, generate a spring easing function.\n */\n const numKeyframes = valueKeyframesAsList.length\n const createGenerator = isGenerator(type)\n ? type\n : generators?.[type || \"keyframes\"]\n\n if (numKeyframes <= 2 && createGenerator) {\n /**\n * As we're creating an easing function from a spring,\n * ideally we want to generate it using the real distance\n * between the two keyframes. However this isn't always\n * possible - in these situations we use 0-100.\n */\n let absoluteDelta = 100\n if (\n numKeyframes === 2 &&\n isNumberKeyframesArray(valueKeyframesAsList)\n ) {\n const delta =\n valueKeyframesAsList[1] - valueKeyframesAsList[0]\n absoluteDelta = Math.abs(delta)\n }\n\n const springTransition = {\n ...defaultTransition,\n ...remainingTransition,\n }\n if (duration !== undefined) {\n springTransition.duration = secondsToMilliseconds(duration)\n }\n\n const springEasing = createGeneratorEasing(\n springTransition,\n absoluteDelta,\n createGenerator\n )\n\n ease = springEasing.ease\n duration = springEasing.duration\n }\n\n duration ??= defaultDuration\n\n const startTime = currentTime + calculatedDelay\n\n /**\n * If there's only one time offset of 0, fill in a second with length 1\n */\n if (times.length === 1 && times[0] === 0) {\n times[1] = 1\n }\n\n /**\n * Fill out if offset if fewer offsets than keyframes\n */\n const remainder = times.length - valueKeyframesAsList.length\n remainder > 0 && fillOffset(times, remainder)\n\n /**\n * If only one value has been set, ie [1], push a null to the start of\n * the keyframe array. This will let us mark a keyframe at this point\n * that will later be hydrated with the previous value.\n */\n valueKeyframesAsList.length === 1 &&\n valueKeyframesAsList.unshift(null)\n\n /**\n * Segments can't express `repeat: Infinity` or very large\n * counts — they'd leave dead time after the segment or\n * explode the keyframe array. Ignore with a warning.\n */\n if (repeat) {\n warning(\n repeat < MAX_REPEAT,\n `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`\n )\n }\n\n if (repeat && repeat < MAX_REPEAT) {\n /**\n * Express repeatDelay in units of a single iteration's duration\n * so it can be added to the per-iteration time offsets below\n * before they're normalized to 0-1.\n */\n const repeatDelayUnits =\n duration > 0 ? repeatDelay / duration : 0\n\n duration = calculateRepeatDuration(\n duration,\n repeat,\n repeatDelay\n )\n\n const originalKeyframes = [...valueKeyframesAsList]\n const originalTimes = [...times]\n ease = Array.isArray(ease) ? [...ease] : [ease]\n const originalEase = [...ease]\n\n /**\n * For reverse/mirror, alternate iterations play the segment\n * backwards. mirror matches JSAnimation's mirroredGenerator:\n * reversed keyframes, easings unchanged. reverse matches\n * JSAnimation's iterationProgress = 1 - p: reversed\n * keyframes, easing array reversed AND each function easing\n * mapped through reverseEasing (string easings unchanged —\n * they're resolved later by the keyframes engine).\n */\n const isFlipping =\n repeatType === \"reverse\" || repeatType === \"mirror\"\n let flippedKeyframes = originalKeyframes\n let flippedEases = originalEase\n if (isFlipping) {\n flippedKeyframes = [...originalKeyframes].reverse()\n if (repeatType === \"reverse\") {\n flippedEases = [...originalEase]\n .reverse()\n .map((e) =>\n typeof e === \"function\"\n ? reverseEasing(e)\n : e\n )\n }\n }\n\n for (\n let repeatIndex = 0;\n repeatIndex < repeat;\n repeatIndex++\n ) {\n const isFlipped = isFlipping && repeatIndex % 2 === 0\n const iterKeyframes = isFlipped\n ? flippedKeyframes\n : originalKeyframes\n const iterEase = isFlipped ? flippedEases : originalEase\n const iterStartOffset =\n (repeatIndex + 1) * (1 + repeatDelayUnits)\n\n /**\n * If repeatDelay is set, hold the previous iteration's\n * final value through the delay by inserting a keyframe\n * at the moment the next iteration begins.\n */\n if (repeatDelayUnits > 0) {\n valueKeyframesAsList.push(\n valueKeyframesAsList[\n valueKeyframesAsList.length - 1\n ]\n )\n times.push(iterStartOffset)\n ease.push(\"linear\")\n }\n\n valueKeyframesAsList.push(...iterKeyframes)\n\n for (\n let keyframeIndex = 0;\n keyframeIndex < iterKeyframes.length;\n keyframeIndex++\n ) {\n times.push(\n originalTimes[keyframeIndex] + iterStartOffset\n )\n ease.push(\n keyframeIndex === 0\n ? \"linear\"\n : getEasingForSegment(\n iterEase,\n keyframeIndex - 1\n )\n )\n }\n }\n\n normalizeTimes(times, repeat, repeatDelayUnits)\n }\n\n const targetTime = startTime + duration\n\n /**\n * Add keyframes, mapping offsets to absolute time.\n */\n addKeyframes(\n valueSequence,\n valueKeyframesAsList,\n ease as Easing | Easing[],\n times,\n startTime,\n targetTime\n )\n\n maxDuration = Math.max(calculatedDelay + duration, maxDuration)\n totalDuration = Math.max(targetTime, totalDuration)\n }\n\n if (isMotionValue(subject)) {\n const subjectSequence = getSubjectSequence(subject, sequences)\n resolveValueSequence(\n keyframes as AnyResolvedKeyframe,\n transition,\n getValueSequence(\"default\", subjectSequence)\n )\n } else {\n const subjects = resolveSubjects(\n subject,\n keyframes as DOMKeyframesDefinition,\n scope,\n elementCache\n )\n\n const numSubjects = subjects.length\n\n /**\n * For every element in this segment, process the defined values.\n */\n for (\n let subjectIndex = 0;\n subjectIndex < numSubjects;\n subjectIndex++\n ) {\n /**\n * Cast necessary, but we know these are of this type\n */\n keyframes = keyframes as DOMKeyframesDefinition\n transition = transition as DynamicAnimationOptions\n\n const thisSubject = subjects[subjectIndex]\n const subjectSequence = getSubjectSequence(\n thisSubject,\n sequences\n )\n\n for (const key in keyframes) {\n resolveValueSequence(\n keyframes[\n key as keyof typeof keyframes\n ] as UnresolvedValueKeyframe,\n getValueTransition(transition, key),\n getValueSequence(key, subjectSequence),\n subjectIndex,\n numSubjects\n )\n }\n }\n }\n\n prevTime = currentTime\n currentTime += maxDuration\n }\n\n /**\n * For every element and value combination create a new animation.\n */\n sequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key]\n\n /**\n * Arrange all the keyframes in ascending time order.\n */\n valueSequence.sort(compareByTime)\n\n const keyframes: UnresolvedValueKeyframe[] = []\n const valueOffset: number[] = []\n const valueEasing: Easing[] = []\n\n /**\n * For each keyframe, translate absolute times into\n * relative offsets based on the total duration of the timeline.\n */\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i]\n keyframes.push(value)\n valueOffset.push(progress(0, totalDuration, at))\n valueEasing.push(easing || \"easeOut\")\n }\n\n /**\n * If the first keyframe doesn't land on offset: 0\n * provide one by duplicating the initial keyframe. This ensures\n * it snaps to the first keyframe when the animation starts.\n */\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0)\n keyframes.unshift(keyframes[0])\n valueEasing.unshift(defaultSegmentEasing)\n }\n\n /**\n * If the last keyframe doesn't land on offset: 1\n * provide one with a null wildcard value. This will ensure it\n * stays static until the end of the animation.\n */\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1)\n keyframes.push(null)\n }\n\n if (!animationDefinitions.has(element)) {\n animationDefinitions.set(element, {\n keyframes: {},\n transition: {},\n })\n }\n\n const definition = animationDefinitions.get(element)!\n\n definition.keyframes[key] = keyframes\n\n /**\n * Exclude `type` from defaultTransition since springs have been\n * converted to duration-based easing functions in resolveValueSequence.\n * Including `type: \"spring\"` would cause JSAnimation to error when\n * the merged keyframes array has more than 2 keyframes.\n */\n const { type: _type, ...remainingDefaultTransition } =\n defaultTransition\n definition.transition[key] = {\n ...remainingDefaultTransition,\n duration: totalDuration,\n ease: valueEasing,\n times: valueOffset,\n ...sequenceTransition,\n }\n }\n })\n\n return animationDefinitions\n}\n\nfunction getSubjectSequence(\n subject: Element | MotionValue | O,\n sequences: Map\n): SequenceMap {\n !sequences.has(subject) && sequences.set(subject, {})\n return sequences.get(subject)!\n}\n\nfunction getValueSequence(name: string, sequences: SequenceMap): ValueSequence {\n if (!sequences[name]) sequences[name] = []\n return sequences[name]\n}\n\nfunction keyframesAsList(\n keyframes: UnresolvedValueKeyframe | UnresolvedValueKeyframe[]\n): UnresolvedValueKeyframe[] {\n return Array.isArray(keyframes) ? keyframes : [keyframes]\n}\n\nexport function getValueTransition(\n transition: DynamicAnimationOptions & At,\n key: string\n): DynamicAnimationOptions {\n return transition && transition[key as keyof typeof transition]\n ? {\n ...transition,\n ...(transition[key as keyof typeof transition] as Transition),\n }\n : { ...transition }\n}\n\nconst isNumber = (keyframe: unknown) => typeof keyframe === \"number\"\nconst isNumberKeyframesArray = (\n keyframes: UnresolvedValueKeyframe[]\n): keyframes is number[] => keyframes.every(isNumber)\n"],"names":[],"mappings":";;;;;;;;;AAsCA,MAAM,oBAAoB,GAAG,WAAW;AAExC,MAAM,UAAU,GAAG,EAAE;SAEL,4BAA4B,CACxC,QAA2B,EAC3B,EAAE,iBAAiB,GAAG,EAAE,EAAE,GAAG,kBAAkB,EAAA,GAAsB,EAAE,EACvE,KAAsB,EACtB,UAAgD,EAAA;AAEhD,IAAA,MAAM,eAAe,GAAG,iBAAiB,CAAC,QAAQ,IAAI,GAAG;AACzD,IAAA,MAAM,oBAAoB,GAAiC,IAAI,GAAG,EAAE;AACpE,IAAA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAsC;IAC/D,MAAM,YAAY,GAAG,EAAE;AACvB,IAAA,MAAM,UAAU,GAAG,IAAI,GAAG,EAAkB;IAE5C,IAAI,QAAQ,GAAG,CAAC;IAChB,IAAI,WAAW,GAAG,CAAC;IACnB,IAAI,aAAa,GAAG,CAAC;AAErB;;;;AAIG;AACH,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACtC,QAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC;AAE3B;;AAEG;AACH,QAAA,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;AAC7B,YAAA,UAAU,CAAC,GAAG,CAAC,OAAO,EAAE,WAAW,CAAC;YACpC;QACJ;aAAO,IAAI,CAAC,KAAK,CA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M,QAAQ,GAAG,CAAC,QAAiB,KAAK,OAAO,QAAQ,KAAK,QAAQ;AACpE,MAAM,sBAAsB,GAAG,CAC3B,SAAoC,KACZ,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs deleted file mode 100644 index 652f6d8d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +++ /dev/null @@ -1,6 +0,0 @@ -function calculateRepeatDuration(duration, repeat, repeatDelay) { - return duration * (repeat + 1) + repeatDelay * repeat; -} - -export { calculateRepeatDuration }; -//# sourceMappingURL=calc-repeat-duration.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs.map deleted file mode 100644 index 286da812..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"calc-repeat-duration.mjs","sources":["../../../../../src/animation/sequence/utils/calc-repeat-duration.ts"],"sourcesContent":["export function calculateRepeatDuration(\n duration: number,\n repeat: number,\n repeatDelay: number\n): number {\n return duration * (repeat + 1) + repeatDelay * repeat\n}\n"],"names":[],"mappings":"SAAgB,uBAAuB,CACnC,QAAgB,EAChB,MAAc,EACd,WAAmB,EAAA;IAEnB,OAAO,QAAQ,IAAI,MAAM,GAAG,CAAC,CAAC,GAAG,WAAW,GAAG,MAAM;AACzD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs deleted file mode 100644 index 7e600c8b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Given a absolute or relative time definition and current/prev time state of the sequence, - * calculate an absolute time for the next keyframes. - */ -function calcNextTime(current, next, prev, labels) { - if (typeof next === "number") { - return next; - } - else if (next.startsWith("-") || next.startsWith("+")) { - return Math.max(0, current + parseFloat(next)); - } - else if (next === "<") { - return prev; - } - else if (next.startsWith("<")) { - return Math.max(0, prev + parseFloat(next.slice(1))); - } - else { - return labels.get(next) ?? current; - } -} - -export { calcNextTime }; -//# sourceMappingURL=calc-time.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs.map deleted file mode 100644 index 3647333e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"calc-time.mjs","sources":["../../../../../src/animation/sequence/utils/calc-time.ts"],"sourcesContent":["import { SequenceTime } from \"../types\"\n\n/**\n * Given a absolute or relative time definition and current/prev time state of the sequence,\n * calculate an absolute time for the next keyframes.\n */\nexport function calcNextTime(\n current: number,\n next: SequenceTime,\n prev: number,\n labels: Map\n): number {\n if (typeof next === \"number\") {\n return next\n } else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next))\n } else if (next === \"<\") {\n return prev\n } else if (next.startsWith(\"<\")) {\n return Math.max(0, prev + parseFloat(next.slice(1)))\n } else {\n return labels.get(next) ?? current\n }\n}\n"],"names":[],"mappings":"AAEA;;;AAGG;AACG,SAAU,YAAY,CACxB,OAAe,EACf,IAAkB,EAClB,IAAY,EACZ,MAA2B,EAAA;AAE3B,IAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAC1B,QAAA,OAAO,IAAI;IACf;AAAO,SAAA,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;AACrD,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAClD;AAAO,SAAA,IAAI,IAAI,KAAK,GAAG,EAAE;AACrB,QAAA,OAAO,IAAI;IACf;AAAO,SAAA,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;AAC7B,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACxD;SAAO;QACH,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,OAAO;IACtC;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs deleted file mode 100644 index a140e1b8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs +++ /dev/null @@ -1,31 +0,0 @@ -import { mixNumber } from 'motion-dom'; -import { getEasingForSegment, removeItem } from 'motion-utils'; - -function eraseKeyframes(sequence, startTime, endTime) { - for (let i = 0; i < sequence.length; i++) { - const keyframe = sequence[i]; - if (keyframe.at > startTime && keyframe.at < endTime) { - removeItem(sequence, keyframe); - // If we remove this item we have to push the pointer back one - i--; - } - } -} -function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) { - /** - * Erase every existing value between currentTime and targetTime, - * this will essentially splice this timeline into any currently - * defined ones. - */ - eraseKeyframes(sequence, startTime, endTime); - for (let i = 0; i < keyframes.length; i++) { - sequence.push({ - value: keyframes[i], - at: mixNumber(startTime, endTime, offset[i]), - easing: getEasingForSegment(easing, i), - }); - } -} - -export { addKeyframes, eraseKeyframes }; -//# sourceMappingURL=edit.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs.map deleted file mode 100644 index f9a56fdf..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"edit.mjs","sources":["../../../../../src/animation/sequence/utils/edit.ts"],"sourcesContent":["import { mixNumber, UnresolvedValueKeyframe } from \"motion-dom\"\nimport { Easing, getEasingForSegment, removeItem } from \"motion-utils\"\nimport type { ValueSequence } from \"../types\"\n\nexport function eraseKeyframes(\n sequence: ValueSequence,\n startTime: number,\n endTime: number\n): void {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i]\n\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe)\n\n // If we remove this item we have to push the pointer back one\n i--\n }\n }\n}\n\nexport function addKeyframes(\n sequence: ValueSequence,\n keyframes: UnresolvedValueKeyframe[],\n easing: Easing | Easing[],\n offset: number[],\n startTime: number,\n endTime: number\n): void {\n /**\n * Erase every existing value between currentTime and targetTime,\n * this will essentially splice this timeline into any currently\n * defined ones.\n */\n eraseKeyframes(sequence, startTime, endTime)\n\n for (let i = 0; i < keyframes.length; i++) {\n sequence.push({\n value: keyframes[i],\n at: mixNumber(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i),\n })\n }\n}\n"],"names":[],"mappings":";;;SAIgB,cAAc,CAC1B,QAAuB,EACvB,SAAiB,EACjB,OAAe,EAAA;AAEf,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACtC,QAAA,MAAM,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC;AAE5B,QAAA,IAAI,QAAQ,CAAC,EAAE,GAAG,SAAS,IAAI,QAAQ,CAAC,EAAE,GAAG,OAAO,EAAE;AAClD,YAAA,UAAU,CAAC,QAAQ,EAAE,QAAQ,CAAC;;AAG9B,YAAA,CAAC,EAAE;QACP;IACJ;AACJ;AAEM,SAAU,YAAY,CACxB,QAAuB,EACvB,SAAoC,EACpC,MAAyB,EACzB,MAAgB,EAChB,SAAiB,EACjB,OAAe,EAAA;AAEf;;;;AAIG;AACH,IAAA,cAAc,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;AAE5C,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACvC,QAAQ,CAAC,IAAI,CAAC;AACV,YAAA,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;YACnB,EAAE,EAAE,SAAS,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAC5C,YAAA,MAAM,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;AACzC,SAAA,CAAC;IACN;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs deleted file mode 100644 index 14f67281..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Take an array of times that represent repeated keyframes. For instance - * if we have original times of [0, 0.5, 1] then our repeated times will - * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back - * down to a 0-1 scale. - * - * `repeatDelayUnits` is the repeatDelay expressed in units of a single - * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`. - */ -function normalizeTimes(times, repeat, repeatDelayUnits = 0) { - const totalUnits = repeat + 1 + repeat * repeatDelayUnits; - for (let i = 0; i < times.length; i++) { - times[i] = times[i] / totalUnits; - } -} - -export { normalizeTimes }; -//# sourceMappingURL=normalize-times.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs.map deleted file mode 100644 index 26c27ca0..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"normalize-times.mjs","sources":["../../../../../src/animation/sequence/utils/normalize-times.ts"],"sourcesContent":["/**\n * Take an array of times that represent repeated keyframes. For instance\n * if we have original times of [0, 0.5, 1] then our repeated times will\n * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back\n * down to a 0-1 scale.\n *\n * `repeatDelayUnits` is the repeatDelay expressed in units of a single\n * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`.\n */\nexport function normalizeTimes(\n times: number[],\n repeat: number,\n repeatDelayUnits = 0\n): void {\n const totalUnits = repeat + 1 + repeat * repeatDelayUnits\n for (let i = 0; i < times.length; i++) {\n times[i] = times[i] / totalUnits\n }\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;AAQG;AACG,SAAU,cAAc,CAC1B,KAAe,EACf,MAAc,EACd,gBAAgB,GAAG,CAAC,EAAA;IAEpB,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,GAAG,MAAM,GAAG,gBAAgB;AACzD,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACnC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU;IACpC;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs deleted file mode 100644 index 49ae9387..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs +++ /dev/null @@ -1,15 +0,0 @@ -function compareByTime(a, b) { - if (a.at === b.at) { - if (a.value === null) - return 1; - if (b.value === null) - return -1; - return 0; - } - else { - return a.at - b.at; - } -} - -export { compareByTime }; -//# sourceMappingURL=sort.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs.map deleted file mode 100644 index 148e5d2f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.mjs","sources":["../../../../../src/animation/sequence/utils/sort.ts"],"sourcesContent":["import { AbsoluteKeyframe } from \"../types\"\n\nexport function compareByTime(\n a: AbsoluteKeyframe,\n b: AbsoluteKeyframe\n): number {\n if (a.at === b.at) {\n if (a.value === null) return 1\n if (b.value === null) return -1\n return 0\n } else {\n return a.at - b.at\n }\n}\n"],"names":[],"mappings":"AAEM,SAAU,aAAa,CACzB,CAAmB,EACnB,CAAmB,EAAA;IAEnB,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,EAAE;AACf,QAAA,IAAI,CAAC,CAAC,KAAK,KAAK,IAAI;AAAE,YAAA,OAAO,CAAC;AAC9B,QAAA,IAAI,CAAC,CAAC,KAAK,KAAK,IAAI;YAAE,OAAO,EAAE;AAC/B,QAAA,OAAO,CAAC;IACZ;SAAO;AACH,QAAA,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE;IACtB;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs deleted file mode 100644 index d2c7acf5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs +++ /dev/null @@ -1,41 +0,0 @@ -import { isSVGElement, isSVGSVGElement, SVGVisualElement, HTMLVisualElement, visualElementStore, ObjectVisualElement } from 'motion-dom'; - -function createDOMVisualElement(element) { - const options = { - presenceContext: null, - props: {}, - visualState: { - renderState: { - transform: {}, - transformOrigin: {}, - style: {}, - vars: {}, - attrs: {}, - }, - latestValues: {}, - }, - }; - const node = isSVGElement(element) && !isSVGSVGElement(element) - ? new SVGVisualElement(options) - : new HTMLVisualElement(options); - node.mount(element); - visualElementStore.set(element, node); -} -function createObjectVisualElement(subject) { - const options = { - presenceContext: null, - props: {}, - visualState: { - renderState: { - output: {}, - }, - latestValues: {}, - }, - }; - const node = new ObjectVisualElement(options); - node.mount(subject); - visualElementStore.set(subject, node); -} - -export { createDOMVisualElement, createObjectVisualElement }; -//# sourceMappingURL=create-visual-element.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs.map deleted file mode 100644 index 98d72953..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create-visual-element.mjs","sources":["../../../../src/animation/utils/create-visual-element.ts"],"sourcesContent":["import {\n HTMLVisualElement,\n isSVGElement,\n isSVGSVGElement,\n ObjectVisualElement,\n SVGVisualElement,\n visualElementStore,\n} from \"motion-dom\"\n\nexport function createDOMVisualElement(element: HTMLElement | SVGElement) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n transform: {},\n transformOrigin: {},\n style: {},\n vars: {},\n attrs: {},\n },\n latestValues: {},\n },\n }\n const node =\n isSVGElement(element) && !isSVGSVGElement(element)\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options)\n\n node.mount(element as any)\n\n visualElementStore.set(element, node)\n}\n\nexport function createObjectVisualElement(subject: Object) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n output: {},\n },\n latestValues: {},\n },\n }\n const node = new ObjectVisualElement(options)\n\n node.mount(subject)\n\n visualElementStore.set(subject, node)\n}\n"],"names":[],"mappings":";;AASM,SAAU,sBAAsB,CAAC,OAAiC,EAAA;AACpE,IAAA,MAAM,OAAO,GAAG;AACZ,QAAA,eAAe,EAAE,IAAI;AACrB,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,WAAW,EAAE;AACT,YAAA,WAAW,EAAE;AACT,gBAAA,SAAS,EAAE,EAAE;AACb,gBAAA,eAAe,EAAE,EAAE;AACnB,gBAAA,KAAK,EAAE,EAAE;AACT,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,KAAK,EAAE,EAAE;AACZ,aAAA;AACD,YAAA,YAAY,EAAE,EAAE;AACnB,SAAA;KACJ;IACD,MAAM,IAAI,GACN,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO;AAC7C,UAAE,IAAI,gBAAgB,CAAC,OAAO;AAC9B,UAAE,IAAI,iBAAiB,CAAC,OAAO,CAAC;AAExC,IAAA,IAAI,CAAC,KAAK,CAAC,OAAc,CAAC;AAE1B,IAAA,kBAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC;AACzC;AAEM,SAAU,yBAAyB,CAAC,OAAe,EAAA;AACrD,IAAA,MAAM,OAAO,GAAG;AACZ,QAAA,eAAe,EAAE,IAAI;AACrB,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,WAAW,EAAE;AACT,YAAA,WAAW,EAAE;AACT,gBAAA,MAAM,EAAE,EAAE;AACb,aAAA;AACD,YAAA,YAAY,EAAE,EAAE;AACnB,SAAA;KACJ;AACD,IAAA,MAAM,IAAI,GAAG,IAAI,mBAAmB,CAAC,OAAO,CAAC;AAE7C,IAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;AAEnB,IAAA,kBAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC;AACzC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs deleted file mode 100644 index be445079..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +++ /dev/null @@ -1,6 +0,0 @@ -function isDOMKeyframes(keyframes) { - return typeof keyframes === "object" && !Array.isArray(keyframes); -} - -export { isDOMKeyframes }; -//# sourceMappingURL=is-dom-keyframes.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs.map deleted file mode 100644 index f8089b3b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-dom-keyframes.mjs","sources":["../../../../src/animation/utils/is-dom-keyframes.ts"],"sourcesContent":["import { DOMKeyframesDefinition } from \"motion-dom\"\n\nexport function isDOMKeyframes(\n keyframes: unknown\n): keyframes is DOMKeyframesDefinition {\n return typeof keyframes === \"object\" && !Array.isArray(keyframes)\n}\n"],"names":[],"mappings":"AAEM,SAAU,cAAc,CAC1B,SAAkB,EAAA;AAElB,IAAA,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;AACrE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/client.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/client.mjs deleted file mode 100644 index ca763ff6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/client.mjs +++ /dev/null @@ -1,2 +0,0 @@ -export { MotionA as a, MotionAbbr as abbr, MotionAddress as address, MotionAnimate as animate, MotionArea as area, MotionArticle as article, MotionAside as aside, MotionAudio as audio, MotionB as b, MotionBase as base, MotionBdi as bdi, MotionBdo as bdo, MotionBig as big, MotionBlockquote as blockquote, MotionBody as body, MotionButton as button, MotionCanvas as canvas, MotionCaption as caption, MotionCircle as circle, MotionCite as cite, MotionClipPath as clipPath, MotionCode as code, MotionCol as col, MotionColgroup as colgroup, MotionData as data, MotionDatalist as datalist, MotionDd as dd, MotionDefs as defs, MotionDel as del, MotionDesc as desc, MotionDetails as details, MotionDfn as dfn, MotionDialog as dialog, MotionDiv as div, MotionDl as dl, MotionDt as dt, MotionEllipse as ellipse, MotionEm as em, MotionEmbed as embed, MotionFeBlend as feBlend, MotionFeColorMatrix as feColorMatrix, MotionFeComponentTransfer as feComponentTransfer, MotionFeComposite as feComposite, MotionFeConvolveMatrix as feConvolveMatrix, MotionFeDiffuseLighting as feDiffuseLighting, MotionFeDisplacementMap as feDisplacementMap, MotionFeDistantLight as feDistantLight, MotionFeDropShadow as feDropShadow, MotionFeFlood as feFlood, MotionFeFuncA as feFuncA, MotionFeFuncB as feFuncB, MotionFeFuncG as feFuncG, MotionFeFuncR as feFuncR, MotionFeGaussianBlur as feGaussianBlur, MotionFeImage as feImage, MotionFeMerge as feMerge, MotionFeMergeNode as feMergeNode, MotionFeMorphology as feMorphology, MotionFeOffset as feOffset, MotionFePointLight as fePointLight, MotionFeSpecularLighting as feSpecularLighting, MotionFeSpotLight as feSpotLight, MotionFeTile as feTile, MotionFeTurbulence as feTurbulence, MotionFieldset as fieldset, MotionFigcaption as figcaption, MotionFigure as figure, MotionFilter as filter, MotionFooter as footer, MotionForeignObject as foreignObject, MotionForm as form, MotionG as g, MotionH1 as h1, MotionH2 as h2, MotionH3 as h3, MotionH4 as h4, MotionH5 as h5, MotionH6 as h6, MotionHead as head, MotionHeader as header, MotionHgroup as hgroup, MotionHr as hr, MotionHtml as html, MotionI as i, MotionIframe as iframe, MotionImage as image, MotionImg as img, MotionInput as input, MotionIns as ins, MotionKbd as kbd, MotionKeygen as keygen, MotionLabel as label, MotionLegend as legend, MotionLi as li, MotionLine as line, MotionLinearGradient as linearGradient, MotionLink as link, MotionMain as main, MotionMap as map, MotionMark as mark, MotionMarker as marker, MotionMask as mask, MotionMenu as menu, MotionMenuitem as menuitem, MotionMetadata as metadata, MotionMeter as meter, MotionNav as nav, MotionObject as object, MotionOl as ol, MotionOptgroup as optgroup, MotionOption as option, MotionOutput as output, MotionP as p, MotionParam as param, MotionPath as path, MotionPattern as pattern, MotionPicture as picture, MotionPolygon as polygon, MotionPolyline as polyline, MotionPre as pre, MotionProgress as progress, MotionQ as q, MotionRadialGradient as radialGradient, MotionRect as rect, MotionRp as rp, MotionRt as rt, MotionRuby as ruby, MotionS as s, MotionSamp as samp, MotionScript as script, MotionSection as section, MotionSelect as select, MotionSmall as small, MotionSource as source, MotionSpan as span, MotionStop as stop, MotionStrong as strong, MotionStyle as style, MotionSub as sub, MotionSummary as summary, MotionSup as sup, MotionSvg as svg, MotionSymbol as symbol, MotionTable as table, MotionTbody as tbody, MotionTd as td, MotionText as text, MotionTextPath as textPath, MotionTextarea as textarea, MotionTfoot as tfoot, MotionTh as th, MotionThead as thead, MotionTime as time, MotionTitle as title, MotionTr as tr, MotionTrack as track, MotionTspan as tspan, MotionU as u, MotionUl as ul, MotionUse as use, MotionVideo as video, MotionView as view, MotionWbr as wbr, MotionWebview as webview } from './render/components/motion/elements.mjs'; -//# sourceMappingURL=client.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/client.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/client.mjs.map deleted file mode 100644 index 5835aec6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/client.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs deleted file mode 100644 index a17882dc..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs +++ /dev/null @@ -1,112 +0,0 @@ -"use client"; -import { jsx } from 'react/jsx-runtime'; -import { isHTMLElement } from 'motion-dom'; -import * as React from 'react'; -import { useId, useRef, useContext, useInsertionEffect } from 'react'; -import { MotionConfigContext } from '../../context/MotionConfigContext.mjs'; -import { useComposedRefs } from '../../utils/use-composed-ref.mjs'; - -/** - * Measurement functionality has to be within a separate component - * to leverage snapshot lifecycle. - */ -class PopChildMeasure extends React.Component { - getSnapshotBeforeUpdate(prevProps) { - const element = this.props.childRef.current; - if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) { - const parent = element.offsetParent; - const parentWidth = isHTMLElement(parent) - ? parent.offsetWidth || 0 - : 0; - const parentHeight = isHTMLElement(parent) - ? parent.offsetHeight || 0 - : 0; - const computedStyle = getComputedStyle(element); - const size = this.props.sizeRef.current; - size.height = parseFloat(computedStyle.height); - size.width = parseFloat(computedStyle.width); - size.top = element.offsetTop; - size.left = element.offsetLeft; - size.right = parentWidth - size.width - size.left; - size.bottom = parentHeight - size.height - size.top; - size.direction = computedStyle.direction; - } - return null; - } - /** - * Required with getSnapshotBeforeUpdate to stop React complaining. - */ - componentDidUpdate() { } - render() { - return this.props.children; - } -} -function PopChild({ children, isPresent, anchorX, anchorY, root, pop }) { - const id = useId(); - const ref = useRef(null); - const size = useRef({ - width: 0, - height: 0, - top: 0, - left: 0, - right: 0, - bottom: 0, - direction: "ltr", - }); - const { nonce } = useContext(MotionConfigContext); - /** - * In React 19, refs are passed via props.ref instead of element.ref. - * We check props.ref first (React 19) and fall back to element.ref (React 18). - */ - const childRef = children.props?.ref ?? - children?.ref; - const composedRef = useComposedRefs(ref, childRef); - /** - * We create and inject a style block so we can apply this explicit - * sizing in a non-destructive manner by just deleting the style block. - * - * We can't apply size via render as the measurement happens - * in getSnapshotBeforeUpdate (post-render), likewise if we apply the - * styles directly on the DOM node, we might be overwriting - * styles set via the style prop. - */ - useInsertionEffect(() => { - const { width, height, top, left, right, bottom, direction } = size.current; - if (isPresent || pop === false || !ref.current || !width || !height) - return; - const isRTL = direction === "rtl"; - const x = anchorX === "left" - ? (isRTL ? `right: ${right}` : `left: ${left}`) - : (isRTL ? `left: ${left}` : `right: ${right}`); - const y = anchorY === "bottom" ? `bottom: ${bottom}` : `top: ${top}`; - ref.current.dataset.motionPopId = id; - const style = document.createElement("style"); - if (nonce) - style.nonce = nonce; - const parent = root ?? document.head; - parent.appendChild(style); - if (style.sheet) { - style.sheet.insertRule(` - [data-motion-pop-id="${id}"] { - position: absolute !important; - width: ${width}px !important; - height: ${height}px !important; - ${x}px !important; - ${y}px !important; - } - `); - } - return () => { - ref.current?.removeAttribute("data-motion-pop-id"); - if (parent.contains(style)) { - parent.removeChild(style); - } - }; - }, [isPresent]); - return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false - ? children - : React.cloneElement(children, { ref: composedRef }) })); -} - -export { PopChild }; -//# sourceMappingURL=PopChild.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.map deleted file mode 100644 index c3ed929f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PopChild.mjs","sources":["../../../../src/components/AnimatePresence/PopChild.tsx"],"sourcesContent":["\"use client\"\n\nimport { isHTMLElement } from \"motion-dom\"\nimport * as React from \"react\"\nimport { useContext, useId, useInsertionEffect, useRef } from \"react\"\n\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { useComposedRefs } from \"../../utils/use-composed-ref\"\n\ninterface Size {\n width: number\n height: number\n top: number\n left: number\n right: number\n bottom: number\n direction: string\n}\n\ninterface Props {\n children: React.ReactElement\n isPresent: boolean\n anchorX?: \"left\" | \"right\"\n anchorY?: \"top\" | \"bottom\"\n root?: HTMLElement | ShadowRoot\n pop?: boolean\n}\n\ninterface MeasureProps extends Props {\n childRef: React.RefObject\n sizeRef: React.RefObject\n}\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps: MeasureProps) {\n const element = this.props.childRef.current\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0\n\n const computedStyle = getComputedStyle(element)\n const size = this.props.sizeRef.current!\n size.height = parseFloat(computedStyle.height)\n size.width = parseFloat(computedStyle.width)\n size.top = element.offsetTop\n size.left = element.offsetLeft\n size.right = parentWidth - size.width - size.left\n size.bottom = parentHeight - size.height - size.top\n size.direction = computedStyle.direction\n }\n\n return null\n }\n\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() {}\n\n render() {\n return this.props.children\n }\n}\n\nexport function PopChild({ children, isPresent, anchorX, anchorY, root, pop }: Props) {\n const id = useId()\n const ref = useRef(null)\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n })\n const { nonce } = useContext(MotionConfigContext)\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n */\n const childRef =\n (children.props as { ref?: React.Ref })?.ref ??\n (children as unknown as { ref?: React.Ref })?.ref\n const composedRef = useComposedRefs(ref, childRef)\n\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left, right, bottom, direction } = size.current\n if (isPresent || pop === false || !ref.current || !width || !height) return\n\n const isRTL = direction === \"rtl\"\n const x = anchorX === \"left\"\n ? (isRTL ? `right: ${right}` : `left: ${left}`)\n : (isRTL ? `left: ${left}` : `right: ${right}`)\n const y = anchorY === \"bottom\" ? `bottom: ${bottom}` : `top: ${top}`\n\n ref.current.dataset.motionPopId = id\n\n const style = document.createElement(\"style\")\n if (nonce) style.nonce = nonce\n\n const parent = root ?? document.head\n parent.appendChild(style)\n\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n ${x}px !important;\n ${y}px !important;\n }\n `)\n }\n\n return () => {\n ref.current?.removeAttribute(\"data-motion-pop-id\")\n if (parent.contains(style)) {\n parent.removeChild(style)\n }\n }\n }, [isPresent])\n\n return (\n \n {pop === false\n ? children\n : React.cloneElement(children as any, { ref: composedRef })}\n \n )\n}\n"],"names":[],"mappings":";;;;;;;;AAiCA;;;AAGG;AACH;AACI;;;AAGQ;AACA;AACI;;AAEJ;AACI;;AAGJ;;;;AAIA;AACA;AACA;AACA;AACA;;AAGJ;;AAGJ;;AAEG;AACH;;AAGI;;AAEP;AAEK;AACF;AACA;;AAEI;AACA;AACA;AACA;AACA;AACA;AACA;AACH;;AAED;;;AAGG;AACH;;;AAKA;;;;;;;;AAQG;;AAEC;AACA;;AAEA;AACA;AACI;AACA;AACJ;;;AAKA;AAAW;AAEX;AACA;AAEA;AACI;;;;;;;;AAQH;;AAGD;AACI;AACA;AACI;;AAER;AACJ;;AAKY;AACA;AAGhB;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs deleted file mode 100644 index 00b89884..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs +++ /dev/null @@ -1,63 +0,0 @@ -"use client"; -import { jsx } from 'react/jsx-runtime'; -import * as React from 'react'; -import { useId, useMemo } from 'react'; -import { PresenceContext } from '../../context/PresenceContext.mjs'; -import { useConstant } from '../../utils/use-constant.mjs'; -import { PopChild } from './PopChild.mjs'; - -const PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => { - const presenceChildren = useConstant(newChildrenMap); - const id = useId(); - let isReusedContext = true; - let context = useMemo(() => { - isReusedContext = false; - return { - id, - initial, - isPresent, - custom, - onExitComplete: (childId) => { - presenceChildren.set(childId, true); - for (const isComplete of presenceChildren.values()) { - if (!isComplete) - return; // can stop searching when any is incomplete - } - onExitComplete && onExitComplete(); - }, - register: (childId) => { - presenceChildren.set(childId, false); - return () => presenceChildren.delete(childId); - }, - }; - }, [isPresent, presenceChildren, onExitComplete]); - /** - * If the presence of a child affects the layout of the components around it, - * we want to make a new context value to ensure they get re-rendered - * so they can detect that layout change. - */ - if (presenceAffectsLayout && isReusedContext) { - context = { ...context }; - } - useMemo(() => { - presenceChildren.forEach((_, key) => presenceChildren.set(key, false)); - }, [isPresent]); - /** - * If there's no `motion` components to fire exit animations, we want to remove this - * component immediately. - */ - React.useEffect(() => { - !isPresent && - !presenceChildren.size && - onExitComplete && - onExitComplete(); - }, [isPresent]); - children = (jsx(PopChild, { pop: mode === "popLayout", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children })); - return (jsx(PresenceContext.Provider, { value: context, children: children })); -}; -function newChildrenMap() { - return new Map(); -} - -export { PresenceChild }; -//# sourceMappingURL=PresenceChild.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.map deleted file mode 100644 index 773d6ed9..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PresenceChild.mjs","sources":["../../../../src/components/AnimatePresence/PresenceChild.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { useId, useMemo } from \"react\"\nimport {\n PresenceContext,\n type PresenceContextProps,\n} from \"../../context/PresenceContext\"\nimport { VariantLabels } from \"../../motion/types\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { PopChild } from \"./PopChild\"\n\ninterface PresenceChildProps {\n children: React.ReactElement\n isPresent: boolean\n onExitComplete?: () => void\n initial?: false | VariantLabels\n custom?: any\n presenceAffectsLayout: boolean\n mode: \"sync\" | \"popLayout\" | \"wait\"\n anchorX?: \"left\" | \"right\"\n anchorY?: \"top\" | \"bottom\"\n root?: HTMLElement | ShadowRoot\n}\n\nexport const PresenceChild = ({\n children,\n initial,\n isPresent,\n onExitComplete,\n custom,\n presenceAffectsLayout,\n mode,\n anchorX,\n anchorY,\n root\n}: PresenceChildProps) => {\n const presenceChildren = useConstant(newChildrenMap)\n const id = useId()\n\n let isReusedContext = true\n let context = useMemo((): PresenceContextProps => {\n isReusedContext = false\n return {\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId: string) => {\n presenceChildren.set(childId, true)\n\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete) return // can stop searching when any is incomplete\n }\n\n onExitComplete && onExitComplete()\n },\n register: (childId: string) => {\n presenceChildren.set(childId, false)\n return () => presenceChildren.delete(childId)\n },\n }\n }, [isPresent, presenceChildren, onExitComplete])\n\n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n if (presenceAffectsLayout && isReusedContext) {\n context = { ...context }\n }\n\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false))\n }, [isPresent])\n\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete()\n }, [isPresent])\n\n children = (\n \n {children}\n \n )\n\n return (\n \n {children}\n \n )\n}\n\nfunction newChildrenMap(): Map {\n return new Map()\n}\n"],"names":[],"mappings":";;;;;;;;AAyBO;AAYH;AACA;;AAGA;;;;;;;AAOQ;AACI;;AAGI;AAAiB;;;;AAKzB;AACI;;;;;AAMZ;;;;AAIG;AACH;AACI;;;AAIA;AACJ;AAEA;;;AAGG;AACH;AACI;;;AAGI;AACR;AAEA;AAMA;AAKJ;AAEA;;AAEA;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs deleted file mode 100644 index 1950f406..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs +++ /dev/null @@ -1,176 +0,0 @@ -"use client"; -import { jsx, Fragment } from 'react/jsx-runtime'; -import { useMemo, useRef, useState, useContext } from 'react'; -import { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs'; -import { useConstant } from '../../utils/use-constant.mjs'; -import { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs'; -import { PresenceChild } from './PresenceChild.mjs'; -import { usePresence } from './use-presence.mjs'; -import { onlyElements, getChildKey } from './utils.mjs'; - -/** - * `AnimatePresence` enables the animation of components that have been removed from the tree. - * - * When adding/removing more than a single child, every child **must** be given a unique `key` prop. - * - * Any `motion` components that have an `exit` property defined will animate out when removed from - * the tree. - * - * ```jsx - * import { motion, AnimatePresence } from 'framer-motion' - * - * export const Items = ({ items }) => ( - * - * {items.map(item => ( - * - * ))} - * - * ) - * ``` - * - * You can sequence exit animations throughout a tree using variants. - * - * If a child contains multiple `motion` components with `exit` props, it will only unmount the child - * once all `motion` components have finished animating out. Likewise, any components using - * `usePresence` all need to call `safeToRemove`. - * - * @public - */ -const AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = "sync", propagate = false, anchorX = "left", anchorY = "top", root }) => { - const [isParentPresent, safeToRemove] = usePresence(propagate); - /** - * Filter any children that aren't ReactElements. We can only track components - * between renders with a props.key. - */ - const presentChildren = useMemo(() => onlyElements(children), [children]); - /** - * Track the keys of the currently rendered children. This is used to - * determine which children are exiting. - */ - const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey); - /** - * If `initial={false}` we only want to pass this to components in the first render. - */ - const isInitialRender = useRef(true); - /** - * A ref containing the currently present children. When all exit animations - * are complete, we use this to re-render the component with the latest children - * *committed* rather than the latest children *rendered*. - */ - const pendingPresentChildren = useRef(presentChildren); - /** - * Track which exiting children have finished animating out. - */ - const exitComplete = useConstant(() => new Map()); - /** - * Track which components are currently processing exit to prevent duplicate processing. - */ - const exitingComponents = useRef(new Set()); - /** - * Save children to render as React state. To ensure this component is concurrent-safe, - * we check for exiting children via an effect. - */ - const [diffedChildren, setDiffedChildren] = useState(presentChildren); - const [renderedChildren, setRenderedChildren] = useState(presentChildren); - useIsomorphicLayoutEffect(() => { - isInitialRender.current = false; - pendingPresentChildren.current = presentChildren; - /** - * Update complete status of exiting children. - */ - for (let i = 0; i < renderedChildren.length; i++) { - const key = getChildKey(renderedChildren[i]); - if (!presentKeys.includes(key)) { - if (exitComplete.get(key) !== true) { - exitComplete.set(key, false); - } - } - else { - exitComplete.delete(key); - exitingComponents.current.delete(key); - } - } - }, [renderedChildren, presentKeys.length, presentKeys.join("-")]); - const exitingChildren = []; - if (presentChildren !== diffedChildren) { - let nextChildren = [...presentChildren]; - /** - * Loop through all the currently rendered components and decide which - * are exiting. - */ - for (let i = 0; i < renderedChildren.length; i++) { - const child = renderedChildren[i]; - const key = getChildKey(child); - if (!presentKeys.includes(key)) { - nextChildren.splice(i, 0, child); - exitingChildren.push(child); - } - } - /** - * If we're in "wait" mode, and we have exiting children, we want to - * only render these until they've all exited. - */ - if (mode === "wait" && exitingChildren.length) { - nextChildren = exitingChildren; - } - setRenderedChildren(onlyElements(nextChildren)); - setDiffedChildren(presentChildren); - /** - * Early return to ensure once we've set state with the latest diffed - * children, we can immediately re-render. - */ - return null; - } - if (process.env.NODE_ENV !== "production" && - mode === "wait" && - renderedChildren.length > 1) { - console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`); - } - /** - * If we've been provided a forceRender function by the LayoutGroupContext, - * we can use it to force a re-render amongst all surrounding components once - * all components have finished animating out. - */ - const { forceRender } = useContext(LayoutGroupContext); - return (jsx(Fragment, { children: renderedChildren.map((child) => { - const key = getChildKey(child); - const isPresent = propagate && !isParentPresent - ? false - : presentChildren === renderedChildren || - presentKeys.includes(key); - const onExit = () => { - if (exitingComponents.current.has(key)) { - return; - } - if (exitComplete.has(key)) { - exitingComponents.current.add(key); - exitComplete.set(key, true); - } - else { - return; - } - let isEveryExitComplete = true; - exitComplete.forEach((isExitComplete) => { - if (!isExitComplete) - isEveryExitComplete = false; - }); - if (isEveryExitComplete) { - forceRender?.(); - setRenderedChildren(pendingPresentChildren.current); - propagate && safeToRemove?.(); - onExitComplete && onExitComplete(); - } - }; - return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial - ? undefined - : false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, anchorY: anchorY, children: child }, key)); - }) })); -}; - -export { AnimatePresence }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.map deleted file mode 100644 index 93309dce..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/components/AnimatePresence/index.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { useContext, useMemo, useRef, useState } from \"react\"\nimport { LayoutGroupContext } from \"../../context/LayoutGroupContext\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useIsomorphicLayoutEffect } from \"../../utils/use-isomorphic-effect\"\nimport { PresenceChild } from \"./PresenceChild\"\nimport { AnimatePresenceProps } from \"./types\"\nimport { usePresence } from \"./use-presence\"\nimport { ComponentKey, getChildKey, onlyElements } from \"./utils\"\n\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * \n * {items.map(item => (\n * \n * ))}\n * \n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nexport const AnimatePresence = ({\n children,\n custom,\n initial = true,\n onExitComplete,\n presenceAffectsLayout = true,\n mode = \"sync\",\n propagate = false,\n anchorX = \"left\",\n anchorY = \"top\",\n root\n}: React.PropsWithChildren) => {\n const [isParentPresent, safeToRemove] = usePresence(propagate)\n\n /**\n * Filter any children that aren't ReactElements. We can only track components\n * between renders with a props.key.\n */\n const presentChildren = useMemo(() => onlyElements(children), [children])\n\n /**\n * Track the keys of the currently rendered children. This is used to\n * determine which children are exiting.\n */\n const presentKeys =\n propagate && !isParentPresent ? [] : presentChildren.map(getChildKey)\n\n /**\n * If `initial={false}` we only want to pass this to components in the first render.\n */\n const isInitialRender = useRef(true)\n\n /**\n * A ref containing the currently present children. When all exit animations\n * are complete, we use this to re-render the component with the latest children\n * *committed* rather than the latest children *rendered*.\n */\n const pendingPresentChildren = useRef(presentChildren)\n\n /**\n * Track which exiting children have finished animating out.\n */\n const exitComplete = useConstant(() => new Map())\n\n /**\n * Track which components are currently processing exit to prevent duplicate processing.\n */\n const exitingComponents = useRef(new Set())\n\n /**\n * Save children to render as React state. To ensure this component is concurrent-safe,\n * we check for exiting children via an effect.\n */\n const [diffedChildren, setDiffedChildren] = useState(presentChildren)\n const [renderedChildren, setRenderedChildren] = useState(presentChildren)\n\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false\n pendingPresentChildren.current = presentChildren\n\n /**\n * Update complete status of exiting children.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i])\n\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false)\n }\n } else {\n exitComplete.delete(key)\n exitingComponents.current.delete(key)\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")])\n\n const exitingChildren: any[] = []\n\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren]\n\n /**\n * Loop through all the currently rendered components and decide which\n * are exiting.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const child = renderedChildren[i]\n const key = getChildKey(child)\n\n if (!presentKeys.includes(key)) {\n nextChildren.splice(i, 0, child)\n exitingChildren.push(child)\n }\n }\n\n /**\n * If we're in \"wait\" mode, and we have exiting children, we want to\n * only render these until they've all exited.\n */\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren\n }\n\n setRenderedChildren(onlyElements(nextChildren))\n setDiffedChildren(presentChildren)\n\n /**\n * Early return to ensure once we've set state with the latest diffed\n * children, we can immediately re-render.\n */\n return null\n }\n\n if (\n process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n renderedChildren.length > 1\n ) {\n console.warn(\n `You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`\n )\n }\n\n /**\n * If we've been provided a forceRender function by the LayoutGroupContext,\n * we can use it to force a re-render amongst all surrounding components once\n * all components have finished animating out.\n */\n const { forceRender } = useContext(LayoutGroupContext)\n\n return (\n <>\n {renderedChildren.map((child) => {\n const key = getChildKey(child)\n\n const isPresent =\n propagate && !isParentPresent\n ? false\n : presentChildren === renderedChildren ||\n presentKeys.includes(key)\n\n const onExit = () => {\n if (exitingComponents.current.has(key)) {\n return\n }\n\n if (exitComplete.has(key)) {\n exitingComponents.current.add(key)\n exitComplete.set(key, true)\n } else {\n return\n }\n\n let isEveryExitComplete = true\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete) isEveryExitComplete = false\n })\n\n if (isEveryExitComplete) {\n forceRender?.()\n setRenderedChildren(pendingPresentChildren.current)\n\n propagate && safeToRemove?.()\n\n onExitComplete && onExitComplete()\n }\n }\n\n return (\n \n {child}\n \n )\n })}\n \n )\n}\n"],"names":[],"mappings":";;;;;;;;;;AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AACI;;AAcH;;;AAGG;AACH;AAEA;;;AAGG;AACH;AAGA;;AAEG;AACH;AAEA;;;;AAIG;AACH;AAEA;;AAEG;;AAGH;;AAEG;;AAGH;;;AAGG;;;;AAKC;AACA;AAEA;;AAEG;AACH;;;;AAKY;;;;AAGJ;AACA;;;AAGZ;;AAIA;AACI;AAEA;;;AAGG;AACH;AACI;AACA;;;AAII;;;AAIR;;;AAGG;;;;AAKH;;AAGA;;;AAGG;AACH;;AAGJ;AAEI;AACA;AAEA;;AAKJ;;;;AAIG;;;AAMS;AAEA;AAEQ;;AAEE;;;;;AAON;AACI;AACA;;;;;;AAMJ;AACI;;AACJ;;;AAII;AAEA;;;AAIR;AAEA;AAMgB;;;AAiBhC;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence-data.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence-data.mjs deleted file mode 100644 index 8f0f305c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence-data.mjs +++ /dev/null @@ -1,11 +0,0 @@ -"use client"; -import { useContext } from 'react'; -import { PresenceContext } from '../../context/PresenceContext.mjs'; - -function usePresenceData() { - const context = useContext(PresenceContext); - return context ? context.custom : undefined; -} - -export { usePresenceData }; -//# sourceMappingURL=use-presence-data.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence-data.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence-data.mjs.map deleted file mode 100644 index a94db78a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence-data.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-presence-data.mjs","sources":["../../../../src/components/AnimatePresence/use-presence-data.ts"],"sourcesContent":["\"use client\"\n\nimport { useContext } from \"react\"\nimport { PresenceContext } from \"../../context/PresenceContext\"\n\nexport function usePresenceData() {\n const context = useContext(PresenceContext)\n return context ? context.custom : undefined\n}\n"],"names":[],"mappings":";;;;;AAMI;;AAEJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs deleted file mode 100644 index 462598e9..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs +++ /dev/null @@ -1,72 +0,0 @@ -"use client"; -import { useContext, useId, useEffect, useCallback } from 'react'; -import { PresenceContext } from '../../context/PresenceContext.mjs'; - -/** - * When a component is the child of `AnimatePresence`, it can use `usePresence` - * to access information about whether it's still present in the React tree. - * - * ```jsx - * import { usePresence } from "framer-motion" - * - * export const Component = () => { - * const [isPresent, safeToRemove] = usePresence() - * - * useEffect(() => { - * !isPresent && setTimeout(safeToRemove, 1000) - * }, [isPresent]) - * - * return

- * } - * ``` - * - * If `isPresent` is `false`, it means that a component has been removed from the tree, - * but `AnimatePresence` won't really remove it until `safeToRemove` has been called. - * - * @public - */ -function usePresence(subscribe = true) { - const context = useContext(PresenceContext); - if (context === null) - return [true, null]; - const { isPresent, onExitComplete, register } = context; - // It's safe to call the following hooks conditionally (after an early return) because the context will always - // either be null or non-null for the lifespan of the component. - const id = useId(); - useEffect(() => { - if (subscribe) { - return register(id); - } - }, [subscribe]); - const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]); - return !isPresent && onExitComplete ? [false, safeToRemove] : [true]; -} -/** - * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present. - * There is no `safeToRemove` function. - * - * ```jsx - * import { useIsPresent } from "framer-motion" - * - * export const Component = () => { - * const isPresent = useIsPresent() - * - * useEffect(() => { - * !isPresent && console.log("I've been removed!") - * }, [isPresent]) - * - * return
- * } - * ``` - * - * @public - */ -function useIsPresent() { - return isPresent(useContext(PresenceContext)); -} -function isPresent(context) { - return context === null ? true : context.isPresent; -} - -export { isPresent, useIsPresent, usePresence }; -//# sourceMappingURL=use-presence.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.map deleted file mode 100644 index a3af8931..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-presence.mjs","sources":["../../../../src/components/AnimatePresence/use-presence.ts"],"sourcesContent":["\"use client\"\n\nimport { useCallback, useContext, useEffect, useId } from \"react\"\nimport {\n PresenceContext,\n PresenceContextProps,\n} from \"../../context/PresenceContext\"\n\nexport type SafeToRemove = () => void\n\ntype AlwaysPresent = [true, null]\n\ntype Present = [true]\n\ntype NotPresent = [false, SafeToRemove]\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return
\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed from the tree,\n * but `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nexport function usePresence(\n subscribe: boolean = true\n): AlwaysPresent | Present | NotPresent {\n const context = useContext(PresenceContext)\n\n if (context === null) return [true, null]\n\n const { isPresent, onExitComplete, register } = context\n\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n\n const id = useId()\n useEffect(() => {\n if (subscribe) {\n return register(id)\n }\n }, [subscribe])\n\n const safeToRemove = useCallback(\n () => subscribe && onExitComplete && onExitComplete(id),\n [id, onExitComplete, subscribe]\n )\n\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true]\n}\n\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return
\n * }\n * ```\n *\n * @public\n */\nexport function useIsPresent() {\n return isPresent(useContext(PresenceContext))\n}\n\nexport function isPresent(context: PresenceContextProps | null) {\n return context === null ? true : context.isPresent\n}\n"],"names":[],"mappings":";;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACG;AAGF;;AAEsB;;;;AAOtB;;;AAGQ;;AAER;;AAOA;AACJ;AAEA;;;;;;;;;;;;;;;;;;;AAmBG;;AAEC;AACJ;AAEM;AACF;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs deleted file mode 100644 index 31b4bc8b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { Children, isValidElement } from 'react'; - -const getChildKey = (child) => child.key || ""; -function onlyElements(children) { - const filtered = []; - // We use forEach here instead of map as map mutates the component key by preprending `.$` - Children.forEach(children, (child) => { - if (isValidElement(child)) - filtered.push(child); - }); - return filtered; -} - -export { getChildKey, onlyElements }; -//# sourceMappingURL=utils.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.map deleted file mode 100644 index 56798048..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.mjs","sources":["../../../../src/components/AnimatePresence/utils.ts"],"sourcesContent":["import { isValidElement, Children, ReactElement, ReactNode } from \"react\"\n\nexport type ComponentKey = string | number\n\nexport const getChildKey = (child: ReactElement): ComponentKey =>\n child.key || \"\"\n\nexport function onlyElements(children: ReactNode): ReactElement[] {\n const filtered: ReactElement[] = []\n\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child)) filtered.push(child)\n })\n\n return filtered\n}\n"],"names":[],"mappings":";;AAIO,MAAM,WAAW,GAAG,CAAC,KAAwB,KAChD,KAAK,CAAC,GAAG,IAAI;AAEX,SAAU,YAAY,CAAC,QAAmB,EAAA;IAC5C,MAAM,QAAQ,GAAwB,EAAE;;IAGxC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,KAAI;QACjC,IAAI,cAAc,CAAC,KAAK,CAAC;AAAE,YAAA,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;AACnD,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,QAAQ;AACnB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs deleted file mode 100644 index 13a4147f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs +++ /dev/null @@ -1,17 +0,0 @@ -"use client"; -import { jsx } from 'react/jsx-runtime'; -import { invariant } from 'motion-utils'; -import * as React from 'react'; -import { useConstant } from '../utils/use-constant.mjs'; -import { LayoutGroup } from './LayoutGroup/index.mjs'; - -let id = 0; -const AnimateSharedLayout = ({ children }) => { - React.useEffect(() => { - invariant(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations"); - }, []); - return (jsx(LayoutGroup, { id: useConstant(() => `asl-${id++}`), children: children })); -}; - -export { AnimateSharedLayout }; -//# sourceMappingURL=AnimateSharedLayout.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs.map deleted file mode 100644 index 4fb5031f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimateSharedLayout.mjs","sources":["../../../src/components/AnimateSharedLayout.tsx"],"sourcesContent":["\"use client\"\n\nimport { invariant } from \"motion-utils\"\nimport * as React from \"react\"\nimport { useConstant } from \"../utils/use-constant\"\nimport { LayoutGroup } from \"./LayoutGroup\"\n\nlet id = 0\nexport const AnimateSharedLayout: React.FunctionComponent<\n React.PropsWithChildren\n> = ({ children }: React.PropsWithChildren<{}>) => {\n React.useEffect(() => {\n invariant(\n false,\n \"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations\"\n )\n }, [])\n\n return (\n `asl-${id++}`)}>\n {children}\n \n )\n}\n"],"names":[],"mappings":";;;;;;;AAOA;;AAII;AACI;;;AAWR;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs deleted file mode 100644 index 4d5b36d3..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs +++ /dev/null @@ -1,33 +0,0 @@ -"use client"; -import { jsx } from 'react/jsx-runtime'; -import { useContext, useRef, useMemo } from 'react'; -import { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs'; -import { DeprecatedLayoutGroupContext } from '../../context/DeprecatedLayoutGroupContext.mjs'; -import { useForceUpdate } from '../../utils/use-force-update.mjs'; -import { nodeGroup } from 'motion-dom'; - -const shouldInheritGroup = (inherit) => inherit === true; -const shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === "id"; -const LayoutGroup = ({ children, id, inherit = true }) => { - const layoutGroupContext = useContext(LayoutGroupContext); - const deprecatedLayoutGroupContext = useContext(DeprecatedLayoutGroupContext); - const [forceRender, key] = useForceUpdate(); - const context = useRef(null); - const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext; - if (context.current === null) { - if (shouldInheritId(inherit) && upstreamId) { - id = id ? upstreamId + "-" + id : upstreamId; - } - context.current = { - id, - group: shouldInheritGroup(inherit) - ? layoutGroupContext.group || nodeGroup() - : nodeGroup(), - }; - } - const memoizedContext = useMemo(() => ({ ...context.current, forceRender }), [key]); - return (jsx(LayoutGroupContext.Provider, { value: memoizedContext, children: children })); -}; - -export { LayoutGroup }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs.map deleted file mode 100644 index f429a6f8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/components/LayoutGroup/index.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { MutableRefObject, useContext, useMemo, useRef } from \"react\"\nimport {\n LayoutGroupContext,\n LayoutGroupContextProps,\n} from \"../../context/LayoutGroupContext\"\nimport { DeprecatedLayoutGroupContext } from \"../../context/DeprecatedLayoutGroupContext\"\nimport { nodeGroup } from \"../../projection\"\nimport { useForceUpdate } from \"../../utils/use-force-update\"\n\ntype InheritOption = boolean | \"id\"\n\nexport interface Props {\n id?: string\n inherit?: InheritOption\n}\n\nconst shouldInheritGroup = (inherit: InheritOption) => inherit === true\nconst shouldInheritId = (inherit: InheritOption) =>\n shouldInheritGroup(inherit === true) || inherit === \"id\"\n\nexport const LayoutGroup: React.FunctionComponent<\n React.PropsWithChildren\n> = ({ children, id, inherit = true }) => {\n const layoutGroupContext = useContext(LayoutGroupContext)\n const deprecatedLayoutGroupContext = useContext(\n DeprecatedLayoutGroupContext\n )\n const [forceRender, key] = useForceUpdate()\n const context = useRef(\n null\n ) as MutableRefObject\n\n const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext\n if (context.current === null) {\n if (shouldInheritId(inherit) && upstreamId) {\n id = id ? upstreamId + \"-\" + id : upstreamId\n }\n\n context.current = {\n id,\n group: shouldInheritGroup(inherit)\n ? layoutGroupContext.group || nodeGroup()\n : nodeGroup(),\n }\n }\n\n const memoizedContext = useMemo(\n () => ({ ...context.current, forceRender }),\n [key]\n )\n\n return (\n \n {children}\n \n )\n}\n"],"names":[],"mappings":";;;;;;;;AAmBA;AACA;AAGO;AAGH;AACA;;AAIA;AAIA;AACA;AACI;AACI;;;;AAKA;AACI;;;;;AAUZ;AAKJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs deleted file mode 100644 index 2b051f1b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs +++ /dev/null @@ -1,69 +0,0 @@ -"use client"; -import { jsx } from 'react/jsx-runtime'; -import { useState, useRef, useEffect } from 'react'; -import { LazyContext } from '../../context/LazyContext.mjs'; -import { loadFeatures } from '../../motion/features/load-features.mjs'; - -/** - * Used in conjunction with the `m` component to reduce bundle size. - * - * `m` is a version of the `motion` component that only loads functionality - * critical for the initial render. - * - * `LazyMotion` can then be used to either synchronously or asynchronously - * load animation and gesture support. - * - * ```jsx - * // Synchronous loading - * import { LazyMotion, m, domAnimation } from "framer-motion" - * - * function App() { - * return ( - * - * - * - * ) - * } - * - * // Asynchronous loading - * import { LazyMotion, m } from "framer-motion" - * - * function App() { - * return ( - * import('./path/to/domAnimation')}> - * - * - * ) - * } - * ``` - * - * @public - */ -function LazyMotion({ children, features, strict = false }) { - const [, setIsLoaded] = useState(!isLazyBundle(features)); - const loadedRenderer = useRef(undefined); - /** - * If this is a synchronous load, load features immediately - */ - if (!isLazyBundle(features)) { - const { renderer, ...loadedFeatures } = features; - loadedRenderer.current = renderer; - loadFeatures(loadedFeatures); - } - useEffect(() => { - if (isLazyBundle(features)) { - features().then(({ renderer, ...loadedFeatures }) => { - loadFeatures(loadedFeatures); - loadedRenderer.current = renderer; - setIsLoaded(true); - }); - } - }, []); - return (jsx(LazyContext.Provider, { value: { renderer: loadedRenderer.current, strict }, children: children })); -} -function isLazyBundle(features) { - return typeof features === "function"; -} - -export { LazyMotion }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs.map deleted file mode 100644 index d33ba6c5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/components/LazyMotion/index.tsx"],"sourcesContent":["\"use client\"\n\nimport { useEffect, useRef, useState } from \"react\"\nimport { LazyContext } from \"../../context/LazyContext\"\nimport { loadFeatures } from \"../../motion/features/load-features\"\nimport { FeatureBundle, LazyFeatureBundle } from \"../../motion/features/types\"\nimport { CreateVisualElement } from \"../../render/types\"\nimport { LazyProps } from \"./types\"\n\n/**\n * Used in conjunction with the `m` component to reduce bundle size.\n *\n * `m` is a version of the `motion` component that only loads functionality\n * critical for the initial render.\n *\n * `LazyMotion` can then be used to either synchronously or asynchronously\n * load animation and gesture support.\n *\n * ```jsx\n * // Synchronous loading\n * import { LazyMotion, m, domAnimation } from \"framer-motion\"\n *\n * function App() {\n * return (\n * \n * \n * \n * )\n * }\n *\n * // Asynchronous loading\n * import { LazyMotion, m } from \"framer-motion\"\n *\n * function App() {\n * return (\n * import('./path/to/domAnimation')}>\n * \n * \n * )\n * }\n * ```\n *\n * @public\n */\nexport function LazyMotion({ children, features, strict = false }: LazyProps) {\n const [, setIsLoaded] = useState(!isLazyBundle(features))\n const loadedRenderer = useRef(undefined)\n\n /**\n * If this is a synchronous load, load features immediately\n */\n if (!isLazyBundle(features)) {\n const { renderer, ...loadedFeatures } = features\n loadedRenderer.current = renderer\n loadFeatures(loadedFeatures)\n }\n\n useEffect(() => {\n if (isLazyBundle(features)) {\n features().then(({ renderer, ...loadedFeatures }) => {\n loadFeatures(loadedFeatures)\n loadedRenderer.current = renderer\n setIsLoaded(true)\n })\n }\n }, [])\n\n return (\n \n {children}\n \n )\n}\n\nfunction isLazyBundle(\n features: FeatureBundle | LazyFeatureBundle\n): features is LazyFeatureBundle {\n return typeof features === \"function\"\n}\n"],"names":[],"mappings":";;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACG;AACF;AACA;AAEA;;AAEG;AACH;;AAEI;;;;AAKA;AACI;;AAEI;;AAEJ;;;;AAWZ;AAEA;AAGI;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs deleted file mode 100644 index 834f8886..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs +++ /dev/null @@ -1,53 +0,0 @@ -"use client"; -import { jsx } from 'react/jsx-runtime'; -import { useContext, useMemo } from 'react'; -import { resolveTransition } from 'motion-dom'; -import { MotionConfigContext } from '../../context/MotionConfigContext.mjs'; -import { loadExternalIsValidProp } from '../../render/dom/utils/filter-props.mjs'; -import { useConstant } from '../../utils/use-constant.mjs'; - -/** - * `MotionConfig` is used to set configuration options for all children `motion` components. - * - * ```jsx - * import { motion, MotionConfig } from "framer-motion" - * - * export function App() { - * return ( - * - * - * - * ) - * } - * ``` - * - * @public - */ -function MotionConfig({ children, isValidProp, ...config }) { - isValidProp && loadExternalIsValidProp(isValidProp); - /** - * Inherit props from any parent MotionConfig components - */ - const parentConfig = useContext(MotionConfigContext); - config = { ...parentConfig, ...config }; - config.transition = resolveTransition(config.transition, parentConfig.transition); - /** - * Don't allow isStatic to change between renders as it affects how many hooks - * motion components fire. - */ - config.isStatic = useConstant(() => config.isStatic); - /** - * Creating a new config context object will re-render every `motion` component - * every time it renders. So we only want to create a new one sparingly. - */ - const context = useMemo(() => config, [ - JSON.stringify(config.transition), - config.transformPagePoint, - config.reducedMotion, - config.skipAnimations, - ]); - return (jsx(MotionConfigContext.Provider, { value: context, children: children })); -} - -export { MotionConfig }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs.map deleted file mode 100644 index 7429273c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/components/MotionConfig/index.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { useContext, useMemo } from \"react\"\nimport { resolveTransition } from \"motion-dom\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport {\n loadExternalIsValidProp,\n IsValidProp,\n} from \"../../render/dom/utils/filter-props\"\nimport { useConstant } from \"../../utils/use-constant\"\n\nexport interface MotionConfigProps extends Partial {\n children?: React.ReactNode\n isValidProp?: IsValidProp\n}\n\n/**\n * `MotionConfig` is used to set configuration options for all children `motion` components.\n *\n * ```jsx\n * import { motion, MotionConfig } from \"framer-motion\"\n *\n * export function App() {\n * return (\n * \n * \n * \n * )\n * }\n * ```\n *\n * @public\n */\nexport function MotionConfig({\n children,\n isValidProp,\n ...config\n}: MotionConfigProps) {\n isValidProp && loadExternalIsValidProp(isValidProp)\n\n /**\n * Inherit props from any parent MotionConfig components\n */\n const parentConfig = useContext(MotionConfigContext)\n config = { ...parentConfig, ...config }\n\n config.transition = resolveTransition(\n config.transition,\n parentConfig.transition\n )\n\n /**\n * Don't allow isStatic to change between renders as it affects how many hooks\n * motion components fire.\n */\n config.isStatic = useConstant(() => config.isStatic)\n\n /**\n * Creating a new config context object will re-render every `motion` component\n * every time it renders. So we only want to create a new one sparingly.\n */\n const context = useMemo(\n () => config,\n [\n JSON.stringify(config.transition),\n config.transformPagePoint,\n config.reducedMotion,\n config.skipAnimations,\n ]\n )\n\n return (\n \n {children}\n \n )\n}\n"],"names":[],"mappings":";;;;;;;;AAiBA;;;;;;;;;;;;;;;;AAgBG;AACG;AAKF;AAEA;;AAEG;AACH;;AAGA;AAKA;;;AAGG;AACH;AAEA;;;AAGG;;AAIK;AACA;AACA;AACA;AACH;AAGL;AAKJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Group.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Group.mjs deleted file mode 100644 index 2d687a30..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Group.mjs +++ /dev/null @@ -1,84 +0,0 @@ -"use client"; -import { jsx } from 'react/jsx-runtime'; -import { invariant } from 'motion-utils'; -import { forwardRef, useRef, useEffect } from 'react'; -import { ReorderContext } from '../../context/ReorderContext.mjs'; -import { motion } from '../../render/components/motion/proxy.mjs'; -import { useConstant } from '../../utils/use-constant.mjs'; -import { checkReorder } from './utils/check-reorder.mjs'; - -function ReorderGroupComponent({ children, as = "ul", axis = "y", onReorder, values, ...props }, externalRef) { - const Component = useConstant(() => motion[as]); - const order = []; - const isReordering = useRef(false); - const groupRef = useRef(null); - invariant(Boolean(values), "Reorder.Group must be provided a values prop", "reorder-values"); - const context = { - axis, - groupRef, - registerItem: (value, layout) => { - // If the entry was already added, update it rather than adding it again - const idx = order.findIndex((entry) => value === entry.value); - if (idx !== -1) { - order[idx].layout = layout[axis]; - } - else { - order.push({ value: value, layout: layout[axis] }); - } - order.sort(compareMin); - }, - updateOrder: (item, offset, velocity) => { - if (isReordering.current) - return; - const newOrder = checkReorder(order, item, offset, velocity); - if (order !== newOrder) { - isReordering.current = true; - // Find which two values swapped and apply that swap - // to the full values array. This preserves unmeasured - // items (e.g. in virtualized lists). - const newValues = [...values]; - for (let i = 0; i < newOrder.length; i++) { - if (order[i].value !== newOrder[i].value) { - const a = values.indexOf(order[i].value); - const b = values.indexOf(newOrder[i].value); - if (a !== -1 && b !== -1) { - [newValues[a], newValues[b]] = [newValues[b], newValues[a]]; - } - break; - } - } - onReorder(newValues); - } - }, - }; - useEffect(() => { - isReordering.current = false; - }); - // Combine refs if external ref is provided - const setRef = (element) => { - groupRef.current = element; - if (typeof externalRef === "function") { - externalRef(element); - } - else if (externalRef) { - externalRef.current = element; - } - }; - /** - * Disable browser scroll anchoring on the group container. - * When items reorder, scroll anchoring can cause the browser to adjust - * the scroll position, which interferes with drag position calculations. - */ - const groupStyle = { - overflowAnchor: "none", - ...props.style, - }; - return (jsx(Component, { ...props, style: groupStyle, ref: setRef, ignoreStrict: true, children: jsx(ReorderContext.Provider, { value: context, children: children }) })); -} -const ReorderGroup = /*@__PURE__*/ forwardRef(ReorderGroupComponent); -function compareMin(a, b) { - return a.layout.min - b.layout.min; -} - -export { ReorderGroup, ReorderGroupComponent }; -//# sourceMappingURL=Group.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Group.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Group.mjs.map deleted file mode 100644 index dad1cd69..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Group.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Group.mjs","sources":["../../../../src/components/Reorder/Group.tsx"],"sourcesContent":["\"use client\"\n\nimport { invariant } from \"motion-utils\"\nimport * as React from \"react\"\nimport { forwardRef, FunctionComponent, JSX, useEffect, useRef } from \"react\"\nimport { ReorderContext } from \"../../context/ReorderContext\"\nimport { motion } from \"../../render/components/motion/proxy\"\nimport { HTMLMotionProps } from \"../../render/html/types\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport {\n DefaultGroupElement,\n ItemData,\n ReorderContextProps,\n ReorderElementTag,\n} from \"./types\"\nimport { checkReorder } from \"./utils/check-reorder\"\n\nexport interface Props<\n V,\n TagName extends ReorderElementTag = DefaultGroupElement\n> {\n /**\n * A HTML element to render this component as. Defaults to `\"ul\"`.\n *\n * @public\n */\n as?: TagName\n\n /**\n * The axis to reorder along. By default, items will be draggable on this axis.\n * To make draggable on both axes, set ``\n *\n * @public\n */\n axis?: \"x\" | \"y\"\n\n /**\n * A callback to fire with the new value order. For instance, if the values\n * are provided as a state from `useState`, this could be the set state function.\n *\n * @public\n */\n onReorder: (newOrder: V[]) => void\n\n /**\n * The latest values state.\n *\n * ```jsx\n * function Component() {\n * const [items, setItems] = useState([0, 1, 2])\n *\n * return (\n * \n * {items.map((item) => )}\n * \n * )\n * }\n * ```\n *\n * @public\n */\n values: V[]\n}\n\ntype ReorderGroupProps<\n V,\n TagName extends ReorderElementTag = DefaultGroupElement\n> = Props &\n Omit, \"values\"> &\n React.PropsWithChildren<{}>\n\nexport function ReorderGroupComponent<\n V,\n TagName extends ReorderElementTag = DefaultGroupElement\n>(\n {\n children,\n as = \"ul\" as TagName,\n axis = \"y\",\n onReorder,\n values,\n ...props\n }: ReorderGroupProps,\n externalRef?: React.ForwardedRef\n): JSX.Element {\n const Component = useConstant(\n () => motion[as as keyof typeof motion]\n ) as FunctionComponent<\n React.PropsWithChildren & { ref?: React.Ref }>\n >\n\n const order: ItemData[] = []\n const isReordering = useRef(false)\n const groupRef = useRef(null)\n\n invariant(\n Boolean(values),\n \"Reorder.Group must be provided a values prop\",\n \"reorder-values\"\n )\n\n const context: ReorderContextProps = {\n axis,\n groupRef,\n registerItem: (value, layout) => {\n // If the entry was already added, update it rather than adding it again\n const idx = order.findIndex((entry) => value === entry.value)\n if (idx !== -1) {\n order[idx].layout = layout[axis]\n } else {\n order.push({ value: value, layout: layout[axis] })\n }\n order.sort(compareMin)\n },\n updateOrder: (item, offset, velocity) => {\n if (isReordering.current) return\n\n const newOrder = checkReorder(order, item, offset, velocity)\n\n if (order !== newOrder) {\n isReordering.current = true\n\n // Find which two values swapped and apply that swap\n // to the full values array. This preserves unmeasured\n // items (e.g. in virtualized lists).\n const newValues = [...values]\n for (let i = 0; i < newOrder.length; i++) {\n if (order[i].value !== newOrder[i].value) {\n const a = values.indexOf(order[i].value)\n const b = values.indexOf(newOrder[i].value)\n if (a !== -1 && b !== -1) {\n ;[newValues[a], newValues[b]] = [newValues[b], newValues[a]]\n }\n break\n }\n }\n onReorder(newValues)\n }\n },\n }\n\n useEffect(() => {\n isReordering.current = false\n })\n\n // Combine refs if external ref is provided\n const setRef = (element: Element | null) => {\n ;(groupRef as React.MutableRefObject).current = element\n if (typeof externalRef === \"function\") {\n externalRef(element)\n } else if (externalRef) {\n ;(\n externalRef as React.MutableRefObject\n ).current = element\n }\n }\n\n /**\n * Disable browser scroll anchoring on the group container.\n * When items reorder, scroll anchoring can cause the browser to adjust\n * the scroll position, which interferes with drag position calculations.\n */\n const groupStyle = {\n overflowAnchor: \"none\" as const,\n ...props.style,\n }\n\n return (\n \n \n {children}\n \n \n )\n}\n\nexport const ReorderGroup = /*@__PURE__*/ forwardRef(ReorderGroupComponent) as <\n Values extends any[],\n TagName extends ReorderElementTag = DefaultGroupElement\n>(\n props: Omit<\n ReorderGroupProps,\n \"values\" | \"onReorder\"\n > & {\n values: Values\n onReorder: (newOrder: Values) => void\n } & { ref?: React.ForwardedRef }\n) => ReturnType\n\nfunction compareMin(a: ItemData, b: ItemData) {\n return a.layout.min - b.layout.min\n}\n"],"names":[],"mappings":";;;;;;;;;AAuEM;AAcF;;AAOA;AACA;;AAQA;;;AAGI;;AAEI;AACA;;;;AAGI;;AAEJ;;;;;AAKA;AAEA;AACI;;;;AAKA;AACA;AACI;AACI;AACA;;;;;;;;;;;;AAahB;AACJ;;AAGA;AACM;AACF;;;;AAIQ;;AAGZ;AAEA;;;;AAIG;AACH;AACI;;;AAIJ;AAOJ;AAEO;AAaP;;AAEA;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Item.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Item.mjs deleted file mode 100644 index 8a1f18b7..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Item.mjs +++ /dev/null @@ -1,43 +0,0 @@ -"use client"; -import { jsx } from 'react/jsx-runtime'; -import { isMotionValue } from 'motion-dom'; -import { invariant } from 'motion-utils'; -import { forwardRef, useContext } from 'react'; -import { ReorderContext } from '../../context/ReorderContext.mjs'; -import { motion } from '../../render/components/motion/proxy.mjs'; -import { useConstant } from '../../utils/use-constant.mjs'; -import { useMotionValue } from '../../value/use-motion-value.mjs'; -import { useTransform } from '../../value/use-transform.mjs'; -import { autoScrollIfNeeded, resetAutoScrollState } from './utils/auto-scroll.mjs'; - -function useDefaultMotionValue(value, defaultValue = 0) { - return isMotionValue(value) ? value : useMotionValue(defaultValue); -} -function ReorderItemComponent({ children, style = {}, value, as = "li", onDrag, onDragEnd, layout = true, ...props }, externalRef) { - const Component = useConstant(() => motion[as]); - const context = useContext(ReorderContext); - const point = { - x: useDefaultMotionValue(style.x), - y: useDefaultMotionValue(style.y), - }; - const zIndex = useTransform([point.x, point.y], ([latestX, latestY]) => latestX || latestY ? 1 : "unset"); - invariant(Boolean(context), "Reorder.Item must be a child of Reorder.Group", "reorder-item-child"); - const { axis, registerItem, updateOrder, groupRef } = context; - return (jsx(Component, { drag: axis, ...props, dragSnapToOrigin: true, style: { ...style, x: point.x, y: point.y, zIndex }, layout: layout, onDrag: (event, gesturePoint) => { - const { velocity, point: pointerPoint } = gesturePoint; - const offset = point[axis].get(); - // Always attempt to update order - checkReorder handles the logic - updateOrder(value, offset, velocity[axis]); - autoScrollIfNeeded(groupRef.current, pointerPoint[axis], axis, velocity[axis]); - onDrag && onDrag(event, gesturePoint); - }, onDragEnd: (event, gesturePoint) => { - resetAutoScrollState(); - onDragEnd && onDragEnd(event, gesturePoint); - }, onLayoutMeasure: (measured) => { - registerItem(value, measured); - }, ref: externalRef, ignoreStrict: true, children: children })); -} -const ReorderItem = /*@__PURE__*/ forwardRef(ReorderItemComponent); - -export { ReorderItem, ReorderItemComponent }; -//# sourceMappingURL=Item.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Item.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Item.mjs.map deleted file mode 100644 index ca1bac48..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/Item.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Item.mjs","sources":["../../../../src/components/Reorder/Item.tsx"],"sourcesContent":["\"use client\"\n\nimport { isMotionValue } from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\nimport * as React from \"react\"\nimport { forwardRef, FunctionComponent, useContext } from \"react\"\nimport { ReorderContext } from \"../../context/ReorderContext\"\nimport { motion } from \"../../render/components/motion/proxy\"\nimport { HTMLMotionProps } from \"../../render/html/types\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useMotionValue } from \"../../value/use-motion-value\"\nimport { useTransform } from \"../../value/use-transform\"\n\nimport { DefaultItemElement, ReorderElementTag } from \"./types\"\nimport {\n autoScrollIfNeeded,\n resetAutoScrollState,\n} from \"./utils/auto-scroll\"\n\nexport interface Props<\n V,\n TagName extends ReorderElementTag = DefaultItemElement\n> {\n /**\n * A HTML element to render this component as. Defaults to `\"li\"`.\n *\n * @public\n */\n as?: TagName\n\n /**\n * The value in the list that this component represents.\n *\n * @public\n */\n value: V\n\n /**\n * A subset of layout options primarily used to disable layout=\"size\"\n *\n * @public\n * @default true\n */\n layout?: true | \"position\"\n}\n\nfunction useDefaultMotionValue(value: any, defaultValue: number = 0) {\n return isMotionValue(value) ? value : useMotionValue(defaultValue)\n}\n\ntype ReorderItemProps<\n V,\n TagName extends ReorderElementTag = DefaultItemElement\n> = Props &\n Omit, \"value\" | \"layout\"> &\n React.PropsWithChildren<{}>\n\nexport function ReorderItemComponent<\n V,\n TagName extends ReorderElementTag = DefaultItemElement\n>(\n {\n children,\n style = {},\n value,\n as = \"li\" as TagName,\n onDrag,\n onDragEnd,\n layout = true,\n ...props\n }: ReorderItemProps,\n externalRef?: React.ForwardedRef\n): React.JSX.Element {\n const Component = useConstant(\n () => motion[as as keyof typeof motion]\n ) as FunctionComponent<\n React.PropsWithChildren & { ref?: React.Ref }>\n >\n\n const context = useContext(ReorderContext)\n const point = {\n x: useDefaultMotionValue(style.x),\n y: useDefaultMotionValue(style.y),\n }\n\n const zIndex = useTransform([point.x, point.y], ([latestX, latestY]) =>\n latestX || latestY ? 1 : \"unset\"\n )\n\n invariant(\n Boolean(context),\n \"Reorder.Item must be a child of Reorder.Group\",\n \"reorder-item-child\"\n )\n\n const { axis, registerItem, updateOrder, groupRef } = context!\n\n return (\n {\n const { velocity, point: pointerPoint } = gesturePoint\n const offset = point[axis].get()\n\n // Always attempt to update order - checkReorder handles the logic\n updateOrder(value, offset, velocity[axis])\n\n autoScrollIfNeeded(\n groupRef.current,\n pointerPoint[axis],\n axis,\n velocity[axis]\n )\n\n onDrag && onDrag(event, gesturePoint)\n }}\n onDragEnd={(event, gesturePoint) => {\n resetAutoScrollState()\n onDragEnd && onDragEnd(event, gesturePoint)\n }}\n onLayoutMeasure={(measured) => {\n registerItem(value, measured)\n }}\n ref={externalRef}\n ignoreStrict\n >\n {children}\n \n )\n}\n\nexport const ReorderItem = /*@__PURE__*/ forwardRef(ReorderItemComponent) as <\n V,\n TagName extends ReorderElementTag = DefaultItemElement\n>(\n props: ReorderItemProps & { ref?: React.ForwardedRef }\n) => ReturnType\n"],"names":[],"mappings":";;;;;;;;;;;;AA8CA;AACI;AACJ;AASM;AAgBF;AAMA;AACA;AACI;AACA;;AAGJ;;;;;;;;AA0BY;AAOA;;AAGA;AACA;AACJ;AAEI;;AAQhB;AAEO;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/namespace.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/namespace.mjs deleted file mode 100644 index b8d507ad..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/namespace.mjs +++ /dev/null @@ -1,3 +0,0 @@ -export { ReorderGroup as Group } from './Group.mjs'; -export { ReorderItem as Item } from './Item.mjs'; -//# sourceMappingURL=namespace.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/namespace.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/namespace.mjs.map deleted file mode 100644 index 80982f67..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/namespace.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"namespace.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.mjs deleted file mode 100644 index a2e4a8f8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.mjs +++ /dev/null @@ -1,124 +0,0 @@ -const threshold = 50; -const maxSpeed = 25; -const overflowStyles = new Set(["auto", "scroll"]); -// Track initial scroll limits per scrollable element (Bug 1 fix) -const initialScrollLimits = new WeakMap(); -const activeScrollEdge = new WeakMap(); -// Track which group element is currently dragging to clear state on end -let currentGroupElement = null; -function resetAutoScrollState() { - if (currentGroupElement) { - const scrollableAncestor = findScrollableAncestor(currentGroupElement, "y"); - if (scrollableAncestor) { - activeScrollEdge.delete(scrollableAncestor); - initialScrollLimits.delete(scrollableAncestor); - } - // Also try x axis - const scrollableAncestorX = findScrollableAncestor(currentGroupElement, "x"); - if (scrollableAncestorX && scrollableAncestorX !== scrollableAncestor) { - activeScrollEdge.delete(scrollableAncestorX); - initialScrollLimits.delete(scrollableAncestorX); - } - currentGroupElement = null; - } -} -function isScrollableElement(element, axis) { - const style = getComputedStyle(element); - const overflow = axis === "x" ? style.overflowX : style.overflowY; - const isDocumentScroll = element === document.body || - element === document.documentElement; - return overflowStyles.has(overflow) || isDocumentScroll; -} -function findScrollableAncestor(element, axis) { - let current = element?.parentElement; - while (current) { - if (isScrollableElement(current, axis)) { - return current; - } - current = current.parentElement; - } - return null; -} -function getScrollAmount(pointerPosition, scrollElement, axis) { - const rect = scrollElement.getBoundingClientRect(); - const start = axis === "x" ? Math.max(0, rect.left) : Math.max(0, rect.top); - const end = axis === "x" ? Math.min(window.innerWidth, rect.right) : Math.min(window.innerHeight, rect.bottom); - const distanceFromStart = pointerPosition - start; - const distanceFromEnd = end - pointerPosition; - if (distanceFromStart < threshold) { - const intensity = 1 - distanceFromStart / threshold; - return { amount: -maxSpeed * intensity * intensity, edge: "start" }; - } - else if (distanceFromEnd < threshold) { - const intensity = 1 - distanceFromEnd / threshold; - return { amount: maxSpeed * intensity * intensity, edge: "end" }; - } - return { amount: 0, edge: null }; -} -function autoScrollIfNeeded(groupElement, pointerPosition, axis, velocity) { - if (!groupElement) - return; - // Track the group element for cleanup - currentGroupElement = groupElement; - const scrollableAncestor = findScrollableAncestor(groupElement, axis); - if (!scrollableAncestor) - return; - // Convert pointer position from page coordinates to viewport coordinates. - // The gesture system uses pageX/pageY but getBoundingClientRect() returns - // viewport-relative coordinates, so we need to account for page scroll. - const viewportPointerPosition = pointerPosition - (axis === "x" ? window.scrollX : window.scrollY); - const { amount: scrollAmount, edge } = getScrollAmount(viewportPointerPosition, scrollableAncestor, axis); - // If not in any threshold zone, clear all state - if (edge === null) { - activeScrollEdge.delete(scrollableAncestor); - initialScrollLimits.delete(scrollableAncestor); - return; - } - const currentActiveEdge = activeScrollEdge.get(scrollableAncestor); - const isDocumentScroll = scrollableAncestor === document.body || - scrollableAncestor === document.documentElement; - // If not currently scrolling this edge, check velocity to see if we should start - if (currentActiveEdge !== edge) { - // Only start scrolling if velocity is towards the edge - const shouldStart = (edge === "start" && velocity < 0) || - (edge === "end" && velocity > 0); - if (!shouldStart) - return; - // Activate this edge - activeScrollEdge.set(scrollableAncestor, edge); - // Record initial scroll limit (prevents infinite scroll) - const maxScroll = axis === "x" - ? scrollableAncestor.scrollWidth - (isDocumentScroll ? window.innerWidth : scrollableAncestor.clientWidth) - : scrollableAncestor.scrollHeight - (isDocumentScroll ? window.innerHeight : scrollableAncestor.clientHeight); - initialScrollLimits.set(scrollableAncestor, maxScroll); - } - // Cap scrolling at initial limit (prevents infinite scroll) - if (scrollAmount > 0) { - const initialLimit = initialScrollLimits.get(scrollableAncestor); - const currentScroll = axis === "x" - ? (isDocumentScroll ? window.scrollX : scrollableAncestor.scrollLeft) - : (isDocumentScroll ? window.scrollY : scrollableAncestor.scrollTop); - if (currentScroll >= initialLimit) - return; - } - // Apply scroll - if (axis === "x") { - if (isDocumentScroll) { - window.scrollBy({ left: scrollAmount }); - } - else { - scrollableAncestor.scrollLeft += scrollAmount; - } - } - else { - if (isDocumentScroll) { - window.scrollBy({ top: scrollAmount }); - } - else { - scrollableAncestor.scrollTop += scrollAmount; - } - } -} - -export { autoScrollIfNeeded, resetAutoScrollState }; -//# sourceMappingURL=auto-scroll.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.mjs.map deleted file mode 100644 index 13faf165..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auto-scroll.mjs","sources":["../../../../../src/components/Reorder/utils/auto-scroll.ts"],"sourcesContent":["const threshold = 50\nconst maxSpeed = 25\n\nconst overflowStyles = new Set([\"auto\", \"scroll\"])\n\n// Track initial scroll limits per scrollable element (Bug 1 fix)\nconst initialScrollLimits = new WeakMap()\n\n// Track auto-scroll active state per edge: \"start\" (top/left) or \"end\" (bottom/right)\ntype ActiveEdge = \"start\" | \"end\" | null\nconst activeScrollEdge = new WeakMap()\n\n// Track which group element is currently dragging to clear state on end\nlet currentGroupElement: Element | null = null\n\nexport function resetAutoScrollState(): void {\n if (currentGroupElement) {\n const scrollableAncestor = findScrollableAncestor(\n currentGroupElement,\n \"y\"\n )\n if (scrollableAncestor) {\n activeScrollEdge.delete(scrollableAncestor)\n initialScrollLimits.delete(scrollableAncestor)\n }\n // Also try x axis\n const scrollableAncestorX = findScrollableAncestor(\n currentGroupElement,\n \"x\"\n )\n if (scrollableAncestorX && scrollableAncestorX !== scrollableAncestor) {\n activeScrollEdge.delete(scrollableAncestorX)\n initialScrollLimits.delete(scrollableAncestorX)\n }\n currentGroupElement = null\n }\n}\n\nfunction isScrollableElement(element: Element, axis: \"x\" | \"y\"): boolean {\n const style = getComputedStyle(element)\n const overflow = axis === \"x\" ? style.overflowX : style.overflowY\n\n const isDocumentScroll =\n element === document.body ||\n element === document.documentElement\n\n return overflowStyles.has(overflow) || isDocumentScroll\n}\n\nfunction findScrollableAncestor(\n element: Element | null,\n axis: \"x\" | \"y\"\n): HTMLElement | null {\n let current = element?.parentElement\n while (current) {\n if (isScrollableElement(current, axis)) {\n return current\n }\n current = current.parentElement\n }\n return null\n}\n\nfunction getScrollAmount(\n pointerPosition: number,\n scrollElement: HTMLElement,\n axis: \"x\" | \"y\"\n): { amount: number; edge: ActiveEdge } {\n const rect = scrollElement.getBoundingClientRect()\n\n const start = axis === \"x\" ? Math.max(0, rect.left) : Math.max(0, rect.top)\n const end = axis === \"x\" ? Math.min(window.innerWidth, rect.right) : Math.min(window.innerHeight, rect.bottom)\n\n const distanceFromStart = pointerPosition - start\n const distanceFromEnd = end - pointerPosition\n\n if (distanceFromStart < threshold) {\n const intensity = 1 - distanceFromStart / threshold\n return { amount: -maxSpeed * intensity * intensity, edge: \"start\" }\n } else if (distanceFromEnd < threshold) {\n const intensity = 1 - distanceFromEnd / threshold\n return { amount: maxSpeed * intensity * intensity, edge: \"end\" }\n }\n\n return { amount: 0, edge: null }\n}\n\nexport function autoScrollIfNeeded(\n groupElement: Element | null,\n pointerPosition: number,\n axis: \"x\" | \"y\",\n velocity: number\n): void {\n if (!groupElement) return\n\n // Track the group element for cleanup\n currentGroupElement = groupElement\n\n const scrollableAncestor = findScrollableAncestor(groupElement, axis)\n if (!scrollableAncestor) return\n\n // Convert pointer position from page coordinates to viewport coordinates.\n // The gesture system uses pageX/pageY but getBoundingClientRect() returns\n // viewport-relative coordinates, so we need to account for page scroll.\n const viewportPointerPosition =\n pointerPosition - (axis === \"x\" ? window.scrollX : window.scrollY)\n\n const { amount: scrollAmount, edge } = getScrollAmount(\n viewportPointerPosition,\n scrollableAncestor,\n axis\n )\n\n // If not in any threshold zone, clear all state\n if (edge === null) {\n activeScrollEdge.delete(scrollableAncestor)\n initialScrollLimits.delete(scrollableAncestor)\n return\n }\n\n const currentActiveEdge = activeScrollEdge.get(scrollableAncestor)\n\n const isDocumentScroll =\n scrollableAncestor === document.body ||\n scrollableAncestor === document.documentElement\n\n // If not currently scrolling this edge, check velocity to see if we should start\n if (currentActiveEdge !== edge) {\n // Only start scrolling if velocity is towards the edge\n const shouldStart =\n (edge === \"start\" && velocity < 0) ||\n (edge === \"end\" && velocity > 0)\n if (!shouldStart) return\n\n // Activate this edge\n activeScrollEdge.set(scrollableAncestor, edge)\n\n // Record initial scroll limit (prevents infinite scroll)\n const maxScroll =\n axis === \"x\"\n ? scrollableAncestor.scrollWidth - (isDocumentScroll ? window.innerWidth : scrollableAncestor.clientWidth)\n : scrollableAncestor.scrollHeight - (isDocumentScroll ? window.innerHeight : scrollableAncestor.clientHeight)\n\n initialScrollLimits.set(scrollableAncestor, maxScroll)\n }\n\n // Cap scrolling at initial limit (prevents infinite scroll)\n if (scrollAmount > 0) {\n const initialLimit = initialScrollLimits.get(scrollableAncestor)!\n const currentScroll =\n axis === \"x\"\n ? (isDocumentScroll ? window.scrollX : scrollableAncestor.scrollLeft)\n : (isDocumentScroll ? window.scrollY : scrollableAncestor.scrollTop)\n if (currentScroll >= initialLimit) return\n }\n\n // Apply scroll\n if (axis === \"x\") {\n if (isDocumentScroll) {\n window.scrollBy({ left: scrollAmount })\n } else {\n scrollableAncestor.scrollLeft += scrollAmount\n }\n } else {\n if (isDocumentScroll) {\n window.scrollBy({ top: scrollAmount })\n } else {\n scrollableAncestor.scrollTop += scrollAmount\n }\n }\n}\n"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,EAAE;AACpB,MAAM,QAAQ,GAAG,EAAE;AAEnB,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAElD;AACA,MAAM,mBAAmB,GAAG,IAAI,OAAO,EAAuB;AAI9D,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAA2B;AAE/D;AACA,IAAI,mBAAmB,GAAmB,IAAI;SAE9B,oBAAoB,GAAA;IAChC,IAAI,mBAAmB,EAAE;QACrB,MAAM,kBAAkB,GAAG,sBAAsB,CAC7C,mBAAmB,EACnB,GAAG,CACN;QACD,IAAI,kBAAkB,EAAE;AACpB,YAAA,gBAAgB,CAAC,MAAM,CAAC,kBAAkB,CAAC;AAC3C,YAAA,mBAAmB,CAAC,MAAM,CAAC,kBAAkB,CAAC;QAClD;;QAEA,MAA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,gBAAgB,GAAG,MAAM,CAAC,OAAO,GAAG,kBAAkB,CAAC,SAAS,CAAC;QAC5E,IAAI,aAAa,IAAI,YAAY;YAAE;IACvC;;AAGA,IAAA,IAAI,IAAI,KAAK,GAAG,EAAE;QACd,IAAI,gBAAgB,EAAE;YAClB,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;QAC3C;aAAO;AACH,YAAA,kBAAkB,CAAC,UAAU,IAAI,YAAY;QACjD;IACJ;SAAO;QACH,IAAI,gBAAgB,EAAE;YAClB,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;QAC1C;aAAO;AACH,YAAA,kBAAkB,CAAC,SAAS,IAAI,YAAY;QAChD;IACJ;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs deleted file mode 100644 index a62d242c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs +++ /dev/null @@ -1,25 +0,0 @@ -import { mixNumber } from 'motion-dom'; -import { moveItem } from 'motion-utils'; - -function checkReorder(order, value, offset, velocity) { - if (!velocity) - return order; - const index = order.findIndex((item) => item.value === value); - if (index === -1) - return order; - const nextOffset = velocity > 0 ? 1 : -1; - const nextItem = order[index + nextOffset]; - if (!nextItem) - return order; - const item = order[index]; - const nextLayout = nextItem.layout; - const nextItemCenter = mixNumber(nextLayout.min, nextLayout.max, 0.5); - if ((nextOffset === 1 && item.layout.max + offset > nextItemCenter) || - (nextOffset === -1 && item.layout.min + offset < nextItemCenter)) { - return moveItem(order, index, index + nextOffset); - } - return order; -} - -export { checkReorder }; -//# sourceMappingURL=check-reorder.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs.map deleted file mode 100644 index 67fff6cd..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"check-reorder.mjs","sources":["../../../../../src/components/Reorder/utils/check-reorder.ts"],"sourcesContent":["import { mixNumber } from \"motion-dom\"\nimport { moveItem } from \"motion-utils\"\nimport { ItemData } from \"../types\"\n\nexport function checkReorder(\n order: ItemData[],\n value: T,\n offset: number,\n velocity: number\n): ItemData[] {\n if (!velocity) return order\n\n const index = order.findIndex((item) => item.value === value)\n\n if (index === -1) return order\n\n const nextOffset = velocity > 0 ? 1 : -1\n const nextItem = order[index + nextOffset]\n\n if (!nextItem) return order\n\n const item = order[index]\n const nextLayout = nextItem.layout\n const nextItemCenter = mixNumber(nextLayout.min, nextLayout.max, 0.5)\n\n if (\n (nextOffset === 1 && item.layout.max + offset > nextItemCenter) ||\n (nextOffset === -1 && item.layout.min + offset < nextItemCenter)\n ) {\n return moveItem(order, index, index + nextOffset)\n }\n\n return order\n}\n"],"names":[],"mappings":";;;AAIM,SAAU,YAAY,CACxB,KAAoB,EACpB,KAAQ,EACR,MAAc,EACd,QAAgB,EAAA;AAEhB,IAAA,IAAI,CAAC,QAAQ;AAAE,QAAA,OAAO,KAAK;AAE3B,IAAA,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC;IAE7D,IAAI,KAAK,KAAK,EAAE;AAAE,QAAA,OAAO,KAAK;AAE9B,IAAA,MAAM,UAAU,GAAG,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE;IACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC;AAE1C,IAAA,IAAI,CAAC,QAAQ;AAAE,QAAA,OAAO,KAAK;AAE3B,IAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC;AACzB,IAAA,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM;AAClC,IAAA,MAAM,cAAc,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC;AAErE,IAAA,IACI,CAAC,UAAU,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,GAAG,cAAc;AAC9D,SAAC,UAAU,KAAK,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,GAAG,cAAc,CAAC,EAClE;QACE,OAAO,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,UAAU,CAAC;IACrD;AAEA,IAAA,OAAO,KAAK;AAChB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs deleted file mode 100644 index 999cda1e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs +++ /dev/null @@ -1,12 +0,0 @@ -"use client"; -import { createContext } from 'react'; - -/** - * Note: Still used by components generated by old versions of Framer - * - * @deprecated - */ -const DeprecatedLayoutGroupContext = createContext(null); - -export { DeprecatedLayoutGroupContext }; -//# sourceMappingURL=DeprecatedLayoutGroupContext.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs.map deleted file mode 100644 index 5a18fc90..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeprecatedLayoutGroupContext.mjs","sources":["../../../src/context/DeprecatedLayoutGroupContext.ts"],"sourcesContent":["\"use client\"\n\nimport { createContext } from \"react\"\n\n/**\n * Note: Still used by components generated by old versions of Framer\n *\n * @deprecated\n */\nexport const DeprecatedLayoutGroupContext = createContext(null)\n"],"names":[],"mappings":";;;AAIA;;;;AAIG;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs deleted file mode 100644 index cd82e0b5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs +++ /dev/null @@ -1,7 +0,0 @@ -"use client"; -import { createContext } from 'react'; - -const LayoutGroupContext = createContext({}); - -export { LayoutGroupContext }; -//# sourceMappingURL=LayoutGroupContext.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs.map deleted file mode 100644 index bda87d9a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LayoutGroupContext.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LazyContext.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LazyContext.mjs deleted file mode 100644 index 01260609..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LazyContext.mjs +++ /dev/null @@ -1,7 +0,0 @@ -"use client"; -import { createContext } from 'react'; - -const LazyContext = createContext({ strict: false }); - -export { LazyContext }; -//# sourceMappingURL=LazyContext.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LazyContext.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LazyContext.mjs.map deleted file mode 100644 index 57951a8d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/LazyContext.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LazyContext.mjs","sources":["../../../src/context/LazyContext.ts"],"sourcesContent":["\"use client\"\n\nimport { createContext } from \"react\"\nimport { CreateVisualElement } from \"../render/types\"\n\nexport interface LazyContextProps {\n renderer?: CreateVisualElement\n strict: boolean\n}\n\nexport const LazyContext = createContext({ strict: false })\n"],"names":[],"mappings":";;;AAUO;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs deleted file mode 100644 index 9847a73c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs +++ /dev/null @@ -1,14 +0,0 @@ -"use client"; -import { createContext } from 'react'; - -/** - * @public - */ -const MotionConfigContext = createContext({ - transformPagePoint: (p) => p, - isStatic: false, - reducedMotion: "never", -}); - -export { MotionConfigContext }; -//# sourceMappingURL=MotionConfigContext.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs.map deleted file mode 100644 index ab50b37d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MotionConfigContext.mjs","sources":["../../../src/context/MotionConfigContext.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Transition } from \"motion-dom\"\nimport { TransformPoint } from \"motion-utils\"\nimport { createContext } from \"react\"\n\nexport type ReducedMotionConfig = \"always\" | \"never\" | \"user\"\n\n/**\n * @public\n */\nexport interface MotionConfigContext {\n /**\n * Internal, exported only for usage in Framer\n */\n transformPagePoint: TransformPoint\n\n /**\n * Internal. Determines whether this is a static context ie the Framer canvas. If so,\n * it'll disable all dynamic functionality.\n */\n isStatic: boolean\n\n /**\n * Defines a new default transition for the entire tree.\n *\n * @public\n */\n transition?: Transition\n\n /**\n * If true, will respect the device prefersReducedMotion setting by switching\n * transform animations off.\n *\n * @public\n */\n reducedMotion?: ReducedMotionConfig\n\n /**\n * A custom `nonce` attribute used when wanting to enforce a Content Security Policy (CSP).\n * For more details see:\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles\n *\n * @public\n */\n nonce?: string\n\n /**\n * If true, all animations will be skipped and values will be set instantly.\n * Useful for E2E tests and visual regression testing.\n *\n * @public\n */\n skipAnimations?: boolean\n\n}\n\n/**\n * @public\n */\nexport const MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n})\n"],"names":[],"mappings":";;;AAyDA;;AAEG;AACI;AACH;AACA;AACA;AACH;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs deleted file mode 100644 index 90806eac..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs +++ /dev/null @@ -1,15 +0,0 @@ -"use client"; -import { useContext, useMemo } from 'react'; -import { MotionContext } from './index.mjs'; -import { getCurrentTreeVariants } from './utils.mjs'; - -function useCreateMotionContext(props) { - const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext)); - return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]); -} -function variantLabelsAsDependency(prop) { - return Array.isArray(prop) ? prop.join(" ") : prop; -} - -export { useCreateMotionContext }; -//# sourceMappingURL=create.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs.map deleted file mode 100644 index a172977a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create.mjs","sources":["../../../../src/context/MotionContext/create.ts"],"sourcesContent":["\"use client\"\n\nimport { useContext, useMemo } from \"react\"\nimport { MotionContext, type MotionContextProps } from \".\"\nimport { MotionProps } from \"../../motion/types\"\nimport { getCurrentTreeVariants } from \"./utils\"\n\nexport function useCreateMotionContext(\n props: MotionProps\n): MotionContextProps {\n const { initial, animate } = getCurrentTreeVariants(\n props,\n useContext(MotionContext)\n )\n\n return useMemo(\n () => ({ initial, animate }),\n [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]\n )\n}\n\nfunction variantLabelsAsDependency(\n prop: undefined | string | string[] | boolean\n) {\n return Array.isArray(prop) ? prop.join(\" \") : prop\n}\n"],"names":[],"mappings":";;;;;AAOM;AAGF;;AASJ;AAEA;AAGI;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs deleted file mode 100644 index deb883c2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs +++ /dev/null @@ -1,7 +0,0 @@ -"use client"; -import { createContext } from 'react'; - -const MotionContext = /* @__PURE__ */ createContext({}); - -export { MotionContext }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs.map deleted file mode 100644 index d1f6cb43..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/context/MotionContext/index.ts"],"sourcesContent":["\"use client\"\n\nimport type { VisualElement } from \"motion-dom\"\nimport { createContext } from \"react\"\n\nexport interface MotionContextProps {\n visualElement?: VisualElement\n initial?: false | string | string[]\n animate?: string | string[]\n}\n\nexport const MotionContext = /* @__PURE__ */ createContext(\n {}\n)\n"],"names":[],"mappings":";;;AAWO;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs deleted file mode 100644 index 5281e891..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs +++ /dev/null @@ -1,17 +0,0 @@ -import { isControllingVariants, isVariantLabel } from 'motion-dom'; - -function getCurrentTreeVariants(props, context) { - if (isControllingVariants(props)) { - const { initial, animate } = props; - return { - initial: initial === false || isVariantLabel(initial) - ? initial - : undefined, - animate: isVariantLabel(animate) ? animate : undefined, - }; - } - return props.inherit !== false ? context : {}; -} - -export { getCurrentTreeVariants }; -//# sourceMappingURL=utils.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs.map deleted file mode 100644 index 55920731..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.mjs","sources":["../../../../src/context/MotionContext/utils.ts"],"sourcesContent":["import { isControllingVariants, isVariantLabel } from \"motion-dom\"\nimport type { MotionContextProps } from \".\"\nimport { MotionProps } from \"../../motion/types\"\n\nexport function getCurrentTreeVariants(\n props: MotionProps,\n context: MotionContextProps\n): MotionContextProps {\n if (isControllingVariants(props)) {\n const { initial, animate } = props\n return {\n initial:\n initial === false || isVariantLabel(initial)\n ? (initial as any)\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n }\n }\n return props.inherit !== false ? context : {}\n}\n"],"names":[],"mappings":";;AAIM,SAAU,sBAAsB,CAClC,KAAkB,EAClB,OAA2B,EAAA;AAE3B,IAAA,IAAI,qBAAqB,CAAC,KAAK,CAAC,EAAE;AAC9B,QAAA,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK;QAClC,OAAO;YACH,OAAO,EACH,OAAO,KAAK,KAAK,IAAI,cAAc,CAAC,OAAO;AACvC,kBAAG;AACH,kBAAE,SAAS;AACnB,YAAA,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,SAAS;SACzD;IACL;AACA,IAAA,OAAO,KAAK,CAAC,OAAO,KAAK,KAAK,GAAG,OAAO,GAAG,EAAE;AACjD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/PresenceContext.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/PresenceContext.mjs deleted file mode 100644 index 2ad34634..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/PresenceContext.mjs +++ /dev/null @@ -1,11 +0,0 @@ -"use client"; -import { createContext } from 'react'; - -/** - * @public - */ -const PresenceContext = -/* @__PURE__ */ createContext(null); - -export { PresenceContext }; -//# sourceMappingURL=PresenceContext.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/PresenceContext.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/PresenceContext.mjs.map deleted file mode 100644 index de11202f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/PresenceContext.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PresenceContext.mjs","sources":["../../../src/context/PresenceContext.ts"],"sourcesContent":["\"use client\"\n\nimport { createContext } from \"react\"\nimport type { PresenceContextProps } from \"motion-dom\"\n\nexport type { PresenceContextProps }\n\n/**\n * @public\n */\nexport const PresenceContext =\n /* @__PURE__ */ createContext(null)\n"],"names":[],"mappings":";;;AAOA;;AAEG;;AAEC;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/ReorderContext.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/ReorderContext.mjs deleted file mode 100644 index 17cefb9c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/ReorderContext.mjs +++ /dev/null @@ -1,7 +0,0 @@ -"use client"; -import { createContext } from 'react'; - -const ReorderContext = createContext(null); - -export { ReorderContext }; -//# sourceMappingURL=ReorderContext.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/ReorderContext.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/ReorderContext.mjs.map deleted file mode 100644 index a68068f5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/ReorderContext.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReorderContext.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs deleted file mode 100644 index 08aaa76a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs +++ /dev/null @@ -1,10 +0,0 @@ -"use client"; -import { createContext } from 'react'; - -/** - * Internal, exported only for usage in Framer - */ -const SwitchLayoutGroupContext = createContext({}); - -export { SwitchLayoutGroupContext }; -//# sourceMappingURL=SwitchLayoutGroupContext.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs.map deleted file mode 100644 index e25c485f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SwitchLayoutGroupContext.mjs","sources":["../../../src/context/SwitchLayoutGroupContext.ts"],"sourcesContent":["\"use client\"\n\nimport type { Transition, IProjectionNode } from \"motion-dom\"\nimport { createContext } from \"react\"\n\nexport interface SwitchLayoutGroup {\n register?: (member: IProjectionNode) => void\n deregister?: (member: IProjectionNode) => void\n}\n\nexport type SwitchLayoutGroupContext = SwitchLayoutGroup &\n InitialPromotionConfig\n\nexport type InitialPromotionConfig = {\n /**\n * The initial transition to use when the elements in this group mount (and automatically promoted).\n * Subsequent updates should provide a transition in the promote method.\n */\n transition?: Transition\n /**\n * If the follow tree should preserve its opacity when the lead is promoted on mount\n */\n shouldPreserveFollowOpacity?: (member: IProjectionNode) => boolean\n}\n\n/**\n * Internal, exported only for usage in Framer\n */\nexport const SwitchLayoutGroupContext = createContext(\n {}\n)\n"],"names":[],"mappings":";;;AAyBA;;AAEG;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/debug.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/debug.mjs deleted file mode 100644 index 170c251f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/debug.mjs +++ /dev/null @@ -1,2 +0,0 @@ -export { recordStats } from 'motion-dom'; -//# sourceMappingURL=debug.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/debug.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/debug.mjs.map deleted file mode 100644 index b79ebbaf..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/debug.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debug.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom-mini.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom-mini.mjs deleted file mode 100644 index d8705e72..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom-mini.mjs +++ /dev/null @@ -1,3 +0,0 @@ -export { animateSequence } from './animation/animators/waapi/animate-sequence.mjs'; -export { animateMini as animate } from './animation/animators/waapi/animate-style.mjs'; -//# sourceMappingURL=dom-mini.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom-mini.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom-mini.mjs.map deleted file mode 100644 index 4979ad8b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom-mini.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dom-mini.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom.mjs deleted file mode 100644 index 5df9220d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom.mjs +++ /dev/null @@ -1,10 +0,0 @@ -export * from 'motion-dom'; -export { delayInSeconds as delay } from 'motion-dom'; -export * from 'motion-utils'; -export { animate, createScopedAnimate } from './animation/animate/index.mjs'; -export { animateMini } from './animation/animators/waapi/animate-style.mjs'; -export { scroll } from './render/dom/scroll/index.mjs'; -export { scrollInfo } from './render/dom/scroll/track.mjs'; -export { inView } from './render/dom/viewport/index.mjs'; -export { distance, distance2D } from './utils/distance.mjs'; -//# sourceMappingURL=dom.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom.mjs.map deleted file mode 100644 index f9925fb5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/dom.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dom.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs deleted file mode 100644 index e2046649..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { addDomEvent } from 'motion-dom'; -import { addPointerInfo } from './event-info.mjs'; - -function addPointerEvent(target, eventName, handler, options) { - return addDomEvent(target, eventName, addPointerInfo(handler), options); -} - -export { addPointerEvent }; -//# sourceMappingURL=add-pointer-event.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.map deleted file mode 100644 index db1b1b2a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"add-pointer-event.mjs","sources":["../../../src/events/add-pointer-event.ts"],"sourcesContent":["import { addDomEvent } from \"motion-dom\"\nimport { addPointerInfo, EventListenerWithPointInfo } from \"./event-info\"\n\nexport function addPointerEvent(\n target: EventTarget,\n eventName: string,\n handler: EventListenerWithPointInfo,\n options?: AddEventListenerOptions\n) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options)\n}\n"],"names":[],"mappings":";;;AAGM,SAAU,eAAe,CAC3B,MAAmB,EACnB,SAAiB,EACjB,OAAmC,EACnC,OAAiC,EAAA;AAEjC,IAAA,OAAO,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;AAC3E;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/event-info.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/event-info.mjs deleted file mode 100644 index 00217171..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/event-info.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { isPrimaryPointer } from 'motion-dom'; - -function extractEventInfo(event) { - return { - point: { - x: event.pageX, - y: event.pageY, - }, - }; -} -const addPointerInfo = (handler) => (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event)); - -export { addPointerInfo, extractEventInfo }; -//# sourceMappingURL=event-info.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/event-info.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/event-info.mjs.map deleted file mode 100644 index c2b89272..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/event-info.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event-info.mjs","sources":["../../../src/events/event-info.ts"],"sourcesContent":["import { EventInfo, isPrimaryPointer } from \"motion-dom\"\n\nexport type EventListenerWithPointInfo = (\n e: PointerEvent,\n info: EventInfo\n) => void\n\nexport function extractEventInfo(event: PointerEvent): EventInfo {\n return {\n point: {\n x: event.pageX,\n y: event.pageY,\n },\n }\n}\n\nexport const addPointerInfo =\n (handler: EventListenerWithPointInfo): EventListener =>\n (event: PointerEvent) =>\n isPrimaryPointer(event) && handler(event, extractEventInfo(event))\n"],"names":[],"mappings":";;AAOM,SAAU,gBAAgB,CAAC,KAAmB,EAAA;IAChD,OAAO;AACH,QAAA,KAAK,EAAE;YACH,CAAC,EAAE,KAAK,CAAC,KAAK;YACd,CAAC,EAAE,KAAK,CAAC,KAAK;AACjB,SAAA;KACJ;AACL;AAEO,MAAM,cAAc,GACvB,CAAC,OAAmC,KACpC,CAAC,KAAmB,KAChB,gBAAgB,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/use-dom-event.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/use-dom-event.mjs deleted file mode 100644 index 8ea5b54f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/use-dom-event.mjs +++ /dev/null @@ -1,36 +0,0 @@ -"use client"; -import { useEffect } from 'react'; -import { addDomEvent } from 'motion-dom'; - -/** - * Attaches an event listener directly to the provided DOM element. - * - * Bypassing React's event system can be desirable, for instance when attaching non-passive - * event handlers. - * - * ```jsx - * const ref = useRef(null) - * - * useDomEvent(ref, 'wheel', onWheel, { passive: false }) - * - * return
- * ``` - * - * @param ref - React.RefObject that's been provided to the element you want to bind the listener to. - * @param eventName - Name of the event you want listen for. - * @param handler - Function to fire when receiving the event. - * @param options - Options to pass to `Event.addEventListener`. - * - * @public - */ -function useDomEvent(ref, eventName, handler, options) { - useEffect(() => { - const element = ref.current; - if (handler && element) { - return addDomEvent(element, eventName, handler, options); - } - }, [ref, eventName, handler, options]); -} - -export { useDomEvent }; -//# sourceMappingURL=use-dom-event.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/use-dom-event.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/use-dom-event.mjs.map deleted file mode 100644 index f24c4bf5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/events/use-dom-event.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-dom-event.mjs","sources":["../../../src/events/use-dom-event.ts"],"sourcesContent":["\"use client\"\n\nimport { RefObject, useEffect } from \"react\"\nimport { addDomEvent } from \"motion-dom\"\n\n/**\n * Attaches an event listener directly to the provided DOM element.\n *\n * Bypassing React's event system can be desirable, for instance when attaching non-passive\n * event handlers.\n *\n * ```jsx\n * const ref = useRef(null)\n *\n * useDomEvent(ref, 'wheel', onWheel, { passive: false })\n *\n * return
\n * ```\n *\n * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.\n * @param eventName - Name of the event you want listen for.\n * @param handler - Function to fire when receiving the event.\n * @param options - Options to pass to `Event.addEventListener`.\n *\n * @public\n */\nexport function useDomEvent(\n ref: RefObject,\n eventName: string,\n handler?: EventListener | undefined,\n options?: AddEventListenerOptions\n) {\n useEffect(() => {\n const element = ref.current\n\n if (handler && element) {\n return addDomEvent(element, eventName, handler, options)\n }\n }, [ref, eventName, handler, options])\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;;;;;AAoBG;AACG;;AAOE;AAEA;;;;AAIR;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs deleted file mode 100644 index d3b54bd0..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +++ /dev/null @@ -1,573 +0,0 @@ -import { createBox, frame, eachAxis, measurePageBox, convertBoxToBoundingBox, convertBoundingBoxToBox, addValueToWillChange, animateMotionValue, mixNumber, addDomEvent, setDragLock, percent, calcLength, resize, isElementTextInput } from 'motion-dom'; -import { invariant } from 'motion-utils'; -import { addPointerEvent } from '../../events/add-pointer-event.mjs'; -import { extractEventInfo } from '../../events/event-info.mjs'; -import { getContextWindow } from '../../utils/get-context-window.mjs'; -import { isRefObject } from '../../utils/is-ref-object.mjs'; -import { PanSession } from '../pan/PanSession.mjs'; -import { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs'; - -const elementDragControls = new WeakMap(); -class VisualElementDragControls { - constructor(visualElement) { - this.openDragLock = null; - this.isDragging = false; - this.currentDirection = null; - this.originPoint = { x: 0, y: 0 }; - /** - * The permitted boundaries of travel, in pixels. - */ - this.constraints = false; - this.hasMutatedConstraints = false; - /** - * The per-axis resolved elastic values. - */ - this.elastic = createBox(); - /** - * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments. - */ - this.latestPointerEvent = null; - /** - * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments. - */ - this.latestPanInfo = null; - this.visualElement = visualElement; - } - start(originEvent, { snapToCursor = false, distanceThreshold } = {}) { - /** - * Don't start dragging if this component is exiting - */ - const { presenceContext } = this.visualElement; - if (presenceContext && presenceContext.isPresent === false) - return; - const onSessionStart = (event) => { - if (snapToCursor) { - this.snapToCursor(extractEventInfo(event).point); - } - this.stopAnimation(); - }; - const onStart = (event, info) => { - // Attempt to grab the global drag gesture lock - maybe make this part of PanSession - const { drag, dragPropagation, onDragStart } = this.getProps(); - if (drag && !dragPropagation) { - if (this.openDragLock) - this.openDragLock(); - this.openDragLock = setDragLock(drag); - // If we don 't have the lock, don't start dragging - if (!this.openDragLock) - return; - } - this.latestPointerEvent = event; - this.latestPanInfo = info; - this.isDragging = true; - this.currentDirection = null; - this.resolveConstraints(); - if (this.visualElement.projection) { - this.visualElement.projection.isAnimationBlocked = true; - this.visualElement.projection.target = undefined; - } - /** - * Record gesture origin and pointer offset - */ - eachAxis((axis) => { - let current = this.getAxisMotionValue(axis).get() || 0; - /** - * If the MotionValue is a percentage value convert to px - */ - if (percent.test(current)) { - const { projection } = this.visualElement; - if (projection && projection.layout) { - const measuredAxis = projection.layout.layoutBox[axis]; - if (measuredAxis) { - const length = calcLength(measuredAxis); - current = length * (parseFloat(current) / 100); - } - } - } - this.originPoint[axis] = current; - }); - // Fire onDragStart event - if (onDragStart) { - frame.update(() => onDragStart(event, info), false, true); - } - addValueToWillChange(this.visualElement, "transform"); - const { animationState } = this.visualElement; - animationState && animationState.setActive("whileDrag", true); - }; - const onMove = (event, info) => { - this.latestPointerEvent = event; - this.latestPanInfo = info; - const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps(); - // If we didn't successfully receive the gesture lock, early return. - if (!dragPropagation && !this.openDragLock) - return; - const { offset } = info; - // Attempt to detect drag direction if directionLock is true - if (dragDirectionLock && this.currentDirection === null) { - this.currentDirection = getCurrentDirection(offset); - // If we've successfully set a direction, notify listener - if (this.currentDirection !== null) { - onDirectionLock && onDirectionLock(this.currentDirection); - } - return; - } - // Update each point with the latest position - this.updateAxis("x", info.point, offset); - this.updateAxis("y", info.point, offset); - /** - * Ideally we would leave the renderer to fire naturally at the end of - * this frame but if the element is about to change layout as the result - * of a re-render we want to ensure the browser can read the latest - * bounding box to ensure the pointer and element don't fall out of sync. - */ - this.visualElement.render(); - /** - * This must fire after the render call as it might trigger a state - * change which itself might trigger a layout update. - */ - if (onDrag) { - frame.update(() => onDrag(event, info), false, true); - } - }; - const onSessionEnd = (event, info) => { - this.latestPointerEvent = event; - this.latestPanInfo = info; - this.stop(event, info); - this.latestPointerEvent = null; - this.latestPanInfo = null; - }; - const resumeAnimation = () => { - const { dragSnapToOrigin: snap } = this.getProps(); - if (snap || this.constraints) { - this.startAnimation({ x: 0, y: 0 }); - } - }; - const { dragSnapToOrigin } = this.getProps(); - this.panSession = new PanSession(originEvent, { - onSessionStart, - onStart, - onMove, - onSessionEnd, - resumeAnimation, - }, { - transformPagePoint: this.visualElement.getTransformPagePoint(), - dragSnapToOrigin, - distanceThreshold, - contextWindow: getContextWindow(this.visualElement), - element: this.visualElement.current, - }); - } - /** - * @internal - */ - stop(event, panInfo) { - const finalEvent = event || this.latestPointerEvent; - const finalPanInfo = panInfo || this.latestPanInfo; - const isDragging = this.isDragging; - this.cancel(); - if (!isDragging || !finalPanInfo || !finalEvent) - return; - const { velocity } = finalPanInfo; - this.startAnimation(velocity); - const { onDragEnd } = this.getProps(); - if (onDragEnd) { - frame.postRender(() => onDragEnd(finalEvent, finalPanInfo)); - } - } - /** - * @internal - */ - cancel() { - this.isDragging = false; - const { projection, animationState } = this.visualElement; - if (projection) { - projection.isAnimationBlocked = false; - } - this.endPanSession(); - const { dragPropagation } = this.getProps(); - if (!dragPropagation && this.openDragLock) { - this.openDragLock(); - this.openDragLock = null; - } - animationState && animationState.setActive("whileDrag", false); - } - /** - * Clean up the pan session without modifying other drag state. - * This is used during unmount to ensure event listeners are removed - * without affecting projection animations or drag locks. - * @internal - */ - endPanSession() { - this.panSession && this.panSession.end(); - this.panSession = undefined; - } - updateAxis(axis, _point, offset) { - const { drag } = this.getProps(); - // If we're not dragging this axis, do an early return. - if (!offset || !shouldDrag(axis, drag, this.currentDirection)) - return; - const axisValue = this.getAxisMotionValue(axis); - let next = this.originPoint[axis] + offset[axis]; - // Apply constraints - if (this.constraints && this.constraints[axis]) { - next = applyConstraints(next, this.constraints[axis], this.elastic[axis]); - } - axisValue.set(next); - } - resolveConstraints() { - const { dragConstraints, dragElastic } = this.getProps(); - const layout = this.visualElement.projection && - !this.visualElement.projection.layout - ? this.visualElement.projection.measure(false) - : this.visualElement.projection?.layout; - const prevConstraints = this.constraints; - if (dragConstraints && isRefObject(dragConstraints)) { - if (!this.constraints) { - this.constraints = this.resolveRefConstraints(); - } - } - else { - if (dragConstraints && layout) { - this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints); - } - else { - this.constraints = false; - } - } - this.elastic = resolveDragElastic(dragElastic); - /** - * If we're outputting to external MotionValues, we want to rebase the measured constraints - * from viewport-relative to component-relative. This only applies to relative (non-ref) - * constraints, as ref-based constraints from calcViewportConstraints are already in the - * correct coordinate space for the motion value transform offset. - */ - if (prevConstraints !== this.constraints && - !isRefObject(dragConstraints) && - layout && - this.constraints && - !this.hasMutatedConstraints) { - eachAxis((axis) => { - if (this.constraints !== false && - this.getAxisMotionValue(axis)) { - this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]); - } - }); - } - } - resolveRefConstraints() { - const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps(); - if (!constraints || !isRefObject(constraints)) - return false; - const constraintsElement = constraints.current; - invariant(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref"); - const { projection } = this.visualElement; - // TODO - if (!projection || !projection.layout) - return false; - /** - * Refresh the root scroll offset so the constraint's viewport box - * translates to correct page coordinates. The scroll captured at - * drag mount can be stale if the document was scrolled afterwards — - * e.g. via the browser restoring scroll on refresh, or an ancestor - * layout effect running after this element's mount (#2829). - * - * Clear the cached scroll first so `updateScroll` bypasses its - * per-animationId cache and re-reads the live value. - */ - if (projection.root) { - projection.root.scroll = undefined; - projection.root.updateScroll(); - } - const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint()); - let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox); - /** - * If there's an onMeasureDragConstraints listener we call it and - * if different constraints are returned, set constraints to that - */ - if (onMeasureDragConstraints) { - const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints)); - this.hasMutatedConstraints = !!userConstraints; - if (userConstraints) { - measuredConstraints = convertBoundingBoxToBox(userConstraints); - } - } - return measuredConstraints; - } - startAnimation(velocity) { - const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps(); - const constraints = this.constraints || {}; - const momentumAnimations = eachAxis((axis) => { - if (!shouldDrag(axis, drag, this.currentDirection)) { - return; - } - let transition = (constraints && constraints[axis]) || {}; - if (dragSnapToOrigin === true || - dragSnapToOrigin === axis) - transition = { min: 0, max: 0 }; - /** - * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame - * of spring animations so we should look into adding a disable spring option to `inertia`. - * We could do something here where we affect the `bounceStiffness` and `bounceDamping` - * using the value of `dragElastic`. - */ - const bounceStiffness = dragElastic ? 200 : 1000000; - const bounceDamping = dragElastic ? 40 : 10000000; - const inertia = { - type: "inertia", - velocity: dragMomentum ? velocity[axis] : 0, - bounceStiffness, - bounceDamping, - timeConstant: 750, - restDelta: 1, - restSpeed: 10, - ...dragTransition, - ...transition, - }; - // If we're not animating on an externally-provided `MotionValue` we can use the - // component's animation controls which will handle interactions with whileHover (etc), - // otherwise we just have to animate the `MotionValue` itself. - return this.startAxisValueAnimation(axis, inertia); - }); - // Run all animations and then resolve the new drag constraints. - return Promise.all(momentumAnimations).then(onDragTransitionEnd); - } - startAxisValueAnimation(axis, transition) { - const axisValue = this.getAxisMotionValue(axis); - addValueToWillChange(this.visualElement, axis); - return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false)); - } - stopAnimation() { - eachAxis((axis) => this.getAxisMotionValue(axis).stop()); - } - /** - * Drag works differently depending on which props are provided. - * - * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values. - * - Otherwise, we apply the delta to the x/y motion values. - */ - getAxisMotionValue(axis) { - const dragKey = `_drag${axis.toUpperCase()}`; - const props = this.visualElement.getProps(); - const externalMotionValue = props[dragKey]; - return externalMotionValue - ? externalMotionValue - : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0); - } - snapToCursor(point) { - eachAxis((axis) => { - const { drag } = this.getProps(); - // If we're not dragging this axis, do an early return. - if (!shouldDrag(axis, drag, this.currentDirection)) - return; - const { projection } = this.visualElement; - const axisValue = this.getAxisMotionValue(axis); - if (projection && projection.layout) { - const { min, max } = projection.layout.layoutBox[axis]; - /** - * The layout measurement includes the current transform value, - * so we need to add it back to get the correct snap position. - * This fixes an issue where elements with initial coordinates - * would snap to the wrong position on the first drag. - */ - const current = axisValue.get() || 0; - axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current); - } - }); - } - /** - * When the viewport resizes we want to check if the measured constraints - * have changed and, if so, reposition the element within those new constraints - * relative to where it was before the resize. - */ - scalePositionWithinConstraints() { - if (!this.visualElement.current) - return; - const { drag, dragConstraints } = this.getProps(); - const { projection } = this.visualElement; - if (!isRefObject(dragConstraints) || !projection || !this.constraints) - return; - /** - * Stop current animations as there can be visual glitching if we try to do - * this mid-animation - */ - this.stopAnimation(); - /** - * Record the relative position of the dragged element relative to the - * constraints box and save as a progress value. - */ - const boxProgress = { x: 0, y: 0 }; - eachAxis((axis) => { - const axisValue = this.getAxisMotionValue(axis); - if (axisValue && this.constraints !== false) { - const latest = axisValue.get(); - boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]); - } - }); - /** - * Update the layout of this element and resolve the latest drag constraints - */ - const { transformTemplate } = this.visualElement.getProps(); - this.visualElement.current.style.transform = transformTemplate - ? transformTemplate({}, "") - : "none"; - projection.root && projection.root.updateScroll(); - projection.updateLayout(); - /** - * Reset constraints so resolveConstraints() will recalculate them - * with the freshly measured layout rather than returning the cached value. - */ - this.constraints = false; - this.resolveConstraints(); - /** - * For each axis, calculate the current progress of the layout axis - * within the new constraints. - */ - eachAxis((axis) => { - if (!shouldDrag(axis, drag, null)) - return; - /** - * Calculate a new transform based on the previous box progress - */ - const axisValue = this.getAxisMotionValue(axis); - const { min, max } = this.constraints[axis]; - axisValue.set(mixNumber(min, max, boxProgress[axis])); - }); - /** - * Flush the updated transform to the DOM synchronously to prevent - * a visual flash at the element's CSS layout position (0,0) when - * the transform was stripped for measurement. - */ - this.visualElement.render(); - } - addListeners() { - if (!this.visualElement.current) - return; - elementDragControls.set(this.visualElement, this); - const element = this.visualElement.current; - /** - * Attach a pointerdown event listener on this DOM element to initiate drag tracking. - */ - const stopPointerListener = addPointerEvent(element, "pointerdown", (event) => { - const { drag, dragListener = true } = this.getProps(); - const target = event.target; - /** - * Only block drag if clicking on a text input child element - * (input, textarea, select, contenteditable) where users might - * want to select text or interact with the control. - * - * Buttons and links don't block drag since they don't have - * click-and-move actions of their own. - */ - const isClickingTextInputChild = target !== element && isElementTextInput(target); - if (drag && dragListener && !isClickingTextInputChild) { - this.start(event); - } - }); - /** - * If using ref-based constraints, observe both the draggable element - * and the constraint container for size changes via ResizeObserver. - * Setup is deferred because dragConstraints.current is null when - * addListeners first runs (React hasn't committed the ref yet). - */ - let stopResizeObservers; - const measureDragConstraints = () => { - const { dragConstraints } = this.getProps(); - if (isRefObject(dragConstraints) && dragConstraints.current) { - this.constraints = this.resolveRefConstraints(); - if (!stopResizeObservers) { - stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints()); - } - } - }; - const { projection } = this.visualElement; - const stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints); - if (projection && !projection.layout) { - projection.root && projection.root.updateScroll(); - projection.updateLayout(); - } - frame.read(measureDragConstraints); - /** - * Attach a window resize listener to scale the draggable target within its defined - * constraints as the window resizes. - */ - const stopResizeListener = addDomEvent(window, "resize", () => this.scalePositionWithinConstraints()); - /** - * If the element's layout changes, calculate the delta and apply that to - * the drag gesture's origin point. - */ - const stopLayoutUpdateListener = projection.addEventListener("didUpdate", (({ delta, hasLayoutChanged }) => { - if (this.isDragging && hasLayoutChanged) { - eachAxis((axis) => { - const motionValue = this.getAxisMotionValue(axis); - if (!motionValue) - return; - this.originPoint[axis] += delta[axis].translate; - motionValue.set(motionValue.get() + delta[axis].translate); - }); - this.visualElement.render(); - } - })); - return () => { - stopResizeListener(); - stopPointerListener(); - stopMeasureLayoutListener(); - stopLayoutUpdateListener && stopLayoutUpdateListener(); - stopResizeObservers && stopResizeObservers(); - }; - } - getProps() { - const props = this.visualElement.getProps(); - const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props; - return { - ...props, - drag, - dragDirectionLock, - dragPropagation, - dragConstraints, - dragElastic, - dragMomentum, - }; - } -} -function skipFirstCall(callback) { - let isFirst = true; - return () => { - if (isFirst) { - isFirst = false; - return; - } - callback(); - }; -} -function startResizeObservers(element, constraintsElement, onResize) { - const stopElement = resize(element, skipFirstCall(onResize)); - const stopContainer = resize(constraintsElement, skipFirstCall(onResize)); - return () => { - stopElement(); - stopContainer(); - }; -} -function shouldDrag(direction, drag, currentDirection) { - return ((drag === true || drag === direction) && - (currentDirection === null || currentDirection === direction)); -} -/** - * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower - * than the provided threshold, return `null`. - * - * @param offset - The x/y offset from origin. - * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction. - */ -function getCurrentDirection(offset, lockThreshold = 10) { - let direction = null; - if (Math.abs(offset.y) > lockThreshold) { - direction = "y"; - } - else if (Math.abs(offset.x) > lockThreshold) { - direction = "x"; - } - return direction; -} - -export { VisualElementDragControls, elementDragControls }; -//# sourceMappingURL=VisualElementDragControls.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.map deleted file mode 100644 index 2af878e9..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VisualElementDragControls.mjs","sources":["../../../../src/gestures/drag/VisualElementDragControls.ts"],"sourcesContent":["import {\n addValueToWillChange,\n animateMotionValue,\n calcLength,\n convertBoundingBoxToBox,\n convertBoxToBoundingBox,\n createBox,\n eachAxis,\n frame,\n isElementTextInput,\n measurePageBox,\n mixNumber,\n PanInfo,\n percent,\n ResolvedConstraints,\n resize,\n setDragLock,\n Transition,\n type VisualElement,\n} from \"motion-dom\"\nimport { Axis, Point, invariant } from \"motion-utils\"\nimport { addDomEvent, type LayoutUpdateData } from \"motion-dom\"\nimport { addPointerEvent } from \"../../events/add-pointer-event\"\nimport { extractEventInfo } from \"../../events/event-info\"\nimport { MotionProps } from \"../../motion/types\"\nimport { getContextWindow } from \"../../utils/get-context-window\"\nimport { isRefObject } from \"../../utils/is-ref-object\"\nimport { PanSession } from \"../pan/PanSession\"\nimport {\n applyConstraints,\n calcOrigin,\n calcRelativeConstraints,\n calcViewportConstraints,\n defaultElastic,\n rebaseAxisConstraints,\n resolveDragElastic,\n} from \"./utils/constraints\"\n\nexport const elementDragControls = new WeakMap<\n VisualElement,\n VisualElementDragControls\n>()\n\nexport interface DragControlOptions {\n /**\n * This distance after which dragging starts and a direction is locked in.\n *\n * @public\n */\n distanceThreshold?: number\n\n /**\n * Whether to immediately snap to the cursor when dragging starts.\n *\n * @public\n */\n snapToCursor?: boolean\n}\n\ntype DragDirection = \"x\" | \"y\"\n\nexport class VisualElementDragControls {\n private visualElement: VisualElement\n\n private panSession?: PanSession\n\n private openDragLock: VoidFunction | null = null\n\n isDragging = false\n private currentDirection: DragDirection | null = null\n\n private originPoint: Point = { x: 0, y: 0 }\n\n /**\n * The permitted boundaries of travel, in pixels.\n */\n private constraints: ResolvedConstraints | false = false\n\n private hasMutatedConstraints = false\n\n /**\n * The per-axis resolved elastic values.\n */\n private elastic = createBox()\n\n /**\n * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n private latestPointerEvent: PointerEvent | null = null\n\n /**\n * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n private latestPanInfo: PanInfo | null = null\n\n constructor(visualElement: VisualElement) {\n this.visualElement = visualElement\n }\n\n start(\n originEvent: PointerEvent,\n { snapToCursor = false, distanceThreshold }: DragControlOptions = {}\n ) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement\n if (presenceContext && presenceContext.isPresent === false) return\n\n const onSessionStart = (event: PointerEvent) => {\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point)\n }\n this.stopAnimation()\n }\n\n const onStart = (event: PointerEvent, info: PanInfo) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps()\n\n if (drag && !dragPropagation) {\n if (this.openDragLock) this.openDragLock()\n\n this.openDragLock = setDragLock(drag)\n\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock) return\n }\n\n this.latestPointerEvent = event\n this.latestPanInfo = info\n this.isDragging = true\n\n this.currentDirection = null\n\n this.resolveConstraints()\n\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true\n this.visualElement.projection.target = undefined\n }\n\n /**\n * Record gesture origin and pointer offset\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0\n\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement\n\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis]\n\n if (measuredAxis) {\n const length = calcLength(measuredAxis)\n current = length * (parseFloat(current) / 100)\n }\n }\n }\n\n this.originPoint[axis] = current\n })\n\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true)\n }\n\n addValueToWillChange(this.visualElement, \"transform\")\n\n const { animationState } = this.visualElement\n animationState && animationState.setActive(\"whileDrag\", true)\n }\n\n const onMove = (event: PointerEvent, info: PanInfo) => {\n this.latestPointerEvent = event\n this.latestPanInfo = info\n\n const {\n dragPropagation,\n dragDirectionLock,\n onDirectionLock,\n onDrag,\n } = this.getProps()\n\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock) return\n\n const { offset } = info\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset)\n\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection)\n }\n\n return\n }\n\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset)\n this.updateAxis(\"y\", info.point, offset)\n\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render()\n\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n if (onDrag) {\n frame.update(() => onDrag(event, info), false, true)\n }\n }\n\n const onSessionEnd = (event: PointerEvent, info: PanInfo) => {\n this.latestPointerEvent = event\n this.latestPanInfo = info\n\n this.stop(event, info)\n\n this.latestPointerEvent = null\n this.latestPanInfo = null\n }\n\n const resumeAnimation = () => {\n const { dragSnapToOrigin: snap } = this.getProps()\n if (snap || this.constraints) {\n this.startAnimation({ x: 0, y: 0 })\n }\n }\n\n const { dragSnapToOrigin } = this.getProps()\n this.panSession = new PanSession(\n originEvent,\n {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n },\n {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n distanceThreshold,\n contextWindow: getContextWindow(this.visualElement),\n element: this.visualElement.current,\n }\n )\n }\n\n /**\n * @internal\n */\n stop(event?: PointerEvent, panInfo?: PanInfo) {\n const finalEvent = event || this.latestPointerEvent\n const finalPanInfo = panInfo || this.latestPanInfo\n\n const isDragging = this.isDragging\n this.cancel()\n if (!isDragging || !finalPanInfo || !finalEvent) return\n\n const { velocity } = finalPanInfo\n this.startAnimation(velocity)\n\n const { onDragEnd } = this.getProps()\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(finalEvent, finalPanInfo))\n }\n }\n\n /**\n * @internal\n */\n cancel() {\n this.isDragging = false\n\n const { projection, animationState } = this.visualElement\n\n if (projection) {\n projection.isAnimationBlocked = false\n }\n\n this.endPanSession()\n\n const { dragPropagation } = this.getProps()\n\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock()\n this.openDragLock = null\n }\n\n animationState && animationState.setActive(\"whileDrag\", false)\n }\n\n /**\n * Clean up the pan session without modifying other drag state.\n * This is used during unmount to ensure event listeners are removed\n * without affecting projection animations or drag locks.\n * @internal\n */\n endPanSession() {\n this.panSession && this.panSession.end()\n this.panSession = undefined\n }\n\n private updateAxis(axis: DragDirection, _point: Point, offset?: Point) {\n const { drag } = this.getProps()\n\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection)) return\n\n const axisValue = this.getAxisMotionValue(axis)\n let next = this.originPoint[axis] + offset[axis]\n\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(\n next,\n this.constraints[axis],\n this.elastic[axis]\n )\n }\n\n axisValue.set(next)\n }\n\n private resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps()\n\n const layout =\n this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout\n\n const prevConstraints = this.constraints\n\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints()\n }\n } else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(\n layout.layoutBox,\n dragConstraints\n )\n } else {\n this.constraints = false\n }\n }\n\n this.elastic = resolveDragElastic(dragElastic)\n\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative. This only applies to relative (non-ref)\n * constraints, as ref-based constraints from calcViewportConstraints are already in the\n * correct coordinate space for the motion value transform offset.\n */\n if (\n prevConstraints !== this.constraints &&\n !isRefObject(dragConstraints) &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints\n ) {\n eachAxis((axis) => {\n if (\n this.constraints !== false &&\n this.getAxisMotionValue(axis)\n ) {\n this.constraints[axis] = rebaseAxisConstraints(\n layout.layoutBox[axis],\n this.constraints[axis]\n )\n }\n })\n }\n }\n\n private resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } =\n this.getProps()\n if (!constraints || !isRefObject(constraints)) return false\n\n const constraintsElement = constraints.current as HTMLElement\n\n invariant(\n constraintsElement !== null,\n \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\",\n \"drag-constraints-ref\"\n )\n\n const { projection } = this.visualElement\n\n // TODO\n if (!projection || !projection.layout) return false\n\n /**\n * Refresh the root scroll offset so the constraint's viewport box\n * translates to correct page coordinates. The scroll captured at\n * drag mount can be stale if the document was scrolled afterwards —\n * e.g. via the browser restoring scroll on refresh, or an ancestor\n * layout effect running after this element's mount (#2829).\n *\n * Clear the cached scroll first so `updateScroll` bypasses its\n * per-animationId cache and re-reads the live value.\n */\n if (projection.root) {\n projection.root.scroll = undefined\n projection.root.updateScroll()\n }\n\n const constraintsBox = measurePageBox(\n constraintsElement,\n projection.root!,\n this.visualElement.getTransformPagePoint()\n )\n\n let measuredConstraints = calcViewportConstraints(\n projection.layout.layoutBox,\n constraintsBox\n )\n\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(\n convertBoxToBoundingBox(measuredConstraints)\n )\n\n this.hasMutatedConstraints = !!userConstraints\n\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints)\n }\n }\n\n return measuredConstraints\n }\n\n private startAnimation(velocity: Point) {\n const {\n drag,\n dragMomentum,\n dragElastic,\n dragTransition,\n dragSnapToOrigin,\n onDragTransitionEnd,\n } = this.getProps()\n\n const constraints: Partial = this.constraints || {}\n\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return\n }\n\n let transition = (constraints && constraints[axis]) || {}\n\n if (\n dragSnapToOrigin === true ||\n (dragSnapToOrigin as unknown) === axis\n )\n transition = { min: 0, max: 0 }\n\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000\n const bounceDamping = dragElastic ? 40 : 10000000\n\n const inertia: Transition = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n }\n\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia)\n })\n\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd)\n }\n\n private startAxisValueAnimation(\n axis: DragDirection,\n transition: Transition\n ) {\n const axisValue = this.getAxisMotionValue(axis)\n\n addValueToWillChange(this.visualElement, axis)\n\n return axisValue.start(\n animateMotionValue(\n axis,\n axisValue,\n 0,\n transition,\n this.visualElement,\n false\n )\n )\n }\n\n private stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop())\n }\n\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n private getAxisMotionValue(axis: DragDirection) {\n const dragKey =\n `_drag${axis.toUpperCase()}` as `_drag${Uppercase}`\n const props = this.visualElement.getProps()\n const externalMotionValue = props[dragKey]\n\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(\n axis,\n this.visualElement.latestValues[axis] ?? 0\n )\n }\n\n private snapToCursor(point: Point) {\n eachAxis((axis) => {\n const { drag } = this.getProps()\n\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection)) return\n\n const { projection } = this.visualElement\n const axisValue = this.getAxisMotionValue(axis)\n\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis]\n\n /**\n * The layout measurement includes the current transform value,\n * so we need to add it back to get the correct snap position.\n * This fixes an issue where elements with initial coordinates\n * would snap to the wrong position on the first drag.\n */\n const current = axisValue.get() || 0\n\n axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current)\n }\n })\n }\n\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current) return\n\n const { drag, dragConstraints } = this.getProps()\n const { projection } = this.visualElement\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return\n\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation()\n\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 }\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis)\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get()\n boxProgress[axis] = calcOrigin(\n { min: latest, max: latest },\n this.constraints[axis] as Axis\n )\n }\n })\n\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps()\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\"\n projection.root && projection.root.updateScroll()\n projection.updateLayout()\n\n /**\n * Reset constraints so resolveConstraints() will recalculate them\n * with the freshly measured layout rather than returning the cached value.\n */\n this.constraints = false\n this.resolveConstraints()\n\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null)) return\n\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis)\n const { min, max } = (this.constraints as ResolvedConstraints)[\n axis\n ] as Axis\n axisValue.set(mixNumber(min, max, boxProgress[axis]))\n })\n\n /**\n * Flush the updated transform to the DOM synchronously to prevent\n * a visual flash at the element's CSS layout position (0,0) when\n * the transform was stripped for measurement.\n */\n this.visualElement.render()\n }\n\n addListeners() {\n if (!this.visualElement.current) return\n elementDragControls.set(this.visualElement, this)\n const element = this.visualElement.current\n\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(\n element,\n \"pointerdown\",\n (event) => {\n const { drag, dragListener = true } = this.getProps()\n const target = event.target as Element\n\n /**\n * Only block drag if clicking on a text input child element\n * (input, textarea, select, contenteditable) where users might\n * want to select text or interact with the control.\n *\n * Buttons and links don't block drag since they don't have\n * click-and-move actions of their own.\n */\n const isClickingTextInputChild =\n target !== element && isElementTextInput(target)\n\n if (drag && dragListener && !isClickingTextInputChild) {\n this.start(event)\n }\n }\n )\n\n /**\n * If using ref-based constraints, observe both the draggable element\n * and the constraint container for size changes via ResizeObserver.\n * Setup is deferred because dragConstraints.current is null when\n * addListeners first runs (React hasn't committed the ref yet).\n */\n let stopResizeObservers: VoidFunction | undefined\n\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps()\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints()\n\n if (!stopResizeObservers) {\n stopResizeObservers = startResizeObservers(\n element,\n dragConstraints.current as HTMLElement,\n () => this.scalePositionWithinConstraints()\n )\n }\n }\n }\n\n const { projection } = this.visualElement\n\n const stopMeasureLayoutListener = projection!.addEventListener(\n \"measure\",\n measureDragConstraints\n )\n\n if (projection && !projection!.layout) {\n projection.root && projection.root.updateScroll()\n projection.updateLayout()\n }\n\n frame.read(measureDragConstraints)\n\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () =>\n this.scalePositionWithinConstraints()\n )\n\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection!.addEventListener(\n \"didUpdate\",\n (({ delta, hasLayoutChanged }: LayoutUpdateData) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis)\n if (!motionValue) return\n\n this.originPoint[axis] += delta[axis].translate\n motionValue.set(\n motionValue.get() + delta[axis].translate\n )\n })\n\n this.visualElement.render()\n }\n }) as any\n )\n\n return () => {\n stopResizeListener()\n stopPointerListener()\n stopMeasureLayoutListener()\n stopLayoutUpdateListener && stopLayoutUpdateListener()\n stopResizeObservers && stopResizeObservers()\n }\n }\n\n getProps(): MotionProps {\n const props = this.visualElement.getProps()\n const {\n drag = false,\n dragDirectionLock = false,\n dragPropagation = false,\n dragConstraints = false,\n dragElastic = defaultElastic,\n dragMomentum = true,\n } = props\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n }\n }\n}\n\nfunction skipFirstCall(callback: VoidFunction): VoidFunction {\n let isFirst = true\n return () => {\n if (isFirst) {\n isFirst = false\n return\n }\n callback()\n }\n}\n\nfunction startResizeObservers(\n element: HTMLElement,\n constraintsElement: HTMLElement,\n onResize: VoidFunction\n): VoidFunction {\n const stopElement = resize(element, skipFirstCall(onResize))\n const stopContainer = resize(constraintsElement, skipFirstCall(onResize))\n return () => {\n stopElement()\n stopContainer()\n }\n}\n\nfunction shouldDrag(\n direction: DragDirection,\n drag: boolean | DragDirection | undefined,\n currentDirection: null | DragDirection\n) {\n return (\n (drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction)\n )\n}\n\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(\n offset: Point,\n lockThreshold = 10\n): DragDirection | null {\n let direction: DragDirection | null = null\n\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\"\n } else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\"\n }\n\n return direction\n}\n\nexport function expectsResolvedDragConstraints({\n dragConstraints,\n onMeasureDragConstraints,\n}: MotionProps) {\n return isRefObject(dragConstraints) && !!onMeasureDragConstraints\n}\n"],"names":[],"mappings":";;;;;;;;;AAsCO,MAAM,mBAAmB,GAAG,IAAI,OAAO;MAuBjC,yBAAyB,CAAA;AAkClC,IAAA,WAAA,CAAY,aAAyC,EAAA;QA7B7C,IAAA,CAAA,YAAY,GAAwB,IAAI;QAEhD,IAAA,CAAA,UAAU,GAAG,KAAK;QACV,IAAA,CAAA,gBAAgB,GAAyB,IAAI;QAE7C,IAAA,CAAA,WAAW,GAAU,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAE3C;;AAEG;QACK,IAAA,CAAA,WAAW,GAAgC,KAAK;QAEhD,IAAA,CAAA,qB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,IAAI;IAE1C,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,aAAa,EAAE;QACpC,SAAS,GAAG,GAAG;IACnB;SAAO,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,aAAa,EAAE;QAC3C,SAAS,GAAG,GAAG;IACnB;AAEA,IAAA,OAAO,SAAS;AACpB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/index.mjs deleted file mode 100644 index 6eda9887..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/index.mjs +++ /dev/null @@ -1,51 +0,0 @@ -import { Feature } from 'motion-dom'; -import { noop } from 'motion-utils'; -import { VisualElementDragControls } from './VisualElementDragControls.mjs'; - -class DragGesture extends Feature { - constructor(node) { - super(node); - this.removeGroupControls = noop; - this.removeListeners = noop; - this.controls = new VisualElementDragControls(node); - } - mount() { - // If we've been provided a DragControls for manual control over the drag gesture, - // subscribe this component to it on mount. - const { dragControls } = this.node.getProps(); - if (dragControls) { - this.removeGroupControls = dragControls.subscribe(this.controls); - } - this.removeListeners = this.controls.addListeners() || noop; - } - update() { - const { dragControls } = this.node.getProps(); - const { dragControls: prevDragControls } = this.node.prevProps || {}; - if (dragControls !== prevDragControls) { - this.removeGroupControls(); - if (dragControls) { - this.removeGroupControls = dragControls.subscribe(this.controls); - } - } - } - unmount() { - this.removeGroupControls(); - this.removeListeners(); - /** - * In React 19, during list reorder reconciliation, components may - * briefly unmount and remount while the drag is still active. If we're - * actively dragging, we should NOT end the pan session - it will - * continue tracking pointer events via its window-level listeners. - * - * The pan session will be properly cleaned up when: - * 1. The drag ends naturally (pointerup/pointercancel) - * 2. The component is truly removed from the DOM - */ - if (!this.controls.isDragging) { - this.controls.endPanSession(); - } - } -} - -export { DragGesture }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.map deleted file mode 100644 index 05a1daa9..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/gestures/drag/index.ts"],"sourcesContent":["import { Feature, type VisualElement } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { VisualElementDragControls } from \"./VisualElementDragControls\"\n\nexport class DragGesture extends Feature {\n controls: VisualElementDragControls\n\n removeGroupControls: Function = noop\n removeListeners: Function = noop\n\n constructor(node: VisualElement) {\n super(node)\n this.controls = new VisualElementDragControls(node)\n }\n\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps()\n\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls)\n }\n\n this.removeListeners = this.controls.addListeners() || noop\n }\n\n update() {\n const { dragControls } = this.node.getProps()\n const { dragControls: prevDragControls } = this.node.prevProps || {}\n\n if (dragControls !== prevDragControls) {\n this.removeGroupControls()\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls)\n }\n }\n }\n\n unmount() {\n this.removeGroupControls()\n this.removeListeners()\n /**\n * In React 19, during list reorder reconciliation, components may\n * briefly unmount and remount while the drag is still active. If we're\n * actively dragging, we should NOT end the pan session - it will\n * continue tracking pointer events via its window-level listeners.\n *\n * The pan session will be properly cleaned up when:\n * 1. The drag ends naturally (pointerup/pointercancel)\n * 2. The component is truly removed from the DOM\n */\n if (!this.controls.isDragging) {\n this.controls.endPanSession()\n }\n }\n}\n"],"names":[],"mappings":";;;;AAIM,MAAO,WAAY,SAAQ,OAAoB,CA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/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs deleted file mode 100644 index ebd79b9f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs +++ /dev/null @@ -1,117 +0,0 @@ -import { useConstant } from '../../utils/use-constant.mjs'; - -/** - * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components. - * - * ```jsx - * const dragControls = useDragControls() - * - * function startDrag(event) { - * dragControls.start(event, { snapToCursor: true }) - * } - * - * return ( - * <> - *
- * - * - * ) - * ``` - * - * @public - */ -class DragControls { - constructor() { - this.componentControls = new Set(); - } - /** - * Subscribe a component's internal `VisualElementDragControls` to the user-facing API. - * - * @internal - */ - subscribe(controls) { - this.componentControls.add(controls); - return () => this.componentControls.delete(controls); - } - /** - * Start a drag gesture on every `motion` component that has this set of drag controls - * passed into it via the `dragControls` prop. - * - * ```jsx - * dragControls.start(e, { - * snapToCursor: true - * }) - * ``` - * - * @param event - PointerEvent - * @param options - Options - * - * @public - */ - start(event, options) { - this.componentControls.forEach((controls) => { - controls.start(event.nativeEvent || event, options); - }); - } - /** - * Cancels a drag gesture. - * - * ```jsx - * dragControls.cancel() - * ``` - * - * @public - */ - cancel() { - this.componentControls.forEach((controls) => { - controls.cancel(); - }); - } - /** - * Stops a drag gesture. - * - * ```jsx - * dragControls.stop() - * ``` - * - * @public - */ - stop() { - this.componentControls.forEach((controls) => { - controls.stop(); - }); - } -} -const createDragControls = () => new DragControls(); -/** - * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop - * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we - * might want to initiate that dragging from a different component than the draggable one. - * - * By creating a `dragControls` using the `useDragControls` hook, we can pass this into - * the draggable component's `dragControls` prop. It exposes a `start` method - * that can start dragging from pointer events on other components. - * - * ```jsx - * const dragControls = useDragControls() - * - * function startDrag(event) { - * dragControls.start(event, { snapToCursor: true }) - * } - * - * return ( - * <> - *
- * - * - * ) - * ``` - * - * @public - */ -function useDragControls() { - return useConstant(createDragControls); -} - -export { DragControls, useDragControls }; -//# sourceMappingURL=use-drag-controls.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.map deleted file mode 100644 index 43af9eb7..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-drag-controls.mjs","sources":["../../../../src/gestures/drag/use-drag-controls.ts"],"sourcesContent":["import * as React from \"react\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport {\n DragControlOptions,\n VisualElementDragControls,\n} from \"./VisualElementDragControls\"\n\n/**\n * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n *
\n * \n * \n * )\n * ```\n *\n * @public\n */\nexport class DragControls {\n private componentControls = new Set()\n\n /**\n * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.\n *\n * @internal\n */\n subscribe(controls: VisualElementDragControls): () => void {\n this.componentControls.add(controls)\n\n return () => this.componentControls.delete(controls)\n }\n\n /**\n * Start a drag gesture on every `motion` component that has this set of drag controls\n * passed into it via the `dragControls` prop.\n *\n * ```jsx\n * dragControls.start(e, {\n * snapToCursor: true\n * })\n * ```\n *\n * @param event - PointerEvent\n * @param options - Options\n *\n * @public\n */\n start(\n event: React.PointerEvent | PointerEvent,\n options?: DragControlOptions\n ) {\n this.componentControls.forEach((controls) => {\n controls.start(\n (event as React.PointerEvent).nativeEvent || event,\n options\n )\n })\n }\n\n /**\n * Cancels a drag gesture.\n *\n * ```jsx\n * dragControls.cancel()\n * ```\n *\n * @public\n */\n cancel() {\n this.componentControls.forEach((controls) => {\n controls.cancel()\n })\n }\n\n /**\n * Stops a drag gesture.\n *\n * ```jsx\n * dragControls.stop()\n * ```\n *\n * @public\n */\n stop() {\n this.componentControls.forEach((controls) => {\n controls.stop()\n })\n }\n}\n\nconst createDragControls = () => new DragControls()\n\n/**\n * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop\n * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we\n * might want to initiate that dragging from a different component than the draggable one.\n *\n * By creating a `dragControls` using the `useDragControls` hook, we can pass this into\n * the draggable component's `dragControls` prop. It exposes a `start` method\n * that can start dragging from pointer events on other components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n *
\n * \n * \n * )\n * ```\n *\n * @public\n */\nexport function useDragControls() {\n return useConstant(createDragControls)\n}\n"],"names":[],"mappings":";;AAOA;;;;;;;;;;;;;;;;;;;AAmBG;MACU,YAAY,CAAA;AAAzB,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,GAAG,EAA6B;IAqEpE;AAnEI;;;;AAIG;AACH,IAAA,SAAS,CAAC,QAAmC,EAAA;AACzC,QAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC;QAEpC,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC;IACxD;AAEA;;;;;;;;;;;;;;AAcG;IACH,KAAK,CACD,KAAwC,EACxC,OAA4B,EAAA;QAE5B,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAI;YACxC,QAAQ,CAAC,KAAK,CACT,KAA4B,CAAC,WAAW,IAAI,KAAK,EAClD,OAAO,CACV;AACL,QAAA,CAAC,CAAC;IACN;AAEA;;;;;;;;AAQG;IACH,MAAM,GAAA;QACF,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAI;YACxC,QAAQ,CAAC,MAAM,EAAE;AACrB,QAAA,CAAC,CAAC;IACN;AAEA;;;;;;;;AAQG;IACH,IAAI,GAAA;QACA,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAI;YACxC,QAAQ,CAAC,IAAI,EAAE;AACnB,QAAA,CAAC,CAAC;IACN;AACH;AAED,MAAM,kBAAkB,GAAG,MAAM,IAAI,YAAY,EAAE;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;SACa,eAAe,GAAA;AAC3B,IAAA,OAAO,WAAW,CAAC,kBAAkB,CAAC;AAC1C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs deleted file mode 100644 index 98c6754c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +++ /dev/null @@ -1,128 +0,0 @@ -import { mixNumber, calcLength } from 'motion-dom'; -import { progress, clamp } from 'motion-utils'; - -/** - * Apply constraints to a point. These constraints are both physical along an - * axis, and an elastic factor that determines how much to constrain the point - * by if it does lie outside the defined parameters. - */ -function applyConstraints(point, { min, max }, elastic) { - if (min !== undefined && point < min) { - // If we have a min point defined, and this is outside of that, constrain - point = elastic - ? mixNumber(min, point, elastic.min) - : Math.max(point, min); - } - else if (max !== undefined && point > max) { - // If we have a max point defined, and this is outside of that, constrain - point = elastic - ? mixNumber(max, point, elastic.max) - : Math.min(point, max); - } - return point; -} -/** - * Calculate constraints in terms of the viewport when defined relatively to the - * measured axis. This is measured from the nearest edge, so a max constraint of 200 - * on an axis with a max value of 300 would return a constraint of 500 - axis length - */ -function calcRelativeAxisConstraints(axis, min, max) { - return { - min: min !== undefined ? axis.min + min : undefined, - max: max !== undefined - ? axis.max + max - (axis.max - axis.min) - : undefined, - }; -} -/** - * Calculate constraints in terms of the viewport when - * defined relatively to the measured bounding box. - */ -function calcRelativeConstraints(layoutBox, { top, left, bottom, right }) { - return { - x: calcRelativeAxisConstraints(layoutBox.x, left, right), - y: calcRelativeAxisConstraints(layoutBox.y, top, bottom), - }; -} -/** - * Calculate viewport constraints when defined as another viewport-relative axis - */ -function calcViewportAxisConstraints(layoutAxis, constraintsAxis) { - let min = constraintsAxis.min - layoutAxis.min; - let max = constraintsAxis.max - layoutAxis.max; - // If the constraints axis is actually smaller than the layout axis then we can - // flip the constraints - if (constraintsAxis.max - constraintsAxis.min < - layoutAxis.max - layoutAxis.min) { - [min, max] = [max, min]; - } - return { min, max }; -} -/** - * Calculate viewport constraints when defined as another viewport-relative box - */ -function calcViewportConstraints(layoutBox, constraintsBox) { - return { - x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x), - y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y), - }; -} -/** - * Calculate a transform origin relative to the source axis, between 0-1, that results - * in an asthetically pleasing scale/transform needed to project from source to target. - */ -function calcOrigin(source, target) { - let origin = 0.5; - const sourceLength = calcLength(source); - const targetLength = calcLength(target); - if (targetLength > sourceLength) { - origin = progress(target.min, target.max - sourceLength, source.min); - } - else if (sourceLength > targetLength) { - origin = progress(source.min, source.max - targetLength, target.min); - } - return clamp(0, 1, origin); -} -/** - * Rebase the calculated viewport constraints relative to the layout.min point. - */ -function rebaseAxisConstraints(layout, constraints) { - const relativeConstraints = {}; - if (constraints.min !== undefined) { - relativeConstraints.min = constraints.min - layout.min; - } - if (constraints.max !== undefined) { - relativeConstraints.max = constraints.max - layout.min; - } - return relativeConstraints; -} -const defaultElastic = 0.35; -/** - * Accepts a dragElastic prop and returns resolved elastic values for each axis. - */ -function resolveDragElastic(dragElastic = defaultElastic) { - if (dragElastic === false) { - dragElastic = 0; - } - else if (dragElastic === true) { - dragElastic = defaultElastic; - } - return { - x: resolveAxisElastic(dragElastic, "left", "right"), - y: resolveAxisElastic(dragElastic, "top", "bottom"), - }; -} -function resolveAxisElastic(dragElastic, minLabel, maxLabel) { - return { - min: resolvePointElastic(dragElastic, minLabel), - max: resolvePointElastic(dragElastic, maxLabel), - }; -} -function resolvePointElastic(dragElastic, label) { - return typeof dragElastic === "number" - ? dragElastic - : dragElastic[label] || 0; -} - -export { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic }; -//# sourceMappingURL=constraints.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.map deleted file mode 100644 index 3405bd51..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constraints.mjs","sources":["../../../../../src/gestures/drag/utils/constraints.ts"],"sourcesContent":["import { calcLength, mixNumber, type DragElastic, type ResolvedConstraints } from \"motion-dom\"\nimport {\n Axis,\n BoundingBox,\n Box,\n progress as calcProgress,\n clamp,\n Point,\n} from \"motion-utils\"\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nexport function applyConstraints(\n point: number,\n { min, max }: Partial,\n elastic?: Axis\n): number {\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(min, point, elastic.min)\n : Math.max(point, min)\n } else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(max, point, elastic.max)\n : Math.min(point, max)\n }\n\n return point\n}\n\n/**\n * Calculates a min projection point based on a pointer, pointer progress\n * within the drag target, and constraints.\n *\n * For instance if an element was 100px width, we were dragging from 0.25\n * along this axis, the pointer is at 200px, and there were no constraints,\n * we would calculate a min projection point of 175px.\n */\nexport function calcConstrainedMinPoint(\n point: number,\n length: number,\n progress: number,\n constraints?: Partial,\n elastic?: Axis\n): number {\n // Calculate a min point for this axis and apply it to the current pointer\n const min = point - length * progress\n\n return constraints ? applyConstraints(min, constraints, elastic) : min\n}\n\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nexport function calcRelativeAxisConstraints(\n axis: Axis,\n min?: number,\n max?: number\n): Partial {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max:\n max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n }\n}\n\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nexport function calcRelativeConstraints(\n layoutBox: Box,\n { top, left, bottom, right }: Partial\n): ResolvedConstraints {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n }\n}\n\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nexport function calcViewportAxisConstraints(\n layoutAxis: Axis,\n constraintsAxis: Axis\n) {\n let min = constraintsAxis.min - layoutAxis.min\n let max = constraintsAxis.max - layoutAxis.max\n\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (\n constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min\n ) {\n ;[min, max] = [max, min]\n }\n\n return { min, max }\n}\n\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nexport function calcViewportConstraints(layoutBox: Box, constraintsBox: Box) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n }\n}\n\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nexport function calcOrigin(source: Axis, target: Axis): number {\n let origin = 0.5\n const sourceLength = calcLength(source)\n const targetLength = calcLength(target)\n\n if (targetLength > sourceLength) {\n origin = calcProgress(target.min, target.max - sourceLength, source.min)\n } else if (sourceLength > targetLength) {\n origin = calcProgress(source.min, source.max - targetLength, target.min)\n }\n\n return clamp(0, 1, origin)\n}\n\n/**\n * Calculate the relative progress of one constraints box relative to another.\n * Imagine a page scroll bar. At the top, this would return 0, at the bottom, 1.\n * Anywhere in-between, a value between 0 and 1.\n *\n * This also handles flipped constraints, for instance a draggable container within\n * a smaller viewport like a scrollable view.\n */\nexport function calcProgressWithinConstraints(\n layoutBox: Box,\n constraintsBox: Box\n): Point {\n return {\n x: calcOrigin(layoutBox.x, constraintsBox.x),\n y: calcOrigin(layoutBox.y, constraintsBox.y),\n }\n}\n\n/**\n * Calculate the an axis position based on two axes and a progress value.\n */\nexport function calcPositionFromProgress(\n axis: Axis,\n constraints: Axis,\n progress: number\n): Axis {\n const axisLength = axis.max - axis.min\n const min = mixNumber(\n constraints.min,\n constraints.max - axisLength,\n progress\n )\n return { min, max: min + axisLength }\n}\n\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nexport function rebaseAxisConstraints(\n layout: Axis,\n constraints: Partial\n): Partial {\n const relativeConstraints: Partial = {}\n\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min\n }\n\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min\n }\n\n return relativeConstraints\n}\n\nexport const defaultElastic = 0.35\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nexport function resolveDragElastic(\n dragElastic: DragElastic = defaultElastic\n): Box {\n if (dragElastic === false) {\n dragElastic = 0\n } else if (dragElastic === true) {\n dragElastic = defaultElastic\n }\n\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n }\n}\n\nexport function resolveAxisElastic(\n dragElastic: DragElastic,\n minLabel: string,\n maxLabel: string\n): Axis {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n }\n}\n\nexport function resolvePointElastic(\n dragElastic: DragElastic,\n label: string\n): number {\n return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label as keyof typeof dragElastic] || 0\n}\n"],"names":["calcProgress"],"mappings":";;;AAUA;;;;AAIG;AACG,SAAU,gBAAgB,CAC5B,KAAa,EACb,EAAE,GAAG,EAAE,GAAG,EAAiB,EAC3B,OAAc,EAAA;IAEd,IAAI,GAAG,KAAK,SAAS,IAAI,KAAK,GAAG,GAAG,EAAE;;AAElC,QAAA,KAAK,GAAG;cACF,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG;cACjC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC;IAC9B;SAAO,IAAI,GAAG,KAAK,SAAS,IAAI,KAAK,GAAG,GAAG,EAAE;;AAEzC,QAAA,KAAK,GAAG;cACF,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG;cACjC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC;IAC9B;AAEA,IAAA,OAAO,KAAK;AAChB;AAuBA;;;;AAIG;SACa,2BAA2B,CACvC,IAAU,EACV,GAAY,EACZ,GAAY,EAAA;IAEZ,OAAO;AACH,QAAA,GAAG,EAAE,GAAG,KAAK,SAAS,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG,SAAS;QACnD,GAAG,EACC,GAAG,KAAK;AACJ,cAAE,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG;AACvC,cAAE,SAAS;KACtB;AACL;AAEA;;;AAGG;AACG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B,OAAO;AACH,QAAA,GAAG,EAAE,mBAAmB,CAAC,WAAW,EAAE,QAAQ,CAAC;AAC/C,QAAA,GAAG,EAAE,mBAAmB,CAAC,WAAW,EAAE,QAAQ,CAAC;KAClD;AACL;AAEM,SAAU,mBAAmB,CAC/B,WAAwB,EACxB,KAAa,EAAA;IAEb,OAAO,OAAO,WAAW,KAAK;AAC1B,UAAE;AACF,UAAE,WAAW,CAAC,KAAiC,CAAC,IAAI,CAAC;AAC7D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/focus.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/focus.mjs deleted file mode 100644 index dcd3282f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/focus.mjs +++ /dev/null @@ -1,41 +0,0 @@ -import { Feature, addDomEvent } from 'motion-dom'; -import { pipe } from 'motion-utils'; - -class FocusGesture extends Feature { - constructor() { - super(...arguments); - this.isActive = false; - } - onFocus() { - let isFocusVisible = false; - /** - * If this element doesn't match focus-visible then don't - * apply whileHover. But, if matches throws that focus-visible - * is not a valid selector then in that browser outline styles will be applied - * to the element by default and we want to match that behaviour with whileFocus. - */ - try { - isFocusVisible = this.node.current.matches(":focus-visible"); - } - catch (e) { - isFocusVisible = true; - } - if (!isFocusVisible || !this.node.animationState) - return; - this.node.animationState.setActive("whileFocus", true); - this.isActive = true; - } - onBlur() { - if (!this.isActive || !this.node.animationState) - return; - this.node.animationState.setActive("whileFocus", false); - this.isActive = false; - } - mount() { - this.unmount = pipe(addDomEvent(this.node.current, "focus", () => this.onFocus()), addDomEvent(this.node.current, "blur", () => this.onBlur())); - } - unmount() { } -} - -export { FocusGesture }; -//# sourceMappingURL=focus.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/focus.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/focus.mjs.map deleted file mode 100644 index 6263f647..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/focus.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"focus.mjs","sources":["../../../src/gestures/focus.ts"],"sourcesContent":["import { Feature, addDomEvent } from \"motion-dom\"\nimport { pipe } from \"motion-utils\"\n\nexport class FocusGesture extends Feature {\n private isActive = false\n\n onFocus() {\n let isFocusVisible = false\n\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current!.matches(\":focus-visible\")\n } catch (e) {\n isFocusVisible = true\n }\n\n if (!isFocusVisible || !this.node.animationState) return\n\n this.node.animationState.setActive(\"whileFocus\", true)\n this.isActive = true\n }\n\n onBlur() {\n if (!this.isActive || !this.node.animationState) return\n this.node.animationState.setActive(\"whileFocus\", false)\n this.isActive = false\n }\n\n mount() {\n this.unmount = pipe(\n addDomEvent(this.node.current!, \"focus\", () => this.onFocus()),\n addDomEvent(this.node.current!, \"blur\", () => this.onBlur())\n ) as VoidFunction\n }\n\n unmount() {}\n}\n"],"names":[],"mappings":";;;AAGM,MAAO,YAAa,SAAQ,OAAgB,CAAA;AAAlD,IAAA,WAAA,GAAA;;QACY,IAAA,CAAA,QAAQ,GAAG,KAAK;IAqC5B;IAnCI,OAAO,GAAA;QACH,IAAI,cAAc,GAAG,KAAK;AAE1B;;;;;AAKG;AACH,QAAA,IAAI;YACA,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,OAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC;QACjE;QAAE,OAAO,CAAC,EAAE;YACR,cAAc,GAAG,IAAI;QACzB;QAEA,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc;YAAE;QAElD,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC;AACtD,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;IACxB;IAEA,MAAM,GAAA;QACF,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc;YAAE;QACjD,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC;AACvD,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK;IACzB;IAEA,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CACf,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAQ,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,EAC9D,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAQ,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,CAC/C;IACrB;AAEA,IAAA,OAAO,KAAI;AACd;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/hover.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/hover.mjs deleted file mode 100644 index 6ab462ff..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/hover.mjs +++ /dev/null @@ -1,29 +0,0 @@ -import { Feature, hover, frame } from 'motion-dom'; -import { extractEventInfo } from '../events/event-info.mjs'; - -function handleHoverEvent(node, event, lifecycle) { - const { props } = node; - if (node.animationState && props.whileHover) { - node.animationState.setActive("whileHover", lifecycle === "Start"); - } - const eventName = ("onHover" + lifecycle); - const callback = props[eventName]; - if (callback) { - frame.postRender(() => callback(event, extractEventInfo(event))); - } -} -class HoverGesture extends Feature { - mount() { - const { current } = this.node; - if (!current) - return; - this.unmount = hover(current, (_element, startEvent) => { - handleHoverEvent(this.node, startEvent, "Start"); - return (endEvent) => handleHoverEvent(this.node, endEvent, "End"); - }); - } - unmount() { } -} - -export { HoverGesture }; -//# sourceMappingURL=hover.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/hover.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/hover.mjs.map deleted file mode 100644 index 6f066429..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/hover.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hover.mjs","sources":["../../../src/gestures/hover.ts"],"sourcesContent":["import { Feature, frame, hover, type VisualElement } from \"motion-dom\"\nimport { extractEventInfo } from \"../events/event-info\"\n\nfunction handleHoverEvent(\n node: VisualElement,\n event: PointerEvent,\n lifecycle: \"Start\" | \"End\"\n) {\n const { props } = node\n\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\")\n }\n\n const eventName = (\"onHover\" + lifecycle) as \"onHoverStart\" | \"onHoverEnd\"\n const callback = props[eventName]\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)))\n }\n}\n\nexport class HoverGesture extends Feature {\n mount() {\n const { current } = this.node\n if (!current) return\n\n this.unmount = hover(current, (_element, startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\")\n\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\")\n })\n }\n\n unmount() {}\n}\n"],"names":[],"mappings":";;;AAGA,SAAS,gBAAgB,CACrB,IAA4B,EAC5B,KAAmB,EACnB,SAA0B,EAAA;AAE1B,IAAA,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI;IAEtB,IAAI,IAAI,CAAC,cAAc,IAAI,KAAK,CAAC,UAAU,EAAE;QACzC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,YAAY,EAAE,SAAS,KAAK,OAAO,CAAC;IACtE;AAEA,IAAA,MAAM,SAAS,IAAI,SAAS,GAAG,SAAS,CAAkC;AAC1E,IAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC,IAAI,QAAQ,EAAE;AACV,QAAA,KAAK,CAAC,UAAU,CAAC,MAAM,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE;AACJ;AAEM,MAAO,YAAa,SAAQ,OAAgB,CAAA;IAC9C,KAAK,GAAA;AACD,QAAA,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI;AAC7B,QAAA,IAAI,CAAC,OAAO;YAAE;AAEd,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,UAAU,KAAI;YACnD,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC;AAEhD,YAAA,OAAO,CAAC,QAAQ,KAAK,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC;AACrE,QAAA,CAAC,CAAC;IACN;AAEA,IAAA,OAAO,KAAI;AACd;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs deleted file mode 100644 index c9d1714c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs +++ /dev/null @@ -1,279 +0,0 @@ -import { frameData, frame, isPrimaryPointer, cancelFrame } from 'motion-dom'; -import { pipe, secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils'; -import { addPointerEvent } from '../../events/add-pointer-event.mjs'; -import { extractEventInfo } from '../../events/event-info.mjs'; -import { distance2D } from '../../utils/distance.mjs'; - -const overflowStyles = /*#__PURE__*/ new Set(["auto", "scroll"]); -/** - * @internal - */ -class PanSession { - constructor(event, handlers, { transformPagePoint, contextWindow = window, dragSnapToOrigin = false, distanceThreshold = 3, element, } = {}) { - /** - * @internal - */ - this.startEvent = null; - /** - * @internal - */ - this.lastMoveEvent = null; - /** - * @internal - */ - this.lastMoveEventInfo = null; - /** - * Raw (untransformed) event info, re-transformed each frame - * so transformPagePoint sees the current parent matrix. - * @internal - */ - this.lastRawMoveEventInfo = null; - /** - * @internal - */ - this.handlers = {}; - /** - * @internal - */ - this.contextWindow = window; - /** - * Scroll positions of scrollable ancestors and window. - * @internal - */ - this.scrollPositions = new Map(); - /** - * Cleanup function for scroll listeners. - * @internal - */ - this.removeScrollListeners = null; - this.onElementScroll = (event) => { - this.handleScroll(event.target); - }; - this.onWindowScroll = () => { - this.handleScroll(window); - }; - this.updatePoint = () => { - if (!(this.lastMoveEvent && this.lastMoveEventInfo)) - return; - // Re-transform raw point through current transformPagePoint so - // animated parent transforms (e.g. rotation) are picked up each frame - if (this.lastRawMoveEventInfo) { - this.lastMoveEventInfo = transformPoint(this.lastRawMoveEventInfo, this.transformPagePoint); - } - const info = getPanInfo(this.lastMoveEventInfo, this.history); - const isPanStarted = this.startEvent !== null; - // Only start panning if the offset is larger than 3 pixels. If we make it - // any larger than this we'll want to reset the pointer history - // on the first update to avoid visual snapping to the cursor. - const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold; - if (!isPanStarted && !isDistancePastThreshold) - return; - const { point } = info; - const { timestamp } = frameData; - this.history.push({ ...point, timestamp }); - const { onStart, onMove } = this.handlers; - if (!isPanStarted) { - onStart && onStart(this.lastMoveEvent, info); - this.startEvent = this.lastMoveEvent; - } - onMove && onMove(this.lastMoveEvent, info); - }; - this.handlePointerMove = (event, info) => { - this.lastMoveEvent = event; - this.lastRawMoveEventInfo = info; - this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint); - // Throttle mouse move event to once per frame - frame.update(this.updatePoint, true); - }; - this.handlePointerUp = (event, info) => { - this.end(); - const { onEnd, onSessionEnd, resumeAnimation } = this.handlers; - // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked) - // This ensures constraint animations continue when interrupted by a click - if (this.dragSnapToOrigin || !this.startEvent) { - resumeAnimation && resumeAnimation(); - } - if (!(this.lastMoveEvent && this.lastMoveEventInfo)) - return; - const panInfo = getPanInfo(event.type === "pointercancel" - ? this.lastMoveEventInfo - : transformPoint(info, this.transformPagePoint), this.history); - if (this.startEvent && onEnd) { - onEnd(event, panInfo); - } - onSessionEnd && onSessionEnd(event, panInfo); - }; - // If we have more than one touch, don't start detecting this gesture - if (!isPrimaryPointer(event)) - return; - this.dragSnapToOrigin = dragSnapToOrigin; - this.handlers = handlers; - this.transformPagePoint = transformPagePoint; - this.distanceThreshold = distanceThreshold; - this.contextWindow = contextWindow || window; - const info = extractEventInfo(event); - const initialInfo = transformPoint(info, this.transformPagePoint); - const { point } = initialInfo; - const { timestamp } = frameData; - this.history = [{ ...point, timestamp }]; - const { onSessionStart } = handlers; - onSessionStart && - onSessionStart(event, getPanInfo(initialInfo, this.history)); - this.removeListeners = pipe(addPointerEvent(this.contextWindow, "pointermove", this.handlePointerMove), addPointerEvent(this.contextWindow, "pointerup", this.handlePointerUp), addPointerEvent(this.contextWindow, "pointercancel", this.handlePointerUp)); - // Start scroll tracking if element provided - if (element) { - this.startScrollTracking(element); - } - } - /** - * Start tracking scroll on ancestors and window. - */ - startScrollTracking(element) { - // Store initial scroll positions for scrollable ancestors - let current = element.parentElement; - while (current) { - const style = getComputedStyle(current); - if (overflowStyles.has(style.overflowX) || - overflowStyles.has(style.overflowY)) { - this.scrollPositions.set(current, { - x: current.scrollLeft, - y: current.scrollTop, - }); - } - current = current.parentElement; - } - // Track window scroll - this.scrollPositions.set(window, { - x: window.scrollX, - y: window.scrollY, - }); - // Capture listener catches element scroll events as they bubble - window.addEventListener("scroll", this.onElementScroll, { - capture: true, - }); - // Direct window scroll listener (window scroll doesn't bubble) - window.addEventListener("scroll", this.onWindowScroll); - this.removeScrollListeners = () => { - window.removeEventListener("scroll", this.onElementScroll, { - capture: true, - }); - window.removeEventListener("scroll", this.onWindowScroll); - }; - } - /** - * Handle scroll compensation during drag. - * - * For element scroll: adjusts history origin since pageX/pageY doesn't change. - * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change. - */ - handleScroll(target) { - const initial = this.scrollPositions.get(target); - if (!initial) - return; - const isWindow = target === window; - const current = isWindow - ? { x: window.scrollX, y: window.scrollY } - : { - x: target.scrollLeft, - y: target.scrollTop, - }; - const delta = { x: current.x - initial.x, y: current.y - initial.y }; - if (delta.x === 0 && delta.y === 0) - return; - if (isWindow) { - // Window scroll: pageX/pageY changes, so update lastMoveEventInfo - if (this.lastMoveEventInfo) { - this.lastMoveEventInfo.point.x += delta.x; - this.lastMoveEventInfo.point.y += delta.y; - } - } - else { - // Element scroll: pageX/pageY unchanged, so adjust history origin - if (this.history.length > 0) { - this.history[0].x -= delta.x; - this.history[0].y -= delta.y; - } - } - this.scrollPositions.set(target, current); - frame.update(this.updatePoint, true); - } - updateHandlers(handlers) { - this.handlers = handlers; - } - end() { - this.removeListeners && this.removeListeners(); - this.removeScrollListeners && this.removeScrollListeners(); - this.scrollPositions.clear(); - cancelFrame(this.updatePoint); - } -} -function transformPoint(info, transformPagePoint) { - return transformPagePoint ? { point: transformPagePoint(info.point) } : info; -} -function subtractPoint(a, b) { - return { x: a.x - b.x, y: a.y - b.y }; -} -function getPanInfo({ point }, history) { - return { - point, - delta: subtractPoint(point, lastDevicePoint(history)), - offset: subtractPoint(point, startDevicePoint(history)), - velocity: getVelocity(history, 0.1), - }; -} -function startDevicePoint(history) { - return history[0]; -} -function lastDevicePoint(history) { - return history[history.length - 1]; -} -function getVelocity(history, timeDelta) { - if (history.length < 2) { - return { x: 0, y: 0 }; - } - let i = history.length - 1; - let timestampedPoint = null; - const lastPoint = lastDevicePoint(history); - while (i >= 0) { - timestampedPoint = history[i]; - if (lastPoint.timestamp - timestampedPoint.timestamp > - secondsToMilliseconds(timeDelta)) { - break; - } - i--; - } - if (!timestampedPoint) { - return { x: 0, y: 0 }; - } - /** - * If the selected point is the pointer-down origin (history[0]), - * there are better movement points available, and the time gap - * is suspiciously large (>2x timeDelta), use the next point instead. - * This prevents stale pointer-down points from diluting velocity - * in hold-then-flick gestures. - */ - if (timestampedPoint === history[0] && - history.length > 2 && - lastPoint.timestamp - timestampedPoint.timestamp > - secondsToMilliseconds(timeDelta) * 2) { - timestampedPoint = history[1]; - } - const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp); - if (time === 0) { - return { x: 0, y: 0 }; - } - const currentVelocity = { - x: (lastPoint.x - timestampedPoint.x) / time, - y: (lastPoint.y - timestampedPoint.y) / time, - }; - if (currentVelocity.x === Infinity) { - currentVelocity.x = 0; - } - if (currentVelocity.y === Infinity) { - currentVelocity.y = 0; - } - return currentVelocity; -} - -export { PanSession }; -//# sourceMappingURL=PanSession.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.map deleted file mode 100644 index f895b1d5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PanSession.mjs","sources":["../../../../src/gestures/pan/PanSession.ts"],"sourcesContent":["import type { EventInfo, PanHandler } from \"motion-dom\"\nimport { cancelFrame, frame, frameData, isPrimaryPointer } from \"motion-dom\"\nimport {\n millisecondsToSeconds,\n pipe,\n Point,\n secondsToMilliseconds,\n TransformPoint,\n} from \"motion-utils\"\nimport { addPointerEvent } from \"../../events/add-pointer-event\"\nimport { extractEventInfo } from \"../../events/event-info\"\nimport { distance2D } from \"../../utils/distance\"\n\ninterface PanSessionHandlers {\n onSessionStart: PanHandler\n onStart: PanHandler\n onMove: PanHandler\n onEnd: PanHandler\n onSessionEnd: PanHandler\n resumeAnimation: () => void\n}\n\ninterface PanSessionOptions {\n transformPagePoint?: TransformPoint\n dragSnapToOrigin?: boolean | \"x\" | \"y\"\n distanceThreshold?: number\n contextWindow?: (Window & typeof globalThis) | null\n /**\n * Element being dragged. When provided, scroll events on its\n * ancestors and window are compensated so the gesture continues\n * smoothly during scroll.\n */\n element?: HTMLElement | null\n}\n\ninterface TimestampedPoint extends Point {\n timestamp: number\n}\n\nconst overflowStyles = /*#__PURE__*/ new Set([\"auto\", \"scroll\"])\n\n/**\n * @internal\n */\nexport class PanSession {\n /**\n * @internal\n */\n private history: TimestampedPoint[]\n\n /**\n * @internal\n */\n private startEvent: PointerEvent | null = null\n\n /**\n * @internal\n */\n private lastMoveEvent: PointerEvent | null = null\n\n /**\n * @internal\n */\n private lastMoveEventInfo: EventInfo | null = null\n\n /**\n * Raw (untransformed) event info, re-transformed each frame\n * so transformPagePoint sees the current parent matrix.\n * @internal\n */\n private lastRawMoveEventInfo: EventInfo | null = null\n\n /**\n * @internal\n */\n private transformPagePoint?: TransformPoint\n\n /**\n * @internal\n */\n private handlers: Partial = {}\n\n /**\n * @internal\n */\n private removeListeners: Function\n\n /**\n * For determining if an animation should resume after it is interupted\n *\n * @internal\n */\n private dragSnapToOrigin: boolean | \"x\" | \"y\"\n\n /**\n * The distance after which panning should start.\n *\n * @internal\n */\n private distanceThreshold: number\n\n /**\n * @internal\n */\n private contextWindow: PanSessionOptions[\"contextWindow\"] = window\n\n /**\n * Scroll positions of scrollable ancestors and window.\n * @internal\n */\n private scrollPositions: Map = new Map()\n\n /**\n * Cleanup function for scroll listeners.\n * @internal\n */\n private removeScrollListeners: (() => void) | null = null\n\n constructor(\n event: PointerEvent,\n handlers: Partial,\n {\n transformPagePoint,\n contextWindow = window,\n dragSnapToOrigin = false,\n distanceThreshold = 3,\n element,\n }: PanSessionOptions = {}\n ) {\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event)) return\n\n this.dragSnapToOrigin = dragSnapToOrigin\n this.handlers = handlers\n this.transformPagePoint = transformPagePoint\n this.distanceThreshold = distanceThreshold\n this.contextWindow = contextWindow || window\n\n const info = extractEventInfo(event)\n const initialInfo = transformPoint(info, this.transformPagePoint)\n const { point } = initialInfo\n\n const { timestamp } = frameData\n\n this.history = [{ ...point, timestamp }]\n\n const { onSessionStart } = handlers\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history))\n\n this.removeListeners = pipe(\n addPointerEvent(\n this.contextWindow,\n \"pointermove\",\n this.handlePointerMove\n ),\n addPointerEvent(\n this.contextWindow,\n \"pointerup\",\n this.handlePointerUp\n ),\n addPointerEvent(\n this.contextWindow,\n \"pointercancel\",\n this.handlePointerUp\n )\n )\n\n // Start scroll tracking if element provided\n if (element) {\n this.startScrollTracking(element)\n }\n }\n\n /**\n * Start tracking scroll on ancestors and window.\n */\n private startScrollTracking(element: HTMLElement): void {\n // Store initial scroll positions for scrollable ancestors\n let current = element.parentElement\n while (current) {\n const style = getComputedStyle(current)\n if (\n overflowStyles.has(style.overflowX) ||\n overflowStyles.has(style.overflowY)\n ) {\n this.scrollPositions.set(current, {\n x: current.scrollLeft,\n y: current.scrollTop,\n })\n }\n current = current.parentElement\n }\n\n // Track window scroll\n this.scrollPositions.set(window, {\n x: window.scrollX,\n y: window.scrollY,\n })\n\n // Capture listener catches element scroll events as they bubble\n window.addEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n })\n\n // Direct window scroll listener (window scroll doesn't bubble)\n window.addEventListener(\"scroll\", this.onWindowScroll)\n\n this.removeScrollListeners = () => {\n window.removeEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n })\n window.removeEventListener(\"scroll\", this.onWindowScroll)\n }\n }\n\n private onElementScroll = (event: Event): void => {\n this.handleScroll(event.target as Element)\n }\n\n private onWindowScroll = (): void => {\n this.handleScroll(window)\n }\n\n /**\n * Handle scroll compensation during drag.\n *\n * For element scroll: adjusts history origin since pageX/pageY doesn't change.\n * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.\n */\n private handleScroll(target: Element | Window): void {\n const initial = this.scrollPositions.get(target)\n if (!initial) return\n\n const isWindow = target === window\n const current = isWindow\n ? { x: window.scrollX, y: window.scrollY }\n : {\n x: (target as Element).scrollLeft,\n y: (target as Element).scrollTop,\n }\n\n const delta = { x: current.x - initial.x, y: current.y - initial.y }\n if (delta.x === 0 && delta.y === 0) return\n\n if (isWindow) {\n // Window scroll: pageX/pageY changes, so update lastMoveEventInfo\n if (this.lastMoveEventInfo) {\n this.lastMoveEventInfo.point.x += delta.x\n this.lastMoveEventInfo.point.y += delta.y\n }\n } else {\n // Element scroll: pageX/pageY unchanged, so adjust history origin\n if (this.history.length > 0) {\n this.history[0].x -= delta.x\n this.history[0].y -= delta.y\n }\n }\n\n this.scrollPositions.set(target, current)\n frame.update(this.updatePoint, true)\n }\n\n private updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return\n\n // Re-transform raw point through current transformPagePoint so\n // animated parent transforms (e.g. rotation) are picked up each frame\n if (this.lastRawMoveEventInfo) {\n this.lastMoveEventInfo = transformPoint(\n this.lastRawMoveEventInfo,\n this.transformPagePoint\n )\n }\n\n const info = getPanInfo(this.lastMoveEventInfo, this.history)\n const isPanStarted = this.startEvent !== null\n\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursor.\n const isDistancePastThreshold =\n distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold\n\n if (!isPanStarted && !isDistancePastThreshold) return\n\n const { point } = info\n const { timestamp } = frameData\n this.history.push({ ...point, timestamp })\n\n const { onStart, onMove } = this.handlers\n\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info)\n this.startEvent = this.lastMoveEvent\n }\n\n onMove && onMove(this.lastMoveEvent, info)\n }\n\n private handlePointerMove = (event: PointerEvent, info: EventInfo) => {\n this.lastMoveEvent = event\n this.lastRawMoveEventInfo = info\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint)\n\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true)\n }\n\n private handlePointerUp = (event: PointerEvent, info: EventInfo) => {\n this.end()\n\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers\n\n // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked)\n // This ensures constraint animations continue when interrupted by a click\n if (this.dragSnapToOrigin || !this.startEvent) {\n resumeAnimation && resumeAnimation()\n }\n if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return\n\n const panInfo = getPanInfo(\n event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint),\n this.history\n )\n\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo)\n }\n\n onSessionEnd && onSessionEnd(event, panInfo)\n }\n\n updateHandlers(handlers: Partial) {\n this.handlers = handlers\n }\n\n end() {\n this.removeListeners && this.removeListeners()\n this.removeScrollListeners && this.removeScrollListeners()\n this.scrollPositions.clear()\n cancelFrame(this.updatePoint)\n }\n}\n\nfunction transformPoint(\n info: EventInfo,\n transformPagePoint?: (point: Point) => Point\n) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info\n}\n\nfunction subtractPoint(a: Point, b: Point): Point {\n return { x: a.x - b.x, y: a.y - b.y }\n}\n\nfunction getPanInfo({ point }: EventInfo, history: TimestampedPoint[]) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n }\n}\n\nfunction startDevicePoint(history: TimestampedPoint[]): TimestampedPoint {\n return history[0]\n}\n\nfunction lastDevicePoint(history: TimestampedPoint[]): TimestampedPoint {\n return history[history.length - 1]\n}\n\nfunction getVelocity(history: TimestampedPoint[], timeDelta: number): Point {\n if (history.length < 2) {\n return { x: 0, y: 0 }\n }\n\n let i = history.length - 1\n let timestampedPoint: TimestampedPoint | null = null\n const lastPoint = lastDevicePoint(history)\n while (i >= 0) {\n timestampedPoint = history[i]\n if (\n lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)\n ) {\n break\n }\n i--\n }\n\n if (!timestampedPoint) {\n return { x: 0, y: 0 }\n }\n\n /**\n * If the selected point is the pointer-down origin (history[0]),\n * there are better movement points available, and the time gap\n * is suspiciously large (>2x timeDelta), use the next point instead.\n * This prevents stale pointer-down points from diluting velocity\n * in hold-then-flick gestures.\n */\n if (\n timestampedPoint === history[0] &&\n history.length > 2 &&\n lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta) * 2\n ) {\n timestampedPoint = history[1]\n }\n\n const time = millisecondsToSeconds(\n lastPoint.timestamp - timestampedPoint.timestamp\n )\n if (time === 0) {\n return { x: 0, y: 0 }\n }\n\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n }\n\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0\n }\n\n return currentVelocity\n}\n"],"names":[],"mappings":";;;;;;AAuCA,MAAM,cAAc,iBAAiB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAEhE;;AAEG;MACU,UAAU,CAAA;IA0EnB,WAAA,CACI,KAAmB,EACnB,QAAqC,EACrC,EACI,kBAAkB,EAClB,aAAa,GAAG,MAAM,EACtB,gBAAgB,GAAG,KAAK,EACxB,iBAAiB,GAAG,CAAC,EACrB,OAAO,GAAA,GACY,EAAE,EAAA;AA7E7B;;AAEG;QACK,IAAA,CAAA,UAAU,GAAwB,IAAI;AAE9C;;AAEG;QACK,IAAA,CAAA,aAAa,GAAwB,IAAI;AAEjD;;AAEG;QACK,IAAA,CAAA,iBAAiB,GAAqB,IAAI;AAElD;;;;AAIG;QACK,IAAA,CAAA,oBAAoB,GAAqB,IAAI;AAOrD;;A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EAAE,CAAC,SAAS,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,IAAI,IAAI;KAC/C;AAED,IAAA,IAAI,eAAe,CAAC,CAAC,KAAK,QAAQ,EAAE;AAChC,QAAA,eAAe,CAAC,CAAC,GAAG,CAAC;IACzB;AACA,IAAA,IAAI,eAAe,CAAC,CAAC,KAAK,QAAQ,EAAE;AAChC,QAAA,eAAe,CAAC,CAAC,GAAG,CAAC;IACzB;AAEA,IAAA,OAAO,eAAe;AAC1B;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/index.mjs deleted file mode 100644 index e0b1c17d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/index.mjs +++ /dev/null @@ -1,50 +0,0 @@ -import { Feature, frame } from 'motion-dom'; -import { noop } from 'motion-utils'; -import { addPointerEvent } from '../../events/add-pointer-event.mjs'; -import { getContextWindow } from '../../utils/get-context-window.mjs'; -import { PanSession } from './PanSession.mjs'; - -const asyncHandler = (handler) => (event, info) => { - if (handler) { - frame.update(() => handler(event, info), false, true); - } -}; -class PanGesture extends Feature { - constructor() { - super(...arguments); - this.removePointerDownListener = noop; - } - onPointerDown(pointerDownEvent) { - this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), { - transformPagePoint: this.node.getTransformPagePoint(), - contextWindow: getContextWindow(this.node), - }); - } - createPanHandlers() { - const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps(); - return { - onSessionStart: asyncHandler(onPanSessionStart), - onStart: asyncHandler(onPanStart), - onMove: asyncHandler(onPan), - onEnd: (event, info) => { - delete this.session; - if (onPanEnd) { - frame.postRender(() => onPanEnd(event, info)); - } - }, - }; - } - mount() { - this.removePointerDownListener = addPointerEvent(this.node.current, "pointerdown", (event) => this.onPointerDown(event)); - } - update() { - this.session && this.session.updateHandlers(this.createPanHandlers()); - } - unmount() { - this.removePointerDownListener(); - this.session && this.session.end(); - } -} - -export { PanGesture }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.map deleted file mode 100644 index cd1cdc0e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/gestures/pan/index.ts"],"sourcesContent":["import { Feature, frame, type PanInfo } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { addPointerEvent } from \"../../events/add-pointer-event\"\nimport { getContextWindow } from \"../../utils/get-context-window\"\nimport { PanSession } from \"./PanSession\"\n\ntype PanEventHandler = (event: PointerEvent, info: PanInfo) => void\nconst asyncHandler =\n (handler?: PanEventHandler) => (event: PointerEvent, info: PanInfo) => {\n if (handler) {\n frame.update(() => handler(event, info), false, true)\n }\n }\n\nexport class PanGesture extends Feature {\n private session?: PanSession\n\n private removePointerDownListener: Function = noop\n\n onPointerDown(pointerDownEvent: PointerEvent) {\n this.session = new PanSession(\n pointerDownEvent,\n this.createPanHandlers(),\n {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n }\n )\n }\n\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } =\n this.node.getProps()\n\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: asyncHandler(onPan),\n onEnd: (event: PointerEvent, info: PanInfo) => {\n delete this.session\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info))\n }\n },\n }\n }\n\n mount() {\n this.removePointerDownListener = addPointerEvent(\n this.node.current!,\n \"pointerdown\",\n (event: PointerEvent) => this.onPointerDown(event)\n )\n }\n\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers())\n }\n\n unmount() {\n this.removePointerDownListener()\n this.session && this.session.end()\n }\n}\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,YAAY,GACd,CAAC,OAAyB,KAAK,CAAC,KAAmB,EAAE,IAAa,KAAI;IAClE,IAAI,OAAO,EAAE;AACT,QAAA,KAAK,CAAC,MAAM,CAAC,MAAM,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC;IACzD;AACJ,CAAC;AAEC,MAAO,UAAW,SAAQ,OAAgB,CAAA;AAAhD,IAAA,WAAA,GAAA;;QAGY,IAAA,CAAA,yBAAyB,GAAa,IAAI;IA8CtD;AA5CI,IAAA,aAAa,CAAC,gBAA8B,EAAA;AACxC,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,UAAU,CACzB,gBAAgB,EAChB,IAAI,CAAC,iBAAiB,EAAE,EACxB;AACI,YAAA,kBAAkB,EAAE,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE;AACrD,YAAA,aAAa,EAAE,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;AAC7C,SAAA,CACJ;IACL;IAEA,iBAAiB,GAAA;AACb,QAAA,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,GACpD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;QAExB,OAAO;AACH,YAAA,cAAc,EAAE,YAAY,CAAC,iBAAiB,CAAC;AAC/C,YAAA,OAAO,EAAE,YAAY,CAAC,UAAU,CAAC;AACjC,YAAA,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC;AAC3B,YAAA,KAAK,EAAE,CAAC,KAAmB,EAAE,IAAa,KAAI;gBAC1C,OAAO,IAAI,CAAC,OAAO;gBACnB,IAAI,QAAQ,EAAE;AACV,oBAAA,KAAK,CAAC,UAAU,CAAC,MAAM,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBACjD;YACJ,CAAC;SACJ;IACL;IAEA,KAAK,GAAA;QACD,IAAI,CAAC,yBAAyB,GAAG,eAAe,CAC5C,IAAI,CAAC,IAAI,CAAC,OAAQ,EAClB,aAAa,EACb,CAAC,KAAmB,KAAK,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CACrD;IACL;IAEA,MAAM,GAAA;AACF,QAAA,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzE;IAEA,OAAO,GAAA;QACH,IAAI,CAAC,yBAAyB,EAAE;QAChC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;IACtC;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/press.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/press.mjs deleted file mode 100644 index 45b99a2e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/press.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import { Feature, press, frame } from 'motion-dom'; -import { extractEventInfo } from '../events/event-info.mjs'; - -function handlePressEvent(node, event, lifecycle) { - const { props } = node; - if (node.current instanceof HTMLButtonElement && node.current.disabled) { - return; - } - if (node.animationState && props.whileTap) { - node.animationState.setActive("whileTap", lifecycle === "Start"); - } - const eventName = ("onTap" + (lifecycle === "End" ? "" : lifecycle)); - const callback = props[eventName]; - if (callback) { - frame.postRender(() => callback(event, extractEventInfo(event))); - } -} -class PressGesture extends Feature { - mount() { - const { current } = this.node; - if (!current) - return; - const { globalTapTarget, propagate } = this.node.props; - this.unmount = press(current, (_element, startEvent) => { - handlePressEvent(this.node, startEvent, "Start"); - return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? "End" : "Cancel"); - }, { - useGlobalTarget: globalTapTarget, - stopPropagation: propagate?.tap === false, - }); - } - unmount() { } -} - -export { PressGesture }; -//# sourceMappingURL=press.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/press.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/press.mjs.map deleted file mode 100644 index 9719e260..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/gestures/press.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"press.mjs","sources":["../../../src/gestures/press.ts"],"sourcesContent":["import { Feature, frame, press, type VisualElement } from \"motion-dom\"\nimport { extractEventInfo } from \"../events/event-info\"\n\nfunction handlePressEvent(\n node: VisualElement,\n event: PointerEvent,\n lifecycle: \"Start\" | \"End\" | \"Cancel\"\n) {\n const { props } = node\n\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return\n }\n\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\")\n }\n\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle)) as\n | \"onTapStart\"\n | \"onTap\"\n | \"onTapCancel\"\n\n const callback = props[eventName]\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)))\n }\n}\n\nexport class PressGesture extends Feature {\n mount() {\n const { current } = this.node\n if (!current) return\n\n const { globalTapTarget, propagate } = this.node.props\n\n this.unmount = press(\n current,\n (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\")\n\n return (endEvent, { success }) =>\n handlePressEvent(\n this.node,\n endEvent,\n success ? \"End\" : \"Cancel\"\n )\n },\n {\n useGlobalTarget: globalTapTarget,\n stopPropagation: propagate?.tap === false,\n }\n )\n }\n\n unmount() {}\n}\n"],"names":[],"mappings":";;;AAGA,SAAS,gBAAgB,CACrB,IAA4B,EAC5B,KAAmB,EACnB,SAAqC,EAAA;AAErC,IAAA,MAAM,EAAE,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;IACL;AAEA,IAAA,OAAO,KAAI;AACd;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/index.mjs deleted file mode 100644 index 94ee439e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/index.mjs +++ /dev/null @@ -1,79 +0,0 @@ -export { AnimatePresence } from './components/AnimatePresence/index.mjs'; -export { PopChild } from './components/AnimatePresence/PopChild.mjs'; -export { PresenceChild } from './components/AnimatePresence/PresenceChild.mjs'; -export { LayoutGroup } from './components/LayoutGroup/index.mjs'; -export { LazyMotion } from './components/LazyMotion/index.mjs'; -export { MotionConfig } from './components/MotionConfig/index.mjs'; -export { m } from './render/components/m/proxy.mjs'; -export { motion } from './render/components/motion/proxy.mjs'; -export { addPointerEvent } from './events/add-pointer-event.mjs'; -export { addPointerInfo } from './events/event-info.mjs'; -export { animations } from './motion/features/animations.mjs'; -export { makeUseVisualState } from './motion/utils/use-visual-state.mjs'; -export * from 'motion-dom'; -export { VisualElement, addScaleCorrector, animateVisualElement, arc, buildTransform, calcLength, createBox, delay, optimizedAppearDataAttribute, resolveMotionValue, visualElementStore } from 'motion-dom'; -export { filterProps } from './render/dom/utils/filter-props.mjs'; -export { isBrowser } from './utils/is-browser.mjs'; -export { useComposedRefs } from './utils/use-composed-ref.mjs'; -export { useForceUpdate } from './utils/use-force-update.mjs'; -export { useIsomorphicLayoutEffect } from './utils/use-isomorphic-effect.mjs'; -export { useUnmountEffect } from './utils/use-unmount-effect.mjs'; -export { domAnimation } from './render/dom/features-animation.mjs'; -export { domMax } from './render/dom/features-max.mjs'; -export { domMin } from './render/dom/features-min.mjs'; -export { useMotionValueEvent } from './utils/use-motion-value-event.mjs'; -export { useElementScroll } from './value/scroll/use-element-scroll.mjs'; -export { useViewportScroll } from './value/scroll/use-viewport-scroll.mjs'; -export { useMotionTemplate } from './value/use-motion-template.mjs'; -export { useMotionValue } from './value/use-motion-value.mjs'; -export { useScroll } from './value/use-scroll.mjs'; -export { useFollowValue } from './value/use-follow-value.mjs'; -export { useSpring } from './value/use-spring.mjs'; -export { useTime } from './value/use-time.mjs'; -export { useTransform } from './value/use-transform.mjs'; -export { useVelocity } from './value/use-velocity.mjs'; -export { useWillChange } from './value/use-will-change/index.mjs'; -export { WillChangeMotionValue } from './value/use-will-change/WillChangeMotionValue.mjs'; -export { useReducedMotion } from './utils/reduced-motion/use-reduced-motion.mjs'; -export { useReducedMotionConfig } from './utils/reduced-motion/use-reduced-motion-config.mjs'; -export * from 'motion-utils'; -export { MotionGlobalConfig } from 'motion-utils'; -export { animationControls } from './animation/hooks/animation-controls.mjs'; -export { useAnimate } from './animation/hooks/use-animate.mjs'; -export { useAnimateMini } from './animation/hooks/use-animate-style.mjs'; -export { useAnimation, useAnimationControls } from './animation/hooks/use-animation.mjs'; -export { useIsPresent, usePresence } from './components/AnimatePresence/use-presence.mjs'; -export { usePresenceData } from './components/AnimatePresence/use-presence-data.mjs'; -export { useDomEvent } from './events/use-dom-event.mjs'; -export { DragControls, useDragControls } from './gestures/drag/use-drag-controls.mjs'; -export { isMotionComponent } from './motion/utils/is-motion-component.mjs'; -export { unwrapMotionComponent } from './motion/utils/unwrap-motion-component.mjs'; -export { isValidMotionProp } from './motion/utils/valid-prop.mjs'; -export { useInstantLayoutTransition } from './projection/use-instant-layout-transition.mjs'; -export { useResetProjection } from './projection/use-reset-projection.mjs'; -export { useAnimationFrame } from './utils/use-animation-frame.mjs'; -export { useCycle } from './utils/use-cycle.mjs'; -export { useInView } from './utils/use-in-view.mjs'; -export { disableInstantTransitions, useInstantTransition } from './utils/use-instant-transition.mjs'; -export { usePageInView } from './utils/use-page-in-view.mjs'; -export { transformViewBoxPoint } from './utils/transform-viewbox-point.mjs'; -export { correctParentTransform } from './utils/transform-rotated-parent.mjs'; -export { startOptimizedAppearAnimation } from './animation/optimized-appear/start.mjs'; -export { LayoutGroupContext } from './context/LayoutGroupContext.mjs'; -export { MotionConfigContext } from './context/MotionConfigContext.mjs'; -export { MotionContext } from './context/MotionContext/index.mjs'; -export { PresenceContext } from './context/PresenceContext.mjs'; -export { SwitchLayoutGroupContext } from './context/SwitchLayoutGroupContext.mjs'; -export { useAnimatedState as useDeprecatedAnimatedState } from './animation/hooks/use-animated-state.mjs'; -export { AnimateSharedLayout } from './components/AnimateSharedLayout.mjs'; -export { DeprecatedLayoutGroupContext } from './context/DeprecatedLayoutGroupContext.mjs'; -export { useInvertedScale as useDeprecatedInvertedScale } from './value/use-inverted-scale.mjs'; -import * as namespace from './components/Reorder/namespace.mjs'; -export { namespace as Reorder }; -export { animate, createScopedAnimate } from './animation/animate/index.mjs'; -export { animateMini } from './animation/animators/waapi/animate-style.mjs'; -export { distance, distance2D } from './utils/distance.mjs'; -export { inView } from './render/dom/viewport/index.mjs'; -export { scroll } from './render/dom/scroll/index.mjs'; -export { scrollInfo } from './render/dom/scroll/track.mjs'; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/index.mjs.map deleted file mode 100644 index b28b6402..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/m.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/m.mjs deleted file mode 100644 index 2539355e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/m.mjs +++ /dev/null @@ -1,3 +0,0 @@ -export { MotionA as a, MotionAbbr as abbr, MotionAddress as address, MotionAnimate as animate, MotionArea as area, MotionArticle as article, MotionAside as aside, MotionAudio as audio, MotionB as b, MotionBase as base, MotionBdi as bdi, MotionBdo as bdo, MotionBig as big, MotionBlockquote as blockquote, MotionBody as body, MotionButton as button, MotionCanvas as canvas, MotionCaption as caption, MotionCircle as circle, MotionCite as cite, MotionClipPath as clipPath, MotionCode as code, MotionCol as col, MotionColgroup as colgroup, MotionData as data, MotionDatalist as datalist, MotionDd as dd, MotionDefs as defs, MotionDel as del, MotionDesc as desc, MotionDetails as details, MotionDfn as dfn, MotionDialog as dialog, MotionDiv as div, MotionDl as dl, MotionDt as dt, MotionEllipse as ellipse, MotionEm as em, MotionEmbed as embed, MotionFeBlend as feBlend, MotionFeColorMatrix as feColorMatrix, MotionFeComponentTransfer as feComponentTransfer, MotionFeComposite as feComposite, MotionFeConvolveMatrix as feConvolveMatrix, MotionFeDiffuseLighting as feDiffuseLighting, MotionFeDisplacementMap as feDisplacementMap, MotionFeDistantLight as feDistantLight, MotionFeDropShadow as feDropShadow, MotionFeFlood as feFlood, MotionFeFuncA as feFuncA, MotionFeFuncB as feFuncB, MotionFeFuncG as feFuncG, MotionFeFuncR as feFuncR, MotionFeGaussianBlur as feGaussianBlur, MotionFeImage as feImage, MotionFeMerge as feMerge, MotionFeMergeNode as feMergeNode, MotionFeMorphology as feMorphology, MotionFeOffset as feOffset, MotionFePointLight as fePointLight, MotionFeSpecularLighting as feSpecularLighting, MotionFeSpotLight as feSpotLight, MotionFeTile as feTile, MotionFeTurbulence as feTurbulence, MotionFieldset as fieldset, MotionFigcaption as figcaption, MotionFigure as figure, MotionFilter as filter, MotionFooter as footer, MotionForeignObject as foreignObject, MotionForm as form, MotionG as g, MotionH1 as h1, MotionH2 as h2, MotionH3 as h3, MotionH4 as h4, MotionH5 as h5, MotionH6 as h6, MotionHead as head, MotionHeader as header, MotionHgroup as hgroup, MotionHr as hr, MotionHtml as html, MotionI as i, MotionIframe as iframe, MotionImage as image, MotionImg as img, MotionInput as input, MotionIns as ins, MotionKbd as kbd, MotionKeygen as keygen, MotionLabel as label, MotionLegend as legend, MotionLi as li, MotionLine as line, MotionLinearGradient as linearGradient, MotionLink as link, MotionMain as main, MotionMap as map, MotionMark as mark, MotionMarker as marker, MotionMask as mask, MotionMenu as menu, MotionMenuitem as menuitem, MotionMetadata as metadata, MotionMeter as meter, MotionNav as nav, MotionObject as object, MotionOl as ol, MotionOptgroup as optgroup, MotionOption as option, MotionOutput as output, MotionP as p, MotionParam as param, MotionPath as path, MotionPattern as pattern, MotionPicture as picture, MotionPolygon as polygon, MotionPolyline as polyline, MotionPre as pre, MotionProgress as progress, MotionQ as q, MotionRadialGradient as radialGradient, MotionRect as rect, MotionRp as rp, MotionRt as rt, MotionRuby as ruby, MotionS as s, MotionSamp as samp, MotionScript as script, MotionSection as section, MotionSelect as select, MotionSmall as small, MotionSource as source, MotionSpan as span, MotionStop as stop, MotionStrong as strong, MotionStyle as style, MotionSub as sub, MotionSummary as summary, MotionSup as sup, MotionSvg as svg, MotionSymbol as symbol, MotionTable as table, MotionTbody as tbody, MotionTd as td, MotionText as text, MotionTextPath as textPath, MotionTextarea as textarea, MotionTfoot as tfoot, MotionTh as th, MotionThead as thead, MotionTime as time, MotionTitle as title, MotionTr as tr, MotionTrack as track, MotionTspan as tspan, MotionU as u, MotionUl as ul, MotionUse as use, MotionVideo as video, MotionView as view, MotionWbr as wbr, MotionWebview as webview } from './render/components/m/elements.mjs'; -export { createMinimalMotionComponent as create } from './render/components/m/create.mjs'; -//# sourceMappingURL=m.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/m.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/m.mjs.map deleted file mode 100644 index af0ce5df..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/m.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"m.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/mini.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/mini.mjs deleted file mode 100644 index b620a1fc..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/mini.mjs +++ /dev/null @@ -1,2 +0,0 @@ -export { useAnimateMini as useAnimate } from './animation/hooks/use-animate-style.mjs'; -//# sourceMappingURL=mini.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/mini.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/mini.mjs.map deleted file mode 100644 index d146aa01..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/mini.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mini.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs deleted file mode 100644 index 2519f77b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs +++ /dev/null @@ -1,70 +0,0 @@ -import { Feature, resolveVariant } from 'motion-dom'; - -let id = 0; -class ExitAnimationFeature extends Feature { - constructor() { - super(...arguments); - this.id = id++; - this.isExitComplete = false; - } - update() { - if (!this.node.presenceContext) - return; - const { isPresent, onExitComplete } = this.node.presenceContext; - const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {}; - if (!this.node.animationState || isPresent === prevIsPresent) { - return; - } - if (isPresent && prevIsPresent === false) { - /** - * When re-entering, if the exit animation already completed - * (element is at rest), reset to initial values so the enter - * animation replays from the correct position. - */ - if (this.isExitComplete) { - const { initial, custom } = this.node.getProps(); - if (typeof initial === "string" || - (typeof initial === "object" && - initial !== null && - !Array.isArray(initial))) { - const resolved = resolveVariant(this.node, initial, custom); - if (resolved) { - const { transition, transitionEnd, ...target } = resolved; - for (const key in target) { - this.node - .getValue(key) - ?.jump(target[key]); - } - } - } - this.node.animationState.reset(); - this.node.animationState.animateChanges(); - } - else { - this.node.animationState.setActive("exit", false); - } - this.isExitComplete = false; - return; - } - const exitAnimation = this.node.animationState.setActive("exit", !isPresent); - if (onExitComplete && !isPresent) { - exitAnimation.then(() => { - this.isExitComplete = true; - onExitComplete(this.id); - }); - } - } - mount() { - const { register, onExitComplete } = this.node.presenceContext || {}; - if (onExitComplete) { - onExitComplete(this.id); - } - if (register) { - this.unmount = register(this.id); - } - } - unmount() { } -} - -export { ExitAnimationFeature }; -//# sourceMappingURL=exit.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.map deleted file mode 100644 index 7894c0ea..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exit.mjs","sources":["../../../../../src/motion/features/animation/exit.ts"],"sourcesContent":["import { Feature, resolveVariant } from \"motion-dom\"\n\nlet id = 0\n\nexport class ExitAnimationFeature extends Feature {\n private id: number = id++\n private isExitComplete = false\n\n update() {\n if (!this.node.presenceContext) return\n\n const { isPresent, onExitComplete } = this.node.presenceContext\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {}\n\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return\n }\n\n if (isPresent && prevIsPresent === false) {\n /**\n * When re-entering, if the exit animation already completed\n * (element is at rest), reset to initial values so the enter\n * animation replays from the correct position.\n */\n if (this.isExitComplete) {\n const { initial, custom } = this.node.getProps()\n\n if (\n typeof initial === \"string\" ||\n (typeof initial === \"object\" &&\n initial !== null &&\n !Array.isArray(initial))\n ) {\n const resolved = resolveVariant(\n this.node,\n initial,\n custom\n )\n if (resolved) {\n const { transition, transitionEnd, ...target } =\n resolved\n for (const key in target) {\n this.node\n .getValue(key)\n ?.jump(\n target[\n key as keyof typeof target\n ] as any\n )\n }\n }\n }\n\n this.node.animationState.reset()\n this.node.animationState.animateChanges()\n } else {\n this.node.animationState.setActive(\"exit\", false)\n }\n\n this.isExitComplete = false\n return\n }\n\n const exitAnimation = this.node.animationState.setActive(\n \"exit\",\n !isPresent\n )\n\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => {\n this.isExitComplete = true\n onExitComplete(this.id)\n })\n }\n }\n\n mount() {\n const { register, onExitComplete } = this.node.presenceContext || {}\n\n if (onExitComplete) {\n onExitComplete(this.id)\n }\n\n if (register) {\n this.unmount = register(this.id)\n }\n }\n\n unmount() {}\n}\n"],"names":[],"mappings":";;AAEA,IAAI,EAAE,GAAG,CAAC;AAEJ,MAAO,oBAAqB,SAAQ,OAAgB,CAAA;AAA1D,IAAA,WAAA,GAAA;;QACY,IAAA,CAAA,EAAE,GAAW,EAAE,EAAE;QACjB,IAAA,CAAA,cAAc,GAAG,KAAK;IAmFlC;IAjFI,MAAM,GAAA;AACF,QAAA,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe;YAAE;QAEhC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe;AAC/D,QAAA,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,IAAI,EAAE;QAExE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,SAAS,KAAK,aAAa,EAAE;YAC1D;QACJ;AAEA,QAAA,IAAI,SAAS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BAAA,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;AAC3B,YAAA,CAAC,CAAC;QACN;IACJ;IAEA,KAAK,GAAA;AACD,QAAA,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,EAAE;QAEpE,IAAI,cAAc,EAAE;AAChB,YAAA,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3B;QAEA,IAAI,QAAQ,EAAE;YACV,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC;IACJ;AAEA,IAAA,OAAO,KAAI;AACd;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs deleted file mode 100644 index be9a9ec0..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs +++ /dev/null @@ -1,39 +0,0 @@ -import { Feature, createAnimationState, isAnimationControls } from 'motion-dom'; - -class AnimationFeature extends Feature { - /** - * We dynamically generate the AnimationState manager as it contains a reference - * to the underlying animation library. We only want to load that if we load this, - * so people can optionally code split it out using the `m` component. - */ - constructor(node) { - super(node); - node.animationState || (node.animationState = createAnimationState(node)); - } - updateAnimationControlsSubscription() { - const { animate } = this.node.getProps(); - if (isAnimationControls(animate)) { - this.unmountControls = animate.subscribe(this.node); - } - } - /** - * Subscribe any provided AnimationControls to the component's VisualElement - */ - mount() { - this.updateAnimationControlsSubscription(); - } - update() { - const { animate } = this.node.getProps(); - const { animate: prevAnimate } = this.node.prevProps || {}; - if (animate !== prevAnimate) { - this.updateAnimationControlsSubscription(); - } - } - unmount() { - this.node.animationState.reset(); - this.unmountControls?.(); - } -} - -export { AnimationFeature }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.map deleted file mode 100644 index e4623fcb..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../../src/motion/features/animation/index.ts"],"sourcesContent":["import {\n createAnimationState,\n Feature,\n isAnimationControls,\n type VisualElement,\n} from \"motion-dom\"\n\nexport class AnimationFeature extends Feature {\n unmountControls?: () => void\n\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node: VisualElement) {\n super(node)\n node.animationState ||= createAnimationState(node)\n }\n\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps()\n if (isAnimationControls(animate)) {\n this.unmountControls = animate.subscribe(this.node)\n }\n }\n\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription()\n }\n\n update() {\n const { animate } = this.node.getProps()\n const { animate: prevAnimate } = this.node.prevProps || {}\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription()\n }\n }\n\n unmount() {\n this.node.animationState!.reset()\n this.unmountControls?.()\n }\n}\n"],"names":[],"mappings":";;AAOM,MAAO,gBAAiB,SAAQ,OAAgB,CAAA;AAGlD;;;;AAIG;AACH,IAAA,WAAA,CAAY,IAAmB,EAAA;QAC3B,KAAK,CAAC,IAAI,CAAC;QACX,IAAI,CAAC,cAAc,KAAnB,IAAI,CAAC,cAAc,GAAK,oBAAoB,CAAC,IAAI,CAAC,CAAA;IACtD;IAEA,mCAAmC,GAAA;QAC/B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AACxC,QAAA,IAAI,mBAAmB,CAAC,OAAO,CAAC,EAAE;YAC9B,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;QACvD;IACJ;AAEA;;AAEG;IACH,KAAK,GAAA;QACD,IAAI,CAAC,mCAAmC,EAAE;IAC9C;IAEA,MAAM,GAAA;QACF,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AACxC,QAAA,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE;AAC1D,QAAA,IAAI,OAAO,KAAK,WAAW,EAAE;YACzB,IAAI,CAAC,mCAAmC,EAAE;QAC9C;IACJ;IAEA,OAAO,GAAA;AACH,QAAA,IAAI,CAAC,IAAI,CAAC,cAAe,CAAC,KAAK,EAAE;AACjC,QAAA,IAAI,CAAC,eAAe,IAAI;IAC5B;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animations.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animations.mjs deleted file mode 100644 index 0746a484..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animations.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { AnimationFeature } from './animation/index.mjs'; -import { ExitAnimationFeature } from './animation/exit.mjs'; - -const animations = { - animation: { - Feature: AnimationFeature, - }, - exit: { - Feature: ExitAnimationFeature, - }, -}; - -export { animations }; -//# sourceMappingURL=animations.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animations.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animations.mjs.map deleted file mode 100644 index 8476c44e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/animations.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animations.mjs","sources":["../../../../src/motion/features/animations.ts"],"sourcesContent":["import { AnimationFeature } from \"./animation\"\nimport { ExitAnimationFeature } from \"./animation/exit\"\nimport { FeaturePackages } from \"./types\"\n\nexport const animations: FeaturePackages = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,UAAU,GAAoB;AACvC,IAAA,SAAS,EAAE;AACP,QAAA,OAAO,EAAE,gBAAgB;AAC5B,KAAA;AACD,IAAA,IAAI,EAAE;AACF,QAAA,OAAO,EAAE,oBAAoB;AAChC,KAAA;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/definitions.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/definitions.mjs deleted file mode 100644 index e3293b6b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/definitions.mjs +++ /dev/null @@ -1,49 +0,0 @@ -import { getFeatureDefinitions, setFeatureDefinitions } from 'motion-dom'; - -const featureProps = { - animation: [ - "animate", - "variants", - "whileHover", - "whileTap", - "exit", - "whileInView", - "whileFocus", - "whileDrag", - ], - exit: ["exit"], - drag: ["drag", "dragControls"], - focus: ["whileFocus"], - hover: ["whileHover", "onHoverStart", "onHoverEnd"], - tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"], - pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"], - inView: ["whileInView", "onViewportEnter", "onViewportLeave"], - layout: ["layout", "layoutId"], -}; -let isInitialized = false; -/** - * Initialize feature definitions with isEnabled checks. - * This must be called before any motion components are rendered. - */ -function initFeatureDefinitions() { - if (isInitialized) - return; - const initialFeatureDefinitions = {}; - for (const key in featureProps) { - initialFeatureDefinitions[key] = { - isEnabled: (props) => featureProps[key].some((name) => !!props[name]), - }; - } - setFeatureDefinitions(initialFeatureDefinitions); - isInitialized = true; -} -/** - * Get the current feature definitions, initializing if needed. - */ -function getInitializedFeatureDefinitions() { - initFeatureDefinitions(); - return getFeatureDefinitions(); -} - -export { getInitializedFeatureDefinitions, initFeatureDefinitions }; -//# sourceMappingURL=definitions.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.map deleted file mode 100644 index 1cfc05c8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"definitions.mjs","sources":["../../../../src/motion/features/definitions.ts"],"sourcesContent":["import { getFeatureDefinitions, setFeatureDefinitions } from \"motion-dom\"\nimport { MotionProps } from \"../types\"\nimport { FeatureDefinitions } from \"./types\"\n\nconst featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n}\n\nlet isInitialized = false\n\n/**\n * Initialize feature definitions with isEnabled checks.\n * This must be called before any motion components are rendered.\n */\nexport function initFeatureDefinitions() {\n if (isInitialized) return\n\n const initialFeatureDefinitions: Partial = {}\n\n for (const key in featureProps) {\n initialFeatureDefinitions[\n key as keyof typeof initialFeatureDefinitions\n ] = {\n isEnabled: (props: MotionProps) =>\n featureProps[key as keyof typeof featureProps].some(\n (name: string) => !!props[name as keyof typeof props]\n ),\n }\n }\n\n setFeatureDefinitions(initialFeatureDefinitions)\n isInitialized = true\n}\n\n/**\n * Get the current feature definitions, initializing if needed.\n */\nexport function getInitializedFeatureDefinitions(): Partial {\n initFeatureDefinitions()\n return getFeatureDefinitions()\n}\n"],"names":[],"mappings":";;AAIA,MAAM,YAAY,GAAG;AACjB,IAAA,SAAS,EAAE;QACP,SAAS;QACT,UAAU;QACV,YAAY;QACZ,UAAU;QACV,MAAM;QACN,aAAa;QACb,YAAY;QACZ,WAAW;AACd,KAAA;IACD,IAAI,EAAE,CAAC,MAAM,CAAC;AACd,IAAA,IAAI,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC;IAC9B,KAAK,EAAE,CAAC,YAAY,CAAC;AACrB,IAAA,KAAK,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,YAAY,CAAC;IACnD,GAAG,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,CAAC;IACvD,GAAG,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,CAAC;AAC7D,IAAA,MAAM,EAAE,CAAC,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;AAC7D,IAAA,MAAM,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;CACjC;AAED,IAAI,aAAa,GAAG,KAAK;AAEzB;;;AAGG;SACa,sBAAsB,GAAA;AAClC,IAAA,IAAI,aAAa;QAAE;IAEnB,MAAM,yBAAyB,GAAgC,EAAE;AAEjE,IAAA,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE;QAC5B,yBAAyB,CACrB,GAA6C,CAChD,GAAG;YACA,SAAS,EAAE,CAAC,KAAkB,KAC1B,YAAY,CAAC,GAAgC,CAAC,CAAC,IAAI,CAC/C,CAAC,IAAY,KAAK,CAAC,CAAC,KAAK,CAAC,IAA0B,CAAC,CACxD;SACR;IACL;IAEA,qBAAqB,CAAC,yBAAyB,CAAC;IAChD,aAAa,GAAG,IAAI;AACxB;AAEA;;AAEG;SACa,gCAAgC,GAAA;AAC5C,IAAA,sBAAsB,EAAE;IACxB,OAAO,qBAAqB,EAAE;AAClC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/drag.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/drag.mjs deleted file mode 100644 index 78524527..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/drag.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import { DragGesture } from '../../gestures/drag/index.mjs'; -import { PanGesture } from '../../gestures/pan/index.mjs'; -import { MeasureLayout } from './layout/MeasureLayout.mjs'; -import { HTMLProjectionNode } from 'motion-dom'; - -const drag = { - pan: { - Feature: PanGesture, - }, - drag: { - Feature: DragGesture, - ProjectionNode: HTMLProjectionNode, - MeasureLayout, - }, -}; - -export { drag }; -//# sourceMappingURL=drag.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/drag.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/drag.mjs.map deleted file mode 100644 index ee98308f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/drag.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"drag.mjs","sources":["../../../../src/motion/features/drag.ts"],"sourcesContent":["import { DragGesture } from \"../../gestures/drag\"\nimport { PanGesture } from \"../../gestures/pan\"\nimport { HTMLProjectionNode } from \"../../projection\"\nimport { MeasureLayout } from \"./layout/MeasureLayout\"\nimport { FeaturePackages } from \"./types\"\n\nexport const drag: FeaturePackages = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n}\n"],"names":[],"mappings":";;;;;AAMO,MAAM,IAAI,GAAoB;AACjC,IAAA,GAAG,EAAE;AACD,QAAA,OAAO,EAAE,UAAU;AACtB,KAAA;AACD,IAAA,IAAI,EAAE;AACF,QAAA,OAAO,EAAE,WAAW;AACpB,QAAA,cAAc,EAAE,kBAAkB;QAClC,aAAa;AAChB,KAAA;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/gestures.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/gestures.mjs deleted file mode 100644 index e7708ccd..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/gestures.mjs +++ /dev/null @@ -1,22 +0,0 @@ -import { HoverGesture } from '../../gestures/hover.mjs'; -import { FocusGesture } from '../../gestures/focus.mjs'; -import { PressGesture } from '../../gestures/press.mjs'; -import { InViewFeature } from './viewport/index.mjs'; - -const gestureAnimations = { - inView: { - Feature: InViewFeature, - }, - tap: { - Feature: PressGesture, - }, - focus: { - Feature: FocusGesture, - }, - hover: { - Feature: HoverGesture, - }, -}; - -export { gestureAnimations }; -//# sourceMappingURL=gestures.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/gestures.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/gestures.mjs.map deleted file mode 100644 index 4a554e7a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/gestures.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gestures.mjs","sources":["../../../../src/motion/features/gestures.ts"],"sourcesContent":["import { HoverGesture } from \"../../gestures/hover\"\nimport { FocusGesture } from \"../../gestures/focus\"\nimport { PressGesture } from \"../../gestures/press\"\nimport { InViewFeature } from \"./viewport\"\nimport { FeaturePackages } from \"./types\"\n\nexport const gestureAnimations: FeaturePackages = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n}\n"],"names":[],"mappings":";;;;;AAMO,MAAM,iBAAiB,GAAoB;AAC9C,IAAA,MAAM,EAAE;AACJ,QAAA,OAAO,EAAE,aAAa;AACzB,KAAA;AACD,IAAA,GAAG,EAAE;AACD,QAAA,OAAO,EAAE,YAAY;AACxB,KAAA;AACD,IAAA,KAAK,EAAE;AACH,QAAA,OAAO,EAAE,YAAY;AACxB,KAAA;AACD,IAAA,KAAK,EAAE;AACH,QAAA,OAAO,EAAE,YAAY;AACxB,KAAA;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout.mjs deleted file mode 100644 index 6ba67db7..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import { HTMLProjectionNode } from 'motion-dom'; -import { MeasureLayout } from './layout/MeasureLayout.mjs'; - -const layout = { - layout: { - ProjectionNode: HTMLProjectionNode, - MeasureLayout, - }, -}; - -export { layout }; -//# sourceMappingURL=layout.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout.mjs.map deleted file mode 100644 index 900ad008..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"layout.mjs","sources":["../../../../src/motion/features/layout.ts"],"sourcesContent":["import { HTMLProjectionNode } from \"motion-dom\"\nimport { MeasureLayout } from \"./layout/MeasureLayout\"\nimport { FeaturePackages } from \"./types\"\n\nexport const layout: FeaturePackages = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,MAAM,GAAoB;AACnC,IAAA,MAAM,EAAE;AACJ,QAAA,cAAc,EAAE,kBAAkB;QAClC,aAAa;AAChB,KAAA;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs deleted file mode 100644 index 58fa9ee1..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs +++ /dev/null @@ -1,136 +0,0 @@ -"use client"; -import { jsx } from 'react/jsx-runtime'; -import { globalProjectionState, frame, microtask } from 'motion-dom'; -import { useContext, Component } from 'react'; -import { usePresence } from '../../../components/AnimatePresence/use-presence.mjs'; -import { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs'; -import { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs'; - -/** - * Track whether we've taken any snapshots yet. If not, - * we can safely skip notification of didUpdate. - * - * Difficult to capture in a test but to prevent flickering - * we must set this to true either on update or unmount. - * Running `next-env/layout-id` in Safari will show this behaviour if broken. - */ -let hasTakenAnySnapshot = false; -class MeasureLayoutWithContext extends Component { - /** - * This only mounts projection nodes for components that - * need measuring, we might want to do it for all components - * in order to incorporate transforms - */ - componentDidMount() { - const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props; - const { projection } = visualElement; - if (projection) { - if (layoutGroup.group) - layoutGroup.group.add(projection); - if (switchLayoutGroup && switchLayoutGroup.register && layoutId) { - switchLayoutGroup.register(projection); - } - if (hasTakenAnySnapshot) { - projection.root.didUpdate(); - } - projection.addEventListener("animationComplete", () => { - this.safeToRemove(); - }); - projection.setOptions({ - ...projection.options, - layoutDependency: this.props.layoutDependency, - onExitComplete: () => this.safeToRemove(), - }); - } - globalProjectionState.hasEverUpdated = true; - } - getSnapshotBeforeUpdate(prevProps) { - const { layoutDependency, visualElement, drag, isPresent } = this.props; - const { projection } = visualElement; - if (!projection) - return null; - /** - * TODO: We use this data in relegate to determine whether to - * promote a previous element. There's no guarantee its presence data - * will have updated by this point - if a bug like this arises it will - * have to be that we markForRelegation and then find a new lead some other way, - * perhaps in didUpdate - */ - projection.isPresent = isPresent; - if (prevProps.layoutDependency !== layoutDependency) { - projection.setOptions({ - ...projection.options, - layoutDependency, - }); - } - hasTakenAnySnapshot = true; - if (drag || - prevProps.layoutDependency !== layoutDependency || - layoutDependency === undefined || - prevProps.isPresent !== isPresent) { - projection.willUpdate(); - } - else { - this.safeToRemove(); - } - if (prevProps.isPresent !== isPresent) { - if (isPresent) { - projection.promote(); - } - else if (!projection.relegate()) { - /** - * If there's another stack member taking over from this one, - * it's in charge of the exit animation and therefore should - * be in charge of the safe to remove. Otherwise we call it here. - */ - frame.postRender(() => { - const stack = projection.getStack(); - if (!stack || !stack.members.length) { - this.safeToRemove(); - } - }); - } - } - return null; - } - componentDidUpdate() { - const { visualElement, layoutAnchor } = this.props; - const { projection } = visualElement; - if (projection) { - projection.options.layoutAnchor = layoutAnchor; - projection.root.didUpdate(); - microtask.postRender(() => { - if (!projection.currentAnimation && projection.isLead()) { - this.safeToRemove(); - } - }); - } - } - componentWillUnmount() { - const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props; - const { projection } = visualElement; - hasTakenAnySnapshot = true; - if (projection) { - projection.scheduleCheckAfterUnmount(); - if (layoutGroup && layoutGroup.group) - layoutGroup.group.remove(projection); - if (promoteContext && promoteContext.deregister) - promoteContext.deregister(projection); - } - } - safeToRemove() { - const { safeToRemove } = this.props; - safeToRemove && safeToRemove(); - } - render() { - return null; - } -} -function MeasureLayout(props) { - const [isPresent, safeToRemove] = usePresence(); - const layoutGroup = useContext(LayoutGroupContext); - return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove })); -} - -export { MeasureLayout }; -//# sourceMappingURL=MeasureLayout.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.map deleted file mode 100644 index 46b865d3..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MeasureLayout.mjs","sources":["../../../../../src/motion/features/layout/MeasureLayout.tsx"],"sourcesContent":["\"use client\"\n\nimport { frame, microtask, globalProjectionState, type VisualElement } from \"motion-dom\"\nimport { Component, useContext } from \"react\"\nimport { usePresence } from \"../../../components/AnimatePresence/use-presence\"\nimport {\n LayoutGroupContext,\n LayoutGroupContextProps,\n} from \"../../../context/LayoutGroupContext\"\nimport { SwitchLayoutGroupContext } from \"../../../context/SwitchLayoutGroupContext\"\nimport { MotionProps } from \"../../types\"\n\ninterface MeasureContextProps {\n layoutGroup: LayoutGroupContextProps\n switchLayoutGroup?: SwitchLayoutGroupContext\n isPresent: boolean\n safeToRemove?: VoidFunction | null\n}\n\ntype MeasureProps = MotionProps &\n MeasureContextProps & { visualElement: VisualElement }\n\n/**\n * Track whether we've taken any snapshots yet. If not,\n * we can safely skip notification of didUpdate.\n *\n * Difficult to capture in a test but to prevent flickering\n * we must set this to true either on update or unmount.\n * Running `next-env/layout-id` in Safari will show this behaviour if broken.\n */\nlet hasTakenAnySnapshot = false\n\nclass MeasureLayoutWithContext extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } =\n this.props\n const { projection } = visualElement\n\n if (projection) {\n if (layoutGroup.group) layoutGroup.group.add(projection)\n\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection)\n }\n\n if (hasTakenAnySnapshot) {\n projection.root!.didUpdate()\n }\n\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove()\n })\n projection.setOptions({\n ...projection.options,\n layoutDependency: this.props.layoutDependency,\n onExitComplete: () => this.safeToRemove(),\n })\n }\n\n globalProjectionState.hasEverUpdated = true\n }\n\n getSnapshotBeforeUpdate(prevProps: MeasureProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props\n const { projection } = visualElement\n\n if (!projection) return null\n\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent\n\n if (prevProps.layoutDependency !== layoutDependency) {\n projection.setOptions({\n ...projection.options,\n layoutDependency,\n })\n }\n\n hasTakenAnySnapshot = true\n\n if (\n drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined ||\n prevProps.isPresent !== isPresent\n ) {\n projection.willUpdate()\n } else {\n this.safeToRemove()\n }\n\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote()\n } else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack()\n if (!stack || !stack.members.length) {\n this.safeToRemove()\n }\n })\n }\n }\n\n return null\n }\n\n componentDidUpdate() {\n const { visualElement, layoutAnchor } = this.props\n const { projection } = visualElement\n if (projection) {\n projection.options.layoutAnchor = layoutAnchor\n\n projection.root!.didUpdate()\n\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove()\n }\n })\n }\n }\n\n componentWillUnmount() {\n const {\n visualElement,\n layoutGroup,\n switchLayoutGroup: promoteContext,\n } = this.props\n const { projection } = visualElement\n\n hasTakenAnySnapshot = true\n\n if (projection) {\n projection.scheduleCheckAfterUnmount()\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection)\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection)\n }\n }\n\n safeToRemove() {\n const { safeToRemove } = this.props\n safeToRemove && safeToRemove()\n }\n\n render() {\n return null\n }\n}\n\nexport function MeasureLayout(\n props: MotionProps & { visualElement: VisualElement }\n) {\n const [isPresent, safeToRemove] = usePresence()\n const layoutGroup = useContext(LayoutGroupContext)\n\n return (\n \n )\n}\n"],"names":[],"mappings":";;;;;;;;AAsBA;;;;;;;AAOG;AACH;AAEA;AACI;;;;AAIG;;AAEC;AAEA;;;AAG2B;;AAGnB;;;AAIA;;AAGJ;;AAEA;;;AAGI;AACA;AACH;;AAGL;;AAGJ;AACI;AACA;AAEA;AAAiB;AAEjB;;;;;;AAMG;AACH;AAEA;;;;AAIK;;;AAKL;;AAGI;AACA;;;;;;AAOJ;;;;AAGW;AACH;;;;AAIG;AACH;AACI;;;;AAIJ;;;AAIR;;;;AAKA;;AAEI;AAEA;AAEA;;;;AAIA;;;;AAKJ;AAKA;;;;AAMI;AACI;AACJ;AACI;;;;AAKR;;;;AAKA;;AAEP;AAEK;;AAIF;;AAWJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/load-features.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/load-features.mjs deleted file mode 100644 index dc52536e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/load-features.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import { setFeatureDefinitions } from 'motion-dom'; -import { getInitializedFeatureDefinitions } from './definitions.mjs'; - -function loadFeatures(features) { - const featureDefinitions = getInitializedFeatureDefinitions(); - for (const key in features) { - featureDefinitions[key] = { - ...featureDefinitions[key], - ...features[key], - }; - } - setFeatureDefinitions(featureDefinitions); -} - -export { loadFeatures }; -//# sourceMappingURL=load-features.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/load-features.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/load-features.mjs.map deleted file mode 100644 index 76016506..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/load-features.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"load-features.mjs","sources":["../../../../src/motion/features/load-features.ts"],"sourcesContent":["import { setFeatureDefinitions } from \"motion-dom\"\nimport { getInitializedFeatureDefinitions } from \"./definitions\"\nimport { FeaturePackages } from \"./types\"\n\nexport function loadFeatures(features: FeaturePackages) {\n const featureDefinitions = getInitializedFeatureDefinitions()\n\n for (const key in features) {\n featureDefinitions[key as keyof typeof featureDefinitions] = {\n ...featureDefinitions[key as keyof typeof featureDefinitions],\n ...features[key as keyof typeof features],\n } as any\n }\n\n setFeatureDefinitions(featureDefinitions)\n}\n"],"names":[],"mappings":";;;AAIM,SAAU,YAAY,CAAC,QAAyB,EAAA;AAClD,IAAA,MAAM,kBAAkB,GAAG,gCAAgC,EAAE;AAE7D,IAAA,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE;QACxB,kBAAkB,CAAC,GAAsC,CAAC,GAAG;YACzD,GAAG,kBAAkB,CAAC,GAAsC,CAAC;YAC7D,GAAG,QAAQ,CAAC,GAA4B,CAAC;SACrC;IACZ;IAEA,qBAAqB,CAAC,kBAAkB,CAAC;AAC7C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs deleted file mode 100644 index 4d1b9572..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs +++ /dev/null @@ -1,77 +0,0 @@ -import { Feature } from 'motion-dom'; -import { observeIntersection } from './observers.mjs'; - -const thresholdNames = { - some: 0, - all: 1, -}; -class InViewFeature extends Feature { - constructor() { - super(...arguments); - this.hasEnteredView = false; - this.isInView = false; - } - startObserver() { - this.stopObserver?.(); - const { viewport = {} } = this.node.getProps(); - const { root, margin: rootMargin, amount = "some", once } = viewport; - const options = { - root: root ? root.current : undefined, - rootMargin, - threshold: typeof amount === "number" ? amount : thresholdNames[amount], - }; - const onIntersectionUpdate = (entry) => { - const { isIntersecting } = entry; - /** - * If there's been no change in the viewport state, early return. - */ - if (this.isInView === isIntersecting) - return; - this.isInView = isIntersecting; - /** - * Handle hasEnteredView. If this is only meant to run once, and - * element isn't visible, early return. Otherwise set hasEnteredView to true. - */ - if (once && !isIntersecting && this.hasEnteredView) { - return; - } - else if (isIntersecting) { - this.hasEnteredView = true; - } - if (this.node.animationState) { - this.node.animationState.setActive("whileInView", isIntersecting); - } - /** - * Use the latest committed props rather than the ones in scope - * when this observer is created - */ - const { onViewportEnter, onViewportLeave } = this.node.getProps(); - const callback = isIntersecting ? onViewportEnter : onViewportLeave; - callback && callback(entry); - }; - this.stopObserver = observeIntersection(this.node.current, options, onIntersectionUpdate); - } - mount() { - this.startObserver(); - } - update() { - if (typeof IntersectionObserver === "undefined") - return; - const { props, prevProps } = this.node; - const hasOptionsChanged = ["amount", "margin", "root"].some(hasViewportOptionChanged(props, prevProps)); - if (hasOptionsChanged) { - this.startObserver(); - } - } - unmount() { - this.stopObserver?.(); - this.hasEnteredView = false; - this.isInView = false; - } -} -function hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) { - return (name) => viewport[name] !== prevViewport[name]; -} - -export { InViewFeature }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.map deleted file mode 100644 index cb6c7304..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../../src/motion/features/viewport/index.ts"],"sourcesContent":["import { Feature } from \"motion-dom\"\nimport { MotionProps } from \"../../types\"\nimport { observeIntersection } from \"./observers\"\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n}\n\nexport class InViewFeature extends Feature {\n private hasEnteredView = false\n\n private isInView = false\n\n private stopObserver?: () => void\n\n private startObserver() {\n this.stopObserver?.()\n\n const { viewport = {} } = this.node.getProps()\n const { root, margin: rootMargin, amount = \"some\", once } = viewport\n\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold:\n typeof amount === \"number\" ? amount : thresholdNames[amount],\n }\n\n const onIntersectionUpdate = (entry: IntersectionObserverEntry) => {\n const { isIntersecting } = entry\n\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting) return\n\n this.isInView = isIntersecting\n\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return\n } else if (isIntersecting) {\n this.hasEnteredView = true\n }\n\n if (this.node.animationState) {\n this.node.animationState.setActive(\n \"whileInView\",\n isIntersecting\n )\n }\n\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps()\n const callback = isIntersecting ? onViewportEnter : onViewportLeave\n callback && callback(entry)\n }\n\n this.stopObserver = observeIntersection(\n this.node.current!,\n options,\n onIntersectionUpdate\n )\n }\n\n mount() {\n this.startObserver()\n }\n\n update() {\n if (typeof IntersectionObserver === \"undefined\") return\n\n const { props, prevProps } = this.node\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(\n hasViewportOptionChanged(props, prevProps)\n )\n\n if (hasOptionsChanged) {\n this.startObserver()\n }\n }\n\n unmount() {\n this.stopObserver?.()\n this.hasEnteredView = false\n this.isInView = false\n }\n}\n\nfunction hasViewportOptionChanged(\n { viewport = {} }: MotionProps,\n { viewport: prevViewport = {} }: MotionProps = {}\n) {\n return (name: keyof typeof viewport) =>\n viewport[name] !== prevViewport[name]\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,cAAc,GAAG;AACnB,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,GAAG,EAAE,CAAC;CACT;AAEK,MAAO,aAAc,SAAQ,OAAgB,CAAA;AAAnD,IAAA,WAAA,GAAA;;QACY,IAAA,CAAA,cAAc,GAAG,KAAK;QAEtB,IAAA,CAAA,QAAQ,GAAG,KAAK;IAkF5B;IA9EY,aAAa,GAAA;AACjB,QAAA,IAAI,CAAC,YAAY,IAAI;AAErB,QAAA,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAC9C,QAAA,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ;AAEpE,QAAA,MAAM,OAAO,GAAG;YACZ,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,OAAO,GAAG,SAAS;YACrC,UAAU;AACV,YAAA,SAAS,EACL,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC;SACnE;AAED,QAAA,MAAM,oBAAoB,GAAG,CAAC,KAAgC,KAAI;AAC9D,YAAA,MAAM,EAAE,cAAc,EAAE,GAAG,KAAK;AAEhC;;AAEG;AACH,YAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,cAAc;gBAAE;A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B;AACH;AAED,SAAS,wBAAwB,CAC7B,EAAE,QAAQ,GAAG,EAAE,EAAe,EAC9B,EAAE,QAAQ,EAAE,YAAY,GAAG,EAAE,KAAkB,EAAE,EAAA;AAEjD,IAAA,OAAO,CAAC,IAA2B,KAC/B,QAAQ,CAAC,IAAI,CAAC,KAAK,YAAY,CAAC,IAAI,CAAC;AAC7C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs deleted file mode 100644 index 7c67d854..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Map an IntersectionHandler callback to an element. We only ever make one handler for one - * element, so even though these handlers might all be triggered by different - * observers, we can keep them in the same map. - */ -const observerCallbacks = new WeakMap(); -/** - * Multiple observers can be created for multiple element/document roots. Each with - * different settings. So here we store dictionaries of observers to each root, - * using serialised settings (threshold/margin) as lookup keys. - */ -const observers = new WeakMap(); -const fireObserverCallback = (entry) => { - const callback = observerCallbacks.get(entry.target); - callback && callback(entry); -}; -const fireAllObserverCallbacks = (entries) => { - entries.forEach(fireObserverCallback); -}; -function initIntersectionObserver({ root, ...options }) { - const lookupRoot = root || document; - /** - * If we don't have an observer lookup map for this root, create one. - */ - if (!observers.has(lookupRoot)) { - observers.set(lookupRoot, {}); - } - const rootObservers = observers.get(lookupRoot); - const key = JSON.stringify(options); - /** - * If we don't have an observer for this combination of root and settings, - * create one. - */ - if (!rootObservers[key]) { - rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options }); - } - return rootObservers[key]; -} -function observeIntersection(element, options, callback) { - const rootInteresectionObserver = initIntersectionObserver(options); - observerCallbacks.set(element, callback); - rootInteresectionObserver.observe(element); - return () => { - observerCallbacks.delete(element); - rootInteresectionObserver.unobserve(element); - }; -} - -export { observeIntersection }; -//# sourceMappingURL=observers.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.map deleted file mode 100644 index cbbe273f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observers.mjs","sources":["../../../../../src/motion/features/viewport/observers.ts"],"sourcesContent":["type IntersectionHandler = (entry: IntersectionObserverEntry) => void\n\ninterface ElementIntersectionObservers {\n [key: string]: IntersectionObserver\n}\n\n/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap()\n\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap<\n Element | Document,\n ElementIntersectionObservers\n>()\n\nconst fireObserverCallback = (entry: IntersectionObserverEntry) => {\n const callback = observerCallbacks.get(entry.target)\n callback && callback(entry)\n}\n\nconst fireAllObserverCallbacks: IntersectionObserverCallback = (entries) => {\n entries.forEach(fireObserverCallback)\n}\n\nfunction initIntersectionObserver({\n root,\n ...options\n}: IntersectionObserverInit): IntersectionObserver {\n const lookupRoot = root || document\n\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {})\n }\n const rootObservers = observers.get(lookupRoot)!\n\n const key = JSON.stringify(options)\n\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(\n fireAllObserverCallbacks,\n { root, ...options }\n )\n }\n\n return rootObservers[key]\n}\n\nexport function observeIntersection(\n element: Element,\n options: IntersectionObserverInit,\n callback: IntersectionHandler\n) {\n const rootInteresectionObserver = initIntersectionObserver(options)\n\n observerCallbacks.set(element, callback)\n rootInteresectionObserver.observe(element)\n\n return () => {\n observerCallbacks.delete(element)\n rootInteresectionObserver.unobserve(element)\n }\n}\n"],"names":[],"mappings":"AAMA;;;;AAIG;AACH,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAAgC;AAErE;;;;AAIG;AACH,MAAM,SAAS,GAAG,IAAI,OAAO,EAG1B;AAEH,MAAM,oBAAoB,GAAG,CAAC,KAAgC,KAAI;IAC9D,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC;AACpD,IAAA,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC;AAC/B,CAAC;AAED,MAAM,wBAAwB,GAAiC,CAAC,OAAO,KAAI;AACvE,IAAA,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC;AACzC,CAAC;AAED,SAAS,wBAAwB,CAAC,EAC9B,IAAI,EACJ,GAAG,OAAO,EACa,EAAA;AACvB,IAAA,MAAM,UAAU,GAAG,IAAI,IAAI,QAAQ;AAEnC;;AAEG;IACH,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;AAC5B,QAAA,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,CAAC;IACjC;IACA,MAAM,aAAa,GAAG,SAAS,CAAC,GAAG,CAAC,UAAU,CAAE;IAEhD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;AAEnC;;;AAGG;AACH,IAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE;AACrB,QAAA,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,oBAAoB,CACzC,wBAAwB,EACxB,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CACvB;IACL;AAEA,IAAA,OAAO,aAAa,CAAC,GAAG,CAAC;AAC7B;SAEgB,mBAAmB,CAC/B,OAAgB,EAChB,OAAiC,EACjC,QAA6B,EAAA;AAE7B,IAAA,MAAM,yBAAyB,GAAG,wBAAwB,CAAC,OAAO,CAAC;AAEnE,IAAA,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC;AACxC,IAAA,yBAAyB,CAAC,OAAO,CAAC,OAAO,CAAC;AAE1C,IAAA,OAAO,MAAK;AACR,QAAA,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC;AACjC,QAAA,yBAAyB,CAAC,SAAS,CAAC,OAAO,CAAC;AAChD,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/index.mjs deleted file mode 100644 index a3485d2a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/index.mjs +++ /dev/null @@ -1,113 +0,0 @@ -"use client"; -import { jsxs, jsx } from 'react/jsx-runtime'; -import { warning, invariant } from 'motion-utils'; -import { forwardRef, useContext } from 'react'; -import { LayoutGroupContext } from '../context/LayoutGroupContext.mjs'; -import { LazyContext } from '../context/LazyContext.mjs'; -import { MotionConfigContext } from '../context/MotionConfigContext.mjs'; -import { MotionContext } from '../context/MotionContext/index.mjs'; -import { useCreateMotionContext } from '../context/MotionContext/create.mjs'; -import { useRender } from '../render/dom/use-render.mjs'; -import { isSVGComponent } from '../render/dom/utils/is-svg-component.mjs'; -import { useHTMLVisualState } from '../render/html/use-html-visual-state.mjs'; -import { useSVGVisualState } from '../render/svg/use-svg-visual-state.mjs'; -import { getInitializedFeatureDefinitions } from './features/definitions.mjs'; -import { loadFeatures } from './features/load-features.mjs'; -import { motionComponentSymbol } from './utils/symbol.mjs'; -import { useMotionRef } from './utils/use-motion-ref.mjs'; -import { useVisualElement } from './utils/use-visual-element.mjs'; - -/** - * Create a `motion` component. - * - * This function accepts a Component argument, which can be either a string (ie "div" - * for `motion.div`), or an actual React component. - * - * Alongside this is a config option which provides a way of rendering the provided - * component "offline", or outside the React render cycle. - */ -function createMotionComponent(Component, { forwardMotionProps = false, type } = {}, preloadedFeatures, createVisualElement) { - preloadedFeatures && loadFeatures(preloadedFeatures); - /** - * Determine whether to use SVG or HTML rendering based on: - * 1. Explicit `type` option (highest priority) - * 2. Auto-detection via `isSVGComponent` - */ - const isSVG = type ? type === "svg" : isSVGComponent(Component); - const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState; - function MotionDOMComponent(props, externalRef) { - /** - * If we need to measure the element we load this functionality in a - * separate class component in order to gain access to getSnapshotBeforeUpdate. - */ - let MeasureLayout; - const configAndProps = { - ...useContext(MotionConfigContext), - ...props, - layoutId: useLayoutId(props), - }; - const { isStatic } = configAndProps; - const context = useCreateMotionContext(props); - const visualState = useVisualState(props, isStatic); - if (!isStatic && typeof window !== "undefined") { - useStrictMode(configAndProps, preloadedFeatures); - const layoutProjection = getProjectionFunctionality(configAndProps); - MeasureLayout = layoutProjection.MeasureLayout; - /** - * Create a VisualElement for this component. A VisualElement provides a common - * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as - * providing a way of rendering to these APIs outside of the React render loop - * for more performant animations and interactions - */ - context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode, isSVG); - } - /** - * The mount order and hierarchy is specific to ensure our element ref - * is hydrated by the time features fire their effects. - */ - return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, forwardMotionProps, isSVG)] })); - } - MotionDOMComponent.displayName = `motion.${typeof Component === "string" - ? Component - : `create(${Component.displayName ?? Component.name ?? ""})`}`; - const ForwardRefMotionComponent = forwardRef(MotionDOMComponent); - ForwardRefMotionComponent[motionComponentSymbol] = Component; - return ForwardRefMotionComponent; -} -function useLayoutId({ layoutId }) { - const layoutGroupId = useContext(LayoutGroupContext).id; - return layoutGroupId && layoutId !== undefined - ? layoutGroupId + "-" + layoutId - : layoutId; -} -function useStrictMode(configAndProps, preloadedFeatures) { - const isStrict = useContext(LazyContext).strict; - /** - * If we're in development mode, check to make sure we're not rendering a motion component - * as a child of LazyMotion, as this will break the file-size benefits of using it. - */ - if (process.env.NODE_ENV !== "production" && - preloadedFeatures && - isStrict) { - const strictMessage = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead."; - configAndProps.ignoreStrict - ? warning(false, strictMessage, "lazy-strict-mode") - : invariant(false, strictMessage, "lazy-strict-mode"); - } -} -function getProjectionFunctionality(props) { - const featureDefinitions = getInitializedFeatureDefinitions(); - const { drag, layout } = featureDefinitions; - if (!drag && !layout) - return {}; - const combined = { ...drag, ...layout }; - return { - MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props) - ? combined.MeasureLayout - : undefined, - ProjectionNode: combined.ProjectionNode, - }; -} - -export { createMotionComponent }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/index.mjs.map deleted file mode 100644 index 4a77771a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../src/motion/index.tsx"],"sourcesContent":["\"use client\"\n\nimport { invariant, warning } from \"motion-utils\"\nimport * as React from \"react\"\nimport { forwardRef, useContext } from \"react\"\nimport { LayoutGroupContext } from \"../context/LayoutGroupContext\"\nimport { LazyContext } from \"../context/LazyContext\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\nimport { MotionContext } from \"../context/MotionContext\"\nimport { useCreateMotionContext } from \"../context/MotionContext/create\"\nimport { DOMMotionComponents } from \"../render/dom/types\"\nimport { useRender } from \"../render/dom/use-render\"\nimport { isSVGComponent } from \"../render/dom/utils/is-svg-component\"\nimport { HTMLRenderState } from \"../render/html/types\"\nimport { useHTMLVisualState } from \"../render/html/use-html-visual-state\"\nimport { SVGRenderState } from \"../render/svg/types\"\nimport { useSVGVisualState } from \"../render/svg/use-svg-visual-state\"\nimport { CreateVisualElement } from \"../render/types\"\nimport { getInitializedFeatureDefinitions } from \"./features/definitions\"\nimport { loadFeatures } from \"./features/load-features\"\nimport { FeatureBundle, FeaturePackages } from \"./features/types\"\nimport { MotionProps } from \"./types\"\nimport { motionComponentSymbol } from \"./utils/symbol\"\nimport { useMotionRef } from \"./utils/use-motion-ref\"\nimport { useVisualElement } from \"./utils/use-visual-element\"\n\nexport interface MotionComponentConfig<\n TagName extends keyof DOMMotionComponents | string = \"div\"\n> {\n preloadedFeatures?: FeatureBundle\n createVisualElement?: CreateVisualElement\n Component: TagName | React.ComponentType>\n forwardMotionProps?: boolean\n}\n\nexport type MotionComponentProps = {\n [K in Exclude]?: Props[K]\n} & MotionProps\n\nexport type MotionComponent = T extends keyof DOMMotionComponents\n ? DOMMotionComponents[T]\n : React.ComponentType<\n Omit, \"children\"> & {\n children?: \"children\" extends keyof P\n ? P[\"children\"] | MotionComponentProps

[\"children\"]\n : MotionComponentProps

[\"children\"]\n }\n >\n\nexport interface MotionComponentOptions {\n forwardMotionProps?: boolean\n /**\n * Specify whether the component renders an HTML or SVG element.\n * This is useful when wrapping custom SVG components that need\n * SVG-specific attribute handling (like viewBox animation).\n * By default, Motion auto-detects based on the component name,\n * but custom React components are always treated as HTML.\n */\n type?: \"html\" | \"svg\"\n}\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nexport function createMotionComponent<\n Props,\n TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n Component: TagName | string | React.ComponentType,\n { forwardMotionProps = false, type }: MotionComponentOptions = {},\n preloadedFeatures?: FeaturePackages,\n createVisualElement?: CreateVisualElement\n) {\n preloadedFeatures && loadFeatures(preloadedFeatures)\n\n /**\n * Determine whether to use SVG or HTML rendering based on:\n * 1. Explicit `type` option (highest priority)\n * 2. Auto-detection via `isSVGComponent`\n */\n const isSVG = type ? type === \"svg\" : isSVGComponent(Component)\n const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState\n\n function MotionDOMComponent(\n props: MotionComponentProps,\n externalRef?: React.Ref\n ) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout: undefined | React.ComponentType\n\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n }\n\n const { isStatic } = configAndProps\n\n const context = useCreateMotionContext(props)\n\n const visualState = useVisualState(props, isStatic)\n\n if (!isStatic && typeof window !== \"undefined\") {\n useStrictMode(configAndProps, preloadedFeatures)\n\n const layoutProjection = getProjectionFunctionality(configAndProps)\n MeasureLayout = layoutProjection.MeasureLayout\n\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(\n Component,\n visualState,\n configAndProps,\n createVisualElement,\n layoutProjection.ProjectionNode,\n isSVG\n )\n }\n\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (\n \n {MeasureLayout && context.visualElement ? (\n \n ) : null}\n {useRender(\n Component,\n props,\n useMotionRef<\n HTMLElement | SVGElement,\n HTMLRenderState | SVGRenderState\n >(visualState, context.visualElement, externalRef),\n visualState,\n isStatic,\n forwardMotionProps,\n isSVG\n )}\n \n )\n }\n\n MotionDOMComponent.displayName = `motion.${\n typeof Component === \"string\"\n ? Component\n : `create(${Component.displayName ?? Component.name ?? \"\"})`\n }`\n\n const ForwardRefMotionComponent = forwardRef(MotionDOMComponent as any)\n ;(ForwardRefMotionComponent as any)[motionComponentSymbol] = Component\n\n return ForwardRefMotionComponent as MotionComponent\n}\n\nfunction useLayoutId({ layoutId }: MotionProps) {\n const layoutGroupId = useContext(LayoutGroupContext).id\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId\n}\n\nfunction useStrictMode(\n configAndProps: MotionProps,\n preloadedFeatures?: FeaturePackages\n) {\n const isStrict = useContext(LazyContext).strict\n\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (\n process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict\n ) {\n const strictMessage =\n \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\"\n configAndProps.ignoreStrict\n ? warning(false, strictMessage, \"lazy-strict-mode\")\n : invariant(false, strictMessage, \"lazy-strict-mode\")\n }\n}\n\nfunction getProjectionFunctionality(props: MotionProps) {\n const featureDefinitions = getInitializedFeatureDefinitions()\n const { drag, layout } = featureDefinitions\n\n if (!drag && !layout) return {}\n\n const combined = { ...drag, ...layout }\n\n return {\n MeasureLayout:\n drag?.isEnabled(props) || layout?.isEnabled(props)\n ? combined.MeasureLayout\n : undefined,\n ProjectionNode: combined.ProjectionNode,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA6DA;;;;;;;;AAQG;;AAUC;AAEA;;;;AAIG;AACH;;AAGA;AAII;;;AAGG;AACH;AAEA;;AAEI;AACA;;AAGJ;AAEA;;;AAKI;AAEA;AACA;AAEA;;;;;AAKG;AACH;;AAUJ;;;AAGG;AACH;;AAwBJ;AAEQ;AACA;AAGR;AACE;AAEF;AACJ;AAEA;;AAEI;AACI;;AAER;AAEA;;AAMI;;;AAGG;AACH;;AAGI;;AAIA;;;;AAIR;AAEA;AACI;AACA;AAEA;AAAsB;;;AAKlB;;AAGQ;;;AAGhB;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs deleted file mode 100644 index 3d738094..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs +++ /dev/null @@ -1,13 +0,0 @@ -import { motionComponentSymbol } from './symbol.mjs'; - -/** - * Checks if a component is a `motion` component. - */ -function isMotionComponent(component) { - return (component !== null && - typeof component === "object" && - motionComponentSymbol in component); -} - -export { isMotionComponent }; -//# sourceMappingURL=is-motion-component.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs.map deleted file mode 100644 index 02cdc747..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-motion-component.mjs","sources":["../../../../src/motion/utils/is-motion-component.ts"],"sourcesContent":["import { motionComponentSymbol } from \"./symbol\"\n\n/**\n * Checks if a component is a `motion` component.\n */\nexport function isMotionComponent(component: React.ComponentType | string) {\n return (\n component !== null &&\n typeof component === \"object\" &&\n motionComponentSymbol in component\n )\n}\n"],"names":[],"mappings":";;AAEA;;AAEG;AACG,SAAU,iBAAiB,CAAC,SAAuC,EAAA;IACrE,QACI,SAAS,KAAK,IAAI;QAClB,OAAO,SAAS,KAAK,QAAQ;QAC7B,qBAAqB,IAAI,SAAS;AAE1C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs deleted file mode 100644 index afeb9bbe..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const motionComponentSymbol = Symbol.for("motionComponentSymbol"); - -export { motionComponentSymbol }; -//# sourceMappingURL=symbol.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs.map deleted file mode 100644 index 84be6e00..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"symbol.mjs","sources":["../../../../src/motion/utils/symbol.ts"],"sourcesContent":["export const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\")\n"],"names":[],"mappings":"AAAO,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs deleted file mode 100644 index b76a6681..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import { isMotionComponent } from './is-motion-component.mjs'; -import { motionComponentSymbol } from './symbol.mjs'; - -/** - * Unwraps a `motion` component and returns either a string for `motion.div` or - * the React component for `motion(Component)`. - * - * If the component is not a `motion` component it returns undefined. - */ -function unwrapMotionComponent(component) { - if (isMotionComponent(component)) { - return component[motionComponentSymbol]; - } - return undefined; -} - -export { unwrapMotionComponent }; -//# sourceMappingURL=unwrap-motion-component.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs.map deleted file mode 100644 index 55c1556f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"unwrap-motion-component.mjs","sources":["../../../../src/motion/utils/unwrap-motion-component.ts"],"sourcesContent":["import { isMotionComponent } from \"./is-motion-component\"\nimport { motionComponentSymbol } from \"./symbol\"\n\n/**\n * Unwraps a `motion` component and returns either a string for `motion.div` or\n * the React component for `motion(Component)`.\n *\n * If the component is not a `motion` component it returns undefined.\n */\nexport function unwrapMotionComponent(\n component: React.ComponentType | string\n): React.ComponentType | string | undefined {\n if (isMotionComponent(component)) {\n return component[motionComponentSymbol as keyof typeof component]\n }\n\n return undefined\n}\n"],"names":[],"mappings":";;;AAGA;;;;;AAKG;AACG,SAAU,qBAAqB,CACjC,SAAuC,EAAA;AAEvC,IAAA,IAAI,iBAAiB,CAAC,SAAS,CAAC,EAAE;AAC9B,QAAA,OAAO,SAAS,CAAC,qBAA+C,CAAC;IACrE;AAEA,IAAA,OAAO,SAAS;AACpB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs deleted file mode 100644 index 595f0117..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +++ /dev/null @@ -1,52 +0,0 @@ -"use client"; -import { useRef, useInsertionEffect, useCallback } from 'react'; - -/** - * Creates a ref function that, when called, hydrates the provided - * external ref and VisualElement. - */ -function useMotionRef(visualState, visualElement, externalRef) { - /** - * Store externalRef in a ref to avoid including it in the useCallback - * dependency array. Including externalRef in dependencies causes issues - * with libraries like Radix UI that create new callback refs on each render - * when using asChild - this would cause the callback to be recreated, - * triggering element remounts and breaking AnimatePresence exit animations. - */ - const externalRefContainer = useRef(externalRef); - useInsertionEffect(() => { - externalRefContainer.current = externalRef; - }); - // Store cleanup function returned by callback refs (React 19 feature) - const refCleanup = useRef(null); - return useCallback((instance) => { - if (instance) { - visualState.onMount?.(instance); - } - if (visualElement) { - instance ? visualElement.mount(instance) : visualElement.unmount(); - } - const ref = externalRefContainer.current; - if (typeof ref === "function") { - if (instance) { - const cleanup = ref(instance); - if (typeof cleanup === "function") { - refCleanup.current = cleanup; - } - } - else if (refCleanup.current) { - refCleanup.current(); - refCleanup.current = null; - } - else { - ref(instance); - } - } - else if (ref) { - ref.current = instance; - } - }, [visualElement]); -} - -export { useMotionRef }; -//# sourceMappingURL=use-motion-ref.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.map deleted file mode 100644 index 029a6024..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-motion-ref.mjs","sources":["../../../../src/motion/utils/use-motion-ref.ts"],"sourcesContent":["\"use client\"\n\nimport type { VisualElement } from \"motion-dom\"\nimport * as React from \"react\"\nimport { useCallback, useInsertionEffect, useRef } from \"react\"\nimport { VisualState } from \"./use-visual-state\"\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nexport function useMotionRef(\n visualState: VisualState,\n visualElement?: VisualElement | null,\n externalRef?: React.Ref\n): React.Ref {\n /**\n * Store externalRef in a ref to avoid including it in the useCallback\n * dependency array. Including externalRef in dependencies causes issues\n * with libraries like Radix UI that create new callback refs on each render\n * when using asChild - this would cause the callback to be recreated,\n * triggering element remounts and breaking AnimatePresence exit animations.\n */\n const externalRefContainer = useRef(externalRef)\n useInsertionEffect(() => {\n externalRefContainer.current = externalRef\n })\n\n // Store cleanup function returned by callback refs (React 19 feature)\n const refCleanup = useRef<(() => void) | null>(null)\n\n return useCallback(\n (instance: Instance) => {\n if (instance) {\n visualState.onMount?.(instance)\n }\n\n if (visualElement) {\n instance ? visualElement.mount(instance) : visualElement.unmount()\n }\n\n const ref = externalRefContainer.current\n if (typeof ref === \"function\") {\n if (instance) {\n const cleanup = ref(instance)\n if (typeof cleanup === \"function\") {\n refCleanup.current = cleanup\n }\n } else if (refCleanup.current) {\n refCleanup.current()\n refCleanup.current = null\n } else {\n ref(instance)\n }\n } else if (ref) {\n ;(ref as React.MutableRefObject).current = instance\n }\n },\n [visualElement]\n )\n}\n"],"names":[],"mappings":";;;AAOA;;;AAGG;;AAMC;;;;;;AAMG;AACH;;AAEI;AACJ;;AAGA;AAEA;;AAGY;;;AAIA;;AAGJ;AACA;;AAEQ;AACA;AACI;;;AAED;;AAEH;;;;;;;AAKF;;AAEV;AAGR;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs deleted file mode 100644 index 317f7cca..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs +++ /dev/null @@ -1,166 +0,0 @@ -"use client"; -import { optimizedAppearDataAttribute } from 'motion-dom'; -import { useContext, useRef, useInsertionEffect, useEffect } from 'react'; -import { LazyContext } from '../../context/LazyContext.mjs'; -import { MotionConfigContext } from '../../context/MotionConfigContext.mjs'; -import { MotionContext } from '../../context/MotionContext/index.mjs'; -import { PresenceContext } from '../../context/PresenceContext.mjs'; -import { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs'; -import { isRefObject } from '../../utils/is-ref-object.mjs'; -import { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs'; - -function useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor, isSVG) { - const { visualElement: parent } = useContext(MotionContext); - const lazyContext = useContext(LazyContext); - const presenceContext = useContext(PresenceContext); - const motionConfig = useContext(MotionConfigContext); - const reducedMotionConfig = motionConfig.reducedMotion; - const skipAnimations = motionConfig.skipAnimations; - const visualElementRef = useRef(null); - /** - * Track whether the component has been through React's commit phase. - * Used to detect when LazyMotion features load after the component has mounted. - */ - const hasMountedOnce = useRef(false); - /** - * If we haven't preloaded a renderer, check to see if we have one lazy-loaded - */ - createVisualElement = - createVisualElement || - lazyContext.renderer; - if (!visualElementRef.current && createVisualElement) { - visualElementRef.current = createVisualElement(Component, { - visualState, - parent, - props, - presenceContext, - blockInitialAnimation: presenceContext - ? presenceContext.initial === false - : false, - reducedMotionConfig, - skipAnimations, - isSVG, - }); - /** - * If the component has already mounted before features loaded (e.g. via - * LazyMotion with async feature loading), we need to force the initial - * animation to run. Otherwise state changes that occurred before features - * loaded will be lost and the element will snap to its final state. - */ - if (hasMountedOnce.current && visualElementRef.current) { - visualElementRef.current.manuallyAnimateOnMount = true; - } - } - const visualElement = visualElementRef.current; - /** - * Load Motion gesture and animation features. These are rendered as renderless - * components so each feature can optionally make use of React lifecycle methods. - */ - const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext); - if (visualElement && - !visualElement.projection && - ProjectionNodeConstructor && - (visualElement.type === "html" || visualElement.type === "svg")) { - createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig); - } - const isMounted = useRef(false); - useInsertionEffect(() => { - /** - * Check the component has already mounted before calling - * `update` unnecessarily. This ensures we skip the initial update. - */ - if (visualElement && isMounted.current) { - visualElement.update(props, presenceContext); - } - }); - /** - * Cache this value as we want to know whether HandoffAppearAnimations - * was present on initial render - it will be deleted after this. - */ - const optimisedAppearId = props[optimizedAppearDataAttribute]; - const wantsHandoff = useRef(Boolean(optimisedAppearId) && - typeof window !== "undefined" && - !window.MotionHandoffIsComplete?.(optimisedAppearId) && - window.MotionHasOptimisedAnimation?.(optimisedAppearId)); - useIsomorphicLayoutEffect(() => { - /** - * Track that this component has mounted. This is used to detect when - * LazyMotion features load after the component has already committed. - */ - hasMountedOnce.current = true; - if (!visualElement) - return; - isMounted.current = true; - window.MotionIsMounted = true; - visualElement.updateFeatures(); - visualElement.scheduleRenderMicrotask(); - /** - * Ideally this function would always run in a useEffect. - * - * However, if we have optimised appear animations to handoff from, - * it needs to happen synchronously to ensure there's no flash of - * incorrect styles in the event of a hydration error. - * - * So if we detect a situtation where optimised appear animations - * are running, we use useLayoutEffect to trigger animations. - */ - if (wantsHandoff.current && visualElement.animationState) { - visualElement.animationState.animateChanges(); - } - }); - useEffect(() => { - if (!visualElement) - return; - if (!wantsHandoff.current && visualElement.animationState) { - visualElement.animationState.animateChanges(); - } - if (wantsHandoff.current) { - // This ensures all future calls to animateChanges() in this component will run in useEffect - queueMicrotask(() => { - window.MotionHandoffMarkAsComplete?.(optimisedAppearId); - }); - wantsHandoff.current = false; - } - /** - * Now we've finished triggering animations for this element we - * can wipe the enteringChildren set for the next render. - */ - visualElement.enteringChildren = undefined; - }); - return visualElement; -} -function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) { - const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutAnchor, layoutCrossfade, } = props; - visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"] - ? undefined - : getClosestProjectingNode(visualElement.parent)); - visualElement.projection.setOptions({ - layoutId, - layout, - alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)), - visualElement, - /** - * TODO: Update options in an effect. This could be tricky as it'll be too late - * to update by the time layout animations run. - * We also need to fix this safeToRemove by linking it up to the one returned by usePresence, - * ensuring it gets called if there's no potential layout animations. - * - */ - animationType: typeof layout === "string" ? layout : "both", - initialPromotionConfig, - crossfade: layoutCrossfade, - layoutScroll, - layoutRoot, - layoutAnchor, - }); -} -function getClosestProjectingNode(visualElement) { - if (!visualElement) - return undefined; - return visualElement.options.allowProjection !== false - ? visualElement.projection - : getClosestProjectingNode(visualElement.parent); -} - -export { useVisualElement }; -//# sourceMappingURL=use-visual-element.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.map deleted file mode 100644 index e5fa3645..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-visual-element.mjs","sources":["../../../../src/motion/utils/use-visual-element.ts"],"sourcesContent":["\"use client\"\n\nimport {\n optimizedAppearDataAttribute,\n type HTMLRenderState,\n type SVGRenderState,\n type VisualElement,\n} from \"motion-dom\"\nimport * as React from \"react\"\nimport { useContext, useEffect, useInsertionEffect, useRef } from \"react\"\nimport { LazyContext } from \"../../context/LazyContext\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { MotionContext } from \"../../context/MotionContext\"\nimport { PresenceContext } from \"../../context/PresenceContext\"\nimport {\n InitialPromotionConfig,\n SwitchLayoutGroupContext,\n} from \"../../context/SwitchLayoutGroupContext\"\nimport { MotionProps } from \"../../motion/types\"\nimport type { IProjectionNode } from \"motion-dom\"\nimport { DOMMotionComponents } from \"../../render/dom/types\"\nimport { CreateVisualElement } from \"../../render/types\"\nimport { isRefObject } from \"../../utils/is-ref-object\"\nimport { useIsomorphicLayoutEffect } from \"../../utils/use-isomorphic-effect\"\nimport { VisualState } from \"./use-visual-state\"\n\nexport function useVisualElement<\n Props,\n TagName extends keyof DOMMotionComponents | string\n>(\n Component: TagName | string | React.ComponentType,\n visualState:\n | VisualState\n | VisualState,\n props: MotionProps & Partial,\n createVisualElement?: CreateVisualElement,\n ProjectionNodeConstructor?: any,\n isSVG?: boolean\n): VisualElement | undefined {\n const { visualElement: parent } = useContext(MotionContext)\n const lazyContext = useContext(LazyContext)\n const presenceContext = useContext(PresenceContext)\n const motionConfig = useContext(MotionConfigContext)\n const reducedMotionConfig = motionConfig.reducedMotion\n const skipAnimations = motionConfig.skipAnimations\n\n const visualElementRef = useRef | null>(null)\n\n /**\n * Track whether the component has been through React's commit phase.\n * Used to detect when LazyMotion features load after the component has mounted.\n */\n const hasMountedOnce = useRef(false)\n\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement =\n createVisualElement ||\n (lazyContext.renderer as CreateVisualElement)\n\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n skipAnimations,\n isSVG,\n })\n\n /**\n * If the component has already mounted before features loaded (e.g. via\n * LazyMotion with async feature loading), we need to force the initial\n * animation to run. Otherwise state changes that occurred before features\n * loaded will be lost and the element will snap to its final state.\n */\n if (hasMountedOnce.current && visualElementRef.current) {\n visualElementRef.current.manuallyAnimateOnMount = true\n }\n }\n\n const visualElement = visualElementRef.current\n\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext)\n\n if (\n visualElement &&\n !visualElement.projection &&\n ProjectionNodeConstructor &&\n (visualElement.type === \"html\" || visualElement.type === \"svg\")\n ) {\n createProjectionNode(\n visualElementRef.current!,\n props,\n ProjectionNodeConstructor,\n initialLayoutGroupConfig\n )\n }\n\n const isMounted = useRef(false)\n useInsertionEffect(() => {\n /**\n * Check the component has already mounted before calling\n * `update` unnecessarily. This ensures we skip the initial update.\n */\n if (visualElement && isMounted.current) {\n visualElement.update(props, presenceContext)\n }\n })\n\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const optimisedAppearId =\n props[optimizedAppearDataAttribute as keyof typeof props]\n const wantsHandoff = useRef(\n Boolean(optimisedAppearId) &&\n typeof window !== \"undefined\" &&\n !window.MotionHandoffIsComplete?.(optimisedAppearId) &&\n window.MotionHasOptimisedAnimation?.(optimisedAppearId)\n )\n\n useIsomorphicLayoutEffect(() => {\n /**\n * Track that this component has mounted. This is used to detect when\n * LazyMotion features load after the component has already committed.\n */\n hasMountedOnce.current = true\n\n if (!visualElement) return\n\n isMounted.current = true\n window.MotionIsMounted = true\n\n visualElement.updateFeatures()\n visualElement.scheduleRenderMicrotask()\n\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges()\n }\n })\n\n useEffect(() => {\n if (!visualElement) return\n\n if (!wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges()\n }\n\n if (wantsHandoff.current) {\n // This ensures all future calls to animateChanges() in this component will run in useEffect\n queueMicrotask(() => {\n window.MotionHandoffMarkAsComplete?.(optimisedAppearId)\n })\n\n wantsHandoff.current = false\n }\n\n /**\n * Now we've finished triggering animations for this element we\n * can wipe the enteringChildren set for the next render.\n */\n visualElement.enteringChildren = undefined\n })\n\n return visualElement!\n}\n\nfunction createProjectionNode(\n visualElement: VisualElement,\n props: MotionProps,\n ProjectionNodeConstructor: any,\n initialPromotionConfig?: InitialPromotionConfig\n) {\n const {\n layoutId,\n layout,\n drag,\n dragConstraints,\n layoutScroll,\n layoutRoot,\n layoutAnchor,\n layoutCrossfade,\n } = props\n\n visualElement.projection = new ProjectionNodeConstructor(\n visualElement.latestValues,\n props[\"data-framer-portal-id\"]\n ? undefined\n : getClosestProjectingNode(visualElement.parent)\n ) as IProjectionNode\n\n visualElement.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout:\n Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement,\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig,\n crossfade: layoutCrossfade,\n layoutScroll,\n layoutRoot,\n layoutAnchor,\n })\n}\n\nfunction getClosestProjectingNode(\n visualElement?: VisualElement<\n unknown,\n unknown,\n { allowProjection?: boolean }\n >\n): IProjectionNode | undefined {\n if (!visualElement) return undefined\n\n return visualElement.options.allowProjection !== false\n ? visualElement.projection\n : getClosestProjectingNode(visualElement.parent)\n}\n"],"names":[],"mappings":";;;;;;;;;;;AA0BM;;AAcF;AACA;AACA;AACA;AACA;AAEA;AAIA;;;AAGG;AACH;AAEA;;AAEG;;;;AAKH;AACI;;;;;AAKI;AACI;AACA;;;;AAIP;AAED;;;;;AAKG;;AAEC;;;AAIR;AAEA;;;AAGG;AACH;AAEA;;;AAII;;;AAUJ;;AAEI;;;AAGG;AACH;AACI;;AAER;AAEA;;;AAGG;AACH;AAEA;;AAGQ;AACA;;AAIJ;;;AAGG;AACH;AAEA;;AAEA;AACA;;;AAKA;;;;;;;;;AASG;;AAEC;;AAER;;AAGI;;;AAGI;;AAGJ;;;AAGQ;AACJ;AAEA;;AAGJ;;;AAGG;AACH;AACJ;AAEA;AACJ;AAEA;AAMI;AAWA;AAGQ;;AAIR;;;AAGI;;AAGA;;;;;;AAMG;AACH;;AAEA;;;;AAIH;AACL;AAEA;AAOI;AAAoB;AAEpB;;AAEI;AACR;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs deleted file mode 100644 index 433af584..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs +++ /dev/null @@ -1,78 +0,0 @@ -"use client"; -import { resolveMotionValue, isControllingVariants, isVariantNode, isAnimationControls, resolveVariantFromProps } from 'motion-dom'; -import { useContext } from 'react'; -import { MotionContext } from '../../context/MotionContext/index.mjs'; -import { PresenceContext } from '../../context/PresenceContext.mjs'; -import { useConstant } from '../../utils/use-constant.mjs'; - -function makeState({ scrapeMotionValuesFromProps, createRenderState, }, props, context, presenceContext) { - const state = { - latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps), - renderState: createRenderState(), - }; - return state; -} -function makeLatestValues(props, context, presenceContext, scrapeMotionValues) { - const values = {}; - const motionValues = scrapeMotionValues(props, {}); - for (const key in motionValues) { - values[key] = resolveMotionValue(motionValues[key]); - } - let { initial, animate } = props; - const isControllingVariants$1 = isControllingVariants(props); - const isVariantNode$1 = isVariantNode(props); - if (context && - isVariantNode$1 && - !isControllingVariants$1 && - props.inherit !== false) { - if (initial === undefined) - initial = context.initial; - if (animate === undefined) - animate = context.animate; - } - let isInitialAnimationBlocked = presenceContext - ? presenceContext.initial === false - : false; - isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false; - const variantToSet = isInitialAnimationBlocked ? animate : initial; - if (variantToSet && - typeof variantToSet !== "boolean" && - !isAnimationControls(variantToSet)) { - const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet]; - for (let i = 0; i < list.length; i++) { - const resolved = resolveVariantFromProps(props, list[i]); - if (resolved) { - const { transitionEnd, transition, ...target } = resolved; - for (const key in target) { - let valueTarget = target[key]; - if (Array.isArray(valueTarget)) { - /** - * Take final keyframe if the initial animation is blocked because - * we want to initialise at the end of that blocked animation. - */ - const index = isInitialAnimationBlocked - ? valueTarget.length - 1 - : 0; - valueTarget = valueTarget[index]; - } - if (valueTarget !== null) { - values[key] = valueTarget; - } - } - for (const key in transitionEnd) { - values[key] = transitionEnd[key]; - } - } - } - } - return values; -} -const makeUseVisualState = (config) => (props, isStatic) => { - const context = useContext(MotionContext); - const presenceContext = useContext(PresenceContext); - const make = () => makeState(config, props, context, presenceContext); - return isStatic ? make() : useConstant(make); -}; - -export { makeUseVisualState }; -//# sourceMappingURL=use-visual-state.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.map deleted file mode 100644 index bca2c6db..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-visual-state.mjs","sources":["../../../../src/motion/utils/use-visual-state.ts"],"sourcesContent":["\"use client\"\n\nimport {\n AnyResolvedKeyframe,\n isAnimationControls,\n isControllingVariants as checkIsControllingVariants,\n isVariantNode as checkIsVariantNode,\n ResolvedValues,\n resolveVariantFromProps,\n} from \"motion-dom\"\nimport { useContext } from \"react\"\nimport { MotionContext, MotionContextProps } from \"../../context/MotionContext\"\nimport {\n PresenceContext,\n type PresenceContextProps,\n} from \"../../context/PresenceContext\"\nimport { ScrapeMotionValuesFromProps } from \"../../render/types\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { resolveMotionValue } from \"motion-dom\"\nimport { MotionProps } from \"../types\"\n\nexport interface VisualState {\n renderState: RenderState\n latestValues: ResolvedValues\n onMount?: (instance: Instance) => void\n}\n\nexport type UseVisualState = (\n props: MotionProps,\n isStatic: boolean\n) => VisualState\n\nexport interface UseVisualStateConfig {\n scrapeMotionValuesFromProps: ScrapeMotionValuesFromProps\n createRenderState: () => RenderState\n}\n\nfunction makeState(\n {\n scrapeMotionValuesFromProps,\n createRenderState,\n }: UseVisualStateConfig,\n props: MotionProps,\n context: MotionContextProps,\n presenceContext: PresenceContextProps | null\n) {\n const state: VisualState = {\n latestValues: makeLatestValues(\n props,\n context,\n presenceContext,\n scrapeMotionValuesFromProps\n ),\n renderState: createRenderState(),\n }\n\n return state\n}\n\nfunction makeLatestValues(\n props: MotionProps,\n context: MotionContextProps,\n presenceContext: PresenceContextProps | null,\n scrapeMotionValues: ScrapeMotionValuesFromProps\n) {\n const values: ResolvedValues = {}\n\n const motionValues = scrapeMotionValues(props, {})\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key])\n }\n\n let { initial, animate } = props\n const isControllingVariants = checkIsControllingVariants(props)\n const isVariantNode = checkIsVariantNode(props)\n\n if (\n context &&\n isVariantNode &&\n !isControllingVariants &&\n props.inherit !== false\n ) {\n if (initial === undefined) initial = context.initial\n if (animate === undefined) animate = context.animate\n }\n\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false\n\n const variantToSet = isInitialAnimationBlocked ? animate : initial\n\n if (\n variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)\n ) {\n const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet]\n for (let i = 0; i < list.length; i++) {\n const resolved = resolveVariantFromProps(props, list[i] as any)\n if (resolved) {\n const { transitionEnd, transition, ...target } = resolved\n for (const key in target) {\n let valueTarget = target[key as keyof typeof target]\n\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0\n valueTarget = valueTarget[index] as any\n }\n\n if (valueTarget !== null) {\n values[key] = valueTarget as AnyResolvedKeyframe\n }\n }\n for (const key in transitionEnd) {\n values[key] = transitionEnd[\n key as keyof typeof transitionEnd\n ] as AnyResolvedKeyframe\n }\n }\n }\n }\n\n return values\n}\n\nexport const makeUseVisualState =\n (config: UseVisualStateConfig): UseVisualState =>\n (props: MotionProps, isStatic: boolean): VisualState => {\n const context = useContext(MotionContext)\n const presenceContext = useContext(PresenceContext)\n const make = () => makeState(config, props, context, presenceContext)\n\n return isStatic ? make() : useConstant(make)\n }\n"],"names":[],"mappings":";;;;;;;AAqCA;AASI;;;;AAUA;AACJ;AAEA;;;AASI;;;AAIA;AACA;AACA;AAEA;;AAGI;AACA;;AAE2B;;AACA;;;AAI3B;;AAEJ;;AAIA;;AAGI;AAEA;AACA;;;;AAIQ;AACI;AAEA;AACI;;;AAGG;;AAEC;;AAEJ;;AAGJ;AACI;;;AAGR;;;;;;AASZ;AACJ;AAEO;AAGC;AACA;AACA;AAEA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs deleted file mode 100644 index e4c52d63..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs +++ /dev/null @@ -1,59 +0,0 @@ -/** - * A list of all valid MotionProps. - * - * @privateRemarks - * This doesn't throw if a `MotionProp` name is missing - it should. - */ -const validMotionProps = new Set([ - "animate", - "exit", - "variants", - "initial", - "style", - "values", - "variants", - "transition", - "transformTemplate", - "custom", - "inherit", - "onBeforeLayoutMeasure", - "onAnimationStart", - "onAnimationComplete", - "onUpdate", - "onDragStart", - "onDrag", - "onDragEnd", - "onMeasureDragConstraints", - "onDirectionLock", - "onDragTransitionEnd", - "_dragX", - "_dragY", - "onHoverStart", - "onHoverEnd", - "onViewportEnter", - "onViewportLeave", - "globalTapTarget", - "propagate", - "ignoreStrict", - "viewport", -]); -/** - * Check whether a prop name is a valid `MotionProp` key. - * - * @param key - Name of the property to check - * @returns `true` is key is a valid `MotionProp`. - * - * @public - */ -function isValidMotionProp(key) { - return (key.startsWith("while") || - (key.startsWith("drag") && key !== "draggable") || - key.startsWith("layout") || - key.startsWith("onTap") || - key.startsWith("onPan") || - key.startsWith("onLayout") || - validMotionProps.has(key)); -} - -export { isValidMotionProp }; -//# sourceMappingURL=valid-prop.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.map deleted file mode 100644 index 0d7bdd05..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"valid-prop.mjs","sources":["../../../../src/motion/utils/valid-prop.ts"],"sourcesContent":["import { MotionProps } from \"../types\"\n\n/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"custom\",\n \"inherit\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"globalTapTarget\",\n \"propagate\",\n \"ignoreStrict\",\n \"viewport\",\n])\n\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nexport function isValidMotionProp(key: string) {\n return (\n key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n key.startsWith(\"onLayout\") ||\n validMotionProps.has(key as keyof MotionProps)\n )\n}\n"],"names":[],"mappings":"AAEA;;;;;AAKG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAoB;IAChD,SAAS;IACT,MAAM;IACN,UAAU;IACV,SAAS;IACT,OAAO;IACP,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,mBAAmB;IACnB,QAAQ;IACR,SAAS;IACT,uBAAuB;IACvB,kBAAkB;IAClB,qBAAqB;IACrB,UAAU;IACV,aAAa;IACb,QAAQ;IACR,WAAW;IACX,0BAA0B;IAC1B,iBAAiB;IACjB,qBAAqB;IACrB,QAAQ;IACR,QAAQ;IACR,cAAc;IACd,YAAY;IACZ,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,WAAW;IACX,cAAc;IACd,UAAU;AACb,CAAA,CAAC;AAEF;;;;;;;AAOG;AACG,SAAU,iBAAiB,CAAC,GAAW,EAAA;AACzC,IAAA,QACI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;SACtB,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,GAAG,KAAK,WAAW,CAAC;AAC/C,QAAA,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC;AACxB,QAAA,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;AACvB,QAAA,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;AACvB,QAAA,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC;AAC1B,QAAA,gBAAgB,CAAC,GAAG,CAAC,GAAwB,CAAC;AAEtD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection.mjs deleted file mode 100644 index 902c523b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection.mjs +++ /dev/null @@ -1,2 +0,0 @@ -export { HTMLProjectionNode, HTMLVisualElement, addScaleCorrector, buildTransform, calcBoxDelta, correctBorderRadius, correctBoxShadow, frame, frameData, mix, nodeGroup, recordStats, statsBuffer } from 'motion-dom'; -//# sourceMappingURL=projection.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection.mjs.map deleted file mode 100644 index 2f608b0f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"projection.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs deleted file mode 100644 index 914d498e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { rootProjectionNode } from 'motion-dom'; - -function useInstantLayoutTransition() { - return startTransition; -} -function startTransition(callback) { - if (!rootProjectionNode.current) - return; - rootProjectionNode.current.isUpdating = false; - rootProjectionNode.current.blockUpdate(); - callback && callback(); -} - -export { useInstantLayoutTransition }; -//# sourceMappingURL=use-instant-layout-transition.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs.map deleted file mode 100644 index 4186a7d5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-instant-layout-transition.mjs","sources":["../../../src/projection/use-instant-layout-transition.ts"],"sourcesContent":["import { rootProjectionNode } from \"motion-dom\"\n\nexport function useInstantLayoutTransition(): (\n cb?: (() => void) | undefined\n) => void {\n return startTransition\n}\n\nfunction startTransition(callback?: () => void) {\n if (!rootProjectionNode.current) return\n rootProjectionNode.current.isUpdating = false\n rootProjectionNode.current.blockUpdate()\n callback && callback()\n}\n"],"names":[],"mappings":";;SAEgB,0BAA0B,GAAA;AAGtC,IAAA,OAAO,eAAe;AAC1B;AAEA,SAAS,eAAe,CAAC,QAAqB,EAAA;IAC1C,IAAI,CAAC,kBAAkB,CAAC,OAAO;QAAE;AACjC,IAAA,kBAAkB,CAAC,OAAO,CAAC,UAAU,GAAG,KAAK;AAC7C,IAAA,kBAAkB,CAAC,OAAO,CAAC,WAAW,EAAE;IACxC,QAAQ,IAAI,QAAQ,EAAE;AAC1B;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs deleted file mode 100644 index 4ef3e87b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { useCallback } from 'react'; -import { rootProjectionNode } from 'motion-dom'; - -function useResetProjection() { - const reset = useCallback(() => { - const root = rootProjectionNode.current; - if (!root) - return; - root.resetTree(); - }, []); - return reset; -} - -export { useResetProjection }; -//# sourceMappingURL=use-reset-projection.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs.map deleted file mode 100644 index 9e26d997..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-reset-projection.mjs","sources":["../../../src/projection/use-reset-projection.ts"],"sourcesContent":["import { useCallback } from \"react\";\nimport { rootProjectionNode } from \"motion-dom\"\n\nexport function useResetProjection() {\n const reset = useCallback(() => {\n const root = rootProjectionNode.current\n if (!root) return\n root.resetTree()\n }, [])\n\n return reset\n}\n"],"names":[],"mappings":";;;SAGgB,kBAAkB,GAAA;AAC9B,IAAA,MAAM,KAAK,GAAG,WAAW,CAAC,MAAK;AAC3B,QAAA,MAAM,IAAI,GAAG,kBAAkB,CAAC,OAAO;AACvC,QAAA,IAAI,CAAC,IAAI;YAAE;QACX,IAAI,CAAC,SAAS,EAAE;IACpB,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,OAAO,KAAK;AAChB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs deleted file mode 100644 index 5252bc2c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs +++ /dev/null @@ -1,46 +0,0 @@ -import { warnOnce } from 'motion-utils'; -import { createMotionComponent } from '../../motion/index.mjs'; - -function createMotionProxy(preloadedFeatures, createVisualElement) { - if (typeof Proxy === "undefined") { - return createMotionComponent; - } - /** - * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc. - * Rather than generating them anew every render. - */ - const componentCache = new Map(); - const factory = (Component, options) => { - return createMotionComponent(Component, options, preloadedFeatures, createVisualElement); - }; - /** - * Support for deprecated`motion(Component)` pattern - */ - const deprecatedFactoryFunction = (Component, options) => { - if (process.env.NODE_ENV !== "production") { - warnOnce(false, "motion() is deprecated. Use motion.create() instead."); - } - return factory(Component, options); - }; - return new Proxy(deprecatedFactoryFunction, { - /** - * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc. - * The prop name is passed through as `key` and we can use that to generate a `motion` - * DOM component with that name. - */ - get: (_target, key) => { - if (key === "create") - return factory; - /** - * If this element doesn't exist in the component cache, create it and cache. - */ - if (!componentCache.has(key)) { - componentCache.set(key, createMotionComponent(key, undefined, preloadedFeatures, createVisualElement)); - } - return componentCache.get(key); - }, - }); -} - -export { createMotionProxy }; -//# sourceMappingURL=create-proxy.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.map deleted file mode 100644 index c220c4db..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create-proxy.mjs","sources":["../../../../src/render/components/create-proxy.ts"],"sourcesContent":["import { warnOnce } from \"motion-utils\"\nimport { createMotionComponent, MotionComponentOptions } from \"../../motion\"\nimport { FeaturePackages } from \"../../motion/features/types\"\nimport { MotionProps } from \"../../motion/types\"\nimport { DOMMotionComponents } from \"../dom/types\"\nimport { CreateVisualElement } from \"../types\"\n\n/**\n * I'd rather the return type of `custom` to be implicit but this throws\n * incorrect relative paths in the exported types and API Extractor throws\n * a wobbly.\n */\ntype ComponentProps = React.PropsWithoutRef &\n React.RefAttributes\nexport type CustomDomComponent = React.ComponentType<\n ComponentProps\n>\n\ntype MotionProxy = typeof createMotionComponent &\n DOMMotionComponents & { create: typeof createMotionComponent }\n\nexport function createMotionProxy(\n preloadedFeatures?: FeaturePackages,\n createVisualElement?: CreateVisualElement\n): MotionProxy {\n if (typeof Proxy === \"undefined\") {\n return createMotionComponent as MotionProxy\n }\n\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n const componentCache = new Map()\n\n const factory = (Component: string, options?: MotionComponentOptions) => {\n return createMotionComponent(\n Component,\n options,\n preloadedFeatures,\n createVisualElement\n )\n }\n\n /**\n * Support for deprecated`motion(Component)` pattern\n */\n const deprecatedFactoryFunction = (\n Component: string,\n options?: MotionComponentOptions\n ) => {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n false,\n \"motion() is deprecated. Use motion.create() instead.\"\n )\n }\n return factory(Component, options)\n }\n\n return new Proxy(deprecatedFactoryFunction, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: (_target, key: string) => {\n if (key === \"create\") return factory\n\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(\n key,\n createMotionComponent(\n key,\n undefined,\n preloadedFeatures,\n createVisualElement\n )\n )\n }\n\n return componentCache.get(key)!\n },\n }) as MotionProxy\n}\n"],"names":[],"mappings":";;;AAqBM,SAAU,iBAAiB,CAC7B,iBAAmC,EACnC,mBAAmD,EAAA;AAEnD,IAAA,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;AAC9B,QAAA,OAAO,qBAAoC;IAC/C;AAEA;;;AAGG;AACH,IAAA,MAAM,cAAc,GAAG,IAAI,GAAG,EAAe;AAE7C,IAAA,MAAM,OAAO,GAAG,CAAC,SAAiB,EAAE,OAAgC,KAAI;QACpE,OAAO,qBAAqB,CACxB,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,mBAAmB,CACtB;AACL,IAAA,CAAC;AAED;;AAEG;AACH,IAAA,MAAM,yBAAyB,GAAG,CAC9B,SAAiB,EACjB,OAAgC,KAChC;QACA,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;AACvC,YAAA,QAAQ,CACJ,KAAK,EACL,sDAAsD,CACzD;QACL;AACA,QAAA,OAAO,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC;AACtC,IAAA,CAAC;AAED,IAAA,OAAO,IAAI,KAAK,CAAC,yBAAyB,EAAE;AACxC;;;;AAIG;AACH,QAAA,GAAG,EAAE,CAAC,OAAO,EAAE,GAAW,KAAI;YAC1B,IAAI,GAAG,KAAK,QAAQ;AAAE,gBAAA,OAAO,OAAO;AAEpC;;AAEG;YACH,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;AAC1B,gBAAA,cAAc,CAAC,GAAG,CACd,GAAG,EACH,qBAAqB,CACjB,GAAG,EACH,SAAS,EACT,iBAAiB,EACjB,mBAAmB,CACtB,CACJ;YACL;AAEA,YAAA,OAAO,cAAc,CAAC,GAAG,CAAC,GAAG,CAAE;QACnC,CAAC;AACJ,KAAA,CAAgB;AACrB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/create.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/create.mjs deleted file mode 100644 index 48a923c9..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/create.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import { createMotionComponent } from '../../../motion/index.mjs'; - -function createMinimalMotionComponent(Component, options) { - return createMotionComponent(Component, options); -} - -export { createMinimalMotionComponent }; -//# sourceMappingURL=create.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/create.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/create.mjs.map deleted file mode 100644 index 8c468364..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/create.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create.mjs","sources":["../../../../../src/render/components/m/create.ts"],"sourcesContent":["import { createMotionComponent, MotionComponentOptions } from \"../../../motion\"\nimport { DOMMotionComponents } from \"../../dom/types\"\n\nexport function createMinimalMotionComponent<\n Props,\n TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n Component: TagName | string | React.ComponentType,\n options?: MotionComponentOptions\n) {\n return createMotionComponent(Component, options)\n}\n"],"names":[],"mappings":";;AAGM,SAAU,4BAA4B,CAIxC,SAAwD,EACxD,OAAgC,EAAA;AAEhC,IAAA,OAAO,qBAAqB,CAAC,SAAS,EAAE,OAAO,CAAC;AACpD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/elements.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/elements.mjs deleted file mode 100644 index 7f37fed4..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/elements.mjs +++ /dev/null @@ -1,228 +0,0 @@ -"use client"; -import { createMinimalMotionComponent } from './create.mjs'; - -/** - * HTML components - */ -const MotionA = /*@__PURE__*/ createMinimalMotionComponent("a"); -const MotionAbbr = /*@__PURE__*/ createMinimalMotionComponent("abbr"); -const MotionAddress = -/*@__PURE__*/ createMinimalMotionComponent("address"); -const MotionArea = /*@__PURE__*/ createMinimalMotionComponent("area"); -const MotionArticle = -/*@__PURE__*/ createMinimalMotionComponent("article"); -const MotionAside = /*@__PURE__*/ createMinimalMotionComponent("aside"); -const MotionAudio = /*@__PURE__*/ createMinimalMotionComponent("audio"); -const MotionB = /*@__PURE__*/ createMinimalMotionComponent("b"); -const MotionBase = /*@__PURE__*/ createMinimalMotionComponent("base"); -const MotionBdi = /*@__PURE__*/ createMinimalMotionComponent("bdi"); -const MotionBdo = /*@__PURE__*/ createMinimalMotionComponent("bdo"); -const MotionBig = /*@__PURE__*/ createMinimalMotionComponent("big"); -const MotionBlockquote = -/*@__PURE__*/ createMinimalMotionComponent("blockquote"); -const MotionBody = /*@__PURE__*/ createMinimalMotionComponent("body"); -const MotionButton = /*@__PURE__*/ createMinimalMotionComponent("button"); -const MotionCanvas = /*@__PURE__*/ createMinimalMotionComponent("canvas"); -const MotionCaption = -/*@__PURE__*/ createMinimalMotionComponent("caption"); -const MotionCite = /*@__PURE__*/ createMinimalMotionComponent("cite"); -const MotionCode = /*@__PURE__*/ createMinimalMotionComponent("code"); -const MotionCol = /*@__PURE__*/ createMinimalMotionComponent("col"); -const MotionColgroup = -/*@__PURE__*/ createMinimalMotionComponent("colgroup"); -const MotionData = /*@__PURE__*/ createMinimalMotionComponent("data"); -const MotionDatalist = -/*@__PURE__*/ createMinimalMotionComponent("datalist"); -const MotionDd = /*@__PURE__*/ createMinimalMotionComponent("dd"); -const MotionDel = /*@__PURE__*/ createMinimalMotionComponent("del"); -const MotionDetails = -/*@__PURE__*/ createMinimalMotionComponent("details"); -const MotionDfn = /*@__PURE__*/ createMinimalMotionComponent("dfn"); -const MotionDialog = /*@__PURE__*/ createMinimalMotionComponent("dialog"); -const MotionDiv = /*@__PURE__*/ createMinimalMotionComponent("div"); -const MotionDl = /*@__PURE__*/ createMinimalMotionComponent("dl"); -const MotionDt = /*@__PURE__*/ createMinimalMotionComponent("dt"); -const MotionEm = /*@__PURE__*/ createMinimalMotionComponent("em"); -const MotionEmbed = /*@__PURE__*/ createMinimalMotionComponent("embed"); -const MotionFieldset = -/*@__PURE__*/ createMinimalMotionComponent("fieldset"); -const MotionFigcaption = -/*@__PURE__*/ createMinimalMotionComponent("figcaption"); -const MotionFigure = /*@__PURE__*/ createMinimalMotionComponent("figure"); -const MotionFooter = /*@__PURE__*/ createMinimalMotionComponent("footer"); -const MotionForm = /*@__PURE__*/ createMinimalMotionComponent("form"); -const MotionH1 = /*@__PURE__*/ createMinimalMotionComponent("h1"); -const MotionH2 = /*@__PURE__*/ createMinimalMotionComponent("h2"); -const MotionH3 = /*@__PURE__*/ createMinimalMotionComponent("h3"); -const MotionH4 = /*@__PURE__*/ createMinimalMotionComponent("h4"); -const MotionH5 = /*@__PURE__*/ createMinimalMotionComponent("h5"); -const MotionH6 = /*@__PURE__*/ createMinimalMotionComponent("h6"); -const MotionHead = /*@__PURE__*/ createMinimalMotionComponent("head"); -const MotionHeader = /*@__PURE__*/ createMinimalMotionComponent("header"); -const MotionHgroup = /*@__PURE__*/ createMinimalMotionComponent("hgroup"); -const MotionHr = /*@__PURE__*/ createMinimalMotionComponent("hr"); -const MotionHtml = /*@__PURE__*/ createMinimalMotionComponent("html"); -const MotionI = /*@__PURE__*/ createMinimalMotionComponent("i"); -const MotionIframe = /*@__PURE__*/ createMinimalMotionComponent("iframe"); -const MotionImg = /*@__PURE__*/ createMinimalMotionComponent("img"); -const MotionInput = /*@__PURE__*/ createMinimalMotionComponent("input"); -const MotionIns = /*@__PURE__*/ createMinimalMotionComponent("ins"); -const MotionKbd = /*@__PURE__*/ createMinimalMotionComponent("kbd"); -const MotionKeygen = /*@__PURE__*/ createMinimalMotionComponent("keygen"); -const MotionLabel = /*@__PURE__*/ createMinimalMotionComponent("label"); -const MotionLegend = /*@__PURE__*/ createMinimalMotionComponent("legend"); -const MotionLi = /*@__PURE__*/ createMinimalMotionComponent("li"); -const MotionLink = /*@__PURE__*/ createMinimalMotionComponent("link"); -const MotionMain = /*@__PURE__*/ createMinimalMotionComponent("main"); -const MotionMap = /*@__PURE__*/ createMinimalMotionComponent("map"); -const MotionMark = /*@__PURE__*/ createMinimalMotionComponent("mark"); -const MotionMenu = /*@__PURE__*/ createMinimalMotionComponent("menu"); -const MotionMenuitem = -/*@__PURE__*/ createMinimalMotionComponent("menuitem"); -const MotionMeter = /*@__PURE__*/ createMinimalMotionComponent("meter"); -const MotionNav = /*@__PURE__*/ createMinimalMotionComponent("nav"); -const MotionObject = /*@__PURE__*/ createMinimalMotionComponent("object"); -const MotionOl = /*@__PURE__*/ createMinimalMotionComponent("ol"); -const MotionOptgroup = -/*@__PURE__*/ createMinimalMotionComponent("optgroup"); -const MotionOption = /*@__PURE__*/ createMinimalMotionComponent("option"); -const MotionOutput = /*@__PURE__*/ createMinimalMotionComponent("output"); -const MotionP = /*@__PURE__*/ createMinimalMotionComponent("p"); -const MotionParam = /*@__PURE__*/ createMinimalMotionComponent("param"); -const MotionPicture = -/*@__PURE__*/ createMinimalMotionComponent("picture"); -const MotionPre = /*@__PURE__*/ createMinimalMotionComponent("pre"); -const MotionProgress = -/*@__PURE__*/ createMinimalMotionComponent("progress"); -const MotionQ = /*@__PURE__*/ createMinimalMotionComponent("q"); -const MotionRp = /*@__PURE__*/ createMinimalMotionComponent("rp"); -const MotionRt = /*@__PURE__*/ createMinimalMotionComponent("rt"); -const MotionRuby = /*@__PURE__*/ createMinimalMotionComponent("ruby"); -const MotionS = /*@__PURE__*/ createMinimalMotionComponent("s"); -const MotionSamp = /*@__PURE__*/ createMinimalMotionComponent("samp"); -const MotionScript = /*@__PURE__*/ createMinimalMotionComponent("script"); -const MotionSection = -/*@__PURE__*/ createMinimalMotionComponent("section"); -const MotionSelect = /*@__PURE__*/ createMinimalMotionComponent("select"); -const MotionSmall = /*@__PURE__*/ createMinimalMotionComponent("small"); -const MotionSource = /*@__PURE__*/ createMinimalMotionComponent("source"); -const MotionSpan = /*@__PURE__*/ createMinimalMotionComponent("span"); -const MotionStrong = /*@__PURE__*/ createMinimalMotionComponent("strong"); -const MotionStyle = /*@__PURE__*/ createMinimalMotionComponent("style"); -const MotionSub = /*@__PURE__*/ createMinimalMotionComponent("sub"); -const MotionSummary = -/*@__PURE__*/ createMinimalMotionComponent("summary"); -const MotionSup = /*@__PURE__*/ createMinimalMotionComponent("sup"); -const MotionTable = /*@__PURE__*/ createMinimalMotionComponent("table"); -const MotionTbody = /*@__PURE__*/ createMinimalMotionComponent("tbody"); -const MotionTd = /*@__PURE__*/ createMinimalMotionComponent("td"); -const MotionTextarea = -/*@__PURE__*/ createMinimalMotionComponent("textarea"); -const MotionTfoot = /*@__PURE__*/ createMinimalMotionComponent("tfoot"); -const MotionTh = /*@__PURE__*/ createMinimalMotionComponent("th"); -const MotionThead = /*@__PURE__*/ createMinimalMotionComponent("thead"); -const MotionTime = /*@__PURE__*/ createMinimalMotionComponent("time"); -const MotionTitle = /*@__PURE__*/ createMinimalMotionComponent("title"); -const MotionTr = /*@__PURE__*/ createMinimalMotionComponent("tr"); -const MotionTrack = /*@__PURE__*/ createMinimalMotionComponent("track"); -const MotionU = /*@__PURE__*/ createMinimalMotionComponent("u"); -const MotionUl = /*@__PURE__*/ createMinimalMotionComponent("ul"); -const MotionVideo = /*@__PURE__*/ createMinimalMotionComponent("video"); -const MotionWbr = /*@__PURE__*/ createMinimalMotionComponent("wbr"); -const MotionWebview = -/*@__PURE__*/ createMinimalMotionComponent("webview"); -/** - * SVG components - */ -const MotionAnimate = -/*@__PURE__*/ createMinimalMotionComponent("animate"); -const MotionCircle = /*@__PURE__*/ createMinimalMotionComponent("circle"); -const MotionDefs = /*@__PURE__*/ createMinimalMotionComponent("defs"); -const MotionDesc = /*@__PURE__*/ createMinimalMotionComponent("desc"); -const MotionEllipse = -/*@__PURE__*/ createMinimalMotionComponent("ellipse"); -const MotionG = /*@__PURE__*/ createMinimalMotionComponent("g"); -const MotionImage = /*@__PURE__*/ createMinimalMotionComponent("image"); -const MotionLine = /*@__PURE__*/ createMinimalMotionComponent("line"); -const MotionFilter = /*@__PURE__*/ createMinimalMotionComponent("filter"); -const MotionMarker = /*@__PURE__*/ createMinimalMotionComponent("marker"); -const MotionMask = /*@__PURE__*/ createMinimalMotionComponent("mask"); -const MotionMetadata = -/*@__PURE__*/ createMinimalMotionComponent("metadata"); -const MotionPath = /*@__PURE__*/ createMinimalMotionComponent("path"); -const MotionPattern = -/*@__PURE__*/ createMinimalMotionComponent("pattern"); -const MotionPolygon = -/*@__PURE__*/ createMinimalMotionComponent("polygon"); -const MotionPolyline = -/*@__PURE__*/ createMinimalMotionComponent("polyline"); -const MotionRect = /*@__PURE__*/ createMinimalMotionComponent("rect"); -const MotionStop = /*@__PURE__*/ createMinimalMotionComponent("stop"); -const MotionSvg = /*@__PURE__*/ createMinimalMotionComponent("svg"); -const MotionSymbol = /*@__PURE__*/ createMinimalMotionComponent("symbol"); -const MotionText = /*@__PURE__*/ createMinimalMotionComponent("text"); -const MotionTspan = /*@__PURE__*/ createMinimalMotionComponent("tspan"); -const MotionUse = /*@__PURE__*/ createMinimalMotionComponent("use"); -const MotionView = /*@__PURE__*/ createMinimalMotionComponent("view"); -const MotionClipPath = -/*@__PURE__*/ createMinimalMotionComponent("clipPath"); -const MotionFeBlend = -/*@__PURE__*/ createMinimalMotionComponent("feBlend"); -const MotionFeColorMatrix = -/*@__PURE__*/ createMinimalMotionComponent("feColorMatrix"); -const MotionFeComponentTransfer = -/*@__PURE__*/ createMinimalMotionComponent("feComponentTransfer"); -const MotionFeComposite = -/*@__PURE__*/ createMinimalMotionComponent("feComposite"); -const MotionFeConvolveMatrix = -/*@__PURE__*/ createMinimalMotionComponent("feConvolveMatrix"); -const MotionFeDiffuseLighting = -/*@__PURE__*/ createMinimalMotionComponent("feDiffuseLighting"); -const MotionFeDisplacementMap = -/*@__PURE__*/ createMinimalMotionComponent("feDisplacementMap"); -const MotionFeDistantLight = -/*@__PURE__*/ createMinimalMotionComponent("feDistantLight"); -const MotionFeDropShadow = -/*@__PURE__*/ createMinimalMotionComponent("feDropShadow"); -const MotionFeFlood = -/*@__PURE__*/ createMinimalMotionComponent("feFlood"); -const MotionFeFuncA = -/*@__PURE__*/ createMinimalMotionComponent("feFuncA"); -const MotionFeFuncB = -/*@__PURE__*/ createMinimalMotionComponent("feFuncB"); -const MotionFeFuncG = -/*@__PURE__*/ createMinimalMotionComponent("feFuncG"); -const MotionFeFuncR = -/*@__PURE__*/ createMinimalMotionComponent("feFuncR"); -const MotionFeGaussianBlur = -/*@__PURE__*/ createMinimalMotionComponent("feGaussianBlur"); -const MotionFeImage = -/*@__PURE__*/ createMinimalMotionComponent("feImage"); -const MotionFeMerge = -/*@__PURE__*/ createMinimalMotionComponent("feMerge"); -const MotionFeMergeNode = -/*@__PURE__*/ createMinimalMotionComponent("feMergeNode"); -const MotionFeMorphology = -/*@__PURE__*/ createMinimalMotionComponent("feMorphology"); -const MotionFeOffset = -/*@__PURE__*/ createMinimalMotionComponent("feOffset"); -const MotionFePointLight = -/*@__PURE__*/ createMinimalMotionComponent("fePointLight"); -const MotionFeSpecularLighting = -/*@__PURE__*/ createMinimalMotionComponent("feSpecularLighting"); -const MotionFeSpotLight = -/*@__PURE__*/ createMinimalMotionComponent("feSpotLight"); -const MotionFeTile = /*@__PURE__*/ createMinimalMotionComponent("feTile"); -const MotionFeTurbulence = -/*@__PURE__*/ createMinimalMotionComponent("feTurbulence"); -const MotionForeignObject = -/*@__PURE__*/ createMinimalMotionComponent("foreignObject"); -const MotionLinearGradient = -/*@__PURE__*/ createMinimalMotionComponent("linearGradient"); -const MotionRadialGradient = -/*@__PURE__*/ createMinimalMotionComponent("radialGradient"); -const MotionTextPath = -/*@__PURE__*/ createMinimalMotionComponent("textPath"); - -export { MotionA, MotionAbbr, MotionAddress, MotionAnimate, MotionArea, MotionArticle, MotionAside, MotionAudio, MotionB, MotionBase, MotionBdi, MotionBdo, MotionBig, MotionBlockquote, MotionBody, MotionButton, MotionCanvas, MotionCaption, MotionCircle, MotionCite, MotionClipPath, MotionCode, MotionCol, MotionColgroup, MotionData, MotionDatalist, MotionDd, MotionDefs, MotionDel, MotionDesc, MotionDetails, MotionDfn, MotionDialog, MotionDiv, MotionDl, MotionDt, MotionEllipse, MotionEm, MotionEmbed, MotionFeBlend, MotionFeColorMatrix, MotionFeComponentTransfer, MotionFeComposite, MotionFeConvolveMatrix, MotionFeDiffuseLighting, MotionFeDisplacementMap, MotionFeDistantLight, MotionFeDropShadow, MotionFeFlood, MotionFeFuncA, MotionFeFuncB, MotionFeFuncG, MotionFeFuncR, MotionFeGaussianBlur, MotionFeImage, MotionFeMerge, MotionFeMergeNode, MotionFeMorphology, MotionFeOffset, MotionFePointLight, MotionFeSpecularLighting, MotionFeSpotLight, MotionFeTile, MotionFeTurbulence, MotionFieldset, MotionFigcaption, MotionFigure, MotionFilter, MotionFooter, MotionForeignObject, MotionForm, MotionG, MotionH1, MotionH2, MotionH3, MotionH4, MotionH5, MotionH6, MotionHead, MotionHeader, MotionHgroup, MotionHr, MotionHtml, MotionI, MotionIframe, MotionImage, MotionImg, MotionInput, MotionIns, MotionKbd, MotionKeygen, MotionLabel, MotionLegend, MotionLi, MotionLine, MotionLinearGradient, MotionLink, MotionMain, MotionMap, MotionMark, MotionMarker, MotionMask, MotionMenu, MotionMenuitem, MotionMetadata, MotionMeter, MotionNav, MotionObject, MotionOl, MotionOptgroup, MotionOption, MotionOutput, MotionP, MotionParam, MotionPath, MotionPattern, MotionPicture, MotionPolygon, MotionPolyline, MotionPre, MotionProgress, MotionQ, MotionRadialGradient, MotionRect, MotionRp, MotionRt, MotionRuby, MotionS, MotionSamp, MotionScript, MotionSection, MotionSelect, MotionSmall, MotionSource, MotionSpan, MotionStop, MotionStrong, MotionStyle, MotionSub, MotionSummary, MotionSup, MotionSvg, MotionSymbol, MotionTable, MotionTbody, MotionTd, MotionText, MotionTextPath, MotionTextarea, MotionTfoot, MotionTh, MotionThead, MotionTime, MotionTitle, MotionTr, MotionTrack, MotionTspan, MotionU, MotionUl, MotionUse, MotionVideo, MotionView, MotionWbr, MotionWebview }; -//# sourceMappingURL=elements.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/elements.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/elements.mjs.map deleted file mode 100644 index 59c7b46f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/elements.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"elements.mjs","sources":["../../../../../src/render/components/m/elements.ts"],"sourcesContent":["\"use client\"\n\nimport { createMinimalMotionComponent } from \"./create\"\n\n/**\n * HTML components\n */\nexport const MotionA = /*@__PURE__*/ createMinimalMotionComponent(\"a\")\nexport const MotionAbbr = /*@__PURE__*/ createMinimalMotionComponent(\"abbr\")\nexport const MotionAddress =\n /*@__PURE__*/ createMinimalMotionComponent(\"address\")\nexport const MotionArea = /*@__PURE__*/ createMinimalMotionComponent(\"area\")\nexport const MotionArticle =\n /*@__PURE__*/ createMinimalMotionComponent(\"article\")\nexport const MotionAside = /*@__PURE__*/ createMinimalMotionComponent(\"aside\")\nexport const MotionAudio = /*@__PURE__*/ createMinimalMotionComponent(\"audio\")\nexport const MotionB = /*@__PURE__*/ createMinimalMotionComponent(\"b\")\nexport const MotionBase = /*@__PURE__*/ createMinimalMotionComponent(\"base\")\nexport const MotionBdi = /*@__PURE__*/ createMinimalMotionComponent(\"bdi\")\nexport const MotionBdo = /*@__PURE__*/ createMinimalMotionComponent(\"bdo\")\nexport const MotionBig = /*@__PURE__*/ createMinimalMotionComponent(\"big\")\nexport const MotionBlockquote =\n /*@__PURE__*/ createMinimalMotionComponent(\"blockquote\")\nexport const MotionBody = /*@__PURE__*/ createMinimalMotionComponent(\"body\")\nexport const MotionButton = /*@__PURE__*/ createMinimalMotionComponent(\"button\")\nexport const MotionCanvas = /*@__PURE__*/ createMinimalMotionComponent(\"canvas\")\nexport const MotionCaption =\n /*@__PURE__*/ createMinimalMotionComponent(\"caption\")\nexport const MotionCite = /*@__PURE__*/ createMinimalMotionComponent(\"cite\")\nexport const MotionCode = /*@__PURE__*/ createMinimalMotionComponent(\"code\")\nexport const MotionCol = /*@__PURE__*/ createMinimalMotionComponent(\"col\")\nexport const MotionColgroup =\n /*@__PURE__*/ createMinimalMotionComponent(\"colgroup\")\nexport const MotionData = /*@__PURE__*/ createMinimalMotionComponent(\"data\")\nexport const MotionDatalist =\n /*@__PURE__*/ createMinimalMotionComponent(\"datalist\")\nexport const MotionDd = /*@__PURE__*/ createMinimalMotionComponent(\"dd\")\nexport const MotionDel = /*@__PURE__*/ createMinimalMotionComponent(\"del\")\nexport const MotionDetails =\n /*@__PURE__*/ createMinimalMotionComponent(\"details\")\nexport const MotionDfn = /*@__PURE__*/ createMinimalMotionComponent(\"dfn\")\nexport const MotionDialog = /*@__PURE__*/ createMinimalMotionComponent(\"dialog\")\nexport const MotionDiv = /*@__PURE__*/ createMinimalMotionComponent(\"div\")\nexport const MotionDl = /*@__PURE__*/ createMinimalMotionComponent(\"dl\")\nexport const MotionDt = /*@__PURE__*/ createMinimalMotionComponent(\"dt\")\nexport const MotionEm = /*@__PURE__*/ createMinimalMotionComponent(\"em\")\nexport const MotionEmbed = /*@__PURE__*/ createMinimalMotionComponent(\"embed\")\nexport const MotionFieldset =\n /*@__PURE__*/ createMinimalMotionComponent(\"fieldset\")\nexport const MotionFigcaption =\n /*@__PURE__*/ createMinimalMotionComponent(\"figcaption\")\nexport const MotionFigure = /*@__PURE__*/ createMinimalMotionComponent(\"figure\")\nexport const MotionFooter = /*@__PURE__*/ createMinimalMotionComponent(\"footer\")\nexport const MotionForm = /*@__PURE__*/ createMinimalMotionComponent(\"form\")\nexport const MotionH1 = /*@__PURE__*/ createMinimalMotionComponent(\"h1\")\nexport const MotionH2 = /*@__PURE__*/ createMinimalMotionComponent(\"h2\")\nexport const MotionH3 = /*@__PURE__*/ createMinimalMotionComponent(\"h3\")\nexport const MotionH4 = /*@__PURE__*/ createMinimalMotionComponent(\"h4\")\nexport const MotionH5 = /*@__PURE__*/ createMinimalMotionComponent(\"h5\")\nexport const MotionH6 = /*@__PURE__*/ createMinimalMotionComponent(\"h6\")\nexport const MotionHead = /*@__PURE__*/ createMinimalMotionComponent(\"head\")\nexport const MotionHeader = /*@__PURE__*/ createMinimalMotionComponent(\"header\")\nexport const MotionHgroup = /*@__PURE__*/ createMinimalMotionComponent(\"hgroup\")\nexport const MotionHr = /*@__PURE__*/ createMinimalMotionComponent(\"hr\")\nexport const MotionHtml = /*@__PURE__*/ createMinimalMotionComponent(\"html\")\nexport const MotionI = /*@__PURE__*/ createMinimalMotionComponent(\"i\")\nexport const MotionIframe = /*@__PURE__*/ createMinimalMotionComponent(\"iframe\")\nexport const MotionImg = /*@__PURE__*/ createMinimalMotionComponent(\"img\")\nexport const MotionInput = /*@__PURE__*/ createMinimalMotionComponent(\"input\")\nexport const MotionIns = /*@__PURE__*/ createMinimalMotionComponent(\"ins\")\nexport const MotionKbd = /*@__PURE__*/ createMinimalMotionComponent(\"kbd\")\nexport const MotionKeygen = /*@__PURE__*/ createMinimalMotionComponent(\"keygen\")\nexport const MotionLabel = /*@__PURE__*/ createMinimalMotionComponent(\"label\")\nexport const MotionLegend = /*@__PURE__*/ createMinimalMotionComponent(\"legend\")\nexport const MotionLi = /*@__PURE__*/ createMinimalMotionComponent(\"li\")\nexport const MotionLink = /*@__PURE__*/ createMinimalMotionComponent(\"link\")\nexport const MotionMain = /*@__PURE__*/ createMinimalMotionComponent(\"main\")\nexport const MotionMap = /*@__PURE__*/ createMinimalMotionComponent(\"map\")\nexport const MotionMark = /*@__PURE__*/ createMinimalMotionComponent(\"mark\")\nexport const MotionMenu = /*@__PURE__*/ createMinimalMotionComponent(\"menu\")\nexport const MotionMenuitem =\n /*@__PURE__*/ createMinimalMotionComponent(\"menuitem\")\nexport const MotionMeter = /*@__PURE__*/ createMinimalMotionComponent(\"meter\")\nexport const MotionNav = /*@__PURE__*/ createMinimalMotionComponent(\"nav\")\nexport const MotionObject = /*@__PURE__*/ createMinimalMotionComponent(\"object\")\nexport const MotionOl = /*@__PURE__*/ createMinimalMotionComponent(\"ol\")\nexport const MotionOptgroup =\n /*@__PURE__*/ createMinimalMotionComponent(\"optgroup\")\nexport const MotionOption = /*@__PURE__*/ createMinimalMotionComponent(\"option\")\nexport const MotionOutput = /*@__PURE__*/ createMinimalMotionComponent(\"output\")\nexport const MotionP = /*@__PURE__*/ createMinimalMotionComponent(\"p\")\nexport const MotionParam = /*@__PURE__*/ createMinimalMotionComponent(\"param\")\nexport const MotionPicture =\n /*@__PURE__*/ createMinimalMotionComponent(\"picture\")\nexport const MotionPre = /*@__PURE__*/ createMinimalMotionComponent(\"pre\")\nexport const MotionProgress =\n /*@__PURE__*/ createMinimalMotionComponent(\"progress\")\nexport const MotionQ = /*@__PURE__*/ createMinimalMotionComponent(\"q\")\nexport const MotionRp = /*@__PURE__*/ createMinimalMotionComponent(\"rp\")\nexport const MotionRt = /*@__PURE__*/ createMinimalMotionComponent(\"rt\")\nexport const MotionRuby = /*@__PURE__*/ createMinimalMotionComponent(\"ruby\")\nexport const MotionS = /*@__PURE__*/ createMinimalMotionComponent(\"s\")\nexport const MotionSamp = /*@__PURE__*/ createMinimalMotionComponent(\"samp\")\nexport const MotionScript = /*@__PURE__*/ createMinimalMotionComponent(\"script\")\nexport const MotionSection =\n /*@__PURE__*/ createMinimalMotionComponent(\"section\")\nexport const MotionSelect = /*@__PURE__*/ createMinimalMotionComponent(\"select\")\nexport const MotionSmall = /*@__PURE__*/ createMinimalMotionComponent(\"small\")\nexport const MotionSource = /*@__PURE__*/ createMinimalMotionComponent(\"source\")\nexport const MotionSpan = /*@__PURE__*/ createMinimalMotionComponent(\"span\")\nexport const MotionStrong = /*@__PURE__*/ createMinimalMotionComponent(\"strong\")\nexport const MotionStyle = /*@__PURE__*/ createMinimalMotionComponent(\"style\")\nexport const MotionSub = /*@__PURE__*/ createMinimalMotionComponent(\"sub\")\nexport const MotionSummary =\n /*@__PURE__*/ createMinimalMotionComponent(\"summary\")\nexport const MotionSup = /*@__PURE__*/ createMinimalMotionComponent(\"sup\")\nexport const MotionTable = /*@__PURE__*/ createMinimalMotionComponent(\"table\")\nexport const MotionTbody = /*@__PURE__*/ createMinimalMotionComponent(\"tbody\")\nexport const MotionTd = /*@__PURE__*/ createMinimalMotionComponent(\"td\")\nexport const MotionTextarea =\n /*@__PURE__*/ createMinimalMotionComponent(\"textarea\")\nexport const MotionTfoot = /*@__PURE__*/ createMinimalMotionComponent(\"tfoot\")\nexport const MotionTh = /*@__PURE__*/ createMinimalMotionComponent(\"th\")\nexport const MotionThead = /*@__PURE__*/ createMinimalMotionComponent(\"thead\")\nexport const MotionTime = /*@__PURE__*/ createMinimalMotionComponent(\"time\")\nexport const MotionTitle = /*@__PURE__*/ createMinimalMotionComponent(\"title\")\nexport const MotionTr = /*@__PURE__*/ createMinimalMotionComponent(\"tr\")\nexport const MotionTrack = /*@__PURE__*/ createMinimalMotionComponent(\"track\")\nexport const MotionU = /*@__PURE__*/ createMinimalMotionComponent(\"u\")\nexport const MotionUl = /*@__PURE__*/ createMinimalMotionComponent(\"ul\")\nexport const MotionVideo = /*@__PURE__*/ createMinimalMotionComponent(\"video\")\nexport const MotionWbr = /*@__PURE__*/ createMinimalMotionComponent(\"wbr\")\nexport const MotionWebview =\n /*@__PURE__*/ createMinimalMotionComponent(\"webview\")\n\n/**\n * SVG components\n */\nexport const MotionAnimate =\n /*@__PURE__*/ createMinimalMotionComponent(\"animate\")\nexport const MotionCircle = /*@__PURE__*/ createMinimalMotionComponent(\"circle\")\nexport const MotionDefs = /*@__PURE__*/ createMinimalMotionComponent(\"defs\")\nexport const MotionDesc = /*@__PURE__*/ createMinimalMotionComponent(\"desc\")\nexport const MotionEllipse =\n /*@__PURE__*/ createMinimalMotionComponent(\"ellipse\")\nexport const MotionG = /*@__PURE__*/ createMinimalMotionComponent(\"g\")\nexport const MotionImage = /*@__PURE__*/ createMinimalMotionComponent(\"image\")\nexport const MotionLine = /*@__PURE__*/ createMinimalMotionComponent(\"line\")\nexport const MotionFilter = /*@__PURE__*/ createMinimalMotionComponent(\"filter\")\nexport const MotionMarker = /*@__PURE__*/ createMinimalMotionComponent(\"marker\")\nexport const MotionMask = /*@__PURE__*/ createMinimalMotionComponent(\"mask\")\nexport const MotionMetadata =\n /*@__PURE__*/ createMinimalMotionComponent(\"metadata\")\nexport const MotionPath = /*@__PURE__*/ createMinimalMotionComponent(\"path\")\nexport const MotionPattern =\n /*@__PURE__*/ createMinimalMotionComponent(\"pattern\")\nexport const MotionPolygon =\n /*@__PURE__*/ createMinimalMotionComponent(\"polygon\")\nexport const MotionPolyline =\n /*@__PURE__*/ createMinimalMotionComponent(\"polyline\")\nexport const MotionRect = /*@__PURE__*/ createMinimalMotionComponent(\"rect\")\nexport const MotionStop = /*@__PURE__*/ createMinimalMotionComponent(\"stop\")\nexport const MotionSvg = /*@__PURE__*/ createMinimalMotionComponent(\"svg\")\nexport const MotionSymbol = /*@__PURE__*/ createMinimalMotionComponent(\"symbol\")\nexport const MotionText = /*@__PURE__*/ createMinimalMotionComponent(\"text\")\nexport const MotionTspan = /*@__PURE__*/ createMinimalMotionComponent(\"tspan\")\nexport const MotionUse = /*@__PURE__*/ createMinimalMotionComponent(\"use\")\nexport const MotionView = /*@__PURE__*/ createMinimalMotionComponent(\"view\")\nexport const MotionClipPath =\n /*@__PURE__*/ createMinimalMotionComponent(\"clipPath\")\nexport const MotionFeBlend =\n /*@__PURE__*/ createMinimalMotionComponent(\"feBlend\")\nexport const MotionFeColorMatrix =\n /*@__PURE__*/ createMinimalMotionComponent(\"feColorMatrix\")\nexport const MotionFeComponentTransfer =\n /*@__PURE__*/ createMinimalMotionComponent(\"feComponentTransfer\")\nexport const MotionFeComposite =\n /*@__PURE__*/ createMinimalMotionComponent(\"feComposite\")\nexport const MotionFeConvolveMatrix =\n /*@__PURE__*/ createMinimalMotionComponent(\"feConvolveMatrix\")\nexport const MotionFeDiffuseLighting =\n /*@__PURE__*/ createMinimalMotionComponent(\"feDiffuseLighting\")\nexport const MotionFeDisplacementMap =\n /*@__PURE__*/ createMinimalMotionComponent(\"feDisplacementMap\")\nexport const MotionFeDistantLight =\n /*@__PURE__*/ createMinimalMotionComponent(\"feDistantLight\")\nexport const MotionFeDropShadow =\n /*@__PURE__*/ createMinimalMotionComponent(\"feDropShadow\")\nexport const MotionFeFlood =\n /*@__PURE__*/ createMinimalMotionComponent(\"feFlood\")\nexport const MotionFeFuncA =\n /*@__PURE__*/ createMinimalMotionComponent(\"feFuncA\")\nexport const MotionFeFuncB =\n /*@__PURE__*/ createMinimalMotionComponent(\"feFuncB\")\nexport const MotionFeFuncG =\n /*@__PURE__*/ createMinimalMotionComponent(\"feFuncG\")\nexport const MotionFeFuncR =\n /*@__PURE__*/ createMinimalMotionComponent(\"feFuncR\")\nexport const MotionFeGaussianBlur =\n /*@__PURE__*/ createMinimalMotionComponent(\"feGaussianBlur\")\nexport const MotionFeImage =\n /*@__PURE__*/ createMinimalMotionComponent(\"feImage\")\nexport const MotionFeMerge =\n /*@__PURE__*/ createMinimalMotionComponent(\"feMerge\")\nexport const MotionFeMergeNode =\n /*@__PURE__*/ createMinimalMotionComponent(\"feMergeNode\")\nexport const MotionFeMorphology =\n /*@__PURE__*/ createMinimalMotionComponent(\"feMorphology\")\nexport const MotionFeOffset =\n /*@__PURE__*/ createMinimalMotionComponent(\"feOffset\")\nexport const MotionFePointLight =\n /*@__PURE__*/ createMinimalMotionComponent(\"fePointLight\")\nexport const MotionFeSpecularLighting =\n /*@__PURE__*/ createMinimalMotionComponent(\"feSpecularLighting\")\nexport const MotionFeSpotLight =\n /*@__PURE__*/ createMinimalMotionComponent(\"feSpotLight\")\nexport const MotionFeTile = /*@__PURE__*/ createMinimalMotionComponent(\"feTile\")\nexport const MotionFeTurbulence =\n /*@__PURE__*/ createMinimalMotionComponent(\"feTurbulence\")\nexport const MotionForeignObject =\n /*@__PURE__*/ createMinimalMotionComponent(\"foreignObject\")\nexport const MotionLinearGradient =\n /*@__PURE__*/ createMinimalMotionComponent(\"linearGradient\")\nexport const MotionRadialGradient =\n /*@__PURE__*/ createMinimalMotionComponent(\"radialGradient\")\nexport const MotionTextPath =\n /*@__PURE__*/ createMinimalMotionComponent(\"textPath\")\n"],"names":[],"mappings":";;;AAIA;;AAEG;AACI;AACA;;AAEH;AACG;;AAEH;AACG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEH;AACG;AACA;AACA;;AAEH;AACG;AACA;AACA;;AAEH;AACG;;AAEH;AACG;AACA;;AAEH;AACG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEH;;AAEA;AACG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEH;AACG;AACA;AACA;AACA;;AAEH;AACG;AACA;AACA;AACA;;AAEH;AACG;;AAEH;AACG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEH;AACG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEH;AACG;AACA;AACA;AACA;;AAEH;AACG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEH;AAEJ;;AAEG;;AAEC;AACG;AACA;AACA;;AAEH;AACG;AACA;AACA;AACA;AACA;AACA;;AAEH;AACG;;AAEH;;AAEA;;AAEA;AACG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/proxy.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/proxy.mjs deleted file mode 100644 index 2de139e9..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/proxy.mjs +++ /dev/null @@ -1,6 +0,0 @@ -import { createMotionProxy } from '../create-proxy.mjs'; - -const m = /*@__PURE__*/ createMotionProxy(); - -export { m }; -//# sourceMappingURL=proxy.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/proxy.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/proxy.mjs.map deleted file mode 100644 index ce751052..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/m/proxy.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proxy.mjs","sources":["../../../../../src/render/components/m/proxy.ts"],"sourcesContent":["import { createMotionProxy } from \"../create-proxy\"\n\nexport const m = /*@__PURE__*/ createMotionProxy()\n"],"names":[],"mappings":";;MAEa,CAAC,iBAAiB,iBAAiB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/create.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/create.mjs deleted file mode 100644 index b74f806a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/create.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { createMotionComponent } from '../../../motion/index.mjs'; -import { createDomVisualElement } from '../../dom/create-visual-element.mjs'; -import { featureBundle } from './feature-bundle.mjs'; - -function createMotionComponentWithFeatures(Component, options) { - return createMotionComponent(Component, options, featureBundle, createDomVisualElement); -} - -export { createMotionComponentWithFeatures }; -//# sourceMappingURL=create.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/create.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/create.mjs.map deleted file mode 100644 index ce872e95..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/create.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create.mjs","sources":["../../../../../src/render/components/motion/create.ts"],"sourcesContent":["import { createMotionComponent, MotionComponentOptions } from \"../../../motion\"\nimport { createDomVisualElement } from \"../../dom/create-visual-element\"\nimport { DOMMotionComponents } from \"../../dom/types\"\nimport { CreateVisualElement } from \"../../types\"\nimport { featureBundle } from \"./feature-bundle\"\n\nexport function createMotionComponentWithFeatures<\n Props,\n TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n Component: TagName | string | React.ComponentType,\n options?: MotionComponentOptions\n) {\n return createMotionComponent(\n Component,\n options,\n featureBundle,\n createDomVisualElement as CreateVisualElement\n )\n}\n"],"names":[],"mappings":";;;;AAMM,SAAU,iCAAiC,CAI7C,SAAwD,EACxD,OAAgC,EAAA;IAEhC,OAAO,qBAAqB,CACxB,SAAS,EACT,OAAO,EACP,aAAa,EACb,sBAA6D,CAChE;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/elements.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/elements.mjs deleted file mode 100644 index 04dc7620..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/elements.mjs +++ /dev/null @@ -1,195 +0,0 @@ -"use client"; -import { createMotionComponentWithFeatures } from './create.mjs'; - -/** - * HTML components - */ -const MotionA = /*@__PURE__*/ createMotionComponentWithFeatures("a"); -const MotionAbbr = /*@__PURE__*/ createMotionComponentWithFeatures("abbr"); -const MotionAddress = /*@__PURE__*/ createMotionComponentWithFeatures("address"); -const MotionArea = /*@__PURE__*/ createMotionComponentWithFeatures("area"); -const MotionArticle = /*@__PURE__*/ createMotionComponentWithFeatures("article"); -const MotionAside = /*@__PURE__*/ createMotionComponentWithFeatures("aside"); -const MotionAudio = /*@__PURE__*/ createMotionComponentWithFeatures("audio"); -const MotionB = /*@__PURE__*/ createMotionComponentWithFeatures("b"); -const MotionBase = /*@__PURE__*/ createMotionComponentWithFeatures("base"); -const MotionBdi = /*@__PURE__*/ createMotionComponentWithFeatures("bdi"); -const MotionBdo = /*@__PURE__*/ createMotionComponentWithFeatures("bdo"); -const MotionBig = /*@__PURE__*/ createMotionComponentWithFeatures("big"); -const MotionBlockquote = -/*@__PURE__*/ createMotionComponentWithFeatures("blockquote"); -const MotionBody = /*@__PURE__*/ createMotionComponentWithFeatures("body"); -const MotionButton = /*@__PURE__*/ createMotionComponentWithFeatures("button"); -const MotionCanvas = /*@__PURE__*/ createMotionComponentWithFeatures("canvas"); -const MotionCaption = /*@__PURE__*/ createMotionComponentWithFeatures("caption"); -const MotionCite = /*@__PURE__*/ createMotionComponentWithFeatures("cite"); -const MotionCode = /*@__PURE__*/ createMotionComponentWithFeatures("code"); -const MotionCol = /*@__PURE__*/ createMotionComponentWithFeatures("col"); -const MotionColgroup = /*@__PURE__*/ createMotionComponentWithFeatures("colgroup"); -const MotionData = /*@__PURE__*/ createMotionComponentWithFeatures("data"); -const MotionDatalist = /*@__PURE__*/ createMotionComponentWithFeatures("datalist"); -const MotionDd = /*@__PURE__*/ createMotionComponentWithFeatures("dd"); -const MotionDel = /*@__PURE__*/ createMotionComponentWithFeatures("del"); -const MotionDetails = /*@__PURE__*/ createMotionComponentWithFeatures("details"); -const MotionDfn = /*@__PURE__*/ createMotionComponentWithFeatures("dfn"); -const MotionDialog = /*@__PURE__*/ createMotionComponentWithFeatures("dialog"); -const MotionDiv = /*@__PURE__*/ createMotionComponentWithFeatures("div"); -const MotionDl = /*@__PURE__*/ createMotionComponentWithFeatures("dl"); -const MotionDt = /*@__PURE__*/ createMotionComponentWithFeatures("dt"); -const MotionEm = /*@__PURE__*/ createMotionComponentWithFeatures("em"); -const MotionEmbed = /*@__PURE__*/ createMotionComponentWithFeatures("embed"); -const MotionFieldset = /*@__PURE__*/ createMotionComponentWithFeatures("fieldset"); -const MotionFigcaption = -/*@__PURE__*/ createMotionComponentWithFeatures("figcaption"); -const MotionFigure = /*@__PURE__*/ createMotionComponentWithFeatures("figure"); -const MotionFooter = /*@__PURE__*/ createMotionComponentWithFeatures("footer"); -const MotionForm = /*@__PURE__*/ createMotionComponentWithFeatures("form"); -const MotionH1 = /*@__PURE__*/ createMotionComponentWithFeatures("h1"); -const MotionH2 = /*@__PURE__*/ createMotionComponentWithFeatures("h2"); -const MotionH3 = /*@__PURE__*/ createMotionComponentWithFeatures("h3"); -const MotionH4 = /*@__PURE__*/ createMotionComponentWithFeatures("h4"); -const MotionH5 = /*@__PURE__*/ createMotionComponentWithFeatures("h5"); -const MotionH6 = /*@__PURE__*/ createMotionComponentWithFeatures("h6"); -const MotionHead = /*@__PURE__*/ createMotionComponentWithFeatures("head"); -const MotionHeader = /*@__PURE__*/ createMotionComponentWithFeatures("header"); -const MotionHgroup = /*@__PURE__*/ createMotionComponentWithFeatures("hgroup"); -const MotionHr = /*@__PURE__*/ createMotionComponentWithFeatures("hr"); -const MotionHtml = /*@__PURE__*/ createMotionComponentWithFeatures("html"); -const MotionI = /*@__PURE__*/ createMotionComponentWithFeatures("i"); -const MotionIframe = /*@__PURE__*/ createMotionComponentWithFeatures("iframe"); -const MotionImg = /*@__PURE__*/ createMotionComponentWithFeatures("img"); -const MotionInput = /*@__PURE__*/ createMotionComponentWithFeatures("input"); -const MotionIns = /*@__PURE__*/ createMotionComponentWithFeatures("ins"); -const MotionKbd = /*@__PURE__*/ createMotionComponentWithFeatures("kbd"); -const MotionKeygen = /*@__PURE__*/ createMotionComponentWithFeatures("keygen"); -const MotionLabel = /*@__PURE__*/ createMotionComponentWithFeatures("label"); -const MotionLegend = /*@__PURE__*/ createMotionComponentWithFeatures("legend"); -const MotionLi = /*@__PURE__*/ createMotionComponentWithFeatures("li"); -const MotionLink = /*@__PURE__*/ createMotionComponentWithFeatures("link"); -const MotionMain = /*@__PURE__*/ createMotionComponentWithFeatures("main"); -const MotionMap = /*@__PURE__*/ createMotionComponentWithFeatures("map"); -const MotionMark = /*@__PURE__*/ createMotionComponentWithFeatures("mark"); -const MotionMenu = /*@__PURE__*/ createMotionComponentWithFeatures("menu"); -const MotionMenuitem = /*@__PURE__*/ createMotionComponentWithFeatures("menuitem"); -const MotionMeter = /*@__PURE__*/ createMotionComponentWithFeatures("meter"); -const MotionNav = /*@__PURE__*/ createMotionComponentWithFeatures("nav"); -const MotionObject = /*@__PURE__*/ createMotionComponentWithFeatures("object"); -const MotionOl = /*@__PURE__*/ createMotionComponentWithFeatures("ol"); -const MotionOptgroup = /*@__PURE__*/ createMotionComponentWithFeatures("optgroup"); -const MotionOption = /*@__PURE__*/ createMotionComponentWithFeatures("option"); -const MotionOutput = /*@__PURE__*/ createMotionComponentWithFeatures("output"); -const MotionP = /*@__PURE__*/ createMotionComponentWithFeatures("p"); -const MotionParam = /*@__PURE__*/ createMotionComponentWithFeatures("param"); -const MotionPicture = /*@__PURE__*/ createMotionComponentWithFeatures("picture"); -const MotionPre = /*@__PURE__*/ createMotionComponentWithFeatures("pre"); -const MotionProgress = /*@__PURE__*/ createMotionComponentWithFeatures("progress"); -const MotionQ = /*@__PURE__*/ createMotionComponentWithFeatures("q"); -const MotionRp = /*@__PURE__*/ createMotionComponentWithFeatures("rp"); -const MotionRt = /*@__PURE__*/ createMotionComponentWithFeatures("rt"); -const MotionRuby = /*@__PURE__*/ createMotionComponentWithFeatures("ruby"); -const MotionS = /*@__PURE__*/ createMotionComponentWithFeatures("s"); -const MotionSamp = /*@__PURE__*/ createMotionComponentWithFeatures("samp"); -const MotionScript = /*@__PURE__*/ createMotionComponentWithFeatures("script"); -const MotionSection = /*@__PURE__*/ createMotionComponentWithFeatures("section"); -const MotionSelect = /*@__PURE__*/ createMotionComponentWithFeatures("select"); -const MotionSmall = /*@__PURE__*/ createMotionComponentWithFeatures("small"); -const MotionSource = /*@__PURE__*/ createMotionComponentWithFeatures("source"); -const MotionSpan = /*@__PURE__*/ createMotionComponentWithFeatures("span"); -const MotionStrong = /*@__PURE__*/ createMotionComponentWithFeatures("strong"); -const MotionStyle = /*@__PURE__*/ createMotionComponentWithFeatures("style"); -const MotionSub = /*@__PURE__*/ createMotionComponentWithFeatures("sub"); -const MotionSummary = /*@__PURE__*/ createMotionComponentWithFeatures("summary"); -const MotionSup = /*@__PURE__*/ createMotionComponentWithFeatures("sup"); -const MotionTable = /*@__PURE__*/ createMotionComponentWithFeatures("table"); -const MotionTbody = /*@__PURE__*/ createMotionComponentWithFeatures("tbody"); -const MotionTd = /*@__PURE__*/ createMotionComponentWithFeatures("td"); -const MotionTextarea = /*@__PURE__*/ createMotionComponentWithFeatures("textarea"); -const MotionTfoot = /*@__PURE__*/ createMotionComponentWithFeatures("tfoot"); -const MotionTh = /*@__PURE__*/ createMotionComponentWithFeatures("th"); -const MotionThead = /*@__PURE__*/ createMotionComponentWithFeatures("thead"); -const MotionTime = /*@__PURE__*/ createMotionComponentWithFeatures("time"); -const MotionTitle = /*@__PURE__*/ createMotionComponentWithFeatures("title"); -const MotionTr = /*@__PURE__*/ createMotionComponentWithFeatures("tr"); -const MotionTrack = /*@__PURE__*/ createMotionComponentWithFeatures("track"); -const MotionU = /*@__PURE__*/ createMotionComponentWithFeatures("u"); -const MotionUl = /*@__PURE__*/ createMotionComponentWithFeatures("ul"); -const MotionVideo = /*@__PURE__*/ createMotionComponentWithFeatures("video"); -const MotionWbr = /*@__PURE__*/ createMotionComponentWithFeatures("wbr"); -const MotionWebview = /*@__PURE__*/ createMotionComponentWithFeatures("webview"); -/** - * SVG components - */ -const MotionAnimate = /*@__PURE__*/ createMotionComponentWithFeatures("animate"); -const MotionCircle = /*@__PURE__*/ createMotionComponentWithFeatures("circle"); -const MotionDefs = /*@__PURE__*/ createMotionComponentWithFeatures("defs"); -const MotionDesc = /*@__PURE__*/ createMotionComponentWithFeatures("desc"); -const MotionEllipse = /*@__PURE__*/ createMotionComponentWithFeatures("ellipse"); -const MotionG = /*@__PURE__*/ createMotionComponentWithFeatures("g"); -const MotionImage = /*@__PURE__*/ createMotionComponentWithFeatures("image"); -const MotionLine = /*@__PURE__*/ createMotionComponentWithFeatures("line"); -const MotionFilter = /*@__PURE__*/ createMotionComponentWithFeatures("filter"); -const MotionMarker = /*@__PURE__*/ createMotionComponentWithFeatures("marker"); -const MotionMask = /*@__PURE__*/ createMotionComponentWithFeatures("mask"); -const MotionMetadata = /*@__PURE__*/ createMotionComponentWithFeatures("metadata"); -const MotionPath = /*@__PURE__*/ createMotionComponentWithFeatures("path"); -const MotionPattern = /*@__PURE__*/ createMotionComponentWithFeatures("pattern"); -const MotionPolygon = /*@__PURE__*/ createMotionComponentWithFeatures("polygon"); -const MotionPolyline = /*@__PURE__*/ createMotionComponentWithFeatures("polyline"); -const MotionRect = /*@__PURE__*/ createMotionComponentWithFeatures("rect"); -const MotionStop = /*@__PURE__*/ createMotionComponentWithFeatures("stop"); -const MotionSvg = /*@__PURE__*/ createMotionComponentWithFeatures("svg"); -const MotionSymbol = /*@__PURE__*/ createMotionComponentWithFeatures("symbol"); -const MotionText = /*@__PURE__*/ createMotionComponentWithFeatures("text"); -const MotionTspan = /*@__PURE__*/ createMotionComponentWithFeatures("tspan"); -const MotionUse = /*@__PURE__*/ createMotionComponentWithFeatures("use"); -const MotionView = /*@__PURE__*/ createMotionComponentWithFeatures("view"); -const MotionClipPath = /*@__PURE__*/ createMotionComponentWithFeatures("clipPath"); -const MotionFeBlend = /*@__PURE__*/ createMotionComponentWithFeatures("feBlend"); -const MotionFeColorMatrix = -/*@__PURE__*/ createMotionComponentWithFeatures("feColorMatrix"); -const MotionFeComponentTransfer = /*@__PURE__*/ createMotionComponentWithFeatures("feComponentTransfer"); -const MotionFeComposite = -/*@__PURE__*/ createMotionComponentWithFeatures("feComposite"); -const MotionFeConvolveMatrix = -/*@__PURE__*/ createMotionComponentWithFeatures("feConvolveMatrix"); -const MotionFeDiffuseLighting = -/*@__PURE__*/ createMotionComponentWithFeatures("feDiffuseLighting"); -const MotionFeDisplacementMap = -/*@__PURE__*/ createMotionComponentWithFeatures("feDisplacementMap"); -const MotionFeDistantLight = -/*@__PURE__*/ createMotionComponentWithFeatures("feDistantLight"); -const MotionFeDropShadow = -/*@__PURE__*/ createMotionComponentWithFeatures("feDropShadow"); -const MotionFeFlood = /*@__PURE__*/ createMotionComponentWithFeatures("feFlood"); -const MotionFeFuncA = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncA"); -const MotionFeFuncB = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncB"); -const MotionFeFuncG = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncG"); -const MotionFeFuncR = /*@__PURE__*/ createMotionComponentWithFeatures("feFuncR"); -const MotionFeGaussianBlur = -/*@__PURE__*/ createMotionComponentWithFeatures("feGaussianBlur"); -const MotionFeImage = /*@__PURE__*/ createMotionComponentWithFeatures("feImage"); -const MotionFeMerge = /*@__PURE__*/ createMotionComponentWithFeatures("feMerge"); -const MotionFeMergeNode = -/*@__PURE__*/ createMotionComponentWithFeatures("feMergeNode"); -const MotionFeMorphology = -/*@__PURE__*/ createMotionComponentWithFeatures("feMorphology"); -const MotionFeOffset = /*@__PURE__*/ createMotionComponentWithFeatures("feOffset"); -const MotionFePointLight = -/*@__PURE__*/ createMotionComponentWithFeatures("fePointLight"); -const MotionFeSpecularLighting = -/*@__PURE__*/ createMotionComponentWithFeatures("feSpecularLighting"); -const MotionFeSpotLight = -/*@__PURE__*/ createMotionComponentWithFeatures("feSpotLight"); -const MotionFeTile = /*@__PURE__*/ createMotionComponentWithFeatures("feTile"); -const MotionFeTurbulence = -/*@__PURE__*/ createMotionComponentWithFeatures("feTurbulence"); -const MotionForeignObject = -/*@__PURE__*/ createMotionComponentWithFeatures("foreignObject"); -const MotionLinearGradient = -/*@__PURE__*/ createMotionComponentWithFeatures("linearGradient"); -const MotionRadialGradient = -/*@__PURE__*/ createMotionComponentWithFeatures("radialGradient"); -const MotionTextPath = /*@__PURE__*/ createMotionComponentWithFeatures("textPath"); - -export { MotionA, MotionAbbr, MotionAddress, MotionAnimate, MotionArea, MotionArticle, MotionAside, MotionAudio, MotionB, MotionBase, MotionBdi, MotionBdo, MotionBig, MotionBlockquote, MotionBody, MotionButton, MotionCanvas, MotionCaption, MotionCircle, MotionCite, MotionClipPath, MotionCode, MotionCol, MotionColgroup, MotionData, MotionDatalist, MotionDd, MotionDefs, MotionDel, MotionDesc, MotionDetails, MotionDfn, MotionDialog, MotionDiv, MotionDl, MotionDt, MotionEllipse, MotionEm, MotionEmbed, MotionFeBlend, MotionFeColorMatrix, MotionFeComponentTransfer, MotionFeComposite, MotionFeConvolveMatrix, MotionFeDiffuseLighting, MotionFeDisplacementMap, MotionFeDistantLight, MotionFeDropShadow, MotionFeFlood, MotionFeFuncA, MotionFeFuncB, MotionFeFuncG, MotionFeFuncR, MotionFeGaussianBlur, MotionFeImage, MotionFeMerge, MotionFeMergeNode, MotionFeMorphology, MotionFeOffset, MotionFePointLight, MotionFeSpecularLighting, MotionFeSpotLight, MotionFeTile, MotionFeTurbulence, MotionFieldset, MotionFigcaption, MotionFigure, MotionFilter, MotionFooter, MotionForeignObject, MotionForm, MotionG, MotionH1, MotionH2, MotionH3, MotionH4, MotionH5, MotionH6, MotionHead, MotionHeader, MotionHgroup, MotionHr, MotionHtml, MotionI, MotionIframe, MotionImage, MotionImg, MotionInput, MotionIns, MotionKbd, MotionKeygen, MotionLabel, MotionLegend, MotionLi, MotionLine, MotionLinearGradient, MotionLink, MotionMain, MotionMap, MotionMark, MotionMarker, MotionMask, MotionMenu, MotionMenuitem, MotionMetadata, MotionMeter, MotionNav, MotionObject, MotionOl, MotionOptgroup, MotionOption, MotionOutput, MotionP, MotionParam, MotionPath, MotionPattern, MotionPicture, MotionPolygon, MotionPolyline, MotionPre, MotionProgress, MotionQ, MotionRadialGradient, MotionRect, MotionRp, MotionRt, MotionRuby, MotionS, MotionSamp, MotionScript, MotionSection, MotionSelect, MotionSmall, MotionSource, MotionSpan, MotionStop, MotionStrong, MotionStyle, MotionSub, MotionSummary, MotionSup, MotionSvg, MotionSymbol, MotionTable, MotionTbody, MotionTd, MotionText, MotionTextPath, MotionTextarea, MotionTfoot, MotionTh, MotionThead, MotionTime, MotionTitle, MotionTr, MotionTrack, MotionTspan, MotionU, MotionUl, MotionUse, MotionVideo, MotionView, MotionWbr, MotionWebview }; -//# sourceMappingURL=elements.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/elements.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/elements.mjs.map deleted file mode 100644 index 49a367df..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/elements.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"elements.mjs","sources":["../../../../../src/render/components/motion/elements.ts"],"sourcesContent":["\"use client\"\n\nimport { createMotionComponentWithFeatures as createMotionComponent } from \"./create\"\n\n/**\n * HTML components\n */\nexport const MotionA = /*@__PURE__*/ createMotionComponent(\"a\")\nexport const MotionAbbr = /*@__PURE__*/ createMotionComponent(\"abbr\")\nexport const MotionAddress = /*@__PURE__*/ createMotionComponent(\"address\")\nexport const MotionArea = /*@__PURE__*/ createMotionComponent(\"area\")\nexport const MotionArticle = /*@__PURE__*/ createMotionComponent(\"article\")\nexport const MotionAside = /*@__PURE__*/ createMotionComponent(\"aside\")\nexport const MotionAudio = /*@__PURE__*/ createMotionComponent(\"audio\")\nexport const MotionB = /*@__PURE__*/ createMotionComponent(\"b\")\nexport const MotionBase = /*@__PURE__*/ createMotionComponent(\"base\")\nexport const MotionBdi = /*@__PURE__*/ createMotionComponent(\"bdi\")\nexport const MotionBdo = /*@__PURE__*/ createMotionComponent(\"bdo\")\nexport const MotionBig = /*@__PURE__*/ createMotionComponent(\"big\")\nexport const MotionBlockquote =\n /*@__PURE__*/ createMotionComponent(\"blockquote\")\nexport const MotionBody = /*@__PURE__*/ createMotionComponent(\"body\")\nexport const MotionButton = /*@__PURE__*/ createMotionComponent(\"button\")\nexport const MotionCanvas = /*@__PURE__*/ createMotionComponent(\"canvas\")\nexport const MotionCaption = /*@__PURE__*/ createMotionComponent(\"caption\")\nexport const MotionCite = /*@__PURE__*/ createMotionComponent(\"cite\")\nexport const MotionCode = /*@__PURE__*/ createMotionComponent(\"code\")\nexport const MotionCol = /*@__PURE__*/ createMotionComponent(\"col\")\nexport const MotionColgroup = /*@__PURE__*/ createMotionComponent(\"colgroup\")\nexport const MotionData = /*@__PURE__*/ createMotionComponent(\"data\")\nexport const MotionDatalist = /*@__PURE__*/ createMotionComponent(\"datalist\")\nexport const MotionDd = /*@__PURE__*/ createMotionComponent(\"dd\")\nexport const MotionDel = /*@__PURE__*/ createMotionComponent(\"del\")\nexport const MotionDetails = /*@__PURE__*/ createMotionComponent(\"details\")\nexport const MotionDfn = /*@__PURE__*/ createMotionComponent(\"dfn\")\nexport const MotionDialog = /*@__PURE__*/ createMotionComponent(\"dialog\")\nexport const MotionDiv = /*@__PURE__*/ createMotionComponent(\"div\")\nexport const MotionDl = /*@__PURE__*/ createMotionComponent(\"dl\")\nexport const MotionDt = /*@__PURE__*/ createMotionComponent(\"dt\")\nexport const MotionEm = /*@__PURE__*/ createMotionComponent(\"em\")\nexport const MotionEmbed = /*@__PURE__*/ createMotionComponent(\"embed\")\nexport const MotionFieldset = /*@__PURE__*/ createMotionComponent(\"fieldset\")\nexport const MotionFigcaption =\n /*@__PURE__*/ createMotionComponent(\"figcaption\")\nexport const MotionFigure = /*@__PURE__*/ createMotionComponent(\"figure\")\nexport const MotionFooter = /*@__PURE__*/ createMotionComponent(\"footer\")\nexport const MotionForm = /*@__PURE__*/ createMotionComponent(\"form\")\nexport const MotionH1 = /*@__PURE__*/ createMotionComponent(\"h1\")\nexport const MotionH2 = /*@__PURE__*/ createMotionComponent(\"h2\")\nexport const MotionH3 = /*@__PURE__*/ createMotionComponent(\"h3\")\nexport const MotionH4 = /*@__PURE__*/ createMotionComponent(\"h4\")\nexport const MotionH5 = /*@__PURE__*/ createMotionComponent(\"h5\")\nexport const MotionH6 = /*@__PURE__*/ createMotionComponent(\"h6\")\nexport const MotionHead = /*@__PURE__*/ createMotionComponent(\"head\")\nexport const MotionHeader = /*@__PURE__*/ createMotionComponent(\"header\")\nexport const MotionHgroup = /*@__PURE__*/ createMotionComponent(\"hgroup\")\nexport const MotionHr = /*@__PURE__*/ createMotionComponent(\"hr\")\nexport const MotionHtml = /*@__PURE__*/ createMotionComponent(\"html\")\nexport const MotionI = /*@__PURE__*/ createMotionComponent(\"i\")\nexport const MotionIframe = /*@__PURE__*/ createMotionComponent(\"iframe\")\nexport const MotionImg = /*@__PURE__*/ createMotionComponent(\"img\")\nexport const MotionInput = /*@__PURE__*/ createMotionComponent(\"input\")\nexport const MotionIns = /*@__PURE__*/ createMotionComponent(\"ins\")\nexport const MotionKbd = /*@__PURE__*/ createMotionComponent(\"kbd\")\nexport const MotionKeygen = /*@__PURE__*/ createMotionComponent(\"keygen\")\nexport const MotionLabel = /*@__PURE__*/ createMotionComponent(\"label\")\nexport const MotionLegend = /*@__PURE__*/ createMotionComponent(\"legend\")\nexport const MotionLi = /*@__PURE__*/ createMotionComponent(\"li\")\nexport const MotionLink = /*@__PURE__*/ createMotionComponent(\"link\")\nexport const MotionMain = /*@__PURE__*/ createMotionComponent(\"main\")\nexport const MotionMap = /*@__PURE__*/ createMotionComponent(\"map\")\nexport const MotionMark = /*@__PURE__*/ createMotionComponent(\"mark\")\nexport const MotionMenu = /*@__PURE__*/ createMotionComponent(\"menu\")\nexport const MotionMenuitem = /*@__PURE__*/ createMotionComponent(\"menuitem\")\nexport const MotionMeter = /*@__PURE__*/ createMotionComponent(\"meter\")\nexport const MotionNav = /*@__PURE__*/ createMotionComponent(\"nav\")\nexport const MotionObject = /*@__PURE__*/ createMotionComponent(\"object\")\nexport const MotionOl = /*@__PURE__*/ createMotionComponent(\"ol\")\nexport const MotionOptgroup = /*@__PURE__*/ createMotionComponent(\"optgroup\")\nexport const MotionOption = /*@__PURE__*/ createMotionComponent(\"option\")\nexport const MotionOutput = /*@__PURE__*/ createMotionComponent(\"output\")\nexport const MotionP = /*@__PURE__*/ createMotionComponent(\"p\")\nexport const MotionParam = /*@__PURE__*/ createMotionComponent(\"param\")\nexport const MotionPicture = /*@__PURE__*/ createMotionComponent(\"picture\")\nexport const MotionPre = /*@__PURE__*/ createMotionComponent(\"pre\")\nexport const MotionProgress = /*@__PURE__*/ createMotionComponent(\"progress\")\nexport const MotionQ = /*@__PURE__*/ createMotionComponent(\"q\")\nexport const MotionRp = /*@__PURE__*/ createMotionComponent(\"rp\")\nexport const MotionRt = /*@__PURE__*/ createMotionComponent(\"rt\")\nexport const MotionRuby = /*@__PURE__*/ createMotionComponent(\"ruby\")\nexport const MotionS = /*@__PURE__*/ createMotionComponent(\"s\")\nexport const MotionSamp = /*@__PURE__*/ createMotionComponent(\"samp\")\nexport const MotionScript = /*@__PURE__*/ createMotionComponent(\"script\")\nexport const MotionSection = /*@__PURE__*/ createMotionComponent(\"section\")\nexport const MotionSelect = /*@__PURE__*/ createMotionComponent(\"select\")\nexport const MotionSmall = /*@__PURE__*/ createMotionComponent(\"small\")\nexport const MotionSource = /*@__PURE__*/ createMotionComponent(\"source\")\nexport const MotionSpan = /*@__PURE__*/ createMotionComponent(\"span\")\nexport const MotionStrong = /*@__PURE__*/ createMotionComponent(\"strong\")\nexport const MotionStyle = /*@__PURE__*/ createMotionComponent(\"style\")\nexport const MotionSub = /*@__PURE__*/ createMotionComponent(\"sub\")\nexport const MotionSummary = /*@__PURE__*/ createMotionComponent(\"summary\")\nexport const MotionSup = /*@__PURE__*/ createMotionComponent(\"sup\")\nexport const MotionTable = /*@__PURE__*/ createMotionComponent(\"table\")\nexport const MotionTbody = /*@__PURE__*/ createMotionComponent(\"tbody\")\nexport const MotionTd = /*@__PURE__*/ createMotionComponent(\"td\")\nexport const MotionTextarea = /*@__PURE__*/ createMotionComponent(\"textarea\")\nexport const MotionTfoot = /*@__PURE__*/ createMotionComponent(\"tfoot\")\nexport const MotionTh = /*@__PURE__*/ createMotionComponent(\"th\")\nexport const MotionThead = /*@__PURE__*/ createMotionComponent(\"thead\")\nexport const MotionTime = /*@__PURE__*/ createMotionComponent(\"time\")\nexport const MotionTitle = /*@__PURE__*/ createMotionComponent(\"title\")\nexport const MotionTr = /*@__PURE__*/ createMotionComponent(\"tr\")\nexport const MotionTrack = /*@__PURE__*/ createMotionComponent(\"track\")\nexport const MotionU = /*@__PURE__*/ createMotionComponent(\"u\")\nexport const MotionUl = /*@__PURE__*/ createMotionComponent(\"ul\")\nexport const MotionVideo = /*@__PURE__*/ createMotionComponent(\"video\")\nexport const MotionWbr = /*@__PURE__*/ createMotionComponent(\"wbr\")\nexport const MotionWebview = /*@__PURE__*/ createMotionComponent(\"webview\")\n\n/**\n * SVG components\n */\nexport const MotionAnimate = /*@__PURE__*/ createMotionComponent(\"animate\")\nexport const MotionCircle = /*@__PURE__*/ createMotionComponent(\"circle\")\nexport const MotionDefs = /*@__PURE__*/ createMotionComponent(\"defs\")\nexport const MotionDesc = /*@__PURE__*/ createMotionComponent(\"desc\")\nexport const MotionEllipse = /*@__PURE__*/ createMotionComponent(\"ellipse\")\nexport const MotionG = /*@__PURE__*/ createMotionComponent(\"g\")\nexport const MotionImage = /*@__PURE__*/ createMotionComponent(\"image\")\nexport const MotionLine = /*@__PURE__*/ createMotionComponent(\"line\")\nexport const MotionFilter = /*@__PURE__*/ createMotionComponent(\"filter\")\nexport const MotionMarker = /*@__PURE__*/ createMotionComponent(\"marker\")\nexport const MotionMask = /*@__PURE__*/ createMotionComponent(\"mask\")\nexport const MotionMetadata = /*@__PURE__*/ createMotionComponent(\"metadata\")\nexport const MotionPath = /*@__PURE__*/ createMotionComponent(\"path\")\nexport const MotionPattern = /*@__PURE__*/ createMotionComponent(\"pattern\")\nexport const MotionPolygon = /*@__PURE__*/ createMotionComponent(\"polygon\")\nexport const MotionPolyline = /*@__PURE__*/ createMotionComponent(\"polyline\")\nexport const MotionRect = /*@__PURE__*/ createMotionComponent(\"rect\")\nexport const MotionStop = /*@__PURE__*/ createMotionComponent(\"stop\")\nexport const MotionSvg = /*@__PURE__*/ createMotionComponent(\"svg\")\nexport const MotionSymbol = /*@__PURE__*/ createMotionComponent(\"symbol\")\nexport const MotionText = /*@__PURE__*/ createMotionComponent(\"text\")\nexport const MotionTspan = /*@__PURE__*/ createMotionComponent(\"tspan\")\nexport const MotionUse = /*@__PURE__*/ createMotionComponent(\"use\")\nexport const MotionView = /*@__PURE__*/ createMotionComponent(\"view\")\nexport const MotionClipPath = /*@__PURE__*/ createMotionComponent(\"clipPath\")\nexport const MotionFeBlend = /*@__PURE__*/ createMotionComponent(\"feBlend\")\nexport const MotionFeColorMatrix =\n /*@__PURE__*/ createMotionComponent(\"feColorMatrix\")\nexport const MotionFeComponentTransfer = /*@__PURE__*/ createMotionComponent(\n \"feComponentTransfer\"\n)\nexport const MotionFeComposite =\n /*@__PURE__*/ createMotionComponent(\"feComposite\")\nexport const MotionFeConvolveMatrix =\n /*@__PURE__*/ createMotionComponent(\"feConvolveMatrix\")\nexport const MotionFeDiffuseLighting =\n /*@__PURE__*/ createMotionComponent(\"feDiffuseLighting\")\nexport const MotionFeDisplacementMap =\n /*@__PURE__*/ createMotionComponent(\"feDisplacementMap\")\nexport const MotionFeDistantLight =\n /*@__PURE__*/ createMotionComponent(\"feDistantLight\")\nexport const MotionFeDropShadow =\n /*@__PURE__*/ createMotionComponent(\"feDropShadow\")\nexport const MotionFeFlood = /*@__PURE__*/ createMotionComponent(\"feFlood\")\nexport const MotionFeFuncA = /*@__PURE__*/ createMotionComponent(\"feFuncA\")\nexport const MotionFeFuncB = /*@__PURE__*/ createMotionComponent(\"feFuncB\")\nexport const MotionFeFuncG = /*@__PURE__*/ createMotionComponent(\"feFuncG\")\nexport const MotionFeFuncR = /*@__PURE__*/ createMotionComponent(\"feFuncR\")\nexport const MotionFeGaussianBlur =\n /*@__PURE__*/ createMotionComponent(\"feGaussianBlur\")\nexport const MotionFeImage = /*@__PURE__*/ createMotionComponent(\"feImage\")\nexport const MotionFeMerge = /*@__PURE__*/ createMotionComponent(\"feMerge\")\nexport const MotionFeMergeNode =\n /*@__PURE__*/ createMotionComponent(\"feMergeNode\")\nexport const MotionFeMorphology =\n /*@__PURE__*/ createMotionComponent(\"feMorphology\")\nexport const MotionFeOffset = /*@__PURE__*/ createMotionComponent(\"feOffset\")\nexport const MotionFePointLight =\n /*@__PURE__*/ createMotionComponent(\"fePointLight\")\nexport const MotionFeSpecularLighting =\n /*@__PURE__*/ createMotionComponent(\"feSpecularLighting\")\nexport const MotionFeSpotLight =\n /*@__PURE__*/ createMotionComponent(\"feSpotLight\")\nexport const MotionFeTile = /*@__PURE__*/ createMotionComponent(\"feTile\")\nexport const MotionFeTurbulence =\n /*@__PURE__*/ createMotionComponent(\"feTurbulence\")\nexport const MotionForeignObject =\n /*@__PURE__*/ createMotionComponent(\"foreignObject\")\nexport const MotionLinearGradient =\n /*@__PURE__*/ createMotionComponent(\"linearGradient\")\nexport const MotionRadialGradient =\n /*@__PURE__*/ createMotionComponent(\"radialGradient\")\nexport const MotionTextPath = /*@__PURE__*/ createMotionComponent(\"textPath\")\n"],"names":[],"mappings":";;;AAIA;;AAEG;AACI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEH;AACG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEH;AACG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEP;;AAEG;AACI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEH;AACG;;AAIH;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACG;AACA;AACA;AACA;AACA;;AAEH;AACG;AACA;;AAEH;;AAEA;AACG;;AAEH;;AAEA;;AAEA;AACG;;AAEH;;AAEA;;AAEA;;AAEA;AACG;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs deleted file mode 100644 index 06da6bd9..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { animations } from '../../../motion/features/animations.mjs'; -import { drag } from '../../../motion/features/drag.mjs'; -import { gestureAnimations } from '../../../motion/features/gestures.mjs'; -import { layout } from '../../../motion/features/layout.mjs'; - -const featureBundle = { - ...animations, - ...gestureAnimations, - ...drag, - ...layout, -}; - -export { featureBundle }; -//# sourceMappingURL=feature-bundle.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.map deleted file mode 100644 index 14f564d0..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"feature-bundle.mjs","sources":["../../../../../src/render/components/motion/feature-bundle.ts"],"sourcesContent":["import { animations } from \"../../../motion/features/animations\"\nimport { drag } from \"../../../motion/features/drag\"\nimport { gestureAnimations } from \"../../../motion/features/gestures\"\nimport { layout } from \"../../../motion/features/layout\"\n\nexport const featureBundle = {\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout,\n}\n"],"names":[],"mappings":";;;;;AAKO,MAAM,aAAa,GAAG;AACzB,IAAA,GAAG,UAAU;AACb,IAAA,GAAG,iBAAiB;AACpB,IAAA,GAAG,IAAI;AACP,IAAA,GAAG,MAAM;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs deleted file mode 100644 index 66755cac..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import { createDomVisualElement } from '../../dom/create-visual-element.mjs'; -import { createMotionProxy } from '../create-proxy.mjs'; -import { featureBundle } from './feature-bundle.mjs'; - -const motion = /*@__PURE__*/ createMotionProxy(featureBundle, createDomVisualElement); - -export { motion }; -//# sourceMappingURL=proxy.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.map deleted file mode 100644 index 78668806..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proxy.mjs","sources":["../../../../../src/render/components/motion/proxy.ts"],"sourcesContent":["import { createDomVisualElement } from \"../../dom/create-visual-element\"\nimport { createMotionProxy } from \"../create-proxy\"\nimport { featureBundle } from \"./feature-bundle\"\n\nexport const motion = /*@__PURE__*/ createMotionProxy(\n featureBundle,\n createDomVisualElement\n)\n"],"names":[],"mappings":";;;;AAIO,MAAM,MAAM,iBAAiB,iBAAiB,CACjD,aAAa,EACb,sBAAsB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs deleted file mode 100644 index 95a233fd..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import { SVGVisualElement, HTMLVisualElement } from 'motion-dom'; -import { Fragment } from 'react'; -import { isSVGComponent } from './utils/is-svg-component.mjs'; - -const createDomVisualElement = (Component, options) => { - /** - * Use explicit isSVG override if provided, otherwise auto-detect - */ - const isSVG = options.isSVG ?? isSVGComponent(Component); - return isSVG - ? new SVGVisualElement(options) - : new HTMLVisualElement(options, { - allowProjection: Component !== Fragment, - }); -}; - -export { createDomVisualElement }; -//# sourceMappingURL=create-visual-element.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs.map deleted file mode 100644 index a98aaaa0..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create-visual-element.mjs","sources":["../../../../src/render/dom/create-visual-element.ts"],"sourcesContent":["import { HTMLVisualElement, SVGVisualElement } from \"motion-dom\"\nimport { ComponentType, Fragment } from \"react\"\nimport { CreateVisualElement, VisualElementOptions } from \"../types\"\nimport { isSVGComponent } from \"./utils/is-svg-component\"\n\nexport const createDomVisualElement: CreateVisualElement = (\n Component: string | ComponentType>,\n options: VisualElementOptions\n) => {\n /**\n * Use explicit isSVG override if provided, otherwise auto-detect\n */\n const isSVG = options.isSVG ?? isSVGComponent(Component)\n\n return isSVG\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options, {\n allowProjection: Component !== Fragment,\n })\n}\n"],"names":[],"mappings":";;;;MAKa,sBAAsB,GAAwB,CACvD,SAAmE,EACnE,OAAuD,KACvD;AACA;;AAEG;IACH,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,cAAc,CAAC,SAAS,CAAC;AAExD,IAAA,OAAO;AACH,UAAE,IAAI,gBAAgB,CAAC,OAAO;AAC9B,UAAE,IAAI,iBAAiB,CAAC,OAAO,EAAE;YAC3B,eAAe,EAAE,SAAS,KAAK,QAAQ;AAC1C,SAAA,CAAC;AACZ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs deleted file mode 100644 index 4f15e67d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs +++ /dev/null @@ -1,16 +0,0 @@ -"use client"; -import { animations } from '../../motion/features/animations.mjs'; -import { gestureAnimations } from '../../motion/features/gestures.mjs'; -import { createDomVisualElement } from './create-visual-element.mjs'; - -/** - * @public - */ -const domAnimation = { - renderer: createDomVisualElement, - ...animations, - ...gestureAnimations, -}; - -export { domAnimation }; -//# sourceMappingURL=features-animation.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs.map deleted file mode 100644 index f0f6583d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"features-animation.mjs","sources":["../../../../src/render/dom/features-animation.ts"],"sourcesContent":["\"use client\"\n\nimport { animations } from \"../../motion/features/animations\"\nimport { gestureAnimations } from \"../../motion/features/gestures\"\nimport { FeatureBundle } from \"../../motion/features/types\"\nimport { createDomVisualElement } from \"./create-visual-element\"\n\n/**\n * @public\n */\nexport const domAnimation: FeatureBundle = {\n renderer: createDomVisualElement,\n ...animations,\n ...gestureAnimations,\n}\n"],"names":[],"mappings":";;;;;AAOA;;AAEG;AACI;AACH;AACA;AACA;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-max.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-max.mjs deleted file mode 100644 index 54deaf2f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-max.mjs +++ /dev/null @@ -1,16 +0,0 @@ -"use client"; -import { drag } from '../../motion/features/drag.mjs'; -import { layout } from '../../motion/features/layout.mjs'; -import { domAnimation } from './features-animation.mjs'; - -/** - * @public - */ -const domMax = { - ...domAnimation, - ...drag, - ...layout, -}; - -export { domMax }; -//# sourceMappingURL=features-max.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-max.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-max.mjs.map deleted file mode 100644 index 082a5b8e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-max.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"features-max.mjs","sources":["../../../../src/render/dom/features-max.ts"],"sourcesContent":["\"use client\"\n\nimport { drag } from \"../../motion/features/drag\"\nimport { layout } from \"../../motion/features/layout\"\nimport { FeatureBundle } from \"../../motion/features/types\"\nimport { domAnimation } from \"./features-animation\"\n\n/**\n * @public\n */\nexport const domMax: FeatureBundle = {\n ...domAnimation,\n ...drag,\n ...layout,\n}\n"],"names":[],"mappings":";;;;;AAOA;;AAEG;AACI;AACH;AACA;AACA;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-min.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-min.mjs deleted file mode 100644 index 72a4fa0c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-min.mjs +++ /dev/null @@ -1,14 +0,0 @@ -"use client"; -import { animations } from '../../motion/features/animations.mjs'; -import { createDomVisualElement } from './create-visual-element.mjs'; - -/** - * @public - */ -const domMin = { - renderer: createDomVisualElement, - ...animations, -}; - -export { domMin }; -//# sourceMappingURL=features-min.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-min.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-min.mjs.map deleted file mode 100644 index 75c11f7b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/features-min.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"features-min.mjs","sources":["../../../../src/render/dom/features-min.ts"],"sourcesContent":["\"use client\"\n\nimport { animations } from \"../../motion/features/animations\"\nimport { FeatureBundle } from \"../../motion/features/types\"\nimport { createDomVisualElement } from \"./create-visual-element\"\n\n/**\n * @public\n */\nexport const domMin: FeatureBundle = {\n renderer: createDomVisualElement,\n ...animations,\n}\n"],"names":[],"mappings":";;;;AAMA;;AAEG;AACI;AACH;AACA;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs deleted file mode 100644 index 2913e9d6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs +++ /dev/null @@ -1,38 +0,0 @@ -import { observeTimeline } from 'motion-dom'; -import { canUseNativeTimeline } from './utils/can-use-native-timeline.mjs'; -import { getTimeline } from './utils/get-timeline.mjs'; -import { offsetToViewTimelineRange } from './utils/offset-to-range.mjs'; - -function attachToAnimation(animation, options) { - const timeline = getTimeline(options); - const range = options.target - ? offsetToViewTimelineRange(options.offset) - : undefined; - /** - * Use native timeline when: - * - No target: ScrollTimeline (existing behaviour) - * - Target with mappable offset: ViewTimeline with named range - * - Target with unmappable offset: fall back to JS observe - */ - const useNative = options.target - ? canUseNativeTimeline(options.target) && !!range - : canUseNativeTimeline(); - return animation.attachTimeline({ - timeline: useNative ? timeline : undefined, - ...(range && - useNative && { - rangeStart: range.rangeStart, - rangeEnd: range.rangeEnd, - }), - observe: (valueAnimation) => { - valueAnimation.pause(); - return observeTimeline((progress) => { - valueAnimation.time = - valueAnimation.iterationDuration * progress; - }, timeline); - }, - }); -} - -export { attachToAnimation }; -//# sourceMappingURL=attach-animation.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs.map deleted file mode 100644 index b9553c05..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attach-animation.mjs","sources":["../../../../../src/render/dom/scroll/attach-animation.ts"],"sourcesContent":["import { AnimationPlaybackControls, observeTimeline } from \"motion-dom\"\nimport { ScrollOptionsWithDefaults } from \"./types\"\nimport { canUseNativeTimeline } from \"./utils/can-use-native-timeline\"\nimport { getTimeline } from \"./utils/get-timeline\"\nimport { offsetToViewTimelineRange } from \"./utils/offset-to-range\"\n\nexport function attachToAnimation(\n animation: AnimationPlaybackControls,\n options: ScrollOptionsWithDefaults\n) {\n const timeline = getTimeline(options)\n\n const range = options.target\n ? offsetToViewTimelineRange(options.offset)\n : undefined\n\n /**\n * Use native timeline when:\n * - No target: ScrollTimeline (existing behaviour)\n * - Target with mappable offset: ViewTimeline with named range\n * - Target with unmappable offset: fall back to JS observe\n */\n const useNative = options.target\n ? canUseNativeTimeline(options.target) && !!range\n : canUseNativeTimeline()\n\n return animation.attachTimeline({\n timeline: useNative ? timeline : undefined,\n ...(range &&\n useNative && {\n rangeStart: range.rangeStart,\n rangeEnd: range.rangeEnd,\n }),\n observe: (valueAnimation) => {\n valueAnimation.pause()\n\n return observeTimeline((progress) => {\n valueAnimation.time =\n valueAnimation.iterationDuration * progress\n }, timeline)\n },\n })\n}\n"],"names":[],"mappings":";;;;;AAMM,SAAU,iBAAiB,CAC7B,SAAoC,EACpC,OAAkC,EAAA;AAElC,IAAA,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC;AAErC,IAAA,MAAM,KAAK,GAAG,OAAO,CAAC;AAClB,UAAE,yBAAyB,CAAC,OAAO,CAAC,MAAM;UACxC,SAAS;AAEf;;;;;AAKG;AACH,IAAA,MAAM,SAAS,GAAG,OAAO,CAAC;UACpB,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;UAC1C,oBAAoB,EAAE;IAE5B,OAAO,SAAS,CAAC,cAAc,CAAC;QAC5B,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS;AAC1C,QAAA,IAAI,KAAK;AACL,YAAA,SAAS,IAAI;YACT,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ;SAC3B,CAAC;AACN,QAAA,OAAO,EAAE,CAAC,cAAc,KAAI;YACxB,cAAc,CAAC,KAAK,EAAE;AAEtB,YAAA,OAAO,eAAe,CAAC,CAAC,QAAQ,KAAI;AAChC,gBAAA,cAAc,CAAC,IAAI;AACf,oBAAA,cAAc,CAAC,iBAAiB,GAAG,QAAQ;YACnD,CAAC,EAAE,QAAQ,CAAC;QAChB,CAAC;AACJ,KAAA,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-function.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-function.mjs deleted file mode 100644 index f992a87a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-function.mjs +++ /dev/null @@ -1,25 +0,0 @@ -import { observeTimeline } from 'motion-dom'; -import { scrollInfo } from './track.mjs'; -import { getTimeline } from './utils/get-timeline.mjs'; -import { isElementTracking } from './utils/is-element-tracking.mjs'; - -/** - * If the onScroll function has two arguments, it's expecting - * more specific information about the scroll from scrollInfo. - */ -function isOnScrollWithInfo(onScroll) { - return onScroll.length === 2; -} -function attachToFunction(onScroll, options) { - if (isOnScrollWithInfo(onScroll) || isElementTracking(options)) { - return scrollInfo((info) => { - onScroll(info[options.axis].progress, info); - }, options); - } - else { - return observeTimeline(onScroll, getTimeline(options)); - } -} - -export { attachToFunction }; -//# sourceMappingURL=attach-function.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-function.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-function.mjs.map deleted file mode 100644 index 1a1a38d7..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/attach-function.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"attach-function.mjs","sources":["../../../../../src/render/dom/scroll/attach-function.ts"],"sourcesContent":["import { observeTimeline } from \"motion-dom\"\nimport { scrollInfo } from \"./track\"\nimport { OnScroll, OnScrollWithInfo, ScrollOptionsWithDefaults } from \"./types\"\nimport { getTimeline } from \"./utils/get-timeline\"\nimport { isElementTracking } from \"./utils/is-element-tracking\"\n\n/**\n * If the onScroll function has two arguments, it's expecting\n * more specific information about the scroll from scrollInfo.\n */\nfunction isOnScrollWithInfo(onScroll: OnScroll): onScroll is OnScrollWithInfo {\n return onScroll.length === 2\n}\n\nexport function attachToFunction(\n onScroll: OnScroll,\n options: ScrollOptionsWithDefaults\n) {\n if (isOnScrollWithInfo(onScroll) || isElementTracking(options)) {\n return scrollInfo((info) => {\n onScroll(info[options.axis!].progress, info)\n }, options)\n } else {\n return observeTimeline(onScroll, getTimeline(options))\n }\n}\n"],"names":[],"mappings":";;;;;AAMA;;;AAGG;AACH,SAAS,kBAAkB,CAAC,QAAkB,EAAA;AAC1C,IAAA,OAAO,QAAQ,CAAC,MAAM,KAAK,CAAC;AAChC;AAEM,SAAU,gBAAgB,CAC5B,QAAkB,EAClB,OAAkC,EAAA;IAElC,IAAI,kBAAkB,CAAC,QAAQ,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE;AAC5D,QAAA,OAAO,UAAU,CAAC,CAAC,IAAI,KAAI;AACvB,YAAA,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC;QAChD,CAAC,EAAE,OAAO,CAAC;IACf;SAAO;QACH,OAAO,eAAe,CAAC,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC1D;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs deleted file mode 100644 index 2c4016a8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { noop } from 'motion-utils'; -import { attachToAnimation } from './attach-animation.mjs'; -import { attachToFunction } from './attach-function.mjs'; - -function scroll(onScroll, { axis = "y", container = document.scrollingElement, ...options } = {}) { - if (!container) - return noop; - const optionsWithDefaults = { axis, container, ...options }; - return typeof onScroll === "function" - ? attachToFunction(onScroll, optionsWithDefaults) - : attachToAnimation(onScroll, optionsWithDefaults); -} - -export { scroll }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs.map deleted file mode 100644 index 964ab962..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../../src/render/dom/scroll/index.ts"],"sourcesContent":["import { AnimationPlaybackControls } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { attachToAnimation } from \"./attach-animation\"\nimport { attachToFunction } from \"./attach-function\"\nimport { OnScroll, ScrollOptions } from \"./types\"\n\nexport function scroll(\n onScroll: OnScroll | AnimationPlaybackControls,\n {\n axis = \"y\",\n container = document.scrollingElement as Element,\n ...options\n }: ScrollOptions = {}\n): VoidFunction {\n if (!container) return noop as VoidFunction\n\n const optionsWithDefaults = { axis, container, ...options }\n\n return typeof onScroll === \"function\"\n ? attachToFunction(onScroll, optionsWithDefaults)\n : attachToAnimation(onScroll, optionsWithDefaults)\n}\n"],"names":[],"mappings":";;;;SAMgB,MAAM,CAClB,QAA8C,EAC9C,EACI,IAAI,GAAG,GAAG,EACV,SAAS,GAAG,QAAQ,CAAC,gBAA2B,EAChD,GAAG,OAAO,KACK,EAAE,EAAA;AAErB,IAAA,IAAI,CAAC,SAAS;AAAE,QAAA,OAAO,IAAoB;IAE3C,MAAM,mBAAmB,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE;IAE3D,OAAO,OAAO,QAAQ,KAAK;AACvB,UAAE,gBAAgB,CAAC,QAAQ,EAAE,mBAAmB;AAChD,UAAE,iBAAiB,CAAC,QAAQ,EAAE,mBAAmB,CAAC;AAC1D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs deleted file mode 100644 index 3d0f0537..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs +++ /dev/null @@ -1,56 +0,0 @@ -import { progress, velocityPerSecond } from 'motion-utils'; - -/** - * A time in milliseconds, beyond which we consider the scroll velocity to be 0. - */ -const maxElapsed = 50; -const createAxisInfo = () => ({ - current: 0, - offset: [], - progress: 0, - scrollLength: 0, - targetOffset: 0, - targetLength: 0, - containerLength: 0, - velocity: 0, -}); -const createScrollInfo = () => ({ - time: 0, - x: createAxisInfo(), - y: createAxisInfo(), -}); -const keys = { - x: { - length: "Width", - position: "Left", - }, - y: { - length: "Height", - position: "Top", - }, -}; -function updateAxisInfo(element, axisName, info, time) { - const axis = info[axisName]; - const { length, position } = keys[axisName]; - const prev = axis.current; - const prevTime = info.time; - axis.current = Math.abs(element[`scroll${position}`]); - axis.scrollLength = element[`scroll${length}`] - element[`client${length}`]; - axis.offset.length = 0; - axis.offset[0] = 0; - axis.offset[1] = axis.scrollLength; - axis.progress = progress(0, axis.scrollLength, axis.current); - const elapsed = time - prevTime; - axis.velocity = - elapsed > maxElapsed - ? 0 - : velocityPerSecond(axis.current - prev, elapsed); -} -function updateScrollInfo(element, info, time) { - updateAxisInfo(element, "x", info, time); - updateAxisInfo(element, "y", info, time); - info.time = time; -} - -export { createScrollInfo, updateScrollInfo }; -//# sourceMappingURL=info.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs.map deleted file mode 100644 index 3aea0f4b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"info.mjs","sources":["../../../../../src/render/dom/scroll/info.ts"],"sourcesContent":["import { progress, velocityPerSecond } from \"motion-utils\"\nimport { AxisScrollInfo, ScrollInfo } from \"./types\"\n\n/**\n * A time in milliseconds, beyond which we consider the scroll velocity to be 0.\n */\nconst maxElapsed = 50\n\nconst createAxisInfo = (): AxisScrollInfo => ({\n current: 0,\n offset: [],\n progress: 0,\n scrollLength: 0,\n targetOffset: 0,\n targetLength: 0,\n containerLength: 0,\n velocity: 0,\n})\n\nexport const createScrollInfo = (): ScrollInfo => ({\n time: 0,\n x: createAxisInfo(),\n y: createAxisInfo(),\n})\n\nconst keys = {\n x: {\n length: \"Width\",\n position: \"Left\",\n },\n y: {\n length: \"Height\",\n position: \"Top\",\n },\n} as const\n\nfunction updateAxisInfo(\n element: Element,\n axisName: \"x\" | \"y\",\n info: ScrollInfo,\n time: number\n) {\n const axis = info[axisName]\n const { length, position } = keys[axisName]\n\n const prev = axis.current\n const prevTime = info.time\n\n axis.current = Math.abs(element[`scroll${position}`])\n axis.scrollLength = element[`scroll${length}`] - element[`client${length}`]\n\n axis.offset.length = 0\n axis.offset[0] = 0\n axis.offset[1] = axis.scrollLength\n axis.progress = progress(0, axis.scrollLength, axis.current)\n\n const elapsed = time - prevTime\n axis.velocity =\n elapsed > maxElapsed\n ? 0\n : velocityPerSecond(axis.current - prev, elapsed)\n}\n\nexport function updateScrollInfo(\n element: Element,\n info: ScrollInfo,\n time: number\n) {\n updateAxisInfo(element, \"x\", info, time)\n updateAxisInfo(element, \"y\", info, time)\n info.time = time\n}\n"],"names":[],"mappings":";;AAGA;;AAEG;AACH,MAAM,UAAU,GAAG,EAAE;AAErB,MAAM,cAAc,GAAG,OAAuB;AAC1C,IAAA,OAAO,EA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,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;IAClB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY;AAClC,IAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC;AAE5D,IAAA,MAAM,OAAO,GAAG,IAAI,GAAG,QAAQ;AAC/B,IAAA,IAAI,CAAC,QAAQ;AACT,QAAA,OAAO,GAAG;AACN,cAAE;cACA,iBAAiB,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,OAAO,CAAC;AAC7D;SAEgB,gBAAgB,CAC5B,OAAgB,EAChB,IAAgB,EAChB,IAAY,EAAA;IAEZ,cAAc,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;IACxC,cAAc,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;AACxC,IAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AACpB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs deleted file mode 100644 index 58cb4c10..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +++ /dev/null @@ -1,46 +0,0 @@ -const namedEdges = { - start: 0, - center: 0.5, - end: 1, -}; -function resolveEdge(edge, length, inset = 0) { - let delta = 0; - /** - * If we have this edge defined as a preset, replace the definition - * with the numerical value. - */ - if (edge in namedEdges) { - edge = namedEdges[edge]; - } - /** - * Handle unit values - */ - if (typeof edge === "string") { - const asNumber = parseFloat(edge); - if (edge.endsWith("px")) { - delta = asNumber; - } - else if (edge.endsWith("%")) { - edge = asNumber / 100; - } - else if (edge.endsWith("vw")) { - delta = (asNumber / 100) * document.documentElement.clientWidth; - } - else if (edge.endsWith("vh")) { - delta = (asNumber / 100) * document.documentElement.clientHeight; - } - else { - edge = asNumber; - } - } - /** - * If the edge is defined as a number, handle as a progress value. - */ - if (typeof edge === "number") { - delta = length * edge; - } - return inset + delta; -} - -export { namedEdges, resolveEdge }; -//# sourceMappingURL=edge.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs.map deleted file mode 100644 index 0b568a7f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"edge.mjs","sources":["../../../../../../src/render/dom/scroll/offsets/edge.ts"],"sourcesContent":["import { Edge, NamedEdges } from \"../types\"\n\nexport const namedEdges: Record = {\n start: 0,\n center: 0.5,\n end: 1,\n}\n\nexport function resolveEdge(edge: Edge, length: number, inset = 0) {\n let delta = 0\n\n /**\n * If we have this edge defined as a preset, replace the definition\n * with the numerical value.\n */\n if (edge in namedEdges) {\n edge = namedEdges[edge as NamedEdges]\n }\n\n /**\n * Handle unit values\n */\n if (typeof edge === \"string\") {\n const asNumber = parseFloat(edge)\n\n if (edge.endsWith(\"px\")) {\n delta = asNumber\n } else if (edge.endsWith(\"%\")) {\n edge = asNumber / 100\n } else if (edge.endsWith(\"vw\")) {\n delta = (asNumber / 100) * document.documentElement.clientWidth\n } else if (edge.endsWith(\"vh\")) {\n delta = (asNumber / 100) * document.documentElement.clientHeight\n } else {\n edge = asNumber\n }\n }\n\n /**\n * If the edge is defined as a number, handle as a progress value.\n */\n if (typeof edge === \"number\") {\n delta = length * edge\n }\n\n return inset + delta\n}\n"],"names":[],"mappings":"AAEO,MAAM,UAAU,GAA+B;AAClD,IAAA,KAAK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/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs deleted file mode 100644 index 32cdd155..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +++ /dev/null @@ -1,60 +0,0 @@ -import { interpolate, defaultOffset } from 'motion-dom'; -import { clamp } from 'motion-utils'; -import { calcInset } from './inset.mjs'; -import { resolveOffset } from './offset.mjs'; -import { ScrollOffset } from './presets.mjs'; - -const point = { x: 0, y: 0 }; -function getTargetSize(target) { - return "getBBox" in target && target.tagName !== "svg" - ? target.getBBox() - : { width: target.clientWidth, height: target.clientHeight }; -} -function resolveOffsets(container, info, options) { - const { offset: offsetDefinition = ScrollOffset.All } = options; - const { target = container, axis = "y" } = options; - const lengthLabel = axis === "y" ? "height" : "width"; - const inset = target !== container ? calcInset(target, container) : point; - /** - * Measure the target and container. If they're the same thing then we - * use the container's scrollWidth/Height as the target, from there - * all other calculations can remain the same. - */ - const targetSize = target === container - ? { width: container.scrollWidth, height: container.scrollHeight } - : getTargetSize(target); - const containerSize = { - width: container.clientWidth, - height: container.clientHeight, - }; - /** - * Reset the length of the resolved offset array rather than creating a new one. - * TODO: More reusable data structures for targetSize/containerSize would also be good. - */ - info[axis].offset.length = 0; - /** - * Populate the offset array by resolving the user's offset definition into - * a list of pixel scroll offets. - */ - let hasChanged = !info[axis].interpolate; - const numOffsets = offsetDefinition.length; - for (let i = 0; i < numOffsets; i++) { - const offset = resolveOffset(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]); - if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) { - hasChanged = true; - } - info[axis].offset[i] = offset; - } - /** - * If the pixel scroll offsets have changed, create a new interpolator function - * to map scroll value into a progress. - */ - if (hasChanged) { - info[axis].interpolate = interpolate(info[axis].offset, defaultOffset(offsetDefinition), { clamp: false }); - info[axis].interpolatorOffsets = [...info[axis].offset]; - } - info[axis].progress = clamp(0, 1, info[axis].interpolate(info[axis].current)); -} - -export { resolveOffsets }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs.map deleted file mode 100644 index cd82ae44..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../../../src/render/dom/scroll/offsets/index.ts"],"sourcesContent":["import { defaultOffset, interpolate } from \"motion-dom\"\nimport { clamp } from \"motion-utils\"\nimport { ScrollInfo, ScrollInfoOptions } from \"../types\"\nimport { calcInset } from \"./inset\"\nimport { resolveOffset } from \"./offset\"\nimport { ScrollOffset } from \"./presets\"\n\nconst point = { x: 0, y: 0 }\n\nfunction getTargetSize(target: Element) {\n return \"getBBox\" in target && target.tagName !== \"svg\"\n ? (target as SVGGraphicsElement).getBBox()\n : { width: target.clientWidth, height: target.clientHeight }\n}\n\nexport function resolveOffsets(\n container: Element,\n info: ScrollInfo,\n options: ScrollInfoOptions\n) {\n const { offset: offsetDefinition = ScrollOffset.All } = options\n const { target = container, axis = \"y\" } = options\n const lengthLabel = axis === \"y\" ? \"height\" : \"width\"\n\n const inset = target !== container ? calcInset(target, container) : point\n\n /**\n * Measure the target and container. If they're the same thing then we\n * use the container's scrollWidth/Height as the target, from there\n * all other calculations can remain the same.\n */\n const targetSize =\n target === container\n ? { width: container.scrollWidth, height: container.scrollHeight }\n : getTargetSize(target)\n\n const containerSize = {\n width: container.clientWidth,\n height: container.clientHeight,\n }\n\n /**\n * Reset the length of the resolved offset array rather than creating a new one.\n * TODO: More reusable data structures for targetSize/containerSize would also be good.\n */\n info[axis].offset.length = 0\n\n /**\n * Populate the offset array by resolving the user's offset definition into\n * a list of pixel scroll offets.\n */\n let hasChanged = !info[axis].interpolate\n\n const numOffsets = offsetDefinition.length\n for (let i = 0; i < numOffsets; i++) {\n const offset = resolveOffset(\n offsetDefinition[i],\n containerSize[lengthLabel],\n targetSize[lengthLabel],\n inset[axis]\n )\n\n if (!hasChanged && offset !== info[axis].interpolatorOffsets![i]) {\n hasChanged = true\n }\n\n info[axis].offset[i] = offset\n }\n\n /**\n * If the pixel scroll offsets have changed, create a new interpolator function\n * to map scroll value into a progress.\n */\n if (hasChanged) {\n info[axis].interpolate = interpolate(\n info[axis].offset,\n defaultOffset(offsetDefinition),\n { clamp: false }\n )\n\n info[axis].interpolatorOffsets = [...info[axis].offset]\n }\n\n info[axis].progress = clamp(\n 0,\n 1,\n info[axis].interpolate!(info[axis].current)\n )\n}\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,KAAK,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAE5B,SAAS,aAAa,CAAC,MAAe,EAAA;IAClC,OAAO,SAAS,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO,KAAK;AAC7C,UAAG,MAA6B,CAAC,OAAO;AACxC,UAAE,EAAE,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE;AACpE;SAEgB,cAAc,CAC1B,SAAkB,EAClB,IAAgB,EAChB,OAA0B,EAAA;IAE1B,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,YAAY,CAAC,GAAG,EAAE,GAAG,OAAO;IAC/D,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,GAAG,GAAG,EAAE,GAAG,OAAO;AAClD,IAAA,MAAM,WAAW,GAAG,IAAI,KAAK,GAAG,GAAG,QAAQ,GAAG,OAAO;AAErD,IAAA,MAAM,KAAK,GAAG,MAAM,KAAK,SAAS,GAAG,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK;AAEzE;;;;AAIG;AACH,IAAA,MAAM,UAAU,GACZ,MA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AAC;IAC3D;IAEA,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,GAAG,KAAK,CACvB,CAAC,EACD,CAAC,EACD,IAAI,CAAC,IAAI,CAAC,CAAC,WAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAC9C;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs deleted file mode 100644 index 82d4652a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +++ /dev/null @@ -1,48 +0,0 @@ -import { isHTMLElement } from 'motion-dom'; - -function calcInset(element, container) { - const inset = { x: 0, y: 0 }; - let current = element; - while (current && current !== container) { - if (isHTMLElement(current)) { - inset.x += current.offsetLeft; - inset.y += current.offsetTop; - current = current.offsetParent; - } - else if (current.tagName === "svg") { - /** - * This isn't an ideal approach to measuring the offset of tags. - * It would be preferable, given they behave like HTMLElements in most ways - * to use offsetLeft/Top. But these don't exist on . Likewise we - * can't use .getBBox() like most SVG elements as these provide the offset - * relative to the SVG itself, which for is usually 0x0. - */ - const svgBoundingBox = current.getBoundingClientRect(); - current = current.parentElement; - const parentBoundingBox = current.getBoundingClientRect(); - inset.x += svgBoundingBox.left - parentBoundingBox.left; - inset.y += svgBoundingBox.top - parentBoundingBox.top; - } - else if (current instanceof SVGGraphicsElement) { - const { x, y } = current.getBBox(); - inset.x += x; - inset.y += y; - let svg = null; - let parent = current.parentNode; - while (!svg) { - if (parent.tagName === "svg") { - svg = parent; - } - parent = current.parentNode; - } - current = svg; - } - else { - break; - } - } - return inset; -} - -export { calcInset }; -//# sourceMappingURL=inset.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs.map deleted file mode 100644 index 6c03b564..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inset.mjs","sources":["../../../../../../src/render/dom/scroll/offsets/inset.ts"],"sourcesContent":["import { isHTMLElement } from \"motion-dom\"\n\nexport function calcInset(element: Element, container: Element) {\n const inset = { x: 0, y: 0 }\n\n let current: Element | null = element\n while (current && current !== container) {\n if (isHTMLElement(current)) {\n inset.x += current.offsetLeft\n inset.y += current.offsetTop\n current = current.offsetParent\n } else if (current.tagName === \"svg\") {\n /**\n * This isn't an ideal approach to measuring the offset of tags.\n * It would be preferable, given they behave like HTMLElements in most ways\n * to use offsetLeft/Top. But these don't exist on . Likewise we\n * can't use .getBBox() like most SVG elements as these provide the offset\n * relative to the SVG itself, which for is usually 0x0.\n */\n const svgBoundingBox = current.getBoundingClientRect()\n current = current.parentElement!\n const parentBoundingBox = current.getBoundingClientRect()\n inset.x += svgBoundingBox.left - parentBoundingBox.left\n inset.y += svgBoundingBox.top - parentBoundingBox.top\n } else if (current instanceof SVGGraphicsElement) {\n const { x, y } = current.getBBox()\n inset.x += x\n inset.y += y\n\n let svg: SVGElement | null = null\n let parent: SVGElement = current.parentNode as SVGElement\n while (!svg) {\n if (parent.tagName === \"svg\") {\n svg = parent\n }\n parent = current.parentNode as SVGElement\n }\n current = svg\n } else {\n break\n }\n }\n\n return inset\n}\n"],"names":[],"mappings":";;AAEM,SAAU,SAAS,CAAC,OAAgB,EAAE,SAAkB,EAAA;IAC1D,MAAM,KAAK,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IAE5B,IAAI,OAAO,GAAmB,OAAO;AACrC,IAAA,OAAO,OAAO,IAAI,OAAO,KAAK,SAAS,EAAE;AACrC,QAAA,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE;AACxB,YAAA,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,UAAU;AAC7B,YAAA,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,SAAS;AAC5B,YAAA,OAAO,GAAG,OAAO,CAAC,YAAY;QAClC;AAAO,aAAA,IAAI,OAAO,CAAC,OAAO,KAAK,KAAK,EAAE;AAClC;;;;;;AAMG;AACH,YAAA,MAAM,cAAc,GAAG,OAAO,CAAC,qBAAqB,EAAE;AACtD,YAAA,OAAO,GAAG,OAAO,CAAC,aAAc;AAChC,YAAA,MAAM,iBAAiB,GAAG,OAAO,CAAC,qBAAqB,EAAE;YACzD,KAAK,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI;YACvD,KAAK,CAAC,CAAC,IAAI,cAAc,CAAC,GAAG,GAAG,iBAAiB,CAAC,GAAG;QACzD;AAAO,aAAA,IAAI,OAAO,YAAY,kBAAkB,EAAE;YAC9C,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE;AAClC,YAAA,KAAK,CAAC,CAAC,IAAI,CAAC;AACZ,YAAA,KAAK,CAAC,CAAC,IAAI,CAAC;YAEZ,IAAI,GAAG,GAAsB,IAAI;AACjC,YAAA,IAAI,MAAM,GAAe,OAAO,CAAC,UAAwB;YACzD,OAAO,CAAC,GAAG,EAAE;AACT,gBAAA,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK,EAAE;oBAC1B,GAAG,GAAG,MAAM;gBAChB;AACA,gBAAA,MAAM,GAAG,OAAO,CAAC,UAAwB;YAC7C;YACA,OAAO,GAAG,GAAG;QACjB;aAAO;YACH;QACJ;IACJ;AAEA,IAAA,OAAO,KAAK;AAChB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs deleted file mode 100644 index fd25b46d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import { resolveEdge, namedEdges } from './edge.mjs'; - -const defaultOffset = [0, 0]; -function resolveOffset(offset, containerLength, targetLength, targetInset) { - let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset; - let targetPoint = 0; - let containerPoint = 0; - if (typeof offset === "number") { - /** - * If we're provided offset: [0, 0.5, 1] then each number x should become - * [x, x], so we default to the behaviour of mapping 0 => 0 of both target - * and container etc. - */ - offsetDefinition = [offset, offset]; - } - else if (typeof offset === "string") { - offset = offset.trim(); - if (offset.includes(" ")) { - offsetDefinition = offset.split(" "); - } - else { - /** - * If we're provided a definition like "100px" then we want to apply - * that only to the top of the target point, leaving the container at 0. - * Whereas a named offset like "end" should be applied to both. - */ - offsetDefinition = [offset, namedEdges[offset] ? offset : `0`]; - } - } - targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset); - containerPoint = resolveEdge(offsetDefinition[1], containerLength); - return targetPoint - containerPoint; -} - -export { resolveOffset }; -//# sourceMappingURL=offset.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs.map deleted file mode 100644 index 0180029a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"offset.mjs","sources":["../../../../../../src/render/dom/scroll/offsets/offset.ts"],"sourcesContent":["import { Edge, EdgeString, Intersection, ProgressIntersection } from \"../types\"\nimport { namedEdges, resolveEdge } from \"./edge\"\n\nconst defaultOffset: ProgressIntersection = [0, 0]\n\nexport function resolveOffset(\n offset: Edge | Intersection | ProgressIntersection,\n containerLength: number,\n targetLength: number,\n targetInset: number\n) {\n let offsetDefinition: ProgressIntersection | [EdgeString, EdgeString] =\n Array.isArray(offset) ? offset : defaultOffset\n\n let targetPoint = 0\n let containerPoint = 0\n\n if (typeof offset === \"number\") {\n /**\n * If we're provided offset: [0, 0.5, 1] then each number x should become\n * [x, x], so we default to the behaviour of mapping 0 => 0 of both target\n * and container etc.\n */\n offsetDefinition = [offset, offset]\n } else if (typeof offset === \"string\") {\n offset = offset.trim() as EdgeString\n\n if (offset.includes(\" \")) {\n offsetDefinition = offset.split(\" \") as [EdgeString, EdgeString]\n } else {\n /**\n * If we're provided a definition like \"100px\" then we want to apply\n * that only to the top of the target point, leaving the container at 0.\n * Whereas a named offset like \"end\" should be applied to both.\n */\n offsetDefinition = [offset, namedEdges[offset as keyof typeof namedEdges] ? offset : `0`]\n }\n }\n\n targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset)\n containerPoint = resolveEdge(offsetDefinition[1], containerLength)\n\n return targetPoint - containerPoint\n}\n"],"names":[],"mappings":";;AAGA,MAAM,aAAa,GAAyB,CAAC,CAAC,EAAE,CAAC,CAAC;AAE5C,SAAU,aAAa,CACzB,MAAkD,EAClD,eAAuB,EACvB,YAAoB,EACpB,WAAmB,EAAA;AAEnB,IAAA,IAAI,gBAAgB,GAChB,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,aAAa;IAElD,IAAI,WAAW,GAAG,CAAC;IACnB,IAAI,cAAc,GAAG,CAAC;AAEtB,IAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AAC5B;;;;AAIG;AACH,QAAA,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IACvC;AAAO,SAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AACnC,QAAA,MAAM,GAAG,MAAM,CAAC,IAAI,EAAgB;AAEpC,QAAA,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACtB,YAAA,gBAAgB,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAA6B;QACpE;aAAO;AACH;;;;AAIG;AACH,YAAA,gBAAgB,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,MAAiC,CAAC,GAAG,MAAM,GAAG,CAAA,CAAA,CAAG,CAAC;QAC7F;IACJ;AAEA,IAAA,WAAW,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,WAAW,CAAC;IACzE,cAAc,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC;IAElE,OAAO,WAAW,GAAG,cAAc;AACvC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs deleted file mode 100644 index 46e42cf9..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +++ /dev/null @@ -1,21 +0,0 @@ -const ScrollOffset = { - Enter: [ - [0, 1], - [1, 1], - ], - Exit: [ - [0, 0], - [1, 0], - ], - Any: [ - [1, 0], - [0, 1], - ], - All: [ - [0, 0], - [1, 1], - ], -}; - -export { ScrollOffset }; -//# sourceMappingURL=presets.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs.map deleted file mode 100644 index 7d45123d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"presets.mjs","sources":["../../../../../../src/render/dom/scroll/offsets/presets.ts"],"sourcesContent":["import { ProgressIntersection } from \"../types\"\n\nexport const ScrollOffset: Record = {\n Enter: [\n [0, 1],\n [1, 1],\n ],\n Exit: [\n [0, 0],\n [1, 0],\n ],\n Any: [\n [1, 0],\n [0, 1],\n ],\n All: [\n [0, 0],\n [1, 1],\n ],\n}\n"],"names":[],"mappings":"AAEO,MAAM,YAAY,GAA2C;AAClE,IAAA,KAAK,EAAE;QACL,CAAC,CAAC,EAAE,CAAC,CAAC;QACN,CAAC,CAAC,EAAE,CAAC,CAAC;AACP,KAAA;AACD,IAAA,IAAI,EAAE;QACJ,CAAC,CAAC,EAAE,CAAC,CAAC;QACN,CAAC,CAAC,EAAE,CAAC,CAAC;AACP,KAAA;AACD,IAAA,GAAG,EAAE;QACH,CAAC,CAAC,EAAE,CAAC,CAAC;QACN,CAAC,CAAC,EAAE,CAAC,CAAC;AACP,KAAA;AACD,IAAA,GAAG,EAAE;QACH,CAAC,CAAC,EAAE,CAAC,CAAC;QACN,CAAC,CAAC,EAAE,CAAC,CAAC;AACP,KAAA;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs deleted file mode 100644 index 6523a961..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +++ /dev/null @@ -1,55 +0,0 @@ -import { warnOnce } from 'motion-utils'; -import { updateScrollInfo } from './info.mjs'; -import { resolveOffsets } from './offsets/index.mjs'; - -function measure(container, target = container, info) { - /** - * Find inset of target within scrollable container - */ - info.x.targetOffset = 0; - info.y.targetOffset = 0; - if (target !== container) { - let node = target; - while (node && node !== container) { - info.x.targetOffset += node.offsetLeft; - info.y.targetOffset += node.offsetTop; - node = node.offsetParent; - } - } - info.x.targetLength = - target === container ? target.scrollWidth : target.clientWidth; - info.y.targetLength = - target === container ? target.scrollHeight : target.clientHeight; - info.x.containerLength = container.clientWidth; - info.y.containerLength = container.clientHeight; - /** - * In development mode ensure scroll containers aren't position: static as this makes - * it difficult to measure their relative positions. The document scrolling element - * is exempt: offsetParent measurements naturally resolve relative to the document. - */ - if (process.env.NODE_ENV !== "production") { - if (container && - target && - target !== container && - container !== document.documentElement && - container !== document.scrollingElement && - container !== document.body) { - warnOnce(getComputedStyle(container).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly."); - } - } -} -function createOnScrollHandler(element, onScroll, info, options = {}) { - return { - measure: (time) => { - measure(element, options.target, info); - updateScrollInfo(element, info, time); - if (options.offset || options.target) { - resolveOffsets(element, info, options); - } - }, - notify: () => onScroll(info), - }; -} - -export { createOnScrollHandler }; -//# sourceMappingURL=on-scroll-handler.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs.map deleted file mode 100644 index 9ef880a0..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"on-scroll-handler.mjs","sources":["../../../../../src/render/dom/scroll/on-scroll-handler.ts"],"sourcesContent":["import { warnOnce } from \"motion-utils\"\nimport { updateScrollInfo } from \"./info\"\nimport { resolveOffsets } from \"./offsets/index\"\nimport {\n OnScrollHandler,\n OnScrollInfo,\n ScrollInfo,\n ScrollInfoOptions,\n} from \"./types\"\n\nfunction measure(\n container: Element,\n target: Element = container,\n info: ScrollInfo\n) {\n /**\n * Find inset of target within scrollable container\n */\n info.x.targetOffset = 0\n info.y.targetOffset = 0\n if (target !== container) {\n let node = target as HTMLElement\n while (node && node !== container) {\n info.x.targetOffset += node.offsetLeft\n info.y.targetOffset += node.offsetTop\n node = node.offsetParent as HTMLElement\n }\n }\n\n info.x.targetLength =\n target === container ? target.scrollWidth : target.clientWidth\n info.y.targetLength =\n target === container ? target.scrollHeight : target.clientHeight\n info.x.containerLength = container.clientWidth\n info.y.containerLength = container.clientHeight\n\n /**\n * In development mode ensure scroll containers aren't position: static as this makes\n * it difficult to measure their relative positions. The document scrolling element\n * is exempt: offsetParent measurements naturally resolve relative to the document.\n */\n if (process.env.NODE_ENV !== \"production\") {\n if (\n container &&\n target &&\n target !== container &&\n container !== document.documentElement &&\n container !== document.scrollingElement &&\n container !== document.body\n ) {\n warnOnce(\n getComputedStyle(container).position !== \"static\",\n \"Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.\"\n )\n }\n }\n}\n\nexport function createOnScrollHandler(\n element: Element,\n onScroll: OnScrollInfo,\n info: ScrollInfo,\n options: ScrollInfoOptions = {}\n): OnScrollHandler {\n return {\n measure: (time) => {\n measure(element, options.target, info)\n updateScrollInfo(element, info, time)\n\n if (options.offset || options.target) {\n resolveOffsets(element, info, options)\n }\n },\n notify: () => onScroll(info),\n }\n}\n"],"names":[],"mappings":";;;;AAUA,SAAS,OAAO,CACZ,SAAkB,EAClB,MAAA,GAAkB,SAAS,EAC3B,IAAgB,EAAA;AAEhB;;AAEG;AACH,IAAA,IAAI,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC;AACvB,IAAA,IAAI,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC;AACvB,IAAA,IAAI,MAAM,KAAK,SAAS,EAAE;QACtB,IAAI,IAAI,GAAG,MAAqB;AAChC,QAAA,OAAO,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;YAC/B,IAAI,CAAC,CAAC,CAAC,YAAY,IAAI,IAAI,CAAC,UAAU;YACtC,IAAI,CAAC,CAAC,CAAC,YA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D,QAAA,MAAM,EAAE,MAAM,QAAQ,CAAC,IAAI,CAAC;KAC/B;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs deleted file mode 100644 index 501837d7..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs +++ /dev/null @@ -1,115 +0,0 @@ -import { resize, frame, cancelFrame, frameData } from 'motion-dom'; -import { noop } from 'motion-utils'; -import { createScrollInfo } from './info.mjs'; -import { createOnScrollHandler } from './on-scroll-handler.mjs'; - -const scrollListeners = new WeakMap(); -const resizeListeners = new WeakMap(); -const onScrollHandlers = new WeakMap(); -const scrollSize = new WeakMap(); -const dimensionCheckProcesses = new WeakMap(); -const getEventTarget = (element) => element === document.scrollingElement ? window : element; -function scrollInfo(onScroll, { container = document.scrollingElement, trackContentSize = false, ...options } = {}) { - if (!container) - return noop; - let containerHandlers = onScrollHandlers.get(container); - /** - * Get the onScroll handlers for this container. - * If one isn't found, create a new one. - */ - if (!containerHandlers) { - containerHandlers = new Set(); - onScrollHandlers.set(container, containerHandlers); - } - /** - * Create a new onScroll handler for the provided callback. - */ - const info = createScrollInfo(); - const containerHandler = createOnScrollHandler(container, onScroll, info, options); - containerHandlers.add(containerHandler); - /** - * Check if there's a scroll event listener for this container. - * If not, create one. - */ - if (!scrollListeners.has(container)) { - const measureAll = () => { - for (const handler of containerHandlers) { - handler.measure(frameData.timestamp); - } - frame.preUpdate(notifyAll); - }; - const notifyAll = () => { - for (const handler of containerHandlers) { - handler.notify(); - } - }; - const listener = () => frame.read(measureAll); - scrollListeners.set(container, listener); - const target = getEventTarget(container); - window.addEventListener("resize", listener); - if (container !== document.documentElement) { - resizeListeners.set(container, resize(container, listener)); - } - target.addEventListener("scroll", listener); - listener(); - } - /** - * Enable content size tracking if requested and not already enabled. - */ - if (trackContentSize && !dimensionCheckProcesses.has(container)) { - const listener = scrollListeners.get(container); - // Store initial scroll dimensions (object is reused to avoid allocation) - const size = { - width: container.scrollWidth, - height: container.scrollHeight, - }; - scrollSize.set(container, size); - // Add frame-based scroll dimension checking to detect content changes - const checkScrollDimensions = () => { - const newWidth = container.scrollWidth; - const newHeight = container.scrollHeight; - if (size.width !== newWidth || size.height !== newHeight) { - listener(); - size.width = newWidth; - size.height = newHeight; - } - }; - // Schedule with keepAlive=true to run every frame - const dimensionCheckProcess = frame.read(checkScrollDimensions, true); - dimensionCheckProcesses.set(container, dimensionCheckProcess); - } - const listener = scrollListeners.get(container); - frame.read(listener, false, true); - return () => { - cancelFrame(listener); - /** - * Check if we even have any handlers for this container. - */ - const currentHandlers = onScrollHandlers.get(container); - if (!currentHandlers) - return; - currentHandlers.delete(containerHandler); - if (currentHandlers.size) - return; - /** - * If no more handlers, remove the scroll listener too. - */ - const scrollListener = scrollListeners.get(container); - scrollListeners.delete(container); - if (scrollListener) { - getEventTarget(container).removeEventListener("scroll", scrollListener); - resizeListeners.get(container)?.(); - window.removeEventListener("resize", scrollListener); - } - // Clean up scroll dimension checking - const dimensionCheckProcess = dimensionCheckProcesses.get(container); - if (dimensionCheckProcess) { - cancelFrame(dimensionCheckProcess); - dimensionCheckProcesses.delete(container); - } - scrollSize.delete(container); - }; -} - -export { scrollInfo }; -//# sourceMappingURL=track.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs.map deleted file mode 100644 index be35d66f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"track.mjs","sources":["../../../../../src/render/dom/scroll/track.ts"],"sourcesContent":["import { cancelFrame, frame, frameData, resize, Process } from \"motion-dom\"\nimport { noop } from \"motion-utils\"\nimport { createScrollInfo } from \"./info\"\nimport { createOnScrollHandler } from \"./on-scroll-handler\"\nimport { OnScrollHandler, OnScrollInfo, ScrollInfoOptions } from \"./types\"\n\nconst scrollListeners = new WeakMap()\nconst resizeListeners = new WeakMap()\nconst onScrollHandlers = new WeakMap>()\nconst scrollSize = new WeakMap()\nconst dimensionCheckProcesses = new WeakMap()\n\nexport type ScrollTargets = Array\n\nconst getEventTarget = (element: Element) =>\n element === document.scrollingElement ? window : element\n\nexport function scrollInfo(\n onScroll: OnScrollInfo,\n {\n container = document.scrollingElement as Element,\n trackContentSize = false,\n ...options\n }: ScrollInfoOptions = {}\n) {\n if (!container) return noop as VoidFunction\n\n let containerHandlers = onScrollHandlers.get(container)\n\n /**\n * Get the onScroll handlers for this container.\n * If one isn't found, create a new one.\n */\n if (!containerHandlers) {\n containerHandlers = new Set()\n onScrollHandlers.set(container, containerHandlers)\n }\n\n /**\n * Create a new onScroll handler for the provided callback.\n */\n const info = createScrollInfo()\n const containerHandler = createOnScrollHandler(\n container,\n onScroll,\n info,\n options\n )\n containerHandlers.add(containerHandler)\n\n /**\n * Check if there's a scroll event listener for this container.\n * If not, create one.\n */\n if (!scrollListeners.has(container)) {\n const measureAll = () => {\n for (const handler of containerHandlers) {\n handler.measure(frameData.timestamp)\n }\n\n frame.preUpdate(notifyAll)\n }\n\n const notifyAll = () => {\n for (const handler of containerHandlers) {\n handler.notify()\n }\n }\n\n const listener = () => frame.read(measureAll)\n\n scrollListeners.set(container, listener)\n\n const target = getEventTarget(container)\n window.addEventListener(\"resize\", listener)\n if (container !== document.documentElement) {\n resizeListeners.set(container, resize(container, listener))\n }\n\n target.addEventListener(\"scroll\", listener)\n\n listener()\n }\n\n /**\n * Enable content size tracking if requested and not already enabled.\n */\n if (trackContentSize && !dimensionCheckProcesses.has(container)) {\n const listener = scrollListeners.get(container)!\n\n // Store initial scroll dimensions (object is reused to avoid allocation)\n const size = {\n width: container.scrollWidth,\n height: container.scrollHeight,\n }\n scrollSize.set(container, size)\n\n // Add frame-based scroll dimension checking to detect content changes\n const checkScrollDimensions: Process = () => {\n const newWidth = container.scrollWidth\n const newHeight = container.scrollHeight\n\n if (size.width !== newWidth || size.height !== newHeight) {\n listener()\n size.width = newWidth\n size.height = newHeight\n }\n }\n\n // Schedule with keepAlive=true to run every frame\n const dimensionCheckProcess = frame.read(checkScrollDimensions, true)\n dimensionCheckProcesses.set(container, dimensionCheckProcess)\n }\n\n const listener = scrollListeners.get(container)!\n frame.read(listener, false, true)\n\n return () => {\n cancelFrame(listener)\n\n /**\n * Check if we even have any handlers for this container.\n */\n const currentHandlers = onScrollHandlers.get(container)\n if (!currentHandlers) return\n\n currentHandlers.delete(containerHandler)\n\n if (currentHandlers.size) return\n\n /**\n * If no more handlers, remove the scroll listener too.\n */\n const scrollListener = scrollListeners.get(container)\n scrollListeners.delete(container)\n\n if (scrollListener) {\n getEventTarget(container).removeEventListener(\n \"scroll\",\n scrollListener\n )\n resizeListeners.get(container)?.()\n window.removeEventListener(\"resize\", scrollListener)\n }\n\n // Clean up scroll dimension checking\n const dimensionCheckProcess = dimensionCheckProcesses.get(container)\n if (dimensionCheckProcess) {\n cancelFrame(dimensionCheckProcess)\n dimensionCheckProcesses.delete(container)\n }\n scrollSize.delete(container)\n }\n}\n"],"names":[],"mappings":";;;;;AAMA,MAAM,eAAe,GAAG,IAAI,OAAO,EAAyB;AAC5D,MAAM,eAAe,GAAG,IAAI,OAAO,EAAyB;AAC5D,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAAiC;AACrE,MAAM,UAAU,GAAG,IAAI,OAAO,EAA8C;AAC5E,MAAM,uBAAuB,GAAG,IAAI,OAAO,EAAoB;AAI/D,MAAM,cAAc,GAAG,CAAC,OAAgB,KACpC,OAAO,KAAK,QAAQ,CAAC,gBAAgB,GAAG,MAAM,GAAG,OAAO;SAE5C,UAAU,CACtB,QAAsB,EACtB,EACI,SAA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C;AAEjC,IAAA,OAAO,MAAK;QACR,WAAW,CAAC,QAAQ,CAAC;AAErB;;AAEG;QACH,MAAM,eAAe,GAAG,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC;AACvD,QAAA,IAAI,CAAC,eAAe;YAAE;AAEtB,QAAA,eAAe,CAAC,MAAM,CAAC,gBAAgB,CAAC;QAExC,IAAI,eAAe,CAAC,IAAI;YAAE;AAE1B;;AAEG;QACH,MAAM,cAAc,GAAG,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC;AACrD,QAAA,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC;QAEjC,IAAI,cAAc,EAAE;YAChB,cAAc,CAAC,SAAS,CAAC,CAAC,mBAAmB,CACzC,QAAQ,EACR,cAAc,CACjB;AACD,YAAA,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI;AAClC,YAAA,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,cAAc,CAAC;QACxD;;QAGA,MAAM,qBAAqB,GAAG,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC;QACpE,IAAI,qBAAqB,EAAE;YACvB,WAAW,CAAC,qBAAqB,CAAC;AAClC,YAAA,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;QAC7C;AACA,QAAA,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC;AAChC,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/can-use-native-timeline.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/can-use-native-timeline.mjs deleted file mode 100644 index ed95092e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/can-use-native-timeline.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { supportsViewTimeline, supportsScrollTimeline } from 'motion-dom'; - -function canUseNativeTimeline(target) { - if (typeof window === "undefined") - return false; - return target ? supportsViewTimeline() : supportsScrollTimeline(); -} - -export { canUseNativeTimeline }; -//# sourceMappingURL=can-use-native-timeline.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/can-use-native-timeline.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/can-use-native-timeline.mjs.map deleted file mode 100644 index 88a8655d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/can-use-native-timeline.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"can-use-native-timeline.mjs","sources":["../../../../../../src/render/dom/scroll/utils/can-use-native-timeline.ts"],"sourcesContent":["import { supportsScrollTimeline, supportsViewTimeline } from \"motion-dom\"\n\nexport function canUseNativeTimeline(target?: Element) {\n if (typeof window === \"undefined\") return false\n return target ? supportsViewTimeline() : supportsScrollTimeline()\n}\n"],"names":[],"mappings":";;AAEM,SAAU,oBAAoB,CAAC,MAAgB,EAAA;IACjD,IAAI,OAAO,MAAM,KAAK,WAAW;AAAE,QAAA,OAAO,KAAK;IAC/C,OAAO,MAAM,GAAG,oBAAoB,EAAE,GAAG,sBAAsB,EAAE;AACrE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs deleted file mode 100644 index e7d2848e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs +++ /dev/null @@ -1,62 +0,0 @@ -import { scrollInfo } from '../track.mjs'; -import { canUseNativeTimeline } from './can-use-native-timeline.mjs'; -import { offsetToViewTimelineRange } from './offset-to-range.mjs'; - -const timelineCache = new Map(); -function scrollTimelineFallback(options) { - const currentTime = { value: 0 }; - const cancel = scrollInfo((info) => { - currentTime.value = info[options.axis].progress * 100; - }, options); - return { currentTime, cancel }; -} -function getTimeline({ source, container, ...options }) { - const { axis } = options; - if (source) - container = source; - let containerCache = timelineCache.get(container); - if (!containerCache) { - containerCache = new Map(); - timelineCache.set(container, containerCache); - } - const targetKey = options.target ?? "self"; - let targetCache = containerCache.get(targetKey); - if (!targetCache) { - targetCache = {}; - containerCache.set(targetKey, targetCache); - } - const axisKey = axis + (options.offset ?? []).join(","); - if (!targetCache[axisKey]) { - if (options.target && canUseNativeTimeline(options.target)) { - const range = offsetToViewTimelineRange(options.offset); - if (range) { - targetCache[axisKey] = new ViewTimeline({ - subject: options.target, - axis, - }); - } - else { - targetCache[axisKey] = scrollTimelineFallback({ - container, - ...options, - }); - } - } - else if (canUseNativeTimeline()) { - targetCache[axisKey] = new ScrollTimeline({ - source: container, - axis, - }); - } - else { - targetCache[axisKey] = scrollTimelineFallback({ - container, - ...options, - }); - } - } - return targetCache[axisKey]; -} - -export { getTimeline }; -//# sourceMappingURL=get-timeline.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs.map deleted file mode 100644 index 9055908f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get-timeline.mjs","sources":["../../../../../../src/render/dom/scroll/utils/get-timeline.ts"],"sourcesContent":["import { ProgressTimeline } from \"motion-dom\"\nimport { scrollInfo } from \"../track\"\nimport { ScrollOptionsWithDefaults } from \"../types\"\nimport { canUseNativeTimeline } from \"./can-use-native-timeline\"\nimport { offsetToViewTimelineRange } from \"./offset-to-range\"\n\ndeclare class ScrollTimeline implements ProgressTimeline {\n constructor(options: ScrollOptions)\n\n currentTime: null | { value: number }\n\n cancel?: VoidFunction\n}\n\ndeclare class ViewTimeline implements ProgressTimeline {\n constructor(options: { subject: Element; axis?: string })\n\n currentTime: null | { value: number }\n\n cancel?: VoidFunction\n}\n\nconst timelineCache = new Map<\n Element,\n Map>\n>()\n\nfunction scrollTimelineFallback(options: ScrollOptionsWithDefaults) {\n const currentTime = { value: 0 }\n\n const cancel = scrollInfo((info) => {\n currentTime.value = info[options.axis!].progress * 100\n }, options)\n\n return { currentTime, cancel }\n}\n\nexport function getTimeline({\n source,\n container,\n ...options\n}: ScrollOptionsWithDefaults): ProgressTimeline {\n const { axis } = options\n\n if (source) container = source\n\n let containerCache = timelineCache.get(container)\n if (!containerCache) {\n containerCache = new Map()\n timelineCache.set(container, containerCache)\n }\n\n const targetKey = options.target ?? \"self\"\n let targetCache = containerCache.get(targetKey)\n if (!targetCache) {\n targetCache = {}\n containerCache.set(targetKey, targetCache)\n }\n\n const axisKey = axis + (options.offset ?? []).join(\",\")\n\n if (!targetCache[axisKey]) {\n if (options.target && canUseNativeTimeline(options.target)) {\n const range = offsetToViewTimelineRange(options.offset)\n if (range) {\n targetCache[axisKey] = new ViewTimeline({\n subject: options.target,\n axis,\n })\n } else {\n targetCache[axisKey] = scrollTimelineFallback({\n container,\n ...options,\n })\n }\n } else if (canUseNativeTimeline()) {\n targetCache[axisKey] = new ScrollTimeline({\n source: container,\n axis,\n } as any)\n } else {\n targetCache[axisKey] = scrollTimelineFallback({\n container,\n ...options,\n })\n }\n }\n\n return targetCache[axisKey]!\n}\n"],"names":[],"mappings":";;;;AAsBA,MAAM,aAAa,GAAG,IAAI,GAAG,EAG1B;AAEH,SAAS,sBAAsB,CAAC,OAAkC,EAAA;AAC9D,IAAA,MAAM,WAAW,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;AAEhC,IAAA,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,IAAI,KAAI;AAC/B,QAAA,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iBAAA,CAAC;YACN;iBAAO;AACH,gBAAA,WAAW,CAAC,OAAO,CAAC,GAAG,sBAAsB,CAAC;oBAC1C,SAAS;AACT,oBAAA,GAAG,OAAO;AACb,iBAAA,CAAC;YACN;QACJ;aAAO,IAAI,oBAAoB,EAAE,EAAE;AAC/B,YAAA,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI,cAAc,CAAC;AACtC,gBAAA,MAAM,EAAE,SAAS;gBACjB,IAAI;AACA,aAAA,CAAC;QACb;aAAO;AACH,YAAA,WAAW,CAAC,OAAO,CAAC,GAAG,sBAAsB,CAAC;gBAC1C,SAAS;AACT,gBAAA,GAAG,OAAO;AACb,aAAA,CAAC;QACN;IACJ;AAEA,IAAA,OAAO,WAAW,CAAC,OAAO,CAAE;AAChC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/is-element-tracking.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/is-element-tracking.mjs deleted file mode 100644 index f801dc7f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/is-element-tracking.mjs +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Currently, we only support element tracking with `scrollInfo`, though in - * the future we can also offer ViewTimeline support. - */ -function isElementTracking(options) { - return options && (options.target || options.offset); -} - -export { isElementTracking }; -//# sourceMappingURL=is-element-tracking.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/is-element-tracking.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/is-element-tracking.mjs.map deleted file mode 100644 index 06205efc..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/is-element-tracking.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-element-tracking.mjs","sources":["../../../../../../src/render/dom/scroll/utils/is-element-tracking.ts"],"sourcesContent":["import { ScrollOptionsWithDefaults } from \"../types\"\n\n/**\n * Currently, we only support element tracking with `scrollInfo`, though in\n * the future we can also offer ViewTimeline support.\n */\nexport function isElementTracking(options?: ScrollOptionsWithDefaults) {\n return options && (options.target || options.offset)\n}\n"],"names":[],"mappings":"AAEA;;;AAGG;AACG,SAAU,iBAAiB,CAAC,OAAmC,EAAA;IACjE,OAAO,OAAO,KAAK,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;AACxD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/offset-to-range.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/offset-to-range.mjs deleted file mode 100644 index d2a1cce6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/offset-to-range.mjs +++ /dev/null @@ -1,73 +0,0 @@ -import { ScrollOffset } from '../offsets/presets.mjs'; - -/** - * Maps from ProgressIntersection pairs used by Motion's preset offsets to - * ViewTimeline named ranges. Returns undefined for unrecognised patterns, - * which signals the caller to fall back to JS-based scroll tracking. - */ -const presets = [ - [ScrollOffset.Enter, "entry"], - [ScrollOffset.Exit, "exit"], - [ScrollOffset.Any, "cover"], - [ScrollOffset.All, "contain"], -]; -const stringToProgress = { - start: 0, - end: 1, -}; -function parseStringOffset(s) { - const parts = s.trim().split(/\s+/); - if (parts.length !== 2) - return undefined; - const a = stringToProgress[parts[0]]; - const b = stringToProgress[parts[1]]; - if (a === undefined || b === undefined) - return undefined; - return [a, b]; -} -function normaliseOffset(offset) { - if (offset.length !== 2) - return undefined; - const result = []; - for (const item of offset) { - if (Array.isArray(item)) { - result.push(item); - } - else if (typeof item === "string") { - const parsed = parseStringOffset(item); - if (!parsed) - return undefined; - result.push(parsed); - } - else { - return undefined; - } - } - return result; -} -function matchesPreset(offset, preset) { - const normalised = normaliseOffset(offset); - if (!normalised) - return false; - for (let i = 0; i < 2; i++) { - const o = normalised[i]; - const p = preset[i]; - if (o[0] !== p[0] || o[1] !== p[1]) - return false; - } - return true; -} -function offsetToViewTimelineRange(offset) { - if (!offset) { - return { rangeStart: "contain 0%", rangeEnd: "contain 100%" }; - } - for (const [preset, name] of presets) { - if (matchesPreset(offset, preset)) { - return { rangeStart: `${name} 0%`, rangeEnd: `${name} 100%` }; - } - } - return undefined; -} - -export { offsetToViewTimelineRange }; -//# sourceMappingURL=offset-to-range.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/offset-to-range.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/offset-to-range.mjs.map deleted file mode 100644 index 985a623c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/scroll/utils/offset-to-range.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"offset-to-range.mjs","sources":["../../../../../../src/render/dom/scroll/utils/offset-to-range.ts"],"sourcesContent":["import { ScrollOffset as ScrollOffsetPresets } from \"../offsets/presets\"\nimport { ProgressIntersection, ScrollOffset } from \"../types\"\n\ninterface ViewTimelineRange {\n rangeStart: string\n rangeEnd: string\n}\n\n/**\n * Maps from ProgressIntersection pairs used by Motion's preset offsets to\n * ViewTimeline named ranges. Returns undefined for unrecognised patterns,\n * which signals the caller to fall back to JS-based scroll tracking.\n */\nconst presets: [ProgressIntersection[], string][] = [\n [ScrollOffsetPresets.Enter, \"entry\"],\n [ScrollOffsetPresets.Exit, \"exit\"],\n [ScrollOffsetPresets.Any, \"cover\"],\n [ScrollOffsetPresets.All, \"contain\"],\n]\n\nconst stringToProgress: Record = {\n start: 0,\n end: 1,\n}\n\nfunction parseStringOffset(\n s: string\n): ProgressIntersection | undefined {\n const parts = s.trim().split(/\\s+/)\n if (parts.length !== 2) return undefined\n const a = stringToProgress[parts[0]]\n const b = stringToProgress[parts[1]]\n if (a === undefined || b === undefined) return undefined\n return [a, b]\n}\n\nfunction normaliseOffset(offset: ScrollOffset): ProgressIntersection[] | undefined {\n if (offset.length !== 2) return undefined\n const result: ProgressIntersection[] = []\n for (const item of offset) {\n if (Array.isArray(item)) {\n result.push(item as ProgressIntersection)\n } else if (typeof item === \"string\") {\n const parsed = parseStringOffset(item)\n if (!parsed) return undefined\n result.push(parsed)\n } else {\n return undefined\n }\n }\n return result\n}\n\nfunction matchesPreset(\n offset: ScrollOffset,\n preset: ProgressIntersection[]\n): boolean {\n const normalised = normaliseOffset(offset)\n if (!normalised) return false\n\n for (let i = 0; i < 2; i++) {\n const o = normalised[i]\n const p = preset[i]\n if (o[0] !== p[0] || o[1] !== p[1]) return false\n }\n return true\n}\n\nexport function offsetToViewTimelineRange(\n offset?: ScrollOffset\n): ViewTimelineRange | undefined {\n if (!offset) {\n return { rangeStart: \"contain 0%\", rangeEnd: \"contain 100%\" }\n }\n\n for (const [preset, name] of presets) {\n if (matchesPreset(offset, preset)) {\n return { rangeStart: `${name} 0%`, rangeEnd: `${name} 100%` }\n }\n }\n\n return undefined\n}\n"],"names":["ScrollOffsetPresets"],"mappings":";;AAQA;;;;AAIG;AACH,MAAM,OAAO,GAAuC;AAChD,IAAA,CAACA,YAAmB,CAAC,KAAK,EAAE,OAAO,CAAC;AACpC,IAAA,CAACA,YAAmB,CAAC,IAAI,EAAE,MAAM,CAAC;AAClC,IAAA,CAACA,YAAmB,CAAC,GAAG,EAAE,OAAO,CAAC;AAClC,IAAA,CAACA,YAAmB,CAAC,GAAG,EAAE,SAAS,CAAC;CACvC;AAED,MAAM,gBAAgB,GAA2B;AAC7C,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,GAAG,EAAE,CAAC;CACT;AAED,SAAS,iBAAiB,CACtB,CAAS,EAAA;IA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AAG,CAAC,EAAE,CAAC,EAAE,EAAE;AACxB,QAAA,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;AACvB,QAAA,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;AACnB,QAAA,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAAE,YAAA,OAAO,KAAK;IACpD;AACA,IAAA,OAAO,IAAI;AACf;AAEM,SAAU,yBAAyB,CACrC,MAAqB,EAAA;IAErB,IAAI,CAAC,MAAM,EAAE;QACT,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE;IACjE;IAEA,KAAK,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,OAAO,EAAE;AAClC,QAAA,IAAI,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;AAC/B,YAAA,OAAO,EAAE,UAAU,EAAE,CAAA,EAAG,IAAI,CAAA,GAAA,CAAK,EAAE,QAAQ,EAAE,CAAA,EAAG,IAAI,CAAA,KAAA,CAAO,EAAE;QACjE;IACJ;AAEA,IAAA,OAAO,SAAS;AACpB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/use-render.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/use-render.mjs deleted file mode 100644 index 15b5179c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/use-render.mjs +++ /dev/null @@ -1,28 +0,0 @@ -"use client"; -import { isMotionValue } from 'motion-dom'; -import { Fragment, useMemo, createElement } from 'react'; -import { useHTMLProps } from '../html/use-props.mjs'; -import { useSVGProps } from '../svg/use-props.mjs'; -import { filterProps } from './utils/filter-props.mjs'; -import { isSVGComponent } from './utils/is-svg-component.mjs'; - -function useRender(Component, props, ref, { latestValues, }, isStatic, forwardMotionProps = false, isSVG) { - const useVisualProps = (isSVG ?? isSVGComponent(Component)) ? useSVGProps : useHTMLProps; - const visualProps = useVisualProps(props, latestValues, isStatic, Component); - const filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps); - const elementProps = Component !== Fragment ? { ...filteredProps, ...visualProps, ref } : {}; - /** - * If component has been handed a motion value as its child, - * memoise its initial value and render that. Subsequent updates - * will be handled by the onChange handler - */ - const { children } = props; - const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]); - return createElement(Component, { - ...elementProps, - children: renderedChildren, - }); -} - -export { useRender }; -//# sourceMappingURL=use-render.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.map deleted file mode 100644 index 7e09e53f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-render.mjs","sources":["../../../../src/render/dom/use-render.ts"],"sourcesContent":["\"use client\"\n\nimport { isMotionValue } from \"motion-dom\"\nimport { Fragment, createElement, useMemo } from \"react\"\nimport { MotionProps } from \"../../motion/types\"\nimport { VisualState } from \"../../motion/utils/use-visual-state\"\nimport { HTMLRenderState } from \"../html/types\"\nimport { useHTMLProps } from \"../html/use-props\"\nimport { SVGRenderState } from \"../svg/types\"\nimport { useSVGProps } from \"../svg/use-props\"\nimport { DOMMotionComponents } from \"./types\"\nimport { filterProps } from \"./utils/filter-props\"\nimport { isSVGComponent } from \"./utils/is-svg-component\"\n\nexport function useRender<\n Props = {},\n TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n Component: TagName | string | React.ComponentType,\n props: MotionProps,\n ref: React.Ref,\n {\n latestValues,\n }: VisualState,\n isStatic: boolean,\n forwardMotionProps: boolean = false,\n isSVG?: boolean\n) {\n const useVisualProps =\n (isSVG ?? isSVGComponent(Component)) ? useSVGProps : useHTMLProps\n\n const visualProps = useVisualProps(\n props as any,\n latestValues,\n isStatic,\n Component as any\n )\n const filteredProps = filterProps(\n props,\n typeof Component === \"string\",\n forwardMotionProps\n )\n const elementProps =\n Component !== Fragment ? { ...filteredProps, ...visualProps, ref } : {}\n\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props\n const renderedChildren = useMemo(\n () => (isMotionValue(children) ? children.get() : children),\n [children]\n )\n\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n })\n}\n"],"names":[],"mappings":";;;;;;;;;AA4BI;AAGA;AAMA;;AAQA;;;;AAIG;AACH;AACA;;AAMI;AACA;AACH;AACL;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs deleted file mode 100644 index 53315465..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs +++ /dev/null @@ -1,67 +0,0 @@ -import { isMotionValue } from 'motion-dom'; -import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs'; - -let shouldForward = (key) => !isValidMotionProp(key); -function loadExternalIsValidProp(isValidProp) { - if (typeof isValidProp !== "function") - return; - // Explicitly filter our events - shouldForward = (key) => key.startsWith("on") ? !isValidMotionProp(key) : isValidProp(key); -} -/** - * Emotion and Styled Components both allow users to pass through arbitrary props to their components - * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which - * of these should be passed to the underlying DOM node. - * - * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props - * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props - * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of - * `@emotion/is-prop-valid`, however to fix this problem we need to use it. - * - * By making it an optionalDependency we can offer this functionality only in the situations where it's - * actually required. - */ -try { - /** - * We attempt to import this package but require won't be defined in esm environments, in that case - * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed - * in favour of explicit injection. - * - * String concatenation prevents bundlers like webpack (e.g. Storybook) - * from statically resolving this optional dependency at build time. - */ - const emotionPkg = "@emotion/is-prop-" + "valid"; - loadExternalIsValidProp(require(emotionPkg).default); -} -catch { - // We don't need to actually do anything here - the fallback is the existing `isPropValid`. -} -function filterProps(props, isDom, forwardMotionProps) { - const filteredProps = {}; - for (const key in props) { - /** - * values is considered a valid prop by Emotion, so if it's present - * this will be rendered out to the DOM unless explicitly filtered. - * - * We check the type as it could be used with the `feColorMatrix` - * element, which we support. - */ - if (key === "values" && typeof props.values === "object") - continue; - if (isMotionValue(props[key])) - continue; - if (shouldForward(key) || - (forwardMotionProps === true && isValidMotionProp(key)) || - (!isDom && !isValidMotionProp(key)) || - // If trying to use native HTML drag events, forward drag listeners - (props["draggable"] && - key.startsWith("onDrag"))) { - filteredProps[key] = - props[key]; - } - } - return filteredProps; -} - -export { filterProps, loadExternalIsValidProp }; -//# sourceMappingURL=filter-props.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.map deleted file mode 100644 index 0c7ea870..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter-props.mjs","sources":["../../../../../src/render/dom/utils/filter-props.ts"],"sourcesContent":["import { isMotionValue } from \"motion-dom\"\nimport type { MotionProps } from \"../../../motion/types\"\nimport { isValidMotionProp } from \"../../../motion/utils/valid-prop\"\n\nlet shouldForward = (key: string) => !isValidMotionProp(key)\n\nexport type IsValidProp = (key: string) => boolean\n\nexport function loadExternalIsValidProp(isValidProp?: IsValidProp) {\n if (typeof isValidProp !== \"function\") return\n\n // Explicitly filter our events\n shouldForward = (key: string) =>\n key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key)\n}\n\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n *\n * String concatenation prevents bundlers like webpack (e.g. Storybook)\n * from statically resolving this optional dependency at build time.\n */\n const emotionPkg = \"@emotion/is-prop-\" + \"valid\"\n loadExternalIsValidProp(require(emotionPkg).default)\n} catch {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\n\nexport function filterProps(\n props: MotionProps,\n isDom: boolean,\n forwardMotionProps: boolean\n) {\n const filteredProps: MotionProps = {}\n\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\") continue\n\n if (isMotionValue(props[key as keyof typeof props])) continue\n\n if (\n shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\" as keyof MotionProps] &&\n key.startsWith(\"onDr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AEA,IAAA,OAAO,aAAa;AACxB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs deleted file mode 100644 index e300fc16..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs +++ /dev/null @@ -1,31 +0,0 @@ -import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs'; - -function isSVGComponent(Component) { - if ( - /** - * If it's not a string, it's a custom React component. Currently we only support - * HTML custom React components. - */ - typeof Component !== "string" || - /** - * If it contains a dash, the element is a custom HTML webcomponent. - */ - Component.includes("-")) { - return false; - } - else if ( - /** - * If it's in our list of lowercase SVG tags, it's an SVG component - */ - lowercaseSVGElements.indexOf(Component) > -1 || - /** - * If it contains a capital letter, it's an SVG component - */ - /[A-Z]/u.test(Component)) { - return true; - } - return false; -} - -export { isSVGComponent }; -//# sourceMappingURL=is-svg-component.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs.map deleted file mode 100644 index 88e680d5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-svg-component.mjs","sources":["../../../../../src/render/dom/utils/is-svg-component.ts"],"sourcesContent":["import * as React from \"react\"\nimport { lowercaseSVGElements } from \"../../svg/lowercase-elements\"\n\nexport function isSVGComponent(Component: string | React.ComponentType) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")\n ) {\n return false\n } else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/u.test(Component)\n ) {\n return true\n }\n\n return false\n}\n"],"names":[],"mappings":";;AAGM,SAAU,cAAc,CAAC,SAA4C,EAAA;AACvE,IAAA;AACI;;;AAGG;IACH,OAAO,SAAS,KAAK,QAAQ;AAC7B;;AAEG;AACH,QAAA,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EACzB;AACE,QAAA,OAAO,KAAK;IAChB;AAAO,SAAA;AACH;;AAEG;AACH,IAAA,oBAAoB,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE;AAC5C;;AAEG;AACH,QAAA,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAC1B;AACE,QAAA,OAAO,IAAI;IACf;AAEA,IAAA,OAAO,KAAK;AAChB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs deleted file mode 100644 index 93c0f8d5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs +++ /dev/null @@ -1,44 +0,0 @@ -import { resolveElements } from 'motion-dom'; - -const thresholds = { - some: 0, - all: 1, -}; -function inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = "some" } = {}) { - const elements = resolveElements(elementOrSelector); - const activeIntersections = new WeakMap(); - const onIntersectionChange = (entries) => { - entries.forEach((entry) => { - const onEnd = activeIntersections.get(entry.target); - /** - * If there's no change to the intersection, we don't need to - * do anything here. - */ - if (entry.isIntersecting === Boolean(onEnd)) - return; - if (entry.isIntersecting) { - const newOnEnd = onStart(entry.target, entry); - if (typeof newOnEnd === "function") { - activeIntersections.set(entry.target, newOnEnd); - } - else { - observer.unobserve(entry.target); - } - } - else if (typeof onEnd === "function") { - onEnd(entry); - activeIntersections.delete(entry.target); - } - }); - }; - const observer = new IntersectionObserver(onIntersectionChange, { - root, - rootMargin, - threshold: typeof amount === "number" ? amount : thresholds[amount], - }); - elements.forEach((element) => observer.observe(element)); - return () => observer.disconnect(); -} - -export { inView }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs.map deleted file mode 100644 index 7424f4a5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../../src/render/dom/viewport/index.ts"],"sourcesContent":["import { ElementOrSelector, resolveElements } from \"motion-dom\"\n\nexport type ViewChangeHandler = (entry: IntersectionObserverEntry) => void\n\ntype MarginValue = `${number}${\"px\" | \"%\"}`\ntype MarginType =\n | MarginValue\n | `${MarginValue} ${MarginValue}`\n | `${MarginValue} ${MarginValue} ${MarginValue}`\n | `${MarginValue} ${MarginValue} ${MarginValue} ${MarginValue}`\n\nexport interface InViewOptions {\n root?: Element | Document\n margin?: MarginType\n amount?: \"some\" | \"all\" | number\n}\n\nconst thresholds = {\n some: 0,\n all: 1,\n}\n\nexport function inView(\n elementOrSelector: ElementOrSelector,\n onStart: (\n element: Element,\n entry: IntersectionObserverEntry\n ) => void | ViewChangeHandler,\n { root, margin: rootMargin, amount = \"some\" }: InViewOptions = {}\n): VoidFunction {\n const elements = resolveElements(elementOrSelector)\n\n const activeIntersections = new WeakMap()\n\n const onIntersectionChange: IntersectionObserverCallback = (entries) => {\n entries.forEach((entry) => {\n const onEnd = activeIntersections.get(entry.target)\n\n /**\n * If there's no change to the intersection, we don't need to\n * do anything here.\n */\n if (entry.isIntersecting === Boolean(onEnd)) return\n\n if (entry.isIntersecting) {\n const newOnEnd = onStart(entry.target, entry)\n if (typeof newOnEnd === \"function\") {\n activeIntersections.set(entry.target, newOnEnd)\n } else {\n observer.unobserve(entry.target)\n }\n } else if (typeof onEnd === \"function\") {\n onEnd(entry)\n activeIntersections.delete(entry.target)\n }\n })\n }\n\n const observer = new IntersectionObserver(onIntersectionChange, {\n root,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholds[amount],\n })\n\n elements.forEach((element) => observer.observe(element))\n\n return () => observer.disconnect()\n}\n"],"names":[],"mappings":";;AAiBA,MAAM,UAAU,GAAG;AACf,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,GAAG,EAAE,CAAC;CACT;SAEe,MAAM,CAClB,iBAAoC,EACpC,OAG6B,EAC7B,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,KAAoB,EAAE,EAAA;AAEjE,IAAA,MAAM,QAAQ,GAAG,eAAe,CAAC,iBAAiB,CAAC;AAEnD,IAAA,MAAM,mBAAmB,GAAG,IAAI,OAAO,EAA8B;AAErE,IAAA,MAAM,oBAAoB,GAAiC,CAAC,OAAO,KAAI;AACnE,QAAA,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;YACtB,MAAM,KAAK,GAAG,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC;AAEnD;;;AAGG;AACH,YAAA,IAAI,KAAK,CAAC,cAAc,KAAK,OAAO,CAAC,KAAK,CAAC;gBAAE;AAE7C,YAAA,IAAI,KAAK,CAAC,cAAc,EAAE;gBACtB,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC;AAC7C,gBAAA,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;oBAChC,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC;gBACnD;qBAAO;AACH,oBAAA,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;gBACpC;YACJ;AAAO,iBAAA,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE;gBACpC,KAAK,CAAC,KAAK,CAAC;AACZ,gBAAA,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;YAC5C;AACJ,QAAA,CAAC,CAAC;AACN,IAAA,CAAC;AAED,IAAA,MAAM,QAAQ,GAAG,IAAI,oBAAoB,CAAC,oBAAoB,EAAE;QAC5D,IAAI;QACJ,UAAU;AACV,QAAA,SAAS,EAAE,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;AACtE,KAAA,CAAC;AAEF,IAAA,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAExD,IAAA,OAAO,MAAM,QAAQ,CAAC,UAAU,EAAE;AACtC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs deleted file mode 100644 index 3b31d713..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs +++ /dev/null @@ -1,12 +0,0 @@ -"use client"; -import { scrapeHTMLMotionValuesFromProps } from 'motion-dom'; -import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs'; -import { createHtmlRenderState } from './utils/create-render-state.mjs'; - -const useHTMLVisualState = /*@__PURE__*/ makeUseVisualState({ - scrapeMotionValuesFromProps: scrapeHTMLMotionValuesFromProps, - createRenderState: createHtmlRenderState, -}); - -export { useHTMLVisualState }; -//# sourceMappingURL=use-html-visual-state.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs.map deleted file mode 100644 index 5ed058b8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-html-visual-state.mjs","sources":["../../../../src/render/html/use-html-visual-state.ts"],"sourcesContent":["\"use client\"\n\nimport { scrapeHTMLMotionValuesFromProps } from \"motion-dom\"\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\"\nimport { createHtmlRenderState } from \"./utils/create-render-state\"\n\nexport const useHTMLVisualState = /*@__PURE__*/ makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeHTMLMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n})\n"],"names":[],"mappings":";;;;;AAMO;AACH;AACA;AACH;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-props.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-props.mjs deleted file mode 100644 index 62e55562..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-props.mjs +++ /dev/null @@ -1,57 +0,0 @@ -"use client"; -import { isMotionValue, isForcedMotionValue, buildHTMLStyles } from 'motion-dom'; -import { useMemo } from 'react'; -import { createHtmlRenderState } from './utils/create-render-state.mjs'; - -function copyRawValuesOnly(target, source, props) { - for (const key in source) { - if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) { - target[key] = source[key]; - } - } -} -function useInitialMotionValues({ transformTemplate }, visualState) { - return useMemo(() => { - const state = createHtmlRenderState(); - buildHTMLStyles(state, visualState, transformTemplate); - return Object.assign({}, state.vars, state.style); - }, [visualState]); -} -function useStyle(props, visualState) { - const styleProp = props.style || {}; - const style = {}; - /** - * Copy non-Motion Values straight into style - */ - copyRawValuesOnly(style, styleProp, props); - Object.assign(style, useInitialMotionValues(props, visualState)); - return style; -} -function useHTMLProps(props, visualState) { - // The `any` isn't ideal but it is the type of createElement props argument - const htmlProps = {}; - const style = useStyle(props, visualState); - if (props.drag && props.dragListener !== false) { - // Disable the ghost element when a user drags - htmlProps.draggable = false; - // Disable text selection - style.userSelect = - style.WebkitUserSelect = - style.WebkitTouchCallout = - "none"; - // Disable scrolling on the draggable direction - style.touchAction = - props.drag === true - ? "none" - : `pan-${props.drag === "x" ? "y" : "x"}`; - } - if (props.tabIndex === undefined && - (props.onTap || props.onTapStart || props.whileTap)) { - htmlProps.tabIndex = 0; - } - htmlProps.style = style; - return htmlProps; -} - -export { copyRawValuesOnly, useHTMLProps }; -//# sourceMappingURL=use-props.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-props.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-props.mjs.map deleted file mode 100644 index 2c10e9a8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/use-props.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-props.mjs","sources":["../../../../src/render/html/use-props.ts"],"sourcesContent":["\"use client\"\n\nimport { AnyResolvedKeyframe, buildHTMLStyles, isForcedMotionValue, isMotionValue, MotionValue } from \"motion-dom\"\nimport { HTMLProps, useMemo } from \"react\"\nimport { MotionProps } from \"../../motion/types\"\nimport { ResolvedValues } from \"../types\"\nimport { createHtmlRenderState } from \"./utils/create-render-state\"\n\nexport function copyRawValuesOnly(\n target: ResolvedValues,\n source: { [key: string]: AnyResolvedKeyframe | MotionValue },\n props: MotionProps\n) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key] as AnyResolvedKeyframe\n }\n }\n}\n\nfunction useInitialMotionValues(\n { transformTemplate }: MotionProps,\n visualState: ResolvedValues\n) {\n return useMemo(() => {\n const state = createHtmlRenderState()\n\n buildHTMLStyles(state, visualState, transformTemplate)\n\n return Object.assign({}, state.vars, state.style)\n }, [visualState])\n}\n\nfunction useStyle(\n props: MotionProps,\n visualState: ResolvedValues\n): ResolvedValues {\n const styleProp = props.style || {}\n const style = {}\n\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp as any, props)\n\n Object.assign(style, useInitialMotionValues(props, visualState))\n\n return style\n}\n\nexport function useHTMLProps(\n props: MotionProps & HTMLProps,\n visualState: ResolvedValues\n) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps: any = {}\n const style = useStyle(props, visualState)\n\n if (props.drag && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false\n\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\"\n\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`\n }\n\n if (\n props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)\n ) {\n htmlProps.tabIndex = 0\n }\n\n htmlProps.style = style\n\n return htmlProps\n}\n"],"names":[],"mappings":";;;;;;AAaI;AACI;;;;AAIR;AAEA;;AAKQ;AAEA;AAEA;AACJ;AACJ;AAEA;AAII;;AAGA;;AAEG;AACH;AAEA;AAEA;AACJ;AAEM;;;;;;AAUE;;AAGA;AACI;AACA;AACI;;AAGR;;AAEQ;AACA;;AAGZ;AAEI;AAEA;;AAGJ;AAEA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs deleted file mode 100644 index e3872015..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs +++ /dev/null @@ -1,9 +0,0 @@ -const createHtmlRenderState = () => ({ - style: {}, - transform: {}, - transformOrigin: {}, - vars: {}, -}); - -export { createHtmlRenderState }; -//# sourceMappingURL=create-render-state.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs.map deleted file mode 100644 index 5d7fcc40..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create-render-state.mjs","sources":["../../../../../src/render/html/utils/create-render-state.ts"],"sourcesContent":["import { HTMLRenderState } from \"../types\"\n\nexport const createHtmlRenderState = (): HTMLRenderState => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {},\n})\n"],"names":[],"mappings":"AAEO,MAAM,qBAAqB,GAAG,OAAwB;AACzD,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,SAAS,EAAE,EAAE;AACb,IAAA,eAAe,EAAE,EAAE;AACnB,IAAA,IAAI,EAAE,EAAE;AACX,CAAA;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs deleted file mode 100644 index 0177ce0c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs +++ /dev/null @@ -1,34 +0,0 @@ -/** - * We keep these listed separately as we use the lowercase tag names as part - * of the runtime bundle to detect SVG components - */ -const lowercaseSVGElements = [ - "animate", - "circle", - "defs", - "desc", - "ellipse", - "g", - "image", - "line", - "filter", - "marker", - "mask", - "metadata", - "path", - "pattern", - "polygon", - "polyline", - "rect", - "stop", - "switch", - "symbol", - "svg", - "text", - "tspan", - "use", - "view", -]; - -export { lowercaseSVGElements }; -//# sourceMappingURL=lowercase-elements.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs.map deleted file mode 100644 index 3e9fda09..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lowercase-elements.mjs","sources":["../../../../src/render/svg/lowercase-elements.ts"],"sourcesContent":["/**\n * We keep these listed separately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nexport const lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n]\n"],"names":[],"mappings":"AAAA;;;AAGG;AACI,MAAM,oBAAoB,GAAG;IAChC,SAAS;IACT,QAAQ;IACR,MAAM;IACN,MAAM;IACN,SAAS;IACT,GAAG;IACH,OAAO;IACP,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,UAAU;IACV,MAAM;IACN,SAAS;IACT,SAAS;IACT,UAAU;IACV,MAAM;IACN,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-props.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-props.mjs deleted file mode 100644 index c992b5fa..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-props.mjs +++ /dev/null @@ -1,25 +0,0 @@ -"use client"; -import { buildSVGAttrs, isSVGTag } from 'motion-dom'; -import { useMemo } from 'react'; -import { copyRawValuesOnly } from '../html/use-props.mjs'; -import { createSvgRenderState } from './utils/create-render-state.mjs'; - -function useSVGProps(props, visualState, _isStatic, Component) { - const visualProps = useMemo(() => { - const state = createSvgRenderState(); - buildSVGAttrs(state, visualState, isSVGTag(Component), props.transformTemplate, props.style); - return { - ...state.attrs, - style: { ...state.style }, - }; - }, [visualState]); - if (props.style) { - const rawStyles = {}; - copyRawValuesOnly(rawStyles, props.style, props); - visualProps.style = { ...rawStyles, ...visualProps.style }; - } - return visualProps; -} - -export { useSVGProps }; -//# sourceMappingURL=use-props.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.map deleted file mode 100644 index 6d16ff9c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-props.mjs","sources":["../../../../src/render/svg/use-props.ts"],"sourcesContent":["\"use client\"\n\nimport { buildSVGAttrs, isSVGTag } from \"motion-dom\"\nimport { useMemo } from \"react\"\nimport { MotionProps } from \"../../motion/types\"\nimport { copyRawValuesOnly } from \"../html/use-props\"\nimport { ResolvedValues } from \"../types\"\nimport { createSvgRenderState } from \"./utils/create-render-state\"\n\nexport function useSVGProps(\n props: MotionProps,\n visualState: ResolvedValues,\n _isStatic: boolean,\n Component: string | React.ComponentType>\n) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState()\n\n buildSVGAttrs(\n state,\n visualState,\n isSVGTag(Component),\n props.transformTemplate,\n props.style\n )\n\n return {\n ...state.attrs,\n style: { ...state.style },\n }\n }, [visualState])\n\n if (props.style) {\n const rawStyles = {}\n copyRawValuesOnly(rawStyles, props.style as any, props)\n visualProps.style = { ...rawStyles, ...visualProps.style }\n }\n\n return visualProps\n}\n"],"names":[],"mappings":";;;;;;AASM;AAMF;AACI;AAEA;;;AAUI;;AAER;AAEA;;;AAGI;;AAGJ;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs deleted file mode 100644 index a987d88b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs +++ /dev/null @@ -1,12 +0,0 @@ -"use client"; -import { scrapeSVGMotionValuesFromProps } from 'motion-dom'; -import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs'; -import { createSvgRenderState } from './utils/create-render-state.mjs'; - -const useSVGVisualState = /*@__PURE__*/ makeUseVisualState({ - scrapeMotionValuesFromProps: scrapeSVGMotionValuesFromProps, - createRenderState: createSvgRenderState, -}); - -export { useSVGVisualState }; -//# sourceMappingURL=use-svg-visual-state.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs.map deleted file mode 100644 index 7f4d4187..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-svg-visual-state.mjs","sources":["../../../../src/render/svg/use-svg-visual-state.ts"],"sourcesContent":["\"use client\"\n\nimport { scrapeSVGMotionValuesFromProps } from \"motion-dom\"\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\"\nimport { createSvgRenderState } from \"./utils/create-render-state\"\n\nexport const useSVGVisualState = /*@__PURE__*/ makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeSVGMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n})\n"],"names":[],"mappings":";;;;;AAMO;AACH;AACA;AACH;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs deleted file mode 100644 index 884270f2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { createHtmlRenderState } from '../../html/utils/create-render-state.mjs'; - -const createSvgRenderState = () => ({ - ...createHtmlRenderState(), - attrs: {}, -}); - -export { createSvgRenderState }; -//# sourceMappingURL=create-render-state.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs.map deleted file mode 100644 index 409d46c0..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create-render-state.mjs","sources":["../../../../../src/render/svg/utils/create-render-state.ts"],"sourcesContent":["import { createHtmlRenderState } from \"../../html/utils/create-render-state\"\nimport { SVGRenderState } from \"../types\"\n\nexport const createSvgRenderState = (): SVGRenderState => ({\n ...createHtmlRenderState(),\n attrs: {},\n})\n"],"names":[],"mappings":";;AAGO,MAAM,oBAAoB,GAAG,OAAuB;AACvD,IAAA,GAAG,qBAAqB,EAAE;AAC1B,IAAA,KAAK,EAAE,EAAE;AACZ,CAAA;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/distance.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/distance.mjs deleted file mode 100644 index c7ff075c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/distance.mjs +++ /dev/null @@ -1,10 +0,0 @@ -const distance = (a, b) => Math.abs(a - b); -function distance2D(a, b) { - // Multi-dimensional - const xDelta = distance(a.x, b.x); - const yDelta = distance(a.y, b.y); - return Math.sqrt(xDelta ** 2 + yDelta ** 2); -} - -export { distance, distance2D }; -//# sourceMappingURL=distance.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/distance.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/distance.mjs.map deleted file mode 100644 index 94ed1f65..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/distance.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distance.mjs","sources":["../../../src/utils/distance.ts"],"sourcesContent":["import { Point } from \"motion-utils\"\n\nexport const distance = (a: number, b: number) => Math.abs(a - b)\n\nexport function distance2D(a: Point, b: Point): number {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x)\n const yDelta = distance(a.y, b.y)\n return Math.sqrt(xDelta ** 2 + yDelta ** 2)\n}\n"],"names":[],"mappings":"AAEO,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAE,CAAS,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;AAE1D,SAAU,UAAU,CAAC,CAAQ,EAAE,CAAQ,EAAA;;AAEzC,IAAA,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACjC,IAAA,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACjC,IAAA,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM,IAAI,CAAC,CAAC;AAC/C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/get-context-window.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/get-context-window.mjs deleted file mode 100644 index 02fa901d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/get-context-window.mjs +++ /dev/null @@ -1,7 +0,0 @@ -// Fixes https://github.com/motiondivision/motion/issues/2270 -const getContextWindow = ({ current }) => { - return current ? current.ownerDocument.defaultView : null; -}; - -export { getContextWindow }; -//# sourceMappingURL=get-context-window.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.map deleted file mode 100644 index 4486b70f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get-context-window.mjs","sources":["../../../src/utils/get-context-window.ts"],"sourcesContent":["import type { VisualElement } from \"motion-dom\"\n\n// Fixes https://github.com/motiondivision/motion/issues/2270\nexport const getContextWindow = ({ current }: VisualElement) => {\n return current ? current.ownerDocument.defaultView : null\n}\n"],"names":[],"mappings":"AAEA;MACa,gBAAgB,GAAG,CAAC,EAAE,OAAO,EAA0B,KAAI;AACpE,IAAA,OAAO,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,GAAG,IAAI;AAC7D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-browser.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-browser.mjs deleted file mode 100644 index 870cec2c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-browser.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const isBrowser = typeof window !== "undefined"; - -export { isBrowser }; -//# sourceMappingURL=is-browser.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-browser.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-browser.mjs.map deleted file mode 100644 index 5cf8d860..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-browser.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-browser.mjs","sources":["../../../src/utils/is-browser.ts"],"sourcesContent":["export const isBrowser = typeof window !== \"undefined\"\n"],"names":[],"mappings":"MAAa,SAAS,GAAG,OAAO,MAAM,KAAK;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs deleted file mode 100644 index 7c2f9bbd..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs +++ /dev/null @@ -1,8 +0,0 @@ -function isRefObject(ref) { - return (ref && - typeof ref === "object" && - Object.prototype.hasOwnProperty.call(ref, "current")); -} - -export { isRefObject }; -//# sourceMappingURL=is-ref-object.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.map deleted file mode 100644 index 9565b7f8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-ref-object.mjs","sources":["../../../src/utils/is-ref-object.ts"],"sourcesContent":["import { MutableRefObject } from \"./safe-react-types\"\n\nexport function isRefObject(ref: any): ref is MutableRefObject {\n return (\n ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\")\n )\n}\n"],"names":[],"mappings":"AAEM,SAAU,WAAW,CAAU,GAAQ,EAAA;AACzC,IAAA,QACI,GAAG;QACH,OAAO,GAAG,KAAK,QAAQ;AACvB,QAAA,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC;AAE5D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs deleted file mode 100644 index f4a36b0c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +++ /dev/null @@ -1,21 +0,0 @@ -"use client"; -import { useContext } from 'react'; -import { MotionConfigContext } from '../../context/MotionConfigContext.mjs'; -import { useReducedMotion } from './use-reduced-motion.mjs'; - -function useReducedMotionConfig() { - const reducedMotionPreference = useReducedMotion(); - const { reducedMotion } = useContext(MotionConfigContext); - if (reducedMotion === "never") { - return false; - } - else if (reducedMotion === "always") { - return true; - } - else { - return reducedMotionPreference; - } -} - -export { useReducedMotionConfig }; -//# sourceMappingURL=use-reduced-motion-config.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs.map deleted file mode 100644 index 27f54f2b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-reduced-motion-config.mjs","sources":["../../../../src/utils/reduced-motion/use-reduced-motion-config.ts"],"sourcesContent":["\"use client\"\n\nimport { useContext } from \"react\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { useReducedMotion } from \"./use-reduced-motion\"\n\nexport function useReducedMotionConfig() {\n const reducedMotionPreference = useReducedMotion()\n const { reducedMotion } = useContext(MotionConfigContext)\n\n if (reducedMotion === \"never\") {\n return false\n } else if (reducedMotion === \"always\") {\n return true\n } else {\n return reducedMotionPreference\n }\n}\n"],"names":[],"mappings":";;;;;;AAOI;;AAGA;AACI;;AACG;AACH;;;AAEA;;AAER;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs deleted file mode 100644 index f78cfe84..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs +++ /dev/null @@ -1,48 +0,0 @@ -"use client"; -import { hasReducedMotionListener, initPrefersReducedMotion, prefersReducedMotion } from 'motion-dom'; -import { warnOnce } from 'motion-utils'; -import { useState } from 'react'; - -/** - * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting. - * - * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing - * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion. - * - * It will actively respond to changes and re-render your components with the latest setting. - * - * ```jsx - * export function Sidebar({ isOpen }) { - * const shouldReduceMotion = useReducedMotion() - * const closedX = shouldReduceMotion ? 0 : "-100%" - * - * return ( - * - * ) - * } - * ``` - * - * @return boolean - * - * @public - */ -function useReducedMotion() { - /** - * Lazy initialisation of prefersReducedMotion - */ - !hasReducedMotionListener.current && initPrefersReducedMotion(); - const [shouldReduceMotion] = useState(prefersReducedMotion.current); - if (process.env.NODE_ENV !== "production") { - warnOnce(shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"); - } - /** - * TODO See if people miss automatically updating shouldReduceMotion setting - */ - return shouldReduceMotion; -} - -export { useReducedMotion }; -//# sourceMappingURL=use-reduced-motion.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs.map deleted file mode 100644 index c5f09d1c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-reduced-motion.mjs","sources":["../../../../src/utils/reduced-motion/use-reduced-motion.ts"],"sourcesContent":["\"use client\"\n\nimport {\n hasReducedMotionListener,\n initPrefersReducedMotion,\n prefersReducedMotion,\n} from \"motion-dom\"\nimport { warnOnce } from \"motion-utils\"\nimport { useState } from \"react\"\n\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * \n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nexport function useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasReducedMotionListener.current && initPrefersReducedMotion()\n\n const [shouldReduceMotion] = useState(prefersReducedMotion.current)\n\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n shouldReduceMotion !== true,\n \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\",\n \"reduced-motion-disabled\"\n )\n }\n\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n\n return shouldReduceMotion\n}\n"],"names":[],"mappings":";;;;;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;;AAEC;;AAEG;AACH;;;;;AAYA;;AAEG;AAEH;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-rotated-parent.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-rotated-parent.mjs deleted file mode 100644 index 09d364c5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-rotated-parent.mjs +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Creates a `transformPagePoint` function that corrects pointer coordinates - * for a parent container with CSS transforms (rotation, scale, skew). - * - * When dragging elements inside a transformed parent, pointer coordinates - * need to be transformed through the inverse of the parent's transform - * so the drag offset is in local space. - * - * Works with both static and continuously animating transforms. - * - * @example - * ```jsx - * function App() { - * const ref = useRef(null) - * - * return ( - * - * - * - * - * - * ) - * } - * ``` - * - * @param parentRef - A React ref to the transformed parent element - * @returns A transformPagePoint function for use with MotionConfig - * - * @public - */ -function correctParentTransform(parentRef) { - return (point) => { - const parent = parentRef.current; - if (!parent) - return point; - const inv = getInverseMatrix(parent); - if (!inv) - return point; - // Get center of rotation in page space - const rect = parent.getBoundingClientRect(); - const cx = rect.left + window.scrollX + rect.width / 2; - const cy = rect.top + window.scrollY + rect.height / 2; - // Transform (point - center) through inverse, then add center back - const dx = point.x - cx; - const dy = point.y - cy; - return { - x: cx + inv.a * dx + inv.c * dy, - y: cy + inv.b * dx + inv.d * dy, - }; - }; -} -function getInverseMatrix(element) { - const { transform } = getComputedStyle(element); - if (!transform || transform === "none") - return null; - const match = transform.match(/^matrix3d\((.*)\)$/u) || - transform.match(/^matrix\((.*)\)$/u); - if (!match) - return null; - const v = match[1].split(",").map(Number); - const is3d = transform.startsWith("matrix3d"); - const a = v[0], b = v[1]; - const c = is3d ? v[4] : v[2]; - const d = is3d ? v[5] : v[3]; - const det = a * d - b * c; - if (Math.abs(det) < 1e-10) - return null; - return { a: d / det, b: -b / det, c: -c / det, d: a / det }; -} - -export { correctParentTransform }; -//# sourceMappingURL=transform-rotated-parent.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-rotated-parent.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-rotated-parent.mjs.map deleted file mode 100644 index 0d841cf6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-rotated-parent.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transform-rotated-parent.mjs","sources":["../../../src/utils/transform-rotated-parent.ts"],"sourcesContent":["import type { Point, TransformPoint } from \"motion-utils\"\nimport type { RefObject } from \"react\"\n\n/**\n * Creates a `transformPagePoint` function that corrects pointer coordinates\n * for a parent container with CSS transforms (rotation, scale, skew).\n *\n * When dragging elements inside a transformed parent, pointer coordinates\n * need to be transformed through the inverse of the parent's transform\n * so the drag offset is in local space.\n *\n * Works with both static and continuously animating transforms.\n *\n * @example\n * ```jsx\n * function App() {\n * const ref = useRef(null)\n *\n * return (\n * \n * \n * \n * \n * \n * )\n * }\n * ```\n *\n * @param parentRef - A React ref to the transformed parent element\n * @returns A transformPagePoint function for use with MotionConfig\n *\n * @public\n */\nexport function correctParentTransform(\n parentRef: RefObject\n): TransformPoint {\n return (point: Point): Point => {\n const parent = parentRef.current\n if (!parent) return point\n\n const inv = getInverseMatrix(parent)\n if (!inv) return point\n\n // Get center of rotation in page space\n const rect = parent.getBoundingClientRect()\n const cx = rect.left + window.scrollX + rect.width / 2\n const cy = rect.top + window.scrollY + rect.height / 2\n\n // Transform (point - center) through inverse, then add center back\n const dx = point.x - cx\n const dy = point.y - cy\n return {\n x: cx + inv.a * dx + inv.c * dy,\n y: cy + inv.b * dx + inv.d * dy,\n }\n }\n}\n\ninterface InverseMatrix {\n a: number\n b: number\n c: number\n d: number\n}\n\nfunction getInverseMatrix(element: HTMLElement): InverseMatrix | null {\n const { transform } = getComputedStyle(element)\n if (!transform || transform === \"none\") return null\n\n const match =\n transform.match(/^matrix3d\\((.*)\\)$/u) ||\n transform.match(/^matrix\\((.*)\\)$/u)\n if (!match) return null\n\n const v = match[1].split(\",\").map(Number)\n const is3d = transform.startsWith(\"matrix3d\")\n const a = v[0],\n b = v[1]\n const c = is3d ? v[4] : v[2]\n const d = is3d ? v[5] : v[3]\n\n const det = a * d - b * c\n if (Math.abs(det) < 1e-10) return null\n\n return { a: d / det, b: -b / det, c: -c / det, d: a / det }\n}\n"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AACG,SAAU,sBAAsB,CAClC,SAAwC,EAAA;IAExC,OAAO,CAAC,KAAY,KAAW;AAC3B,QAAA,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO;AAChC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,KAAK;AAEzB,QAAA,MAAM,GAAG,GAAG,gBAAgB,CAAC,MAAM,CAAC;AACpC,QAAA,IAAI,CAAC,GAAG;AAAE,YAAA,OAAO,KAAK;;AAGtB,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,qBAAqB,EAAE;AAC3C,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC;AACtD,QAAA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AAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAE5B,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;AACzB,IAAA,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AAAE,QAAA,OAAO,IAAI;IAEtC,OAAO,EAAE,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE;AAC/D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-viewbox-point.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-viewbox-point.mjs deleted file mode 100644 index 378b008c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-viewbox-point.mjs +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Creates a `transformPagePoint` function that accounts for SVG viewBox scaling. - * - * When dragging SVG elements inside an SVG with a viewBox that differs from - * the rendered dimensions (e.g., `viewBox="0 0 100 100"` but rendered at 500x500 pixels), - * pointer coordinates need to be transformed to match the SVG's coordinate system. - * - * @example - * ```jsx - * function App() { - * const svgRef = useRef(null) - * - * return ( - * - * - * - * - * - * ) - * } - * ``` - * - * @param svgRef - A React ref to the SVG element - * @returns A transformPagePoint function for use with MotionConfig - * - * @public - */ -function transformViewBoxPoint(svgRef) { - return (point) => { - const svg = svgRef.current; - if (!svg) { - return point; - } - // Get the viewBox attribute - const viewBox = svg.viewBox?.baseVal; - if (!viewBox || (viewBox.width === 0 && viewBox.height === 0)) { - // No viewBox or empty viewBox - no transformation needed - return point; - } - // Get the rendered dimensions of the SVG - const bbox = svg.getBoundingClientRect(); - if (bbox.width === 0 || bbox.height === 0) { - return point; - } - // Calculate scale factors - const scaleX = viewBox.width / bbox.width; - const scaleY = viewBox.height / bbox.height; - // Get the SVG's position on the page - const svgX = bbox.left + window.scrollX; - const svgY = bbox.top + window.scrollY; - // Transform the point: - // 1. Calculate position relative to SVG - // 2. Scale by viewBox/viewport ratio - // 3. Add back the SVG position (but in SVG coordinates) - return { - x: (point.x - svgX) * scaleX + svgX, - y: (point.y - svgY) * scaleY + svgY, - }; - }; -} - -export { transformViewBoxPoint }; -//# sourceMappingURL=transform-viewbox-point.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-viewbox-point.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-viewbox-point.mjs.map deleted file mode 100644 index 7dd63e83..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/transform-viewbox-point.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transform-viewbox-point.mjs","sources":["../../../src/utils/transform-viewbox-point.ts"],"sourcesContent":["import type { Point, TransformPoint } from \"motion-utils\"\nimport type { RefObject } from \"react\"\n\n/**\n * Creates a `transformPagePoint` function that accounts for SVG viewBox scaling.\n *\n * When dragging SVG elements inside an SVG with a viewBox that differs from\n * the rendered dimensions (e.g., `viewBox=\"0 0 100 100\"` but rendered at 500x500 pixels),\n * pointer coordinates need to be transformed to match the SVG's coordinate system.\n *\n * @example\n * ```jsx\n * function App() {\n * const svgRef = useRef(null)\n *\n * return (\n * \n * \n * \n * \n * \n * )\n * }\n * ```\n *\n * @param svgRef - A React ref to the SVG element\n * @returns A transformPagePoint function for use with MotionConfig\n *\n * @public\n */\nexport function transformViewBoxPoint(\n svgRef: RefObject\n): TransformPoint {\n return (point: Point): Point => {\n const svg = svgRef.current\n if (!svg) {\n return point\n }\n\n // Get the viewBox attribute\n const viewBox = svg.viewBox?.baseVal\n if (!viewBox || (viewBox.width === 0 && viewBox.height === 0)) {\n // No viewBox or empty viewBox - no transformation needed\n return point\n }\n\n // Get the rendered dimensions of the SVG\n const bbox = svg.getBoundingClientRect()\n if (bbox.width === 0 || bbox.height === 0) {\n return point\n }\n\n // Calculate scale factors\n const scaleX = viewBox.width / bbox.width\n const scaleY = viewBox.height / bbox.height\n\n // Get the SVG's position on the page\n const svgX = bbox.left + window.scrollX\n const svgY = bbox.top + window.scrollY\n\n // Transform the point:\n // 1. Calculate position relative to SVG\n // 2. Scale by viewBox/viewport ratio\n // 3. Add back the SVG position (but in SVG coordinates)\n return {\n x: (point.x - svgX) * scaleX + svgX,\n y: (point.y - svgY) * scaleY + svgY,\n }\n }\n}\n"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;AACG,SAAU,qBAAqB,CACjC,MAAuC,EAAA;IAEvC,OAAO,CAAC,KAAY,KAAW;AAC3B,QAAA,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO;QAC1B,IAAI,CAAC,GAAG,EAAE;AACN,YAAA,OAAO,KAAK;QAChB;;AAGA,QAAA,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO;AACpC,QAAA,IAAI,CAAC,OAAO,KAAK,OAAO,CAAC,KAAK,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE;;AAE3D,YAAA,OAAO,KAAK;QAChB;;AAGA,QAAA,MAAM,IAAI,GAAG,GAAG,CAAC,qBAAqB,EAAE;AACxC,QAAA,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACvC,YAAA,OAAO,KAAK;QAChB;;QAGA,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK;QACzC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM;;QAG3C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO;QACvC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO;;;;;QAMtC,OAAO;YACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,IAAI,MAAM,GAAG,IAAI;YACnC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,IAAI,MAAM,GAAG,IAAI;SACtC;AACL,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs deleted file mode 100644 index 529b1cef..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs +++ /dev/null @@ -1,23 +0,0 @@ -"use client"; -import { frame, cancelFrame } from 'motion-dom'; -import { useRef, useContext, useEffect } from 'react'; -import { MotionConfigContext } from '../context/MotionConfigContext.mjs'; - -function useAnimationFrame(callback) { - const initialTimestamp = useRef(0); - const { isStatic } = useContext(MotionConfigContext); - useEffect(() => { - if (isStatic) - return; - const provideTimeSinceStart = ({ timestamp, delta }) => { - if (!initialTimestamp.current) - initialTimestamp.current = timestamp; - callback(timestamp - initialTimestamp.current, delta); - }; - frame.update(provideTimeSinceStart, true); - return () => cancelFrame(provideTimeSinceStart); - }, [callback]); -} - -export { useAnimationFrame }; -//# sourceMappingURL=use-animation-frame.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs.map deleted file mode 100644 index 22b0de00..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-animation-frame.mjs","sources":["../../../src/utils/use-animation-frame.ts"],"sourcesContent":["\"use client\"\n\nimport { cancelFrame, frame, FrameData } from \"motion-dom\"\nimport { useContext, useEffect, useRef } from \"react\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\n\nexport type FrameCallback = (timestamp: number, delta: number) => void\n\nexport function useAnimationFrame(callback: FrameCallback) {\n const initialTimestamp = useRef(0)\n const { isStatic } = useContext(MotionConfigContext)\n\n useEffect(() => {\n if (isStatic) return\n\n const provideTimeSinceStart = ({ timestamp, delta }: FrameData) => {\n if (!initialTimestamp.current) initialTimestamp.current = timestamp\n\n callback(timestamp - initialTimestamp.current, delta)\n }\n\n frame.update(provideTimeSinceStart, true)\n return () => cancelFrame(provideTimeSinceStart)\n }, [callback])\n}\n"],"names":[],"mappings":";;;;;AAQM;AACF;;;AAII;;;;AAGmC;;AAGnC;AAEA;AACA;AACJ;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs deleted file mode 100644 index efa3d327..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs +++ /dev/null @@ -1,61 +0,0 @@ -import * as React from 'react'; - -/** - * Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx - */ -/** - * Set a given ref to a given value - * This utility takes care of different types of refs: callback refs and RefObject(s) - */ -function setRef(ref, value) { - if (typeof ref === "function") { - return ref(value); - } - else if (ref !== null && ref !== undefined) { - ref.current = value; - } -} -/** - * A utility to compose multiple refs together - * Accepts callback refs and RefObject(s) - */ -function composeRefs(...refs) { - return (node) => { - let hasCleanup = false; - const cleanups = refs.map((ref) => { - const cleanup = setRef(ref, node); - if (!hasCleanup && typeof cleanup === "function") { - hasCleanup = true; - } - return cleanup; - }); - // React <19 will log an error to the console if a callback ref returns a - // value. We don't use ref cleanups internally so this will only happen if a - // user's ref callback returns a value, which we only expect if they are - // using the cleanup functionality added in React 19. - if (hasCleanup) { - return () => { - for (let i = 0; i < cleanups.length; i++) { - const cleanup = cleanups[i]; - if (typeof cleanup === "function") { - cleanup(); - } - else { - setRef(refs[i], null); - } - } - }; - } - }; -} -/** - * A custom hook that composes multiple refs - * Accepts callback refs and RefObject(s) - */ -function useComposedRefs(...refs) { - // eslint-disable-next-line react-hooks/exhaustive-deps - return React.useCallback(composeRefs(...refs), refs); -} - -export { useComposedRefs }; -//# sourceMappingURL=use-composed-ref.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.map deleted file mode 100644 index f65fb069..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-composed-ref.mjs","sources":["../../../src/utils/use-composed-ref.ts"],"sourcesContent":["/**\n * Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx\n */\nimport * as React from \"react\"\n\ntype PossibleRef = React.Ref | undefined\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */\nfunction setRef(ref: PossibleRef, value: T): void | (() => void) {\n if (typeof ref === \"function\") {\n return ref(value)\n } else if (ref !== null && ref !== undefined) {\n ;(ref as React.MutableRefObject).current = value\n }\n}\n\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */\nfunction composeRefs(...refs: PossibleRef[]): React.RefCallback {\n return (node) => {\n let hasCleanup = false\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node)\n if (!hasCleanup && typeof cleanup === \"function\") {\n hasCleanup = true\n }\n return cleanup\n })\n // React <19 will log an error to the console if a callback ref returns a\n // value. We don't use ref cleanups internally so this will only happen if a\n // user's ref callback returns a value, which we only expect if they are\n // using the cleanup functionality added in React 19.\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i]\n if (typeof cleanup === \"function\") {\n cleanup()\n } else {\n setRef(refs[i], null)\n }\n }\n }\n }\n }\n}\n\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */\nfunction useComposedRefs(...refs: PossibleRef[]): React.RefCallback {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs)\n}\n\nexport { useComposedRefs }\n"],"names":[],"mappings":";;AAAA;;AAEG;AAKH;;;AAGG;AACH,SAAS,MAAM,CAAI,GAAmB,EAAE,KAAQ,EAAA;AAC5C,IAAA,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;AAC3B,QAAA,OAAO,GAAG,CAAC,KAAK,CAAC;IACrB;SAAO,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE;AACxC,QAAA,GAAiC,CAAC,OAAO,GAAG,KAAK;IACvD;AACJ;AAEA;;;AAGG;AACH,SAAS,WAAW,CAAI,GAAG,IAAsB,EAAA;IAC7C,OAAO,CAAC,IAAI,KAAI;QACZ,IAAI,UAAU,GAAG,KAAK;QACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAI;YAC9B,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC;YACjC,IAAI,CAAC,UAAU,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;gBAC9C,UAAU,GAAG,IAAI;YACrB;AACA,YAAA,OAAO,OAAO;AAClB,QAAA,CAAC,CAAC;;;;;QAKF,IAAI,UAAU,EAAE;AACZ,YAAA,OAAO,MAAK;AACR,gBAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACtC,oBAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC;AAC3B,oBAAA,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;AAC/B,wBAAA,OAAO,EAAE;oBACb;yBAAO;wBACH,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC;oBACzB;gBACJ;AACJ,YAAA,CAAC;QACL;AACJ,IAAA,CAAC;AACL;AAEA;;;AAGG;AACH,SAAS,eAAe,CAAI,GAAG,IAAsB,EAAA;;AAEjD,IAAA,OAAO,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,EAAE,IAAI,CAAC;AACxD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-constant.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-constant.mjs deleted file mode 100644 index 50a3e1db..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-constant.mjs +++ /dev/null @@ -1,20 +0,0 @@ -"use client"; -import { useRef } from 'react'; - -/** - * Creates a constant value over the lifecycle of a component. - * - * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer - * a guarantee that it won't re-run for performance reasons later on. By using `useConstant` - * you can ensure that initialisers don't execute twice or more. - */ -function useConstant(init) { - const ref = useRef(null); - if (ref.current === null) { - ref.current = init(); - } - return ref.current; -} - -export { useConstant }; -//# sourceMappingURL=use-constant.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-constant.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-constant.mjs.map deleted file mode 100644 index 4a9d7be2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-constant.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-constant.mjs","sources":["../../../src/utils/use-constant.ts"],"sourcesContent":["\"use client\"\n\nimport { useRef } from \"react\"\n\ntype Init = () => T\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nexport function useConstant(init: Init) {\n const ref = useRef(null)\n\n if (ref.current === null) {\n ref.current = init()\n }\n\n return ref.current\n}\n"],"names":[],"mappings":";;;AAMA;;;;;;AAMG;AACG;AACF;AAEA;AACI;;;AAIR;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-cycle.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-cycle.mjs deleted file mode 100644 index a5a61ff2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-cycle.mjs +++ /dev/null @@ -1,49 +0,0 @@ -"use client"; -import { wrap } from 'motion-utils'; -import { useRef, useState, useCallback } from 'react'; - -/** - * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments. - * - * An index value can be passed to the returned `cycle` function to cycle to a specific index. - * - * ```jsx - * import * as React from "react" - * import { motion, useCycle } from "framer-motion" - * - * export const MyComponent = () => { - * const [x, cycleX] = useCycle(0, 50, 100) - * - * return ( - * cycleX()} - * /> - * ) - * } - * ``` - * - * @param items - items to cycle through - * @returns [currentState, cycleState] - * - * @public - */ -function useCycle(...items) { - const index = useRef(0); - const [item, setItem] = useState(items[index.current]); - const runCycle = useCallback((next) => { - index.current = - typeof next !== "number" - ? wrap(0, items.length, index.current + 1) - : next; - setItem(items[index.current]); - }, - // The array will change on each call, but by putting items.length at - // the front of this array, we guarantee the dependency comparison will match up - // eslint-disable-next-line react-hooks/exhaustive-deps - [items.length, ...items]); - return [item, runCycle]; -} - -export { useCycle }; -//# sourceMappingURL=use-cycle.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-cycle.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-cycle.mjs.map deleted file mode 100644 index 59a6bc74..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-cycle.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-cycle.mjs","sources":["../../../src/utils/use-cycle.ts"],"sourcesContent":["\"use client\"\n\nimport { wrap } from \"motion-utils\"\nimport { useCallback, useRef, useState } from \"react\"\n\nexport type Cycle = (i?: number) => void\n\nexport type CycleState = [T, Cycle]\n\n/**\n * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.\n *\n * An index value can be passed to the returned `cycle` function to cycle to a specific index.\n *\n * ```jsx\n * import * as React from \"react\"\n * import { motion, useCycle } from \"framer-motion\"\n *\n * export const MyComponent = () => {\n * const [x, cycleX] = useCycle(0, 50, 100)\n *\n * return (\n * cycleX()}\n * />\n * )\n * }\n * ```\n *\n * @param items - items to cycle through\n * @returns [currentState, cycleState]\n *\n * @public\n */\nexport function useCycle(...items: T[]): CycleState {\n const index = useRef(0)\n const [item, setItem] = useState(items[index.current])\n\n const runCycle = useCallback(\n (next?: number) => {\n index.current =\n typeof next !== \"number\"\n ? wrap(0, items.length, index.current + 1)\n : next\n\n setItem(items[index.current])\n },\n // The array will change on each call, but by putting items.length at\n // the front of this array, we guarantee the dependency comparison will match up\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [items.length, ...items]\n )\n return [item, runCycle]\n}\n"],"names":[],"mappings":";;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AACG;AACF;AACA;AAEA;AAEQ;;AAEQ;;;;;;;;AAUhB;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-force-update.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-force-update.mjs deleted file mode 100644 index 729a98b7..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-force-update.mjs +++ /dev/null @@ -1,21 +0,0 @@ -"use client"; -import { frame } from 'motion-dom'; -import { useState, useCallback } from 'react'; -import { useIsMounted } from './use-is-mounted.mjs'; - -function useForceUpdate() { - const isMounted = useIsMounted(); - const [forcedRenderCount, setForcedRenderCount] = useState(0); - const forceRender = useCallback(() => { - isMounted.current && setForcedRenderCount(forcedRenderCount + 1); - }, [forcedRenderCount]); - /** - * Defer this to the end of the next animation frame in case there are multiple - * synchronous calls. - */ - const deferredForceRender = useCallback(() => frame.postRender(forceRender), [forceRender]); - return [deferredForceRender, forcedRenderCount]; -} - -export { useForceUpdate }; -//# sourceMappingURL=use-force-update.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-force-update.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-force-update.mjs.map deleted file mode 100644 index a000fb86..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-force-update.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-force-update.mjs","sources":["../../../src/utils/use-force-update.ts"],"sourcesContent":["\"use client\"\n\nimport { frame } from \"motion-dom\"\nimport { useCallback, useState } from \"react\"\nimport { useIsMounted } from \"./use-is-mounted\"\n\nexport function useForceUpdate(): [VoidFunction, number] {\n const isMounted = useIsMounted()\n const [forcedRenderCount, setForcedRenderCount] = useState(0)\n\n const forceRender = useCallback(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1)\n }, [forcedRenderCount])\n\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n const deferredForceRender = useCallback(\n () => frame.postRender(forceRender),\n [forceRender]\n )\n\n return [deferredForceRender, forcedRenderCount]\n}\n"],"names":[],"mappings":";;;;;;AAOI;;AAGA;;AAEA;AAEA;;;AAGG;AACH;AAKA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-in-view.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-in-view.mjs deleted file mode 100644 index 59d5aebf..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-in-view.mjs +++ /dev/null @@ -1,25 +0,0 @@ -"use client"; -import { useState, useEffect } from 'react'; -import { inView } from '../render/dom/viewport/index.mjs'; - -function useInView(ref, { root, margin, amount, once = false, initial = false, } = {}) { - const [isInView, setInView] = useState(initial); - useEffect(() => { - if (!ref.current || (once && isInView)) - return; - const onEnter = () => { - setInView(true); - return once ? undefined : () => setInView(false); - }; - const options = { - root: (root && root.current) || undefined, - margin, - amount, - }; - return inView(ref.current, onEnter, options); - }, [root, ref, margin, once, amount]); - return isInView; -} - -export { useInView }; -//# sourceMappingURL=use-in-view.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-in-view.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-in-view.mjs.map deleted file mode 100644 index 29d21d87..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-in-view.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-in-view.mjs","sources":["../../../src/utils/use-in-view.ts"],"sourcesContent":["\"use client\"\n\nimport { RefObject, useEffect, useState } from \"react\"\nimport { inView, InViewOptions } from \"../render/dom/viewport\"\n\nexport interface UseInViewOptions\n extends Omit {\n root?: RefObject\n once?: boolean\n amount?: \"some\" | \"all\" | number\n initial?: boolean\n}\n\nexport function useInView(\n ref: RefObject,\n {\n root,\n margin,\n amount,\n once = false,\n initial = false,\n }: UseInViewOptions = {}\n) {\n const [isInView, setInView] = useState(initial)\n\n useEffect(() => {\n if (!ref.current || (once && isInView)) return\n\n const onEnter = () => {\n setInView(true)\n\n return once ? undefined : () => setInView(false)\n }\n\n const options: InViewOptions = {\n root: (root && root.current) || undefined,\n margin,\n amount,\n }\n\n return inView(ref.current, onEnter, options)\n }, [root, ref, margin, once, amount])\n\n return isInView\n}\n"],"names":[],"mappings":";;;;AAaM;;;;;;;AAkBM;AACJ;AAEA;;;;;;AAOJ;AAEA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs deleted file mode 100644 index 8a84ebfb..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs +++ /dev/null @@ -1,43 +0,0 @@ -"use client"; -import { frame } from 'motion-dom'; -import { MotionGlobalConfig } from 'motion-utils'; -import { useRef, useEffect } from 'react'; -import { useInstantLayoutTransition } from '../projection/use-instant-layout-transition.mjs'; -import { useForceUpdate } from './use-force-update.mjs'; - -function useInstantTransition() { - const [forceUpdate, forcedRenderCount] = useForceUpdate(); - const startInstantLayoutTransition = useInstantLayoutTransition(); - const unlockOnFrameRef = useRef(-1); - useEffect(() => { - /** - * Unblock after two animation frames, otherwise this will unblock too soon. - */ - frame.postRender(() => frame.postRender(() => { - /** - * If the callback has been called again after the effect - * triggered this 2 frame delay, don't unblock animations. This - * prevents the previous effect from unblocking the current - * instant transition too soon. This becomes more likely when - * used in conjunction with React.startTransition(). - */ - if (forcedRenderCount !== unlockOnFrameRef.current) - return; - MotionGlobalConfig.instantAnimations = false; - })); - }, [forcedRenderCount]); - return (callback) => { - startInstantLayoutTransition(() => { - MotionGlobalConfig.instantAnimations = true; - forceUpdate(); - callback(); - unlockOnFrameRef.current = forcedRenderCount + 1; - }); - }; -} -function disableInstantTransitions() { - MotionGlobalConfig.instantAnimations = false; -} - -export { disableInstantTransitions, useInstantTransition }; -//# sourceMappingURL=use-instant-transition.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs.map deleted file mode 100644 index 8c6bdaaa..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-instant-transition.mjs","sources":["../../../src/utils/use-instant-transition.ts"],"sourcesContent":["\"use client\"\n\nimport { frame } from \"motion-dom\"\nimport { MotionGlobalConfig } from \"motion-utils\"\nimport { useEffect, useRef } from \"react\"\nimport { useInstantLayoutTransition } from \"../projection/use-instant-layout-transition\"\nimport { useForceUpdate } from \"./use-force-update\"\n\nexport function useInstantTransition() {\n const [forceUpdate, forcedRenderCount] = useForceUpdate()\n const startInstantLayoutTransition = useInstantLayoutTransition()\n const unlockOnFrameRef = useRef(-1)\n\n useEffect(() => {\n /**\n * Unblock after two animation frames, otherwise this will unblock too soon.\n */\n frame.postRender(() =>\n frame.postRender(() => {\n /**\n * If the callback has been called again after the effect\n * triggered this 2 frame delay, don't unblock animations. This\n * prevents the previous effect from unblocking the current\n * instant transition too soon. This becomes more likely when\n * used in conjunction with React.startTransition().\n */\n if (forcedRenderCount !== unlockOnFrameRef.current) return\n MotionGlobalConfig.instantAnimations = false\n })\n )\n }, [forcedRenderCount])\n\n return (callback: () => void) => {\n startInstantLayoutTransition(() => {\n MotionGlobalConfig.instantAnimations = true\n forceUpdate()\n callback()\n unlockOnFrameRef.current = forcedRenderCount + 1\n })\n }\n}\n\nexport function disableInstantTransitions() {\n MotionGlobalConfig.instantAnimations = false\n}\n"],"names":[],"mappings":";;;;;;;;;AAUI;AACA;;AAGI;;AAEG;;AAGK;;;;;;AAMG;AACH;;AACA;;AAGZ;;;AAIQ;AACA;AACA;AACA;AACJ;AACJ;AACJ;;AAGI;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs deleted file mode 100644 index 1ebefbe2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs +++ /dev/null @@ -1,17 +0,0 @@ -"use client"; -import { useRef } from 'react'; -import { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs'; - -function useIsMounted() { - const isMounted = useRef(false); - useIsomorphicLayoutEffect(() => { - isMounted.current = true; - return () => { - isMounted.current = false; - }; - }, []); - return isMounted; -} - -export { useIsMounted }; -//# sourceMappingURL=use-is-mounted.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs.map deleted file mode 100644 index 72e622c5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-is-mounted.mjs","sources":["../../../src/utils/use-is-mounted.ts"],"sourcesContent":["\"use client\"\n\nimport { useRef } from \"react\"\nimport { useIsomorphicLayoutEffect } from \"./use-isomorphic-effect\"\n\nexport function useIsMounted() {\n const isMounted = useRef(false)\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true\n\n return () => {\n isMounted.current = false\n }\n }, [])\n\n return isMounted\n}\n"],"names":[],"mappings":";;;;;AAMI;;AAEI;AAEA;AACI;AACJ;;AAGJ;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs deleted file mode 100644 index 704d9f68..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs +++ /dev/null @@ -1,8 +0,0 @@ -"use client"; -import { useLayoutEffect, useEffect } from 'react'; -import { isBrowser } from './is-browser.mjs'; - -const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect; - -export { useIsomorphicLayoutEffect }; -//# sourceMappingURL=use-isomorphic-effect.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs.map deleted file mode 100644 index 66035e5b..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-isomorphic-effect.mjs","sources":["../../../src/utils/use-isomorphic-effect.ts"],"sourcesContent":["\"use client\"\n\nimport { useEffect, useLayoutEffect } from \"react\"\nimport { isBrowser } from \"./is-browser\"\n\nexport const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect\n"],"names":[],"mappings":";;;;AAKO;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs deleted file mode 100644 index 5b19c981..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs +++ /dev/null @@ -1,15 +0,0 @@ -"use client"; -import { useInsertionEffect } from 'react'; - -function useMotionValueEvent(value, event, callback) { - /** - * useInsertionEffect will create subscriptions before any other - * effects will run. Effects run upwards through the tree so it - * can be that binding a useLayoutEffect higher up the tree can - * miss changes from lower down the tree. - */ - useInsertionEffect(() => value.on(event, callback), [value, event, callback]); -} - -export { useMotionValueEvent }; -//# sourceMappingURL=use-motion-value-event.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs.map deleted file mode 100644 index 07df7e41..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-motion-value-event.mjs","sources":["../../../src/utils/use-motion-value-event.ts"],"sourcesContent":["\"use client\"\n\nimport { MotionValue, MotionValueEventCallbacks } from \"motion-dom\"\nimport { useInsertionEffect } from \"react\"\n\nexport function useMotionValueEvent<\n V,\n EventName extends keyof MotionValueEventCallbacks\n>(\n value: MotionValue,\n event: EventName,\n callback: MotionValueEventCallbacks[EventName]\n) {\n /**\n * useInsertionEffect will create subscriptions before any other\n * effects will run. Effects run upwards through the tree so it\n * can be that binding a useLayoutEffect higher up the tree can\n * miss changes from lower down the tree.\n */\n useInsertionEffect(\n () => value.on(event, callback),\n [value, event, callback]\n )\n}\n"],"names":[],"mappings":";;;;AAaI;;;;;AAKG;;AAKP;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-page-in-view.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-page-in-view.mjs deleted file mode 100644 index a4c10547..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-page-in-view.mjs +++ /dev/null @@ -1,20 +0,0 @@ -"use client"; -import { useState, useEffect } from 'react'; - -function usePageInView() { - const [isInView, setIsInView] = useState(true); - useEffect(() => { - const handleVisibilityChange = () => setIsInView(!document.hidden); - if (document.hidden) { - handleVisibilityChange(); - } - document.addEventListener("visibilitychange", handleVisibilityChange); - return () => { - document.removeEventListener("visibilitychange", handleVisibilityChange); - }; - }, []); - return isInView; -} - -export { usePageInView }; -//# sourceMappingURL=use-page-in-view.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-page-in-view.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-page-in-view.mjs.map deleted file mode 100644 index 9a0dd0db..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-page-in-view.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-page-in-view.mjs","sources":["../../../src/utils/use-page-in-view.ts"],"sourcesContent":["\"use client\"\n\nimport { useEffect, useState } from \"react\"\n\nexport function usePageInView() {\n const [isInView, setIsInView] = useState(true)\n\n useEffect(() => {\n const handleVisibilityChange = () => setIsInView(!document.hidden)\n\n if (document.hidden) {\n handleVisibilityChange()\n }\n\n document.addEventListener(\"visibilitychange\", handleVisibilityChange)\n\n return () => {\n document.removeEventListener(\n \"visibilitychange\",\n handleVisibilityChange\n )\n }\n }, [])\n\n return isInView\n}\n"],"names":[],"mappings":";;;;;;AAQQ;AAEA;AACI;;AAGJ;AAEA;AACI;AAIJ;;AAGJ;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs deleted file mode 100644 index a4bd165f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs +++ /dev/null @@ -1,9 +0,0 @@ -"use client"; -import { useEffect } from 'react'; - -function useUnmountEffect(callback) { - return useEffect(() => () => callback(), []); -} - -export { useUnmountEffect }; -//# sourceMappingURL=use-unmount-effect.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs.map deleted file mode 100644 index eb242e9e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-unmount-effect.mjs","sources":["../../../src/utils/use-unmount-effect.ts"],"sourcesContent":["\"use client\"\n\nimport { useEffect } from \"react\"\n\nexport function useUnmountEffect(callback: () => void) {\n return useEffect(() => () => callback(), [])\n}\n"],"names":[],"mappings":";;;AAIM;AACF;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs deleted file mode 100644 index f108d60e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { warnOnce } from 'motion-utils'; -import { useScroll } from '../use-scroll.mjs'; - -/** - * @deprecated useElementScroll is deprecated. Convert to useScroll({ container: ref }) - */ -function useElementScroll(ref) { - if (process.env.NODE_ENV === "development") { - warnOnce(false, "useElementScroll is deprecated. Convert to useScroll({ container: ref })."); - } - return useScroll({ container: ref }); -} - -export { useElementScroll }; -//# sourceMappingURL=use-element-scroll.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs.map deleted file mode 100644 index 3375d133..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-element-scroll.mjs","sources":["../../../../src/value/scroll/use-element-scroll.ts"],"sourcesContent":["import { warnOnce } from \"motion-utils\"\nimport { RefObject } from \"react\"\nimport { useScroll } from \"../use-scroll\"\n\n/**\n * @deprecated useElementScroll is deprecated. Convert to useScroll({ container: ref })\n */\nexport function useElementScroll(ref: RefObject) {\n if (process.env.NODE_ENV === \"development\") {\n warnOnce(\n false,\n \"useElementScroll is deprecated. Convert to useScroll({ container: ref }).\"\n )\n }\n\n return useScroll({ container: ref })\n}\n"],"names":[],"mappings":";;;AAIA;;AAEG;AACG,SAAU,gBAAgB,CAAC,GAAkC,EAAA;IAC/D,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;AACxC,QAAA,QAAQ,CACJ,KAAK,EACL,2EAA2E,CAC9E;IACL;IAEA,OAAO,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;AACxC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs deleted file mode 100644 index 0c9dcbe9..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { warnOnce } from 'motion-utils'; -import { useScroll } from '../use-scroll.mjs'; - -/** - * @deprecated useViewportScroll is deprecated. Convert to useScroll() - */ -function useViewportScroll() { - if (process.env.NODE_ENV !== "production") { - warnOnce(false, "useViewportScroll is deprecated. Convert to useScroll()."); - } - return useScroll(); -} - -export { useViewportScroll }; -//# sourceMappingURL=use-viewport-scroll.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs.map deleted file mode 100644 index ea730e9e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-viewport-scroll.mjs","sources":["../../../../src/value/scroll/use-viewport-scroll.ts"],"sourcesContent":["import { warnOnce } from \"motion-utils\"\nimport { useScroll } from \"../use-scroll\"\n\n/**\n * @deprecated useViewportScroll is deprecated. Convert to useScroll()\n */\nexport function useViewportScroll() {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n false,\n \"useViewportScroll is deprecated. Convert to useScroll().\"\n )\n }\n return useScroll()\n}\n"],"names":[],"mappings":";;;AAGA;;AAEG;SACa,iBAAiB,GAAA;IAC7B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;AACvC,QAAA,QAAQ,CACJ,KAAK,EACL,0DAA0D,CAC7D;IACL;IACA,OAAO,SAAS,EAAE;AACtB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-combine-values.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-combine-values.mjs deleted file mode 100644 index fc34d544..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-combine-values.mjs +++ /dev/null @@ -1,39 +0,0 @@ -"use client"; -import { cancelFrame, frame } from 'motion-dom'; -import { useIsomorphicLayoutEffect } from '../utils/use-isomorphic-effect.mjs'; -import { useMotionValue } from './use-motion-value.mjs'; - -function useCombineMotionValues(values, combineValues) { - /** - * Initialise the returned motion value. This remains the same between renders. - */ - const value = useMotionValue(combineValues()); - /** - * Create a function that will update the template motion value with the latest values. - * This is pre-bound so whenever a motion value updates it can schedule its - * execution in Framesync. If it's already been scheduled it won't be fired twice - * in a single frame. - */ - const updateValue = () => value.set(combineValues()); - /** - * Synchronously update the motion value with the latest values during the render. - * This ensures that within a React render, the styles applied to the DOM are up-to-date. - */ - updateValue(); - /** - * Subscribe to all motion values found within the template. Whenever any of them change, - * schedule an update. - */ - useIsomorphicLayoutEffect(() => { - const scheduleUpdate = () => frame.preRender(updateValue, false, true); - const subscriptions = values.map((v) => v.on("change", scheduleUpdate)); - return () => { - subscriptions.forEach((unsubscribe) => unsubscribe()); - cancelFrame(updateValue); - }; - }); - return value; -} - -export { useCombineMotionValues }; -//# sourceMappingURL=use-combine-values.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-combine-values.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-combine-values.mjs.map deleted file mode 100644 index fbcd3a3c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-combine-values.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-combine-values.mjs","sources":["../../../src/value/use-combine-values.ts"],"sourcesContent":["\"use client\"\n\nimport { cancelFrame, frame, MotionValue } from \"motion-dom\"\nimport { useIsomorphicLayoutEffect } from \"../utils/use-isomorphic-effect\"\nimport { useMotionValue } from \"./use-motion-value\"\n\nexport function useCombineMotionValues(\n values: MotionValue[],\n combineValues: () => R\n) {\n /**\n * Initialise the returned motion value. This remains the same between renders.\n */\n const value = useMotionValue(combineValues())\n\n /**\n * Create a function that will update the template motion value with the latest values.\n * This is pre-bound so whenever a motion value updates it can schedule its\n * execution in Framesync. If it's already been scheduled it won't be fired twice\n * in a single frame.\n */\n const updateValue = () => value.set(combineValues())\n\n /**\n * Synchronously update the motion value with the latest values during the render.\n * This ensures that within a React render, the styles applied to the DOM are up-to-date.\n */\n updateValue()\n\n /**\n * Subscribe to all motion values found within the template. Whenever any of them change,\n * schedule an update.\n */\n useIsomorphicLayoutEffect(() => {\n const scheduleUpdate = () => frame.preRender(updateValue, false, true)\n const subscriptions = values.map((v) => v.on(\"change\", scheduleUpdate))\n\n return () => {\n subscriptions.forEach((unsubscribe) => unsubscribe())\n cancelFrame(updateValue)\n }\n })\n\n return value\n}\n"],"names":[],"mappings":";;;;;AAMM;AAIF;;AAEG;AACH;AAEA;;;;;AAKG;AACH;AAEA;;;AAGG;AACH;AAEA;;;AAGG;;AAEC;;AAGA;;;AAGA;AACJ;AAEA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-computed.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-computed.mjs deleted file mode 100644 index 1e85b4ee..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-computed.mjs +++ /dev/null @@ -1,21 +0,0 @@ -"use client"; -import { collectMotionValues } from 'motion-dom'; -import { useCombineMotionValues } from './use-combine-values.mjs'; - -function useComputed(compute) { - /** - * Open session of collectMotionValues. Any MotionValue that calls get() - * will be saved into this array. - */ - collectMotionValues.current = []; - compute(); - const value = useCombineMotionValues(collectMotionValues.current, compute); - /** - * Synchronously close session of collectMotionValues. - */ - collectMotionValues.current = undefined; - return value; -} - -export { useComputed }; -//# sourceMappingURL=use-computed.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-computed.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-computed.mjs.map deleted file mode 100644 index f8ada626..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-computed.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-computed.mjs","sources":["../../../src/value/use-computed.ts"],"sourcesContent":["\"use client\"\n\nimport { collectMotionValues, type MotionValue } from \"motion-dom\"\nimport { useCombineMotionValues } from \"./use-combine-values\"\n\nexport function useComputed(compute: () => O): MotionValue {\n /**\n * Open session of collectMotionValues. Any MotionValue that calls get()\n * will be saved into this array.\n */\n collectMotionValues.current = []\n\n compute()\n\n const value = useCombineMotionValues(collectMotionValues.current, compute)\n\n /**\n * Synchronously close session of collectMotionValues.\n */\n collectMotionValues.current = undefined\n\n return value\n}\n"],"names":[],"mappings":";;;;AAKM;AACF;;;AAGG;AACH;AAEA;;AAIA;;AAEG;AACH;AAEA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-follow-value.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-follow-value.mjs deleted file mode 100644 index 29cb0d24..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-follow-value.mjs +++ /dev/null @@ -1,23 +0,0 @@ -"use client"; -import { attachFollow, isMotionValue } from 'motion-dom'; -import { useContext, useInsertionEffect } from 'react'; -import { MotionConfigContext } from '../context/MotionConfigContext.mjs'; -import { useMotionValue } from './use-motion-value.mjs'; -import { useTransform } from './use-transform.mjs'; - -function useFollowValue(source, options = {}) { - const { isStatic } = useContext(MotionConfigContext); - const getFromSource = () => (isMotionValue(source) ? source.get() : source); - // isStatic will never change, allowing early hooks return - if (isStatic) { - return useTransform(getFromSource); - } - const value = useMotionValue(getFromSource()); - useInsertionEffect(() => { - return attachFollow(value, source, options); - }, [value, JSON.stringify(options)]); - return value; -} - -export { useFollowValue }; -//# sourceMappingURL=use-follow-value.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-follow-value.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-follow-value.mjs.map deleted file mode 100644 index bb1ef6cc..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-follow-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-follow-value.mjs","sources":["../../../src/value/use-follow-value.ts"],"sourcesContent":["\"use client\"\n\nimport {\n AnyResolvedKeyframe,\n attachFollow,\n FollowValueOptions,\n isMotionValue,\n MotionValue,\n} from \"motion-dom\"\nimport { useContext, useInsertionEffect } from \"react\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\nimport { useMotionValue } from \"./use-motion-value\"\nimport { useTransform } from \"./use-transform\"\n\n/**\n * Creates a `MotionValue` that, when `set`, will use the specified animation transition to animate to its new state.\n *\n * Unlike `useSpring` which is limited to spring animations, `useFollowValue` accepts any motion transition\n * including spring, tween, inertia, and keyframes.\n *\n * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber\n * to another `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * // Spring animation (default)\n * const x = useFollowValue(0, { stiffness: 300 })\n *\n * // Tween animation\n * const y = useFollowValue(0, { type: \"tween\", duration: 0.5, ease: \"easeOut\" })\n *\n * // Track another MotionValue with spring\n * const source = useMotionValue(0)\n * const z = useFollowValue(source, { type: \"spring\", damping: 10 })\n *\n * // Inertia animation\n * const w = useFollowValue(0, { type: \"inertia\", velocity: 100 })\n * ```\n *\n * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will animate towards that value using the specified transition.\n * @param options - Animation transition options. Supports all transition types: spring, tween, inertia, keyframes.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useFollowValue(\n source: MotionValue,\n options?: FollowValueOptions\n): MotionValue\nexport function useFollowValue(\n source: string,\n options?: FollowValueOptions\n): MotionValue\nexport function useFollowValue(\n source: MotionValue,\n options?: FollowValueOptions\n): MotionValue\nexport function useFollowValue(\n source: number,\n options?: FollowValueOptions\n): MotionValue\nexport function useFollowValue(\n source: MotionValue | MotionValue | AnyResolvedKeyframe,\n options: FollowValueOptions = {}\n) {\n const { isStatic } = useContext(MotionConfigContext)\n const getFromSource = () => (isMotionValue(source) ? source.get() : source)\n\n // isStatic will never change, allowing early hooks return\n if (isStatic) {\n return useTransform(getFromSource)\n }\n\n const value = useMotionValue(getFromSource())\n\n useInsertionEffect(() => {\n return attachFollow(value, source, options)\n }, [value, JSON.stringify(options)])\n\n return value\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAuEQ;;AAGJ;;;AAIA;AAEA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs deleted file mode 100644 index 347d4199..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs +++ /dev/null @@ -1,54 +0,0 @@ -"use client"; -import { invariant, warning } from 'motion-utils'; -import { useContext } from 'react'; -import { MotionContext } from '../context/MotionContext/index.mjs'; -import { useMotionValue } from './use-motion-value.mjs'; -import { useTransform } from './use-transform.mjs'; - -// Keep things reasonable and avoid scale: Infinity. In practise we might need -// to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1] -// to simply hide content at unreasonable scales. -const maxScale = 100000; -const invertScale = (scale) => scale > 0.001 ? 1 / scale : maxScale; -let hasWarned = false; -/** - * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse - * of their respective parent scales. - * - * This is useful for undoing the distortion of content when scaling a parent component. - * - * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent. - * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output - * of those instead. - * - * ```jsx - * const MyComponent = () => { - * const { scaleX, scaleY } = useInvertedScale() - * return - * } - * ``` - * - * @deprecated - */ -function useInvertedScale(scale) { - let parentScaleX = useMotionValue(1); - let parentScaleY = useMotionValue(1); - const { visualElement } = useContext(MotionContext); - invariant(!!(scale || visualElement), "If no scale values are provided, useInvertedScale must be used within a child of another motion component."); - warning(hasWarned, "useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."); - hasWarned = true; - if (scale) { - parentScaleX = scale.scaleX || parentScaleX; - parentScaleY = scale.scaleY || parentScaleY; - } - else if (visualElement) { - parentScaleX = visualElement.getValue("scaleX", 1); - parentScaleY = visualElement.getValue("scaleY", 1); - } - const scaleX = useTransform(parentScaleX, invertScale); - const scaleY = useTransform(parentScaleY, invertScale); - return { scaleX, scaleY }; -} - -export { invertScale, useInvertedScale }; -//# sourceMappingURL=use-inverted-scale.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs.map deleted file mode 100644 index b9ef57be..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-inverted-scale.mjs","sources":["../../../src/value/use-inverted-scale.ts"],"sourcesContent":["\"use client\"\n\nimport { MotionValue } from \"motion-dom\"\nimport { invariant, warning } from \"motion-utils\"\nimport { useContext } from \"react\"\nimport { MotionContext } from \"../context/MotionContext\"\nimport { useMotionValue } from \"./use-motion-value\"\nimport { useTransform } from \"./use-transform\"\n\ninterface ScaleMotionValues {\n scaleX: MotionValue\n scaleY: MotionValue\n}\n\n// Keep things reasonable and avoid scale: Infinity. In practise we might need\n// to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1]\n// to simply hide content at unreasonable scales.\nconst maxScale = 100000\nexport const invertScale = (scale: number) =>\n scale > 0.001 ? 1 / scale : maxScale\n\nlet hasWarned = false\n\n/**\n * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse\n * of their respective parent scales.\n *\n * This is useful for undoing the distortion of content when scaling a parent component.\n *\n * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent.\n * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output\n * of those instead.\n *\n * ```jsx\n * const MyComponent = () => {\n * const { scaleX, scaleY } = useInvertedScale()\n * return \n * }\n * ```\n *\n * @deprecated\n */\nexport function useInvertedScale(\n scale?: Partial\n): ScaleMotionValues {\n let parentScaleX = useMotionValue(1)\n let parentScaleY = useMotionValue(1)\n const { visualElement } = useContext(MotionContext)\n\n invariant(\n !!(scale || visualElement),\n \"If no scale values are provided, useInvertedScale must be used within a child of another motion component.\"\n )\n\n warning(\n hasWarned,\n \"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead.\"\n )\n\n hasWarned = true\n\n if (scale) {\n parentScaleX = scale.scaleX || parentScaleX\n parentScaleY = scale.scaleY || parentScaleY\n } else if (visualElement) {\n parentScaleX = visualElement.getValue(\"scaleX\", 1)\n parentScaleY = visualElement.getValue(\"scaleY\", 1)\n }\n\n const scaleX = useTransform(parentScaleX, invertScale)\n const scaleY = useTransform(parentScaleY, invertScale)\n\n return { scaleX, scaleY }\n}\n"],"names":[],"mappings":";;;;;;;AAcA;AACA;AACA;AACA;;AAIA;AAEA;;;;;;;;;;;;;;;;;;AAkBG;AACG;AAGF;AACA;;;AAQA;;;AAQI;AACA;;;;;;;;AASJ;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-template.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-template.mjs deleted file mode 100644 index 9654b0d2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-template.mjs +++ /dev/null @@ -1,47 +0,0 @@ -"use client"; -import { isMotionValue } from 'motion-dom'; -import { useCombineMotionValues } from './use-combine-values.mjs'; - -/** - * Combine multiple motion values into a new one using a string template literal. - * - * ```jsx - * import { - * motion, - * useSpring, - * useMotionValue, - * useMotionTemplate - * } from "framer-motion" - * - * function Component() { - * const shadowX = useSpring(0) - * const shadowY = useMotionValue(0) - * const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))` - * - * return - * } - * ``` - * - * @public - */ -function useMotionTemplate(fragments, ...values) { - /** - * Create a function that will build a string from the latest motion values. - */ - const numFragments = fragments.length; - function buildValue() { - let output = ``; - for (let i = 0; i < numFragments; i++) { - output += fragments[i]; - const value = values[i]; - if (value) { - output += isMotionValue(value) ? value.get() : value; - } - } - return output; - } - return useCombineMotionValues(values.filter(isMotionValue), buildValue); -} - -export { useMotionTemplate }; -//# sourceMappingURL=use-motion-template.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-template.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-template.mjs.map deleted file mode 100644 index ebd693d6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-template.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-motion-template.mjs","sources":["../../../src/value/use-motion-template.ts"],"sourcesContent":["\"use client\"\n\nimport { isMotionValue, MotionValue } from \"motion-dom\"\nimport { useCombineMotionValues } from \"./use-combine-values\"\n\n/**\n * Combine multiple motion values into a new one using a string template literal.\n *\n * ```jsx\n * import {\n * motion,\n * useSpring,\n * useMotionValue,\n * useMotionTemplate\n * } from \"framer-motion\"\n *\n * function Component() {\n * const shadowX = useSpring(0)\n * const shadowY = useMotionValue(0)\n * const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))`\n *\n * return \n * }\n * ```\n *\n * @public\n */\nexport function useMotionTemplate(\n fragments: TemplateStringsArray,\n ...values: Array\n) {\n /**\n * Create a function that will build a string from the latest motion values.\n */\n const numFragments = fragments.length\n\n function buildValue() {\n let output = ``\n\n for (let i = 0; i < numFragments; i++) {\n output += fragments[i]\n const value = values[i]\n if (value) {\n output += isMotionValue(value) ? value.get() : value\n }\n }\n\n return output\n }\n\n return useCombineMotionValues(values.filter(isMotionValue), buildValue)\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;;;;;;AAqBG;;AAKC;;AAEG;AACH;AAEA;;AAGI;AACI;AACA;;AAEI;;;AAIR;;;AAIR;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-value.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-value.mjs deleted file mode 100644 index 119b29e7..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-value.mjs +++ /dev/null @@ -1,40 +0,0 @@ -"use client"; -import { motionValue } from 'motion-dom'; -import { useContext, useState, useEffect } from 'react'; -import { MotionConfigContext } from '../context/MotionConfigContext.mjs'; -import { useConstant } from '../utils/use-constant.mjs'; - -/** - * Creates a `MotionValue` to track the state and velocity of a value. - * - * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop. - * - * ```jsx - * export const MyComponent = () => { - * const scale = useMotionValue(1) - * - * return - * } - * ``` - * - * @param initial - The initial state. - * - * @public - */ -function useMotionValue(initial) { - const value = useConstant(() => motionValue(initial)); - /** - * If this motion value is being used in static mode, like on - * the Framer canvas, force components to rerender when the motion - * value is updated. - */ - const { isStatic } = useContext(MotionConfigContext); - if (isStatic) { - const [, setLatest] = useState(initial); - useEffect(() => value.on("change", setLatest), []); - } - return value; -} - -export { useMotionValue }; -//# sourceMappingURL=use-motion-value.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-value.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-value.mjs.map deleted file mode 100644 index 8dcf9a5f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-motion-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-motion-value.mjs","sources":["../../../src/value/use-motion-value.ts"],"sourcesContent":["\"use client\"\n\nimport { motionValue, MotionValue } from \"motion-dom\"\nimport { useContext, useEffect, useState } from \"react\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\nimport { useConstant } from \"../utils/use-constant\"\n\n/**\n * Creates a `MotionValue` to track the state and velocity of a value.\n *\n * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const scale = useMotionValue(1)\n *\n * return \n * }\n * ```\n *\n * @param initial - The initial state.\n *\n * @public\n */\nexport function useMotionValue(initial: T): MotionValue {\n const value = useConstant(() => motionValue(initial))\n\n /**\n * If this motion value is being used in static mode, like on\n * the Framer canvas, force components to rerender when the motion\n * value is updated.\n */\n const { isStatic } = useContext(MotionConfigContext)\n if (isStatic) {\n const [, setLatest] = useState(initial)\n useEffect(() => value.on(\"change\", setLatest), [])\n }\n\n return value\n}\n"],"names":[],"mappings":";;;;;;AAOA;;;;;;;;;;;;;;;;AAgBG;AACG;AACF;AAEA;;;;AAIG;;;;AAIC;;AAGJ;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-scroll.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-scroll.mjs deleted file mode 100644 index 9b2fdcc2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-scroll.mjs +++ /dev/null @@ -1,119 +0,0 @@ -"use client"; -import { microtask, cancelMicrotask, supportsViewTimeline, supportsScrollTimeline, motionValue } from 'motion-dom'; -import { invariant } from 'motion-utils'; -import { useRef, useCallback, useEffect } from 'react'; -import { scroll } from '../render/dom/scroll/index.mjs'; -import { offsetToViewTimelineRange } from '../render/dom/scroll/utils/offset-to-range.mjs'; -import { useConstant } from '../utils/use-constant.mjs'; -import { useIsomorphicLayoutEffect } from '../utils/use-isomorphic-effect.mjs'; - -const createScrollMotionValues = () => ({ - scrollX: motionValue(0), - scrollY: motionValue(0), - scrollXProgress: motionValue(0), - scrollYProgress: motionValue(0), -}); -const isRefPending = (ref) => { - if (!ref) - return false; - return !ref.current; -}; -function makeAccelerateConfig(axis, options, container, target) { - return { - // Refs attach child-first; defer so target.current is populated - // before scroll() reads it. - factory: (animation) => { - let cleanup; - const start = () => { - // A provided ref may be hydrated by an effect declared after - // useScroll (or in a parent). Don't attach to the window - // scroll in the meantime — that result gets cached and would - // permanently mistrack. Wait until the ref resolves. - if (isRefPending(container) || isRefPending(target)) { - microtask.read(start); - return; - } - cleanup = scroll(animation, { - ...options, - axis, - container: container?.current || undefined, - target: target?.current || undefined, - }); - }; - microtask.read(start); - return () => { - cancelMicrotask(start); - cleanup?.(); - }; - }, - times: [0, 1], - keyframes: [0, 1], - ease: (v) => v, - duration: 1, - }; -} -function canAccelerateScroll(target, offset) { - if (typeof window === "undefined") - return false; - return target - ? supportsViewTimeline() && !!offsetToViewTimelineRange(offset) - : supportsScrollTimeline(); -} -function useScroll({ container, target, ...options } = {}) { - const values = useConstant(createScrollMotionValues); - if (canAccelerateScroll(target, options.offset)) { - values.scrollXProgress.accelerate = makeAccelerateConfig("x", options, container, target); - values.scrollYProgress.accelerate = makeAccelerateConfig("y", options, container, target); - } - const scrollAnimation = useRef(null); - const needsStart = useRef(false); - const start = useCallback(() => { - scrollAnimation.current = scroll((_progress, { x, y, }) => { - values.scrollX.set(x.current); - values.scrollXProgress.set(x.progress); - values.scrollY.set(y.current); - values.scrollYProgress.set(y.progress); - }, { - ...options, - container: container?.current || undefined, - target: target?.current || undefined, - }); - return () => { - scrollAnimation.current?.(); - }; - }, [container, target, JSON.stringify(options.offset)]); - useIsomorphicLayoutEffect(() => { - needsStart.current = false; - if (isRefPending(container) || isRefPending(target)) { - needsStart.current = true; - return; - } - else { - return start(); - } - }, [start]); - useEffect(() => { - if (!needsStart.current) - return; - // Defer to a microtask so any sibling/parent effect that hydrates the - // ref has a chance to run first. - let cleanup; - const tryStart = () => { - const containerPending = isRefPending(container); - const targetPending = isRefPending(target); - invariant(!containerPending, "Container ref is defined but not hydrated", "use-scroll-ref"); - invariant(!targetPending, "Target ref is defined but not hydrated", "use-scroll-ref"); - if (!containerPending && !targetPending) - cleanup = start(); - }; - microtask.read(tryStart); - return () => { - cancelMicrotask(tryStart); - cleanup?.(); - }; - }, [start]); - return values; -} - -export { useScroll }; -//# sourceMappingURL=use-scroll.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-scroll.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-scroll.mjs.map deleted file mode 100644 index d726410d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-scroll.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-scroll.mjs","sources":["../../../src/value/use-scroll.ts"],"sourcesContent":["\"use client\"\n\nimport {\n AnimationPlaybackControls,\n cancelMicrotask,\n microtask,\n motionValue,\n supportsScrollTimeline,\n supportsViewTimeline,\n} from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\nimport { RefObject, useCallback, useEffect, useRef } from \"react\"\nimport { scroll } from \"../render/dom/scroll\"\nimport { ScrollInfoOptions } from \"../render/dom/scroll/types\"\nimport { offsetToViewTimelineRange } from \"../render/dom/scroll/utils/offset-to-range\"\nimport { useConstant } from \"../utils/use-constant\"\nimport { useIsomorphicLayoutEffect } from \"../utils/use-isomorphic-effect\"\n\nexport interface UseScrollOptions\n extends Omit {\n container?: RefObject\n target?: RefObject\n}\n\nconst createScrollMotionValues = () => ({\n scrollX: motionValue(0),\n scrollY: motionValue(0),\n scrollXProgress: motionValue(0),\n scrollYProgress: motionValue(0),\n})\n\nconst isRefPending = (ref?: RefObject) => {\n if (!ref) return false\n return !ref.current\n}\n\nfunction makeAccelerateConfig(\n axis: \"x\" | \"y\",\n options: Omit,\n container?: RefObject,\n target?: RefObject\n) {\n return {\n // Refs attach child-first; defer so target.current is populated\n // before scroll() reads it.\n factory: (animation: AnimationPlaybackControls) => {\n let cleanup: VoidFunction | undefined\n const start = () => {\n // A provided ref may be hydrated by an effect declared after\n // useScroll (or in a parent). Don't attach to the window\n // scroll in the meantime — that result gets cached and would\n // permanently mistrack. Wait until the ref resolves.\n if (isRefPending(container) || isRefPending(target)) {\n microtask.read(start)\n return\n }\n cleanup = scroll(animation, {\n ...options,\n axis,\n container: container?.current || undefined,\n target: target?.current || undefined,\n })\n }\n microtask.read(start)\n return () => {\n cancelMicrotask(start)\n cleanup?.()\n }\n },\n times: [0, 1],\n keyframes: [0, 1],\n ease: (v: number) => v,\n duration: 1,\n }\n}\n\nfunction canAccelerateScroll(\n target?: RefObject,\n offset?: ScrollInfoOptions[\"offset\"]\n) {\n if (typeof window === \"undefined\") return false\n return target\n ? supportsViewTimeline() && !!offsetToViewTimelineRange(offset)\n : supportsScrollTimeline()\n}\n\nexport function useScroll({\n container,\n target,\n ...options\n}: UseScrollOptions = {}) {\n const values = useConstant(createScrollMotionValues)\n\n if (canAccelerateScroll(target, options.offset)) {\n values.scrollXProgress.accelerate = makeAccelerateConfig(\n \"x\",\n options,\n container,\n target\n )\n values.scrollYProgress.accelerate = makeAccelerateConfig(\n \"y\",\n options,\n container,\n target\n )\n }\n\n const scrollAnimation = useRef(null)\n const needsStart = useRef(false)\n\n const start = useCallback(() => {\n scrollAnimation.current = scroll(\n (\n _progress: number,\n {\n x,\n y,\n }: {\n x: { current: number; progress: number }\n y: { current: number; progress: number }\n }\n ) => {\n values.scrollX.set(x.current)\n values.scrollXProgress.set(x.progress)\n values.scrollY.set(y.current)\n values.scrollYProgress.set(y.progress)\n },\n {\n ...options,\n container: container?.current || undefined,\n target: target?.current || undefined,\n }\n )\n\n return () => {\n scrollAnimation.current?.()\n }\n }, [container, target, JSON.stringify(options.offset)])\n\n useIsomorphicLayoutEffect(() => {\n needsStart.current = false\n\n if (isRefPending(container) || isRefPending(target)) {\n needsStart.current = true\n return\n } else {\n return start()\n }\n }, [start])\n\n useEffect(() => {\n if (!needsStart.current) return\n\n // Defer to a microtask so any sibling/parent effect that hydrates the\n // ref has a chance to run first.\n let cleanup: VoidFunction | undefined\n const tryStart = () => {\n const containerPending = isRefPending(container)\n const targetPending = isRefPending(target)\n invariant(\n !containerPending,\n \"Container ref is defined but not hydrated\",\n \"use-scroll-ref\"\n )\n invariant(\n !targetPending,\n \"Target ref is defined but not hydrated\",\n \"use-scroll-ref\"\n )\n if (!containerPending && !targetPending) cleanup = start()\n }\n microtask.read(tryStart)\n\n return () => {\n cancelMicrotask(tryStart)\n cleanup?.()\n }\n }, [start])\n\n return values\n}\n"],"names":[],"mappings":";;;;;;;;;AAwBA;AACI;AACA;AACA;AACA;AACH;AAED;AACI;AAAU;AACV;AACJ;AAEA;;;;AASQ;AACI;;;;;;;AAOQ;;;AAGJ;AACI;;AAEA;AACA;AACH;AACL;AACA;AACA;;;AAGA;;AAEJ;AACA;AACA;AACA;;AAER;AAEA;;AAIuC;AACnC;;;AAGJ;AAEM;AAKF;;AAGI;AAMA;;AAQJ;AACA;AAEA;AACI;;;;;AAeI;AAEI;AACA;AACA;AACH;AAGL;AACI;AACJ;AACJ;;AAGI;;AAGI;;;;;;AAKR;;;;;;AAOI;;AAEI;AACA;;;AAWA;;AACJ;AACA;AAEA;;;AAGA;AACJ;AAEA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-spring.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-spring.mjs deleted file mode 100644 index 225081a1..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-spring.mjs +++ /dev/null @@ -1,9 +0,0 @@ -"use client"; -import { useFollowValue } from './use-follow-value.mjs'; - -function useSpring(source, options = {}) { - return useFollowValue(source, { type: "spring", ...options }); -} - -export { useSpring }; -//# sourceMappingURL=use-spring.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-spring.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-spring.mjs.map deleted file mode 100644 index d96672dc..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-spring.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-spring.mjs","sources":["../../../src/value/use-spring.ts"],"sourcesContent":["\"use client\"\n\nimport { FollowValueOptions, MotionValue, SpringOptions } from \"motion-dom\"\nimport { useFollowValue } from \"./use-follow-value\"\n\ntype UseSpringOptions = SpringOptions &\n Pick\n\n/**\n * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.\n *\n * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber\n * to another `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useSpring(0, { stiffness: 300 })\n * const y = useSpring(x, { damping: 10 })\n * ```\n *\n * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value.\n * @param springConfig - Configuration options for the spring.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useSpring(\n source: MotionValue,\n options?: UseSpringOptions\n): MotionValue\nexport function useSpring(\n source: string,\n options?: UseSpringOptions\n): MotionValue\nexport function useSpring(\n source: MotionValue,\n options?: UseSpringOptions\n): MotionValue\nexport function useSpring(\n source: number,\n options?: UseSpringOptions\n): MotionValue\nexport function useSpring(\n source: MotionValue | MotionValue | string | number,\n options: UseSpringOptions = {}\n): MotionValue | MotionValue {\n return useFollowValue(source as any, { type: \"spring\", ...options })\n}\n"],"names":[],"mappings":";;;;AA+CI;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-time.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-time.mjs deleted file mode 100644 index 74ec85a2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-time.mjs +++ /dev/null @@ -1,12 +0,0 @@ -"use client"; -import { useAnimationFrame } from '../utils/use-animation-frame.mjs'; -import { useMotionValue } from './use-motion-value.mjs'; - -function useTime() { - const time = useMotionValue(0); - useAnimationFrame((t) => time.set(t)); - return time; -} - -export { useTime }; -//# sourceMappingURL=use-time.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-time.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-time.mjs.map deleted file mode 100644 index c733bbaa..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-time.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-time.mjs","sources":["../../../src/value/use-time.ts"],"sourcesContent":["\"use client\"\n\nimport { useAnimationFrame } from \"../utils/use-animation-frame\"\nimport { useMotionValue } from \"./use-motion-value\"\n\nexport function useTime() {\n const time = useMotionValue(0)\n useAnimationFrame((t) => time.set(t))\n return time\n}\n"],"names":[],"mappings":";;;;;AAMI;AACA;AACA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-transform.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-transform.mjs deleted file mode 100644 index 156168eb..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-transform.mjs +++ /dev/null @@ -1,70 +0,0 @@ -"use client"; -import { transform } from 'motion-dom'; -import { useConstant } from '../utils/use-constant.mjs'; -import { useCombineMotionValues } from './use-combine-values.mjs'; -import { useComputed } from './use-computed.mjs'; - -function useTransform(input, inputRangeOrTransformer, outputRangeOrMap, options) { - if (typeof input === "function") { - return useComputed(input); - } - /** - * Detect if outputRangeOrMap is an output map (object with keys) - * rather than an output range (array). - */ - const isOutputMap = outputRangeOrMap !== undefined && - !Array.isArray(outputRangeOrMap) && - typeof inputRangeOrTransformer !== "function"; - if (isOutputMap) { - return useMapTransform(input, inputRangeOrTransformer, outputRangeOrMap, options); - } - const outputRange = outputRangeOrMap; - const transformer = typeof inputRangeOrTransformer === "function" - ? inputRangeOrTransformer - : transform(inputRangeOrTransformer, outputRange, options); - const result = Array.isArray(input) - ? useListTransform(input, transformer) - : useListTransform([input], ([latest]) => transformer(latest)); - const inputAccelerate = !Array.isArray(input) - ? input.accelerate - : undefined; - if (inputAccelerate && - !inputAccelerate.isTransformed && - typeof inputRangeOrTransformer !== "function" && - Array.isArray(outputRangeOrMap) && - options?.clamp !== false) { - result.accelerate = { - ...inputAccelerate, - times: inputRangeOrTransformer, - keyframes: outputRangeOrMap, - isTransformed: true, - ...(options?.ease ? { ease: options.ease } : {}), - }; - } - return result; -} -function useListTransform(values, transformer) { - const latest = useConstant(() => []); - return useCombineMotionValues(values, () => { - latest.length = 0; - const numValues = values.length; - for (let i = 0; i < numValues; i++) { - latest[i] = values[i].get(); - } - return transformer(latest); - }); -} -function useMapTransform(inputValue, inputRange, outputMap, options) { - /** - * Capture keys once to ensure hooks are called in consistent order. - */ - const keys = useConstant(() => Object.keys(outputMap)); - const output = useConstant(() => ({})); - for (const key of keys) { - output[key] = useTransform(inputValue, inputRange, outputMap[key], options); - } - return output; -} - -export { useTransform }; -//# sourceMappingURL=use-transform.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-transform.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-transform.mjs.map deleted file mode 100644 index bec93641..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-transform.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-transform.mjs","sources":["../../../src/value/use-transform.ts"],"sourcesContent":["\"use client\"\n\nimport {\n AnyResolvedKeyframe,\n MotionValue,\n transform,\n TransformOptions,\n} from \"motion-dom\"\nimport { useConstant } from \"../utils/use-constant\"\nimport { useCombineMotionValues } from \"./use-combine-values\"\nimport { useComputed } from \"./use-computed\"\n\nexport type InputRange = number[]\ntype SingleTransformer = (input: I) => O\ntype MultiTransformer = (input: I[]) => O\ntype Transformer =\n | SingleTransformer\n /**\n * Ideally, this would be typed in all instances, but to type this\n * more accurately requires the tuple support in TypeScript 4:\n * https://gist.github.com/InventingWithMonster/c4d23752a0fae7888596c4ff6d92733a\n */\n | MultiTransformer\n\ninterface OutputMap {\n [key: string]: O[]\n}\n\n/**\n * Create multiple `MotionValue`s that transform the output of another `MotionValue` by mapping it from one range of values into multiple output ranges.\n *\n * @remarks\n *\n * This is useful when you want to derive multiple values from a single input value.\n * The keys of the output map must remain constant across renders.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const { opacity, scale } = useTransform(x, [0, 100], {\n * opacity: [0, 1],\n * scale: [0.5, 1]\n * })\n *\n * return (\n * \n * )\n * }\n * ```\n *\n * @param inputValue - `MotionValue`\n * @param inputRange - A linear series of numbers (either all increasing or decreasing)\n * @param outputMap - An object where keys map to output ranges. Each output range must be the same length as `inputRange`.\n * @param options - Transform options applied to all outputs\n *\n * @returns An object with the same keys as `outputMap`, where each value is a `MotionValue`\n *\n * @public\n */\nexport function useTransform>(\n inputValue: MotionValue,\n inputRange: InputRange,\n outputMap: T,\n options?: TransformOptions\n): { [K in keyof T]: MotionValue }\n\n/**\n * Create a `MotionValue` that transforms the output of another `MotionValue` by mapping it from one range of values into another.\n *\n * @remarks\n *\n * Given an input range of `[-200, -100, 100, 200]` and an output range of\n * `[0, 1, 1, 0]`, the returned `MotionValue` will:\n *\n * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`.\n * - When provided a value between `-100` and `100`, will return `1`.\n * - When provided a value between `100` and `200`, will return a value between `1` and `0`\n *\n *\n * The input range must be a linear series of numbers. The output range\n * can be any value type supported by Motion: numbers, colors, shadows, etc.\n *\n * Every value in the output range must be of the same type and in the same format.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const xRange = [-200, -100, 100, 200]\n * const opacityRange = [0, 1, 1, 0]\n * const opacity = useTransform(x, xRange, opacityRange)\n *\n * return (\n * \n * )\n * }\n * ```\n *\n * @param inputValue - `MotionValue`\n * @param inputRange - A linear series of numbers (either all increasing or decreasing)\n * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`.\n * @param options -\n *\n * - clamp: boolean. Clamp values to within the given range. Defaults to `true`\n * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each.\n *\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useTransform(\n value: MotionValue,\n inputRange: InputRange,\n outputRange: O[],\n options?: TransformOptions\n): MotionValue\n\n/**\n * Create a `MotionValue` that transforms the output of another `MotionValue` through a function.\n * In this example, `y` will always be double `x`.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(10)\n * const y = useTransform(x, value => value * 2)\n *\n * return \n * }\n * ```\n *\n * @param input - A `MotionValue` that will pass its latest value through `transform` to update the returned `MotionValue`.\n * @param transform - A function that accepts the latest value from `input` and returns a new value.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useTransform(\n input: MotionValue,\n transformer: SingleTransformer\n): MotionValue\n\n/**\n * Pass an array of `MotionValue`s and a function to combine them. In this example, `z` will be the `x` multiplied by `y`.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const z = useTransform([x, y], ([latestX, latestY]) => latestX * latestY)\n *\n * return \n * }\n * ```\n *\n * @param input - An array of `MotionValue`s that will pass their latest values through `transform` to update the returned `MotionValue`.\n * @param transform - A function that accepts the latest values from `input` and returns a new value.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useTransform(\n input:\n | MotionValue[]\n | MotionValue[]\n | MotionValue[],\n transformer: MultiTransformer\n): MotionValue\nexport function useTransform(transformer: () => O): MotionValue\n\nexport function useTransform(\n input:\n | MotionValue\n | MotionValue[]\n | MotionValue[]\n | MotionValue[]\n | (() => O),\n inputRangeOrTransformer?: InputRange | Transformer,\n outputRangeOrMap?: O[] | OutputMap,\n options?: TransformOptions\n): MotionValue | { [key in K]: MotionValue } {\n if (typeof input === \"function\") {\n return useComputed(input)\n }\n\n /**\n * Detect if outputRangeOrMap is an output map (object with keys)\n * rather than an output range (array).\n */\n const isOutputMap =\n outputRangeOrMap !== undefined &&\n !Array.isArray(outputRangeOrMap) &&\n typeof inputRangeOrTransformer !== \"function\"\n\n if (isOutputMap) {\n return useMapTransform(\n input as MotionValue,\n inputRangeOrTransformer as InputRange,\n outputRangeOrMap as OutputMap,\n options\n ) as { [key in K]: MotionValue }\n }\n\n const outputRange = outputRangeOrMap as O[] | undefined\n const transformer =\n typeof inputRangeOrTransformer === \"function\"\n ? inputRangeOrTransformer\n : transform(inputRangeOrTransformer!, outputRange!, options)\n\n const result = Array.isArray(input)\n ? useListTransform(\n input,\n transformer as MultiTransformer\n )\n : useListTransform([input], ([latest]) =>\n (transformer as SingleTransformer)(latest)\n )\n\n const inputAccelerate = !Array.isArray(input)\n ? (input as MotionValue).accelerate\n : undefined\n\n if (\n inputAccelerate &&\n !inputAccelerate.isTransformed &&\n typeof inputRangeOrTransformer !== \"function\" &&\n Array.isArray(outputRangeOrMap) &&\n options?.clamp !== false\n ) {\n result.accelerate = {\n ...inputAccelerate,\n times: inputRangeOrTransformer as number[],\n keyframes: outputRangeOrMap,\n isTransformed: true,\n ...(options?.ease ? { ease: options.ease } : {}),\n }\n }\n\n return result\n}\n\nfunction useListTransform(\n values: MotionValue[],\n transformer: MultiTransformer\n): MotionValue {\n const latest = useConstant(() => [])\n\n return useCombineMotionValues(values, () => {\n latest.length = 0\n const numValues = values.length\n for (let i = 0; i < numValues; i++) {\n latest[i] = values[i].get()\n }\n\n return transformer(latest)\n })\n}\n\nfunction useMapTransform(\n inputValue: MotionValue,\n inputRange: InputRange,\n outputMap: OutputMap,\n options?: TransformOptions\n): { [key: string]: MotionValue } {\n /**\n * Capture keys once to ensure hooks are called in consistent order.\n */\n const keys = useConstant(() => Object.keys(outputMap))\n const output = useConstant<{ [key: string]: MotionValue }>(() => ({}))\n\n for (const key of keys) {\n output[key] = useTransform(inputValue, inputRange, outputMap[key], options)\n }\n\n return output\n}\n"],"names":[],"mappings":";;;;;;AA2KM;AAWF;AACI;;AAGJ;;;AAGG;AACH;AAEI;;;;;;AAaJ;AAEQ;;AAGR;AACI;AAIA;;;;AAQJ;;;AAII;AACA;;AAGI;AACA;AACA;AACA;AACA;;;AAIR;AACJ;AAEA;;AAMI;AACI;AACA;AACA;;;AAIA;AACJ;AACJ;AAEA;AAMI;;AAEG;AACH;;AAGA;AACI;;AAGJ;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-velocity.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-velocity.mjs deleted file mode 100644 index 70a9d193..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-velocity.mjs +++ /dev/null @@ -1,37 +0,0 @@ -"use client"; -import { frame } from 'motion-dom'; -import { useMotionValueEvent } from '../utils/use-motion-value-event.mjs'; -import { useMotionValue } from './use-motion-value.mjs'; - -/** - * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes. - * - * ```javascript - * const x = useMotionValue(0) - * const xVelocity = useVelocity(x) - * const xAcceleration = useVelocity(xVelocity) - * ``` - * - * @public - */ -function useVelocity(value) { - const velocity = useMotionValue(value.getVelocity()); - const updateVelocity = () => { - const latest = value.getVelocity(); - velocity.set(latest); - /** - * If we still have velocity, schedule an update for the next frame - * to keep checking until it is zero. - */ - if (latest) - frame.update(updateVelocity); - }; - useMotionValueEvent(value, "change", () => { - // Schedule an update to this value at the end of the current frame. - frame.update(updateVelocity, false, true); - }); - return velocity; -} - -export { useVelocity }; -//# sourceMappingURL=use-velocity.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-velocity.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-velocity.mjs.map deleted file mode 100644 index df80afed..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-velocity.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"use-velocity.mjs","sources":["../../../src/value/use-velocity.ts"],"sourcesContent":["\"use client\"\n\nimport { frame, MotionValue } from \"motion-dom\"\nimport { useMotionValueEvent } from \"../utils/use-motion-value-event\"\nimport { useMotionValue } from \"./use-motion-value\"\n/**\n * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.\n *\n * ```javascript\n * const x = useMotionValue(0)\n * const xVelocity = useVelocity(x)\n * const xAcceleration = useVelocity(xVelocity)\n * ```\n *\n * @public\n */\nexport function useVelocity(value: MotionValue): MotionValue {\n const velocity = useMotionValue(value.getVelocity())\n\n const updateVelocity = () => {\n const latest = value.getVelocity()\n velocity.set(latest)\n\n /**\n * If we still have velocity, schedule an update for the next frame\n * to keep checking until it is zero.\n */\n if (latest) frame.update(updateVelocity)\n }\n\n useMotionValueEvent(value, \"change\", () => {\n // Schedule an update to this value at the end of the current frame.\n frame.update(updateVelocity, false, true)\n })\n\n return velocity\n}\n"],"names":[],"mappings":";;;;;AAKA;;;;;;;;;;AAUG;AACG;;;AAIE;AACA;AAEA;;;AAGG;AACH;AAAY;AAChB;AAEA;;;AAGA;AAEA;AACJ;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs deleted file mode 100644 index b5ba18bf..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs +++ /dev/null @@ -1,20 +0,0 @@ -import { MotionValue, transformProps, acceleratedValues } from 'motion-dom'; - -class WillChangeMotionValue extends MotionValue { - constructor() { - super(...arguments); - this.isEnabled = false; - } - add(name) { - if (transformProps.has(name) || acceleratedValues.has(name)) { - this.isEnabled = true; - this.update(); - } - } - update() { - this.set(this.isEnabled ? "transform" : "auto"); - } -} - -export { WillChangeMotionValue }; -//# sourceMappingURL=WillChangeMotionValue.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs.map deleted file mode 100644 index 17682743..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WillChangeMotionValue.mjs","sources":["../../../../src/value/use-will-change/WillChangeMotionValue.ts"],"sourcesContent":["import {\n acceleratedValues,\n MotionValue,\n transformProps,\n type WillChange,\n} from \"motion-dom\"\n\nexport class WillChangeMotionValue\n extends MotionValue\n implements WillChange\n{\n private isEnabled = false\n\n add(name: string) {\n if (transformProps.has(name) || acceleratedValues.has(name)) {\n this.isEnabled = true\n this.update()\n }\n }\n\n private update() {\n this.set(this.isEnabled ? \"transform\" : \"auto\")\n }\n}\n"],"names":[],"mappings":";;AAOM,MAAO,qBACT,SAAQ,WAAmB,CAAA;AAD/B,IAAA,WAAA,GAAA;;QAIY,IAAA,CAAA,SAAS,GAAG,KAAK;IAY7B;AAVI,IAAA,GAAG,CAAC,IAAY,EAAA;AACZ,QAAA,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;AACzD,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI;YACrB,IAAI,CAAC,MAAM,EAAE;QACjB;IACJ;IAEQ,MAAM,GAAA;AACV,QAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;IACnD;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/index.mjs b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/index.mjs deleted file mode 100644 index f06ed5e2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/index.mjs +++ /dev/null @@ -1,10 +0,0 @@ -"use client"; -import { useConstant } from '../../utils/use-constant.mjs'; -import { WillChangeMotionValue } from './WillChangeMotionValue.mjs'; - -function useWillChange() { - return useConstant(() => new WillChangeMotionValue("auto")); -} - -export { useWillChange }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/index.mjs.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/index.mjs.map deleted file mode 100644 index 0944a7ce..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/es/value/use-will-change/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/value/use-will-change/index.ts"],"sourcesContent":["\"use client\"\n\nimport type { WillChange } from \"motion-dom\"\nimport { useConstant } from \"../../utils/use-constant\"\nimport { WillChangeMotionValue } from \"./WillChangeMotionValue\"\n\nexport function useWillChange(): WillChange {\n return useConstant(() => new WillChangeMotionValue(\"auto\"))\n}\n"],"names":[],"mappings":";;;;;;AAQA;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/framer-motion.dev.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/framer-motion.dev.js deleted file mode 100644 index c2a99dcf..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/framer-motion.dev.js +++ /dev/null @@ -1,16679 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) : - typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Motion = {}, global.React)); -})(this, (function (exports, React$1) { 'use strict'; - - function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - - var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React$1); - - // source: react/cjs/react-jsx-runtime.production.min.js - /** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - var f = React, - k = Symbol.for("react.element"), - l = Symbol.for("react.fragment"), - m$1 = Object.prototype.hasOwnProperty, - n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, - p = { key: true, ref: true, __self: true, __source: true }; - function q(c, a, g) { - var b, - d = {}, - e = null, - h = null; - void 0 !== g && (e = "" + g); - void 0 !== a.key && (e = "" + a.key); - void 0 !== a.ref && (h = a.ref); - for (b in a) m$1.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]); - if (c && c.defaultProps) - for (b in ((a = c.defaultProps), a)) void 0 === d[b] && (d[b] = a[b]); - return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current } - } - const Fragment = l; - const jsx = q; - const jsxs = q; - - const LayoutGroupContext = React$1.createContext({}); - - /** - * Creates a constant value over the lifecycle of a component. - * - * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer - * a guarantee that it won't re-run for performance reasons later on. By using `useConstant` - * you can ensure that initialisers don't execute twice or more. - */ - function useConstant(init) { - const ref = React$1.useRef(null); - if (ref.current === null) { - ref.current = init(); - } - return ref.current; - } - - const isBrowser$1 = typeof window !== "undefined"; - - const useIsomorphicLayoutEffect = isBrowser$1 ? React$1.useLayoutEffect : React$1.useEffect; - - /** - * @public - */ - const PresenceContext = - /* @__PURE__ */ React$1.createContext(null); - - function addUniqueItem(arr, item) { - if (arr.indexOf(item) === -1) - arr.push(item); - } - function removeItem(arr, item) { - const index = arr.indexOf(item); - if (index > -1) - arr.splice(index, 1); - } - // Adapted from array-move - function moveItem([...arr], fromIndex, toIndex) { - const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex; - if (startIndex >= 0 && startIndex < arr.length) { - const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex; - const [item] = arr.splice(fromIndex, 1); - arr.splice(endIndex, 0, item); - } - return arr; - } - - const clamp = (min, max, v) => { - if (v > max) - return max; - if (v < min) - return min; - return v; - }; - - function formatErrorMessage(message, errorCode) { - return errorCode - ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}` - : message; - } - - exports.warning = () => { }; - exports.invariant = () => { }; - if (typeof process !== "undefined" && - process.env?.NODE_ENV !== "production") { - exports.warning = (check, message, errorCode) => { - if (!check && typeof console !== "undefined") { - console.warn(formatErrorMessage(message, errorCode)); - } - }; - exports.invariant = (check, message, errorCode) => { - if (!check) { - throw new Error(formatErrorMessage(message, errorCode)); - } - }; - } - - const MotionGlobalConfig = {}; - - /** - * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1" - */ - const isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v); - - const isObject = (value) => typeof value === "object" && value !== null; - - /** - * Check if the value is a zero value string like "0px" or "0%" - */ - const isZeroValueString = (v) => /^0[^.\s]+$/u.test(v); - - /*#__NO_SIDE_EFFECTS__*/ - function memo(callback) { - let result; - return () => { - if (result === undefined) - result = callback(); - return result; - }; - } - - /*#__NO_SIDE_EFFECTS__*/ - const noop$1 = (any) => any; - - /** - * Pipe - * Compose other transformers to run linearily - * pipe(min(20), max(40)) - * @param {...functions} transformers - * @return {function} - */ - const pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v))); - - /* - Progress within given range - - Given a lower limit and an upper limit, we return the progress - (expressed as a number 0-1) represented by the given value, and - limit that progress to within 0-1. - */ - /*#__NO_SIDE_EFFECTS__*/ - const progress = (from, to, value) => { - const range = to - from; - return range ? (value - from) / range : 1; - }; - - class SubscriptionManager { - constructor() { - this.subscriptions = []; - } - add(handler) { - addUniqueItem(this.subscriptions, handler); - return () => removeItem(this.subscriptions, handler); - } - notify(a, b, c) { - const numSubscriptions = this.subscriptions.length; - if (!numSubscriptions) - return; - if (numSubscriptions === 1) { - /** - * If there's only a single handler we can just call it without invoking a loop. - */ - this.subscriptions[0](a, b, c); - } - else { - for (let i = 0; i < numSubscriptions; i++) { - /** - * Check whether the handler exists before firing as it's possible - * the subscriptions were modified during this loop running. - */ - const handler = this.subscriptions[i]; - handler && handler(a, b, c); - } - } - } - getSize() { - return this.subscriptions.length; - } - clear() { - this.subscriptions.length = 0; - } - } - - /** - * Converts seconds to milliseconds - * - * @param seconds - Time in seconds. - * @return milliseconds - Converted time in milliseconds. - */ - /*#__NO_SIDE_EFFECTS__*/ - const secondsToMilliseconds = (seconds) => seconds * 1000; - /*#__NO_SIDE_EFFECTS__*/ - const millisecondsToSeconds = (milliseconds) => milliseconds / 1000; - - /* - Convert velocity into velocity per second - */ - /*#__NO_SIDE_EFFECTS__*/ - const velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0; - - const warned = new Set(); - function hasWarned$1(message) { - return warned.has(message); - } - function warnOnce(condition, message, errorCode) { - if (condition || warned.has(message)) - return; - console.warn(formatErrorMessage(message, errorCode)); - warned.add(message); - } - - const wrap = (min, max, v) => { - const rangeSize = max - min; - return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min; - }; - - /* - Bezier function generator - This has been modified from Gaëtan Renaudeau's BezierEasing - https://github.com/gre/bezier-easing/blob/master/src/index.js - https://github.com/gre/bezier-easing/blob/master/LICENSE - - I've removed the newtonRaphsonIterate algo because in benchmarking it - wasn't noticeably faster than binarySubdivision, indeed removing it - usually improved times, depending on the curve. - I also removed the lookup table, as for the added bundle size and loop we're - only cutting ~4 or so subdivision iterations. I bumped the max iterations up - to 12 to compensate and this still tended to be faster for no perceivable - loss in accuracy. - Usage - const easeOut = cubicBezier(.17,.67,.83,.67); - const x = easeOut(0.5); // returns 0.627... - */ - // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. - const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * - t; - const subdivisionPrecision = 0.0000001; - const subdivisionMaxIterations = 12; - function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) { - let currentX; - let currentT; - let i = 0; - do { - currentT = lowerBound + (upperBound - lowerBound) / 2.0; - currentX = calcBezier(currentT, mX1, mX2) - x; - if (currentX > 0.0) { - upperBound = currentT; - } - else { - lowerBound = currentT; - } - } while (Math.abs(currentX) > subdivisionPrecision && - ++i < subdivisionMaxIterations); - return currentT; - } - /*#__NO_SIDE_EFFECTS__*/ - function cubicBezier(mX1, mY1, mX2, mY2) { - // If this is a linear gradient, return linear easing - if (mX1 === mY1 && mX2 === mY2) - return noop$1; - const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2); - // If animation is at start/end, return t without easing - return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2); - } - - // Accepts an easing function and returns a new one that outputs mirrored values for - // the second half of the animation. Turns easeIn into easeInOut. - /*#__NO_SIDE_EFFECTS__*/ - const mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2; - - // Accepts an easing function and returns a new one that outputs reversed values. - // Turns easeIn into easeOut. - /*#__NO_SIDE_EFFECTS__*/ - const reverseEasing = (easing) => (p) => 1 - easing(1 - p); - - const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99); - const backIn = /*@__PURE__*/ reverseEasing(backOut); - const backInOut = /*@__PURE__*/ mirrorEasing(backIn); - - const anticipate = (p) => p >= 1 - ? 1 - : (p *= 2) < 1 - ? 0.5 * backIn(p) - : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); - - const circIn = (p) => 1 - Math.sin(Math.acos(p)); - const circOut = reverseEasing(circIn); - const circInOut = mirrorEasing(circIn); - - const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1); - const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1); - const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1); - - /*#__NO_SIDE_EFFECTS__*/ - function steps(numSteps, direction = "end") { - return (progress) => { - progress = - direction === "end" - ? Math.min(progress, 0.999) - : Math.max(progress, 0.001); - const expanded = progress * numSteps; - const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded); - return clamp(0, 1, rounded / numSteps); - }; - } - - /*#__NO_SIDE_EFFECTS__*/ - const isEasingArray = (ease) => { - return Array.isArray(ease) && typeof ease[0] !== "number"; - }; - - /*#__NO_SIDE_EFFECTS__*/ - function getEasingForSegment(easing, i) { - return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing; - } - - /*#__NO_SIDE_EFFECTS__*/ - const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number"; - - const easingLookup = { - linear: noop$1, - easeIn, - easeInOut, - easeOut, - circIn, - circInOut, - circOut, - backIn, - backInOut, - backOut, - anticipate, - }; - const isValidEasing = (easing) => { - return typeof easing === "string"; - }; - const easingDefinitionToFunction = (definition) => { - if (isBezierDefinition(definition)) { - // If cubic bezier definition, create bezier curve - exports.invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length"); - const [x1, y1, x2, y2] = definition; - return cubicBezier(x1, y1, x2, y2); - } - else if (isValidEasing(definition)) { - // Else lookup from table - exports.invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, "invalid-easing-type"); - return easingLookup[definition]; - } - return definition; - }; - - const stepsOrder = [ - "setup", // Compute - "read", // Read - "resolveKeyframes", // Write/Read/Write/Read - "preUpdate", // Compute - "update", // Compute - "preRender", // Compute - "render", // Write - "postRender", // Compute - ]; - - const statsBuffer = { - value: null, - addProjectionMetrics: null, - }; - - function createRenderStep(runNextFrame, stepName) { - /** - * We create and reuse two queues, one to queue jobs for the current frame - * and one for the next. We reuse to avoid triggering GC after x frames. - */ - let thisFrame = new Set(); - let nextFrame = new Set(); - /** - * Track whether we're currently processing jobs in this step. This way - * we can decide whether to schedule new jobs for this frame or next. - */ - let isProcessing = false; - let flushNextFrame = false; - /** - * A set of processes which were marked keepAlive when scheduled. - */ - const toKeepAlive = new WeakSet(); - let latestFrameData = { - delta: 0.0, - timestamp: 0.0, - isProcessing: false, - }; - let numCalls = 0; - function triggerCallback(callback) { - if (toKeepAlive.has(callback)) { - step.schedule(callback); - runNextFrame(); - } - numCalls++; - callback(latestFrameData); - } - const step = { - /** - * Schedule a process to run on the next frame. - */ - schedule: (callback, keepAlive = false, immediate = false) => { - const addToCurrentFrame = immediate && isProcessing; - const queue = addToCurrentFrame ? thisFrame : nextFrame; - if (keepAlive) - toKeepAlive.add(callback); - queue.add(callback); - return callback; - }, - /** - * Cancel the provided callback from running on the next frame. - */ - cancel: (callback) => { - nextFrame.delete(callback); - toKeepAlive.delete(callback); - }, - /** - * Execute all schedule callbacks. - */ - process: (frameData) => { - latestFrameData = frameData; - /** - * If we're already processing we've probably been triggered by a flushSync - * inside an existing process. Instead of executing, mark flushNextFrame - * as true and ensure we flush the following frame at the end of this one. - */ - if (isProcessing) { - flushNextFrame = true; - return; - } - isProcessing = true; - // Swap this frame and the next to avoid GC - const prevFrame = thisFrame; - thisFrame = nextFrame; - nextFrame = prevFrame; - // Execute this frame - thisFrame.forEach(triggerCallback); - /** - * If we're recording stats then - */ - if (stepName && statsBuffer.value) { - statsBuffer.value.frameloop[stepName].push(numCalls); - } - numCalls = 0; - // Clear the frame so no callbacks remain. This is to avoid - // memory leaks should this render step not run for a while. - thisFrame.clear(); - isProcessing = false; - if (flushNextFrame) { - flushNextFrame = false; - step.process(frameData); - } - }, - }; - return step; - } - - const maxElapsed$1 = 40; - function createRenderBatcher(scheduleNextBatch, allowKeepAlive) { - let runNextFrame = false; - let useDefaultElapsed = true; - const state = { - delta: 0.0, - timestamp: 0.0, - isProcessing: false, - }; - const flagRunNextFrame = () => (runNextFrame = true); - const steps = stepsOrder.reduce((acc, key) => { - acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined); - return acc; - }, {}); - const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps; - const processBatch = () => { - const useManualTiming = MotionGlobalConfig.useManualTiming; - const timestamp = useManualTiming - ? state.timestamp - : performance.now(); - runNextFrame = false; - if (!useManualTiming) { - state.delta = useDefaultElapsed - ? 1000 / 60 - : Math.max(Math.min(timestamp - state.timestamp, maxElapsed$1), 1); - } - state.timestamp = timestamp; - state.isProcessing = true; - // Unrolled render loop for better per-frame performance - setup.process(state); - read.process(state); - resolveKeyframes.process(state); - preUpdate.process(state); - update.process(state); - preRender.process(state); - render.process(state); - postRender.process(state); - state.isProcessing = false; - if (runNextFrame && allowKeepAlive) { - useDefaultElapsed = false; - scheduleNextBatch(processBatch); - } - }; - const wake = () => { - runNextFrame = true; - useDefaultElapsed = true; - if (!state.isProcessing) { - scheduleNextBatch(processBatch); - } - }; - const schedule = stepsOrder.reduce((acc, key) => { - const step = steps[key]; - acc[key] = (process, keepAlive = false, immediate = false) => { - if (!runNextFrame) - wake(); - return step.schedule(process, keepAlive, immediate); - }; - return acc; - }, {}); - const cancel = (process) => { - for (let i = 0; i < stepsOrder.length; i++) { - steps[stepsOrder[i]].cancel(process); - } - }; - return { schedule, cancel, state, steps }; - } - - const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop$1, true); - - let now; - function clearTime() { - now = undefined; - } - /** - * An eventloop-synchronous alternative to performance.now(). - * - * Ensures that time measurements remain consistent within a synchronous context. - * Usually calling performance.now() twice within the same synchronous context - * will return different values which isn't useful for animations when we're usually - * trying to sync animations to the same frame. - */ - const time = { - now: () => { - if (now === undefined) { - time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming - ? frameData.timestamp - : performance.now()); - } - return now; - }, - set: (newTime) => { - now = newTime; - queueMicrotask(clearTime); - }, - }; - - const activeAnimations = { - layout: 0, - mainThread: 0, - waapi: 0, - }; - - const checkStringStartsWith = (token) => (key) => typeof key === "string" && key.startsWith(token); - const isCSSVariableName = - /*@__PURE__*/ checkStringStartsWith("--"); - const startsAsVariableToken = - /*@__PURE__*/ checkStringStartsWith("var(--"); - const isCSSVariableToken = (value) => { - const startsWithToken = startsAsVariableToken(value); - if (!startsWithToken) - return false; - // Ensure any comments are stripped from the value as this can harm performance of the regex. - return singleCssVariableRegex.test(value.split("/*")[0].trim()); - }; - const singleCssVariableRegex = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu; - /** - * Check if a value contains a CSS variable anywhere (e.g. inside calc()). - * Unlike isCSSVariableToken which checks if the value IS a var() token, - * this checks if the value CONTAINS var() somewhere in the string. - */ - function containsCSSVariable(value) { - if (typeof value !== "string") - return false; - // Strip comments to avoid false positives - return value.split("/*")[0].includes("var(--"); - } - - const number = { - test: (v) => typeof v === "number", - parse: parseFloat, - transform: (v) => v, - }; - const alpha = { - ...number, - transform: (v) => clamp(0, 1, v), - }; - const scale = { - ...number, - default: 1, - }; - - // If this number is a decimal, make it just five decimal places - // to avoid exponents - const sanitize = (v) => Math.round(v * 100000) / 100000; - - const floatRegex = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu; - - function isNullish(v) { - return v == null; - } - - const singleColorRegex = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu; - - /** - * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000, - * but false if a number or multiple colors - */ - const isColorString = (type, testProp) => (v) => { - return Boolean((typeof v === "string" && - singleColorRegex.test(v) && - v.startsWith(type)) || - (testProp && - !isNullish(v) && - Object.prototype.hasOwnProperty.call(v, testProp))); - }; - const splitColor = (aName, bName, cName) => (v) => { - if (typeof v !== "string") - return v; - const [a, b, c, alpha] = v.match(floatRegex); - return { - [aName]: parseFloat(a), - [bName]: parseFloat(b), - [cName]: parseFloat(c), - alpha: alpha !== undefined ? parseFloat(alpha) : 1, - }; - }; - - const clampRgbUnit = (v) => clamp(0, 255, v); - const rgbUnit = { - ...number, - transform: (v) => Math.round(clampRgbUnit(v)), - }; - const rgba = { - test: /*@__PURE__*/ isColorString("rgb", "red"), - parse: /*@__PURE__*/ splitColor("red", "green", "blue"), - transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" + - rgbUnit.transform(red) + - ", " + - rgbUnit.transform(green) + - ", " + - rgbUnit.transform(blue) + - ", " + - sanitize(alpha.transform(alpha$1)) + - ")", - }; - - function parseHex(v) { - let r = ""; - let g = ""; - let b = ""; - let a = ""; - // If we have 6 characters, ie #FF0000 - if (v.length > 5) { - r = v.substring(1, 3); - g = v.substring(3, 5); - b = v.substring(5, 7); - a = v.substring(7, 9); - // Or we have 3 characters, ie #F00 - } - else { - r = v.substring(1, 2); - g = v.substring(2, 3); - b = v.substring(3, 4); - a = v.substring(4, 5); - r += r; - g += g; - b += b; - a += a; - } - return { - red: parseInt(r, 16), - green: parseInt(g, 16), - blue: parseInt(b, 16), - alpha: a ? parseInt(a, 16) / 255 : 1, - }; - } - const hex = { - test: /*@__PURE__*/ isColorString("#"), - parse: parseHex, - transform: rgba.transform, - }; - - /*#__NO_SIDE_EFFECTS__*/ - const createUnitType = (unit) => ({ - test: (v) => typeof v === "string" && v.endsWith(unit) && v.split(" ").length === 1, - parse: parseFloat, - transform: (v) => `${v}${unit}`, - }); - const degrees = /*@__PURE__*/ createUnitType("deg"); - const percent = /*@__PURE__*/ createUnitType("%"); - const px = /*@__PURE__*/ createUnitType("px"); - const vh = /*@__PURE__*/ createUnitType("vh"); - const vw = /*@__PURE__*/ createUnitType("vw"); - const progressPercentage = /*@__PURE__*/ (() => ({ - ...percent, - parse: (v) => percent.parse(v) / 100, - transform: (v) => percent.transform(v * 100), - }))(); - - const hsla = { - test: /*@__PURE__*/ isColorString("hsl", "hue"), - parse: /*@__PURE__*/ splitColor("hue", "saturation", "lightness"), - transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => { - return ("hsla(" + - Math.round(hue) + - ", " + - percent.transform(sanitize(saturation)) + - ", " + - percent.transform(sanitize(lightness)) + - ", " + - sanitize(alpha.transform(alpha$1)) + - ")"); - }, - }; - - const color = { - test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v), - parse: (v) => { - if (rgba.test(v)) { - return rgba.parse(v); - } - else if (hsla.test(v)) { - return hsla.parse(v); - } - else { - return hex.parse(v); - } - }, - transform: (v) => { - return typeof v === "string" - ? v - : v.hasOwnProperty("red") - ? rgba.transform(v) - : hsla.transform(v); - }, - getAnimatableNone: (v) => { - const parsed = color.parse(v); - parsed.alpha = 0; - return color.transform(parsed); - }, - }; - - const colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu; - - function test(v) { - return (isNaN(v) && - typeof v === "string" && - (v.match(floatRegex)?.length || 0) + - (v.match(colorRegex)?.length || 0) > - 0); - } - const NUMBER_TOKEN = "number"; - const COLOR_TOKEN = "color"; - const VAR_TOKEN = "var"; - const VAR_FUNCTION_TOKEN = "var("; - const SPLIT_TOKEN = "${}"; - // this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex` - const complexRegex = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu; - function analyseComplexValue(value) { - const originalValue = value.toString(); - const values = []; - const indexes = { - color: [], - number: [], - var: [], - }; - const types = []; - let i = 0; - const tokenised = originalValue.replace(complexRegex, (parsedValue) => { - if (color.test(parsedValue)) { - indexes.color.push(i); - types.push(COLOR_TOKEN); - values.push(color.parse(parsedValue)); - } - else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) { - indexes.var.push(i); - types.push(VAR_TOKEN); - values.push(parsedValue); - } - else { - indexes.number.push(i); - types.push(NUMBER_TOKEN); - values.push(parseFloat(parsedValue)); - } - ++i; - return SPLIT_TOKEN; - }); - const split = tokenised.split(SPLIT_TOKEN); - return { values, split, indexes, types }; - } - function parseComplexValue(v) { - return analyseComplexValue(v).values; - } - function buildTransformer({ split, types }) { - const numSections = split.length; - return (v) => { - let output = ""; - for (let i = 0; i < numSections; i++) { - output += split[i]; - if (v[i] !== undefined) { - const type = types[i]; - if (type === NUMBER_TOKEN) { - output += sanitize(v[i]); - } - else if (type === COLOR_TOKEN) { - output += color.transform(v[i]); - } - else { - output += v[i]; - } - } - } - return output; - }; - } - function createTransformer(source) { - return buildTransformer(analyseComplexValue(source)); - } - const convertNumbersToZero = (v) => typeof v === "number" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v; - /** - * Convert a parsed value to its zero equivalent, but preserve numbers - * that act as divisors in CSS calc() expressions. - * - * analyseComplexValue extracts numbers from CSS strings and puts the - * surrounding text into a `split` template array. For example: - * "calc(var(--gap) / 5)" → values: [var(--gap), 5] - * split: ["calc(", " / ", ")"] - * - * When building a zero-equivalent for animation, naively zeroing all - * numbers turns the divisor into 0 → "calc(var(--gap) / 0)" → NaN. - * We detect this by checking whether the text preceding a number - * (split[i]) ends with "/" — the CSS calc division operator. - */ - const convertToZero = (value, splitBefore) => { - if (typeof value === "number") { - return splitBefore?.trim().endsWith("/") ? value : 0; - } - return convertNumbersToZero(value); - }; - function getAnimatableNone$1(v) { - const info = analyseComplexValue(v); - const transformer = buildTransformer(info); - return transformer(info.values.map((value, i) => convertToZero(value, info.split[i]))); - } - const complex = { - test, - parse: parseComplexValue, - createTransformer, - getAnimatableNone: getAnimatableNone$1, - }; - - // Adapted from https://gist.github.com/mjackson/5311256 - function hueToRgb(p, q, t) { - if (t < 0) - t += 1; - if (t > 1) - t -= 1; - if (t < 1 / 6) - return p + (q - p) * 6 * t; - if (t < 1 / 2) - return q; - if (t < 2 / 3) - return p + (q - p) * (2 / 3 - t) * 6; - return p; - } - function hslaToRgba({ hue, saturation, lightness, alpha }) { - hue /= 360; - saturation /= 100; - lightness /= 100; - let red = 0; - let green = 0; - let blue = 0; - if (!saturation) { - red = green = blue = lightness; - } - else { - const q = lightness < 0.5 - ? lightness * (1 + saturation) - : lightness + saturation - lightness * saturation; - const p = 2 * lightness - q; - red = hueToRgb(p, q, hue + 1 / 3); - green = hueToRgb(p, q, hue); - blue = hueToRgb(p, q, hue - 1 / 3); - } - return { - red: Math.round(red * 255), - green: Math.round(green * 255), - blue: Math.round(blue * 255), - alpha, - }; - } - - function mixImmediate(a, b) { - return (p) => (p > 0 ? b : a); - } - - /* - Value in range from progress - - Given a lower limit and an upper limit, we return the value within - that range as expressed by progress (usually a number from 0 to 1) - - So progress = 0.5 would change - - from -------- to - - to - - from ---- to - - E.g. from = 10, to = 20, progress = 0.5 => 15 - - @param [number]: Lower limit of range - @param [number]: Upper limit of range - @param [number]: The progress between lower and upper limits expressed 0-1 - @return [number]: Value as calculated from progress within range (not limited within range) - */ - const mixNumber$1 = (from, to, progress) => { - return from + (to - from) * progress; - }; - - // Linear color space blending - // Explained https://www.youtube.com/watch?v=LKnqECcg6Gw - // Demonstrated http://codepen.io/osublake/pen/xGVVaN - const mixLinearColor = (from, to, v) => { - const fromExpo = from * from; - const expo = v * (to * to - fromExpo) + fromExpo; - return expo < 0 ? 0 : Math.sqrt(expo); - }; - const colorTypes = [hex, rgba, hsla]; - const getColorType = (v) => colorTypes.find((type) => type.test(v)); - function asRGBA(color) { - const type = getColorType(color); - exports.warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"); - if (!Boolean(type)) - return false; - let model = type.parse(color); - if (type === hsla) { - // TODO Remove this cast - needed since Motion's stricter typing - model = hslaToRgba(model); - } - return model; - } - const mixColor = (from, to) => { - const fromRGBA = asRGBA(from); - const toRGBA = asRGBA(to); - if (!fromRGBA || !toRGBA) { - return mixImmediate(from, to); - } - const blended = { ...fromRGBA }; - return (v) => { - blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v); - blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v); - blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v); - blended.alpha = mixNumber$1(fromRGBA.alpha, toRGBA.alpha, v); - return rgba.transform(blended); - }; - }; - - const invisibleValues = new Set(["none", "hidden"]); - /** - * Returns a function that, when provided a progress value between 0 and 1, - * will return the "none" or "hidden" string only when the progress is that of - * the origin or target. - */ - function mixVisibility(origin, target) { - if (invisibleValues.has(origin)) { - return (p) => (p <= 0 ? origin : target); - } - else { - return (p) => (p >= 1 ? target : origin); - } - } - - function mixNumber(a, b) { - return (p) => mixNumber$1(a, b, p); - } - function getMixer(a) { - if (typeof a === "number") { - return mixNumber; - } - else if (typeof a === "string") { - return isCSSVariableToken(a) - ? mixImmediate - : color.test(a) - ? mixColor - : mixComplex; - } - else if (Array.isArray(a)) { - return mixArray; - } - else if (typeof a === "object") { - return color.test(a) ? mixColor : mixObject; - } - return mixImmediate; - } - function mixArray(a, b) { - const output = [...a]; - const numValues = output.length; - const blendValue = a.map((v, i) => getMixer(v)(v, b[i])); - return (p) => { - for (let i = 0; i < numValues; i++) { - output[i] = blendValue[i](p); - } - return output; - }; - } - function mixObject(a, b) { - const output = { ...a, ...b }; - const blendValue = {}; - for (const key in output) { - if (a[key] !== undefined && b[key] !== undefined) { - blendValue[key] = getMixer(a[key])(a[key], b[key]); - } - } - return (v) => { - for (const key in blendValue) { - output[key] = blendValue[key](v); - } - return output; - }; - } - function matchOrder(origin, target) { - const orderedOrigin = []; - const pointers = { color: 0, var: 0, number: 0 }; - for (let i = 0; i < target.values.length; i++) { - const type = target.types[i]; - const originIndex = origin.indexes[type][pointers[type]]; - const originValue = origin.values[originIndex] ?? 0; - orderedOrigin[i] = originValue; - pointers[type]++; - } - return orderedOrigin; - } - const mixComplex = (origin, target) => { - const template = complex.createTransformer(target); - const originStats = analyseComplexValue(origin); - const targetStats = analyseComplexValue(target); - const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length && - originStats.indexes.color.length === targetStats.indexes.color.length && - originStats.indexes.number.length >= targetStats.indexes.number.length; - if (canInterpolate) { - if ((invisibleValues.has(origin) && - !targetStats.values.length) || - (invisibleValues.has(target) && - !originStats.values.length)) { - return mixVisibility(origin, target); - } - return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template); - } - else { - exports.warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"); - return mixImmediate(origin, target); - } - }; - - function mix(from, to, p) { - if (typeof from === "number" && - typeof to === "number" && - typeof p === "number") { - return mixNumber$1(from, to, p); - } - const mixer = getMixer(from); - return mixer(from, to); - } - - const frameloopDriver = (update) => { - const passTimestamp = ({ timestamp }) => update(timestamp); - return { - start: (keepAlive = true) => frame.update(passTimestamp, keepAlive), - stop: () => cancelFrame(passTimestamp), - /** - * If we're processing this frame we can use the - * framelocked timestamp to keep things in sync. - */ - now: () => (frameData.isProcessing ? frameData.timestamp : time.now()), - }; - }; - - const generateLinearEasing = (easing, duration, // as milliseconds - resolution = 10 // as milliseconds - ) => { - let points = ""; - const numPoints = Math.max(Math.round(duration / resolution), 2); - for (let i = 0; i < numPoints; i++) { - points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + ", "; - } - return `linear(${points.substring(0, points.length - 2)})`; - }; - - /** - * Implement a practical max duration for keyframe generation - * to prevent infinite loops - */ - const maxGeneratorDuration = 20000; - function calcGeneratorDuration(generator) { - let duration = 0; - const timeStep = 50; - let state = generator.next(duration); - while (!state.done && duration < maxGeneratorDuration) { - duration += timeStep; - state = generator.next(duration); - } - return duration >= maxGeneratorDuration ? Infinity : duration; - } - - /** - * Create a progress => progress easing function from a generator. - */ - function createGeneratorEasing(options, scale = 100, createGenerator) { - const generator = createGenerator({ ...options, keyframes: [0, scale] }); - const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration); - return { - type: "keyframes", - ease: (progress) => { - return generator.next(duration * progress).value / scale; - }, - duration: millisecondsToSeconds(duration), - }; - } - - const springDefaults = { - // Default spring physics - stiffness: 100, - damping: 10, - mass: 1.0, - velocity: 0.0, - // Default duration/bounce-based options - duration: 800, // in ms - bounce: 0.3, - visualDuration: 0.3, // in seconds - // Rest thresholds - restSpeed: { - granular: 0.01, - default: 2, - }, - restDelta: { - granular: 0.005, - default: 0.5, - }, - // Limits - minDuration: 0.01, // in seconds - maxDuration: 10.0, // in seconds - minDamping: 0.05, - maxDamping: 1, - }; - function calcAngularFreq(undampedFreq, dampingRatio) { - return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio); - } - const rootIterations = 12; - function approximateRoot(envelope, derivative, initialGuess) { - let result = initialGuess; - for (let i = 1; i < rootIterations; i++) { - result = result - envelope(result) / derivative(result); - } - return result; - } - /** - * This is ported from the Framer implementation of duration-based spring resolution. - */ - const safeMin = 0.001; - function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) { - let envelope; - let derivative; - exports.warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit"); - let dampingRatio = 1 - bounce; - /** - * Restrict dampingRatio and duration to within acceptable ranges. - */ - dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio); - duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration)); - if (dampingRatio < 1) { - /** - * Underdamped spring - */ - envelope = (undampedFreq) => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const a = exponentialDecay - velocity; - const b = calcAngularFreq(undampedFreq, dampingRatio); - const c = Math.exp(-delta); - return safeMin - (a / b) * c; - }; - derivative = (undampedFreq) => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const d = delta * velocity + velocity; - const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration; - const f = Math.exp(-delta); - const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio); - const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1; - return (factor * ((d - e) * f)) / g; - }; - } - else { - /** - * Critically-damped spring - */ - envelope = (undampedFreq) => { - const a = Math.exp(-undampedFreq * duration); - const b = (undampedFreq - velocity) * duration + 1; - return -safeMin + a * b; - }; - derivative = (undampedFreq) => { - const a = Math.exp(-undampedFreq * duration); - const b = (velocity - undampedFreq) * (duration * duration); - return a * b; - }; - } - const initialGuess = 5 / duration; - const undampedFreq = approximateRoot(envelope, derivative, initialGuess); - duration = secondsToMilliseconds(duration); - if (isNaN(undampedFreq)) { - return { - stiffness: springDefaults.stiffness, - damping: springDefaults.damping, - duration, - }; - } - else { - const stiffness = Math.pow(undampedFreq, 2) * mass; - return { - stiffness, - damping: dampingRatio * 2 * Math.sqrt(mass * stiffness), - duration, - }; - } - } - const durationKeys = ["duration", "bounce"]; - const physicsKeys = ["stiffness", "damping", "mass"]; - function isSpringType(options, keys) { - return keys.some((key) => options[key] !== undefined); - } - function getSpringOptions(options) { - let springOptions = { - velocity: springDefaults.velocity, - stiffness: springDefaults.stiffness, - damping: springDefaults.damping, - mass: springDefaults.mass, - isResolvedFromDuration: false, - ...options, - }; - // stiffness/damping/mass overrides duration/bounce - if (!isSpringType(options, physicsKeys) && - isSpringType(options, durationKeys)) { - // Time-defined springs should ignore inherited velocity. - // Velocity from interrupted animations can cause findSpring() - // to compute wildly different spring parameters, leading to - // massive oscillation on small-range animations. - springOptions.velocity = 0; - if (options.visualDuration) { - const visualDuration = options.visualDuration; - const root = (2 * Math.PI) / (visualDuration * 1.2); - const stiffness = root * root; - const damping = 2 * - clamp(0.05, 1, 1 - (options.bounce || 0)) * - Math.sqrt(stiffness); - springOptions = { - ...springOptions, - mass: springDefaults.mass, - stiffness, - damping, - }; - } - else { - const derived = findSpring({ ...options, velocity: 0 }); - springOptions = { - ...springOptions, - ...derived, - mass: springDefaults.mass, - }; - springOptions.isResolvedFromDuration = true; - } - } - return springOptions; - } - function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) { - const options = typeof optionsOrVisualDuration !== "object" - ? { - visualDuration: optionsOrVisualDuration, - keyframes: [0, 1], - bounce, - } - : optionsOrVisualDuration; - let { restSpeed, restDelta } = options; - const origin = options.keyframes[0]; - const target = options.keyframes[options.keyframes.length - 1]; - /** - * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator - * to reduce GC during animation. - */ - const state = { done: false, value: origin }; - const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({ - ...options, - velocity: -millisecondsToSeconds(options.velocity || 0), - }); - const initialVelocity = velocity || 0.0; - const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass)); - const initialDelta = target - origin; - const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass)); - /** - * If we're working on a granular scale, use smaller defaults for determining - * when the spring is finished. - * - * These defaults have been selected emprically based on what strikes a good - * ratio between feeling good and finishing as soon as changes are imperceptible. - */ - const isGranularScale = Math.abs(initialDelta) < 5; - restSpeed || (restSpeed = isGranularScale - ? springDefaults.restSpeed.granular - : springDefaults.restSpeed.default); - restDelta || (restDelta = isGranularScale - ? springDefaults.restDelta.granular - : springDefaults.restDelta.default); - let resolveSpring; - let resolveVelocity; - // Underdamped coefficients, hoisted for use in the inlined next() hot path - let angularFreq; - let A; - let sinCoeff; - let cosCoeff; - if (dampingRatio < 1) { - angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio); - A = - (initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) / - angularFreq; - // Underdamped spring - resolveSpring = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return (target - - envelope * - (A * Math.sin(angularFreq * t) + - initialDelta * Math.cos(angularFreq * t))); - }; - // Analytical derivative of underdamped spring (px/ms) - sinCoeff = - dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq; - cosCoeff = - dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq; - resolveVelocity = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return envelope * - (sinCoeff * Math.sin(angularFreq * t) + - cosCoeff * Math.cos(angularFreq * t)); - }; - } - else if (dampingRatio === 1) { - // Critically damped spring - resolveSpring = (t) => target - - Math.exp(-undampedAngularFreq * t) * - (initialDelta + - (initialVelocity + undampedAngularFreq * initialDelta) * t); - // Analytical derivative of critically damped spring (px/ms) - const C = initialVelocity + undampedAngularFreq * initialDelta; - resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) * - (undampedAngularFreq * C * t - initialVelocity); - } - else { - // Overdamped spring - const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1); - resolveSpring = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - // When performing sinh or cosh values can hit Infinity so we cap them here - const freqForT = Math.min(dampedAngularFreq * t, 300); - return (target - - (envelope * - ((initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) * - Math.sinh(freqForT) + - dampedAngularFreq * - initialDelta * - Math.cosh(freqForT))) / - dampedAngularFreq); - }; - // Analytical derivative of overdamped spring (px/ms) - const P = (initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) / - dampedAngularFreq; - const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq; - const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq; - resolveVelocity = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const freqForT = Math.min(dampedAngularFreq * t, 300); - return envelope * - (sinhCoeff * Math.sinh(freqForT) + - coshCoeff * Math.cosh(freqForT)); - }; - } - const generator = { - calculatedDuration: isResolvedFromDuration ? duration || null : null, - velocity: (t) => secondsToMilliseconds(resolveVelocity(t)), - next: (t) => { - /** - * For underdamped physics springs we need both position and - * velocity each tick. Compute shared trig values once to avoid - * duplicate Math.exp/sin/cos calls on the hot path. - */ - if (!isResolvedFromDuration && dampingRatio < 1) { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const sin = Math.sin(angularFreq * t); - const cos = Math.cos(angularFreq * t); - const current = target - - envelope * - (A * sin + initialDelta * cos); - const currentVelocity = secondsToMilliseconds(envelope * - (sinCoeff * sin + cosCoeff * cos)); - state.done = - Math.abs(currentVelocity) <= restSpeed && - Math.abs(target - current) <= restDelta; - state.value = state.done ? target : current; - return state; - } - const current = resolveSpring(t); - if (!isResolvedFromDuration) { - const currentVelocity = secondsToMilliseconds(resolveVelocity(t)); - state.done = - Math.abs(currentVelocity) <= restSpeed && - Math.abs(target - current) <= restDelta; - } - else { - state.done = t >= duration; - } - state.value = state.done ? target : current; - return state; - }, - toString: () => { - const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration); - const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30); - return calculatedDuration + "ms " + easing; - }, - toTransition: () => { }, - }; - return generator; - } - spring.applyToOptions = (options) => { - const generatorOptions = createGeneratorEasing(options, 100, spring); - options.ease = generatorOptions.ease; - options.duration = secondsToMilliseconds(generatorOptions.duration); - options.type = "keyframes"; - return options; - }; - - const velocitySampleDuration = 5; // ms - function getGeneratorVelocity(resolveValue, t, current) { - const prevT = Math.max(t - velocitySampleDuration, 0); - return velocityPerSecond(current - resolveValue(prevT), t - prevT); - } - - function inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) { - const origin = keyframes[0]; - const state = { - done: false, - value: origin, - }; - const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max); - const nearestBoundary = (v) => { - if (min === undefined) - return max; - if (max === undefined) - return min; - return Math.abs(min - v) < Math.abs(max - v) ? min : max; - }; - let amplitude = power * velocity; - const ideal = origin + amplitude; - const target = modifyTarget === undefined ? ideal : modifyTarget(ideal); - /** - * If the target has changed we need to re-calculate the amplitude, otherwise - * the animation will start from the wrong position. - */ - if (target !== ideal) - amplitude = target - origin; - const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant); - const calcLatest = (t) => target + calcDelta(t); - const applyFriction = (t) => { - const delta = calcDelta(t); - const latest = calcLatest(t); - state.done = Math.abs(delta) <= restDelta; - state.value = state.done ? target : latest; - }; - /** - * Ideally this would resolve for t in a stateless way, we could - * do that by always precalculating the animation but as we know - * this will be done anyway we can assume that spring will - * be discovered during that. - */ - let timeReachedBoundary; - let spring$1; - const checkCatchBoundary = (t) => { - if (!isOutOfBounds(state.value)) - return; - timeReachedBoundary = t; - spring$1 = spring({ - keyframes: [state.value, nearestBoundary(state.value)], - velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000 - damping: bounceDamping, - stiffness: bounceStiffness, - restDelta, - restSpeed, - }); - }; - checkCatchBoundary(0); - return { - calculatedDuration: null, - next: (t) => { - /** - * We need to resolve the friction to figure out if we need a - * spring but we don't want to do this twice per frame. So here - * we flag if we updated for this frame and later if we did - * we can skip doing it again. - */ - let hasUpdatedFrame = false; - if (!spring$1 && timeReachedBoundary === undefined) { - hasUpdatedFrame = true; - applyFriction(t); - checkCatchBoundary(t); - } - /** - * If we have a spring and the provided t is beyond the moment the friction - * animation crossed the min/max boundary, use the spring. - */ - if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) { - return spring$1.next(t - timeReachedBoundary); - } - else { - !hasUpdatedFrame && applyFriction(t); - return state; - } - }, - }; - } - - function createMixers(output, ease, customMixer) { - const mixers = []; - const mixerFactory = customMixer || MotionGlobalConfig.mix || mix; - const numMixers = output.length - 1; - for (let i = 0; i < numMixers; i++) { - let mixer = mixerFactory(output[i], output[i + 1]); - if (ease) { - const easingFunction = Array.isArray(ease) ? ease[i] || noop$1 : ease; - mixer = pipe(easingFunction, mixer); - } - mixers.push(mixer); - } - return mixers; - } - /** - * Create a function that maps from a numerical input array to a generic output array. - * - * Accepts: - * - Numbers - * - Colors (hex, hsl, hsla, rgb, rgba) - * - Complex (combinations of one or more numbers or strings) - * - * ```jsx - * const mixColor = interpolate([0, 1], ['#fff', '#000']) - * - * mixColor(0.5) // 'rgba(128, 128, 128, 1)' - * ``` - * - * TODO Revisit this approach once we've moved to data models for values, - * probably not needed to pregenerate mixer functions. - * - * @public - */ - function interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) { - const inputLength = input.length; - exports.invariant(inputLength === output.length, "Both input and output ranges must be the same length", "range-length"); - /** - * If we're only provided a single input, we can just make a function - * that returns the output. - */ - if (inputLength === 1) - return () => output[0]; - if (inputLength === 2 && output[0] === output[1]) - return () => output[1]; - const isZeroDeltaRange = input[0] === input[1]; - // If input runs highest -> lowest, reverse both arrays - if (input[0] > input[inputLength - 1]) { - input = [...input].reverse(); - output = [...output].reverse(); - } - const mixers = createMixers(output, ease, mixer); - const numMixers = mixers.length; - const interpolator = (v) => { - if (isZeroDeltaRange && v < input[0]) - return output[0]; - let i = 0; - if (numMixers > 1) { - for (; i < input.length - 2; i++) { - if (v < input[i + 1]) - break; - } - } - const progressInRange = progress(input[i], input[i + 1], v); - return mixers[i](progressInRange); - }; - return isClamp - ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v)) - : interpolator; - } - - function fillOffset(offset, remaining) { - const min = offset[offset.length - 1]; - for (let i = 1; i <= remaining; i++) { - const offsetProgress = progress(0, remaining, i); - offset.push(mixNumber$1(min, 1, offsetProgress)); - } - } - - function defaultOffset$1(arr) { - const offset = [0]; - fillOffset(offset, arr.length - 1); - return offset; - } - - function convertOffsetToTimes(offset, duration) { - return offset.map((o) => o * duration); - } - - function defaultEasing(values, easing) { - return values.map(() => easing || easeInOut).splice(0, values.length - 1); - } - function keyframes({ duration = 300, keyframes: keyframeValues, times, ease = "easeInOut", }) { - /** - * Easing functions can be externally defined as strings. Here we convert them - * into actual functions. - */ - const easingFunctions = isEasingArray(ease) - ? ease.map(easingDefinitionToFunction) - : easingDefinitionToFunction(ease); - /** - * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator - * to reduce GC during animation. - */ - const state = { - done: false, - value: keyframeValues[0], - }; - /** - * Create a times array based on the provided 0-1 offsets - */ - const absoluteTimes = convertOffsetToTimes( - // Only use the provided offsets if they're the correct length - // TODO Maybe we should warn here if there's a length mismatch - times && times.length === keyframeValues.length - ? times - : defaultOffset$1(keyframeValues), duration); - const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, { - ease: Array.isArray(easingFunctions) - ? easingFunctions - : defaultEasing(keyframeValues, easingFunctions), - }); - return { - calculatedDuration: duration, - next: (t) => { - state.value = mapTimeToKeyframe(t); - state.done = t >= duration; - return state; - }, - }; - } - - const isNotNull = (value) => value !== null; - function getFinalKeyframe(keyframes, { repeat, repeatType = "loop" }, finalKeyframe, speed = 1) { - const resolvedKeyframes = keyframes.filter(isNotNull); - const useFirstKeyframe = speed < 0 || (repeat && repeatType !== "loop" && repeat % 2 === 1); - const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1; - return !index || finalKeyframe === undefined - ? resolvedKeyframes[index] - : finalKeyframe; - } - - const transitionTypeMap = { - decay: inertia, - inertia, - tween: keyframes, - keyframes: keyframes, - spring, - }; - function replaceTransitionType(transition) { - if (typeof transition.type === "string") { - transition.type = transitionTypeMap[transition.type]; - } - } - - class WithPromise { - constructor() { - this.updateFinished(); - } - get finished() { - return this._finished; - } - updateFinished() { - this._finished = new Promise((resolve) => { - this.resolve = resolve; - }); - } - notifyFinished() { - this.resolve(); - } - /** - * Allows the animation to be awaited. - * - * @deprecated Use `finished` instead. - */ - then(onResolve, onReject) { - return this.finished.then(onResolve, onReject); - } - } - - const percentToProgress = (percent) => percent / 100; - class JSAnimation extends WithPromise { - constructor(options) { - super(); - this.state = "idle"; - this.startTime = null; - this.isStopped = false; - /** - * The current time of the animation. - */ - this.currentTime = 0; - /** - * The time at which the animation was paused. - */ - this.holdTime = null; - /** - * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed. - */ - this.playbackSpeed = 1; - /** - * Reusable state object for the delay phase to avoid - * allocating a new object every frame. - */ - this.delayState = { - done: false, - value: undefined, - }; - /** - * This method is bound to the instance to fix a pattern where - * animation.stop is returned as a reference from a useEffect. - */ - this.stop = () => { - const { motionValue } = this.options; - if (motionValue && motionValue.updatedAt !== time.now()) { - this.tick(time.now()); - } - this.isStopped = true; - if (this.state === "idle") - return; - this.teardown(); - this.options.onStop?.(); - }; - activeAnimations.mainThread++; - this.options = options; - this.initAnimation(); - this.play(); - if (options.autoplay === false) - this.pause(); - } - initAnimation() { - const { options } = this; - replaceTransitionType(options); - const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options; - let { keyframes: keyframes$1 } = options; - const generatorFactory = type || keyframes; - if (generatorFactory !== keyframes) { - exports.invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, "spring-two-frames"); - } - if (generatorFactory !== keyframes && - typeof keyframes$1[0] !== "number") { - this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1])); - keyframes$1 = [0, 100]; - } - const generator = generatorFactory({ ...options, keyframes: keyframes$1 }); - /** - * If we have a mirror repeat type we need to create a second generator that outputs the - * mirrored (not reversed) animation and later ping pong between the two generators. - */ - if (repeatType === "mirror") { - this.mirroredGenerator = generatorFactory({ - ...options, - keyframes: [...keyframes$1].reverse(), - velocity: -velocity, - }); - } - /** - * If duration is undefined and we have repeat options, - * we need to calculate a duration from the generator. - * - * We set it to the generator itself to cache the duration. - * Any timeline resolver will need to have already precalculated - * the duration by this step. - */ - if (generator.calculatedDuration === null) { - generator.calculatedDuration = calcGeneratorDuration(generator); - } - const { calculatedDuration } = generator; - this.calculatedDuration = calculatedDuration; - this.resolvedDuration = calculatedDuration + repeatDelay; - this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay; - this.generator = generator; - } - updateTime(timestamp) { - const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed; - // Update currentTime - if (this.holdTime !== null) { - this.currentTime = this.holdTime; - } - else { - // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 = - // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for - // example. - this.currentTime = animationTime; - } - } - tick(timestamp, sample = false) { - const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this; - if (this.startTime === null) - return generator.next(0); - const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options; - /** - * requestAnimationFrame timestamps can come through as lower than - * the startTime as set by performance.now(). Here we prevent this, - * though in the future it could be possible to make setting startTime - * a pending operation that gets resolved here. - */ - if (this.speed > 0) { - this.startTime = Math.min(this.startTime, timestamp); - } - else if (this.speed < 0) { - this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime); - } - if (sample) { - this.currentTime = timestamp; - } - else { - this.updateTime(timestamp); - } - // Rebase on delay - const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1); - const isInDelayPhase = this.playbackSpeed >= 0 - ? timeWithoutDelay < 0 - : timeWithoutDelay > totalDuration; - this.currentTime = Math.max(timeWithoutDelay, 0); - // If this animation has finished, set the current time to the total duration. - if (this.state === "finished" && this.holdTime === null) { - this.currentTime = totalDuration; - } - let elapsed = this.currentTime; - let frameGenerator = generator; - if (repeat) { - /** - * Get the current progress (0-1) of the animation. If t is > - * than duration we'll get values like 2.5 (midway through the - * third iteration) - */ - const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration; - /** - * Get the current iteration (0 indexed). For instance the floor of - * 2.5 is 2. - */ - let currentIteration = Math.floor(progress); - /** - * Get the current progress of the iteration by taking the remainder - * so 2.5 is 0.5 through iteration 2 - */ - let iterationProgress = progress % 1.0; - /** - * If iteration progress is 1 we count that as the end - * of the previous iteration. - */ - if (!iterationProgress && progress >= 1) { - iterationProgress = 1; - } - iterationProgress === 1 && currentIteration--; - currentIteration = Math.min(currentIteration, repeat + 1); - /** - * Reverse progress if we're not running in "normal" direction - */ - const isOddIteration = Boolean(currentIteration % 2); - if (isOddIteration) { - if (repeatType === "reverse") { - iterationProgress = 1 - iterationProgress; - if (repeatDelay) { - iterationProgress -= repeatDelay / resolvedDuration; - } - } - else if (repeatType === "mirror") { - frameGenerator = mirroredGenerator; - } - } - elapsed = clamp(0, 1, iterationProgress) * resolvedDuration; - } - /** - * If we're in negative time, set state as the initial keyframe. - * This prevents delay: x, duration: 0 animations from finishing - * instantly. - */ - let state; - if (isInDelayPhase) { - this.delayState.value = keyframes[0]; - state = this.delayState; - } - else { - state = frameGenerator.next(elapsed); - } - if (mixKeyframes && !isInDelayPhase) { - state.value = mixKeyframes(state.value); - } - let { done } = state; - if (!isInDelayPhase && calculatedDuration !== null) { - done = - this.playbackSpeed >= 0 - ? this.currentTime >= totalDuration - : this.currentTime <= 0; - } - const isAnimationFinished = this.holdTime === null && - (this.state === "finished" || (this.state === "running" && done)); - // TODO: The exception for inertia could be cleaner here - if (isAnimationFinished && type !== inertia) { - state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed); - } - if (onUpdate) { - onUpdate(state.value); - } - if (isAnimationFinished) { - this.finish(); - } - return state; - } - /** - * Allows the returned animation to be awaited or promise-chained. Currently - * resolves when the animation finishes at all but in a future update could/should - * reject if its cancels. - */ - then(resolve, reject) { - return this.finished.then(resolve, reject); - } - get duration() { - return millisecondsToSeconds(this.calculatedDuration); - } - get iterationDuration() { - const { delay = 0 } = this.options || {}; - return this.duration + millisecondsToSeconds(delay); - } - get time() { - return millisecondsToSeconds(this.currentTime); - } - set time(newTime) { - newTime = secondsToMilliseconds(newTime); - this.currentTime = newTime; - if (this.startTime === null || - this.holdTime !== null || - this.playbackSpeed === 0) { - this.holdTime = newTime; - } - else if (this.driver) { - this.startTime = this.driver.now() - newTime / this.playbackSpeed; - } - if (this.driver) { - this.driver.start(false); - } - else { - this.startTime = 0; - this.state = "paused"; - this.holdTime = newTime; - this.tick(newTime); - } - } - /** - * Returns the generator's velocity at the current time in units/second. - * Uses the analytical derivative when available (springs), avoiding - * the MotionValue's frame-dependent velocity estimation. - */ - getGeneratorVelocity() { - const t = this.currentTime; - if (t <= 0) - return this.options.velocity || 0; - if (this.generator.velocity) { - return this.generator.velocity(t); - } - // Fallback: finite difference - const current = this.generator.next(t).value; - return getGeneratorVelocity((s) => this.generator.next(s).value, t, current); - } - get speed() { - return this.playbackSpeed; - } - set speed(newSpeed) { - const hasChanged = this.playbackSpeed !== newSpeed; - if (hasChanged && this.driver) { - this.updateTime(time.now()); - } - this.playbackSpeed = newSpeed; - if (hasChanged && this.driver) { - this.time = millisecondsToSeconds(this.currentTime); - } - } - play() { - if (this.isStopped) - return; - const { driver = frameloopDriver, startTime } = this.options; - if (!this.driver) { - this.driver = driver((timestamp) => this.tick(timestamp)); - } - this.options.onPlay?.(); - const now = this.driver.now(); - if (this.state === "finished") { - this.updateFinished(); - this.startTime = now; - } - else if (this.holdTime !== null) { - this.startTime = now - this.holdTime; - } - else if (!this.startTime) { - this.startTime = startTime ?? now; - } - if (this.state === "finished" && this.speed < 0) { - this.startTime += this.calculatedDuration; - } - this.holdTime = null; - /** - * Set playState to running only after we've used it in - * the previous logic. - */ - this.state = "running"; - this.driver.start(); - } - pause() { - this.state = "paused"; - this.updateTime(time.now()); - this.holdTime = this.currentTime; - } - complete() { - if (this.state !== "running") { - this.play(); - } - this.state = "finished"; - this.holdTime = null; - } - finish() { - this.notifyFinished(); - this.teardown(); - this.state = "finished"; - this.options.onComplete?.(); - } - cancel() { - this.holdTime = null; - this.startTime = 0; - this.tick(0); - this.teardown(); - this.options.onCancel?.(); - } - teardown() { - this.state = "idle"; - this.stopDriver(); - this.startTime = this.holdTime = null; - activeAnimations.mainThread--; - } - stopDriver() { - if (!this.driver) - return; - this.driver.stop(); - this.driver = undefined; - } - sample(sampleTime) { - this.startTime = 0; - return this.tick(sampleTime, true); - } - attachTimeline(timeline) { - if (this.options.allowFlatten) { - this.options.type = "keyframes"; - this.options.ease = "linear"; - this.initAnimation(); - } - this.driver?.stop(); - return timeline.observe(this); - } - } - // Legacy function support - function animateValue(options) { - return new JSAnimation(options); - } - - function fillWildcards(keyframes) { - for (let i = 1; i < keyframes.length; i++) { - keyframes[i] ?? (keyframes[i] = keyframes[i - 1]); - } - } - - const radToDeg = (rad) => (rad * 180) / Math.PI; - const rotate = (v) => { - const angle = radToDeg(Math.atan2(v[1], v[0])); - return rebaseAngle(angle); - }; - const matrix2dParsers = { - x: 4, - y: 5, - translateX: 4, - translateY: 5, - scaleX: 0, - scaleY: 3, - scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2, - rotate, - rotateZ: rotate, - skewX: (v) => radToDeg(Math.atan(v[1])), - skewY: (v) => radToDeg(Math.atan(v[2])), - skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2, - }; - const rebaseAngle = (angle) => { - angle = angle % 360; - if (angle < 0) - angle += 360; - return angle; - }; - const rotateZ = rotate; - const scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]); - const scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]); - const matrix3dParsers = { - x: 12, - y: 13, - z: 14, - translateX: 12, - translateY: 13, - translateZ: 14, - scaleX, - scaleY, - scale: (v) => (scaleX(v) + scaleY(v)) / 2, - rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))), - rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))), - rotateZ, - rotate: rotateZ, - skewX: (v) => radToDeg(Math.atan(v[4])), - skewY: (v) => radToDeg(Math.atan(v[1])), - skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2, - }; - function defaultTransformValue(name) { - return name.includes("scale") ? 1 : 0; - } - function parseValueFromTransform(transform, name) { - if (!transform || transform === "none") { - return defaultTransformValue(name); - } - const matrix3dMatch = transform.match(/^matrix3d\(([-\d.e\s,]+)\)$/u); - let parsers; - let match; - if (matrix3dMatch) { - parsers = matrix3dParsers; - match = matrix3dMatch; - } - else { - const matrix2dMatch = transform.match(/^matrix\(([-\d.e\s,]+)\)$/u); - parsers = matrix2dParsers; - match = matrix2dMatch; - } - if (!match) { - return defaultTransformValue(name); - } - const valueParser = parsers[name]; - const values = match[1].split(",").map(convertTransformToNumber); - return typeof valueParser === "function" - ? valueParser(values) - : values[valueParser]; - } - const readTransformValue = (instance, name) => { - const { transform = "none" } = getComputedStyle(instance); - return parseValueFromTransform(transform, name); - }; - function convertTransformToNumber(value) { - return parseFloat(value.trim()); - } - - /** - * Generate a list of every possible transform key. - */ - const transformPropOrder = [ - "transformPerspective", - "x", - "y", - "z", - "translateX", - "translateY", - "translateZ", - "scale", - "scaleX", - "scaleY", - "rotate", - "rotateX", - "rotateY", - "rotateZ", - "skew", - "skewX", - "skewY", - ]; - /** - * A quick lookup for transform props. - * - * `pathRotation` is a transform for routing purposes (skipped from raw - * style application, wired to the transform composite, flags transform - * dirty) but is intentionally NOT in `transformPropOrder` — it is - * composed onto `rotate` at the build sites, not serialized in its own - * slot, and must stay out of the order-array consumers (parse-transform, - * unit-conversion, keys-position). - */ - const transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, "pathRotation"]))(); - - const isNumOrPxType = (v) => v === number || v === px; - const transformKeys = new Set(["x", "y", "z"]); - const nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key)); - function removeNonTranslationalTransform(visualElement) { - const removedTransforms = []; - nonTranslationalTransformKeys.forEach((key) => { - const value = visualElement.getValue(key); - if (value !== undefined) { - removedTransforms.push([key, value.get()]); - value.set(key.startsWith("scale") ? 1 : 0); - } - }); - return removedTransforms; - } - const positionalValues = { - // Dimensions - width: ({ x }, { paddingLeft = "0", paddingRight = "0", boxSizing }) => { - const width = x.max - x.min; - return boxSizing === "border-box" - ? width - : width - parseFloat(paddingLeft) - parseFloat(paddingRight); - }, - height: ({ y }, { paddingTop = "0", paddingBottom = "0", boxSizing }) => { - const height = y.max - y.min; - return boxSizing === "border-box" - ? height - : height - parseFloat(paddingTop) - parseFloat(paddingBottom); - }, - top: (_bbox, { top }) => parseFloat(top), - left: (_bbox, { left }) => parseFloat(left), - bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min), - right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min), - // Transform - x: (_bbox, { transform }) => parseValueFromTransform(transform, "x"), - y: (_bbox, { transform }) => parseValueFromTransform(transform, "y"), - }; - // Alias translate longform names - positionalValues.translateX = positionalValues.x; - positionalValues.translateY = positionalValues.y; - - const toResolve = new Set(); - let isScheduled = false; - let anyNeedsMeasurement = false; - let isForced = false; - function measureAllKeyframes() { - if (anyNeedsMeasurement) { - const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement); - const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element)); - const transformsToRestore = new Map(); - /** - * Write pass - * If we're measuring elements we want to remove bounding box-changing transforms. - */ - elementsToMeasure.forEach((element) => { - const removedTransforms = removeNonTranslationalTransform(element); - if (!removedTransforms.length) - return; - transformsToRestore.set(element, removedTransforms); - element.render(); - }); - // Read - resolversToMeasure.forEach((resolver) => resolver.measureInitialState()); - // Write - elementsToMeasure.forEach((element) => { - element.render(); - const restore = transformsToRestore.get(element); - if (restore) { - restore.forEach(([key, value]) => { - element.getValue(key)?.set(value); - }); - } - }); - // Read - resolversToMeasure.forEach((resolver) => resolver.measureEndState()); - // Write - resolversToMeasure.forEach((resolver) => { - if (resolver.suspendedScrollY !== undefined) { - window.scrollTo(0, resolver.suspendedScrollY); - } - }); - } - anyNeedsMeasurement = false; - isScheduled = false; - toResolve.forEach((resolver) => resolver.complete(isForced)); - toResolve.clear(); - } - function readAllKeyframes() { - toResolve.forEach((resolver) => { - resolver.readKeyframes(); - if (resolver.needsMeasurement) { - anyNeedsMeasurement = true; - } - }); - } - function flushKeyframeResolvers() { - isForced = true; - readAllKeyframes(); - measureAllKeyframes(); - isForced = false; - } - class KeyframeResolver { - constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) { - this.state = "pending"; - /** - * Track whether this resolver is async. If it is, it'll be added to the - * resolver queue and flushed in the next frame. Resolvers that aren't going - * to trigger read/write thrashing don't need to be async. - */ - this.isAsync = false; - /** - * Track whether this resolver needs to perform a measurement - * to resolve its keyframes. - */ - this.needsMeasurement = false; - this.unresolvedKeyframes = [...unresolvedKeyframes]; - this.onComplete = onComplete; - this.name = name; - this.motionValue = motionValue; - this.element = element; - this.isAsync = isAsync; - } - scheduleResolve() { - this.state = "scheduled"; - if (this.isAsync) { - toResolve.add(this); - if (!isScheduled) { - isScheduled = true; - frame.read(readAllKeyframes); - frame.resolveKeyframes(measureAllKeyframes); - } - } - else { - this.readKeyframes(); - this.complete(); - } - } - readKeyframes() { - const { unresolvedKeyframes, name, element, motionValue } = this; - // If initial keyframe is null we need to read it from the DOM - if (unresolvedKeyframes[0] === null) { - const currentValue = motionValue?.get(); - // TODO: This doesn't work if the final keyframe is a wildcard - const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1]; - if (currentValue !== undefined) { - unresolvedKeyframes[0] = currentValue; - } - else if (element && name) { - const valueAsRead = element.readValue(name, finalKeyframe); - if (valueAsRead !== undefined && valueAsRead !== null) { - unresolvedKeyframes[0] = valueAsRead; - } - } - if (unresolvedKeyframes[0] === undefined) { - unresolvedKeyframes[0] = finalKeyframe; - } - if (motionValue && currentValue === undefined) { - motionValue.set(unresolvedKeyframes[0]); - } - } - fillWildcards(unresolvedKeyframes); - } - setFinalKeyframe() { } - measureInitialState() { } - renderEndStyles() { } - measureEndState() { } - complete(isForcedComplete = false) { - this.state = "complete"; - this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete); - toResolve.delete(this); - } - cancel() { - if (this.state === "scheduled") { - toResolve.delete(this); - this.state = "pending"; - } - } - resume() { - if (this.state === "pending") - this.scheduleResolve(); - } - } - - const isCSSVar = (name) => name.startsWith("--"); - - function setStyle(element, name, value) { - isCSSVar(name) - ? element.style.setProperty(name, value) - : (element.style[name] = value); - } - - /** - * Add the ability for test suites to manually set support flags - * to better test more environments. - */ - const supportsFlags = {}; - - function memoSupports(callback, supportsFlag) { - const memoized = memo(callback); - return () => supportsFlags[supportsFlag] ?? memoized(); - } - - const supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, "scrollTimeline"); - const supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, "viewTimeline"); - - const supportsLinearEasing = /*@__PURE__*/ memoSupports(() => { - try { - document - .createElement("div") - .animate({ opacity: 0 }, { easing: "linear(0, 1)" }); - } - catch (e) { - return false; - } - return true; - }, "linearEasing"); - - const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`; - - const supportedWaapiEasing = { - linear: "linear", - ease: "ease", - easeIn: "ease-in", - easeOut: "ease-out", - easeInOut: "ease-in-out", - circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]), - circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]), - backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]), - backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]), - }; - - function mapEasingToNativeEasing(easing, duration) { - if (!easing) { - return undefined; - } - else if (typeof easing === "function") { - return supportsLinearEasing() - ? generateLinearEasing(easing, duration) - : "ease-out"; - } - else if (isBezierDefinition(easing)) { - return cubicBezierAsString(easing); - } - else if (Array.isArray(easing)) { - return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) || - supportedWaapiEasing.easeOut); - } - else { - return supportedWaapiEasing[easing]; - } - } - - function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = "loop", ease = "easeOut", times, } = {}, pseudoElement = undefined) { - const keyframeOptions = { - [valueName]: keyframes, - }; - if (times) - keyframeOptions.offset = times; - const easing = mapEasingToNativeEasing(ease, duration); - /** - * If this is an easing array, apply to keyframes, not animation as a whole - */ - if (Array.isArray(easing)) - keyframeOptions.easing = easing; - if (statsBuffer.value) { - activeAnimations.waapi++; - } - const options = { - delay, - duration, - easing: !Array.isArray(easing) ? easing : "linear", - fill: "both", - iterations: repeat + 1, - direction: repeatType === "reverse" ? "alternate" : "normal", - }; - if (pseudoElement) - options.pseudoElement = pseudoElement; - const animation = element.animate(keyframeOptions, options); - if (statsBuffer.value) { - animation.finished.finally(() => { - activeAnimations.waapi--; - }); - } - return animation; - } - - function isGenerator(type) { - return typeof type === "function" && "applyToOptions" in type; - } - - function applyGeneratorOptions({ type, ...options }) { - if (isGenerator(type) && supportsLinearEasing()) { - return type.applyToOptions(options); - } - else { - options.duration ?? (options.duration = 300); - options.ease ?? (options.ease = "easeOut"); - } - return options; - } - - /** - * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API. - */ - class NativeAnimation extends WithPromise { - constructor(options) { - super(); - this.finishedTime = null; - this.isStopped = false; - /** - * Tracks a manually-set start time that takes precedence over WAAPI's - * dynamic startTime. This is cleared when play() or time setter is called, - * allowing WAAPI to take over timing. - */ - this.manualStartTime = null; - if (!options) - return; - const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options; - this.isPseudoElement = Boolean(pseudoElement); - this.allowFlatten = allowFlatten; - this.options = options; - exports.invariant(typeof options.type !== "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring"); - const transition = applyGeneratorOptions(options); - this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement); - if (transition.autoplay === false) { - this.animation.pause(); - } - this.animation.onfinish = () => { - this.finishedTime = this.time; - if (!pseudoElement) { - const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed); - if (this.updateMotionValue) { - this.updateMotionValue(keyframe); - } - /** - * If we can, we want to commit the final style as set by the user, - * rather than the computed keyframe value supplied by the animation. - * We always do this, even when a motion value is present, to prevent - * a visual flash in Firefox where the WAAPI animation's fill is removed - * during cancel() before the scheduled render can apply the correct value. - */ - setStyle(element, name, keyframe); - this.animation.cancel(); - } - onComplete?.(); - this.notifyFinished(); - }; - } - play() { - if (this.isStopped) - return; - this.manualStartTime = null; - this.animation.play(); - if (this.state === "finished") { - this.updateFinished(); - } - } - pause() { - this.animation.pause(); - } - complete() { - this.animation.finish?.(); - } - cancel() { - try { - this.animation.cancel(); - } - catch (e) { } - } - stop() { - if (this.isStopped) - return; - this.isStopped = true; - const { state } = this; - if (state === "idle" || state === "finished") { - return; - } - if (this.updateMotionValue) { - this.updateMotionValue(); - } - else { - this.commitStyles(); - } - if (!this.isPseudoElement) - this.cancel(); - } - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * In this method, we commit styles back to the DOM before cancelling - * the animation. - * - * This is designed to be overridden by NativeAnimationExtended, which - * will create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to also correctly calculate velocity for any subsequent animation - * while deferring the commit until the next animation frame. - */ - commitStyles() { - const element = this.options?.element; - if (!this.isPseudoElement && element?.isConnected) { - this.animation.commitStyles?.(); - } - } - get duration() { - const duration = this.animation.effect?.getComputedTiming?.().duration || 0; - return millisecondsToSeconds(Number(duration)); - } - get iterationDuration() { - const { delay = 0 } = this.options || {}; - return this.duration + millisecondsToSeconds(delay); - } - get time() { - return millisecondsToSeconds(Number(this.animation.currentTime) || 0); - } - set time(newTime) { - const wasFinished = this.finishedTime !== null; - this.manualStartTime = null; - this.finishedTime = null; - this.animation.currentTime = secondsToMilliseconds(newTime); - if (wasFinished) { - this.animation.pause(); - } - } - /** - * The playback speed of the animation. - * 1 = normal speed, 2 = double speed, 0.5 = half speed. - */ - get speed() { - return this.animation.playbackRate; - } - set speed(newSpeed) { - // Allow backwards playback after finishing - if (newSpeed < 0) - this.finishedTime = null; - this.animation.playbackRate = newSpeed; - } - get state() { - return this.finishedTime !== null - ? "finished" - : this.animation.playState; - } - get startTime() { - return this.manualStartTime ?? Number(this.animation.startTime); - } - set startTime(newStartTime) { - this.manualStartTime = this.animation.startTime = newStartTime; - } - /** - * Attaches a timeline to the animation, for instance the `ScrollTimeline`. - */ - attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) { - if (this.allowFlatten) { - this.animation.effect?.updateTiming({ easing: "linear" }); - } - this.animation.onfinish = null; - if (timeline && supportsScrollTimeline()) { - this.animation.timeline = timeline; - if (rangeStart) - this.animation.rangeStart = rangeStart; - if (rangeEnd) - this.animation.rangeEnd = rangeEnd; - return noop$1; - } - else { - return observe(this); - } - } - } - - const unsupportedEasingFunctions = { - anticipate, - backInOut, - circInOut, - }; - function isUnsupportedEase(key) { - return key in unsupportedEasingFunctions; - } - function replaceStringEasing(transition) { - if (typeof transition.ease === "string" && - isUnsupportedEase(transition.ease)) { - transition.ease = unsupportedEasingFunctions[transition.ease]; - } - } - - /** - * 10ms is chosen here as it strikes a balance between smooth - * results (more than one keyframe per frame at 60fps) and - * keyframe quantity. - */ - const sampleDelta = 10; //ms - class NativeAnimationExtended extends NativeAnimation { - constructor(options) { - /** - * The base NativeAnimation function only supports a subset - * of Motion easings, and WAAPI also only supports some - * easing functions via string/cubic-bezier definitions. - * - * This function replaces those unsupported easing functions - * with a JS easing function. This will later get compiled - * to a linear() easing function. - */ - replaceStringEasing(options); - /** - * Ensure we replace the transition type with a generator function - * before passing to WAAPI. - * - * TODO: Does this have a better home? It could be shared with - * JSAnimation. - */ - replaceTransitionType(options); - super(options); - /** - * Only set startTime when the animation should autoplay. - * Setting startTime on a paused WAAPI animation unpauses it - * (per the WAAPI spec), which breaks autoplay: false. - */ - if (options.startTime !== undefined && options.autoplay !== false) { - this.startTime = options.startTime; - } - this.options = options; - } - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * Rather than read committed styles back out of the DOM, we can - * create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to calculate velocity for any subsequent animation. - */ - updateMotionValue(value) { - const { motionValue, onUpdate, onComplete, element, ...options } = this.options; - if (!motionValue) - return; - if (value !== undefined) { - motionValue.set(value); - return; - } - const sampleAnimation = new JSAnimation({ - ...options, - autoplay: false, - }); - /** - * Use wall-clock elapsed time for sampling. - * Under CPU load, WAAPI's currentTime may not reflect actual - * elapsed time, causing incorrect sampling and visual jumps. - */ - const sampleTime = Math.max(sampleDelta, time.now() - this.startTime); - const delta = clamp(0, sampleDelta, sampleTime - sampleDelta); - const current = sampleAnimation.sample(sampleTime).value; - /** - * Write the estimated value to inline style so it persists - * after cancel(), covering the async gap before the next - * animation starts. - */ - const { name } = this.options; - if (element && name) - setStyle(element, name, current); - motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta); - sampleAnimation.stop(); - } - } - - /** - * Check if a value is animatable. Examples: - * - * ✅: 100, "100px", "#fff" - * ❌: "block", "url(2.jpg)" - * @param value - * - * @internal - */ - const isAnimatable = (value, name) => { - // If the list of keys that might be non-animatable grows, replace with Set - if (name === "zIndex") - return false; - // If it's a number or a keyframes array, we can animate it. We might at some point - // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this, - // but for now lets leave it like this for performance reasons - if (typeof value === "number" || Array.isArray(value)) - return true; - if (typeof value === "string" && // It's animatable if we have a string - (complex.test(value) || value === "0") && // And it contains numbers and/or colors - !value.startsWith("url(") // Unless it starts with "url(" - ) { - return true; - } - return false; - }; - - function hasKeyframesChanged(keyframes) { - const current = keyframes[0]; - if (keyframes.length === 1) - return true; - for (let i = 0; i < keyframes.length; i++) { - if (keyframes[i] !== current) - return true; - } - } - function canAnimate(keyframes, name, type, velocity) { - /** - * Check if we're able to animate between the start and end keyframes, - * and throw a warning if we're attempting to animate between one that's - * animatable and another that isn't. - */ - const originKeyframe = keyframes[0]; - if (originKeyframe === null) { - return false; - } - /** - * These aren't traditionally animatable but we do support them. - * In future we could look into making this more generic or replacing - * this function with mix() === mixImmediate - */ - if (name === "display" || name === "visibility") - return true; - const targetKeyframe = keyframes[keyframes.length - 1]; - const isOriginAnimatable = isAnimatable(originKeyframe, name); - const isTargetAnimatable = isAnimatable(targetKeyframe, name); - exports.warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable"); - // Always skip if any of these are true - if (!isOriginAnimatable || !isTargetAnimatable) { - return false; - } - return (hasKeyframesChanged(keyframes) || - ((type === "spring" || isGenerator(type)) && velocity)); - } - - function makeAnimationInstant(options) { - options.duration = 0; - options.type = "keyframes"; - } - - /** - * A list of values that can be hardware-accelerated. - */ - const acceleratedValues = new Set([ - "opacity", - "clipPath", - "filter", - "transform", - // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved - // or until we implement support for linear() easing. - // "background-color" - ]); - - const browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/; - function hasBrowserOnlyColors(keyframes) { - for (let i = 0; i < keyframes.length; i++) { - if (typeof keyframes[i] === "string" && - browserColorFunctions.test(keyframes[i])) { - return true; - } - } - return false; - } - - const colorProperties = new Set([ - "color", - "backgroundColor", - "outlineColor", - "fill", - "stroke", - "borderColor", - "borderTopColor", - "borderRightColor", - "borderBottomColor", - "borderLeftColor", - ]); - const supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate")); - function supportsBrowserAnimation(options) { - const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options; - const subject = motionValue?.owner?.current; - /** - * We use this check instead of isHTMLElement() because we explicitly - * **don't** want elements in different timing contexts (i.e. popups) - * to be accelerated, as it's not possible to sync these animations - * properly with those driven from the main window frameloop. - */ - if (!(subject instanceof HTMLElement)) { - return false; - } - const { onUpdate, transformTemplate } = motionValue.owner.getProps(); - return (supportsWaapi() && - name && - /** - * Force WAAPI for color properties with browser-only color formats - * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse. - */ - (acceleratedValues.has(name) || - (colorProperties.has(name) && - hasBrowserOnlyColors(keyframes))) && - (name !== "transform" || !transformTemplate) && - /** - * If we're outputting values to onUpdate then we can't use WAAPI as there's - * no way to read the value from WAAPI every frame. - */ - !onUpdate && - !repeatDelay && - repeatType !== "mirror" && - damping !== 0 && - type !== "inertia"); - } - - /** - * Maximum time allowed between an animation being created and it being - * resolved for us to use the latter as the start time. - * - * This is to ensure that while we prefer to "start" an animation as soon - * as it's triggered, we also want to avoid a visual jump if there's a big delay - * between these two moments. - */ - const MAX_RESOLVE_DELAY = 40; - class AsyncMotionValueAnimation extends WithPromise { - constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", keyframes, name, motionValue, element, ...options }) { - super(); - /** - * Bound to support return animation.stop pattern - */ - this.stop = () => { - if (this._animation) { - this._animation.stop(); - this.stopTimeline?.(); - } - this.keyframeResolver?.cancel(); - }; - this.createdAt = time.now(); - const optionsWithDefaults = { - autoplay, - delay, - type, - repeat, - repeatDelay, - repeatType, - name, - motionValue, - element, - ...options, - }; - const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver; - this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element); - this.keyframeResolver?.scheduleResolve(); - } - onKeyframesResolved(keyframes, finalKeyframe, options, sync) { - this.keyframeResolver = undefined; - const { name, type, velocity, delay, isHandoff, onUpdate } = options; - this.resolvedAt = time.now(); - /** - * If we can't animate this value with the resolved keyframes - * then we should complete it immediately. - */ - let canAnimateValue = true; - if (!canAnimate(keyframes, name, type, velocity)) { - canAnimateValue = false; - if (MotionGlobalConfig.instantAnimations || !delay) { - onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe)); - } - keyframes[0] = keyframes[keyframes.length - 1]; - makeAnimationInstant(options); - options.repeat = 0; - } - /** - * Resolve startTime for the animation. - * - * This method uses the createdAt and resolvedAt to calculate the - * animation startTime. *Ideally*, we would use the createdAt time as t=0 - * as the following frame would then be the first frame of the animation in - * progress, which would feel snappier. - * - * However, if there's a delay (main thread work) between the creation of - * the animation and the first committed frame, we prefer to use resolvedAt - * to avoid a sudden jump into the animation. - */ - const startTime = sync - ? !this.resolvedAt - ? this.createdAt - : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY - ? this.resolvedAt - : this.createdAt - : undefined; - const resolvedOptions = { - startTime, - finalKeyframe, - ...options, - keyframes, - }; - /** - * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via - * WAAPI. Therefore, this animation must be JS to ensure it runs "under" the - * optimised animation. - * - * Also skip WAAPI when keyframes aren't animatable, as the resolved - * values may not be valid CSS and would trigger browser warnings. - */ - const useWaapi = canAnimateValue && - !isHandoff && - supportsBrowserAnimation(resolvedOptions); - const element = resolvedOptions.motionValue?.owner?.current; - let animation; - if (useWaapi) { - try { - animation = new NativeAnimationExtended({ - ...resolvedOptions, - element, - }); - } - catch { - animation = new JSAnimation(resolvedOptions); - } - } - else { - animation = new JSAnimation(resolvedOptions); - } - animation.finished.then(() => { - this.notifyFinished(); - }).catch(noop$1); - if (this.pendingTimeline) { - this.stopTimeline = animation.attachTimeline(this.pendingTimeline); - this.pendingTimeline = undefined; - } - this._animation = animation; - } - get finished() { - if (!this._animation) { - return this._finished; - } - else { - return this.animation.finished; - } - } - then(onResolve, _onReject) { - return this.finished.finally(onResolve).then(() => { }); - } - get animation() { - if (!this._animation) { - this.keyframeResolver?.resume(); - flushKeyframeResolvers(); - } - return this._animation; - } - get duration() { - return this.animation.duration; - } - get iterationDuration() { - return this.animation.iterationDuration; - } - get time() { - return this.animation.time; - } - set time(newTime) { - this.animation.time = newTime; - } - get speed() { - return this.animation.speed; - } - get state() { - return this.animation.state; - } - set speed(newSpeed) { - this.animation.speed = newSpeed; - } - get startTime() { - return this.animation.startTime; - } - attachTimeline(timeline) { - if (this._animation) { - this.stopTimeline = this.animation.attachTimeline(timeline); - } - else { - this.pendingTimeline = timeline; - } - return () => this.stop(); - } - play() { - this.animation.play(); - } - pause() { - this.animation.pause(); - } - complete() { - this.animation.complete(); - } - cancel() { - if (this._animation) { - this.animation.cancel(); - } - this.keyframeResolver?.cancel(); - } - } - - class GroupAnimation { - constructor(animations) { - // Bound to accomadate common `return animation.stop` pattern - this.stop = () => this.runAll("stop"); - this.animations = animations.filter(Boolean); - } - get finished() { - return Promise.all(this.animations.map((animation) => animation.finished)); - } - /** - * TODO: Filter out cancelled or stopped animations before returning - */ - getAll(propName) { - return this.animations[0][propName]; - } - setAll(propName, newValue) { - for (let i = 0; i < this.animations.length; i++) { - this.animations[i][propName] = newValue; - } - } - attachTimeline(timeline) { - const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline)); - return () => { - subscriptions.forEach((cancel, i) => { - cancel && cancel(); - this.animations[i].stop(); - }); - }; - } - get time() { - return this.getAll("time"); - } - set time(time) { - this.setAll("time", time); - } - get speed() { - return this.getAll("speed"); - } - set speed(speed) { - this.setAll("speed", speed); - } - get state() { - return this.getAll("state"); - } - get startTime() { - return this.getAll("startTime"); - } - get duration() { - return getMax(this.animations, "duration"); - } - get iterationDuration() { - return getMax(this.animations, "iterationDuration"); - } - runAll(methodName) { - this.animations.forEach((controls) => controls[methodName]()); - } - play() { - this.runAll("play"); - } - pause() { - this.runAll("pause"); - } - cancel() { - this.runAll("cancel"); - } - complete() { - this.runAll("complete"); - } - } - function getMax(animations, propName) { - let max = 0; - for (let i = 0; i < animations.length; i++) { - const value = animations[i][propName]; - if (value !== null && value > max) { - max = value; - } - } - return max; - } - - class GroupAnimationWithThen extends GroupAnimation { - then(onResolve, _onReject) { - return this.finished.finally(onResolve).then(() => { }); - } - } - - class NativeAnimationWrapper extends NativeAnimation { - constructor(animation) { - super(); - this.animation = animation; - animation.onfinish = () => { - this.finishedTime = this.time; - this.notifyFinished(); - }; - } - } - - const animationMaps = new WeakMap(); - const animationMapKey = (name, pseudoElement = "") => `${name}:${pseudoElement}`; - function getAnimationMap(element) { - let map = animationMaps.get(element); - if (!map) { - map = new Map(); - animationMaps.set(element, map); - } - return map; - } - - function calcChildStagger(children, child, delayChildren, staggerChildren = 0, staggerDirection = 1) { - const index = Array.from(children) - .sort((a, b) => a.sortNodePosition(b)) - .indexOf(child); - const numChildren = children.size; - const maxStaggerDuration = (numChildren - 1) * staggerChildren; - const delayIsFunction = typeof delayChildren === "function"; - return delayIsFunction - ? delayChildren(index, numChildren) - : staggerDirection === 1 - ? index * staggerChildren - : maxStaggerDuration - index * staggerChildren; - } - - /** - * Maximum time between the value of two frames, beyond which we - * assume the velocity has since been 0. - */ - const MAX_VELOCITY_DELTA = 30; - const isFloat = (value) => { - return !isNaN(parseFloat(value)); - }; - const collectMotionValues = { - current: undefined, - }; - /** - * `MotionValue` is used to track the state and velocity of motion values. - * - * @public - */ - class MotionValue { - /** - * @param init - The initiating value - * @param config - Optional configuration options - * - * - `transformer`: A function to transform incoming values with. - */ - constructor(init, options = {}) { - /** - * Tracks whether this value can output a velocity. Currently this is only true - * if the value is numerical, but we might be able to widen the scope here and support - * other value types. - * - * @internal - */ - this.canTrackVelocity = null; - /** - * An object containing a SubscriptionManager for each active event. - */ - this.events = {}; - this.updateAndNotify = (v) => { - const currentTime = time.now(); - /** - * If we're updating the value during another frame or eventloop - * than the previous frame, then the we set the previous frame value - * to current. - */ - if (this.updatedAt !== currentTime) { - this.setPrevFrameValue(); - } - this.prev = this.current; - this.setCurrent(v); - // Update update subscribers - if (this.current !== this.prev) { - this.events.change?.notify(this.current); - if (this.dependents) { - for (const dependent of this.dependents) { - dependent.dirty(); - } - } - } - }; - this.hasAnimated = false; - this.setCurrent(init); - this.owner = options.owner; - } - setCurrent(current) { - this.current = current; - this.updatedAt = time.now(); - if (this.canTrackVelocity === null && current !== undefined) { - this.canTrackVelocity = isFloat(this.current); - } - } - setPrevFrameValue(prevFrameValue = this.current) { - this.prevFrameValue = prevFrameValue; - this.prevUpdatedAt = this.updatedAt; - } - /** - * Adds a function that will be notified when the `MotionValue` is updated. - * - * It returns a function that, when called, will cancel the subscription. - * - * When calling `onChange` inside a React component, it should be wrapped with the - * `useEffect` hook. As it returns an unsubscribe function, this should be returned - * from the `useEffect` function to ensure you don't add duplicate subscribers.. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * const y = useMotionValue(0) - * const opacity = useMotionValue(1) - * - * useEffect(() => { - * function updateOpacity() { - * const maxXY = Math.max(x.get(), y.get()) - * const newOpacity = transform(maxXY, [0, 100], [1, 0]) - * opacity.set(newOpacity) - * } - * - * const unsubscribeX = x.on("change", updateOpacity) - * const unsubscribeY = y.on("change", updateOpacity) - * - * return () => { - * unsubscribeX() - * unsubscribeY() - * } - * }, []) - * - * return - * } - * ``` - * - * @param subscriber - A function that receives the latest value. - * @returns A function that, when called, will cancel this subscription. - * - * @deprecated - */ - onChange(subscription) { - { - warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on("change", callback).`); - } - return this.on("change", subscription); - } - on(eventName, callback) { - if (!this.events[eventName]) { - this.events[eventName] = new SubscriptionManager(); - } - const unsubscribe = this.events[eventName].add(callback); - if (eventName === "change") { - return () => { - unsubscribe(); - /** - * If we have no more change listeners by the start - * of the next frame, stop active animations. - */ - frame.read(() => { - if (!this.events.change.getSize()) { - this.stop(); - } - }); - }; - } - return unsubscribe; - } - clearListeners() { - for (const eventManagers in this.events) { - this.events[eventManagers].clear(); - } - } - /** - * Attaches a passive effect to the `MotionValue`. - */ - attach(passiveEffect, stopPassiveEffect) { - this.passiveEffect = passiveEffect; - this.stopPassiveEffect = stopPassiveEffect; - } - /** - * Sets the state of the `MotionValue`. - * - * @remarks - * - * ```jsx - * const x = useMotionValue(0) - * x.set(10) - * ``` - * - * @param latest - Latest value to set. - * @param render - Whether to notify render subscribers. Defaults to `true` - * - * @public - */ - set(v) { - if (!this.passiveEffect) { - this.updateAndNotify(v); - } - else { - this.passiveEffect(v, this.updateAndNotify); - } - } - setWithVelocity(prev, current, delta) { - this.set(current); - this.prev = undefined; - this.prevFrameValue = prev; - this.prevUpdatedAt = this.updatedAt - delta; - } - /** - * Set the state of the `MotionValue`, stopping any active animations, - * effects, and resets velocity to `0`. - */ - jump(v, endAnimation = true) { - this.updateAndNotify(v); - this.prev = v; - this.prevUpdatedAt = this.prevFrameValue = undefined; - endAnimation && this.stop(); - if (this.stopPassiveEffect) - this.stopPassiveEffect(); - } - dirty() { - this.events.change?.notify(this.current); - } - addDependent(dependent) { - if (!this.dependents) { - this.dependents = new Set(); - } - this.dependents.add(dependent); - } - removeDependent(dependent) { - if (this.dependents) { - this.dependents.delete(dependent); - } - } - /** - * Returns the latest state of `MotionValue` - * - * @returns - The latest state of `MotionValue` - * - * @public - */ - get() { - if (collectMotionValues.current) { - collectMotionValues.current.push(this); - } - return this.current; - } - /** - * @public - */ - getPrevious() { - return this.prev; - } - /** - * Returns the latest velocity of `MotionValue` - * - * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical. - * - * @public - */ - getVelocity() { - const currentTime = time.now(); - if (!this.canTrackVelocity || - this.prevFrameValue === undefined || - currentTime - this.updatedAt > MAX_VELOCITY_DELTA) { - return 0; - } - const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA); - // Casts because of parseFloat's poor typing - return velocityPerSecond(parseFloat(this.current) - - parseFloat(this.prevFrameValue), delta); - } - /** - * Registers a new animation to control this `MotionValue`. Only one - * animation can drive a `MotionValue` at one time. - * - * ```jsx - * value.start() - * ``` - * - * @param animation - A function that starts the provided animation - */ - start(startAnimation) { - this.stop(); - return new Promise((resolve) => { - this.hasAnimated = true; - this.animation = startAnimation(resolve); - if (this.events.animationStart) { - this.events.animationStart.notify(); - } - }).then(() => { - if (this.events.animationComplete) { - this.events.animationComplete.notify(); - } - this.clearAnimation(); - }); - } - /** - * Stop the currently active animation. - * - * @public - */ - stop() { - if (this.animation) { - this.animation.stop(); - if (this.events.animationCancel) { - this.events.animationCancel.notify(); - } - } - this.clearAnimation(); - } - /** - * Returns `true` if this value is currently animating. - * - * @public - */ - isAnimating() { - return !!this.animation; - } - clearAnimation() { - delete this.animation; - } - /** - * Destroy and clean up subscribers to this `MotionValue`. - * - * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically - * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually - * created a `MotionValue` via the `motionValue` function. - * - * @public - */ - destroy() { - this.dependents?.clear(); - this.events.destroy?.notify(); - this.clearListeners(); - this.stop(); - if (this.stopPassiveEffect) { - this.stopPassiveEffect(); - } - } - } - function motionValue(init, options) { - return new MotionValue(init, options); - } - - /** - * If `transition` has `inherit: true`, shallow-merge it with - * `parentTransition` (child keys win) and strip the `inherit` key. - * Otherwise return `transition` unchanged. - */ - function resolveTransition(transition, parentTransition) { - if (transition?.inherit && parentTransition) { - const { inherit: _, ...rest } = transition; - return { ...parentTransition, ...rest }; - } - return transition; - } - - function getValueTransition$1(transition, key) { - const valueTransition = transition?.[key] ?? - transition?.["default"] ?? - transition; - if (valueTransition !== transition) { - return resolveTransition(valueTransition, transition); - } - return valueTransition; - } - - const underDampedSpring = { - type: "spring", - stiffness: 500, - damping: 25, - restSpeed: 10, - }; - const criticallyDampedSpring = (target) => ({ - type: "spring", - stiffness: 550, - damping: target === 0 ? 2 * Math.sqrt(550) : 30, - restSpeed: 10, - }); - const keyframesTransition = { - type: "keyframes", - duration: 0.8, - }; - /** - * Default easing curve is a slightly shallower version of - * the default browser easing curve. - */ - const ease = { - type: "keyframes", - ease: [0.25, 0.1, 0.35, 1], - duration: 0.3, - }; - const getDefaultTransition = (valueKey, { keyframes }) => { - if (keyframes.length > 2) { - return keyframesTransition; - } - else if (transformProps.has(valueKey)) { - return valueKey.startsWith("scale") - ? criticallyDampedSpring(keyframes[1]) - : underDampedSpring; - } - return ease; - }; - - const orchestrationKeys = new Set([ - "when", - "delay", - "delayChildren", - "staggerChildren", - "staggerDirection", - "repeat", - "repeatType", - "repeatDelay", - "from", - "elapsed", - ]); - /** - * Decide whether a transition is defined on a given Transition. - * This filters out orchestration options and returns true - * if any options are left. - */ - function isTransitionDefined(transition) { - for (const key in transition) { - if (!orchestrationKeys.has(key)) - return true; - } - return false; - } - - const animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => { - const valueTransition = getValueTransition$1(transition, name) || {}; - /** - * Most transition values are currently completely overwritten by value-specific - * transitions. In the future it'd be nicer to blend these transitions. But for now - * delay actually does inherit from the root transition if not value-specific. - */ - const delay = valueTransition.delay || transition.delay || 0; - /** - * Elapsed isn't a public transition option but can be passed through from - * optimized appear effects in milliseconds. - */ - let { elapsed = 0 } = transition; - elapsed = elapsed - secondsToMilliseconds(delay); - const options = { - keyframes: Array.isArray(target) ? target : [null, target], - ease: "easeOut", - velocity: value.getVelocity(), - ...valueTransition, - delay: -elapsed, - onUpdate: (v) => { - value.set(v); - valueTransition.onUpdate && valueTransition.onUpdate(v); - }, - onComplete: () => { - onComplete(); - valueTransition.onComplete && valueTransition.onComplete(); - }, - name, - motionValue: value, - element: isHandoff ? undefined : element, - }; - /** - * If there's no transition defined for this value, we can generate - * unique transition settings for this value. - */ - if (!isTransitionDefined(valueTransition)) { - Object.assign(options, getDefaultTransition(name, options)); - } - /** - * Both WAAPI and our internal animation functions use durations - * as defined by milliseconds, while our external API defines them - * as seconds. - */ - options.duration && (options.duration = secondsToMilliseconds(options.duration)); - options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay)); - /** - * Support deprecated way to set initial value. Prefer keyframe syntax. - */ - if (options.from !== undefined) { - options.keyframes[0] = options.from; - } - let shouldSkip = false; - if (options.type === false || - (options.duration === 0 && !options.repeatDelay)) { - makeAnimationInstant(options); - if (options.delay === 0) { - shouldSkip = true; - } - } - if (MotionGlobalConfig.instantAnimations || - MotionGlobalConfig.skipAnimations || - element?.shouldSkipAnimations || - valueTransition.skipAnimations) { - shouldSkip = true; - makeAnimationInstant(options); - options.delay = 0; - } - /** - * If the transition type or easing has been explicitly set by the user - * then we don't want to allow flattening the animation. - */ - options.allowFlatten = !valueTransition.type && !valueTransition.ease; - /** - * If we can or must skip creating the animation, and apply only - * the final keyframe, do so. We also check once keyframes are resolved but - * this early check prevents the need to create an animation at all. - */ - if (shouldSkip && !isHandoff && value.get() !== undefined) { - const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition); - if (finalKeyframe !== undefined) { - frame.update(() => { - options.onUpdate(finalKeyframe); - options.onComplete(); - }); - return; - } - } - return valueTransition.isSync - ? new JSAnimation(options) - : new AsyncMotionValueAnimation(options); - }; - - const MIN_LAYOUT_DISTANCE = 20; - function bezierPoint(t, origin, control, target) { - const inv = 1 - t; - return inv * inv * origin + 2 * inv * t * control + t * t * target; - } - function bezierTangentAngle(t, originX, controlX, targetX, originY, controlY, targetY) { - const dx = 2 * (1 - t) * (controlX - originX) + 2 * t * (targetX - controlX); - const dy = 2 * (1 - t) * (controlY - originY) + 2 * t * (targetY - controlY); - return Math.atan2(dy, dx) * (180 / Math.PI); - } - function computeArcControlPoint(fromX, fromY, toX, toY, strength, peak) { - const deltaX = toX - fromX; - const deltaY = toY - fromY; - const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); - if (distance > 0) { - const normalPerpX = -deltaY / distance; - const normalPerpY = deltaX / distance; - const desiredHeight = strength * distance; - return { - x: fromX + deltaX * peak + normalPerpX * desiredHeight, - y: fromY + deltaY * peak + normalPerpY * desiredHeight, - }; - } - return { x: fromX, y: fromY }; - } - /** - * The pure sampling factory: `(from, to) => (t) => point`. Internal — - * used by {@link arc} and the unit tests. Not part of the public surface. - */ - function createArcPath({ strength = 0.5, peak = 0.5, direction, rotate = false, } = {}) { - const rotationScale = rotate === true ? 1 : typeof rotate === "number" ? rotate : 0; - // Auto-direction only: persists across calls to flip the bulge back - // onto the same screen side when the dominant axis changes between - // calls. Reuse the factory (module scope / useMemo) to keep this alive. - let prevBulgeSign; - const createInterpolator = (from, to) => { - const dx = to.x - from.x; - const dy = to.y - from.y; - let signed; - if (direction === "cw") { - signed = -strength; - } - else if (direction === "ccw") { - signed = strength; - } - else { - const dom = Math.abs(dx) >= Math.abs(dy) ? dx : dy; - signed = dom < 0 ? -strength : strength; - } - let control = computeArcControlPoint(from.x, from.y, to.x, to.y, signed, peak); - if (direction === undefined) { - const isVertical = Math.abs(dx) < Math.abs(dy); - const midX = from.x + dx * peak; - const midY = from.y + dy * peak; - const bulgeSign = isVertical - ? Math.sign(control.x - midX) - : Math.sign(control.y - midY); - if (prevBulgeSign !== undefined && - bulgeSign !== 0 && - bulgeSign !== prevBulgeSign) { - signed = -signed; - control = computeArcControlPoint(from.x, from.y, to.x, to.y, signed, peak); - } - else if (bulgeSign !== 0) { - prevBulgeSign = bulgeSign; - } - } - const tangent0 = rotationScale - ? bezierTangentAngle(0, from.x, control.x, to.x, from.y, control.y, to.y) - : 0; - const tangent1 = rotationScale - ? bezierTangentAngle(1, from.x, control.x, to.x, from.y, control.y, to.y) - : 0; - const tangentDelta = rotationScale - ? wrap(-180, 180, tangent1 - tangent0) - : 0; - return (t) => { - const out = { - x: bezierPoint(t, from.x, control.x, to.x), - y: bezierPoint(t, from.y, control.y, to.y), - }; - if (rotationScale) { - const raw = bezierTangentAngle(t, from.x, control.x, to.x, from.y, control.y, to.y); - const baseline = tangent0 + tangentDelta * t; - out.rotate = wrap(-180, 180, raw - baseline) * rotationScale; - } - return out; - }; - }; - return createInterpolator; - } - /** - * Creates a curved path for `transition.path`: - * - * ```ts - * - * ``` - * - * Reuse the returned value (module scope / useMemo / useRef) so its - * continuity closure survives re-renders — a fresh `arc()` has no memory. - */ - function arc(options = {}) { - const sample = createArcPath(options); - const path = { - interpolateProjection(delta) { - // `from` is the current translate offset (carries any in-flight - // displacement when interrupted); `to` is the new layout origin. - // The distance floor avoids visible wobble on tiny shifts. - const tx = delta.x.translate; - const ty = delta.y.translate; - if (Math.sqrt(tx * tx + ty * ty) < MIN_LAYOUT_DISTANCE) { - return undefined; - } - return sample({ x: tx, y: ty }, { x: 0, y: 0 }); - }, - animateVisualElement(visualElement, target, transition, delay, animations) { - if (!("x" in target || "y" in target)) - return; - const xValue = visualElement.getValue("x", visualElement.latestValues["x"] ?? 0); - const yValue = visualElement.getValue("y", visualElement.latestValues["y"] ?? 0); - const xRaw = target.x; - const yRaw = target.y; - const xFrom = (Array.isArray(xRaw) && xRaw[0] != null - ? xRaw[0] - : xValue?.get()) ?? 0; - const yFrom = (Array.isArray(yRaw) && yRaw[0] != null - ? yRaw[0] - : yValue?.get()) ?? 0; - const xTo = (Array.isArray(xRaw) - ? xRaw[xRaw.length - 1] - : xRaw ?? xFrom); - const yTo = (Array.isArray(yRaw) - ? yRaw[yRaw.length - 1] - : yRaw ?? yFrom); - // Interruption needs no flag: x/y already hold the displaced - // mid-arc position, so xFrom/yFrom carry the continuity geometry. - const interpolate = sample({ x: xFrom, y: yFrom }, { x: xTo, y: yTo }); - // Drive a dedicated `pathRotation` value (composed onto `rotate` - // at the build sites) rather than `rotate` itself, so a - // concurrent rotate animation composes and nothing accumulates - // on interrupt. - const pathRotationValue = interpolate(0).rotate !== undefined - ? visualElement.getValue("pathRotation", 0) - : undefined; - const pathTransition = { - delay, - ...getValueTransition$1(transition || {}, "x"), - }; - delete pathTransition.path; - const progress = motionValue(0); - progress.start(animateMotionValue("", progress, [0, 1000], { - ...pathTransition, - isSync: true, - velocity: 0, - onUpdate: (latest) => { - const point = interpolate(latest / 1000); - xValue?.set(point.x); - yValue?.set(point.y); - if (pathRotationValue && point.rotate !== undefined) { - pathRotationValue.set(point.rotate); - } - }, - onComplete: () => { - xValue?.set(xTo); - yValue?.set(yTo); - pathRotationValue?.set(0); - }, - // Interrupt/cancel must clear our additive contribution - // so it can't linger on top of the user's `rotate`. - onStop: () => pathRotationValue?.set(0), - onCancel: () => pathRotationValue?.set(0), - })); - if (progress.animation) - animations.push(progress.animation); - delete target.x; - delete target.y; - }, - }; - return path; - } - - /** - * Parse Framer's special CSS variable format into a CSS token and a fallback. - * - * ``` - * `var(--foo, #fff)` => [`--foo`, '#fff'] - * ``` - * - * @param current - */ - const splitCSSVariableRegex = - // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words - /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u; - function parseCSSVariable(current) { - const match = splitCSSVariableRegex.exec(current); - if (!match) - return [,]; - const [, token1, token2, fallback] = match; - return [`--${token1 ?? token2}`, fallback]; - } - const maxDepth = 4; - function getVariableValue(current, element, depth = 1) { - exports.invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth"); - const [token, fallback] = parseCSSVariable(current); - // No CSS variable detected - if (!token) - return; - // Attempt to read this CSS variable off the element - const resolved = window.getComputedStyle(element).getPropertyValue(token); - if (resolved) { - const trimmed = resolved.trim(); - return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed; - } - return isCSSVariableToken(fallback) - ? getVariableValue(fallback, element, depth + 1) - : fallback; - } - - function getValueState(visualElement) { - const state = [{}, {}]; - visualElement?.values.forEach((value, key) => { - state[0][key] = value.get(); - state[1][key] = value.getVelocity(); - }); - return state; - } - function resolveVariantFromProps(props, definition, custom, visualElement) { - /** - * If the variant definition is a function, resolve. - */ - if (typeof definition === "function") { - const [current, velocity] = getValueState(visualElement); - definition = definition(custom !== undefined ? custom : props.custom, current, velocity); - } - /** - * If the variant definition is a variant label, or - * the function returned a variant label, resolve. - */ - if (typeof definition === "string") { - definition = props.variants && props.variants[definition]; - } - /** - * At this point we've resolved both functions and variant labels, - * but the resolved variant label might itself have been a function. - * If so, resolve. This can only have returned a valid target object. - */ - if (typeof definition === "function") { - const [current, velocity] = getValueState(visualElement); - definition = definition(custom !== undefined ? custom : props.custom, current, velocity); - } - return definition; - } - - function resolveVariant(visualElement, definition, custom) { - const props = visualElement.getProps(); - return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement); - } - - const positionalKeys = new Set([ - "width", - "height", - "top", - "left", - "right", - "bottom", - ...transformPropOrder, - ]); - - const isKeyframesTarget = (v) => { - return Array.isArray(v); - }; - - /** - * Set VisualElement's MotionValue, creating a new MotionValue for it if - * it doesn't exist. - */ - function setMotionValue(visualElement, key, value) { - if (visualElement.hasValue(key)) { - visualElement.getValue(key).set(value); - } - else { - visualElement.addValue(key, motionValue(value)); - } - } - function resolveFinalValueInKeyframes(v) { - // TODO maybe throw if v.length - 1 is placeholder token? - return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v; - } - function setTarget(visualElement, definition) { - const resolved = resolveVariant(visualElement, definition); - let { transitionEnd = {}, transition = {}, ...target } = resolved || {}; - target = { ...target, ...transitionEnd }; - for (const key in target) { - const value = resolveFinalValueInKeyframes(target[key]); - setMotionValue(visualElement, key, value); - } - } - - const isMotionValue = (value) => Boolean(value && value.getVelocity); - - function isWillChangeMotionValue(value) { - return Boolean(isMotionValue(value) && value.add); - } - - function addValueToWillChange(visualElement, key) { - const willChange = visualElement.getValue("willChange"); - /** - * It could be that a user has set willChange to a regular MotionValue, - * in which case we can't add the value to it. - */ - if (isWillChangeMotionValue(willChange)) { - return willChange.add(key); - } - else if (!willChange && MotionGlobalConfig.WillChange) { - const newWillChange = new MotionGlobalConfig.WillChange("auto"); - visualElement.addValue("willChange", newWillChange); - newWillChange.add(key); - } - } - - function camelToDash(str) { - return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`); - } - - const optimizedAppearDataId = "framerAppearId"; - const optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId); - - function getOptimisedAppearId(visualElement) { - return visualElement.props[optimizedAppearDataAttribute]; - } - - /** - * Decide whether we should block this animation. Previously, we achieved this - * just by checking whether the key was listed in protectedKeys, but this - * posed problems if an animation was triggered by afterChildren and protectedKeys - * had been set to true in the meantime. - */ - function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) { - const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true; - needsAnimating[key] = false; - return shouldBlock; - } - function animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) { - let { transition, transitionEnd, ...target } = targetAndTransition; - const defaultTransition = visualElement.getDefaultTransition(); - transition = transition - ? resolveTransition(transition, defaultTransition) - : defaultTransition; - const reduceMotion = transition?.reduceMotion; - const skipAnimations = transition?.skipAnimations; - if (transitionOverride) - transition = transitionOverride; - const animations = []; - const animationTypeState = type && - visualElement.animationState && - visualElement.animationState.getState()[type]; - const path = transition?.path; - if (path) { - // path mutates `target` to claim x/y; loop below skips them. - path.animateVisualElement(visualElement, target, transition, delay, animations); - } - for (const key in target) { - const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null); - const valueTarget = target[key]; - if (valueTarget === undefined || - (animationTypeState && - shouldBlockAnimation(animationTypeState, key))) { - continue; - } - const valueTransition = { - delay, - ...getValueTransition$1(transition || {}, key), - }; - if (skipAnimations) - valueTransition.skipAnimations = true; - /** - * If the value is already at the defined target, skip the animation. - * We still re-assert the value via frame.update to take precedence - * over any stale transitionEnd callbacks from previous animations. - */ - const currentValue = value.get(); - if (currentValue !== undefined && - !value.isAnimating() && - !Array.isArray(valueTarget) && - valueTarget === currentValue && - !valueTransition.velocity) { - frame.update(() => value.set(valueTarget)); - continue; - } - /** - * If this is the first time a value is being animated, check - * to see if we're handling off from an existing animation. - */ - let isHandoff = false; - if (window.MotionHandoffAnimation) { - const appearId = getOptimisedAppearId(visualElement); - if (appearId) { - const startTime = window.MotionHandoffAnimation(appearId, key, frame); - if (startTime !== null) { - valueTransition.startTime = startTime; - isHandoff = true; - } - } - } - addValueToWillChange(visualElement, key); - const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion; - value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key) - ? { type: false } - : valueTransition, visualElement, isHandoff)); - const animation = value.animation; - if (animation) { - animations.push(animation); - } - } - if (transitionEnd) { - const applyTransitionEnd = () => frame.update(() => { - transitionEnd && setTarget(visualElement, transitionEnd); - }); - if (animations.length) { - Promise.all(animations).then(applyTransitionEnd); - } - else { - applyTransitionEnd(); - } - } - return animations; - } - - function animateVariant(visualElement, variant, options = {}) { - const resolved = resolveVariant(visualElement, variant, options.type === "exit" - ? visualElement.presenceContext?.custom - : undefined); - let { transition = visualElement.getDefaultTransition() || {} } = resolved || {}; - if (options.transitionOverride) { - transition = options.transitionOverride; - } - /** - * If we have a variant, create a callback that runs it as an animation. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - const getAnimation = resolved - ? () => Promise.all(animateTarget(visualElement, resolved, options)) - : () => Promise.resolve(); - /** - * If we have children, create a callback that runs all their animations. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size - ? (forwardDelay = 0) => { - const { delayChildren = 0, staggerChildren, staggerDirection, } = transition; - return animateChildren(visualElement, variant, forwardDelay, delayChildren, staggerChildren, staggerDirection, options); - } - : () => Promise.resolve(); - /** - * If the transition explicitly defines a "when" option, we need to resolve either - * this animation or all children animations before playing the other. - */ - const { when } = transition; - if (when) { - const [first, last] = when === "beforeChildren" - ? [getAnimation, getChildAnimations] - : [getChildAnimations, getAnimation]; - return first().then(() => last()); - } - else { - return Promise.all([getAnimation(), getChildAnimations(options.delay)]); - } - } - function animateChildren(visualElement, variant, delay = 0, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) { - const animations = []; - for (const child of visualElement.variantChildren) { - child.notify("AnimationStart", variant); - animations.push(animateVariant(child, variant, { - ...options, - delay: delay + - (typeof delayChildren === "function" ? 0 : delayChildren) + - calcChildStagger(visualElement.variantChildren, child, delayChildren, staggerChildren, staggerDirection), - }).then(() => child.notify("AnimationComplete", variant))); - } - return Promise.all(animations); - } - - function animateVisualElement(visualElement, definition, options = {}) { - visualElement.notify("AnimationStart", definition); - let animation; - if (Array.isArray(definition)) { - const animations = definition.map((variant) => animateVariant(visualElement, variant, options)); - animation = Promise.all(animations); - } - else if (typeof definition === "string") { - animation = animateVariant(visualElement, definition, options); - } - else { - const resolvedDefinition = typeof definition === "function" - ? resolveVariant(visualElement, definition, options.custom) - : definition; - animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options)); - } - return animation.then(() => { - visualElement.notify("AnimationComplete", definition); - }); - } - - /** - * ValueType for "auto" - */ - const auto = { - test: (v) => v === "auto", - parse: (v) => v, - }; - - /** - * Tests a provided value against a ValueType - */ - const testValueType = (v) => (type) => type.test(v); - - /** - * A list of value types commonly used for dimensions - */ - const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto]; - /** - * Tests a dimensional value against the list of dimension ValueTypes - */ - const findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v)); - - function isNone(value) { - if (typeof value === "number") { - return value === 0; - } - else if (value !== null) { - return value === "none" || value === "0" || isZeroValueString(value); - } - else { - return true; - } - } - - /** - * Properties that should default to 1 or 100% - */ - const maxDefaults = new Set(["brightness", "contrast", "saturate", "opacity"]); - function applyDefaultFilter(v) { - const [name, value] = v.slice(0, -1).split("("); - if (name === "drop-shadow") - return v; - const [number] = value.match(floatRegex) || []; - if (!number) - return v; - const unit = value.replace(number, ""); - let defaultValue = maxDefaults.has(name) ? 1 : 0; - if (number !== value) - defaultValue *= 100; - return name + "(" + defaultValue + unit + ")"; - } - const functionRegex = /\b([a-z-]*)\(.*?\)/gu; - const filter = { - ...complex, - getAnimatableNone: (v) => { - const functions = v.match(functionRegex); - return functions ? functions.map(applyDefaultFilter).join(" ") : v; - }, - }; - - const mask = { - ...complex, - getAnimatableNone: (v) => { - const parsed = complex.parse(v); - const transformer = complex.createTransformer(v); - return transformer(parsed.map((v) => typeof v === "number" ? 0 : typeof v === "object" ? { ...v, alpha: 1 } : v)); - }, - }; - - const int = { - ...number, - transform: Math.round, - }; - - const transformValueTypes = { - rotate: degrees, - /** - * Internal channel for `transition.path` orientToPath. Composed onto - * `rotate` at the transform-build sites so the user's `rotate` is - * never read or overwritten. Not part of `transformPropOrder`. - */ - pathRotation: degrees, - rotateX: degrees, - rotateY: degrees, - rotateZ: degrees, - scale, - scaleX: scale, - scaleY: scale, - scaleZ: scale, - skew: degrees, - skewX: degrees, - skewY: degrees, - distance: px, - translateX: px, - translateY: px, - translateZ: px, - x: px, - y: px, - z: px, - perspective: px, - transformPerspective: px, - opacity: alpha, - originX: progressPercentage, - originY: progressPercentage, - originZ: px, - }; - - const numberValueTypes = { - // Border props - borderWidth: px, - borderTopWidth: px, - borderRightWidth: px, - borderBottomWidth: px, - borderLeftWidth: px, - borderRadius: px, - borderTopLeftRadius: px, - borderTopRightRadius: px, - borderBottomRightRadius: px, - borderBottomLeftRadius: px, - // Positioning props - width: px, - maxWidth: px, - height: px, - maxHeight: px, - top: px, - right: px, - bottom: px, - left: px, - inset: px, - insetBlock: px, - insetBlockStart: px, - insetBlockEnd: px, - insetInline: px, - insetInlineStart: px, - insetInlineEnd: px, - // Spacing props - padding: px, - paddingTop: px, - paddingRight: px, - paddingBottom: px, - paddingLeft: px, - paddingBlock: px, - paddingBlockStart: px, - paddingBlockEnd: px, - paddingInline: px, - paddingInlineStart: px, - paddingInlineEnd: px, - margin: px, - marginTop: px, - marginRight: px, - marginBottom: px, - marginLeft: px, - marginBlock: px, - marginBlockStart: px, - marginBlockEnd: px, - marginInline: px, - marginInlineStart: px, - marginInlineEnd: px, - // Typography - fontSize: px, - // Misc - backgroundPositionX: px, - backgroundPositionY: px, - ...transformValueTypes, - zIndex: int, - // SVG - fillOpacity: alpha, - strokeOpacity: alpha, - numOctaves: int, - }; - - /** - * A map of default value types for common values - */ - const defaultValueTypes = { - ...numberValueTypes, - // Color props - color, - backgroundColor: color, - outlineColor: color, - fill: color, - stroke: color, - // Border props - borderColor: color, - borderTopColor: color, - borderRightColor: color, - borderBottomColor: color, - borderLeftColor: color, - filter, - WebkitFilter: filter, - mask, - WebkitMask: mask, - }; - /** - * Gets the default ValueType for the provided value key - */ - const getDefaultValueType = (key) => defaultValueTypes[key]; - - const customTypes = /*@__PURE__*/ new Set([filter, mask]); - function getAnimatableNone(key, value) { - let defaultValueType = getDefaultValueType(key); - if (!customTypes.has(defaultValueType)) - defaultValueType = complex; - // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target - return defaultValueType.getAnimatableNone - ? defaultValueType.getAnimatableNone(value) - : undefined; - } - - /** - * If we encounter keyframes like "none" or "0" and we also have keyframes like - * "#fff" or "200px 200px" we want to find a keyframe to serve as a template for - * the "none" keyframes. In this case "#fff" or "200px 200px" - then these get turned into - * zero equivalents, i.e. "#fff0" or "0px 0px". - */ - const invalidTemplates = new Set(["auto", "none", "0"]); - function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) { - let i = 0; - let animatableTemplate = undefined; - while (i < unresolvedKeyframes.length && !animatableTemplate) { - const keyframe = unresolvedKeyframes[i]; - if (typeof keyframe === "string" && - !invalidTemplates.has(keyframe) && - analyseComplexValue(keyframe).values.length) { - animatableTemplate = unresolvedKeyframes[i]; - } - i++; - } - if (animatableTemplate && name) { - for (const noneIndex of noneKeyframeIndexes) { - unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate); - } - } - } - - class DOMKeyframesResolver extends KeyframeResolver { - constructor(unresolvedKeyframes, onComplete, name, motionValue, element) { - super(unresolvedKeyframes, onComplete, name, motionValue, element, true); - } - readKeyframes() { - const { unresolvedKeyframes, element, name } = this; - if (!element || !element.current) - return; - super.readKeyframes(); - /** - * If any keyframe is a CSS variable, we need to find its value by sampling the element - */ - for (let i = 0; i < unresolvedKeyframes.length; i++) { - let keyframe = unresolvedKeyframes[i]; - if (typeof keyframe === "string") { - keyframe = keyframe.trim(); - if (isCSSVariableToken(keyframe)) { - const resolved = getVariableValue(keyframe, element.current); - if (resolved !== undefined) { - unresolvedKeyframes[i] = resolved; - } - if (i === unresolvedKeyframes.length - 1) { - this.finalKeyframe = keyframe; - } - } - } - } - /** - * Resolve "none" values. We do this potentially twice - once before and once after measuring keyframes. - * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which - * have a far bigger performance impact. - */ - this.resolveNoneKeyframes(); - /** - * Check to see if unit type has changed. If so schedule jobs that will - * temporarily set styles to the destination keyframes. - * Skip if we have more than two keyframes or this isn't a positional value. - * TODO: We can throw if there are multiple keyframes and the value type changes. - */ - if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) { - return; - } - const [origin, target] = unresolvedKeyframes; - const originType = findDimensionValueType(origin); - const targetType = findDimensionValueType(target); - /** - * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other - * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410. - */ - const originHasVar = containsCSSVariable(origin); - const targetHasVar = containsCSSVariable(target); - if (originHasVar !== targetHasVar && positionalValues[name]) { - this.needsMeasurement = true; - return; - } - /** - * Either we don't recognise these value types or we can animate between them. - */ - if (originType === targetType) - return; - /** - * If both values are numbers or pixels, we can animate between them by - * converting them to numbers. - */ - if (isNumOrPxType(originType) && isNumOrPxType(targetType)) { - for (let i = 0; i < unresolvedKeyframes.length; i++) { - const value = unresolvedKeyframes[i]; - if (typeof value === "string") { - unresolvedKeyframes[i] = parseFloat(value); - } - } - } - else if (positionalValues[name]) { - /** - * Else, the only way to resolve this is by measuring the element. - */ - this.needsMeasurement = true; - } - } - resolveNoneKeyframes() { - const { unresolvedKeyframes, name } = this; - const noneKeyframeIndexes = []; - for (let i = 0; i < unresolvedKeyframes.length; i++) { - if (unresolvedKeyframes[i] === null || - isNone(unresolvedKeyframes[i])) { - noneKeyframeIndexes.push(i); - } - } - if (noneKeyframeIndexes.length) { - makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name); - } - } - measureInitialState() { - const { element, unresolvedKeyframes, name } = this; - if (!element || !element.current) - return; - if (name === "height") { - this.suspendedScrollY = window.pageYOffset; - } - this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current)); - unresolvedKeyframes[0] = this.measuredOrigin; - // Set final key frame to measure after next render - const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1]; - if (measureKeyframe !== undefined) { - element.getValue(name, measureKeyframe).jump(measureKeyframe, false); - } - } - measureEndState() { - const { element, name, unresolvedKeyframes } = this; - if (!element || !element.current) - return; - const value = element.getValue(name); - value && value.jump(this.measuredOrigin, false); - const finalKeyframeIndex = unresolvedKeyframes.length - 1; - const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex]; - unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current)); - if (finalKeyframe !== null && this.finalKeyframe === undefined) { - this.finalKeyframe = finalKeyframe; - } - // If we removed transform values, reapply them before the next render - if (this.removedTransforms?.length) { - this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => { - element - .getValue(unsetTransformName) - .set(unsetTransformValue); - }); - } - this.resolveNoneKeyframes(); - } - } - - const pxValues = new Set([ - // Border props - "borderWidth", - "borderTopWidth", - "borderRightWidth", - "borderBottomWidth", - "borderLeftWidth", - "borderRadius", - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomRightRadius", - "borderBottomLeftRadius", - // Positioning props - "width", - "maxWidth", - "height", - "maxHeight", - "top", - "right", - "bottom", - "left", - "inset", - "insetBlock", - "insetBlockStart", - "insetBlockEnd", - "insetInline", - "insetInlineStart", - "insetInlineEnd", - // Spacing props - "padding", - "paddingTop", - "paddingRight", - "paddingBottom", - "paddingLeft", - "paddingBlock", - "paddingBlockStart", - "paddingBlockEnd", - "paddingInline", - "paddingInlineStart", - "paddingInlineEnd", - "margin", - "marginTop", - "marginRight", - "marginBottom", - "marginLeft", - "marginBlock", - "marginBlockStart", - "marginBlockEnd", - "marginInline", - "marginInlineStart", - "marginInlineEnd", - // Typography - "fontSize", - // Misc - "backgroundPositionX", - "backgroundPositionY", - ]); - - function applyPxDefaults(keyframes, name) { - for (let i = 0; i < keyframes.length; i++) { - if (typeof keyframes[i] === "number" && pxValues.has(name)) { - keyframes[i] = keyframes[i] + "px"; - } - } - } - - function isWaapiSupportedEasing(easing) { - return Boolean((typeof easing === "function" && supportsLinearEasing()) || - !easing || - (typeof easing === "string" && - (easing in supportedWaapiEasing || supportsLinearEasing())) || - isBezierDefinition(easing) || - (Array.isArray(easing) && easing.every(isWaapiSupportedEasing))); - } - - const supportsPartialKeyframes = /*@__PURE__*/ memo(() => { - try { - document.createElement("div").animate({ opacity: [1] }); - } - catch (e) { - return false; - } - return true; - }); - - function resolveElements(elementOrSelector, scope, selectorCache) { - if (elementOrSelector == null) { - return []; - } - if (elementOrSelector instanceof EventTarget) { - return [elementOrSelector]; - } - else if (typeof elementOrSelector === "string") { - let root = document; - if (scope) { - root = scope.current; - } - const elements = selectorCache?.[elementOrSelector] ?? - root.querySelectorAll(elementOrSelector); - return elements ? Array.from(elements) : []; - } - return Array.from(elementOrSelector).filter((element) => element != null); - } - - function createSelectorEffect(subjectEffect) { - return (subject, values) => { - const elements = resolveElements(subject); - const subscriptions = []; - for (const element of elements) { - const remove = subjectEffect(element, values); - subscriptions.push(remove); - } - return () => { - for (const remove of subscriptions) - remove(); - }; - }; - } - - /** - * Provided a value and a ValueType, returns the value as that value type. - */ - const getValueAsType = (value, type) => { - return type && typeof value === "number" - ? type.transform(value) - : value; - }; - - class MotionValueState { - constructor() { - this.latest = {}; - this.values = new Map(); - } - set(name, value, render, computed, useDefaultValueType = true) { - const existingValue = this.values.get(name); - if (existingValue) { - existingValue.onRemove(); - } - const onChange = () => { - const v = value.get(); - if (useDefaultValueType) { - this.latest[name] = getValueAsType(v, numberValueTypes[name]); - } - else { - this.latest[name] = v; - } - render && frame.render(render); - }; - onChange(); - const cancelOnChange = value.on("change", onChange); - computed && value.addDependent(computed); - const remove = () => { - cancelOnChange(); - render && cancelFrame(render); - this.values.delete(name); - computed && value.removeDependent(computed); - }; - this.values.set(name, { value, onRemove: remove }); - return remove; - } - get(name) { - return this.values.get(name)?.value; - } - } - - function createEffect(addValue) { - const stateCache = new WeakMap(); - return (subject, values) => { - const state = stateCache.get(subject) ?? new MotionValueState(); - stateCache.set(subject, state); - const subscriptions = []; - for (const key in values) { - const value = values[key]; - const remove = addValue(subject, state, key, value); - subscriptions.push(remove); - } - return () => { - for (const cancel of subscriptions) - cancel(); - }; - }; - } - - function canSetAsProperty(element, name) { - if (!(name in element)) - return false; - const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) || - Object.getOwnPropertyDescriptor(element, name); - // Check if it has a setter - return descriptor && typeof descriptor.set === "function"; - } - const addAttrValue = (element, state, key, value) => { - const isProp = canSetAsProperty(element, key); - const name = isProp - ? key - : key.startsWith("data") || key.startsWith("aria") - ? camelToDash(key) - : key; - /** - * Set attribute directly via property if available - */ - const render = isProp - ? () => { - element[name] = state.latest[key]; - } - : () => { - const v = state.latest[key]; - if (v === null || v === undefined) { - element.removeAttribute(name); - } - else { - element.setAttribute(name, String(v)); - } - }; - return state.set(key, value, render); - }; - const attrEffect = /*@__PURE__*/ createSelectorEffect( - /*@__PURE__*/ createEffect(addAttrValue)); - - const propEffect = /*@__PURE__*/ createEffect((subject, state, key, value) => { - return state.set(key, value, () => { - subject[key] = state.latest[key]; - }, undefined, false); - }); - - /** - * Checks if an element is an HTML element in a way - * that works across iframes - */ - function isHTMLElement(element) { - return (isObject(element) && - "offsetHeight" in element && - !("ownerSVGElement" in element)); - } - - const translateAlias$1 = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective", - }; - function buildTransform$1(state) { - let transform = ""; - let transformIsDefault = true; - /** - * Loop over all possible transforms in order, adding the ones that - * are present to the transform string. - */ - for (let i = 0; i < transformPropOrder.length; i++) { - const key = transformPropOrder[i]; - const value = state.latest[key]; - if (value === undefined) - continue; - let valueIsDefault = true; - if (typeof value === "number") { - valueIsDefault = value === (key.startsWith("scale") ? 1 : 0); - } - else { - const parsed = parseFloat(value); - valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0; - } - if (!valueIsDefault) { - transformIsDefault = false; - const transformName = translateAlias$1[key] || key; - transform += `${transformName}(${value}) `; - } - } - // See build-transform.ts: additive `rotate()` so user `rotate` isn't - // clobbered. Not a `transformPropOrder` slot. - const pathRotation = state.latest.pathRotation; - if (pathRotation) { - transformIsDefault = false; - transform += `rotate(${typeof pathRotation === "number" - ? `${pathRotation}deg` - : pathRotation}) `; - } - return transformIsDefault ? "none" : transform.trim(); - } - - const originProps = new Set(["originX", "originY", "originZ"]); - const addStyleValue = (element, state, key, value) => { - let render = undefined; - let computed = undefined; - if (transformProps.has(key)) { - if (!state.get("transform")) { - // If this is an HTML element, we need to set the transform-box to fill-box - // to normalise the transform relative to the element's bounding box - if (!isHTMLElement(element) && !state.get("transformBox")) { - addStyleValue(element, state, "transformBox", new MotionValue("fill-box")); - } - state.set("transform", new MotionValue("none"), () => { - element.style.transform = buildTransform$1(state); - }); - } - computed = state.get("transform"); - } - else if (originProps.has(key)) { - if (!state.get("transformOrigin")) { - state.set("transformOrigin", new MotionValue(""), () => { - const originX = state.latest.originX ?? "50%"; - const originY = state.latest.originY ?? "50%"; - const originZ = state.latest.originZ ?? 0; - element.style.transformOrigin = `${originX} ${originY} ${originZ}`; - }); - } - computed = state.get("transformOrigin"); - } - else if (isCSSVar(key)) { - render = () => { - element.style.setProperty(key, state.latest[key]); - }; - } - else { - render = () => { - element.style[key] = state.latest[key]; - }; - } - return state.set(key, value, render, computed); - }; - const styleEffect = /*@__PURE__*/ createSelectorEffect( - /*@__PURE__*/ createEffect(addStyleValue)); - - function addSVGPathValue(element, state, key, value) { - frame.render(() => element.setAttribute("pathLength", "1")); - if (key === "pathOffset") { - return state.set(key, value, () => { - // Use unitless value to avoid Safari zoom bug - const offset = state.latest[key]; - element.setAttribute("stroke-dashoffset", `${-offset}`); - }); - } - else { - if (!state.get("stroke-dasharray")) { - state.set("stroke-dasharray", new MotionValue("1 1"), () => { - const { pathLength = 1, pathSpacing } = state.latest; - // Use unitless values to avoid Safari zoom bug - element.setAttribute("stroke-dasharray", `${pathLength} ${pathSpacing ?? 1 - Number(pathLength)}`); - }); - } - return state.set(key, value, undefined, state.get("stroke-dasharray")); - } - } - const addSVGValue = (element, state, key, value) => { - if (key.startsWith("path")) { - return addSVGPathValue(element, state, key, value); - } - else if (key.startsWith("attr")) { - return addAttrValue(element, state, convertAttrKey(key), value); - } - const handler = key in element.style ? addStyleValue : addAttrValue; - return handler(element, state, key, value); - }; - const svgEffect = /*@__PURE__*/ createSelectorEffect( - /*@__PURE__*/ createEffect(addSVGValue)); - function convertAttrKey(key) { - return key.replace(/^attr([A-Z])/, (_, firstChar) => firstChar.toLowerCase()); - } - - const { schedule: microtask, cancel: cancelMicrotask } = - /* @__PURE__ */ createRenderBatcher(queueMicrotask, false); - - const isDragging = { - x: false, - y: false, - }; - function isDragActive() { - return isDragging.x || isDragging.y; - } - - function setDragLock(axis) { - if (axis === "x" || axis === "y") { - if (isDragging[axis]) { - return null; - } - else { - isDragging[axis] = true; - return () => { - isDragging[axis] = false; - }; - } - } - else { - if (isDragging.x || isDragging.y) { - return null; - } - else { - isDragging.x = isDragging.y = true; - return () => { - isDragging.x = isDragging.y = false; - }; - } - } - } - - function setupGesture(elementOrSelector, options) { - const elements = resolveElements(elementOrSelector); - const gestureAbortController = new AbortController(); - const eventOptions = { - passive: true, - ...options, - signal: gestureAbortController.signal, - }; - const cancel = () => gestureAbortController.abort(); - return [elements, eventOptions, cancel]; - } - - function isValidHover(event) { - return !(event.pointerType === "touch" || isDragActive()); - } - /** - * Create a hover gesture. hover() is different to .addEventListener("pointerenter") - * in that it has an easier syntax, filters out polyfilled touch events, interoperates - * with drag gestures, and automatically removes the "pointerennd" event listener when the hover ends. - * - * @public - */ - function hover(elementOrSelector, onHoverStart, options = {}) { - const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options); - elements.forEach((element) => { - let isPressed = false; - let deferredHoverEnd = false; - let hoverEndCallback; - const removePointerLeave = () => { - element.removeEventListener("pointerleave", onPointerLeave); - }; - const endHover = (event) => { - if (hoverEndCallback) { - hoverEndCallback(event); - hoverEndCallback = undefined; - } - removePointerLeave(); - }; - const onPointerUp = (event) => { - isPressed = false; - window.removeEventListener("pointerup", onPointerUp); - window.removeEventListener("pointercancel", onPointerUp); - if (deferredHoverEnd) { - deferredHoverEnd = false; - endHover(event); - } - }; - const onPointerDown = () => { - isPressed = true; - window.addEventListener("pointerup", onPointerUp, eventOptions); - window.addEventListener("pointercancel", onPointerUp, eventOptions); - }; - const onPointerLeave = (leaveEvent) => { - if (leaveEvent.pointerType === "touch") - return; - if (isPressed) { - deferredHoverEnd = true; - return; - } - endHover(leaveEvent); - }; - const onPointerEnter = (enterEvent) => { - if (!isValidHover(enterEvent)) - return; - deferredHoverEnd = false; - const onHoverEnd = onHoverStart(element, enterEvent); - if (typeof onHoverEnd !== "function") - return; - hoverEndCallback = onHoverEnd; - element.addEventListener("pointerleave", onPointerLeave, eventOptions); - }; - element.addEventListener("pointerenter", onPointerEnter, eventOptions); - element.addEventListener("pointerdown", onPointerDown, eventOptions); - }); - return cancel; - } - - /** - * Recursively traverse up the tree to check whether the provided child node - * is the parent or a descendant of it. - * - * @param parent - Element to find - * @param child - Element to test against parent - */ - const isNodeOrChild = (parent, child) => { - if (!child) { - return false; - } - else if (parent === child) { - return true; - } - else { - return isNodeOrChild(parent, child.parentElement); - } - }; - - const isPrimaryPointer = (event) => { - if (event.pointerType === "mouse") { - return typeof event.button !== "number" || event.button <= 0; - } - else { - /** - * isPrimary is true for all mice buttons, whereas every touch point - * is regarded as its own input. So subsequent concurrent touch points - * will be false. - * - * Specifically match against false here as incomplete versions of - * PointerEvents in very old browser might have it set as undefined. - */ - return event.isPrimary !== false; - } - }; - - const keyboardAccessibleElements = new Set([ - "BUTTON", - "INPUT", - "SELECT", - "TEXTAREA", - "A", - ]); - /** - * Checks if an element is natively keyboard accessible (focusable). - * Used by the press gesture to determine if we need to add tabIndex. - */ - function isElementKeyboardAccessible(element) { - return (keyboardAccessibleElements.has(element.tagName) || - element.isContentEditable === true); - } - const textInputElements = new Set(["INPUT", "SELECT", "TEXTAREA"]); - /** - * Checks if an element has text selection or direct interaction behavior - * that should block drag gestures from starting. - * - * This specifically targets form controls where the user might want to select - * text or interact with the control (e.g., sliders, dropdowns). - * - * Buttons and links are NOT included because they don't have click-and-move - * actions of their own - they only respond to click events, so dragging - * should still work when initiated from these elements. - */ - function isElementTextInput(element) { - return (textInputElements.has(element.tagName) || - element.isContentEditable === true); - } - - const isPressing = new WeakSet(); - - /** - * Filter out events that are not "Enter" keys. - */ - function filterEvents(callback) { - return (event) => { - if (event.key !== "Enter") - return; - callback(event); - }; - } - function firePointerEvent(target, type) { - target.dispatchEvent(new PointerEvent("pointer" + type, { isPrimary: true, bubbles: true })); - } - const enableKeyboardPress = (focusEvent, eventOptions) => { - const element = focusEvent.currentTarget; - if (!element) - return; - const handleKeydown = filterEvents(() => { - if (isPressing.has(element)) - return; - firePointerEvent(element, "down"); - const handleKeyup = filterEvents(() => { - firePointerEvent(element, "up"); - }); - const handleBlur = () => firePointerEvent(element, "cancel"); - element.addEventListener("keyup", handleKeyup, eventOptions); - element.addEventListener("blur", handleBlur, eventOptions); - }); - element.addEventListener("keydown", handleKeydown, eventOptions); - /** - * Add an event listener that fires on blur to remove the keydown events. - */ - element.addEventListener("blur", () => element.removeEventListener("keydown", handleKeydown), eventOptions); - }; - - /** - * Filter out events that are not primary pointer events, or are triggering - * while a Motion gesture is active. - */ - function isValidPressEvent(event) { - return isPrimaryPointer(event) && !isDragActive(); - } - const claimedPointerDownEvents = new WeakSet(); - /** - * Create a press gesture. - * - * Press is different to `"pointerdown"`, `"pointerup"` in that it - * automatically filters out secondary pointer events like right - * click and multitouch. - * - * It also adds accessibility support for keyboards, where - * an element with a press gesture will receive focus and - * trigger on Enter `"keydown"` and `"keyup"` events. - * - * This is different to a browser's `"click"` event, which does - * respond to keyboards but only for the `"click"` itself, rather - * than the press start and end/cancel. The element also needs - * to be focusable for this to work, whereas a press gesture will - * make an element focusable by default. - * - * @public - */ - function press(targetOrSelector, onPressStart, options = {}) { - const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options); - const startPress = (startEvent) => { - const target = startEvent.currentTarget; - if (!isValidPressEvent(startEvent)) - return; - if (claimedPointerDownEvents.has(startEvent)) - return; - isPressing.add(target); - if (options.stopPropagation) { - claimedPointerDownEvents.add(startEvent); - } - const onPressEnd = onPressStart(target, startEvent); - const onPointerEnd = (endEvent, success) => { - window.removeEventListener("pointerup", onPointerUp); - window.removeEventListener("pointercancel", onPointerCancel); - if (isPressing.has(target)) { - isPressing.delete(target); - } - if (!isValidPressEvent(endEvent)) { - return; - } - if (typeof onPressEnd === "function") { - onPressEnd(endEvent, { success }); - } - }; - const onPointerUp = (upEvent) => { - onPointerEnd(upEvent, target === window || - target === document || - options.useGlobalTarget || - isNodeOrChild(target, upEvent.target)); - }; - const onPointerCancel = (cancelEvent) => { - onPointerEnd(cancelEvent, false); - }; - window.addEventListener("pointerup", onPointerUp, eventOptions); - window.addEventListener("pointercancel", onPointerCancel, eventOptions); - }; - targets.forEach((target) => { - const pointerDownTarget = options.useGlobalTarget ? window : target; - pointerDownTarget.addEventListener("pointerdown", startPress, eventOptions); - if (isHTMLElement(target)) { - target.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions)); - if (!isElementKeyboardAccessible(target) && - !target.hasAttribute("tabindex")) { - target.tabIndex = 0; - } - } - }); - return cancelEvents; - } - - function getComputedStyle$2(element, name) { - const computedStyle = window.getComputedStyle(element); - return isCSSVar(name) - ? computedStyle.getPropertyValue(name) - : computedStyle[name]; - } - - /** - * Checks if an element is an SVG element in a way - * that works across iframes - */ - function isSVGElement(element) { - return isObject(element) && "ownerSVGElement" in element; - } - - const resizeHandlers = new WeakMap(); - let observer; - const getSize = (borderBoxAxis, svgAxis, htmlAxis) => (target, borderBoxSize) => { - if (borderBoxSize && borderBoxSize[0]) { - return borderBoxSize[0][(borderBoxAxis + "Size")]; - } - else if (isSVGElement(target) && "getBBox" in target) { - return target.getBBox()[svgAxis]; - } - else { - return target[htmlAxis]; - } - }; - const getWidth = /*@__PURE__*/ getSize("inline", "width", "offsetWidth"); - const getHeight = /*@__PURE__*/ getSize("block", "height", "offsetHeight"); - function notifyTarget({ target, borderBoxSize }) { - resizeHandlers.get(target)?.forEach((handler) => { - handler(target, { - get width() { - return getWidth(target, borderBoxSize); - }, - get height() { - return getHeight(target, borderBoxSize); - }, - }); - }); - } - function notifyAll(entries) { - entries.forEach(notifyTarget); - } - function createResizeObserver() { - if (typeof ResizeObserver === "undefined") - return; - observer = new ResizeObserver(notifyAll); - } - function resizeElement(target, handler) { - if (!observer) - createResizeObserver(); - const elements = resolveElements(target); - elements.forEach((element) => { - let elementHandlers = resizeHandlers.get(element); - if (!elementHandlers) { - elementHandlers = new Set(); - resizeHandlers.set(element, elementHandlers); - } - elementHandlers.add(handler); - observer?.observe(element); - }); - return () => { - elements.forEach((element) => { - const elementHandlers = resizeHandlers.get(element); - elementHandlers?.delete(handler); - if (!elementHandlers?.size) { - observer?.unobserve(element); - } - }); - }; - } - - const windowCallbacks = new Set(); - let windowResizeHandler; - function createWindowResizeHandler() { - windowResizeHandler = () => { - const info = { - get width() { - return window.innerWidth; - }, - get height() { - return window.innerHeight; - }, - }; - windowCallbacks.forEach((callback) => callback(info)); - }; - window.addEventListener("resize", windowResizeHandler); - } - function resizeWindow(callback) { - windowCallbacks.add(callback); - if (!windowResizeHandler) - createWindowResizeHandler(); - return () => { - windowCallbacks.delete(callback); - if (!windowCallbacks.size && - typeof windowResizeHandler === "function") { - window.removeEventListener("resize", windowResizeHandler); - windowResizeHandler = undefined; - } - }; - } - - function resize(a, b) { - return typeof a === "function" ? resizeWindow(a) : resizeElement(a, b); - } - - function observeTimeline(update, timeline) { - let prevProgress; - const onFrame = () => { - const { currentTime } = timeline; - const percentage = currentTime === null ? 0 : currentTime.value; - const progress = percentage / 100; - if (prevProgress !== progress) { - update(progress); - } - prevProgress = progress; - }; - frame.preUpdate(onFrame, true); - return () => cancelFrame(onFrame); - } - - function record() { - const { value } = statsBuffer; - if (value === null) { - cancelFrame(record); - return; - } - value.frameloop.rate.push(frameData.delta); - value.animations.mainThread.push(activeAnimations.mainThread); - value.animations.waapi.push(activeAnimations.waapi); - value.animations.layout.push(activeAnimations.layout); - } - function mean(values) { - return values.reduce((acc, value) => acc + value, 0) / values.length; - } - function summarise(values, calcAverage = mean) { - if (values.length === 0) { - return { - min: 0, - max: 0, - avg: 0, - }; - } - return { - min: Math.min(...values), - max: Math.max(...values), - avg: calcAverage(values), - }; - } - const msToFps = (ms) => Math.round(1000 / ms); - function clearStatsBuffer() { - statsBuffer.value = null; - statsBuffer.addProjectionMetrics = null; - } - function reportStats() { - const { value } = statsBuffer; - if (!value) { - throw new Error("Stats are not being measured"); - } - clearStatsBuffer(); - cancelFrame(record); - const summary = { - frameloop: { - setup: summarise(value.frameloop.setup), - rate: summarise(value.frameloop.rate), - read: summarise(value.frameloop.read), - resolveKeyframes: summarise(value.frameloop.resolveKeyframes), - preUpdate: summarise(value.frameloop.preUpdate), - update: summarise(value.frameloop.update), - preRender: summarise(value.frameloop.preRender), - render: summarise(value.frameloop.render), - postRender: summarise(value.frameloop.postRender), - }, - animations: { - mainThread: summarise(value.animations.mainThread), - waapi: summarise(value.animations.waapi), - layout: summarise(value.animations.layout), - }, - layoutProjection: { - nodes: summarise(value.layoutProjection.nodes), - calculatedTargetDeltas: summarise(value.layoutProjection.calculatedTargetDeltas), - calculatedProjections: summarise(value.layoutProjection.calculatedProjections), - }, - }; - /** - * Convert the rate to FPS - */ - const { rate } = summary.frameloop; - rate.min = msToFps(rate.min); - rate.max = msToFps(rate.max); - rate.avg = msToFps(rate.avg); - [rate.min, rate.max] = [rate.max, rate.min]; - return summary; - } - function recordStats() { - if (statsBuffer.value) { - clearStatsBuffer(); - throw new Error("Stats are already being measured"); - } - const newStatsBuffer = statsBuffer; - newStatsBuffer.value = { - frameloop: { - setup: [], - rate: [], - read: [], - resolveKeyframes: [], - preUpdate: [], - update: [], - preRender: [], - render: [], - postRender: [], - }, - animations: { - mainThread: [], - waapi: [], - layout: [], - }, - layoutProjection: { - nodes: [], - calculatedTargetDeltas: [], - calculatedProjections: [], - }, - }; - newStatsBuffer.addProjectionMetrics = (metrics) => { - const { layoutProjection } = newStatsBuffer.value; - layoutProjection.nodes.push(metrics.nodes); - layoutProjection.calculatedTargetDeltas.push(metrics.calculatedTargetDeltas); - layoutProjection.calculatedProjections.push(metrics.calculatedProjections); - }; - frame.postRender(record, true); - return reportStats; - } - - /** - * Checks if an element is specifically an SVGSVGElement (the root SVG element) - * in a way that works across iframes - */ - function isSVGSVGElement(element) { - return isSVGElement(element) && element.tagName === "svg"; - } - - function getOriginIndex(from, total) { - if (from === "first") { - return 0; - } - else { - const lastIndex = total - 1; - return from === "last" ? lastIndex : lastIndex / 2; - } - } - function stagger(duration = 0.1, { startDelay = 0, from = 0, ease } = {}) { - return (i, total) => { - const fromIndex = typeof from === "number" ? from : getOriginIndex(from, total); - const distance = Math.abs(fromIndex - i); - let delay = duration * distance; - if (ease) { - const maxDelay = total * duration; - const easingFunction = easingDefinitionToFunction(ease); - delay = easingFunction(delay / maxDelay) * maxDelay; - } - return startDelay + delay; - }; - } - - function transform(...args) { - const useImmediate = !Array.isArray(args[0]); - const argOffset = useImmediate ? 0 : -1; - const inputValue = args[0 + argOffset]; - const inputRange = args[1 + argOffset]; - const outputRange = args[2 + argOffset]; - const options = args[3 + argOffset]; - const interpolator = interpolate(inputRange, outputRange, options); - return useImmediate ? interpolator(inputValue) : interpolator; - } - - /** - * Create a `MotionValue` that animates to its latest value using any transition type. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = followValue(x, { type: "spring", stiffness: 300 }) - * // or with tween - * const z = followValue(x, { type: "tween", duration: 0.5, ease: "easeOut" }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns `MotionValue` - * - * @public - */ - function followValue(source, options) { - const initialValue = isMotionValue(source) ? source.get() : source; - const value = motionValue(initialValue); - attachFollow(value, source, options); - return value; - } - /** - * Attach an animation to a MotionValue that will animate whenever the value changes. - * Similar to attachSpring but supports any transition type (spring, tween, inertia, etc.) - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns Cleanup function - * - * @public - */ - function attachFollow(value, source, options = {}) { - const initialValue = value.get(); - let activeAnimation = null; - let latestValue = initialValue; - let latestSetter; - const unit = typeof initialValue === "string" - ? initialValue.replace(/[\d.-]/g, "") - : undefined; - const stopAnimation = () => { - if (activeAnimation) { - activeAnimation.stop(); - activeAnimation = null; - } - value.animation = undefined; - }; - const startAnimation = () => { - const currentValue = asNumber$1(value.get()); - const targetValue = asNumber$1(latestValue); - // Don't animate if we're already at the target - if (currentValue === targetValue) { - stopAnimation(); - return; - } - // Use the running animation's analytical velocity for accuracy, - // falling back to the MotionValue's velocity for the initial animation. - // This prevents systematic velocity loss at high frame rates (240hz+). - const velocity = activeAnimation - ? activeAnimation.getGeneratorVelocity() - : value.getVelocity(); - stopAnimation(); - activeAnimation = new JSAnimation({ - keyframes: [currentValue, targetValue], - velocity, - // Default to spring if no type specified (matches useSpring behavior) - type: "spring", - restDelta: 0.001, - restSpeed: 0.01, - ...options, - onUpdate: latestSetter, - }); - }; - // Use a stable function reference so the frame loop Set deduplicates - // multiple calls within the same frame (e.g. rapid mouse events) - const scheduleAnimation = () => { - startAnimation(); - value.animation = activeAnimation ?? undefined; - value["events"].animationStart?.notify(); - activeAnimation?.then(() => { - value.animation = undefined; - value["events"].animationComplete?.notify(); - }); - }; - value.attach((v, set) => { - latestValue = v; - latestSetter = (latest) => set(parseValue(latest, unit)); - frame.postRender(scheduleAnimation); - }, stopAnimation); - if (isMotionValue(source)) { - let skipNextAnimation = options.skipInitialAnimation === true; - const removeSourceOnChange = source.on("change", (v) => { - if (skipNextAnimation) { - skipNextAnimation = false; - value.jump(parseValue(v, unit), false); - } - else { - value.set(parseValue(v, unit)); - } - }); - const removeValueOnDestroy = value.on("destroy", removeSourceOnChange); - return () => { - removeSourceOnChange(); - removeValueOnDestroy(); - }; - } - return stopAnimation; - } - function parseValue(v, unit) { - return unit ? v + unit : v; - } - function asNumber$1(v) { - return typeof v === "number" ? v : parseFloat(v); - } - - function subscribeValue(inputValues, outputValue, getLatest) { - const update = () => outputValue.set(getLatest()); - const scheduleUpdate = () => frame.preRender(update, false, true); - const subscriptions = inputValues.map((v) => v.on("change", scheduleUpdate)); - outputValue.on("destroy", () => { - subscriptions.forEach((unsubscribe) => unsubscribe()); - cancelFrame(update); - }); - } - - /** - * Create a `MotionValue` that transforms the output of other `MotionValue`s by - * passing their latest values through a transform function. - * - * Whenever a `MotionValue` referred to in the provided function is updated, - * it will be re-evaluated. - * - * ```jsx - * const x = motionValue(0) - * const y = transformValue(() => x.get() * 2) // double x - * ``` - * - * @param transformer - A transform function. This function must be pure with no side-effects or conditional statements. - * @returns `MotionValue` - * - * @public - */ - function transformValue(transform) { - const collectedValues = []; - /** - * Open session of collectMotionValues. Any MotionValue that calls get() - * inside transform will be saved into this array. - */ - collectMotionValues.current = collectedValues; - const initialValue = transform(); - collectMotionValues.current = undefined; - const value = motionValue(initialValue); - subscribeValue(collectedValues, value, transform); - return value; - } - - /** - * Create a `MotionValue` that maps the output of another `MotionValue` by - * mapping it from one range of values into another. - * - * @remarks - * - * Given an input range of `[-200, -100, 100, 200]` and an output range of - * `[0, 1, 1, 0]`, the returned `MotionValue` will: - * - * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`. - * - When provided a value between `-100` and `100`, will return `1`. - * - When provided a value between `100` and `200`, will return a value between `1` and `0` - * - * The input range must be a linear series of numbers. The output range - * can be any value type supported by Motion: numbers, colors, shadows, etc. - * - * Every value in the output range must be of the same type and in the same format. - * - * ```jsx - * const x = motionValue(0) - * const xRange = [-200, -100, 100, 200] - * const opacityRange = [0, 1, 1, 0] - * const opacity = mapValue(x, xRange, opacityRange) - * ``` - * - * @param inputValue - `MotionValue` - * @param inputRange - A linear series of numbers (either all increasing or decreasing) - * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`. - * @param options - - * - * - clamp: boolean. Clamp values to within the given range. Defaults to `true` - * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each. - * - * @returns `MotionValue` - * - * @public - */ - function mapValue(inputValue, inputRange, outputRange, options) { - const map = transform(inputRange, outputRange, options); - return transformValue(() => map(inputValue.get())); - } - - /** - * Create a `MotionValue` that animates to its latest value using a spring. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = springValue(x, { stiffness: 300 }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns `MotionValue` - * - * @public - */ - function springValue(source, options) { - return followValue(source, { type: "spring", ...options }); - } - /** - * Attach a spring animation to a MotionValue that will animate whenever the value changes. - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns Cleanup function - * - * @public - */ - function attachSpring(value, source, options) { - return attachFollow(value, source, { type: "spring", ...options }); - } - - /** - * A list of all ValueTypes - */ - const valueTypes = [...dimensionValueTypes, color, complex]; - /** - * Tests a value against the list of ValueTypes - */ - const findValueType = (v) => valueTypes.find(testValueType(v)); - - function chooseLayerType(valueName) { - if (valueName === "layout") - return "group"; - if (valueName === "enter" || valueName === "new") - return "new"; - if (valueName === "exit" || valueName === "old") - return "old"; - return "group"; - } - - let pendingRules = {}; - let style = null; - const css = { - set: (selector, values) => { - pendingRules[selector] = values; - }, - commit: () => { - if (!style) { - style = document.createElement("style"); - style.id = "motion-view"; - } - let cssText = ""; - for (const selector in pendingRules) { - const rule = pendingRules[selector]; - cssText += `${selector} {\n`; - for (const [property, value] of Object.entries(rule)) { - cssText += ` ${property}: ${value};\n`; - } - cssText += "}\n"; - } - style.textContent = cssText; - document.head.appendChild(style); - pendingRules = {}; - }, - remove: () => { - if (style && style.parentElement) { - style.parentElement.removeChild(style); - } - }, - }; - - function getViewAnimationLayerInfo(pseudoElement) { - const match = pseudoElement.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/); - if (!match) - return null; - return { layer: match[2], type: match[1] }; - } - - function filterViewAnimations(animation) { - const { effect } = animation; - if (!effect) - return false; - return (effect.target === document.documentElement && - effect.pseudoElement?.startsWith("::view-transition")); - } - function getViewAnimations() { - return document.getAnimations().filter(filterViewAnimations); - } - - function hasTarget(target, targets) { - return targets.has(target) && Object.keys(targets.get(target)).length > 0; - } - - const definitionNames = ["layout", "enter", "exit", "new", "old"]; - function startViewAnimation(builder) { - const { update, targets, options: defaultOptions } = builder; - if (!document.startViewTransition) { - return new Promise(async (resolve) => { - await update(); - resolve(new GroupAnimation([])); - }); - } - // TODO: Go over existing targets and ensure they all have ids - /** - * If we don't have any animations defined for the root target, - * remove it from being captured. - */ - if (!hasTarget("root", targets)) { - css.set(":root", { - "view-transition-name": "none", - }); - } - /** - * Set the timing curve to linear for all view transition layers. - * This gets baked into the keyframes, which can't be changed - * without breaking the generated animation. - * - * This allows us to set easing via updateTiming - which can be changed. - */ - css.set("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)", { "animation-timing-function": "linear !important" }); - css.commit(); // Write - const transition = document.startViewTransition(async () => { - await update(); - // TODO: Go over new targets and ensure they all have ids - }); - transition.finished.finally(() => { - css.remove(); // Write - }); - return new Promise((resolve) => { - transition.ready.then(() => { - const generatedViewAnimations = getViewAnimations(); - const animations = []; - /** - * Create animations for each of our explicitly-defined subjects. - */ - targets.forEach((definition, target) => { - // TODO: If target is not "root", resolve elements - // and iterate over each - for (const key of definitionNames) { - if (!definition[key]) - continue; - const { keyframes, options } = definition[key]; - for (let [valueName, valueKeyframes] of Object.entries(keyframes)) { - if (!valueKeyframes) - continue; - const valueOptions = { - ...getValueTransition$1(defaultOptions, valueName), - ...getValueTransition$1(options, valueName), - }; - const type = chooseLayerType(key); - /** - * If this is an opacity animation, and keyframes are not an array, - * we need to convert them into an array and set an initial value. - */ - if (valueName === "opacity" && - !Array.isArray(valueKeyframes)) { - const initialValue = type === "new" ? 0 : 1; - valueKeyframes = [initialValue, valueKeyframes]; - } - /** - * Resolve stagger function if provided. - */ - if (typeof valueOptions.delay === "function") { - valueOptions.delay = valueOptions.delay(0, 1); - } - valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay)); - const animation = new NativeAnimation({ - ...valueOptions, - element: document.documentElement, - name: valueName, - pseudoElement: `::view-transition-${type}(${target})`, - keyframes: valueKeyframes, - }); - animations.push(animation); - } - } - }); - /** - * Handle browser generated animations - */ - for (const animation of generatedViewAnimations) { - if (animation.playState === "finished") - continue; - const { effect } = animation; - if (!effect || !(effect instanceof KeyframeEffect)) - continue; - const { pseudoElement } = effect; - if (!pseudoElement) - continue; - const name = getViewAnimationLayerInfo(pseudoElement); - if (!name) - continue; - const targetDefinition = targets.get(name.layer); - if (!targetDefinition) { - /** - * If transition name is group then update the timing of the animation - * whereas if it's old or new then we could possibly replace it using - * the above method. - */ - const transitionName = name.type === "group" ? "layout" : ""; - let animationTransition = { - ...getValueTransition$1(defaultOptions, transitionName), - }; - animationTransition.duration && (animationTransition.duration = secondsToMilliseconds(animationTransition.duration)); - animationTransition = - applyGeneratorOptions(animationTransition); - const easing = mapEasingToNativeEasing(animationTransition.ease, animationTransition.duration); - effect.updateTiming({ - delay: secondsToMilliseconds(animationTransition.delay ?? 0), - duration: animationTransition.duration, - easing, - }); - animations.push(new NativeAnimationWrapper(animation)); - } - else if (hasOpacity(targetDefinition, "enter") && - hasOpacity(targetDefinition, "exit") && - effect - .getKeyframes() - .some((keyframe) => keyframe.mixBlendMode)) { - animations.push(new NativeAnimationWrapper(animation)); - } - else { - animation.cancel(); - } - } - resolve(new GroupAnimation(animations)); - }); - }); - } - function hasOpacity(target, key) { - return target?.[key]?.keyframes.opacity; - } - - let builders = []; - let current = null; - function next() { - current = null; - const [nextBuilder] = builders; - if (nextBuilder) - start(nextBuilder); - } - function start(builder) { - removeItem(builders, builder); - current = builder; - startViewAnimation(builder).then((animation) => { - builder.notifyReady(animation); - animation.finished.finally(next); - }); - } - function processQueue() { - /** - * Iterate backwards over the builders array. We can ignore the - * "wait" animations. If we have an interrupting animation in the - * queue then we need to batch all preceeding animations into it. - * Currently this only batches the update functions but will also - * need to batch the targets. - */ - for (let i = builders.length - 1; i >= 0; i--) { - const builder = builders[i]; - const { interrupt } = builder.options; - if (interrupt === "immediate") { - const batchedUpdates = builders.slice(0, i + 1).map((b) => b.update); - const remaining = builders.slice(i + 1); - builder.update = () => { - batchedUpdates.forEach((update) => update()); - }; - // Put the current builder at the front, followed by any "wait" builders - builders = [builder, ...remaining]; - break; - } - } - if (!current || builders[0]?.options.interrupt === "immediate") { - next(); - } - } - function addToQueue(builder) { - builders.push(builder); - microtask.render(processQueue); - } - - class ViewTransitionBuilder { - constructor(update, options = {}) { - this.currentSubject = "root"; - this.targets = new Map(); - this.notifyReady = noop$1; - this.readyPromise = new Promise((resolve) => { - this.notifyReady = resolve; - }); - this.update = update; - this.options = { - interrupt: "wait", - ...options, - }; - addToQueue(this); - } - get(subject) { - this.currentSubject = subject; - return this; - } - layout(keyframes, options) { - this.updateTarget("layout", keyframes, options); - return this; - } - new(keyframes, options) { - this.updateTarget("new", keyframes, options); - return this; - } - old(keyframes, options) { - this.updateTarget("old", keyframes, options); - return this; - } - enter(keyframes, options) { - this.updateTarget("enter", keyframes, options); - return this; - } - exit(keyframes, options) { - this.updateTarget("exit", keyframes, options); - return this; - } - crossfade(options) { - this.updateTarget("enter", { opacity: 1 }, options); - this.updateTarget("exit", { opacity: 0 }, options); - return this; - } - updateTarget(target, keyframes, options = {}) { - const { currentSubject, targets } = this; - if (!targets.has(currentSubject)) { - targets.set(currentSubject, {}); - } - const targetData = targets.get(currentSubject); - targetData[target] = { keyframes, options }; - } - then(resolve, reject) { - return this.readyPromise.then(resolve, reject); - } - } - function animateView(update, defaultOptions = {}) { - return new ViewTransitionBuilder(update, defaultOptions); - } - - const createAxisDelta = () => ({ - translate: 0, - scale: 1, - origin: 0, - originPoint: 0, - }); - const createDelta = () => ({ - x: createAxisDelta(), - y: createAxisDelta(), - }); - const createAxis = () => ({ min: 0, max: 0 }); - const createBox = () => ({ - x: createAxis(), - y: createAxis(), - }); - - const visualElementStore = new WeakMap(); - - function isAnimationControls(v) { - return (v !== null && - typeof v === "object" && - typeof v.start === "function"); - } - - /** - * Decides if the supplied variable is variant label - */ - function isVariantLabel(v) { - return typeof v === "string" || Array.isArray(v); - } - - const variantPriorityOrder = [ - "animate", - "whileInView", - "whileFocus", - "whileHover", - "whileTap", - "whileDrag", - "exit", - ]; - const variantProps = ["initial", ...variantPriorityOrder]; - - function isControllingVariants(props) { - return (isAnimationControls(props.animate) || - variantProps.some((name) => isVariantLabel(props[name]))); - } - function isVariantNode(props) { - return Boolean(isControllingVariants(props) || props.variants); - } - - /** - * Updates motion values from props changes. - * Uses `any` type for element to avoid circular dependencies with VisualElement. - */ - function updateMotionValuesFromProps(element, next, prev) { - for (const key in next) { - const nextValue = next[key]; - const prevValue = prev[key]; - if (isMotionValue(nextValue)) { - /** - * If this is a motion value found in props or style, we want to add it - * to our visual element's motion value map. - */ - element.addValue(key, nextValue); - } - else if (isMotionValue(prevValue)) { - /** - * If we're swapping from a motion value to a static value, - * create a new motion value from that - */ - element.addValue(key, motionValue(nextValue, { owner: element })); - } - else if (prevValue !== nextValue) { - /** - * If this is a flat value that has changed, update the motion value - * or create one if it doesn't exist. We only want to do this if we're - * not handling the value with our animation state. - */ - if (element.hasValue(key)) { - const existingValue = element.getValue(key); - if (existingValue.liveStyle === true) { - existingValue.jump(nextValue); - } - else if (!existingValue.hasAnimated) { - existingValue.set(nextValue); - } - } - else { - const latestValue = element.getStaticValue(key); - element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element })); - } - } - } - // Handle removed values - for (const key in prev) { - if (next[key] === undefined) - element.removeValue(key); - } - return next; - } - - // Does this device prefer reduced motion? Returns `null` server-side. - const prefersReducedMotion = { current: null }; - const hasReducedMotionListener = { current: false }; - - const isBrowser = typeof window !== "undefined"; - function initPrefersReducedMotion() { - hasReducedMotionListener.current = true; - if (!isBrowser) - return; - if (window.matchMedia) { - const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)"); - const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches); - motionMediaQuery.addEventListener("change", setReducedMotionPreferences); - setReducedMotionPreferences(); - } - else { - prefersReducedMotion.current = false; - } - } - - const propEventHandlers = [ - "AnimationStart", - "AnimationComplete", - "Update", - "BeforeLayoutMeasure", - "LayoutMeasure", - "LayoutAnimationStart", - "LayoutAnimationComplete", - ]; - /** - * Static feature definitions - can be injected by framework layer - */ - let featureDefinitions = {}; - /** - * Set feature definitions for all VisualElements. - * This should be called by the framework layer (e.g., framer-motion) during initialization. - */ - function setFeatureDefinitions(definitions) { - featureDefinitions = definitions; - } - /** - * Get the current feature definitions - */ - function getFeatureDefinitions() { - return featureDefinitions; - } - /** - * A VisualElement is an imperative abstraction around UI elements such as - * HTMLElement, SVGElement, Three.Object3D etc. - */ - class VisualElement { - /** - * This method takes React props and returns found MotionValues. For example, HTML - * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays. - * - * This isn't an abstract method as it needs calling in the constructor, but it is - * intended to be one. - */ - scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) { - return {}; - } - constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) { - /** - * A reference to the current underlying Instance, e.g. a HTMLElement - * or Three.Mesh etc. - */ - this.current = null; - /** - * A set containing references to this VisualElement's children. - */ - this.children = new Set(); - /** - * Determine what role this visual element should take in the variant tree. - */ - this.isVariantNode = false; - this.isControllingVariants = false; - /** - * Decides whether this VisualElement should animate in reduced motion - * mode. - * - * TODO: This is currently set on every individual VisualElement but feels - * like it could be set globally. - */ - this.shouldReduceMotion = null; - /** - * Decides whether animations should be skipped for this VisualElement. - * Useful for E2E tests and visual regression testing. - */ - this.shouldSkipAnimations = false; - /** - * A map of all motion values attached to this visual element. Motion - * values are source of truth for any given animated value. A motion - * value might be provided externally by the component via props. - */ - this.values = new Map(); - this.KeyframeResolver = KeyframeResolver; - /** - * Cleanup functions for active features (hover/tap/exit etc) - */ - this.features = {}; - /** - * A map of every subscription that binds the provided or generated - * motion values onChange listeners to this visual element. - */ - this.valueSubscriptions = new Map(); - /** - * A reference to the previously-provided motion values as returned - * from scrapeMotionValuesFromProps. We use the keys in here to determine - * if any motion values need to be removed after props are updated. - */ - this.prevMotionValues = {}; - /** - * Track whether this element has been mounted before, to detect - * remounts after Suspense unmount/remount cycles. - */ - this.hasBeenMounted = false; - /** - * An object containing a SubscriptionManager for each active event. - */ - this.events = {}; - /** - * An object containing an unsubscribe function for each prop event subscription. - * For example, every "Update" event can have multiple subscribers via - * VisualElement.on(), but only one of those can be defined via the onUpdate prop. - */ - this.propEventSubscriptions = {}; - this.notifyUpdate = () => this.notify("Update", this.latestValues); - this.render = () => { - if (!this.current) - return; - this.triggerBuild(); - this.renderInstance(this.current, this.renderState, this.props.style, this.projection); - }; - this.renderScheduledAt = 0.0; - this.scheduleRender = () => { - const now = time.now(); - if (this.renderScheduledAt < now) { - this.renderScheduledAt = now; - frame.render(this.render, false, true); - } - }; - const { latestValues, renderState } = visualState; - this.latestValues = latestValues; - this.baseTarget = { ...latestValues }; - this.initialValues = props.initial ? { ...latestValues } : {}; - this.renderState = renderState; - this.parent = parent; - this.props = props; - this.presenceContext = presenceContext; - this.depth = parent ? parent.depth + 1 : 0; - this.reducedMotionConfig = reducedMotionConfig; - this.skipAnimationsConfig = skipAnimations; - this.options = options; - this.blockInitialAnimation = Boolean(blockInitialAnimation); - this.isControllingVariants = isControllingVariants(props); - this.isVariantNode = isVariantNode(props); - if (this.isVariantNode) { - this.variantChildren = new Set(); - } - this.manuallyAnimateOnMount = Boolean(parent && parent.current); - /** - * Any motion values that are provided to the element when created - * aren't yet bound to the element, as this would technically be impure. - * However, we iterate through the motion values and set them to the - * initial values for this component. - * - * TODO: This is impure and we should look at changing this to run on mount. - * Doing so will break some tests but this isn't necessarily a breaking change, - * more a reflection of the test. - */ - const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this); - for (const key in initialMotionValues) { - const value = initialMotionValues[key]; - if (latestValues[key] !== undefined && isMotionValue(value)) { - value.set(latestValues[key]); - } - } - } - mount(instance) { - /** - * If this element has been mounted before (e.g. after a Suspense - * unmount/remount), reset motion values to their initial state - * so animations replay correctly from initial → animate. - */ - if (this.hasBeenMounted) { - for (const key in this.initialValues) { - this.values.get(key)?.jump(this.initialValues[key]); - this.latestValues[key] = this.initialValues[key]; - } - } - this.current = instance; - visualElementStore.set(instance, this); - if (this.projection && !this.projection.instance) { - this.projection.mount(instance); - } - if (this.parent && this.isVariantNode && !this.isControllingVariants) { - this.removeFromVariantTree = this.parent.addVariantChild(this); - } - this.values.forEach((value, key) => this.bindToMotionValue(key, value)); - /** - * Determine reduced motion preference. Only initialize the matchMedia - * listener if we actually need the dynamic value (i.e., when config - * is neither "never" nor "always"). - */ - if (this.reducedMotionConfig === "never") { - this.shouldReduceMotion = false; - } - else if (this.reducedMotionConfig === "always") { - this.shouldReduceMotion = true; - } - else { - if (!hasReducedMotionListener.current) { - initPrefersReducedMotion(); - } - this.shouldReduceMotion = prefersReducedMotion.current; - } - { - warnOnce(this.shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"); - } - /** - * Set whether animations should be skipped based on the config. - */ - this.shouldSkipAnimations = this.skipAnimationsConfig ?? false; - this.parent?.addChild(this); - this.update(this.props, this.presenceContext); - this.hasBeenMounted = true; - } - unmount() { - this.projection && this.projection.unmount(); - cancelFrame(this.notifyUpdate); - cancelFrame(this.render); - this.valueSubscriptions.forEach((remove) => remove()); - this.valueSubscriptions.clear(); - this.removeFromVariantTree && this.removeFromVariantTree(); - this.parent?.removeChild(this); - for (const key in this.events) { - this.events[key].clear(); - } - for (const key in this.features) { - const feature = this.features[key]; - if (feature) { - feature.unmount(); - feature.isMounted = false; - } - } - this.current = null; - } - addChild(child) { - this.children.add(child); - this.enteringChildren ?? (this.enteringChildren = new Set()); - this.enteringChildren.add(child); - } - removeChild(child) { - this.children.delete(child); - this.enteringChildren && this.enteringChildren.delete(child); - } - bindToMotionValue(key, value) { - if (this.valueSubscriptions.has(key)) { - this.valueSubscriptions.get(key)(); - } - if (value.accelerate && - acceleratedValues.has(key) && - this.current instanceof HTMLElement) { - const { factory, keyframes, times, ease, duration } = value.accelerate; - const animation = new NativeAnimation({ - element: this.current, - name: key, - keyframes, - times, - ease, - duration: secondsToMilliseconds(duration), - }); - const cleanup = factory(animation); - this.valueSubscriptions.set(key, () => { - cleanup(); - animation.cancel(); - }); - return; - } - const valueIsTransform = transformProps.has(key); - if (valueIsTransform && this.onBindTransform) { - this.onBindTransform(); - } - const removeOnChange = value.on("change", (latestValue) => { - this.latestValues[key] = latestValue; - this.props.onUpdate && frame.preRender(this.notifyUpdate); - if (valueIsTransform && this.projection) { - this.projection.isTransformDirty = true; - } - this.scheduleRender(); - }); - let removeSyncCheck; - if (typeof window !== "undefined" && - window.MotionCheckAppearSync) { - removeSyncCheck = window.MotionCheckAppearSync(this, key, value); - } - this.valueSubscriptions.set(key, () => { - removeOnChange(); - if (removeSyncCheck) - removeSyncCheck(); - // Defer to MotionValue.on("change") auto-stop so React 19 remounts - // can resubscribe before the animation is cancelled (#3315). - }); - } - sortNodePosition(other) { - /** - * If these nodes aren't even of the same type we can't compare their depth. - */ - if (!this.current || - !this.sortInstanceNodePosition || - this.type !== other.type) { - return 0; - } - return this.sortInstanceNodePosition(this.current, other.current); - } - updateFeatures() { - let key = "animation"; - for (key in featureDefinitions) { - const featureDefinition = featureDefinitions[key]; - if (!featureDefinition) - continue; - const { isEnabled, Feature: FeatureConstructor } = featureDefinition; - /** - * If this feature is enabled but not active, make a new instance. - */ - if (!this.features[key] && - FeatureConstructor && - isEnabled(this.props)) { - this.features[key] = new FeatureConstructor(this); - } - /** - * If we have a feature, mount or update it. - */ - if (this.features[key]) { - const feature = this.features[key]; - if (feature.isMounted) { - feature.update(); - } - else { - feature.mount(); - feature.isMounted = true; - } - } - } - } - triggerBuild() { - this.build(this.renderState, this.latestValues, this.props); - } - /** - * Measure the current viewport box with or without transforms. - * Only measures axis-aligned boxes, rotate and skew must be manually - * removed with a re-render to work. - */ - measureViewportBox() { - return this.current - ? this.measureInstanceViewportBox(this.current, this.props) - : createBox(); - } - getStaticValue(key) { - return this.latestValues[key]; - } - setStaticValue(key, value) { - this.latestValues[key] = value; - } - /** - * Update the provided props. Ensure any newly-added motion values are - * added to our map, old ones removed, and listeners updated. - */ - update(props, presenceContext) { - if (props.transformTemplate || this.props.transformTemplate) { - this.scheduleRender(); - } - this.prevProps = this.props; - this.props = props; - this.prevPresenceContext = this.presenceContext; - this.presenceContext = presenceContext; - /** - * Update prop event handlers ie onAnimationStart, onAnimationComplete - */ - for (let i = 0; i < propEventHandlers.length; i++) { - const key = propEventHandlers[i]; - if (this.propEventSubscriptions[key]) { - this.propEventSubscriptions[key](); - delete this.propEventSubscriptions[key]; - } - const listenerName = ("on" + key); - const listener = props[listenerName]; - if (listener) { - this.propEventSubscriptions[key] = this.on(key, listener); - } - } - this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues); - if (this.handleChildMotionValue) { - this.handleChildMotionValue(); - } - } - getProps() { - return this.props; - } - /** - * Returns the variant definition with a given name. - */ - getVariant(name) { - return this.props.variants ? this.props.variants[name] : undefined; - } - /** - * Returns the defined default transition on this component. - */ - getDefaultTransition() { - return this.props.transition; - } - getTransformPagePoint() { - return this.props.transformPagePoint; - } - getClosestVariantNode() { - return this.isVariantNode - ? this - : this.parent - ? this.parent.getClosestVariantNode() - : undefined; - } - /** - * Add a child visual element to our set of children. - */ - addVariantChild(child) { - const closestVariantNode = this.getClosestVariantNode(); - if (closestVariantNode) { - closestVariantNode.variantChildren && - closestVariantNode.variantChildren.add(child); - return () => closestVariantNode.variantChildren.delete(child); - } - } - /** - * Add a motion value and bind it to this visual element. - */ - addValue(key, value) { - // Remove existing value if it exists - const existingValue = this.values.get(key); - if (value !== existingValue) { - if (existingValue) - this.removeValue(key); - this.bindToMotionValue(key, value); - this.values.set(key, value); - this.latestValues[key] = value.get(); - } - } - /** - * Remove a motion value and unbind any active subscriptions. - */ - removeValue(key) { - this.values.delete(key); - const unsubscribe = this.valueSubscriptions.get(key); - if (unsubscribe) { - unsubscribe(); - this.valueSubscriptions.delete(key); - } - delete this.latestValues[key]; - this.removeValueFromRenderState(key, this.renderState); - } - /** - * Check whether we have a motion value for this key - */ - hasValue(key) { - return this.values.has(key); - } - getValue(key, defaultValue) { - if (this.props.values && this.props.values[key]) { - return this.props.values[key]; - } - let value = this.values.get(key); - if (value === undefined && defaultValue !== undefined) { - value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this }); - this.addValue(key, value); - } - return value; - } - /** - * If we're trying to animate to a previously unencountered value, - * we need to check for it in our state and as a last resort read it - * directly from the instance (which might have performance implications). - */ - readValue(key, target) { - let value = this.latestValues[key] !== undefined || !this.current - ? this.latestValues[key] - : this.getBaseTargetFromProps(this.props, key) ?? - this.readValueFromInstance(this.current, key, this.options); - if (value !== undefined && value !== null) { - if (typeof value === "string" && - (isNumericalString(value) || isZeroValueString(value))) { - // If this is a number read as a string, ie "0" or "200", convert it to a number - value = parseFloat(value); - } - else if (!findValueType(value) && complex.test(target)) { - value = getAnimatableNone(key, target); - } - this.setBaseTarget(key, isMotionValue(value) ? value.get() : value); - } - return isMotionValue(value) ? value.get() : value; - } - /** - * Set the base target to later animate back to. This is currently - * only hydrated on creation and when we first read a value. - */ - setBaseTarget(key, value) { - this.baseTarget[key] = value; - } - /** - * Find the base target for a value thats been removed from all animation - * props. - */ - getBaseTarget(key) { - const { initial } = this.props; - let valueFromInitial; - if (typeof initial === "string" || typeof initial === "object") { - const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom); - if (variant) { - valueFromInitial = variant[key]; - } - } - /** - * If this value still exists in the current initial variant, read that. - */ - if (initial && valueFromInitial !== undefined) { - return valueFromInitial; - } - /** - * Alternatively, if this VisualElement config has defined a getBaseTarget - * so we can read the value from an alternative source, try that. - */ - const target = this.getBaseTargetFromProps(this.props, key); - if (target !== undefined && !isMotionValue(target)) - return target; - /** - * If the value was initially defined on initial, but it doesn't any more, - * return undefined. Otherwise return the value as initially read from the DOM. - */ - return this.initialValues[key] !== undefined && - valueFromInitial === undefined - ? undefined - : this.baseTarget[key]; - } - on(eventName, callback) { - if (!this.events[eventName]) { - this.events[eventName] = new SubscriptionManager(); - } - return this.events[eventName].add(callback); - } - notify(eventName, ...args) { - if (this.events[eventName]) { - this.events[eventName].notify(...args); - } - } - scheduleRenderMicrotask() { - microtask.render(this.render); - } - } - - class DOMVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.KeyframeResolver = DOMKeyframesResolver; - } - sortInstanceNodePosition(a, b) { - /** - * compareDocumentPosition returns a bitmask, by using the bitwise & - * we're returning true if 2 in that bitmask is set to true. 2 is set - * to true if b preceeds a. - */ - return a.compareDocumentPosition(b) & 2 ? 1 : -1; - } - getBaseTargetFromProps(props, key) { - const style = props.style; - return style ? style[key] : undefined; - } - removeValueFromRenderState(key, { vars, style }) { - delete vars[key]; - delete style[key]; - } - handleChildMotionValue() { - if (this.childSubscription) { - this.childSubscription(); - delete this.childSubscription; - } - const { children } = this.props; - if (isMotionValue(children)) { - this.childSubscription = children.on("change", (latest) => { - if (this.current) { - this.current.textContent = `${latest}`; - } - }); - } - } - } - - /** - * Feature base class for extending VisualElement functionality. - * Features are plugins that can be mounted/unmounted to add behavior - * like gestures, animations, or layout tracking. - */ - class Feature { - constructor(node) { - this.isMounted = false; - this.node = node; - } - update() { } - } - - /** - * Bounding boxes tend to be defined as top, left, right, bottom. For various operations - * it's easier to consider each axis individually. This function returns a bounding box - * as a map of single-axis min/max values. - */ - function convertBoundingBoxToBox({ top, left, right, bottom, }) { - return { - x: { min: left, max: right }, - y: { min: top, max: bottom }, - }; - } - function convertBoxToBoundingBox({ x, y }) { - return { top: y.min, right: x.max, bottom: y.max, left: x.min }; - } - /** - * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function - * provided by Framer to allow measured points to be corrected for device scaling. This is used - * when measuring DOM elements and DOM event points. - */ - function transformBoxPoints(point, transformPoint) { - if (!transformPoint) - return point; - const topLeft = transformPoint({ x: point.left, y: point.top }); - const bottomRight = transformPoint({ x: point.right, y: point.bottom }); - return { - top: topLeft.y, - left: topLeft.x, - bottom: bottomRight.y, - right: bottomRight.x, - }; - } - - function isIdentityScale(scale) { - return scale === undefined || scale === 1; - } - function hasScale({ scale, scaleX, scaleY }) { - return (!isIdentityScale(scale) || - !isIdentityScale(scaleX) || - !isIdentityScale(scaleY)); - } - function hasTransform(values) { - return (hasScale(values) || - has2DTranslate(values) || - values.z || - values.rotate || - values.rotateX || - values.rotateY || - values.skewX || - values.skewY); - } - function has2DTranslate(values) { - return is2DTranslate(values.x) || is2DTranslate(values.y); - } - function is2DTranslate(value) { - return value && value !== "0%"; - } - - /** - * Scales a point based on a factor and an originPoint - */ - function scalePoint(point, scale, originPoint) { - const distanceFromOrigin = point - originPoint; - const scaled = scale * distanceFromOrigin; - return originPoint + scaled; - } - /** - * Applies a translate/scale delta to a point - */ - function applyPointDelta(point, translate, scale, originPoint, boxScale) { - if (boxScale !== undefined) { - point = scalePoint(point, boxScale, originPoint); - } - return scalePoint(point, scale, originPoint) + translate; - } - /** - * Applies a translate/scale delta to an axis - */ - function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) { - axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale); - axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale); - } - /** - * Applies a translate/scale delta to a box - */ - function applyBoxDelta(box, { x, y }) { - applyAxisDelta(box.x, x.translate, x.scale, x.originPoint); - applyAxisDelta(box.y, y.translate, y.scale, y.originPoint); - } - const TREE_SCALE_SNAP_MIN = 0.999999999999; - const TREE_SCALE_SNAP_MAX = 1.0000000000001; - /** - * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms - * in a tree upon our box before then calculating how to project it into our desired viewport-relative box - * - * This is the final nested loop within updateLayoutDelta for future refactoring - */ - function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) { - const treeLength = treePath.length; - if (!treeLength) - return; - // Reset the treeScale - treeScale.x = treeScale.y = 1; - let node; - let delta; - for (let i = 0; i < treeLength; i++) { - node = treePath[i]; - delta = node.projectionDelta; - /** - * TODO: Prefer to remove this, but currently we have motion components with - * display: contents in Framer. - */ - const { visualElement } = node.options; - if (visualElement && - visualElement.props.style && - visualElement.props.style.display === "contents") { - continue; - } - if (isSharedTransition && - node.options.layoutScroll && - node.scroll && - node !== node.root) { - translateAxis(box.x, -node.scroll.offset.x); - translateAxis(box.y, -node.scroll.offset.y); - } - if (delta) { - // Incoporate each ancestor's scale into a cumulative treeScale for this component - treeScale.x *= delta.x.scale; - treeScale.y *= delta.y.scale; - // Apply each ancestor's calculated delta into this component's recorded layout box - applyBoxDelta(box, delta); - } - if (isSharedTransition && hasTransform(node.latestValues)) { - transformBox(box, node.latestValues, node.layout?.layoutBox); - } - } - /** - * Snap tree scale back to 1 if it's within a non-perceivable threshold. - * This will help reduce useless scales getting rendered. - */ - if (treeScale.x < TREE_SCALE_SNAP_MAX && - treeScale.x > TREE_SCALE_SNAP_MIN) { - treeScale.x = 1.0; - } - if (treeScale.y < TREE_SCALE_SNAP_MAX && - treeScale.y > TREE_SCALE_SNAP_MIN) { - treeScale.y = 1.0; - } - } - function translateAxis(axis, distance) { - axis.min += distance; - axis.max += distance; - } - /** - * Apply a transform to an axis from the latest resolved motion values. - * This function basically acts as a bridge between a flat motion value map - * and applyAxisDelta - */ - function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) { - const originPoint = mixNumber$1(axis.min, axis.max, axisOrigin); - // Apply the axis delta to the final axis - applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale); - } - function resolveAxisTranslate(value, axis) { - if (typeof value === "string") { - return (parseFloat(value) / 100) * (axis.max - axis.min); - } - return value; - } - /** - * Apply a transform to a box from the latest resolved motion values. - */ - function transformBox(box, transform, sourceBox) { - const resolveBox = sourceBox ?? box; - transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX); - transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY); - } - - function measureViewportBox(instance, transformPoint) { - return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint)); - } - function measurePageBox(element, rootProjectionNode, transformPagePoint) { - const viewportBox = measureViewportBox(element, transformPagePoint); - const { scroll } = rootProjectionNode; - if (scroll) { - translateAxis(viewportBox.x, scroll.offset.x); - translateAxis(viewportBox.y, scroll.offset.y); - } - return viewportBox; - } - - const translateAlias = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective", - }; - const numTransforms = transformPropOrder.length; - /** - * Build a CSS transform style from individual x/y/scale etc properties. - * - * This outputs with a default order of transforms/scales/rotations, this can be customised by - * providing a transformTemplate function. - */ - function buildTransform(latestValues, transform, transformTemplate) { - // The transform string we're going to build into. - let transformString = ""; - let transformIsDefault = true; - /** - * Loop over all possible transforms in order, adding the ones that - * are present to the transform string. - */ - for (let i = 0; i < numTransforms; i++) { - const key = transformPropOrder[i]; - const value = latestValues[key]; - if (value === undefined) - continue; - let valueIsDefault = true; - if (typeof value === "number") { - valueIsDefault = value === (key.startsWith("scale") ? 1 : 0); - } - else { - const parsed = parseFloat(value); - valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0; - } - if (!valueIsDefault || transformTemplate) { - const valueAsType = getValueAsType(value, numberValueTypes[key]); - if (!valueIsDefault) { - transformIsDefault = false; - const transformName = translateAlias[key] || key; - transformString += `${transformName}(${valueAsType}) `; - } - if (transformTemplate) { - transform[key] = valueAsType; - } - } - } - // `pathRotation` composes onto `rotate` as a separate additive term so - // the user's `rotate` is never clobbered. Deliberately not a slot in - // `transformPropOrder`. - const pathRotation = latestValues.pathRotation; - if (pathRotation) { - transformIsDefault = false; - transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `; - } - transformString = transformString.trim(); - // If we have a custom `transform` template, pass our transform values and - // generated transformString to that before returning - if (transformTemplate) { - transformString = transformTemplate(transform, transformIsDefault ? "" : transformString); - } - else if (transformIsDefault) { - transformString = "none"; - } - return transformString; - } - - function buildHTMLStyles(state, latestValues, transformTemplate) { - const { style, vars, transformOrigin } = state; - // Track whether we encounter any transform or transformOrigin values. - let hasTransform = false; - let hasTransformOrigin = false; - /** - * Loop over all our latest animated values and decide whether to handle them - * as a style or CSS variable. - * - * Transforms and transform origins are kept separately for further processing. - */ - for (const key in latestValues) { - const value = latestValues[key]; - if (transformProps.has(key)) { - // If this is a transform, flag to enable further transform processing - hasTransform = true; - continue; - } - else if (isCSSVariableName(key)) { - vars[key] = value; - continue; - } - else { - // Convert the value to its default value type, ie 0 -> "0px" - const valueAsType = getValueAsType(value, numberValueTypes[key]); - if (key.startsWith("origin")) { - // If this is a transform origin, flag and enable further transform-origin processing - hasTransformOrigin = true; - transformOrigin[key] = - valueAsType; - } - else { - style[key] = valueAsType; - } - } - } - if (!latestValues.transform) { - if (hasTransform || transformTemplate) { - style.transform = buildTransform(latestValues, state.transform, transformTemplate); - } - else if (style.transform) { - /** - * If we have previously created a transform but currently don't have any, - * reset transform style to none. - */ - style.transform = "none"; - } - } - /** - * Build a transformOrigin style. Uses the same defaults as the browser for - * undefined origins. - */ - if (hasTransformOrigin) { - const { originX = "50%", originY = "50%", originZ = 0, } = transformOrigin; - style.transformOrigin = `${originX} ${originY} ${originZ}`; - } - } - - function renderHTML(element, { style, vars }, styleProp, projection) { - const elementStyle = element.style; - let key; - for (key in style) { - // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type. - elementStyle[key] = style[key]; - } - // Write projection styles directly to element style - projection?.applyProjectionStyles(elementStyle, styleProp); - for (key in vars) { - // Loop over any CSS variables and assign those. - // They can only be assigned using `setProperty`. - elementStyle.setProperty(key, vars[key]); - } - } - - function pixelsToPercent(pixels, axis) { - if (axis.max === axis.min) - return 0; - return (pixels / (axis.max - axis.min)) * 100; - } - /** - * We always correct borderRadius as a percentage rather than pixels to reduce paints. - * For example, if you are projecting a box that is 100px wide with a 10px borderRadius - * into a box that is 200px wide with a 20px borderRadius, that is actually a 10% - * borderRadius in both states. If we animate between the two in pixels that will trigger - * a paint each time. If we animate between the two in percentage we'll avoid a paint. - */ - const correctBorderRadius = { - correct: (latest, node) => { - if (!node.target) - return latest; - /** - * If latest is a string, if it's a percentage we can return immediately as it's - * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number. - */ - if (typeof latest === "string") { - if (px.test(latest)) { - latest = parseFloat(latest); - } - else { - return latest; - } - } - /** - * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that - * pixel value as a percentage of each axis - */ - const x = pixelsToPercent(latest, node.target.x); - const y = pixelsToPercent(latest, node.target.y); - return `${x}% ${y}%`; - }, - }; - - const correctBoxShadow = { - correct: (latest, { treeScale, projectionDelta }) => { - const original = latest; - const shadow = complex.parse(latest); - // TODO: Doesn't support multiple shadows - if (shadow.length > 5) - return original; - const template = complex.createTransformer(latest); - const offset = typeof shadow[0] !== "number" ? 1 : 0; - // Calculate the overall context scale - const xScale = projectionDelta.x.scale * treeScale.x; - const yScale = projectionDelta.y.scale * treeScale.y; - shadow[0 + offset] /= xScale; - shadow[1 + offset] /= yScale; - /** - * Ideally we'd correct x and y scales individually, but because blur and - * spread apply to both we have to take a scale average and apply that instead. - * We could potentially improve the outcome of this by incorporating the ratio between - * the two scales. - */ - const averageScale = mixNumber$1(xScale, yScale, 0.5); - // Blur - if (typeof shadow[2 + offset] === "number") - shadow[2 + offset] /= averageScale; - // Spread - if (typeof shadow[3 + offset] === "number") - shadow[3 + offset] /= averageScale; - return template(shadow); - }, - }; - - const scaleCorrectors = { - borderRadius: { - ...correctBorderRadius, - applyTo: [ - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomLeftRadius", - "borderBottomRightRadius", - ], - }, - borderTopLeftRadius: correctBorderRadius, - borderTopRightRadius: correctBorderRadius, - borderBottomLeftRadius: correctBorderRadius, - borderBottomRightRadius: correctBorderRadius, - boxShadow: correctBoxShadow, - }; - function addScaleCorrector(correctors) { - for (const key in correctors) { - scaleCorrectors[key] = correctors[key]; - if (isCSSVariableName(key)) { - scaleCorrectors[key].isCSSVariable = true; - } - } - } - - function isForcedMotionValue(key, { layout, layoutId }) { - return (transformProps.has(key) || - key.startsWith("origin") || - ((layout || layoutId !== undefined) && - (!!scaleCorrectors[key] || key === "opacity"))); - } - - function scrapeMotionValuesFromProps$1(props, prevProps, visualElement) { - const style = props.style; - const prevStyle = prevProps?.style; - const newValues = {}; - if (!style) - return newValues; - for (const key in style) { - if (isMotionValue(style[key]) || - (prevStyle && isMotionValue(prevStyle[key])) || - isForcedMotionValue(key, props) || - visualElement?.getValue(key)?.liveStyle !== undefined) { - newValues[key] = style[key]; - } - } - return newValues; - } - - function getComputedStyle$1(element) { - return window.getComputedStyle(element); - } - class HTMLVisualElement extends DOMVisualElement { - constructor() { - super(...arguments); - this.type = "html"; - this.renderInstance = renderHTML; - } - readValueFromInstance(instance, key) { - if (transformProps.has(key)) { - return this.projection?.isProjecting - ? defaultTransformValue(key) - : readTransformValue(instance, key); - } - else { - const computedStyle = getComputedStyle$1(instance); - const value = (isCSSVariableName(key) - ? computedStyle.getPropertyValue(key) - : computedStyle[key]) || 0; - return typeof value === "string" ? value.trim() : value; - } - } - measureInstanceViewportBox(instance, { transformPagePoint }) { - return measureViewportBox(instance, transformPagePoint); - } - build(renderState, latestValues, props) { - buildHTMLStyles(renderState, latestValues, props.transformTemplate); - } - scrapeMotionValuesFromProps(props, prevProps, visualElement) { - return scrapeMotionValuesFromProps$1(props, prevProps, visualElement); - } - } - - function isObjectKey(key, object) { - return key in object; - } - class ObjectVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.type = "object"; - } - readValueFromInstance(instance, key) { - if (isObjectKey(key, instance)) { - const value = instance[key]; - if (typeof value === "string" || typeof value === "number") { - return value; - } - } - return undefined; - } - getBaseTargetFromProps() { - return undefined; - } - removeValueFromRenderState(key, renderState) { - delete renderState.output[key]; - } - measureInstanceViewportBox() { - return createBox(); - } - build(renderState, latestValues) { - Object.assign(renderState.output, latestValues); - } - renderInstance(instance, { output }) { - Object.assign(instance, output); - } - sortInstanceNodePosition() { - return 0; - } - } - - const dashKeys = { - offset: "stroke-dashoffset", - array: "stroke-dasharray", - }; - const camelKeys = { - offset: "strokeDashoffset", - array: "strokeDasharray", - }; - /** - * Build SVG path properties. Uses the path's measured length to convert - * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset - * and stroke-dasharray attributes. - * - * This function is mutative to reduce per-frame GC. - * - * Note: We use unitless values for stroke-dasharray and stroke-dashoffset - * because Safari incorrectly scales px values when the page is zoomed. - */ - function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) { - // Normalise path length by setting SVG attribute pathLength to 1 - attrs.pathLength = 1; - // We use dash case when setting attributes directly to the DOM node and camel case - // when defining props on a React component. - const keys = useDashCase ? dashKeys : camelKeys; - // Build the dash offset (unitless to avoid Safari zoom bug) - attrs[keys.offset] = `${-offset}`; - // Build the dash array (unitless to avoid Safari zoom bug) - attrs[keys.array] = `${length} ${spacing}`; - } - - /** - * CSS Motion Path properties that should remain as CSS styles on SVG elements. - */ - const cssMotionPathProperties = [ - "offsetDistance", - "offsetPath", - "offsetRotate", - "offsetAnchor", - ]; - /** - * Build SVG visual attributes, like cx and style.transform - */ - function buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, - // This is object creation, which we try to avoid per-frame. - ...latest }, isSVGTag, transformTemplate, styleProp) { - buildHTMLStyles(state, latest, transformTemplate); - /** - * For svg tags we just want to make sure viewBox is animatable and treat all the styles - * as normal HTML tags. - */ - if (isSVGTag) { - if (state.style.viewBox) { - state.attrs.viewBox = state.style.viewBox; - } - return; - } - state.attrs = state.style; - state.style = {}; - const { attrs, style } = state; - /** - * However, we apply transforms as CSS transforms. - * So if we detect a transform, transformOrigin we take it from attrs and copy it into style. - */ - if (attrs.transform) { - style.transform = attrs.transform; - delete attrs.transform; - } - if (style.transform || attrs.transformOrigin) { - style.transformOrigin = attrs.transformOrigin ?? "50% 50%"; - delete attrs.transformOrigin; - } - if (style.transform) { - /** - * SVG's element transform-origin uses its own median as a reference. - * Therefore, transformBox becomes a fill-box - */ - style.transformBox = styleProp?.transformBox ?? "fill-box"; - delete attrs.transformBox; - } - for (const key of cssMotionPathProperties) { - if (attrs[key] !== undefined) { - style[key] = attrs[key]; - delete attrs[key]; - } - } - // Render attrX/attrY/attrScale as attributes - if (attrX !== undefined) - attrs.x = attrX; - if (attrY !== undefined) - attrs.y = attrY; - if (attrScale !== undefined) - attrs.scale = attrScale; - // Build SVG path if one has been defined - if (pathLength !== undefined) { - buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false); - } - } - - /** - * A set of attribute names that are always read/written as camel case. - */ - const camelCaseAttributes = new Set([ - "baseFrequency", - "diffuseConstant", - "kernelMatrix", - "kernelUnitLength", - "keySplines", - "keyTimes", - "limitingConeAngle", - "markerHeight", - "markerWidth", - "numOctaves", - "targetX", - "targetY", - "surfaceScale", - "specularConstant", - "specularExponent", - "stdDeviation", - "tableValues", - "viewBox", - "gradientTransform", - "pathLength", - "startOffset", - "textLength", - "lengthAdjust", - ]); - - const isSVGTag = (tag) => typeof tag === "string" && tag.toLowerCase() === "svg"; - - function renderSVG(element, renderState, _styleProp, projection) { - renderHTML(element, renderState, undefined, projection); - for (const key in renderState.attrs) { - element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]); - } - } - - function scrapeMotionValuesFromProps(props, prevProps, visualElement) { - const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement); - for (const key in props) { - if (isMotionValue(props[key]) || - isMotionValue(prevProps[key])) { - const targetKey = transformPropOrder.indexOf(key) !== -1 - ? "attr" + key.charAt(0).toUpperCase() + key.substring(1) - : key; - newValues[targetKey] = props[key]; - } - } - return newValues; - } - - class SVGVisualElement extends DOMVisualElement { - constructor() { - super(...arguments); - this.type = "svg"; - this.isSVGTag = false; - this.measureInstanceViewportBox = createBox; - } - getBaseTargetFromProps(props, key) { - return props[key]; - } - readValueFromInstance(instance, key) { - if (transformProps.has(key)) { - const defaultType = getDefaultValueType(key); - return defaultType ? defaultType.default || 0 : 0; - } - key = !camelCaseAttributes.has(key) ? camelToDash(key) : key; - return instance.getAttribute(key); - } - scrapeMotionValuesFromProps(props, prevProps, visualElement) { - return scrapeMotionValuesFromProps(props, prevProps, visualElement); - } - build(renderState, latestValues, props) { - buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style); - } - renderInstance(instance, renderState, styleProp, projection) { - renderSVG(instance, renderState, styleProp, projection); - } - mount(instance) { - this.isSVGTag = isSVGTag(instance.tagName); - super.mount(instance); - } - } - - const numVariantProps = variantProps.length; - /** - * Get variant context from a visual element's parent chain. - * Uses `any` type for visualElement to avoid circular dependencies. - */ - function getVariantContext(visualElement) { - if (!visualElement) - return undefined; - if (!visualElement.isControllingVariants) { - const context = visualElement.parent - ? getVariantContext(visualElement.parent) || {} - : {}; - if (visualElement.props.initial !== undefined) { - context.initial = visualElement.props.initial; - } - return context; - } - const context = {}; - for (let i = 0; i < numVariantProps; i++) { - const name = variantProps[i]; - const prop = visualElement.props[name]; - if (isVariantLabel(prop) || prop === false) { - context[name] = prop; - } - } - return context; - } - - function shallowCompare(next, prev) { - if (!Array.isArray(prev)) - return false; - const prevLength = prev.length; - if (prevLength !== next.length) - return false; - for (let i = 0; i < prevLength; i++) { - if (prev[i] !== next[i]) - return false; - } - return true; - } - - const reversePriorityOrder = [...variantPriorityOrder].reverse(); - const numAnimationTypes = variantPriorityOrder.length; - function createAnimateFunction(visualElement) { - return (animations) => { - return Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options))); - }; - } - function createAnimationState(visualElement) { - let animate = createAnimateFunction(visualElement); - let state = createState(); - let isInitialRender = true; - /** - * Track whether the animation state has been reset (e.g. via StrictMode - * double-invocation or Suspense unmount/remount). On the first - * animateChanges() call after a reset we need to behave like the initial - * render for variant-inheritance checks, even though isInitialRender is - * already false. - */ - let wasReset = false; - /** - * This function will be used to reduce the animation definitions for - * each active animation type into an object of resolved values for it. - */ - const buildResolvedTypeValues = (type) => (acc, definition) => { - const resolved = resolveVariant(visualElement, definition, type === "exit" - ? visualElement.presenceContext?.custom - : undefined); - if (resolved) { - const { transition, transitionEnd, ...target } = resolved; - acc = { ...acc, ...target, ...transitionEnd }; - } - return acc; - }; - /** - * This just allows us to inject mocked animation functions - * @internal - */ - function setAnimateFunction(makeAnimator) { - animate = makeAnimator(visualElement); - } - /** - * When we receive new props, we need to: - * 1. Create a list of protected keys for each type. This is a directory of - * value keys that are currently being "handled" by types of a higher priority - * so that whenever an animation is played of a given type, these values are - * protected from being animated. - * 2. Determine if an animation type needs animating. - * 3. Determine if any values have been removed from a type and figure out - * what to animate those to. - */ - function animateChanges(changedActiveType) { - const { props } = visualElement; - const context = getVariantContext(visualElement.parent) || {}; - /** - * A list of animations that we'll build into as we iterate through the animation - * types. This will get executed at the end of the function. - */ - const animations = []; - /** - * Keep track of which values have been removed. Then, as we hit lower priority - * animation types, we can check if they contain removed values and animate to that. - */ - const removedKeys = new Set(); - /** - * A dictionary of all encountered keys. This is an object to let us build into and - * copy it without iteration. Each time we hit an animation type we set its protected - * keys - the keys its not allowed to animate - to the latest version of this object. - */ - let encounteredKeys = {}; - /** - * If a variant has been removed at a given index, and this component is controlling - * variant animations, we want to ensure lower-priority variants are forced to animate. - */ - let removedVariantIndex = Infinity; - /** - * Iterate through all animation types in reverse priority order. For each, we want to - * detect which values it's handling and whether or not they've changed (and therefore - * need to be animated). If any values have been removed, we want to detect those in - * lower priority props and flag for animation. - */ - for (let i = 0; i < numAnimationTypes; i++) { - const type = reversePriorityOrder[i]; - const typeState = state[type]; - const prop = props[type] !== undefined - ? props[type] - : context[type]; - const propIsVariant = isVariantLabel(prop); - /** - * If this type has *just* changed isActive status, set activeDelta - * to that status. Otherwise set to null. - */ - const activeDelta = type === changedActiveType ? typeState.isActive : null; - if (activeDelta === false) - removedVariantIndex = i; - /** - * If this prop is an inherited variant, rather than been set directly on the - * component itself, we want to make sure we allow the parent to trigger animations. - * - * TODO: Can probably change this to a !isControllingVariants check - */ - let isInherited = prop === context[type] && - prop !== props[type] && - propIsVariant; - if (isInherited && - (isInitialRender || wasReset) && - visualElement.manuallyAnimateOnMount) { - isInherited = false; - } - /** - * Set all encountered keys so far as the protected keys for this type. This will - * be any key that has been animated or otherwise handled by active, higher-priortiy types. - */ - typeState.protectedKeys = { ...encounteredKeys }; - // Check if we can skip analysing this prop early - if ( - // If it isn't active and hasn't *just* been set as inactive - (!typeState.isActive && activeDelta === null) || - // If we didn't and don't have any defined prop for this animation type - (!prop && !typeState.prevProp) || - // Or if the prop doesn't define an animation - isAnimationControls(prop) || - typeof prop === "boolean") { - continue; - } - /** - * If exit is already active and wasn't just activated, skip - * re-processing to prevent interrupting running exit animations. - * Re-resolving exit with a changed custom value can start new - * value animations that stop the originals, leaving the exit - * animation promise unresolved and the component stuck in the DOM. - */ - if (type === "exit" && typeState.isActive && activeDelta !== true) { - if (typeState.prevResolvedValues) { - encounteredKeys = { - ...encounteredKeys, - ...typeState.prevResolvedValues, - }; - } - continue; - } - /** - * As we go look through the values defined on this type, if we detect - * a changed value or a value that was removed in a higher priority, we set - * this to true and add this prop to the animation list. - */ - const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop); - let shouldAnimateType = variantDidChange || - // If we're making this variant active, we want to always make it active - (type === changedActiveType && - typeState.isActive && - !isInherited && - propIsVariant) || - // If we removed a higher-priority variant (i is in reverse order) - (i > removedVariantIndex && propIsVariant); - let handledRemovedValues = false; - /** - * As animations can be set as variant lists, variants or target objects, we - * coerce everything to an array if it isn't one already - */ - const definitionList = Array.isArray(prop) ? prop : [prop]; - /** - * Build an object of all the resolved values. We'll use this in the subsequent - * animateChanges calls to determine whether a value has changed. - */ - let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {}); - if (activeDelta === false) - resolvedValues = {}; - /** - * Now we need to loop through all the keys in the prev prop and this prop, - * and decide: - * 1. If the value has changed, and needs animating - * 2. If it has been removed, and needs adding to the removedKeys set - * 3. If it has been removed in a higher priority type and needs animating - * 4. If it hasn't been removed in a higher priority but hasn't changed, and - * needs adding to the type's protectedKeys list. - */ - const { prevResolvedValues = {} } = typeState; - const allKeys = { - ...prevResolvedValues, - ...resolvedValues, - }; - const markToAnimate = (key) => { - shouldAnimateType = true; - if (removedKeys.has(key)) { - handledRemovedValues = true; - removedKeys.delete(key); - } - typeState.needsAnimating[key] = true; - const motionValue = visualElement.getValue(key); - if (motionValue) - motionValue.liveStyle = false; - }; - for (const key in allKeys) { - const next = resolvedValues[key]; - const prev = prevResolvedValues[key]; - // If we've already handled this we can just skip ahead - if (encounteredKeys.hasOwnProperty(key)) - continue; - /** - * If the value has changed, we probably want to animate it. - */ - let valueHasChanged = false; - if (isKeyframesTarget(next) && isKeyframesTarget(prev)) { - valueHasChanged = - !shallowCompare(next, prev) || variantDidChange; - } - else { - valueHasChanged = next !== prev; - } - if (valueHasChanged) { - if (next !== undefined && next !== null) { - // If next is defined and doesn't equal prev, it needs animating - markToAnimate(key); - } - else { - // If it's undefined, it's been removed. - removedKeys.add(key); - } - } - else if (next !== undefined && removedKeys.has(key)) { - /** - * If next hasn't changed and it isn't undefined, we want to check if it's - * been removed by a higher priority - */ - markToAnimate(key); - } - else { - /** - * If it hasn't changed, we add it to the list of protected values - * to ensure it doesn't get animated. - */ - typeState.protectedKeys[key] = true; - } - } - /** - * Update the typeState so next time animateChanges is called we can compare the - * latest prop and resolvedValues to these. - */ - typeState.prevProp = prop; - typeState.prevResolvedValues = resolvedValues; - if (typeState.isActive) { - encounteredKeys = { ...encounteredKeys, ...resolvedValues }; - } - if ((isInitialRender || wasReset) && - visualElement.blockInitialAnimation) { - shouldAnimateType = false; - } - /** - * If this is an inherited prop we want to skip this animation - * unless the inherited variants haven't changed on this render. - */ - const willAnimateViaParent = isInherited && variantDidChange; - const needsAnimating = !willAnimateViaParent || handledRemovedValues; - if (shouldAnimateType && needsAnimating) { - animations.push(...definitionList.map((animation) => { - const options = { type }; - /** - * If we're performing the initial animation, but we're not - * rendering at the same time as the variant-controlling parent, - * we want to use the parent's transition to calculate the stagger. - */ - if (typeof animation === "string" && - (isInitialRender || wasReset) && - !willAnimateViaParent && - visualElement.manuallyAnimateOnMount && - visualElement.parent) { - const { parent } = visualElement; - const parentVariant = resolveVariant(parent, animation); - if (parent.enteringChildren && parentVariant) { - const { delayChildren } = parentVariant.transition || {}; - options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren); - } - } - return { - animation: animation, - options, - }; - })); - } - } - /** - * If there are some removed value that haven't been dealt with, - * we need to create a new animation that falls back either to the value - * defined in the style prop, or the last read value. - */ - if (removedKeys.size) { - const fallbackAnimation = {}; - /** - * If the initial prop contains a transition we can use that, otherwise - * allow the animation function to use the visual element's default. - */ - if (typeof props.initial !== "boolean") { - const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial) - ? props.initial[0] - : props.initial); - if (initialTransition && initialTransition.transition) { - fallbackAnimation.transition = initialTransition.transition; - } - } - removedKeys.forEach((key) => { - const fallbackTarget = visualElement.getBaseTarget(key); - const motionValue = visualElement.getValue(key); - if (motionValue) - motionValue.liveStyle = true; - // @ts-expect-error - @mattgperry to figure if we should do something here - fallbackAnimation[key] = fallbackTarget ?? null; - }); - animations.push({ animation: fallbackAnimation }); - } - let shouldAnimate = Boolean(animations.length); - if (isInitialRender && - (props.initial === false || props.initial === props.animate) && - !visualElement.manuallyAnimateOnMount) { - shouldAnimate = false; - } - isInitialRender = false; - wasReset = false; - return shouldAnimate ? animate(animations) : Promise.resolve(); - } - /** - * Change whether a certain animation type is active. - */ - function setActive(type, isActive) { - // If the active state hasn't changed, we can safely do nothing here - if (state[type].isActive === isActive) - return Promise.resolve(); - // Propagate active change to children - visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive)); - state[type].isActive = isActive; - const animations = animateChanges(type); - for (const key in state) { - state[key].protectedKeys = {}; - } - return animations; - } - return { - animateChanges, - setActive, - setAnimateFunction, - getState: () => state, - reset: () => { - state = createState(); - wasReset = true; - }, - }; - } - function checkVariantsDidChange(prev, next) { - if (typeof next === "string") { - return next !== prev; - } - else if (Array.isArray(next)) { - return !shallowCompare(next, prev); - } - return false; - } - function createTypeState(isActive = false) { - return { - isActive, - protectedKeys: {}, - needsAnimating: {}, - prevResolvedValues: {}, - }; - } - function createState() { - return { - animate: createTypeState(true), - whileInView: createTypeState(), - whileHover: createTypeState(), - whileTap: createTypeState(), - whileDrag: createTypeState(), - whileFocus: createTypeState(), - exit: createTypeState(), - }; - } - - /** - * Reset an axis to the provided origin box. - * - * This is a mutative operation. - */ - function copyAxisInto(axis, originAxis) { - axis.min = originAxis.min; - axis.max = originAxis.max; - } - /** - * Reset a box to the provided origin box. - * - * This is a mutative operation. - */ - function copyBoxInto(box, originBox) { - copyAxisInto(box.x, originBox.x); - copyAxisInto(box.y, originBox.y); - } - /** - * Reset a delta to the provided origin box. - * - * This is a mutative operation. - */ - function copyAxisDeltaInto(delta, originDelta) { - delta.translate = originDelta.translate; - delta.scale = originDelta.scale; - delta.originPoint = originDelta.originPoint; - delta.origin = originDelta.origin; - } - - const SCALE_PRECISION = 0.0001; - const SCALE_MIN = 1 - SCALE_PRECISION; - const SCALE_MAX = 1 + SCALE_PRECISION; - const TRANSLATE_PRECISION = 0.01; - const TRANSLATE_MIN = 0 - TRANSLATE_PRECISION; - const TRANSLATE_MAX = 0 + TRANSLATE_PRECISION; - function calcLength(axis) { - return axis.max - axis.min; - } - function isNear(value, target, maxDistance) { - return Math.abs(value - target) <= maxDistance; - } - function calcAxisDelta(delta, source, target, origin = 0.5) { - delta.origin = origin; - delta.originPoint = mixNumber$1(source.min, source.max, delta.origin); - delta.scale = calcLength(target) / calcLength(source); - delta.translate = - mixNumber$1(target.min, target.max, delta.origin) - delta.originPoint; - if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) || - isNaN(delta.scale)) { - delta.scale = 1.0; - } - if ((delta.translate >= TRANSLATE_MIN && - delta.translate <= TRANSLATE_MAX) || - isNaN(delta.translate)) { - delta.translate = 0.0; - } - } - function calcBoxDelta(delta, source, target, origin) { - calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined); - calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined); - } - function calcRelativeAxis(target, relative, parent, anchor = 0) { - const anchorPoint = anchor - ? mixNumber$1(parent.min, parent.max, anchor) - : parent.min; - target.min = anchorPoint + relative.min; - target.max = target.min + calcLength(relative); - } - function calcRelativeBox(target, relative, parent, anchor) { - calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x); - calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y); - } - function calcRelativeAxisPosition(target, layout, parent, anchor = 0) { - const anchorPoint = anchor - ? mixNumber$1(parent.min, parent.max, anchor) - : parent.min; - target.min = layout.min - anchorPoint; - target.max = target.min + calcLength(layout); - } - function calcRelativePosition(target, layout, parent, anchor) { - calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x); - calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y); - } - - /** - * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse - */ - function removePointDelta(point, translate, scale, originPoint, boxScale) { - point -= translate; - point = scalePoint(point, 1 / scale, originPoint); - if (boxScale !== undefined) { - point = scalePoint(point, 1 / boxScale, originPoint); - } - return point; - } - /** - * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse - */ - function removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) { - if (percent.test(translate)) { - translate = parseFloat(translate); - const relativeProgress = mixNumber$1(sourceAxis.min, sourceAxis.max, translate / 100); - translate = relativeProgress - sourceAxis.min; - } - if (typeof translate !== "number") - return; - let originPoint = mixNumber$1(originAxis.min, originAxis.max, origin); - if (axis === originAxis) - originPoint -= translate; - axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale); - axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale); - } - /** - * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ - function removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) { - removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis); - } - /** - * The names of the motion values we want to apply as translation, scale and origin. - */ - const xKeys = ["x", "scaleX", "originX"]; - const yKeys = ["y", "scaleY", "originY"]; - /** - * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ - function removeBoxTransforms(box, transforms, originBox, sourceBox) { - removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined); - removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined); - } - - function isAxisDeltaZero(delta) { - return delta.translate === 0 && delta.scale === 1; - } - function isDeltaZero(delta) { - return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y); - } - function axisEquals(a, b) { - return a.min === b.min && a.max === b.max; - } - function boxEquals(a, b) { - return axisEquals(a.x, b.x) && axisEquals(a.y, b.y); - } - function axisEqualsRounded(a, b) { - return (Math.round(a.min) === Math.round(b.min) && - Math.round(a.max) === Math.round(b.max)); - } - function boxEqualsRounded(a, b) { - return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y); - } - function aspectRatio(box) { - return calcLength(box.x) / calcLength(box.y); - } - function axisDeltaEquals(a, b) { - return (a.translate === b.translate && - a.scale === b.scale && - a.originPoint === b.originPoint); - } - - function eachAxis(callback) { - return [callback("x"), callback("y")]; - } - - function buildProjectionTransform(delta, treeScale, latestTransform) { - let transform = ""; - /** - * The translations we use to calculate are always relative to the viewport coordinate space. - * But when we apply scales, we also scale the coordinate space of an element and its children. - * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need - * to move an element 100 pixels, we actually need to move it 200 in within that scaled space. - */ - const xTranslate = delta.x.translate / treeScale.x; - const yTranslate = delta.y.translate / treeScale.y; - const zTranslate = latestTransform?.z || 0; - if (xTranslate || yTranslate || zTranslate) { - transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `; - } - /** - * Apply scale correction for the tree transform. - * This will apply scale to the screen-orientated axes. - */ - if (treeScale.x !== 1 || treeScale.y !== 1) { - transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `; - } - if (latestTransform) { - const { transformPerspective, rotate, pathRotation, rotateX, rotateY, skewX, skewY, } = latestTransform; - if (transformPerspective) - transform = `perspective(${transformPerspective}px) ${transform}`; - if (rotate) - transform += `rotate(${rotate}deg) `; - // Additive `rotate()` so user `rotate` isn't clobbered. - if (pathRotation) - transform += `rotate(${pathRotation}deg) `; - if (rotateX) - transform += `rotateX(${rotateX}deg) `; - if (rotateY) - transform += `rotateY(${rotateY}deg) `; - if (skewX) - transform += `skewX(${skewX}deg) `; - if (skewY) - transform += `skewY(${skewY}deg) `; - } - /** - * Apply scale to match the size of the element to the size we want it. - * This will apply scale to the element-orientated axes. - */ - const elementScaleX = delta.x.scale * treeScale.x; - const elementScaleY = delta.y.scale * treeScale.y; - if (elementScaleX !== 1 || elementScaleY !== 1) { - transform += `scale(${elementScaleX}, ${elementScaleY})`; - } - return transform || "none"; - } - - const borderLabels = [ - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomLeftRadius", - "borderBottomRightRadius", - ]; - const numBorders = borderLabels.length; - const asNumber = (value) => typeof value === "string" ? parseFloat(value) : value; - const isPx = (value) => typeof value === "number" || px.test(value); - function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) { - if (shouldCrossfadeOpacity) { - target.opacity = mixNumber$1(0, lead.opacity ?? 1, easeCrossfadeIn(progress)); - target.opacityExit = mixNumber$1(follow.opacity ?? 1, 0, easeCrossfadeOut(progress)); - } - else if (isOnlyMember) { - target.opacity = mixNumber$1(follow.opacity ?? 1, lead.opacity ?? 1, progress); - } - /** - * Mix border radius - */ - for (let i = 0; i < numBorders; i++) { - const borderLabel = borderLabels[i]; - let followRadius = getRadius(follow, borderLabel); - let leadRadius = getRadius(lead, borderLabel); - if (followRadius === undefined && leadRadius === undefined) - continue; - followRadius || (followRadius = 0); - leadRadius || (leadRadius = 0); - const canMix = followRadius === 0 || - leadRadius === 0 || - isPx(followRadius) === isPx(leadRadius); - if (canMix) { - target[borderLabel] = Math.max(mixNumber$1(asNumber(followRadius), asNumber(leadRadius), progress), 0); - if (percent.test(leadRadius) || percent.test(followRadius)) { - target[borderLabel] += "%"; - } - } - else { - target[borderLabel] = leadRadius; - } - } - /** - * Mix rotation - */ - if (follow.rotate || lead.rotate) { - target.rotate = mixNumber$1(follow.rotate || 0, lead.rotate || 0, progress); - } - } - function getRadius(values, radiusName) { - return values[radiusName] !== undefined - ? values[radiusName] - : values.borderRadius; - } - const easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut); - const easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop$1); - function compress(min, max, easing) { - return (p) => { - // Could replace ifs with clamp - if (p < min) - return 0; - if (p > max) - return 1; - return easing(progress(min, max, p)); - }; - } - - function animateSingleValue(value, keyframes, options) { - const motionValue$1 = isMotionValue(value) ? value : motionValue(value); - motionValue$1.start(animateMotionValue("", motionValue$1, keyframes, options)); - return motionValue$1.animation; - } - - function addDomEvent(target, eventName, handler, options = { passive: true }) { - target.addEventListener(eventName, handler, options); - return () => target.removeEventListener(eventName, handler); - } - - const compareByDepth = (a, b) => a.depth - b.depth; - - class FlatTree { - constructor() { - this.children = []; - this.isDirty = false; - } - add(child) { - addUniqueItem(this.children, child); - this.isDirty = true; - } - remove(child) { - removeItem(this.children, child); - this.isDirty = true; - } - forEach(callback) { - this.isDirty && this.children.sort(compareByDepth); - this.isDirty = false; - this.children.forEach(callback); - } - } - - /** - * Timeout defined in ms - */ - function delay(callback, timeout) { - const start = time.now(); - const checkElapsed = ({ timestamp }) => { - const elapsed = timestamp - start; - if (elapsed >= timeout) { - cancelFrame(checkElapsed); - callback(elapsed - timeout); - } - }; - frame.setup(checkElapsed, true); - return () => cancelFrame(checkElapsed); - } - function delayInSeconds(callback, timeout) { - return delay(callback, secondsToMilliseconds(timeout)); - } - - /** - * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself - */ - function resolveMotionValue(value) { - return isMotionValue(value) ? value.get() : value; - } - - class NodeStack { - constructor() { - this.members = []; - } - add(node) { - addUniqueItem(this.members, node); - for (let i = this.members.length - 1; i >= 0; i--) { - const member = this.members[i]; - if (member === node || member === this.lead || member === this.prevLead) - continue; - const inst = member.instance; - if ((!inst || inst.isConnected === false) && !member.snapshot) { - removeItem(this.members, member); - member.unmount(); - } - } - node.scheduleRender(); - } - remove(node) { - removeItem(this.members, node); - if (node === this.prevLead) - this.prevLead = undefined; - if (node === this.lead) { - const prevLead = this.members[this.members.length - 1]; - if (prevLead) - this.promote(prevLead); - } - } - relegate(node) { - for (let i = this.members.indexOf(node) - 1; i >= 0; i--) { - const member = this.members[i]; - if (member.isPresent !== false && member.instance?.isConnected !== false) { - this.promote(member); - return true; - } - } - return false; - } - promote(node, preserveFollowOpacity) { - const prevLead = this.lead; - if (node === prevLead) - return; - this.prevLead = prevLead; - this.lead = node; - node.show(); - if (prevLead) { - prevLead.updateSnapshot(); - node.scheduleRender(); - const { layoutDependency: prevDep } = prevLead.options; - const { layoutDependency: nextDep } = node.options; - if (prevDep === undefined || prevDep !== nextDep) { - node.resumeFrom = prevLead; - if (preserveFollowOpacity) - prevLead.preserveOpacity = true; - if (prevLead.snapshot) { - node.snapshot = prevLead.snapshot; - node.snapshot.latestValues = - prevLead.animationValues || prevLead.latestValues; - } - if (node.root?.isUpdating) - node.isLayoutDirty = true; - } - if (node.options.crossfade === false) - prevLead.hide(); - } - } - exitAnimationComplete() { - this.members.forEach((member) => { - member.options.onExitComplete?.(); - member.resumingFrom?.options.onExitComplete?.(); - }); - } - scheduleRender() { - this.members.forEach((member) => member.instance && member.scheduleRender(false)); - } - removeLeadSnapshot() { - if (this.lead?.snapshot) - this.lead.snapshot = undefined; - } - } - - /** - * This should only ever be modified on the client otherwise it'll - * persist through server requests. If we need instanced states we - * could lazy-init via root. - */ - const globalProjectionState = { - /** - * Global flag as to whether the tree has animated since the last time - * we resized the window - */ - hasAnimatedSinceResize: true, - /** - * We set this to true once, on the first update. Any nodes added to the tree beyond that - * update will be given a `data-projection-id` attribute. - */ - hasEverUpdated: false, - }; - - const metrics = { - nodes: 0, - calculatedTargetDeltas: 0, - calculatedProjections: 0, - }; - const transformAxes = ["", "X", "Y", "Z"]; - /** - * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1 - * which has a noticeable difference in spring animations - */ - const animationTarget = 1000; - let id$2 = 0; - function resetDistortingTransform(key, visualElement, values, sharedAnimationValues) { - const { latestValues } = visualElement; - // Record the distorting transform and then temporarily set it to 0 - if (latestValues[key]) { - values[key] = latestValues[key]; - visualElement.setStaticValue(key, 0); - if (sharedAnimationValues) { - sharedAnimationValues[key] = 0; - } - } - } - function cancelTreeOptimisedTransformAnimations(projectionNode) { - projectionNode.hasCheckedOptimisedAppear = true; - if (projectionNode.root === projectionNode) - return; - const { visualElement } = projectionNode.options; - if (!visualElement) - return; - const appearId = getOptimisedAppearId(visualElement); - if (window.MotionHasOptimisedAnimation(appearId, "transform")) { - const { layout, layoutId } = projectionNode.options; - window.MotionCancelOptimisedAnimation(appearId, "transform", frame, !(layout || layoutId)); - } - const { parent } = projectionNode; - if (parent && !parent.hasCheckedOptimisedAppear) { - cancelTreeOptimisedTransformAnimations(parent); - } - } - function createProjectionNode$1({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) { - return class ProjectionNode { - constructor(latestValues = {}, parent = defaultParent?.()) { - /** - * A unique ID generated for every projection node. - */ - this.id = id$2++; - /** - * An id that represents a unique session instigated by startUpdate. - */ - this.animationId = 0; - this.animationCommitId = 0; - /** - * A Set containing all this component's children. This is used to iterate - * through the children. - * - * TODO: This could be faster to iterate as a flat array stored on the root node. - */ - this.children = new Set(); - /** - * Options for the node. We use this to configure what kind of layout animations - * we should perform (if any). - */ - this.options = {}; - /** - * We use this to detect when its safe to shut down part of a projection tree. - * We have to keep projecting children for scale correction and relative projection - * until all their parents stop performing layout animations. - */ - this.isTreeAnimating = false; - this.isAnimationBlocked = false; - /** - * Flag to true if we think this layout has been changed. We can't always know this, - * currently we set it to true every time a component renders, or if it has a layoutDependency - * if that has changed between renders. Additionally, components can be grouped by LayoutGroup - * and if one node is dirtied, they all are. - */ - this.isLayoutDirty = false; - /** - * Flag to true if we think the projection calculations for this node needs - * recalculating as a result of an updated transform or layout animation. - */ - this.isProjectionDirty = false; - /** - * Flag to true if the layout *or* transform has changed. This then gets propagated - * throughout the projection tree, forcing any element below to recalculate on the next frame. - */ - this.isSharedProjectionDirty = false; - /** - * Flag transform dirty. This gets propagated throughout the whole tree but is only - * respected by shared nodes. - */ - this.isTransformDirty = false; - /** - * Block layout updates for instant layout transitions throughout the tree. - */ - this.updateManuallyBlocked = false; - this.updateBlockedByResize = false; - /** - * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate` - * call. - */ - this.isUpdating = false; - /** - * If this is an SVG element we currently disable projection transforms - */ - this.isSVG = false; - /** - * Flag to true (during promotion) if a node doing an instant layout transition needs to reset - * its projection styles. - */ - this.needsReset = false; - /** - * Flags whether this node should have its transform reset prior to measuring. - */ - this.shouldResetTransform = false; - /** - * Store whether this node has been checked for optimised appear animations. As - * effects fire bottom-up, and we want to look up the tree for appear animations, - * this makes sure we only check each path once, stopping at nodes that - * have already been checked. - */ - this.hasCheckedOptimisedAppear = false; - /** - * An object representing the calculated contextual/accumulated/tree scale. - * This will be used to scale calculcated projection transforms, as these are - * calculated in screen-space but need to be scaled for elements to layoutly - * make it to their calculated destinations. - * - * TODO: Lazy-init - */ - this.treeScale = { x: 1, y: 1 }; - /** - * - */ - this.eventHandlers = new Map(); - this.hasTreeAnimated = false; - this.layoutVersion = 0; - // Note: Currently only running on root node - this.updateScheduled = false; - this.scheduleUpdate = () => this.update(); - this.projectionUpdateScheduled = false; - this.checkUpdateFailed = () => { - if (this.isUpdating) { - this.isUpdating = false; - this.clearAllSnapshots(); - } - }; - /** - * This is a multi-step process as shared nodes might be of different depths. Nodes - * are sorted by depth order, so we need to resolve the entire tree before moving to - * the next step. - */ - this.updateProjection = () => { - this.projectionUpdateScheduled = false; - /** - * Reset debug counts. Manually resetting rather than creating a new - * object each frame. - */ - if (statsBuffer.value) { - metrics.nodes = - metrics.calculatedTargetDeltas = - metrics.calculatedProjections = - 0; - } - this.nodes.forEach(propagateDirtyNodes); - this.nodes.forEach(resolveTargetDelta); - this.nodes.forEach(calcProjection); - this.nodes.forEach(cleanDirtyNodes); - if (statsBuffer.addProjectionMetrics) { - statsBuffer.addProjectionMetrics(metrics); - } - }; - /** - * Frame calculations - */ - this.resolvedRelativeTargetAt = 0.0; - this.linkedParentVersion = 0; - this.hasProjected = false; - this.isVisible = true; - this.animationProgress = 0; - /** - * Shared layout - */ - // TODO Only running on root node - this.sharedNodes = new Map(); - this.latestValues = latestValues; - this.root = parent ? parent.root || parent : this; - this.path = parent ? [...parent.path, parent] : []; - this.parent = parent; - this.depth = parent ? parent.depth + 1 : 0; - for (let i = 0; i < this.path.length; i++) { - this.path[i].shouldResetTransform = true; - } - if (this.root === this) - this.nodes = new FlatTree(); - } - addEventListener(name, handler) { - if (!this.eventHandlers.has(name)) { - this.eventHandlers.set(name, new SubscriptionManager()); - } - return this.eventHandlers.get(name).add(handler); - } - notifyListeners(name, ...args) { - const subscriptionManager = this.eventHandlers.get(name); - subscriptionManager && subscriptionManager.notify(...args); - } - hasListeners(name) { - return this.eventHandlers.has(name); - } - /** - * Lifecycles - */ - mount(instance) { - if (this.instance) - return; - this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance); - this.instance = instance; - const { layoutId, layout, visualElement } = this.options; - if (visualElement && !visualElement.current) { - visualElement.mount(instance); - } - this.root.nodes.add(this); - this.parent && this.parent.children.add(this); - if (this.root.hasTreeAnimated && (layout || layoutId)) { - this.isLayoutDirty = true; - } - if (attachResizeListener) { - let cancelDelay; - let innerWidth = 0; - const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false); - // Set initial innerWidth in a frame.read callback to batch the read - frame.read(() => { - innerWidth = window.innerWidth; - }); - attachResizeListener(instance, () => { - const newInnerWidth = window.innerWidth; - if (newInnerWidth === innerWidth) - return; - innerWidth = newInnerWidth; - this.root.updateBlockedByResize = true; - cancelDelay && cancelDelay(); - cancelDelay = delay(resizeUnblockUpdate, 250); - if (globalProjectionState.hasAnimatedSinceResize) { - globalProjectionState.hasAnimatedSinceResize = false; - this.nodes.forEach(finishAnimation); - } - }); - } - if (layoutId) { - this.root.registerSharedNode(layoutId, this); - } - // Only register the handler if it requires layout animation - if (this.options.animate !== false && - visualElement && - (layoutId || layout)) { - this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout, }) => { - if (this.isTreeAnimationBlocked()) { - this.target = undefined; - this.relativeTarget = undefined; - return; - } - // TODO: Check here if an animation exists - const layoutTransition = this.options.transition || - visualElement.getDefaultTransition() || - defaultLayoutTransition; - const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps(); - /** - * The target layout of the element might stay the same, - * but its position relative to its parent has changed. - */ - const hasTargetChanged = !this.targetLayout || - !boxEqualsRounded(this.targetLayout, newLayout); - /* - * Note: Disabled to fix relative animations always triggering new - * layout animations. If this causes further issues, we can try - * a different approach to detecting relative target changes. - */ - // || hasRelativeLayoutChanged - /** - * If the layout hasn't seemed to have changed, it might be that the - * element is visually in the same place in the document but its position - * relative to its parent has indeed changed. So here we check for that. - */ - const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged; - if (this.options.layoutRoot || - this.resumeFrom || - hasOnlyRelativeTargetChanged || - (hasLayoutChanged && - (hasTargetChanged || !this.currentAnimation))) { - if (this.resumeFrom) { - this.resumingFrom = this.resumeFrom; - this.resumingFrom.resumingFrom = undefined; - } - const animationOptions = { - ...getValueTransition$1(layoutTransition, "layout"), - onPlay: onLayoutAnimationStart, - onComplete: onLayoutAnimationComplete, - }; - if (visualElement.shouldReduceMotion || - this.options.layoutRoot) { - animationOptions.delay = 0; - animationOptions.type = false; - } - this.startAnimation(animationOptions); - /** - * Set animation origin after starting animation to avoid layout jump - * caused by stopping previous layout animation - */ - this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged, animationOptions - .path); - } - else { - /** - * If the layout hasn't changed and we have an animation that hasn't started yet, - * finish it immediately. Otherwise it will be animating from a location - * that was probably never committed to screen and look like a jumpy box. - */ - if (!hasLayoutChanged) { - finishAnimation(this); - } - if (this.isLead() && this.options.onExitComplete) { - this.options.onExitComplete(); - } - } - this.targetLayout = newLayout; - }); - } - } - unmount() { - this.options.layoutId && this.willUpdate(); - this.root.nodes.remove(this); - const stack = this.getStack(); - stack && stack.remove(this); - this.parent && this.parent.children.delete(this); - this.instance = undefined; - this.eventHandlers.clear(); - cancelFrame(this.updateProjection); - } - // only on the root - blockUpdate() { - this.updateManuallyBlocked = true; - } - unblockUpdate() { - this.updateManuallyBlocked = false; - } - isUpdateBlocked() { - return this.updateManuallyBlocked || this.updateBlockedByResize; - } - isTreeAnimationBlocked() { - return (this.isAnimationBlocked || - (this.parent && this.parent.isTreeAnimationBlocked()) || - false); - } - // Note: currently only running on root node - startUpdate() { - if (this.isUpdateBlocked()) - return; - this.isUpdating = true; - this.nodes && this.nodes.forEach(resetSkewAndRotation); - this.animationId++; - } - getTransformTemplate() { - const { visualElement } = this.options; - return visualElement && visualElement.getProps().transformTemplate; - } - willUpdate(shouldNotifyListeners = true) { - this.root.hasTreeAnimated = true; - if (this.root.isUpdateBlocked()) { - this.options.onExitComplete && this.options.onExitComplete(); - return; - } - /** - * If we're running optimised appear animations then these must be - * cancelled before measuring the DOM. This is so we can measure - * the true layout of the element rather than the WAAPI animation - * which will be unaffected by the resetSkewAndRotate step. - * - * Note: This is a DOM write. Worst case scenario is this is sandwiched - * between other snapshot reads which will cause unnecessary style recalculations. - * This has to happen here though, as we don't yet know which nodes will need - * snapshots in startUpdate(), but we only want to cancel optimised animations - * if a layout animation measurement is actually going to be affected by them. - */ - if (window.MotionCancelOptimisedAnimation && - !this.hasCheckedOptimisedAppear) { - cancelTreeOptimisedTransformAnimations(this); - } - !this.root.isUpdating && this.root.startUpdate(); - if (this.isLayoutDirty) - return; - this.isLayoutDirty = true; - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - node.shouldResetTransform = true; - /** - * Percentage translates resolve against layoutBox dimensions, - * so ancestors with them must be re-measured after transform reset. - */ - if (typeof node.latestValues.x === "string" || - typeof node.latestValues.y === "string") { - node.isLayoutDirty = true; - } - node.updateScroll("snapshot"); - if (node.options.layoutRoot) { - node.willUpdate(false); - } - } - const { layoutId, layout } = this.options; - if (layoutId === undefined && !layout) - return; - const transformTemplate = this.getTransformTemplate(); - this.prevTransformTemplateValue = transformTemplate - ? transformTemplate(this.latestValues, "") - : undefined; - this.updateSnapshot(); - shouldNotifyListeners && this.notifyListeners("willUpdate"); - } - update() { - this.updateScheduled = false; - const updateWasBlocked = this.isUpdateBlocked(); - // When doing an instant transition, we skip the layout update, - // but should still clean up the measurements so that the next - // snapshot could be taken correctly. - if (updateWasBlocked) { - const wasBlockedByResize = this.updateBlockedByResize; - this.unblockUpdate(); - this.updateBlockedByResize = false; - this.clearAllSnapshots(); - /** - * When blocked by resize, still measure layouts so - * callbacks like onLayoutMeasure fire (e.g. Reorder). - * Skip notifyLayoutUpdate to prevent animations. - */ - if (wasBlockedByResize) { - this.nodes.forEach(forceLayoutMeasure); - } - this.nodes.forEach(clearMeasurements); - return; - } - /** - * If this is a repeat of didUpdate then ignore the animation. - */ - if (this.animationId <= this.animationCommitId) { - this.nodes.forEach(clearIsLayoutDirty); - return; - } - this.animationCommitId = this.animationId; - if (!this.isUpdating) { - this.nodes.forEach(clearIsLayoutDirty); - } - else { - this.isUpdating = false; - /** - * Ensure animation-blocked nodes (e.g. during drag) - * get measured even when memoized (willUpdate skipped). - */ - this.nodes.forEach(ensureDraggedNodesSnapshotted); - /** - * Write - */ - this.nodes.forEach(resetTransformStyle); - /** - * Read ================== - */ - // Update layout measurements of updated children - this.nodes.forEach(updateLayout); - /** - * Write - */ - // Notify listeners that the layout is updated - this.nodes.forEach(notifyLayoutUpdate); - } - this.clearAllSnapshots(); - /** - * Manually flush any pending updates. Ideally - * we could leave this to the following requestAnimationFrame but this seems - * to leave a flash of incorrectly styled content. - */ - const now = time.now(); - frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp); - frameData.timestamp = now; - frameData.isProcessing = true; - frameSteps.update.process(frameData); - frameSteps.preRender.process(frameData); - frameSteps.render.process(frameData); - frameData.isProcessing = false; - } - didUpdate() { - if (!this.updateScheduled) { - this.updateScheduled = true; - microtask.read(this.scheduleUpdate); - } - } - clearAllSnapshots() { - this.nodes.forEach(clearSnapshot); - this.sharedNodes.forEach(removeLeadSnapshots); - } - scheduleUpdateProjection() { - if (!this.projectionUpdateScheduled) { - this.projectionUpdateScheduled = true; - frame.preRender(this.updateProjection, false, true); - } - } - scheduleCheckAfterUnmount() { - /** - * If the unmounting node is in a layoutGroup and did trigger a willUpdate, - * we manually call didUpdate to give a chance to the siblings to animate. - * Otherwise, cleanup all snapshots to prevents future nodes from reusing them. - */ - frame.postRender(() => { - if (this.isLayoutDirty) { - this.root.didUpdate(); - } - else { - this.root.checkUpdateFailed(); - } - }); - } - /** - * Update measurements - */ - updateSnapshot() { - if (this.snapshot || !this.instance) - return; - this.snapshot = this.measure(); - if (this.snapshot && - !calcLength(this.snapshot.measuredBox.x) && - !calcLength(this.snapshot.measuredBox.y)) { - this.snapshot = undefined; - } - } - updateLayout() { - if (!this.instance) - return; - this.updateScroll(); - if (!(this.options.alwaysMeasureLayout && this.isLead()) && - !this.isLayoutDirty) { - return; - } - /** - * When a node is mounted, it simply resumes from the prevLead's - * snapshot instead of taking a new one, but the ancestors scroll - * might have updated while the prevLead is unmounted. We need to - * update the scroll again to make sure the layout we measure is - * up to date. - */ - if (this.resumeFrom && !this.resumeFrom.instance) { - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - node.updateScroll(); - } - } - const prevLayout = this.layout; - this.layout = this.measure(false); - this.layoutVersion++; - if (!this.layoutCorrected) - this.layoutCorrected = createBox(); - this.isLayoutDirty = false; - this.projectionDelta = undefined; - this.notifyListeners("measure", this.layout.layoutBox); - const { visualElement } = this.options; - visualElement && - visualElement.notify("LayoutMeasure", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined); - } - updateScroll(phase = "measure") { - let needsMeasurement = Boolean(this.options.layoutScroll && this.instance); - if (this.scroll && - this.scroll.animationId === this.root.animationId && - this.scroll.phase === phase) { - needsMeasurement = false; - } - if (needsMeasurement && this.instance) { - const isRoot = checkIsScrollRoot(this.instance); - this.scroll = { - animationId: this.root.animationId, - phase, - isRoot, - offset: measureScroll(this.instance), - wasRoot: this.scroll ? this.scroll.isRoot : isRoot, - }; - } - } - resetTransform() { - if (!resetTransform) - return; - const isResetRequested = this.isLayoutDirty || - this.shouldResetTransform || - this.options.alwaysMeasureLayout; - const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta); - const transformTemplate = this.getTransformTemplate(); - const transformTemplateValue = transformTemplate - ? transformTemplate(this.latestValues, "") - : undefined; - const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue; - if (isResetRequested && - this.instance && - (hasProjection || - hasTransform(this.latestValues) || - transformTemplateHasChanged)) { - resetTransform(this.instance, transformTemplateValue); - this.shouldResetTransform = false; - this.scheduleRender(); - } - } - measure(removeTransform = true) { - const pageBox = this.measurePageBox(); - let layoutBox = this.removeElementScroll(pageBox); - /** - * Measurements taken during the pre-render stage - * still have transforms applied so we remove them - * via calculation. - */ - if (removeTransform) { - layoutBox = this.removeTransform(layoutBox); - } - roundBox(layoutBox); - return { - animationId: this.root.animationId, - measuredBox: pageBox, - layoutBox, - latestValues: {}, - source: this.id, - }; - } - measurePageBox() { - const { visualElement } = this.options; - if (!visualElement) - return createBox(); - const box = visualElement.measureViewportBox(); - const wasInScrollRoot = this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot); - if (!wasInScrollRoot) { - // Remove viewport scroll to give page-relative coordinates - const { scroll } = this.root; - if (scroll) { - translateAxis(box.x, scroll.offset.x); - translateAxis(box.y, scroll.offset.y); - } - } - return box; - } - removeElementScroll(box) { - const boxWithoutScroll = createBox(); - copyBoxInto(boxWithoutScroll, box); - if (this.scroll?.wasRoot) { - return boxWithoutScroll; - } - /** - * Performance TODO: Keep a cumulative scroll offset down the tree - * rather than loop back up the path. - */ - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - const { scroll, options } = node; - if (node !== this.root && scroll && options.layoutScroll) { - /** - * If this is a new scroll root, we want to remove all previous scrolls - * from the viewport box. - */ - if (scroll.wasRoot) { - copyBoxInto(boxWithoutScroll, box); - } - translateAxis(boxWithoutScroll.x, scroll.offset.x); - translateAxis(boxWithoutScroll.y, scroll.offset.y); - } - } - return boxWithoutScroll; - } - applyTransform(box, transformOnly = false, output) { - const withTransforms = output || createBox(); - copyBoxInto(withTransforms, box); - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - if (!transformOnly && - node.options.layoutScroll && - node.scroll && - node !== node.root) { - translateAxis(withTransforms.x, -node.scroll.offset.x); - translateAxis(withTransforms.y, -node.scroll.offset.y); - } - if (!hasTransform(node.latestValues)) - continue; - transformBox(withTransforms, node.latestValues, node.layout?.layoutBox); - } - if (hasTransform(this.latestValues)) { - transformBox(withTransforms, this.latestValues, this.layout?.layoutBox); - } - return withTransforms; - } - removeTransform(box) { - const boxWithoutTransform = createBox(); - copyBoxInto(boxWithoutTransform, box); - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - if (!hasTransform(node.latestValues)) - continue; - let sourceBox; - if (node.instance) { - hasScale(node.latestValues) && node.updateSnapshot(); - sourceBox = createBox(); - copyBoxInto(sourceBox, node.measurePageBox()); - } - removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot?.layoutBox, sourceBox); - } - if (hasTransform(this.latestValues)) { - removeBoxTransforms(boxWithoutTransform, this.latestValues); - } - return boxWithoutTransform; - } - setTargetDelta(delta) { - this.targetDelta = delta; - this.root.scheduleUpdateProjection(); - this.isProjectionDirty = true; - } - setOptions(options) { - this.options = { - ...this.options, - ...options, - crossfade: options.crossfade !== undefined ? options.crossfade : true, - }; - } - clearMeasurements() { - this.scroll = undefined; - this.layout = undefined; - this.snapshot = undefined; - this.prevTransformTemplateValue = undefined; - this.targetDelta = undefined; - this.target = undefined; - this.isLayoutDirty = false; - } - forceRelativeParentToResolveTarget() { - if (!this.relativeParent) - return; - /** - * If the parent target isn't up-to-date, force it to update. - * This is an unfortunate de-optimisation as it means any updating relative - * projection will cause all the relative parents to recalculate back - * up the tree. - */ - if (this.relativeParent.resolvedRelativeTargetAt !== - frameData.timestamp) { - this.relativeParent.resolveTargetDelta(true); - } - } - resolveTargetDelta(forceRecalculation = false) { - /** - * Once the dirty status of nodes has been spread through the tree, we also - * need to check if we have a shared node of a different depth that has itself - * been dirtied. - */ - const lead = this.getLead(); - this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty); - this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty); - this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty); - const isShared = Boolean(this.resumingFrom) || this !== lead; - /** - * We don't use transform for this step of processing so we don't - * need to check whether any nodes have changed transform. - */ - const canSkip = !(forceRecalculation || - (isShared && this.isSharedProjectionDirty) || - this.isProjectionDirty || - this.parent?.isProjectionDirty || - this.attemptToResolveRelativeTarget || - this.root.updateBlockedByResize); - if (canSkip) - return; - const { layout, layoutId } = this.options; - /** - * If we have no layout, we can't perform projection, so early return - */ - if (!this.layout || !(layout || layoutId)) - return; - this.resolvedRelativeTargetAt = frameData.timestamp; - const relativeParent = this.getClosestProjectingParent(); - if (relativeParent && - this.linkedParentVersion !== relativeParent.layoutVersion && - !relativeParent.options.layoutRoot) { - this.removeRelativeTarget(); - } - /** - * If we don't have a targetDelta but do have a layout, we can attempt to resolve - * a relativeParent. This will allow a component to perform scale correction - * even if no animation has started. - */ - if (!this.targetDelta && !this.relativeTarget) { - if (this.options.layoutAnchor !== false && - relativeParent && - relativeParent.layout) { - this.createRelativeTarget(relativeParent, this.layout.layoutBox, relativeParent.layout.layoutBox); - } - else { - this.removeRelativeTarget(); - } - } - /** - * If we have no relative target or no target delta our target isn't valid - * for this frame. - */ - if (!this.relativeTarget && !this.targetDelta) - return; - /** - * Lazy-init target data structure - */ - if (!this.target) { - this.target = createBox(); - this.targetWithTransforms = createBox(); - } - /** - * If we've got a relative box for this component, resolve it into a target relative to the parent. - */ - if (this.relativeTarget && - this.relativeTargetOrigin && - this.relativeParent && - this.relativeParent.target) { - this.forceRelativeParentToResolveTarget(); - calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || undefined); - /** - * If we've only got a targetDelta, resolve it into a target - */ - } - else if (this.targetDelta) { - if (Boolean(this.resumingFrom)) { - this.applyTransform(this.layout.layoutBox, false, this.target); - } - else { - copyBoxInto(this.target, this.layout.layoutBox); - } - applyBoxDelta(this.target, this.targetDelta); - } - else { - /** - * If no target, use own layout as target - */ - copyBoxInto(this.target, this.layout.layoutBox); - } - /** - * If we've been told to attempt to resolve a relative target, do so. - */ - if (this.attemptToResolveRelativeTarget) { - this.attemptToResolveRelativeTarget = false; - if (this.options.layoutAnchor !== false && - relativeParent && - Boolean(relativeParent.resumingFrom) === - Boolean(this.resumingFrom) && - !relativeParent.options.layoutScroll && - relativeParent.target && - this.animationProgress !== 1) { - this.createRelativeTarget(relativeParent, this.target, relativeParent.target); - } - else { - this.relativeParent = this.relativeTarget = undefined; - } - } - /** - * Increase debug counter for resolved target deltas - */ - if (statsBuffer.value) { - metrics.calculatedTargetDeltas++; - } - } - getClosestProjectingParent() { - if (!this.parent || - hasScale(this.parent.latestValues) || - has2DTranslate(this.parent.latestValues)) { - return undefined; - } - if (this.parent.isProjecting()) { - return this.parent; - } - else { - return this.parent.getClosestProjectingParent(); - } - } - isProjecting() { - return Boolean((this.relativeTarget || - this.targetDelta || - this.options.layoutRoot) && - this.layout); - } - createRelativeTarget(relativeParent, layout, parentLayout) { - this.relativeParent = relativeParent; - this.linkedParentVersion = relativeParent.layoutVersion; - this.forceRelativeParentToResolveTarget(); - this.relativeTarget = createBox(); - this.relativeTargetOrigin = createBox(); - calcRelativePosition(this.relativeTargetOrigin, layout, parentLayout, this.options.layoutAnchor || undefined); - copyBoxInto(this.relativeTarget, this.relativeTargetOrigin); - } - removeRelativeTarget() { - this.relativeParent = this.relativeTarget = undefined; - } - calcProjection() { - const lead = this.getLead(); - const isShared = Boolean(this.resumingFrom) || this !== lead; - let canSkip = true; - /** - * If this is a normal layout animation and neither this node nor its nearest projecting - * is dirty then we can't skip. - */ - if (this.isProjectionDirty || this.parent?.isProjectionDirty) { - canSkip = false; - } - /** - * If this is a shared layout animation and this node's shared projection is dirty then - * we can't skip. - */ - if (isShared && - (this.isSharedProjectionDirty || this.isTransformDirty)) { - canSkip = false; - } - /** - * If we have resolved the target this frame we must recalculate the - * projection to ensure it visually represents the internal calculations. - */ - if (this.resolvedRelativeTargetAt === frameData.timestamp) { - canSkip = false; - } - if (canSkip) - return; - const { layout, layoutId } = this.options; - /** - * If this section of the tree isn't animating we can - * delete our target sources for the following frame. - */ - this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) || - this.currentAnimation || - this.pendingAnimation); - if (!this.isTreeAnimating) { - this.targetDelta = this.relativeTarget = undefined; - } - if (!this.layout || !(layout || layoutId)) - return; - /** - * Reset the corrected box with the latest values from box, as we're then going - * to perform mutative operations on it. - */ - copyBoxInto(this.layoutCorrected, this.layout.layoutBox); - /** - * Record previous tree scales before updating. - */ - const prevTreeScaleX = this.treeScale.x; - const prevTreeScaleY = this.treeScale.y; - /** - * Apply all the parent deltas to this box to produce the corrected box. This - * is the layout box, as it will appear on screen as a result of the transforms of its parents. - */ - applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared); - /** - * If this layer needs to perform scale correction but doesn't have a target, - * use the layout as the target. - */ - if (lead.layout && - !lead.target && - (this.treeScale.x !== 1 || this.treeScale.y !== 1)) { - lead.target = lead.layout.layoutBox; - lead.targetWithTransforms = createBox(); - } - const { target } = lead; - if (!target) { - /** - * If we don't have a target to project into, but we were previously - * projecting, we want to remove the stored transform and schedule - * a render to ensure the elements reflect the removed transform. - */ - if (this.prevProjectionDelta) { - this.createProjectionDeltas(); - this.scheduleRender(); - } - return; - } - if (!this.projectionDelta || !this.prevProjectionDelta) { - this.createProjectionDeltas(); - } - else { - copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x); - copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y); - } - /** - * Update the delta between the corrected box and the target box before user-set transforms were applied. - * This will allow us to calculate the corrected borderRadius and boxShadow to compensate - * for our layout reprojection, but still allow them to be scaled correctly by the user. - * It might be that to simplify this we may want to accept that user-set scale is also corrected - * and we wouldn't have to keep and calc both deltas, OR we could support a user setting - * to allow people to choose whether these styles are corrected based on just the - * layout reprojection or the final bounding box. - */ - calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues); - if (this.treeScale.x !== prevTreeScaleX || - this.treeScale.y !== prevTreeScaleY || - !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) || - !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) { - this.hasProjected = true; - this.scheduleRender(); - this.notifyListeners("projectionUpdate", target); - } - /** - * Increase debug counter for recalculated projections - */ - if (statsBuffer.value) { - metrics.calculatedProjections++; - } - } - hide() { - this.isVisible = false; - // TODO: Schedule render - } - show() { - this.isVisible = true; - // TODO: Schedule render - } - scheduleRender(notifyAll = true) { - this.options.visualElement?.scheduleRender(); - if (notifyAll) { - const stack = this.getStack(); - stack && stack.scheduleRender(); - } - if (this.resumingFrom && !this.resumingFrom.instance) { - this.resumingFrom = undefined; - } - } - createProjectionDeltas() { - this.prevProjectionDelta = createDelta(); - this.projectionDelta = createDelta(); - this.projectionDeltaWithTransform = createDelta(); - } - setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false, pathFn) { - const snapshot = this.snapshot; - const snapshotLatestValues = snapshot ? snapshot.latestValues : {}; - const mixedValues = { ...this.latestValues }; - const targetDelta = createDelta(); - if (!this.relativeParent || - !this.relativeParent.options.layoutRoot) { - this.relativeTarget = this.relativeTargetOrigin = undefined; - } - this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged; - const relativeLayout = createBox(); - const snapshotSource = snapshot ? snapshot.source : undefined; - const layoutSource = this.layout ? this.layout.source : undefined; - const isSharedLayoutAnimation = snapshotSource !== layoutSource; - const stack = this.getStack(); - const isOnlyMember = !stack || stack.members.length <= 1; - const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && - !isOnlyMember && - this.options.crossfade === true && - !this.path.some(hasOpacityCrossfade)); - this.animationProgress = 0; - let prevRelativeTarget; - // The path decides whether the layout shift is worth curving - // (distance floor) and resolves the interpolator from the delta. - const interpolate = pathFn?.interpolateProjection(delta); - this.mixTargetDelta = (latest) => { - const progress = latest / 1000; - const point = interpolate?.(progress); - if (point) { - targetDelta.x.translate = point.x; - targetDelta.x.scale = mixNumber$1(delta.x.scale, 1, progress); - targetDelta.x.origin = delta.x.origin; - targetDelta.x.originPoint = delta.x.originPoint; - targetDelta.y.translate = point.y; - targetDelta.y.scale = mixNumber$1(delta.y.scale, 1, progress); - targetDelta.y.origin = delta.y.origin; - targetDelta.y.originPoint = delta.y.originPoint; - } - else { - mixAxisDeltaLinear(targetDelta.x, delta.x, progress); - mixAxisDeltaLinear(targetDelta.y, delta.y, progress); - } - this.setTargetDelta(targetDelta); - if (this.relativeTarget && - this.relativeTargetOrigin && - this.layout && - this.relativeParent && - this.relativeParent.layout) { - calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || undefined); - mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress); - /** - * If this is an unchanged relative target we can consider the - * projection not dirty. - */ - if (prevRelativeTarget && - boxEquals(this.relativeTarget, prevRelativeTarget)) { - this.isProjectionDirty = false; - } - if (!prevRelativeTarget) - prevRelativeTarget = createBox(); - copyBoxInto(prevRelativeTarget, this.relativeTarget); - } - if (isSharedLayoutAnimation) { - this.animationValues = mixedValues; - mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember); - } - if (point && point.rotate !== undefined) { - // Dedicated `pathRotation` channel, not `rotate`, so an - // animating `rotate` is composed with, never clobbered. - if (!this.animationValues) - this.animationValues = mixedValues; - this.animationValues.pathRotation = point.rotate; - } - this.root.scheduleUpdateProjection(); - this.scheduleRender(); - this.animationProgress = progress; - }; - this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0); - } - startAnimation(options) { - this.notifyListeners("animationStart"); - this.currentAnimation?.stop(); - this.resumingFrom?.currentAnimation?.stop(); - if (this.pendingAnimation) { - cancelFrame(this.pendingAnimation); - this.pendingAnimation = undefined; - } - /** - * Start the animation in the next frame to have a frame with progress 0, - * where the target is the same as when the animation started, so we can - * calculate the relative positions correctly for instant transitions. - */ - this.pendingAnimation = frame.update(() => { - globalProjectionState.hasAnimatedSinceResize = true; - activeAnimations.layout++; - this.motionValue || (this.motionValue = motionValue(0)); - this.motionValue.jump(0, false); - this.currentAnimation = animateSingleValue(this.motionValue, [0, 1000], { - ...options, - velocity: 0, - isSync: true, - onUpdate: (latest) => { - this.mixTargetDelta(latest); - options.onUpdate && options.onUpdate(latest); - }, - onStop: () => { - activeAnimations.layout--; - }, - onComplete: () => { - activeAnimations.layout--; - options.onComplete && options.onComplete(); - this.completeAnimation(); - }, - }); - if (this.resumingFrom) { - this.resumingFrom.currentAnimation = this.currentAnimation; - } - this.pendingAnimation = undefined; - }); - } - completeAnimation() { - if (this.resumingFrom) { - this.resumingFrom.currentAnimation = undefined; - this.resumingFrom.preserveOpacity = undefined; - } - const stack = this.getStack(); - stack && stack.exitAnimationComplete(); - this.resumingFrom = - this.currentAnimation = - this.animationValues = - undefined; - this.notifyListeners("animationComplete"); - } - finishAnimation() { - if (this.currentAnimation) { - this.mixTargetDelta && this.mixTargetDelta(animationTarget); - this.currentAnimation.stop(); - } - this.completeAnimation(); - } - applyTransformsToTarget() { - const lead = this.getLead(); - let { targetWithTransforms, target, layout, latestValues } = lead; - if (!targetWithTransforms || !target || !layout) - return; - /** - * If we're only animating position, and this element isn't the lead element, - * then instead of projecting into the lead box we instead want to calculate - * a new target that aligns the two boxes but maintains the layout shape. - */ - if (this !== lead && - this.layout && - layout && - shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) { - target = this.target || createBox(); - const xLength = calcLength(this.layout.layoutBox.x); - target.x.min = lead.target.x.min; - target.x.max = target.x.min + xLength; - const yLength = calcLength(this.layout.layoutBox.y); - target.y.min = lead.target.y.min; - target.y.max = target.y.min + yLength; - } - copyBoxInto(targetWithTransforms, target); - /** - * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal. - * This is the final box that we will then project into by calculating a transform delta and - * applying it to the corrected box. - */ - transformBox(targetWithTransforms, latestValues); - /** - * Update the delta between the corrected box and the final target box, after - * user-set transforms are applied to it. This will be used by the renderer to - * create a transform style that will reproject the element from its layout layout - * into the desired bounding box. - */ - calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues); - } - registerSharedNode(layoutId, node) { - if (!this.sharedNodes.has(layoutId)) { - this.sharedNodes.set(layoutId, new NodeStack()); - } - const stack = this.sharedNodes.get(layoutId); - stack.add(node); - const config = node.options.initialPromotionConfig; - node.promote({ - transition: config ? config.transition : undefined, - preserveFollowOpacity: config && config.shouldPreserveFollowOpacity - ? config.shouldPreserveFollowOpacity(node) - : undefined, - }); - } - isLead() { - const stack = this.getStack(); - return stack ? stack.lead === this : true; - } - getLead() { - const { layoutId } = this.options; - return layoutId ? this.getStack()?.lead || this : this; - } - getPrevLead() { - const { layoutId } = this.options; - return layoutId ? this.getStack()?.prevLead : undefined; - } - getStack() { - const { layoutId } = this.options; - if (layoutId) - return this.root.sharedNodes.get(layoutId); - } - promote({ needsReset, transition, preserveFollowOpacity, } = {}) { - const stack = this.getStack(); - if (stack) - stack.promote(this, preserveFollowOpacity); - if (needsReset) { - this.projectionDelta = undefined; - this.needsReset = true; - } - if (transition) - this.setOptions({ transition }); - } - relegate() { - const stack = this.getStack(); - if (stack) { - return stack.relegate(this); - } - else { - return false; - } - } - resetSkewAndRotation() { - const { visualElement } = this.options; - if (!visualElement) - return; - // If there's no detected skew or rotation values, we can early return without a forced render. - let hasDistortingTransform = false; - /** - * An unrolled check for rotation values. Most elements don't have any rotation and - * skipping the nested loop and new object creation is 50% faster. - */ - const { latestValues } = visualElement; - if (latestValues.z || - latestValues.rotate || - latestValues.rotateX || - latestValues.rotateY || - latestValues.rotateZ || - latestValues.skewX || - latestValues.skewY) { - hasDistortingTransform = true; - } - // If there's no distorting values, we don't need to do any more. - if (!hasDistortingTransform) - return; - const resetValues = {}; - if (latestValues.z) { - resetDistortingTransform("z", visualElement, resetValues, this.animationValues); - } - // Check the skew and rotate value of all axes and reset to 0 - for (let i = 0; i < transformAxes.length; i++) { - resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues); - resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues); - } - // Force a render of this element to apply the transform with all skews and rotations - // set to 0. - visualElement.render(); - // Put back all the values we reset - for (const key in resetValues) { - visualElement.setStaticValue(key, resetValues[key]); - if (this.animationValues) { - this.animationValues[key] = resetValues[key]; - } - } - // Schedule a render for the next frame. This ensures we won't visually - // see the element with the reset rotate value applied. - visualElement.scheduleRender(); - } - applyProjectionStyles(targetStyle, // CSSStyleDeclaration - doesn't allow numbers to be assigned to properties - styleProp) { - if (!this.instance || this.isSVG) - return; - if (!this.isVisible) { - targetStyle.visibility = "hidden"; - return; - } - const transformTemplate = this.getTransformTemplate(); - if (this.needsReset) { - this.needsReset = false; - targetStyle.visibility = ""; - targetStyle.opacity = ""; - targetStyle.pointerEvents = - resolveMotionValue(styleProp?.pointerEvents) || ""; - targetStyle.transform = transformTemplate - ? transformTemplate(this.latestValues, "") - : "none"; - return; - } - const lead = this.getLead(); - if (!this.projectionDelta || !this.layout || !lead.target) { - if (this.options.layoutId) { - targetStyle.opacity = - this.latestValues.opacity !== undefined - ? this.latestValues.opacity - : 1; - targetStyle.pointerEvents = - resolveMotionValue(styleProp?.pointerEvents) || ""; - } - if (this.hasProjected && !hasTransform(this.latestValues)) { - targetStyle.transform = transformTemplate - ? transformTemplate({}, "") - : "none"; - this.hasProjected = false; - } - return; - } - targetStyle.visibility = ""; - const valuesToRender = lead.animationValues || lead.latestValues; - this.applyTransformsToTarget(); - let transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender); - if (transformTemplate) { - transform = transformTemplate(valuesToRender, transform); - } - targetStyle.transform = transform; - const { x, y } = this.projectionDelta; - targetStyle.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`; - if (lead.animationValues) { - /** - * If the lead component is animating, assign this either the entering/leaving - * opacity - */ - targetStyle.opacity = - lead === this - ? valuesToRender.opacity ?? - this.latestValues.opacity ?? - 1 - : this.preserveOpacity - ? this.latestValues.opacity - : valuesToRender.opacityExit; - } - else { - /** - * Or we're not animating at all, set the lead component to its layout - * opacity and other components to hidden. - */ - targetStyle.opacity = - lead === this - ? valuesToRender.opacity !== undefined - ? valuesToRender.opacity - : "" - : valuesToRender.opacityExit !== undefined - ? valuesToRender.opacityExit - : 0; - } - /** - * Apply scale correction - */ - for (const key in scaleCorrectors) { - if (valuesToRender[key] === undefined) - continue; - const { correct, applyTo, isCSSVariable } = scaleCorrectors[key]; - /** - * Only apply scale correction to the value if we have an - * active projection transform. Otherwise these values become - * vulnerable to distortion if the element changes size without - * a corresponding layout animation. - */ - const corrected = transform === "none" - ? valuesToRender[key] - : correct(valuesToRender[key], lead); - if (applyTo) { - const num = applyTo.length; - for (let i = 0; i < num; i++) { - targetStyle[applyTo[i]] = corrected; - } - } - else { - // If this is a CSS variable, set it directly on the instance. - // Replacing this function from creating styles to setting them - // would be a good place to remove per frame object creation - if (isCSSVariable) { - this.options.visualElement.renderState.vars[key] = corrected; - } - else { - targetStyle[key] = corrected; - } - } - } - /** - * Disable pointer events on follow components. This is to ensure - * that if a follow component covers a lead component it doesn't block - * pointer events on the lead. - */ - if (this.options.layoutId) { - targetStyle.pointerEvents = - lead === this - ? resolveMotionValue(styleProp?.pointerEvents) || "" - : "none"; - } - } - clearSnapshot() { - this.resumeFrom = this.snapshot = undefined; - } - // Only run on root - resetTree() { - this.root.nodes.forEach((node) => node.currentAnimation?.stop()); - this.root.nodes.forEach(clearMeasurements); - this.root.sharedNodes.clear(); - } - }; - } - function updateLayout(node) { - node.updateLayout(); - } - function notifyLayoutUpdate(node) { - const snapshot = node.resumeFrom?.snapshot || node.snapshot; - if (node.isLead() && - node.layout && - snapshot && - node.hasListeners("didUpdate")) { - const { layoutBox: layout, measuredBox: measuredLayout } = node.layout; - const { animationType } = node.options; - const isShared = snapshot.source !== node.layout.source; - // TODO Maybe we want to also resize the layout snapshot so we don't trigger - // animations for instance if layout="size" and an element has only changed position - if (animationType === "size") { - eachAxis((axis) => { - const axisSnapshot = isShared - ? snapshot.measuredBox[axis] - : snapshot.layoutBox[axis]; - const length = calcLength(axisSnapshot); - axisSnapshot.min = layout[axis].min; - axisSnapshot.max = axisSnapshot.min + length; - }); - } - else if (animationType === "x" || animationType === "y") { - const snapAxis = animationType === "x" ? "y" : "x"; - copyAxisInto(isShared - ? snapshot.measuredBox[snapAxis] - : snapshot.layoutBox[snapAxis], layout[snapAxis]); - } - else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) { - eachAxis((axis) => { - const axisSnapshot = isShared - ? snapshot.measuredBox[axis] - : snapshot.layoutBox[axis]; - const length = calcLength(layout[axis]); - axisSnapshot.max = axisSnapshot.min + length; - /** - * Ensure relative target gets resized and rerendererd - */ - if (node.relativeTarget && !node.currentAnimation) { - node.isProjectionDirty = true; - node.relativeTarget[axis].max = - node.relativeTarget[axis].min + length; - } - }); - } - const layoutDelta = createDelta(); - calcBoxDelta(layoutDelta, layout, snapshot.layoutBox); - const visualDelta = createDelta(); - if (isShared) { - calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox); - } - else { - calcBoxDelta(visualDelta, layout, snapshot.layoutBox); - } - const hasLayoutChanged = !isDeltaZero(layoutDelta); - let hasRelativeLayoutChanged = false; - if (!node.resumeFrom) { - const relativeParent = node.getClosestProjectingParent(); - /** - * If the relativeParent is itself resuming from a different element then - * the relative snapshot is not relavent - */ - if (relativeParent && !relativeParent.resumeFrom) { - const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent; - if (parentSnapshot && parentLayout) { - const anchor = node.options.layoutAnchor || undefined; - const relativeSnapshot = createBox(); - calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox, anchor); - const relativeLayout = createBox(); - calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox, anchor); - if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) { - hasRelativeLayoutChanged = true; - } - if (relativeParent.options.layoutRoot) { - node.relativeTarget = relativeLayout; - node.relativeTargetOrigin = relativeSnapshot; - node.relativeParent = relativeParent; - } - } - } - } - node.notifyListeners("didUpdate", { - layout, - snapshot, - delta: visualDelta, - layoutDelta, - hasLayoutChanged, - hasRelativeLayoutChanged, - }); - } - else if (node.isLead()) { - const { onExitComplete } = node.options; - onExitComplete && onExitComplete(); - } - /** - * Clearing transition - * TODO: Investigate why this transition is being passed in as {type: false } from Framer - * and why we need it at all - */ - node.options.transition = undefined; - } - function propagateDirtyNodes(node) { - /** - * Increase debug counter for nodes encountered this frame - */ - if (statsBuffer.value) { - metrics.nodes++; - } - if (!node.parent) - return; - /** - * If this node isn't projecting, propagate isProjectionDirty. It will have - * no performance impact but it will allow the next child that *is* projecting - * but *isn't* dirty to just check its parent to see if *any* ancestor needs - * correcting. - */ - if (!node.isProjecting()) { - node.isProjectionDirty = node.parent.isProjectionDirty; - } - /** - * Propagate isSharedProjectionDirty and isTransformDirty - * throughout the whole tree. A future revision can take another look at - * this but for safety we still recalcualte shared nodes. - */ - node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty || - node.parent.isProjectionDirty || - node.parent.isSharedProjectionDirty)); - node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty); - } - function cleanDirtyNodes(node) { - node.isProjectionDirty = - node.isSharedProjectionDirty = - node.isTransformDirty = - false; - } - function clearSnapshot(node) { - node.clearSnapshot(); - } - function clearMeasurements(node) { - node.clearMeasurements(); - } - function forceLayoutMeasure(node) { - node.isLayoutDirty = true; - node.updateLayout(); - } - function clearIsLayoutDirty(node) { - node.isLayoutDirty = false; - } - /** - * When a node is animation-blocked (e.g. during drag) and its component - * didn't re-render (memoized), willUpdate() is never called so there's - * no snapshot. Use the previous layout as a snapshot and mark dirty so - * resetTransform/updateLayout/notifyLayoutUpdate process it normally. - */ - function ensureDraggedNodesSnapshotted(node) { - if (node.isAnimationBlocked && node.layout && !node.isLayoutDirty) { - node.snapshot = node.layout; - node.isLayoutDirty = true; - } - } - function resetTransformStyle(node) { - const { visualElement } = node.options; - if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) { - visualElement.notify("BeforeLayoutMeasure"); - } - node.resetTransform(); - } - function finishAnimation(node) { - node.finishAnimation(); - node.targetDelta = node.relativeTarget = node.target = undefined; - node.isProjectionDirty = true; - } - function resolveTargetDelta(node) { - node.resolveTargetDelta(); - } - function calcProjection(node) { - node.calcProjection(); - } - function resetSkewAndRotation(node) { - node.resetSkewAndRotation(); - } - function removeLeadSnapshots(stack) { - stack.removeLeadSnapshot(); - } - function mixAxisDeltaLinear(output, delta, p) { - output.translate = mixNumber$1(delta.translate, 0, p); - output.scale = mixNumber$1(delta.scale, 1, p); - output.origin = delta.origin; - output.originPoint = delta.originPoint; - } - function mixAxis(output, from, to, p) { - output.min = mixNumber$1(from.min, to.min, p); - output.max = mixNumber$1(from.max, to.max, p); - } - function mixBox(output, from, to, p) { - mixAxis(output.x, from.x, to.x, p); - mixAxis(output.y, from.y, to.y, p); - } - function hasOpacityCrossfade(node) { - return (node.animationValues && node.animationValues.opacityExit !== undefined); - } - const defaultLayoutTransition = { - duration: 0.45, - ease: [0.4, 0, 0.1, 1], - }; - const userAgentContains = (string) => typeof navigator !== "undefined" && - navigator.userAgent && - navigator.userAgent.toLowerCase().includes(string); - /** - * Measured bounding boxes must be rounded in Safari and - * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements - * can appear to jump. - */ - const roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/") - ? Math.round - : noop$1; - function roundAxis(axis) { - // Round to the nearest .5 pixels to support subpixel layouts - axis.min = roundPoint(axis.min); - axis.max = roundPoint(axis.max); - } - function roundBox(box) { - roundAxis(box.x); - roundAxis(box.y); - } - function shouldAnimatePositionOnly(animationType, snapshot, layout) { - return (animationType === "position" || - (animationType === "preserve-aspect" && - !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2))); - } - function checkNodeWasScrollRoot(node) { - return node !== node.root && node.scroll?.wasRoot; - } - - const DocumentProjectionNode = createProjectionNode$1({ - attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify), - measureScroll: () => ({ - x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0, - y: document.documentElement.scrollTop || document.body?.scrollTop || 0, - }), - checkIsScrollRoot: () => true, - }); - - const notify = (node) => !node.isLayoutDirty && node.willUpdate(false); - function nodeGroup() { - const nodes = new Set(); - const subscriptions = new WeakMap(); - const dirtyAll = () => nodes.forEach(notify); - return { - add: (node) => { - nodes.add(node); - subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll)); - }, - remove: (node) => { - nodes.delete(node); - const unsubscribe = subscriptions.get(node); - if (unsubscribe) { - unsubscribe(); - subscriptions.delete(node); - } - dirtyAll(); - }, - dirty: dirtyAll, - }; - } - - const rootProjectionNode = { - current: undefined, - }; - const HTMLProjectionNode = createProjectionNode$1({ - measureScroll: (instance) => ({ - x: instance.scrollLeft, - y: instance.scrollTop, - }), - defaultParent: () => { - if (!rootProjectionNode.current) { - const documentNode = new DocumentProjectionNode({}); - documentNode.mount(window); - documentNode.setOptions({ layoutScroll: true }); - rootProjectionNode.current = documentNode; - } - return rootProjectionNode.current; - }, - resetTransform: (instance, value) => { - instance.style.transform = value !== undefined ? value : "none"; - }, - checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed"), - }); - - const layoutSelector = "[data-layout], [data-layout-id]"; - const noop = () => { }; - function snapshotFromTarget(projection) { - const target = projection.targetWithTransforms || projection.target; - if (!target) - return undefined; - const measuredBox = createBox(); - const layoutBox = createBox(); - copyBoxInto(measuredBox, target); - copyBoxInto(layoutBox, target); - return { - animationId: projection.root?.animationId ?? 0, - measuredBox, - layoutBox, - latestValues: projection.animationValues || projection.latestValues || {}, - source: projection.id, - }; - } - class LayoutAnimationBuilder { - constructor(scope, updateDom, defaultOptions) { - this.sharedTransitions = new Map(); - this.notifyReady = noop; - this.rejectReady = noop; - this.scope = scope; - this.updateDom = updateDom; - this.defaultOptions = defaultOptions; - this.readyPromise = new Promise((resolve, reject) => { - this.notifyReady = resolve; - this.rejectReady = reject; - }); - frame.postRender(() => { - this.start().then(this.notifyReady).catch(this.rejectReady); - }); - } - shared(id, transition) { - this.sharedTransitions.set(id, transition); - return this; - } - then(resolve, reject) { - return this.readyPromise.then(resolve, reject); - } - async start() { - const beforeElements = collectLayoutElements(this.scope); - const beforeRecords = this.buildRecords(beforeElements); - beforeRecords.forEach(({ projection }) => { - const hasCurrentAnimation = Boolean(projection.currentAnimation); - const isSharedLayout = Boolean(projection.options.layoutId); - if (hasCurrentAnimation && isSharedLayout) { - const snapshot = snapshotFromTarget(projection); - if (snapshot) { - projection.snapshot = snapshot; - } - else if (projection.snapshot) { - projection.snapshot = undefined; - } - } - else if (projection.snapshot && - (projection.currentAnimation || projection.isProjecting())) { - projection.snapshot = undefined; - } - projection.isPresent = true; - projection.willUpdate(); - }); - await this.updateDom(); - const afterElements = collectLayoutElements(this.scope); - const afterRecords = this.buildRecords(afterElements); - this.handleExitingElements(beforeRecords, afterRecords); - afterRecords.forEach(({ projection }) => { - const instance = projection.instance; - const resumeFromInstance = projection.resumeFrom - ?.instance; - if (!instance || !resumeFromInstance) - return; - if (!("style" in instance)) - return; - const currentTransform = instance.style.transform; - const resumeFromTransform = resumeFromInstance.style.transform; - if (currentTransform && - resumeFromTransform && - currentTransform === resumeFromTransform) { - instance.style.transform = ""; - instance.style.transformOrigin = ""; - } - }); - afterRecords.forEach(({ projection }) => { - projection.isPresent = true; - }); - const root = getProjectionRoot(afterRecords, beforeRecords); - root?.didUpdate(); - await new Promise((resolve) => { - frame.postRender(() => resolve()); - }); - const animations = collectAnimations(afterRecords); - const animation = new GroupAnimation(animations); - return animation; - } - buildRecords(elements) { - const records = []; - const recordMap = new Map(); - for (const element of elements) { - const parentRecord = findParentRecord(element, recordMap, this.scope); - const { layout, layoutId } = readLayoutAttributes(element); - const override = layoutId - ? this.sharedTransitions.get(layoutId) - : undefined; - const transition = override || this.defaultOptions; - const record = getOrCreateRecord(element, parentRecord?.projection, { - layout, - layoutId, - animationType: typeof layout === "string" ? layout : "both", - transition: transition, - }); - recordMap.set(element, record); - records.push(record); - } - return records; - } - handleExitingElements(beforeRecords, afterRecords) { - const afterElementsSet = new Set(afterRecords.map((record) => record.element)); - beforeRecords.forEach((record) => { - if (afterElementsSet.has(record.element)) - return; - // For shared layout elements, relegate to set up resumeFrom - // so the remaining element animates from this position - if (record.projection.options.layoutId) { - record.projection.isPresent = false; - record.projection.relegate(); - } - record.visualElement.unmount(); - visualElementStore.delete(record.element); - }); - // Clear resumeFrom on EXISTING nodes that point to unmounted projections - // This prevents crossfade animation when the source element was removed entirely - // But preserve resumeFrom for NEW nodes so they can animate from the old position - // Also preserve resumeFrom for lead nodes that were just promoted via relegate - const beforeElementsSet = new Set(beforeRecords.map((record) => record.element)); - afterRecords.forEach(({ element, projection }) => { - if (beforeElementsSet.has(element) && - projection.resumeFrom && - !projection.resumeFrom.instance && - !projection.isLead()) { - projection.resumeFrom = undefined; - projection.snapshot = undefined; - } - }); - } - } - function parseAnimateLayoutArgs(scopeOrUpdateDom, updateDomOrOptions, options) { - // animateLayout(updateDom) - if (typeof scopeOrUpdateDom === "function") { - return { - scope: document, - updateDom: scopeOrUpdateDom, - defaultOptions: updateDomOrOptions, - }; - } - // animateLayout(scope, updateDom, options?) - const elements = resolveElements(scopeOrUpdateDom); - const scope = elements[0] || document; - return { - scope, - updateDom: updateDomOrOptions, - defaultOptions: options, - }; - } - function collectLayoutElements(scope) { - const elements = Array.from(scope.querySelectorAll(layoutSelector)); - if (scope instanceof Element && scope.matches(layoutSelector)) { - if (!elements.includes(scope)) { - elements.unshift(scope); - } - } - return elements; - } - function readLayoutAttributes(element) { - const layoutId = element.getAttribute("data-layout-id") || undefined; - const rawLayout = element.getAttribute("data-layout"); - let layout; - if (rawLayout === "" || rawLayout === "true") { - layout = true; - } - else if (rawLayout) { - layout = rawLayout; - } - return { - layout, - layoutId, - }; - } - function createVisualState() { - return { - latestValues: {}, - renderState: { - transform: {}, - transformOrigin: {}, - style: {}, - vars: {}, - }, - }; - } - function getOrCreateRecord(element, parentProjection, projectionOptions) { - const existing = visualElementStore.get(element); - const visualElement = existing ?? - new HTMLVisualElement({ - props: {}, - presenceContext: null, - visualState: createVisualState(), - }, { allowProjection: true }); - if (!existing || !visualElement.projection) { - visualElement.projection = new HTMLProjectionNode(visualElement.latestValues, parentProjection); - } - visualElement.projection.setOptions({ - ...projectionOptions, - visualElement, - }); - if (!visualElement.current) { - visualElement.mount(element); - } - else if (!visualElement.projection.instance) { - // Mount projection if VisualElement is already mounted but projection isn't - // This happens when animate() was called before animateLayout() - visualElement.projection.mount(element); - } - if (!existing) { - visualElementStore.set(element, visualElement); - } - return { - element, - visualElement, - projection: visualElement.projection, - }; - } - function findParentRecord(element, recordMap, scope) { - let parent = element.parentElement; - while (parent) { - const record = recordMap.get(parent); - if (record) - return record; - if (parent === scope) - break; - parent = parent.parentElement; - } - return undefined; - } - function getProjectionRoot(afterRecords, beforeRecords) { - const record = afterRecords[0] || beforeRecords[0]; - return record?.projection.root; - } - function collectAnimations(afterRecords) { - const animations = new Set(); - afterRecords.forEach((record) => { - const animation = record.projection.currentAnimation; - if (animation) - animations.add(animation); - }); - return Array.from(animations); - } - - /** - * @deprecated - * - * Import as `frame` instead. - */ - const sync = frame; - /** - * @deprecated - * - * Use cancelFrame(callback) instead. - */ - const cancelSync = stepsOrder.reduce((acc, key) => { - acc[key] = (process) => cancelFrame(process); - return acc; - }, {}); - - /** - * @public - */ - const MotionConfigContext = React$1.createContext({ - transformPagePoint: (p) => p, - isStatic: false, - reducedMotion: "never", - }); - - /** - * Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx - */ - /** - * Set a given ref to a given value - * This utility takes care of different types of refs: callback refs and RefObject(s) - */ - function setRef(ref, value) { - if (typeof ref === "function") { - return ref(value); - } - else if (ref !== null && ref !== undefined) { - ref.current = value; - } - } - /** - * A utility to compose multiple refs together - * Accepts callback refs and RefObject(s) - */ - function composeRefs(...refs) { - return (node) => { - let hasCleanup = false; - const cleanups = refs.map((ref) => { - const cleanup = setRef(ref, node); - if (!hasCleanup && typeof cleanup === "function") { - hasCleanup = true; - } - return cleanup; - }); - // React <19 will log an error to the console if a callback ref returns a - // value. We don't use ref cleanups internally so this will only happen if a - // user's ref callback returns a value, which we only expect if they are - // using the cleanup functionality added in React 19. - if (hasCleanup) { - return () => { - for (let i = 0; i < cleanups.length; i++) { - const cleanup = cleanups[i]; - if (typeof cleanup === "function") { - cleanup(); - } - else { - setRef(refs[i], null); - } - } - }; - } - }; - } - /** - * A custom hook that composes multiple refs - * Accepts callback refs and RefObject(s) - */ - function useComposedRefs(...refs) { - // eslint-disable-next-line react-hooks/exhaustive-deps - return React__namespace.useCallback(composeRefs(...refs), refs); - } - - /** - * Measurement functionality has to be within a separate component - * to leverage snapshot lifecycle. - */ - class PopChildMeasure extends React__namespace.Component { - getSnapshotBeforeUpdate(prevProps) { - const element = this.props.childRef.current; - if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) { - const parent = element.offsetParent; - const parentWidth = isHTMLElement(parent) - ? parent.offsetWidth || 0 - : 0; - const parentHeight = isHTMLElement(parent) - ? parent.offsetHeight || 0 - : 0; - const computedStyle = getComputedStyle(element); - const size = this.props.sizeRef.current; - size.height = parseFloat(computedStyle.height); - size.width = parseFloat(computedStyle.width); - size.top = element.offsetTop; - size.left = element.offsetLeft; - size.right = parentWidth - size.width - size.left; - size.bottom = parentHeight - size.height - size.top; - size.direction = computedStyle.direction; - } - return null; - } - /** - * Required with getSnapshotBeforeUpdate to stop React complaining. - */ - componentDidUpdate() { } - render() { - return this.props.children; - } - } - function PopChild({ children, isPresent, anchorX, anchorY, root, pop }) { - const id = React$1.useId(); - const ref = React$1.useRef(null); - const size = React$1.useRef({ - width: 0, - height: 0, - top: 0, - left: 0, - right: 0, - bottom: 0, - direction: "ltr", - }); - const { nonce } = React$1.useContext(MotionConfigContext); - /** - * In React 19, refs are passed via props.ref instead of element.ref. - * We check props.ref first (React 19) and fall back to element.ref (React 18). - */ - const childRef = children.props?.ref ?? - children?.ref; - const composedRef = useComposedRefs(ref, childRef); - /** - * We create and inject a style block so we can apply this explicit - * sizing in a non-destructive manner by just deleting the style block. - * - * We can't apply size via render as the measurement happens - * in getSnapshotBeforeUpdate (post-render), likewise if we apply the - * styles directly on the DOM node, we might be overwriting - * styles set via the style prop. - */ - React$1.useInsertionEffect(() => { - const { width, height, top, left, right, bottom, direction } = size.current; - if (isPresent || pop === false || !ref.current || !width || !height) - return; - const isRTL = direction === "rtl"; - const x = anchorX === "left" - ? (isRTL ? `right: ${right}` : `left: ${left}`) - : (isRTL ? `left: ${left}` : `right: ${right}`); - const y = anchorY === "bottom" ? `bottom: ${bottom}` : `top: ${top}`; - ref.current.dataset.motionPopId = id; - const style = document.createElement("style"); - if (nonce) - style.nonce = nonce; - const parent = root ?? document.head; - parent.appendChild(style); - if (style.sheet) { - style.sheet.insertRule(` - [data-motion-pop-id="${id}"] { - position: absolute !important; - width: ${width}px !important; - height: ${height}px !important; - ${x}px !important; - ${y}px !important; - } - `); - } - return () => { - ref.current?.removeAttribute("data-motion-pop-id"); - if (parent.contains(style)) { - parent.removeChild(style); - } - }; - }, [isPresent]); - return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false - ? children - : React__namespace.cloneElement(children, { ref: composedRef }) })); - } - - const PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => { - const presenceChildren = useConstant(newChildrenMap); - const id = React$1.useId(); - let isReusedContext = true; - let context = React$1.useMemo(() => { - isReusedContext = false; - return { - id, - initial, - isPresent, - custom, - onExitComplete: (childId) => { - presenceChildren.set(childId, true); - for (const isComplete of presenceChildren.values()) { - if (!isComplete) - return; // can stop searching when any is incomplete - } - onExitComplete && onExitComplete(); - }, - register: (childId) => { - presenceChildren.set(childId, false); - return () => presenceChildren.delete(childId); - }, - }; - }, [isPresent, presenceChildren, onExitComplete]); - /** - * If the presence of a child affects the layout of the components around it, - * we want to make a new context value to ensure they get re-rendered - * so they can detect that layout change. - */ - if (presenceAffectsLayout && isReusedContext) { - context = { ...context }; - } - React$1.useMemo(() => { - presenceChildren.forEach((_, key) => presenceChildren.set(key, false)); - }, [isPresent]); - /** - * If there's no `motion` components to fire exit animations, we want to remove this - * component immediately. - */ - React__namespace.useEffect(() => { - !isPresent && - !presenceChildren.size && - onExitComplete && - onExitComplete(); - }, [isPresent]); - children = (jsx(PopChild, { pop: mode === "popLayout", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children })); - return (jsx(PresenceContext.Provider, { value: context, children: children })); - }; - function newChildrenMap() { - return new Map(); - } - - /** - * When a component is the child of `AnimatePresence`, it can use `usePresence` - * to access information about whether it's still present in the React tree. - * - * ```jsx - * import { usePresence } from "framer-motion" - * - * export const Component = () => { - * const [isPresent, safeToRemove] = usePresence() - * - * useEffect(() => { - * !isPresent && setTimeout(safeToRemove, 1000) - * }, [isPresent]) - * - * return

- * } - * ``` - * - * If `isPresent` is `false`, it means that a component has been removed from the tree, - * but `AnimatePresence` won't really remove it until `safeToRemove` has been called. - * - * @public - */ - function usePresence(subscribe = true) { - const context = React$1.useContext(PresenceContext); - if (context === null) - return [true, null]; - const { isPresent, onExitComplete, register } = context; - // It's safe to call the following hooks conditionally (after an early return) because the context will always - // either be null or non-null for the lifespan of the component. - const id = React$1.useId(); - React$1.useEffect(() => { - if (subscribe) { - return register(id); - } - }, [subscribe]); - const safeToRemove = React$1.useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]); - return !isPresent && onExitComplete ? [false, safeToRemove] : [true]; - } - /** - * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present. - * There is no `safeToRemove` function. - * - * ```jsx - * import { useIsPresent } from "framer-motion" - * - * export const Component = () => { - * const isPresent = useIsPresent() - * - * useEffect(() => { - * !isPresent && console.log("I've been removed!") - * }, [isPresent]) - * - * return
- * } - * ``` - * - * @public - */ - function useIsPresent() { - return isPresent(React$1.useContext(PresenceContext)); - } - function isPresent(context) { - return context === null ? true : context.isPresent; - } - - const getChildKey = (child) => child.key || ""; - function onlyElements(children) { - const filtered = []; - // We use forEach here instead of map as map mutates the component key by preprending `.$` - React$1.Children.forEach(children, (child) => { - if (React$1.isValidElement(child)) - filtered.push(child); - }); - return filtered; - } - - /** - * `AnimatePresence` enables the animation of components that have been removed from the tree. - * - * When adding/removing more than a single child, every child **must** be given a unique `key` prop. - * - * Any `motion` components that have an `exit` property defined will animate out when removed from - * the tree. - * - * ```jsx - * import { motion, AnimatePresence } from 'framer-motion' - * - * export const Items = ({ items }) => ( - * - * {items.map(item => ( - * - * ))} - * - * ) - * ``` - * - * You can sequence exit animations throughout a tree using variants. - * - * If a child contains multiple `motion` components with `exit` props, it will only unmount the child - * once all `motion` components have finished animating out. Likewise, any components using - * `usePresence` all need to call `safeToRemove`. - * - * @public - */ - const AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = "sync", propagate = false, anchorX = "left", anchorY = "top", root }) => { - const [isParentPresent, safeToRemove] = usePresence(propagate); - /** - * Filter any children that aren't ReactElements. We can only track components - * between renders with a props.key. - */ - const presentChildren = React$1.useMemo(() => onlyElements(children), [children]); - /** - * Track the keys of the currently rendered children. This is used to - * determine which children are exiting. - */ - const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey); - /** - * If `initial={false}` we only want to pass this to components in the first render. - */ - const isInitialRender = React$1.useRef(true); - /** - * A ref containing the currently present children. When all exit animations - * are complete, we use this to re-render the component with the latest children - * *committed* rather than the latest children *rendered*. - */ - const pendingPresentChildren = React$1.useRef(presentChildren); - /** - * Track which exiting children have finished animating out. - */ - const exitComplete = useConstant(() => new Map()); - /** - * Track which components are currently processing exit to prevent duplicate processing. - */ - const exitingComponents = React$1.useRef(new Set()); - /** - * Save children to render as React state. To ensure this component is concurrent-safe, - * we check for exiting children via an effect. - */ - const [diffedChildren, setDiffedChildren] = React$1.useState(presentChildren); - const [renderedChildren, setRenderedChildren] = React$1.useState(presentChildren); - useIsomorphicLayoutEffect(() => { - isInitialRender.current = false; - pendingPresentChildren.current = presentChildren; - /** - * Update complete status of exiting children. - */ - for (let i = 0; i < renderedChildren.length; i++) { - const key = getChildKey(renderedChildren[i]); - if (!presentKeys.includes(key)) { - if (exitComplete.get(key) !== true) { - exitComplete.set(key, false); - } - } - else { - exitComplete.delete(key); - exitingComponents.current.delete(key); - } - } - }, [renderedChildren, presentKeys.length, presentKeys.join("-")]); - const exitingChildren = []; - if (presentChildren !== diffedChildren) { - let nextChildren = [...presentChildren]; - /** - * Loop through all the currently rendered components and decide which - * are exiting. - */ - for (let i = 0; i < renderedChildren.length; i++) { - const child = renderedChildren[i]; - const key = getChildKey(child); - if (!presentKeys.includes(key)) { - nextChildren.splice(i, 0, child); - exitingChildren.push(child); - } - } - /** - * If we're in "wait" mode, and we have exiting children, we want to - * only render these until they've all exited. - */ - if (mode === "wait" && exitingChildren.length) { - nextChildren = exitingChildren; - } - setRenderedChildren(onlyElements(nextChildren)); - setDiffedChildren(presentChildren); - /** - * Early return to ensure once we've set state with the latest diffed - * children, we can immediately re-render. - */ - return null; - } - if (mode === "wait" && - renderedChildren.length > 1) { - console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`); - } - /** - * If we've been provided a forceRender function by the LayoutGroupContext, - * we can use it to force a re-render amongst all surrounding components once - * all components have finished animating out. - */ - const { forceRender } = React$1.useContext(LayoutGroupContext); - return (jsx(Fragment, { children: renderedChildren.map((child) => { - const key = getChildKey(child); - const isPresent = propagate && !isParentPresent - ? false - : presentChildren === renderedChildren || - presentKeys.includes(key); - const onExit = () => { - if (exitingComponents.current.has(key)) { - return; - } - if (exitComplete.has(key)) { - exitingComponents.current.add(key); - exitComplete.set(key, true); - } - else { - return; - } - let isEveryExitComplete = true; - exitComplete.forEach((isExitComplete) => { - if (!isExitComplete) - isEveryExitComplete = false; - }); - if (isEveryExitComplete) { - forceRender?.(); - setRenderedChildren(pendingPresentChildren.current); - propagate && safeToRemove?.(); - onExitComplete && onExitComplete(); - } - }; - return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial - ? undefined - : false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, anchorY: anchorY, children: child }, key)); - }) })); - }; - - /** - * Note: Still used by components generated by old versions of Framer - * - * @deprecated - */ - const DeprecatedLayoutGroupContext = React$1.createContext(null); - - function useIsMounted() { - const isMounted = React$1.useRef(false); - useIsomorphicLayoutEffect(() => { - isMounted.current = true; - return () => { - isMounted.current = false; - }; - }, []); - return isMounted; - } - - function useForceUpdate() { - const isMounted = useIsMounted(); - const [forcedRenderCount, setForcedRenderCount] = React$1.useState(0); - const forceRender = React$1.useCallback(() => { - isMounted.current && setForcedRenderCount(forcedRenderCount + 1); - }, [forcedRenderCount]); - /** - * Defer this to the end of the next animation frame in case there are multiple - * synchronous calls. - */ - const deferredForceRender = React$1.useCallback(() => frame.postRender(forceRender), [forceRender]); - return [deferredForceRender, forcedRenderCount]; - } - - const shouldInheritGroup = (inherit) => inherit === true; - const shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === "id"; - const LayoutGroup = ({ children, id, inherit = true }) => { - const layoutGroupContext = React$1.useContext(LayoutGroupContext); - const deprecatedLayoutGroupContext = React$1.useContext(DeprecatedLayoutGroupContext); - const [forceRender, key] = useForceUpdate(); - const context = React$1.useRef(null); - const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext; - if (context.current === null) { - if (shouldInheritId(inherit) && upstreamId) { - id = id ? upstreamId + "-" + id : upstreamId; - } - context.current = { - id, - group: shouldInheritGroup(inherit) - ? layoutGroupContext.group || nodeGroup() - : nodeGroup(), - }; - } - const memoizedContext = React$1.useMemo(() => ({ ...context.current, forceRender }), [key]); - return (jsx(LayoutGroupContext.Provider, { value: memoizedContext, children: children })); - }; - - const LazyContext = React$1.createContext({ strict: false }); - - const featureProps = { - animation: [ - "animate", - "variants", - "whileHover", - "whileTap", - "exit", - "whileInView", - "whileFocus", - "whileDrag", - ], - exit: ["exit"], - drag: ["drag", "dragControls"], - focus: ["whileFocus"], - hover: ["whileHover", "onHoverStart", "onHoverEnd"], - tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"], - pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"], - inView: ["whileInView", "onViewportEnter", "onViewportLeave"], - layout: ["layout", "layoutId"], - }; - let isInitialized = false; - /** - * Initialize feature definitions with isEnabled checks. - * This must be called before any motion components are rendered. - */ - function initFeatureDefinitions() { - if (isInitialized) - return; - const initialFeatureDefinitions = {}; - for (const key in featureProps) { - initialFeatureDefinitions[key] = { - isEnabled: (props) => featureProps[key].some((name) => !!props[name]), - }; - } - setFeatureDefinitions(initialFeatureDefinitions); - isInitialized = true; - } - /** - * Get the current feature definitions, initializing if needed. - */ - function getInitializedFeatureDefinitions() { - initFeatureDefinitions(); - return getFeatureDefinitions(); - } - - function loadFeatures(features) { - const featureDefinitions = getInitializedFeatureDefinitions(); - for (const key in features) { - featureDefinitions[key] = { - ...featureDefinitions[key], - ...features[key], - }; - } - setFeatureDefinitions(featureDefinitions); - } - - /** - * Used in conjunction with the `m` component to reduce bundle size. - * - * `m` is a version of the `motion` component that only loads functionality - * critical for the initial render. - * - * `LazyMotion` can then be used to either synchronously or asynchronously - * load animation and gesture support. - * - * ```jsx - * // Synchronous loading - * import { LazyMotion, m, domAnimation } from "framer-motion" - * - * function App() { - * return ( - * - * - * - * ) - * } - * - * // Asynchronous loading - * import { LazyMotion, m } from "framer-motion" - * - * function App() { - * return ( - * import('./path/to/domAnimation')}> - * - * - * ) - * } - * ``` - * - * @public - */ - function LazyMotion({ children, features, strict = false }) { - const [, setIsLoaded] = React$1.useState(!isLazyBundle(features)); - const loadedRenderer = React$1.useRef(undefined); - /** - * If this is a synchronous load, load features immediately - */ - if (!isLazyBundle(features)) { - const { renderer, ...loadedFeatures } = features; - loadedRenderer.current = renderer; - loadFeatures(loadedFeatures); - } - React$1.useEffect(() => { - if (isLazyBundle(features)) { - features().then(({ renderer, ...loadedFeatures }) => { - loadFeatures(loadedFeatures); - loadedRenderer.current = renderer; - setIsLoaded(true); - }); - } - }, []); - return (jsx(LazyContext.Provider, { value: { renderer: loadedRenderer.current, strict }, children: children })); - } - function isLazyBundle(features) { - return typeof features === "function"; - } - - /** - * A list of all valid MotionProps. - * - * @privateRemarks - * This doesn't throw if a `MotionProp` name is missing - it should. - */ - const validMotionProps = new Set([ - "animate", - "exit", - "variants", - "initial", - "style", - "values", - "variants", - "transition", - "transformTemplate", - "custom", - "inherit", - "onBeforeLayoutMeasure", - "onAnimationStart", - "onAnimationComplete", - "onUpdate", - "onDragStart", - "onDrag", - "onDragEnd", - "onMeasureDragConstraints", - "onDirectionLock", - "onDragTransitionEnd", - "_dragX", - "_dragY", - "onHoverStart", - "onHoverEnd", - "onViewportEnter", - "onViewportLeave", - "globalTapTarget", - "propagate", - "ignoreStrict", - "viewport", - ]); - /** - * Check whether a prop name is a valid `MotionProp` key. - * - * @param key - Name of the property to check - * @returns `true` is key is a valid `MotionProp`. - * - * @public - */ - function isValidMotionProp(key) { - return (key.startsWith("while") || - (key.startsWith("drag") && key !== "draggable") || - key.startsWith("layout") || - key.startsWith("onTap") || - key.startsWith("onPan") || - key.startsWith("onLayout") || - validMotionProps.has(key)); - } - - let shouldForward = (key) => !isValidMotionProp(key); - function loadExternalIsValidProp(isValidProp) { - if (typeof isValidProp !== "function") - return; - // Explicitly filter our events - shouldForward = (key) => key.startsWith("on") ? !isValidMotionProp(key) : isValidProp(key); - } - /** - * Emotion and Styled Components both allow users to pass through arbitrary props to their components - * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which - * of these should be passed to the underlying DOM node. - * - * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props - * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props - * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of - * `@emotion/is-prop-valid`, however to fix this problem we need to use it. - * - * By making it an optionalDependency we can offer this functionality only in the situations where it's - * actually required. - */ - try { - /** - * We attempt to import this package but require won't be defined in esm environments, in that case - * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed - * in favour of explicit injection. - * - * String concatenation prevents bundlers like webpack (e.g. Storybook) - * from statically resolving this optional dependency at build time. - */ - const emotionPkg = "@emotion/is-prop-" + "valid"; - loadExternalIsValidProp(require(emotionPkg).default); - } - catch { - // We don't need to actually do anything here - the fallback is the existing `isPropValid`. - } - function filterProps(props, isDom, forwardMotionProps) { - const filteredProps = {}; - for (const key in props) { - /** - * values is considered a valid prop by Emotion, so if it's present - * this will be rendered out to the DOM unless explicitly filtered. - * - * We check the type as it could be used with the `feColorMatrix` - * element, which we support. - */ - if (key === "values" && typeof props.values === "object") - continue; - if (isMotionValue(props[key])) - continue; - if (shouldForward(key) || - (forwardMotionProps === true && isValidMotionProp(key)) || - (!isDom && !isValidMotionProp(key)) || - // If trying to use native HTML drag events, forward drag listeners - (props["draggable"] && - key.startsWith("onDrag"))) { - filteredProps[key] = - props[key]; - } - } - return filteredProps; - } - - /** - * `MotionConfig` is used to set configuration options for all children `motion` components. - * - * ```jsx - * import { motion, MotionConfig } from "framer-motion" - * - * export function App() { - * return ( - * - * - * - * ) - * } - * ``` - * - * @public - */ - function MotionConfig({ children, isValidProp, ...config }) { - isValidProp && loadExternalIsValidProp(isValidProp); - /** - * Inherit props from any parent MotionConfig components - */ - const parentConfig = React$1.useContext(MotionConfigContext); - config = { ...parentConfig, ...config }; - config.transition = resolveTransition(config.transition, parentConfig.transition); - /** - * Don't allow isStatic to change between renders as it affects how many hooks - * motion components fire. - */ - config.isStatic = useConstant(() => config.isStatic); - /** - * Creating a new config context object will re-render every `motion` component - * every time it renders. So we only want to create a new one sparingly. - */ - const context = React$1.useMemo(() => config, [ - JSON.stringify(config.transition), - config.transformPagePoint, - config.reducedMotion, - config.skipAnimations, - ]); - return (jsx(MotionConfigContext.Provider, { value: context, children: children })); - } - - const ReorderContext = React$1.createContext(null); - - /** - * We keep these listed separately as we use the lowercase tag names as part - * of the runtime bundle to detect SVG components - */ - const lowercaseSVGElements = [ - "animate", - "circle", - "defs", - "desc", - "ellipse", - "g", - "image", - "line", - "filter", - "marker", - "mask", - "metadata", - "path", - "pattern", - "polygon", - "polyline", - "rect", - "stop", - "switch", - "symbol", - "svg", - "text", - "tspan", - "use", - "view", - ]; - - function isSVGComponent(Component) { - if ( - /** - * If it's not a string, it's a custom React component. Currently we only support - * HTML custom React components. - */ - typeof Component !== "string" || - /** - * If it contains a dash, the element is a custom HTML webcomponent. - */ - Component.includes("-")) { - return false; - } - else if ( - /** - * If it's in our list of lowercase SVG tags, it's an SVG component - */ - lowercaseSVGElements.indexOf(Component) > -1 || - /** - * If it contains a capital letter, it's an SVG component - */ - /[A-Z]/u.test(Component)) { - return true; - } - return false; - } - - const createDomVisualElement = (Component, options) => { - /** - * Use explicit isSVG override if provided, otherwise auto-detect - */ - const isSVG = options.isSVG ?? isSVGComponent(Component); - return isSVG - ? new SVGVisualElement(options) - : new HTMLVisualElement(options, { - allowProjection: Component !== React$1.Fragment, - }); - }; - - const MotionContext = /* @__PURE__ */ React$1.createContext({}); - - function getCurrentTreeVariants(props, context) { - if (isControllingVariants(props)) { - const { initial, animate } = props; - return { - initial: initial === false || isVariantLabel(initial) - ? initial - : undefined, - animate: isVariantLabel(animate) ? animate : undefined, - }; - } - return props.inherit !== false ? context : {}; - } - - function useCreateMotionContext(props) { - const { initial, animate } = getCurrentTreeVariants(props, React$1.useContext(MotionContext)); - return React$1.useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]); - } - function variantLabelsAsDependency(prop) { - return Array.isArray(prop) ? prop.join(" ") : prop; - } - - const createHtmlRenderState = () => ({ - style: {}, - transform: {}, - transformOrigin: {}, - vars: {}, - }); - - function copyRawValuesOnly(target, source, props) { - for (const key in source) { - if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) { - target[key] = source[key]; - } - } - } - function useInitialMotionValues({ transformTemplate }, visualState) { - return React$1.useMemo(() => { - const state = createHtmlRenderState(); - buildHTMLStyles(state, visualState, transformTemplate); - return Object.assign({}, state.vars, state.style); - }, [visualState]); - } - function useStyle(props, visualState) { - const styleProp = props.style || {}; - const style = {}; - /** - * Copy non-Motion Values straight into style - */ - copyRawValuesOnly(style, styleProp, props); - Object.assign(style, useInitialMotionValues(props, visualState)); - return style; - } - function useHTMLProps(props, visualState) { - // The `any` isn't ideal but it is the type of createElement props argument - const htmlProps = {}; - const style = useStyle(props, visualState); - if (props.drag && props.dragListener !== false) { - // Disable the ghost element when a user drags - htmlProps.draggable = false; - // Disable text selection - style.userSelect = - style.WebkitUserSelect = - style.WebkitTouchCallout = - "none"; - // Disable scrolling on the draggable direction - style.touchAction = - props.drag === true - ? "none" - : `pan-${props.drag === "x" ? "y" : "x"}`; - } - if (props.tabIndex === undefined && - (props.onTap || props.onTapStart || props.whileTap)) { - htmlProps.tabIndex = 0; - } - htmlProps.style = style; - return htmlProps; - } - - const createSvgRenderState = () => ({ - ...createHtmlRenderState(), - attrs: {}, - }); - - function useSVGProps(props, visualState, _isStatic, Component) { - const visualProps = React$1.useMemo(() => { - const state = createSvgRenderState(); - buildSVGAttrs(state, visualState, isSVGTag(Component), props.transformTemplate, props.style); - return { - ...state.attrs, - style: { ...state.style }, - }; - }, [visualState]); - if (props.style) { - const rawStyles = {}; - copyRawValuesOnly(rawStyles, props.style, props); - visualProps.style = { ...rawStyles, ...visualProps.style }; - } - return visualProps; - } - - function useRender(Component, props, ref, { latestValues, }, isStatic, forwardMotionProps = false, isSVG) { - const useVisualProps = (isSVG ?? isSVGComponent(Component)) ? useSVGProps : useHTMLProps; - const visualProps = useVisualProps(props, latestValues, isStatic, Component); - const filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps); - const elementProps = Component !== React$1.Fragment ? { ...filteredProps, ...visualProps, ref } : {}; - /** - * If component has been handed a motion value as its child, - * memoise its initial value and render that. Subsequent updates - * will be handled by the onChange handler - */ - const { children } = props; - const renderedChildren = React$1.useMemo(() => (isMotionValue(children) ? children.get() : children), [children]); - return React$1.createElement(Component, { - ...elementProps, - children: renderedChildren, - }); - } - - function makeState({ scrapeMotionValuesFromProps, createRenderState, }, props, context, presenceContext) { - const state = { - latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps), - renderState: createRenderState(), - }; - return state; - } - function makeLatestValues(props, context, presenceContext, scrapeMotionValues) { - const values = {}; - const motionValues = scrapeMotionValues(props, {}); - for (const key in motionValues) { - values[key] = resolveMotionValue(motionValues[key]); - } - let { initial, animate } = props; - const isControllingVariants$1 = isControllingVariants(props); - const isVariantNode$1 = isVariantNode(props); - if (context && - isVariantNode$1 && - !isControllingVariants$1 && - props.inherit !== false) { - if (initial === undefined) - initial = context.initial; - if (animate === undefined) - animate = context.animate; - } - let isInitialAnimationBlocked = presenceContext - ? presenceContext.initial === false - : false; - isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false; - const variantToSet = isInitialAnimationBlocked ? animate : initial; - if (variantToSet && - typeof variantToSet !== "boolean" && - !isAnimationControls(variantToSet)) { - const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet]; - for (let i = 0; i < list.length; i++) { - const resolved = resolveVariantFromProps(props, list[i]); - if (resolved) { - const { transitionEnd, transition, ...target } = resolved; - for (const key in target) { - let valueTarget = target[key]; - if (Array.isArray(valueTarget)) { - /** - * Take final keyframe if the initial animation is blocked because - * we want to initialise at the end of that blocked animation. - */ - const index = isInitialAnimationBlocked - ? valueTarget.length - 1 - : 0; - valueTarget = valueTarget[index]; - } - if (valueTarget !== null) { - values[key] = valueTarget; - } - } - for (const key in transitionEnd) { - values[key] = transitionEnd[key]; - } - } - } - } - return values; - } - const makeUseVisualState = (config) => (props, isStatic) => { - const context = React$1.useContext(MotionContext); - const presenceContext = React$1.useContext(PresenceContext); - const make = () => makeState(config, props, context, presenceContext); - return isStatic ? make() : useConstant(make); - }; - - const useHTMLVisualState = /*@__PURE__*/ makeUseVisualState({ - scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1, - createRenderState: createHtmlRenderState, - }); - - const useSVGVisualState = /*@__PURE__*/ makeUseVisualState({ - scrapeMotionValuesFromProps: scrapeMotionValuesFromProps, - createRenderState: createSvgRenderState, - }); - - const motionComponentSymbol = Symbol.for("motionComponentSymbol"); - - /** - * Creates a ref function that, when called, hydrates the provided - * external ref and VisualElement. - */ - function useMotionRef(visualState, visualElement, externalRef) { - /** - * Store externalRef in a ref to avoid including it in the useCallback - * dependency array. Including externalRef in dependencies causes issues - * with libraries like Radix UI that create new callback refs on each render - * when using asChild - this would cause the callback to be recreated, - * triggering element remounts and breaking AnimatePresence exit animations. - */ - const externalRefContainer = React$1.useRef(externalRef); - React$1.useInsertionEffect(() => { - externalRefContainer.current = externalRef; - }); - // Store cleanup function returned by callback refs (React 19 feature) - const refCleanup = React$1.useRef(null); - return React$1.useCallback((instance) => { - if (instance) { - visualState.onMount?.(instance); - } - if (visualElement) { - instance ? visualElement.mount(instance) : visualElement.unmount(); - } - const ref = externalRefContainer.current; - if (typeof ref === "function") { - if (instance) { - const cleanup = ref(instance); - if (typeof cleanup === "function") { - refCleanup.current = cleanup; - } - } - else if (refCleanup.current) { - refCleanup.current(); - refCleanup.current = null; - } - else { - ref(instance); - } - } - else if (ref) { - ref.current = instance; - } - }, [visualElement]); - } - - /** - * Internal, exported only for usage in Framer - */ - const SwitchLayoutGroupContext = React$1.createContext({}); - - function isRefObject(ref) { - return (ref && - typeof ref === "object" && - Object.prototype.hasOwnProperty.call(ref, "current")); - } - - function useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor, isSVG) { - const { visualElement: parent } = React$1.useContext(MotionContext); - const lazyContext = React$1.useContext(LazyContext); - const presenceContext = React$1.useContext(PresenceContext); - const motionConfig = React$1.useContext(MotionConfigContext); - const reducedMotionConfig = motionConfig.reducedMotion; - const skipAnimations = motionConfig.skipAnimations; - const visualElementRef = React$1.useRef(null); - /** - * Track whether the component has been through React's commit phase. - * Used to detect when LazyMotion features load after the component has mounted. - */ - const hasMountedOnce = React$1.useRef(false); - /** - * If we haven't preloaded a renderer, check to see if we have one lazy-loaded - */ - createVisualElement = - createVisualElement || - lazyContext.renderer; - if (!visualElementRef.current && createVisualElement) { - visualElementRef.current = createVisualElement(Component, { - visualState, - parent, - props, - presenceContext, - blockInitialAnimation: presenceContext - ? presenceContext.initial === false - : false, - reducedMotionConfig, - skipAnimations, - isSVG, - }); - /** - * If the component has already mounted before features loaded (e.g. via - * LazyMotion with async feature loading), we need to force the initial - * animation to run. Otherwise state changes that occurred before features - * loaded will be lost and the element will snap to its final state. - */ - if (hasMountedOnce.current && visualElementRef.current) { - visualElementRef.current.manuallyAnimateOnMount = true; - } - } - const visualElement = visualElementRef.current; - /** - * Load Motion gesture and animation features. These are rendered as renderless - * components so each feature can optionally make use of React lifecycle methods. - */ - const initialLayoutGroupConfig = React$1.useContext(SwitchLayoutGroupContext); - if (visualElement && - !visualElement.projection && - ProjectionNodeConstructor && - (visualElement.type === "html" || visualElement.type === "svg")) { - createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig); - } - const isMounted = React$1.useRef(false); - React$1.useInsertionEffect(() => { - /** - * Check the component has already mounted before calling - * `update` unnecessarily. This ensures we skip the initial update. - */ - if (visualElement && isMounted.current) { - visualElement.update(props, presenceContext); - } - }); - /** - * Cache this value as we want to know whether HandoffAppearAnimations - * was present on initial render - it will be deleted after this. - */ - const optimisedAppearId = props[optimizedAppearDataAttribute]; - const wantsHandoff = React$1.useRef(Boolean(optimisedAppearId) && - typeof window !== "undefined" && - !window.MotionHandoffIsComplete?.(optimisedAppearId) && - window.MotionHasOptimisedAnimation?.(optimisedAppearId)); - useIsomorphicLayoutEffect(() => { - /** - * Track that this component has mounted. This is used to detect when - * LazyMotion features load after the component has already committed. - */ - hasMountedOnce.current = true; - if (!visualElement) - return; - isMounted.current = true; - window.MotionIsMounted = true; - visualElement.updateFeatures(); - visualElement.scheduleRenderMicrotask(); - /** - * Ideally this function would always run in a useEffect. - * - * However, if we have optimised appear animations to handoff from, - * it needs to happen synchronously to ensure there's no flash of - * incorrect styles in the event of a hydration error. - * - * So if we detect a situtation where optimised appear animations - * are running, we use useLayoutEffect to trigger animations. - */ - if (wantsHandoff.current && visualElement.animationState) { - visualElement.animationState.animateChanges(); - } - }); - React$1.useEffect(() => { - if (!visualElement) - return; - if (!wantsHandoff.current && visualElement.animationState) { - visualElement.animationState.animateChanges(); - } - if (wantsHandoff.current) { - // This ensures all future calls to animateChanges() in this component will run in useEffect - queueMicrotask(() => { - window.MotionHandoffMarkAsComplete?.(optimisedAppearId); - }); - wantsHandoff.current = false; - } - /** - * Now we've finished triggering animations for this element we - * can wipe the enteringChildren set for the next render. - */ - visualElement.enteringChildren = undefined; - }); - return visualElement; - } - function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) { - const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutAnchor, layoutCrossfade, } = props; - visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"] - ? undefined - : getClosestProjectingNode(visualElement.parent)); - visualElement.projection.setOptions({ - layoutId, - layout, - alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)), - visualElement, - /** - * TODO: Update options in an effect. This could be tricky as it'll be too late - * to update by the time layout animations run. - * We also need to fix this safeToRemove by linking it up to the one returned by usePresence, - * ensuring it gets called if there's no potential layout animations. - * - */ - animationType: typeof layout === "string" ? layout : "both", - initialPromotionConfig, - crossfade: layoutCrossfade, - layoutScroll, - layoutRoot, - layoutAnchor, - }); - } - function getClosestProjectingNode(visualElement) { - if (!visualElement) - return undefined; - return visualElement.options.allowProjection !== false - ? visualElement.projection - : getClosestProjectingNode(visualElement.parent); - } - - /** - * Create a `motion` component. - * - * This function accepts a Component argument, which can be either a string (ie "div" - * for `motion.div`), or an actual React component. - * - * Alongside this is a config option which provides a way of rendering the provided - * component "offline", or outside the React render cycle. - */ - function createMotionComponent(Component, { forwardMotionProps = false, type } = {}, preloadedFeatures, createVisualElement) { - preloadedFeatures && loadFeatures(preloadedFeatures); - /** - * Determine whether to use SVG or HTML rendering based on: - * 1. Explicit `type` option (highest priority) - * 2. Auto-detection via `isSVGComponent` - */ - const isSVG = type ? type === "svg" : isSVGComponent(Component); - const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState; - function MotionDOMComponent(props, externalRef) { - /** - * If we need to measure the element we load this functionality in a - * separate class component in order to gain access to getSnapshotBeforeUpdate. - */ - let MeasureLayout; - const configAndProps = { - ...React$1.useContext(MotionConfigContext), - ...props, - layoutId: useLayoutId(props), - }; - const { isStatic } = configAndProps; - const context = useCreateMotionContext(props); - const visualState = useVisualState(props, isStatic); - if (!isStatic && typeof window !== "undefined") { - useStrictMode(configAndProps, preloadedFeatures); - const layoutProjection = getProjectionFunctionality(configAndProps); - MeasureLayout = layoutProjection.MeasureLayout; - /** - * Create a VisualElement for this component. A VisualElement provides a common - * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as - * providing a way of rendering to these APIs outside of the React render loop - * for more performant animations and interactions - */ - context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode, isSVG); - } - /** - * The mount order and hierarchy is specific to ensure our element ref - * is hydrated by the time features fire their effects. - */ - return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, forwardMotionProps, isSVG)] })); - } - MotionDOMComponent.displayName = `motion.${typeof Component === "string" - ? Component - : `create(${Component.displayName ?? Component.name ?? ""})`}`; - const ForwardRefMotionComponent = React$1.forwardRef(MotionDOMComponent); - ForwardRefMotionComponent[motionComponentSymbol] = Component; - return ForwardRefMotionComponent; - } - function useLayoutId({ layoutId }) { - const layoutGroupId = React$1.useContext(LayoutGroupContext).id; - return layoutGroupId && layoutId !== undefined - ? layoutGroupId + "-" + layoutId - : layoutId; - } - function useStrictMode(configAndProps, preloadedFeatures) { - const isStrict = React$1.useContext(LazyContext).strict; - /** - * If we're in development mode, check to make sure we're not rendering a motion component - * as a child of LazyMotion, as this will break the file-size benefits of using it. - */ - if (preloadedFeatures && - isStrict) { - const strictMessage = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead."; - configAndProps.ignoreStrict - ? exports.warning(false, strictMessage, "lazy-strict-mode") - : exports.invariant(false, strictMessage, "lazy-strict-mode"); - } - } - function getProjectionFunctionality(props) { - const featureDefinitions = getInitializedFeatureDefinitions(); - const { drag, layout } = featureDefinitions; - if (!drag && !layout) - return {}; - const combined = { ...drag, ...layout }; - return { - MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props) - ? combined.MeasureLayout - : undefined, - ProjectionNode: combined.ProjectionNode, - }; - } - - function createMotionProxy(preloadedFeatures, createVisualElement) { - if (typeof Proxy === "undefined") { - return createMotionComponent; - } - /** - * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc. - * Rather than generating them anew every render. - */ - const componentCache = new Map(); - const factory = (Component, options) => { - return createMotionComponent(Component, options, preloadedFeatures, createVisualElement); - }; - /** - * Support for deprecated`motion(Component)` pattern - */ - const deprecatedFactoryFunction = (Component, options) => { - { - warnOnce(false, "motion() is deprecated. Use motion.create() instead."); - } - return factory(Component, options); - }; - return new Proxy(deprecatedFactoryFunction, { - /** - * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc. - * The prop name is passed through as `key` and we can use that to generate a `motion` - * DOM component with that name. - */ - get: (_target, key) => { - if (key === "create") - return factory; - /** - * If this element doesn't exist in the component cache, create it and cache. - */ - if (!componentCache.has(key)) { - componentCache.set(key, createMotionComponent(key, undefined, preloadedFeatures, createVisualElement)); - } - return componentCache.get(key); - }, - }); - } - - class AnimationFeature extends Feature { - /** - * We dynamically generate the AnimationState manager as it contains a reference - * to the underlying animation library. We only want to load that if we load this, - * so people can optionally code split it out using the `m` component. - */ - constructor(node) { - super(node); - node.animationState || (node.animationState = createAnimationState(node)); - } - updateAnimationControlsSubscription() { - const { animate } = this.node.getProps(); - if (isAnimationControls(animate)) { - this.unmountControls = animate.subscribe(this.node); - } - } - /** - * Subscribe any provided AnimationControls to the component's VisualElement - */ - mount() { - this.updateAnimationControlsSubscription(); - } - update() { - const { animate } = this.node.getProps(); - const { animate: prevAnimate } = this.node.prevProps || {}; - if (animate !== prevAnimate) { - this.updateAnimationControlsSubscription(); - } - } - unmount() { - this.node.animationState.reset(); - this.unmountControls?.(); - } - } - - let id$1 = 0; - class ExitAnimationFeature extends Feature { - constructor() { - super(...arguments); - this.id = id$1++; - this.isExitComplete = false; - } - update() { - if (!this.node.presenceContext) - return; - const { isPresent, onExitComplete } = this.node.presenceContext; - const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {}; - if (!this.node.animationState || isPresent === prevIsPresent) { - return; - } - if (isPresent && prevIsPresent === false) { - /** - * When re-entering, if the exit animation already completed - * (element is at rest), reset to initial values so the enter - * animation replays from the correct position. - */ - if (this.isExitComplete) { - const { initial, custom } = this.node.getProps(); - if (typeof initial === "string" || - (typeof initial === "object" && - initial !== null && - !Array.isArray(initial))) { - const resolved = resolveVariant(this.node, initial, custom); - if (resolved) { - const { transition, transitionEnd, ...target } = resolved; - for (const key in target) { - this.node - .getValue(key) - ?.jump(target[key]); - } - } - } - this.node.animationState.reset(); - this.node.animationState.animateChanges(); - } - else { - this.node.animationState.setActive("exit", false); - } - this.isExitComplete = false; - return; - } - const exitAnimation = this.node.animationState.setActive("exit", !isPresent); - if (onExitComplete && !isPresent) { - exitAnimation.then(() => { - this.isExitComplete = true; - onExitComplete(this.id); - }); - } - } - mount() { - const { register, onExitComplete } = this.node.presenceContext || {}; - if (onExitComplete) { - onExitComplete(this.id); - } - if (register) { - this.unmount = register(this.id); - } - } - unmount() { } - } - - const animations = { - animation: { - Feature: AnimationFeature, - }, - exit: { - Feature: ExitAnimationFeature, - }, - }; - - function extractEventInfo(event) { - return { - point: { - x: event.pageX, - y: event.pageY, - }, - }; - } - const addPointerInfo = (handler) => (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event)); - - function addPointerEvent(target, eventName, handler, options) { - return addDomEvent(target, eventName, addPointerInfo(handler), options); - } - - // Fixes https://github.com/motiondivision/motion/issues/2270 - const getContextWindow = ({ current }) => { - return current ? current.ownerDocument.defaultView : null; - }; - - const distance = (a, b) => Math.abs(a - b); - function distance2D(a, b) { - // Multi-dimensional - const xDelta = distance(a.x, b.x); - const yDelta = distance(a.y, b.y); - return Math.sqrt(xDelta ** 2 + yDelta ** 2); - } - - const overflowStyles$1 = /*#__PURE__*/ new Set(["auto", "scroll"]); - /** - * @internal - */ - class PanSession { - constructor(event, handlers, { transformPagePoint, contextWindow = window, dragSnapToOrigin = false, distanceThreshold = 3, element, } = {}) { - /** - * @internal - */ - this.startEvent = null; - /** - * @internal - */ - this.lastMoveEvent = null; - /** - * @internal - */ - this.lastMoveEventInfo = null; - /** - * Raw (untransformed) event info, re-transformed each frame - * so transformPagePoint sees the current parent matrix. - * @internal - */ - this.lastRawMoveEventInfo = null; - /** - * @internal - */ - this.handlers = {}; - /** - * @internal - */ - this.contextWindow = window; - /** - * Scroll positions of scrollable ancestors and window. - * @internal - */ - this.scrollPositions = new Map(); - /** - * Cleanup function for scroll listeners. - * @internal - */ - this.removeScrollListeners = null; - this.onElementScroll = (event) => { - this.handleScroll(event.target); - }; - this.onWindowScroll = () => { - this.handleScroll(window); - }; - this.updatePoint = () => { - if (!(this.lastMoveEvent && this.lastMoveEventInfo)) - return; - // Re-transform raw point through current transformPagePoint so - // animated parent transforms (e.g. rotation) are picked up each frame - if (this.lastRawMoveEventInfo) { - this.lastMoveEventInfo = transformPoint(this.lastRawMoveEventInfo, this.transformPagePoint); - } - const info = getPanInfo(this.lastMoveEventInfo, this.history); - const isPanStarted = this.startEvent !== null; - // Only start panning if the offset is larger than 3 pixels. If we make it - // any larger than this we'll want to reset the pointer history - // on the first update to avoid visual snapping to the cursor. - const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold; - if (!isPanStarted && !isDistancePastThreshold) - return; - const { point } = info; - const { timestamp } = frameData; - this.history.push({ ...point, timestamp }); - const { onStart, onMove } = this.handlers; - if (!isPanStarted) { - onStart && onStart(this.lastMoveEvent, info); - this.startEvent = this.lastMoveEvent; - } - onMove && onMove(this.lastMoveEvent, info); - }; - this.handlePointerMove = (event, info) => { - this.lastMoveEvent = event; - this.lastRawMoveEventInfo = info; - this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint); - // Throttle mouse move event to once per frame - frame.update(this.updatePoint, true); - }; - this.handlePointerUp = (event, info) => { - this.end(); - const { onEnd, onSessionEnd, resumeAnimation } = this.handlers; - // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked) - // This ensures constraint animations continue when interrupted by a click - if (this.dragSnapToOrigin || !this.startEvent) { - resumeAnimation && resumeAnimation(); - } - if (!(this.lastMoveEvent && this.lastMoveEventInfo)) - return; - const panInfo = getPanInfo(event.type === "pointercancel" - ? this.lastMoveEventInfo - : transformPoint(info, this.transformPagePoint), this.history); - if (this.startEvent && onEnd) { - onEnd(event, panInfo); - } - onSessionEnd && onSessionEnd(event, panInfo); - }; - // If we have more than one touch, don't start detecting this gesture - if (!isPrimaryPointer(event)) - return; - this.dragSnapToOrigin = dragSnapToOrigin; - this.handlers = handlers; - this.transformPagePoint = transformPagePoint; - this.distanceThreshold = distanceThreshold; - this.contextWindow = contextWindow || window; - const info = extractEventInfo(event); - const initialInfo = transformPoint(info, this.transformPagePoint); - const { point } = initialInfo; - const { timestamp } = frameData; - this.history = [{ ...point, timestamp }]; - const { onSessionStart } = handlers; - onSessionStart && - onSessionStart(event, getPanInfo(initialInfo, this.history)); - this.removeListeners = pipe(addPointerEvent(this.contextWindow, "pointermove", this.handlePointerMove), addPointerEvent(this.contextWindow, "pointerup", this.handlePointerUp), addPointerEvent(this.contextWindow, "pointercancel", this.handlePointerUp)); - // Start scroll tracking if element provided - if (element) { - this.startScrollTracking(element); - } - } - /** - * Start tracking scroll on ancestors and window. - */ - startScrollTracking(element) { - // Store initial scroll positions for scrollable ancestors - let current = element.parentElement; - while (current) { - const style = getComputedStyle(current); - if (overflowStyles$1.has(style.overflowX) || - overflowStyles$1.has(style.overflowY)) { - this.scrollPositions.set(current, { - x: current.scrollLeft, - y: current.scrollTop, - }); - } - current = current.parentElement; - } - // Track window scroll - this.scrollPositions.set(window, { - x: window.scrollX, - y: window.scrollY, - }); - // Capture listener catches element scroll events as they bubble - window.addEventListener("scroll", this.onElementScroll, { - capture: true, - }); - // Direct window scroll listener (window scroll doesn't bubble) - window.addEventListener("scroll", this.onWindowScroll); - this.removeScrollListeners = () => { - window.removeEventListener("scroll", this.onElementScroll, { - capture: true, - }); - window.removeEventListener("scroll", this.onWindowScroll); - }; - } - /** - * Handle scroll compensation during drag. - * - * For element scroll: adjusts history origin since pageX/pageY doesn't change. - * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change. - */ - handleScroll(target) { - const initial = this.scrollPositions.get(target); - if (!initial) - return; - const isWindow = target === window; - const current = isWindow - ? { x: window.scrollX, y: window.scrollY } - : { - x: target.scrollLeft, - y: target.scrollTop, - }; - const delta = { x: current.x - initial.x, y: current.y - initial.y }; - if (delta.x === 0 && delta.y === 0) - return; - if (isWindow) { - // Window scroll: pageX/pageY changes, so update lastMoveEventInfo - if (this.lastMoveEventInfo) { - this.lastMoveEventInfo.point.x += delta.x; - this.lastMoveEventInfo.point.y += delta.y; - } - } - else { - // Element scroll: pageX/pageY unchanged, so adjust history origin - if (this.history.length > 0) { - this.history[0].x -= delta.x; - this.history[0].y -= delta.y; - } - } - this.scrollPositions.set(target, current); - frame.update(this.updatePoint, true); - } - updateHandlers(handlers) { - this.handlers = handlers; - } - end() { - this.removeListeners && this.removeListeners(); - this.removeScrollListeners && this.removeScrollListeners(); - this.scrollPositions.clear(); - cancelFrame(this.updatePoint); - } - } - function transformPoint(info, transformPagePoint) { - return transformPagePoint ? { point: transformPagePoint(info.point) } : info; - } - function subtractPoint(a, b) { - return { x: a.x - b.x, y: a.y - b.y }; - } - function getPanInfo({ point }, history) { - return { - point, - delta: subtractPoint(point, lastDevicePoint(history)), - offset: subtractPoint(point, startDevicePoint(history)), - velocity: getVelocity(history, 0.1), - }; - } - function startDevicePoint(history) { - return history[0]; - } - function lastDevicePoint(history) { - return history[history.length - 1]; - } - function getVelocity(history, timeDelta) { - if (history.length < 2) { - return { x: 0, y: 0 }; - } - let i = history.length - 1; - let timestampedPoint = null; - const lastPoint = lastDevicePoint(history); - while (i >= 0) { - timestampedPoint = history[i]; - if (lastPoint.timestamp - timestampedPoint.timestamp > - secondsToMilliseconds(timeDelta)) { - break; - } - i--; - } - if (!timestampedPoint) { - return { x: 0, y: 0 }; - } - /** - * If the selected point is the pointer-down origin (history[0]), - * there are better movement points available, and the time gap - * is suspiciously large (>2x timeDelta), use the next point instead. - * This prevents stale pointer-down points from diluting velocity - * in hold-then-flick gestures. - */ - if (timestampedPoint === history[0] && - history.length > 2 && - lastPoint.timestamp - timestampedPoint.timestamp > - secondsToMilliseconds(timeDelta) * 2) { - timestampedPoint = history[1]; - } - const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp); - if (time === 0) { - return { x: 0, y: 0 }; - } - const currentVelocity = { - x: (lastPoint.x - timestampedPoint.x) / time, - y: (lastPoint.y - timestampedPoint.y) / time, - }; - if (currentVelocity.x === Infinity) { - currentVelocity.x = 0; - } - if (currentVelocity.y === Infinity) { - currentVelocity.y = 0; - } - return currentVelocity; - } - - /** - * Apply constraints to a point. These constraints are both physical along an - * axis, and an elastic factor that determines how much to constrain the point - * by if it does lie outside the defined parameters. - */ - function applyConstraints(point, { min, max }, elastic) { - if (min !== undefined && point < min) { - // If we have a min point defined, and this is outside of that, constrain - point = elastic - ? mixNumber$1(min, point, elastic.min) - : Math.max(point, min); - } - else if (max !== undefined && point > max) { - // If we have a max point defined, and this is outside of that, constrain - point = elastic - ? mixNumber$1(max, point, elastic.max) - : Math.min(point, max); - } - return point; - } - /** - * Calculate constraints in terms of the viewport when defined relatively to the - * measured axis. This is measured from the nearest edge, so a max constraint of 200 - * on an axis with a max value of 300 would return a constraint of 500 - axis length - */ - function calcRelativeAxisConstraints(axis, min, max) { - return { - min: min !== undefined ? axis.min + min : undefined, - max: max !== undefined - ? axis.max + max - (axis.max - axis.min) - : undefined, - }; - } - /** - * Calculate constraints in terms of the viewport when - * defined relatively to the measured bounding box. - */ - function calcRelativeConstraints(layoutBox, { top, left, bottom, right }) { - return { - x: calcRelativeAxisConstraints(layoutBox.x, left, right), - y: calcRelativeAxisConstraints(layoutBox.y, top, bottom), - }; - } - /** - * Calculate viewport constraints when defined as another viewport-relative axis - */ - function calcViewportAxisConstraints(layoutAxis, constraintsAxis) { - let min = constraintsAxis.min - layoutAxis.min; - let max = constraintsAxis.max - layoutAxis.max; - // If the constraints axis is actually smaller than the layout axis then we can - // flip the constraints - if (constraintsAxis.max - constraintsAxis.min < - layoutAxis.max - layoutAxis.min) { - [min, max] = [max, min]; - } - return { min, max }; - } - /** - * Calculate viewport constraints when defined as another viewport-relative box - */ - function calcViewportConstraints(layoutBox, constraintsBox) { - return { - x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x), - y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y), - }; - } - /** - * Calculate a transform origin relative to the source axis, between 0-1, that results - * in an asthetically pleasing scale/transform needed to project from source to target. - */ - function calcOrigin(source, target) { - let origin = 0.5; - const sourceLength = calcLength(source); - const targetLength = calcLength(target); - if (targetLength > sourceLength) { - origin = progress(target.min, target.max - sourceLength, source.min); - } - else if (sourceLength > targetLength) { - origin = progress(source.min, source.max - targetLength, target.min); - } - return clamp(0, 1, origin); - } - /** - * Rebase the calculated viewport constraints relative to the layout.min point. - */ - function rebaseAxisConstraints(layout, constraints) { - const relativeConstraints = {}; - if (constraints.min !== undefined) { - relativeConstraints.min = constraints.min - layout.min; - } - if (constraints.max !== undefined) { - relativeConstraints.max = constraints.max - layout.min; - } - return relativeConstraints; - } - const defaultElastic = 0.35; - /** - * Accepts a dragElastic prop and returns resolved elastic values for each axis. - */ - function resolveDragElastic(dragElastic = defaultElastic) { - if (dragElastic === false) { - dragElastic = 0; - } - else if (dragElastic === true) { - dragElastic = defaultElastic; - } - return { - x: resolveAxisElastic(dragElastic, "left", "right"), - y: resolveAxisElastic(dragElastic, "top", "bottom"), - }; - } - function resolveAxisElastic(dragElastic, minLabel, maxLabel) { - return { - min: resolvePointElastic(dragElastic, minLabel), - max: resolvePointElastic(dragElastic, maxLabel), - }; - } - function resolvePointElastic(dragElastic, label) { - return typeof dragElastic === "number" - ? dragElastic - : dragElastic[label] || 0; - } - - const elementDragControls = new WeakMap(); - class VisualElementDragControls { - constructor(visualElement) { - this.openDragLock = null; - this.isDragging = false; - this.currentDirection = null; - this.originPoint = { x: 0, y: 0 }; - /** - * The permitted boundaries of travel, in pixels. - */ - this.constraints = false; - this.hasMutatedConstraints = false; - /** - * The per-axis resolved elastic values. - */ - this.elastic = createBox(); - /** - * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments. - */ - this.latestPointerEvent = null; - /** - * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments. - */ - this.latestPanInfo = null; - this.visualElement = visualElement; - } - start(originEvent, { snapToCursor = false, distanceThreshold } = {}) { - /** - * Don't start dragging if this component is exiting - */ - const { presenceContext } = this.visualElement; - if (presenceContext && presenceContext.isPresent === false) - return; - const onSessionStart = (event) => { - if (snapToCursor) { - this.snapToCursor(extractEventInfo(event).point); - } - this.stopAnimation(); - }; - const onStart = (event, info) => { - // Attempt to grab the global drag gesture lock - maybe make this part of PanSession - const { drag, dragPropagation, onDragStart } = this.getProps(); - if (drag && !dragPropagation) { - if (this.openDragLock) - this.openDragLock(); - this.openDragLock = setDragLock(drag); - // If we don 't have the lock, don't start dragging - if (!this.openDragLock) - return; - } - this.latestPointerEvent = event; - this.latestPanInfo = info; - this.isDragging = true; - this.currentDirection = null; - this.resolveConstraints(); - if (this.visualElement.projection) { - this.visualElement.projection.isAnimationBlocked = true; - this.visualElement.projection.target = undefined; - } - /** - * Record gesture origin and pointer offset - */ - eachAxis((axis) => { - let current = this.getAxisMotionValue(axis).get() || 0; - /** - * If the MotionValue is a percentage value convert to px - */ - if (percent.test(current)) { - const { projection } = this.visualElement; - if (projection && projection.layout) { - const measuredAxis = projection.layout.layoutBox[axis]; - if (measuredAxis) { - const length = calcLength(measuredAxis); - current = length * (parseFloat(current) / 100); - } - } - } - this.originPoint[axis] = current; - }); - // Fire onDragStart event - if (onDragStart) { - frame.update(() => onDragStart(event, info), false, true); - } - addValueToWillChange(this.visualElement, "transform"); - const { animationState } = this.visualElement; - animationState && animationState.setActive("whileDrag", true); - }; - const onMove = (event, info) => { - this.latestPointerEvent = event; - this.latestPanInfo = info; - const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps(); - // If we didn't successfully receive the gesture lock, early return. - if (!dragPropagation && !this.openDragLock) - return; - const { offset } = info; - // Attempt to detect drag direction if directionLock is true - if (dragDirectionLock && this.currentDirection === null) { - this.currentDirection = getCurrentDirection(offset); - // If we've successfully set a direction, notify listener - if (this.currentDirection !== null) { - onDirectionLock && onDirectionLock(this.currentDirection); - } - return; - } - // Update each point with the latest position - this.updateAxis("x", info.point, offset); - this.updateAxis("y", info.point, offset); - /** - * Ideally we would leave the renderer to fire naturally at the end of - * this frame but if the element is about to change layout as the result - * of a re-render we want to ensure the browser can read the latest - * bounding box to ensure the pointer and element don't fall out of sync. - */ - this.visualElement.render(); - /** - * This must fire after the render call as it might trigger a state - * change which itself might trigger a layout update. - */ - if (onDrag) { - frame.update(() => onDrag(event, info), false, true); - } - }; - const onSessionEnd = (event, info) => { - this.latestPointerEvent = event; - this.latestPanInfo = info; - this.stop(event, info); - this.latestPointerEvent = null; - this.latestPanInfo = null; - }; - const resumeAnimation = () => { - const { dragSnapToOrigin: snap } = this.getProps(); - if (snap || this.constraints) { - this.startAnimation({ x: 0, y: 0 }); - } - }; - const { dragSnapToOrigin } = this.getProps(); - this.panSession = new PanSession(originEvent, { - onSessionStart, - onStart, - onMove, - onSessionEnd, - resumeAnimation, - }, { - transformPagePoint: this.visualElement.getTransformPagePoint(), - dragSnapToOrigin, - distanceThreshold, - contextWindow: getContextWindow(this.visualElement), - element: this.visualElement.current, - }); - } - /** - * @internal - */ - stop(event, panInfo) { - const finalEvent = event || this.latestPointerEvent; - const finalPanInfo = panInfo || this.latestPanInfo; - const isDragging = this.isDragging; - this.cancel(); - if (!isDragging || !finalPanInfo || !finalEvent) - return; - const { velocity } = finalPanInfo; - this.startAnimation(velocity); - const { onDragEnd } = this.getProps(); - if (onDragEnd) { - frame.postRender(() => onDragEnd(finalEvent, finalPanInfo)); - } - } - /** - * @internal - */ - cancel() { - this.isDragging = false; - const { projection, animationState } = this.visualElement; - if (projection) { - projection.isAnimationBlocked = false; - } - this.endPanSession(); - const { dragPropagation } = this.getProps(); - if (!dragPropagation && this.openDragLock) { - this.openDragLock(); - this.openDragLock = null; - } - animationState && animationState.setActive("whileDrag", false); - } - /** - * Clean up the pan session without modifying other drag state. - * This is used during unmount to ensure event listeners are removed - * without affecting projection animations or drag locks. - * @internal - */ - endPanSession() { - this.panSession && this.panSession.end(); - this.panSession = undefined; - } - updateAxis(axis, _point, offset) { - const { drag } = this.getProps(); - // If we're not dragging this axis, do an early return. - if (!offset || !shouldDrag(axis, drag, this.currentDirection)) - return; - const axisValue = this.getAxisMotionValue(axis); - let next = this.originPoint[axis] + offset[axis]; - // Apply constraints - if (this.constraints && this.constraints[axis]) { - next = applyConstraints(next, this.constraints[axis], this.elastic[axis]); - } - axisValue.set(next); - } - resolveConstraints() { - const { dragConstraints, dragElastic } = this.getProps(); - const layout = this.visualElement.projection && - !this.visualElement.projection.layout - ? this.visualElement.projection.measure(false) - : this.visualElement.projection?.layout; - const prevConstraints = this.constraints; - if (dragConstraints && isRefObject(dragConstraints)) { - if (!this.constraints) { - this.constraints = this.resolveRefConstraints(); - } - } - else { - if (dragConstraints && layout) { - this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints); - } - else { - this.constraints = false; - } - } - this.elastic = resolveDragElastic(dragElastic); - /** - * If we're outputting to external MotionValues, we want to rebase the measured constraints - * from viewport-relative to component-relative. This only applies to relative (non-ref) - * constraints, as ref-based constraints from calcViewportConstraints are already in the - * correct coordinate space for the motion value transform offset. - */ - if (prevConstraints !== this.constraints && - !isRefObject(dragConstraints) && - layout && - this.constraints && - !this.hasMutatedConstraints) { - eachAxis((axis) => { - if (this.constraints !== false && - this.getAxisMotionValue(axis)) { - this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]); - } - }); - } - } - resolveRefConstraints() { - const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps(); - if (!constraints || !isRefObject(constraints)) - return false; - const constraintsElement = constraints.current; - exports.invariant(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref"); - const { projection } = this.visualElement; - // TODO - if (!projection || !projection.layout) - return false; - /** - * Refresh the root scroll offset so the constraint's viewport box - * translates to correct page coordinates. The scroll captured at - * drag mount can be stale if the document was scrolled afterwards — - * e.g. via the browser restoring scroll on refresh, or an ancestor - * layout effect running after this element's mount (#2829). - * - * Clear the cached scroll first so `updateScroll` bypasses its - * per-animationId cache and re-reads the live value. - */ - if (projection.root) { - projection.root.scroll = undefined; - projection.root.updateScroll(); - } - const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint()); - let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox); - /** - * If there's an onMeasureDragConstraints listener we call it and - * if different constraints are returned, set constraints to that - */ - if (onMeasureDragConstraints) { - const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints)); - this.hasMutatedConstraints = !!userConstraints; - if (userConstraints) { - measuredConstraints = convertBoundingBoxToBox(userConstraints); - } - } - return measuredConstraints; - } - startAnimation(velocity) { - const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps(); - const constraints = this.constraints || {}; - const momentumAnimations = eachAxis((axis) => { - if (!shouldDrag(axis, drag, this.currentDirection)) { - return; - } - let transition = (constraints && constraints[axis]) || {}; - if (dragSnapToOrigin === true || - dragSnapToOrigin === axis) - transition = { min: 0, max: 0 }; - /** - * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame - * of spring animations so we should look into adding a disable spring option to `inertia`. - * We could do something here where we affect the `bounceStiffness` and `bounceDamping` - * using the value of `dragElastic`. - */ - const bounceStiffness = dragElastic ? 200 : 1000000; - const bounceDamping = dragElastic ? 40 : 10000000; - const inertia = { - type: "inertia", - velocity: dragMomentum ? velocity[axis] : 0, - bounceStiffness, - bounceDamping, - timeConstant: 750, - restDelta: 1, - restSpeed: 10, - ...dragTransition, - ...transition, - }; - // If we're not animating on an externally-provided `MotionValue` we can use the - // component's animation controls which will handle interactions with whileHover (etc), - // otherwise we just have to animate the `MotionValue` itself. - return this.startAxisValueAnimation(axis, inertia); - }); - // Run all animations and then resolve the new drag constraints. - return Promise.all(momentumAnimations).then(onDragTransitionEnd); - } - startAxisValueAnimation(axis, transition) { - const axisValue = this.getAxisMotionValue(axis); - addValueToWillChange(this.visualElement, axis); - return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false)); - } - stopAnimation() { - eachAxis((axis) => this.getAxisMotionValue(axis).stop()); - } - /** - * Drag works differently depending on which props are provided. - * - * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values. - * - Otherwise, we apply the delta to the x/y motion values. - */ - getAxisMotionValue(axis) { - const dragKey = `_drag${axis.toUpperCase()}`; - const props = this.visualElement.getProps(); - const externalMotionValue = props[dragKey]; - return externalMotionValue - ? externalMotionValue - : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0); - } - snapToCursor(point) { - eachAxis((axis) => { - const { drag } = this.getProps(); - // If we're not dragging this axis, do an early return. - if (!shouldDrag(axis, drag, this.currentDirection)) - return; - const { projection } = this.visualElement; - const axisValue = this.getAxisMotionValue(axis); - if (projection && projection.layout) { - const { min, max } = projection.layout.layoutBox[axis]; - /** - * The layout measurement includes the current transform value, - * so we need to add it back to get the correct snap position. - * This fixes an issue where elements with initial coordinates - * would snap to the wrong position on the first drag. - */ - const current = axisValue.get() || 0; - axisValue.set(point[axis] - mixNumber$1(min, max, 0.5) + current); - } - }); - } - /** - * When the viewport resizes we want to check if the measured constraints - * have changed and, if so, reposition the element within those new constraints - * relative to where it was before the resize. - */ - scalePositionWithinConstraints() { - if (!this.visualElement.current) - return; - const { drag, dragConstraints } = this.getProps(); - const { projection } = this.visualElement; - if (!isRefObject(dragConstraints) || !projection || !this.constraints) - return; - /** - * Stop current animations as there can be visual glitching if we try to do - * this mid-animation - */ - this.stopAnimation(); - /** - * Record the relative position of the dragged element relative to the - * constraints box and save as a progress value. - */ - const boxProgress = { x: 0, y: 0 }; - eachAxis((axis) => { - const axisValue = this.getAxisMotionValue(axis); - if (axisValue && this.constraints !== false) { - const latest = axisValue.get(); - boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]); - } - }); - /** - * Update the layout of this element and resolve the latest drag constraints - */ - const { transformTemplate } = this.visualElement.getProps(); - this.visualElement.current.style.transform = transformTemplate - ? transformTemplate({}, "") - : "none"; - projection.root && projection.root.updateScroll(); - projection.updateLayout(); - /** - * Reset constraints so resolveConstraints() will recalculate them - * with the freshly measured layout rather than returning the cached value. - */ - this.constraints = false; - this.resolveConstraints(); - /** - * For each axis, calculate the current progress of the layout axis - * within the new constraints. - */ - eachAxis((axis) => { - if (!shouldDrag(axis, drag, null)) - return; - /** - * Calculate a new transform based on the previous box progress - */ - const axisValue = this.getAxisMotionValue(axis); - const { min, max } = this.constraints[axis]; - axisValue.set(mixNumber$1(min, max, boxProgress[axis])); - }); - /** - * Flush the updated transform to the DOM synchronously to prevent - * a visual flash at the element's CSS layout position (0,0) when - * the transform was stripped for measurement. - */ - this.visualElement.render(); - } - addListeners() { - if (!this.visualElement.current) - return; - elementDragControls.set(this.visualElement, this); - const element = this.visualElement.current; - /** - * Attach a pointerdown event listener on this DOM element to initiate drag tracking. - */ - const stopPointerListener = addPointerEvent(element, "pointerdown", (event) => { - const { drag, dragListener = true } = this.getProps(); - const target = event.target; - /** - * Only block drag if clicking on a text input child element - * (input, textarea, select, contenteditable) where users might - * want to select text or interact with the control. - * - * Buttons and links don't block drag since they don't have - * click-and-move actions of their own. - */ - const isClickingTextInputChild = target !== element && isElementTextInput(target); - if (drag && dragListener && !isClickingTextInputChild) { - this.start(event); - } - }); - /** - * If using ref-based constraints, observe both the draggable element - * and the constraint container for size changes via ResizeObserver. - * Setup is deferred because dragConstraints.current is null when - * addListeners first runs (React hasn't committed the ref yet). - */ - let stopResizeObservers; - const measureDragConstraints = () => { - const { dragConstraints } = this.getProps(); - if (isRefObject(dragConstraints) && dragConstraints.current) { - this.constraints = this.resolveRefConstraints(); - if (!stopResizeObservers) { - stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints()); - } - } - }; - const { projection } = this.visualElement; - const stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints); - if (projection && !projection.layout) { - projection.root && projection.root.updateScroll(); - projection.updateLayout(); - } - frame.read(measureDragConstraints); - /** - * Attach a window resize listener to scale the draggable target within its defined - * constraints as the window resizes. - */ - const stopResizeListener = addDomEvent(window, "resize", () => this.scalePositionWithinConstraints()); - /** - * If the element's layout changes, calculate the delta and apply that to - * the drag gesture's origin point. - */ - const stopLayoutUpdateListener = projection.addEventListener("didUpdate", (({ delta, hasLayoutChanged }) => { - if (this.isDragging && hasLayoutChanged) { - eachAxis((axis) => { - const motionValue = this.getAxisMotionValue(axis); - if (!motionValue) - return; - this.originPoint[axis] += delta[axis].translate; - motionValue.set(motionValue.get() + delta[axis].translate); - }); - this.visualElement.render(); - } - })); - return () => { - stopResizeListener(); - stopPointerListener(); - stopMeasureLayoutListener(); - stopLayoutUpdateListener && stopLayoutUpdateListener(); - stopResizeObservers && stopResizeObservers(); - }; - } - getProps() { - const props = this.visualElement.getProps(); - const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props; - return { - ...props, - drag, - dragDirectionLock, - dragPropagation, - dragConstraints, - dragElastic, - dragMomentum, - }; - } - } - function skipFirstCall(callback) { - let isFirst = true; - return () => { - if (isFirst) { - isFirst = false; - return; - } - callback(); - }; - } - function startResizeObservers(element, constraintsElement, onResize) { - const stopElement = resize(element, skipFirstCall(onResize)); - const stopContainer = resize(constraintsElement, skipFirstCall(onResize)); - return () => { - stopElement(); - stopContainer(); - }; - } - function shouldDrag(direction, drag, currentDirection) { - return ((drag === true || drag === direction) && - (currentDirection === null || currentDirection === direction)); - } - /** - * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower - * than the provided threshold, return `null`. - * - * @param offset - The x/y offset from origin. - * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction. - */ - function getCurrentDirection(offset, lockThreshold = 10) { - let direction = null; - if (Math.abs(offset.y) > lockThreshold) { - direction = "y"; - } - else if (Math.abs(offset.x) > lockThreshold) { - direction = "x"; - } - return direction; - } - - class DragGesture extends Feature { - constructor(node) { - super(node); - this.removeGroupControls = noop$1; - this.removeListeners = noop$1; - this.controls = new VisualElementDragControls(node); - } - mount() { - // If we've been provided a DragControls for manual control over the drag gesture, - // subscribe this component to it on mount. - const { dragControls } = this.node.getProps(); - if (dragControls) { - this.removeGroupControls = dragControls.subscribe(this.controls); - } - this.removeListeners = this.controls.addListeners() || noop$1; - } - update() { - const { dragControls } = this.node.getProps(); - const { dragControls: prevDragControls } = this.node.prevProps || {}; - if (dragControls !== prevDragControls) { - this.removeGroupControls(); - if (dragControls) { - this.removeGroupControls = dragControls.subscribe(this.controls); - } - } - } - unmount() { - this.removeGroupControls(); - this.removeListeners(); - /** - * In React 19, during list reorder reconciliation, components may - * briefly unmount and remount while the drag is still active. If we're - * actively dragging, we should NOT end the pan session - it will - * continue tracking pointer events via its window-level listeners. - * - * The pan session will be properly cleaned up when: - * 1. The drag ends naturally (pointerup/pointercancel) - * 2. The component is truly removed from the DOM - */ - if (!this.controls.isDragging) { - this.controls.endPanSession(); - } - } - } - - const asyncHandler = (handler) => (event, info) => { - if (handler) { - frame.update(() => handler(event, info), false, true); - } - }; - class PanGesture extends Feature { - constructor() { - super(...arguments); - this.removePointerDownListener = noop$1; - } - onPointerDown(pointerDownEvent) { - this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), { - transformPagePoint: this.node.getTransformPagePoint(), - contextWindow: getContextWindow(this.node), - }); - } - createPanHandlers() { - const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps(); - return { - onSessionStart: asyncHandler(onPanSessionStart), - onStart: asyncHandler(onPanStart), - onMove: asyncHandler(onPan), - onEnd: (event, info) => { - delete this.session; - if (onPanEnd) { - frame.postRender(() => onPanEnd(event, info)); - } - }, - }; - } - mount() { - this.removePointerDownListener = addPointerEvent(this.node.current, "pointerdown", (event) => this.onPointerDown(event)); - } - update() { - this.session && this.session.updateHandlers(this.createPanHandlers()); - } - unmount() { - this.removePointerDownListener(); - this.session && this.session.end(); - } - } - - /** - * Track whether we've taken any snapshots yet. If not, - * we can safely skip notification of didUpdate. - * - * Difficult to capture in a test but to prevent flickering - * we must set this to true either on update or unmount. - * Running `next-env/layout-id` in Safari will show this behaviour if broken. - */ - let hasTakenAnySnapshot = false; - class MeasureLayoutWithContext extends React$1.Component { - /** - * This only mounts projection nodes for components that - * need measuring, we might want to do it for all components - * in order to incorporate transforms - */ - componentDidMount() { - const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props; - const { projection } = visualElement; - if (projection) { - if (layoutGroup.group) - layoutGroup.group.add(projection); - if (switchLayoutGroup && switchLayoutGroup.register && layoutId) { - switchLayoutGroup.register(projection); - } - if (hasTakenAnySnapshot) { - projection.root.didUpdate(); - } - projection.addEventListener("animationComplete", () => { - this.safeToRemove(); - }); - projection.setOptions({ - ...projection.options, - layoutDependency: this.props.layoutDependency, - onExitComplete: () => this.safeToRemove(), - }); - } - globalProjectionState.hasEverUpdated = true; - } - getSnapshotBeforeUpdate(prevProps) { - const { layoutDependency, visualElement, drag, isPresent } = this.props; - const { projection } = visualElement; - if (!projection) - return null; - /** - * TODO: We use this data in relegate to determine whether to - * promote a previous element. There's no guarantee its presence data - * will have updated by this point - if a bug like this arises it will - * have to be that we markForRelegation and then find a new lead some other way, - * perhaps in didUpdate - */ - projection.isPresent = isPresent; - if (prevProps.layoutDependency !== layoutDependency) { - projection.setOptions({ - ...projection.options, - layoutDependency, - }); - } - hasTakenAnySnapshot = true; - if (drag || - prevProps.layoutDependency !== layoutDependency || - layoutDependency === undefined || - prevProps.isPresent !== isPresent) { - projection.willUpdate(); - } - else { - this.safeToRemove(); - } - if (prevProps.isPresent !== isPresent) { - if (isPresent) { - projection.promote(); - } - else if (!projection.relegate()) { - /** - * If there's another stack member taking over from this one, - * it's in charge of the exit animation and therefore should - * be in charge of the safe to remove. Otherwise we call it here. - */ - frame.postRender(() => { - const stack = projection.getStack(); - if (!stack || !stack.members.length) { - this.safeToRemove(); - } - }); - } - } - return null; - } - componentDidUpdate() { - const { visualElement, layoutAnchor } = this.props; - const { projection } = visualElement; - if (projection) { - projection.options.layoutAnchor = layoutAnchor; - projection.root.didUpdate(); - microtask.postRender(() => { - if (!projection.currentAnimation && projection.isLead()) { - this.safeToRemove(); - } - }); - } - } - componentWillUnmount() { - const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props; - const { projection } = visualElement; - hasTakenAnySnapshot = true; - if (projection) { - projection.scheduleCheckAfterUnmount(); - if (layoutGroup && layoutGroup.group) - layoutGroup.group.remove(projection); - if (promoteContext && promoteContext.deregister) - promoteContext.deregister(projection); - } - } - safeToRemove() { - const { safeToRemove } = this.props; - safeToRemove && safeToRemove(); - } - render() { - return null; - } - } - function MeasureLayout(props) { - const [isPresent, safeToRemove] = usePresence(); - const layoutGroup = React$1.useContext(LayoutGroupContext); - return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: React$1.useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove })); - } - - const drag = { - pan: { - Feature: PanGesture, - }, - drag: { - Feature: DragGesture, - ProjectionNode: HTMLProjectionNode, - MeasureLayout, - }, - }; - - function handleHoverEvent(node, event, lifecycle) { - const { props } = node; - if (node.animationState && props.whileHover) { - node.animationState.setActive("whileHover", lifecycle === "Start"); - } - const eventName = ("onHover" + lifecycle); - const callback = props[eventName]; - if (callback) { - frame.postRender(() => callback(event, extractEventInfo(event))); - } - } - class HoverGesture extends Feature { - mount() { - const { current } = this.node; - if (!current) - return; - this.unmount = hover(current, (_element, startEvent) => { - handleHoverEvent(this.node, startEvent, "Start"); - return (endEvent) => handleHoverEvent(this.node, endEvent, "End"); - }); - } - unmount() { } - } - - class FocusGesture extends Feature { - constructor() { - super(...arguments); - this.isActive = false; - } - onFocus() { - let isFocusVisible = false; - /** - * If this element doesn't match focus-visible then don't - * apply whileHover. But, if matches throws that focus-visible - * is not a valid selector then in that browser outline styles will be applied - * to the element by default and we want to match that behaviour with whileFocus. - */ - try { - isFocusVisible = this.node.current.matches(":focus-visible"); - } - catch (e) { - isFocusVisible = true; - } - if (!isFocusVisible || !this.node.animationState) - return; - this.node.animationState.setActive("whileFocus", true); - this.isActive = true; - } - onBlur() { - if (!this.isActive || !this.node.animationState) - return; - this.node.animationState.setActive("whileFocus", false); - this.isActive = false; - } - mount() { - this.unmount = pipe(addDomEvent(this.node.current, "focus", () => this.onFocus()), addDomEvent(this.node.current, "blur", () => this.onBlur())); - } - unmount() { } - } - - function handlePressEvent(node, event, lifecycle) { - const { props } = node; - if (node.current instanceof HTMLButtonElement && node.current.disabled) { - return; - } - if (node.animationState && props.whileTap) { - node.animationState.setActive("whileTap", lifecycle === "Start"); - } - const eventName = ("onTap" + (lifecycle === "End" ? "" : lifecycle)); - const callback = props[eventName]; - if (callback) { - frame.postRender(() => callback(event, extractEventInfo(event))); - } - } - class PressGesture extends Feature { - mount() { - const { current } = this.node; - if (!current) - return; - const { globalTapTarget, propagate } = this.node.props; - this.unmount = press(current, (_element, startEvent) => { - handlePressEvent(this.node, startEvent, "Start"); - return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? "End" : "Cancel"); - }, { - useGlobalTarget: globalTapTarget, - stopPropagation: propagate?.tap === false, - }); - } - unmount() { } - } - - /** - * Map an IntersectionHandler callback to an element. We only ever make one handler for one - * element, so even though these handlers might all be triggered by different - * observers, we can keep them in the same map. - */ - const observerCallbacks = new WeakMap(); - /** - * Multiple observers can be created for multiple element/document roots. Each with - * different settings. So here we store dictionaries of observers to each root, - * using serialised settings (threshold/margin) as lookup keys. - */ - const observers = new WeakMap(); - const fireObserverCallback = (entry) => { - const callback = observerCallbacks.get(entry.target); - callback && callback(entry); - }; - const fireAllObserverCallbacks = (entries) => { - entries.forEach(fireObserverCallback); - }; - function initIntersectionObserver({ root, ...options }) { - const lookupRoot = root || document; - /** - * If we don't have an observer lookup map for this root, create one. - */ - if (!observers.has(lookupRoot)) { - observers.set(lookupRoot, {}); - } - const rootObservers = observers.get(lookupRoot); - const key = JSON.stringify(options); - /** - * If we don't have an observer for this combination of root and settings, - * create one. - */ - if (!rootObservers[key]) { - rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options }); - } - return rootObservers[key]; - } - function observeIntersection(element, options, callback) { - const rootInteresectionObserver = initIntersectionObserver(options); - observerCallbacks.set(element, callback); - rootInteresectionObserver.observe(element); - return () => { - observerCallbacks.delete(element); - rootInteresectionObserver.unobserve(element); - }; - } - - const thresholdNames = { - some: 0, - all: 1, - }; - class InViewFeature extends Feature { - constructor() { - super(...arguments); - this.hasEnteredView = false; - this.isInView = false; - } - startObserver() { - this.stopObserver?.(); - const { viewport = {} } = this.node.getProps(); - const { root, margin: rootMargin, amount = "some", once } = viewport; - const options = { - root: root ? root.current : undefined, - rootMargin, - threshold: typeof amount === "number" ? amount : thresholdNames[amount], - }; - const onIntersectionUpdate = (entry) => { - const { isIntersecting } = entry; - /** - * If there's been no change in the viewport state, early return. - */ - if (this.isInView === isIntersecting) - return; - this.isInView = isIntersecting; - /** - * Handle hasEnteredView. If this is only meant to run once, and - * element isn't visible, early return. Otherwise set hasEnteredView to true. - */ - if (once && !isIntersecting && this.hasEnteredView) { - return; - } - else if (isIntersecting) { - this.hasEnteredView = true; - } - if (this.node.animationState) { - this.node.animationState.setActive("whileInView", isIntersecting); - } - /** - * Use the latest committed props rather than the ones in scope - * when this observer is created - */ - const { onViewportEnter, onViewportLeave } = this.node.getProps(); - const callback = isIntersecting ? onViewportEnter : onViewportLeave; - callback && callback(entry); - }; - this.stopObserver = observeIntersection(this.node.current, options, onIntersectionUpdate); - } - mount() { - this.startObserver(); - } - update() { - if (typeof IntersectionObserver === "undefined") - return; - const { props, prevProps } = this.node; - const hasOptionsChanged = ["amount", "margin", "root"].some(hasViewportOptionChanged(props, prevProps)); - if (hasOptionsChanged) { - this.startObserver(); - } - } - unmount() { - this.stopObserver?.(); - this.hasEnteredView = false; - this.isInView = false; - } - } - function hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) { - return (name) => viewport[name] !== prevViewport[name]; - } - - const gestureAnimations = { - inView: { - Feature: InViewFeature, - }, - tap: { - Feature: PressGesture, - }, - focus: { - Feature: FocusGesture, - }, - hover: { - Feature: HoverGesture, - }, - }; - - const layout = { - layout: { - ProjectionNode: HTMLProjectionNode, - MeasureLayout, - }, - }; - - const featureBundle = { - ...animations, - ...gestureAnimations, - ...drag, - ...layout, - }; - - const motion = /*@__PURE__*/ createMotionProxy(featureBundle, createDomVisualElement); - - function checkReorder(order, value, offset, velocity) { - if (!velocity) - return order; - const index = order.findIndex((item) => item.value === value); - if (index === -1) - return order; - const nextOffset = velocity > 0 ? 1 : -1; - const nextItem = order[index + nextOffset]; - if (!nextItem) - return order; - const item = order[index]; - const nextLayout = nextItem.layout; - const nextItemCenter = mixNumber$1(nextLayout.min, nextLayout.max, 0.5); - if ((nextOffset === 1 && item.layout.max + offset > nextItemCenter) || - (nextOffset === -1 && item.layout.min + offset < nextItemCenter)) { - return moveItem(order, index, index + nextOffset); - } - return order; - } - - function ReorderGroupComponent({ children, as = "ul", axis = "y", onReorder, values, ...props }, externalRef) { - const Component = useConstant(() => motion[as]); - const order = []; - const isReordering = React$1.useRef(false); - const groupRef = React$1.useRef(null); - exports.invariant(Boolean(values), "Reorder.Group must be provided a values prop", "reorder-values"); - const context = { - axis, - groupRef, - registerItem: (value, layout) => { - // If the entry was already added, update it rather than adding it again - const idx = order.findIndex((entry) => value === entry.value); - if (idx !== -1) { - order[idx].layout = layout[axis]; - } - else { - order.push({ value: value, layout: layout[axis] }); - } - order.sort(compareMin); - }, - updateOrder: (item, offset, velocity) => { - if (isReordering.current) - return; - const newOrder = checkReorder(order, item, offset, velocity); - if (order !== newOrder) { - isReordering.current = true; - // Find which two values swapped and apply that swap - // to the full values array. This preserves unmeasured - // items (e.g. in virtualized lists). - const newValues = [...values]; - for (let i = 0; i < newOrder.length; i++) { - if (order[i].value !== newOrder[i].value) { - const a = values.indexOf(order[i].value); - const b = values.indexOf(newOrder[i].value); - if (a !== -1 && b !== -1) { - [newValues[a], newValues[b]] = [newValues[b], newValues[a]]; - } - break; - } - } - onReorder(newValues); - } - }, - }; - React$1.useEffect(() => { - isReordering.current = false; - }); - // Combine refs if external ref is provided - const setRef = (element) => { - groupRef.current = element; - if (typeof externalRef === "function") { - externalRef(element); - } - else if (externalRef) { - externalRef.current = element; - } - }; - /** - * Disable browser scroll anchoring on the group container. - * When items reorder, scroll anchoring can cause the browser to adjust - * the scroll position, which interferes with drag position calculations. - */ - const groupStyle = { - overflowAnchor: "none", - ...props.style, - }; - return (jsx(Component, { ...props, style: groupStyle, ref: setRef, ignoreStrict: true, children: jsx(ReorderContext.Provider, { value: context, children: children }) })); - } - const ReorderGroup = /*@__PURE__*/ React$1.forwardRef(ReorderGroupComponent); - function compareMin(a, b) { - return a.layout.min - b.layout.min; - } - - /** - * Creates a `MotionValue` to track the state and velocity of a value. - * - * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop. - * - * ```jsx - * export const MyComponent = () => { - * const scale = useMotionValue(1) - * - * return - * } - * ``` - * - * @param initial - The initial state. - * - * @public - */ - function useMotionValue(initial) { - const value = useConstant(() => motionValue(initial)); - /** - * If this motion value is being used in static mode, like on - * the Framer canvas, force components to rerender when the motion - * value is updated. - */ - const { isStatic } = React$1.useContext(MotionConfigContext); - if (isStatic) { - const [, setLatest] = React$1.useState(initial); - React$1.useEffect(() => value.on("change", setLatest), []); - } - return value; - } - - function useCombineMotionValues(values, combineValues) { - /** - * Initialise the returned motion value. This remains the same between renders. - */ - const value = useMotionValue(combineValues()); - /** - * Create a function that will update the template motion value with the latest values. - * This is pre-bound so whenever a motion value updates it can schedule its - * execution in Framesync. If it's already been scheduled it won't be fired twice - * in a single frame. - */ - const updateValue = () => value.set(combineValues()); - /** - * Synchronously update the motion value with the latest values during the render. - * This ensures that within a React render, the styles applied to the DOM are up-to-date. - */ - updateValue(); - /** - * Subscribe to all motion values found within the template. Whenever any of them change, - * schedule an update. - */ - useIsomorphicLayoutEffect(() => { - const scheduleUpdate = () => frame.preRender(updateValue, false, true); - const subscriptions = values.map((v) => v.on("change", scheduleUpdate)); - return () => { - subscriptions.forEach((unsubscribe) => unsubscribe()); - cancelFrame(updateValue); - }; - }); - return value; - } - - function useComputed(compute) { - /** - * Open session of collectMotionValues. Any MotionValue that calls get() - * will be saved into this array. - */ - collectMotionValues.current = []; - compute(); - const value = useCombineMotionValues(collectMotionValues.current, compute); - /** - * Synchronously close session of collectMotionValues. - */ - collectMotionValues.current = undefined; - return value; - } - - function useTransform(input, inputRangeOrTransformer, outputRangeOrMap, options) { - if (typeof input === "function") { - return useComputed(input); - } - /** - * Detect if outputRangeOrMap is an output map (object with keys) - * rather than an output range (array). - */ - const isOutputMap = outputRangeOrMap !== undefined && - !Array.isArray(outputRangeOrMap) && - typeof inputRangeOrTransformer !== "function"; - if (isOutputMap) { - return useMapTransform(input, inputRangeOrTransformer, outputRangeOrMap, options); - } - const outputRange = outputRangeOrMap; - const transformer = typeof inputRangeOrTransformer === "function" - ? inputRangeOrTransformer - : transform(inputRangeOrTransformer, outputRange, options); - const result = Array.isArray(input) - ? useListTransform(input, transformer) - : useListTransform([input], ([latest]) => transformer(latest)); - const inputAccelerate = !Array.isArray(input) - ? input.accelerate - : undefined; - if (inputAccelerate && - !inputAccelerate.isTransformed && - typeof inputRangeOrTransformer !== "function" && - Array.isArray(outputRangeOrMap) && - options?.clamp !== false) { - result.accelerate = { - ...inputAccelerate, - times: inputRangeOrTransformer, - keyframes: outputRangeOrMap, - isTransformed: true, - ...(options?.ease ? { ease: options.ease } : {}), - }; - } - return result; - } - function useListTransform(values, transformer) { - const latest = useConstant(() => []); - return useCombineMotionValues(values, () => { - latest.length = 0; - const numValues = values.length; - for (let i = 0; i < numValues; i++) { - latest[i] = values[i].get(); - } - return transformer(latest); - }); - } - function useMapTransform(inputValue, inputRange, outputMap, options) { - /** - * Capture keys once to ensure hooks are called in consistent order. - */ - const keys = useConstant(() => Object.keys(outputMap)); - const output = useConstant(() => ({})); - for (const key of keys) { - output[key] = useTransform(inputValue, inputRange, outputMap[key], options); - } - return output; - } - - const threshold = 50; - const maxSpeed = 25; - const overflowStyles = new Set(["auto", "scroll"]); - // Track initial scroll limits per scrollable element (Bug 1 fix) - const initialScrollLimits = new WeakMap(); - const activeScrollEdge = new WeakMap(); - // Track which group element is currently dragging to clear state on end - let currentGroupElement = null; - function resetAutoScrollState() { - if (currentGroupElement) { - const scrollableAncestor = findScrollableAncestor(currentGroupElement, "y"); - if (scrollableAncestor) { - activeScrollEdge.delete(scrollableAncestor); - initialScrollLimits.delete(scrollableAncestor); - } - // Also try x axis - const scrollableAncestorX = findScrollableAncestor(currentGroupElement, "x"); - if (scrollableAncestorX && scrollableAncestorX !== scrollableAncestor) { - activeScrollEdge.delete(scrollableAncestorX); - initialScrollLimits.delete(scrollableAncestorX); - } - currentGroupElement = null; - } - } - function isScrollableElement(element, axis) { - const style = getComputedStyle(element); - const overflow = axis === "x" ? style.overflowX : style.overflowY; - const isDocumentScroll = element === document.body || - element === document.documentElement; - return overflowStyles.has(overflow) || isDocumentScroll; - } - function findScrollableAncestor(element, axis) { - let current = element?.parentElement; - while (current) { - if (isScrollableElement(current, axis)) { - return current; - } - current = current.parentElement; - } - return null; - } - function getScrollAmount(pointerPosition, scrollElement, axis) { - const rect = scrollElement.getBoundingClientRect(); - const start = axis === "x" ? Math.max(0, rect.left) : Math.max(0, rect.top); - const end = axis === "x" ? Math.min(window.innerWidth, rect.right) : Math.min(window.innerHeight, rect.bottom); - const distanceFromStart = pointerPosition - start; - const distanceFromEnd = end - pointerPosition; - if (distanceFromStart < threshold) { - const intensity = 1 - distanceFromStart / threshold; - return { amount: -maxSpeed * intensity * intensity, edge: "start" }; - } - else if (distanceFromEnd < threshold) { - const intensity = 1 - distanceFromEnd / threshold; - return { amount: maxSpeed * intensity * intensity, edge: "end" }; - } - return { amount: 0, edge: null }; - } - function autoScrollIfNeeded(groupElement, pointerPosition, axis, velocity) { - if (!groupElement) - return; - // Track the group element for cleanup - currentGroupElement = groupElement; - const scrollableAncestor = findScrollableAncestor(groupElement, axis); - if (!scrollableAncestor) - return; - // Convert pointer position from page coordinates to viewport coordinates. - // The gesture system uses pageX/pageY but getBoundingClientRect() returns - // viewport-relative coordinates, so we need to account for page scroll. - const viewportPointerPosition = pointerPosition - (axis === "x" ? window.scrollX : window.scrollY); - const { amount: scrollAmount, edge } = getScrollAmount(viewportPointerPosition, scrollableAncestor, axis); - // If not in any threshold zone, clear all state - if (edge === null) { - activeScrollEdge.delete(scrollableAncestor); - initialScrollLimits.delete(scrollableAncestor); - return; - } - const currentActiveEdge = activeScrollEdge.get(scrollableAncestor); - const isDocumentScroll = scrollableAncestor === document.body || - scrollableAncestor === document.documentElement; - // If not currently scrolling this edge, check velocity to see if we should start - if (currentActiveEdge !== edge) { - // Only start scrolling if velocity is towards the edge - const shouldStart = (edge === "start" && velocity < 0) || - (edge === "end" && velocity > 0); - if (!shouldStart) - return; - // Activate this edge - activeScrollEdge.set(scrollableAncestor, edge); - // Record initial scroll limit (prevents infinite scroll) - const maxScroll = axis === "x" - ? scrollableAncestor.scrollWidth - (isDocumentScroll ? window.innerWidth : scrollableAncestor.clientWidth) - : scrollableAncestor.scrollHeight - (isDocumentScroll ? window.innerHeight : scrollableAncestor.clientHeight); - initialScrollLimits.set(scrollableAncestor, maxScroll); - } - // Cap scrolling at initial limit (prevents infinite scroll) - if (scrollAmount > 0) { - const initialLimit = initialScrollLimits.get(scrollableAncestor); - const currentScroll = axis === "x" - ? (isDocumentScroll ? window.scrollX : scrollableAncestor.scrollLeft) - : (isDocumentScroll ? window.scrollY : scrollableAncestor.scrollTop); - if (currentScroll >= initialLimit) - return; - } - // Apply scroll - if (axis === "x") { - if (isDocumentScroll) { - window.scrollBy({ left: scrollAmount }); - } - else { - scrollableAncestor.scrollLeft += scrollAmount; - } - } - else { - if (isDocumentScroll) { - window.scrollBy({ top: scrollAmount }); - } - else { - scrollableAncestor.scrollTop += scrollAmount; - } - } - } - - function useDefaultMotionValue(value, defaultValue = 0) { - return isMotionValue(value) ? value : useMotionValue(defaultValue); - } - function ReorderItemComponent({ children, style = {}, value, as = "li", onDrag, onDragEnd, layout = true, ...props }, externalRef) { - const Component = useConstant(() => motion[as]); - const context = React$1.useContext(ReorderContext); - const point = { - x: useDefaultMotionValue(style.x), - y: useDefaultMotionValue(style.y), - }; - const zIndex = useTransform([point.x, point.y], ([latestX, latestY]) => latestX || latestY ? 1 : "unset"); - exports.invariant(Boolean(context), "Reorder.Item must be a child of Reorder.Group", "reorder-item-child"); - const { axis, registerItem, updateOrder, groupRef } = context; - return (jsx(Component, { drag: axis, ...props, dragSnapToOrigin: true, style: { ...style, x: point.x, y: point.y, zIndex }, layout: layout, onDrag: (event, gesturePoint) => { - const { velocity, point: pointerPoint } = gesturePoint; - const offset = point[axis].get(); - // Always attempt to update order - checkReorder handles the logic - updateOrder(value, offset, velocity[axis]); - autoScrollIfNeeded(groupRef.current, pointerPoint[axis], axis, velocity[axis]); - onDrag && onDrag(event, gesturePoint); - }, onDragEnd: (event, gesturePoint) => { - resetAutoScrollState(); - onDragEnd && onDragEnd(event, gesturePoint); - }, onLayoutMeasure: (measured) => { - registerItem(value, measured); - }, ref: externalRef, ignoreStrict: true, children: children })); - } - const ReorderItem = /*@__PURE__*/ React$1.forwardRef(ReorderItemComponent); - - var namespace = /*#__PURE__*/Object.freeze({ - __proto__: null, - Group: ReorderGroup, - Item: ReorderItem - }); - - function isDOMKeyframes(keyframes) { - return typeof keyframes === "object" && !Array.isArray(keyframes); - } - - function resolveSubjects(subject, keyframes, scope, selectorCache) { - if (subject == null) { - return []; - } - if (typeof subject === "string" && isDOMKeyframes(keyframes)) { - return resolveElements(subject, scope, selectorCache); - } - else if (subject instanceof NodeList) { - return Array.from(subject); - } - else if (Array.isArray(subject)) { - return subject.filter((s) => s != null); - } - else { - return [subject]; - } - } - - function calculateRepeatDuration(duration, repeat, repeatDelay) { - return duration * (repeat + 1) + repeatDelay * repeat; - } - - /** - * Given a absolute or relative time definition and current/prev time state of the sequence, - * calculate an absolute time for the next keyframes. - */ - function calcNextTime(current, next, prev, labels) { - if (typeof next === "number") { - return next; - } - else if (next.startsWith("-") || next.startsWith("+")) { - return Math.max(0, current + parseFloat(next)); - } - else if (next === "<") { - return prev; - } - else if (next.startsWith("<")) { - return Math.max(0, prev + parseFloat(next.slice(1))); - } - else { - return labels.get(next) ?? current; - } - } - - function eraseKeyframes(sequence, startTime, endTime) { - for (let i = 0; i < sequence.length; i++) { - const keyframe = sequence[i]; - if (keyframe.at > startTime && keyframe.at < endTime) { - removeItem(sequence, keyframe); - // If we remove this item we have to push the pointer back one - i--; - } - } - } - function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) { - /** - * Erase every existing value between currentTime and targetTime, - * this will essentially splice this timeline into any currently - * defined ones. - */ - eraseKeyframes(sequence, startTime, endTime); - for (let i = 0; i < keyframes.length; i++) { - sequence.push({ - value: keyframes[i], - at: mixNumber$1(startTime, endTime, offset[i]), - easing: getEasingForSegment(easing, i), - }); - } - } - - /** - * Take an array of times that represent repeated keyframes. For instance - * if we have original times of [0, 0.5, 1] then our repeated times will - * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back - * down to a 0-1 scale. - * - * `repeatDelayUnits` is the repeatDelay expressed in units of a single - * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`. - */ - function normalizeTimes(times, repeat, repeatDelayUnits = 0) { - const totalUnits = repeat + 1 + repeat * repeatDelayUnits; - for (let i = 0; i < times.length; i++) { - times[i] = times[i] / totalUnits; - } - } - - function compareByTime(a, b) { - if (a.at === b.at) { - if (a.value === null) - return 1; - if (b.value === null) - return -1; - return 0; - } - else { - return a.at - b.at; - } - } - - const defaultSegmentEasing = "easeInOut"; - const MAX_REPEAT = 20; - function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) { - const defaultDuration = defaultTransition.duration || 0.3; - const animationDefinitions = new Map(); - const sequences = new Map(); - const elementCache = {}; - const timeLabels = new Map(); - let prevTime = 0; - let currentTime = 0; - let totalDuration = 0; - /** - * Build the timeline by mapping over the sequence array and converting - * the definitions into keyframes and offsets with absolute time values. - * These will later get converted into relative offsets in a second pass. - */ - for (let i = 0; i < sequence.length; i++) { - const segment = sequence[i]; - /** - * If this is a timeline label, mark it and skip the rest of this iteration. - */ - if (typeof segment === "string") { - timeLabels.set(segment, currentTime); - continue; - } - else if (!Array.isArray(segment)) { - timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels)); - continue; - } - let [subject, keyframes, transition = {}] = segment; - /** - * If a relative or absolute time value has been specified we need to resolve - * it in relation to the currentTime. - */ - if (transition.at !== undefined) { - currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels); - } - /** - * Keep track of the maximum duration in this definition. This will be - * applied to currentTime once the definition has been parsed. - */ - let maxDuration = 0; - const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => { - const valueKeyframesAsList = keyframesAsList(valueKeyframes); - const { delay = 0, times = defaultOffset$1(valueKeyframesAsList), type = defaultTransition.type || "keyframes", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition; - let { ease = defaultTransition.ease || "easeOut", duration } = valueTransition; - /** - * Resolve stagger() if defined. - */ - const calculatedDelay = typeof delay === "function" - ? delay(elementIndex, numSubjects) - : delay; - /** - * If this animation should and can use a spring, generate a spring easing function. - */ - const numKeyframes = valueKeyframesAsList.length; - const createGenerator = isGenerator(type) - ? type - : generators?.[type || "keyframes"]; - if (numKeyframes <= 2 && createGenerator) { - /** - * As we're creating an easing function from a spring, - * ideally we want to generate it using the real distance - * between the two keyframes. However this isn't always - * possible - in these situations we use 0-100. - */ - let absoluteDelta = 100; - if (numKeyframes === 2 && - isNumberKeyframesArray(valueKeyframesAsList)) { - const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0]; - absoluteDelta = Math.abs(delta); - } - const springTransition = { - ...defaultTransition, - ...remainingTransition, - }; - if (duration !== undefined) { - springTransition.duration = secondsToMilliseconds(duration); - } - const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator); - ease = springEasing.ease; - duration = springEasing.duration; - } - duration ?? (duration = defaultDuration); - const startTime = currentTime + calculatedDelay; - /** - * If there's only one time offset of 0, fill in a second with length 1 - */ - if (times.length === 1 && times[0] === 0) { - times[1] = 1; - } - /** - * Fill out if offset if fewer offsets than keyframes - */ - const remainder = times.length - valueKeyframesAsList.length; - remainder > 0 && fillOffset(times, remainder); - /** - * If only one value has been set, ie [1], push a null to the start of - * the keyframe array. This will let us mark a keyframe at this point - * that will later be hydrated with the previous value. - */ - valueKeyframesAsList.length === 1 && - valueKeyframesAsList.unshift(null); - /** - * Segments can't express `repeat: Infinity` or very large - * counts — they'd leave dead time after the segment or - * explode the keyframe array. Ignore with a warning. - */ - if (repeat) { - exports.warning(repeat < MAX_REPEAT, `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`); - } - if (repeat && repeat < MAX_REPEAT) { - /** - * Express repeatDelay in units of a single iteration's duration - * so it can be added to the per-iteration time offsets below - * before they're normalized to 0-1. - */ - const repeatDelayUnits = duration > 0 ? repeatDelay / duration : 0; - duration = calculateRepeatDuration(duration, repeat, repeatDelay); - const originalKeyframes = [...valueKeyframesAsList]; - const originalTimes = [...times]; - ease = Array.isArray(ease) ? [...ease] : [ease]; - const originalEase = [...ease]; - /** - * For reverse/mirror, alternate iterations play the segment - * backwards. mirror matches JSAnimation's mirroredGenerator: - * reversed keyframes, easings unchanged. reverse matches - * JSAnimation's iterationProgress = 1 - p: reversed - * keyframes, easing array reversed AND each function easing - * mapped through reverseEasing (string easings unchanged — - * they're resolved later by the keyframes engine). - */ - const isFlipping = repeatType === "reverse" || repeatType === "mirror"; - let flippedKeyframes = originalKeyframes; - let flippedEases = originalEase; - if (isFlipping) { - flippedKeyframes = [...originalKeyframes].reverse(); - if (repeatType === "reverse") { - flippedEases = [...originalEase] - .reverse() - .map((e) => typeof e === "function" - ? reverseEasing(e) - : e); - } - } - for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) { - const isFlipped = isFlipping && repeatIndex % 2 === 0; - const iterKeyframes = isFlipped - ? flippedKeyframes - : originalKeyframes; - const iterEase = isFlipped ? flippedEases : originalEase; - const iterStartOffset = (repeatIndex + 1) * (1 + repeatDelayUnits); - /** - * If repeatDelay is set, hold the previous iteration's - * final value through the delay by inserting a keyframe - * at the moment the next iteration begins. - */ - if (repeatDelayUnits > 0) { - valueKeyframesAsList.push(valueKeyframesAsList[valueKeyframesAsList.length - 1]); - times.push(iterStartOffset); - ease.push("linear"); - } - valueKeyframesAsList.push(...iterKeyframes); - for (let keyframeIndex = 0; keyframeIndex < iterKeyframes.length; keyframeIndex++) { - times.push(originalTimes[keyframeIndex] + iterStartOffset); - ease.push(keyframeIndex === 0 - ? "linear" - : getEasingForSegment(iterEase, keyframeIndex - 1)); - } - } - normalizeTimes(times, repeat, repeatDelayUnits); - } - const targetTime = startTime + duration; - /** - * Add keyframes, mapping offsets to absolute time. - */ - addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime); - maxDuration = Math.max(calculatedDelay + duration, maxDuration); - totalDuration = Math.max(targetTime, totalDuration); - }; - if (isMotionValue(subject)) { - const subjectSequence = getSubjectSequence(subject, sequences); - resolveValueSequence(keyframes, transition, getValueSequence("default", subjectSequence)); - } - else { - const subjects = resolveSubjects(subject, keyframes, scope, elementCache); - const numSubjects = subjects.length; - /** - * For every element in this segment, process the defined values. - */ - for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) { - /** - * Cast necessary, but we know these are of this type - */ - keyframes = keyframes; - transition = transition; - const thisSubject = subjects[subjectIndex]; - const subjectSequence = getSubjectSequence(thisSubject, sequences); - for (const key in keyframes) { - resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects); - } - } - } - prevTime = currentTime; - currentTime += maxDuration; - } - /** - * For every element and value combination create a new animation. - */ - sequences.forEach((valueSequences, element) => { - for (const key in valueSequences) { - const valueSequence = valueSequences[key]; - /** - * Arrange all the keyframes in ascending time order. - */ - valueSequence.sort(compareByTime); - const keyframes = []; - const valueOffset = []; - const valueEasing = []; - /** - * For each keyframe, translate absolute times into - * relative offsets based on the total duration of the timeline. - */ - for (let i = 0; i < valueSequence.length; i++) { - const { at, value, easing } = valueSequence[i]; - keyframes.push(value); - valueOffset.push(progress(0, totalDuration, at)); - valueEasing.push(easing || "easeOut"); - } - /** - * If the first keyframe doesn't land on offset: 0 - * provide one by duplicating the initial keyframe. This ensures - * it snaps to the first keyframe when the animation starts. - */ - if (valueOffset[0] !== 0) { - valueOffset.unshift(0); - keyframes.unshift(keyframes[0]); - valueEasing.unshift(defaultSegmentEasing); - } - /** - * If the last keyframe doesn't land on offset: 1 - * provide one with a null wildcard value. This will ensure it - * stays static until the end of the animation. - */ - if (valueOffset[valueOffset.length - 1] !== 1) { - valueOffset.push(1); - keyframes.push(null); - } - if (!animationDefinitions.has(element)) { - animationDefinitions.set(element, { - keyframes: {}, - transition: {}, - }); - } - const definition = animationDefinitions.get(element); - definition.keyframes[key] = keyframes; - /** - * Exclude `type` from defaultTransition since springs have been - * converted to duration-based easing functions in resolveValueSequence. - * Including `type: "spring"` would cause JSAnimation to error when - * the merged keyframes array has more than 2 keyframes. - */ - const { type: _type, ...remainingDefaultTransition } = defaultTransition; - definition.transition[key] = { - ...remainingDefaultTransition, - duration: totalDuration, - ease: valueEasing, - times: valueOffset, - ...sequenceTransition, - }; - } - }); - return animationDefinitions; - } - function getSubjectSequence(subject, sequences) { - !sequences.has(subject) && sequences.set(subject, {}); - return sequences.get(subject); - } - function getValueSequence(name, sequences) { - if (!sequences[name]) - sequences[name] = []; - return sequences[name]; - } - function keyframesAsList(keyframes) { - return Array.isArray(keyframes) ? keyframes : [keyframes]; - } - function getValueTransition(transition, key) { - return transition && transition[key] - ? { - ...transition, - ...transition[key], - } - : { ...transition }; - } - const isNumber = (keyframe) => typeof keyframe === "number"; - const isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber); - - function createDOMVisualElement(element) { - const options = { - presenceContext: null, - props: {}, - visualState: { - renderState: { - transform: {}, - transformOrigin: {}, - style: {}, - vars: {}, - attrs: {}, - }, - latestValues: {}, - }, - }; - const node = isSVGElement(element) && !isSVGSVGElement(element) - ? new SVGVisualElement(options) - : new HTMLVisualElement(options); - node.mount(element); - visualElementStore.set(element, node); - } - function createObjectVisualElement(subject) { - const options = { - presenceContext: null, - props: {}, - visualState: { - renderState: { - output: {}, - }, - latestValues: {}, - }, - }; - const node = new ObjectVisualElement(options); - node.mount(subject); - visualElementStore.set(subject, node); - } - - function isSingleValue(subject, keyframes) { - return (isMotionValue(subject) || - typeof subject === "number" || - (typeof subject === "string" && !isDOMKeyframes(keyframes))); - } - /** - * Implementation - */ - function animateSubject(subject, keyframes, options, scope) { - const animations = []; - if (isSingleValue(subject, keyframes)) { - animations.push(animateSingleValue(subject, isDOMKeyframes(keyframes) - ? keyframes.default || keyframes - : keyframes, options ? options.default || options : options)); - } - else { - // Gracefully handle null/undefined subjects (e.g., from querySelector returning null) - if (subject == null) { - return animations; - } - const subjects = resolveSubjects(subject, keyframes, scope); - const numSubjects = subjects.length; - exports.invariant(Boolean(numSubjects), "No valid elements provided.", "no-valid-elements"); - for (let i = 0; i < numSubjects; i++) { - const thisSubject = subjects[i]; - const createVisualElement = thisSubject instanceof Element - ? createDOMVisualElement - : createObjectVisualElement; - if (!visualElementStore.has(thisSubject)) { - createVisualElement(thisSubject); - } - const visualElement = visualElementStore.get(thisSubject); - const transition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if ("delay" in transition && - typeof transition.delay === "function") { - transition.delay = transition.delay(i, numSubjects); - } - animations.push(...animateTarget(visualElement, { ...keyframes, transition }, {})); - } - } - return animations; - } - - function animateSequence(sequence, options, scope) { - const animations = []; - /** - * Pre-process: replace function segments with MotionValue segments, - * subscribe callbacks immediately - */ - const processedSequence = sequence.map((segment) => { - if (Array.isArray(segment) && typeof segment[0] === "function") { - const callback = segment[0]; - const mv = motionValue(0); - mv.on("change", callback); - if (segment.length === 1) { - return [mv, [0, 1]]; - } - else if (segment.length === 2) { - return [mv, [0, 1], segment[1]]; - } - else { - return [mv, segment[1], segment[2]]; - } - } - return segment; - }); - const animationDefinitions = createAnimationsFromSequence(processedSequence, options, scope, { spring }); - animationDefinitions.forEach(({ keyframes, transition }, subject) => { - animations.push(...animateSubject(subject, keyframes, transition)); - }); - return animations; - } - - function isSequence(value) { - return Array.isArray(value) && value.some(Array.isArray); - } - /** - * Creates an animation function that is optionally scoped - * to a specific element. - */ - function createScopedAnimate(options = {}) { - const { scope, reduceMotion, skipAnimations } = options; - /** - * Implementation - */ - function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) { - let animations = []; - let animationOnComplete; - const inherited = {}; - if (reduceMotion !== undefined) - inherited.reduceMotion = reduceMotion; - if (skipAnimations !== undefined) - inherited.skipAnimations = skipAnimations; - if (isSequence(subjectOrSequence)) { - const { onComplete, ...sequenceOptions } = optionsOrKeyframes || {}; - if (typeof onComplete === "function") { - animationOnComplete = onComplete; - } - animations = animateSequence(subjectOrSequence, { ...inherited, ...sequenceOptions }, scope); - } - else { - // Extract top-level onComplete so it doesn't get applied per-value - const { onComplete, ...rest } = options || {}; - if (typeof onComplete === "function") { - animationOnComplete = onComplete; - } - animations = animateSubject(subjectOrSequence, optionsOrKeyframes, { ...inherited, ...rest }, scope); - } - const animation = new GroupAnimationWithThen(animations); - if (animationOnComplete) { - animation.finished.then(animationOnComplete); - } - if (scope) { - scope.animations.push(animation); - animation.finished.then(() => { - removeItem(scope.animations, animation); - }); - } - return animation; - } - return scopedAnimate; - } - const animate = createScopedAnimate(); - - function animateElements(elementOrSelector, keyframes, options, scope) { - // Gracefully handle null/undefined elements (e.g., from querySelector returning null) - if (elementOrSelector == null) { - return []; - } - const elements = resolveElements(elementOrSelector, scope); - const numElements = elements.length; - exports.invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements"); - /** - * WAAPI doesn't support interrupting animations. - * - * Therefore, starting animations requires a three-step process: - * 1. Stop existing animations (write styles to DOM) - * 2. Resolve keyframes (read styles from DOM) - * 3. Create new animations (write styles to DOM) - * - * The hybrid `animate()` function uses AsyncAnimation to resolve - * keyframes before creating new animations, which removes style - * thrashing. Here, we have much stricter filesize constraints. - * Therefore we do this in a synchronous way that ensures that - * at least within `animate()` calls there is no style thrashing. - * - * In the motion-native-animate-mini-interrupt benchmark this - * was 80% faster than a single loop. - */ - const animationDefinitions = []; - /** - * Step 1: Build options and stop existing animations (write) - */ - for (let i = 0; i < numElements; i++) { - const element = elements[i]; - const elementTransition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if (typeof elementTransition.delay === "function") { - elementTransition.delay = elementTransition.delay(i, numElements); - } - for (const valueName in keyframes) { - let valueKeyframes = keyframes[valueName]; - if (!Array.isArray(valueKeyframes)) { - valueKeyframes = [valueKeyframes]; - } - const valueOptions = { - ...getValueTransition$1(elementTransition, valueName), - }; - valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay)); - /** - * If there's an existing animation playing on this element then stop it - * before creating a new one. - */ - const map = getAnimationMap(element); - const key = animationMapKey(valueName, valueOptions.pseudoElement || ""); - const currentAnimation = map.get(key); - currentAnimation && currentAnimation.stop(); - animationDefinitions.push({ - map, - key, - unresolvedKeyframes: valueKeyframes, - options: { - ...valueOptions, - element, - name: valueName, - allowFlatten: !elementTransition.type && !elementTransition.ease, - }, - }); - } - } - /** - * Step 2: Resolve keyframes (read) - */ - for (let i = 0; i < animationDefinitions.length; i++) { - const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i]; - const { element, name, pseudoElement } = animationOptions; - if (!pseudoElement && unresolvedKeyframes[0] === null) { - unresolvedKeyframes[0] = getComputedStyle$2(element, name); - } - fillWildcards(unresolvedKeyframes); - applyPxDefaults(unresolvedKeyframes, name); - /** - * If we only have one keyframe, explicitly read the initial keyframe - * from the computed style. This is to ensure consistency with WAAPI behaviour - * for restarting animations, for instance .play() after finish, when it - * has one vs two keyframes. - */ - if (!pseudoElement && unresolvedKeyframes.length < 2) { - unresolvedKeyframes.unshift(getComputedStyle$2(element, name)); - } - animationOptions.keyframes = unresolvedKeyframes; - } - /** - * Step 3: Create new animations (write) - */ - const animations = []; - for (let i = 0; i < animationDefinitions.length; i++) { - const { map, key, options: animationOptions } = animationDefinitions[i]; - const animation = new NativeAnimation(animationOptions); - map.set(key, animation); - animation.finished.finally(() => map.delete(key)); - animations.push(animation); - } - return animations; - } - - const createScopedWaapiAnimate = (scope) => { - function scopedAnimate(elementOrSelector, keyframes, options) { - return new GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope)); - } - return scopedAnimate; - }; - const animateMini = /*@__PURE__*/ createScopedWaapiAnimate(); - - function canUseNativeTimeline(target) { - if (typeof window === "undefined") - return false; - return target ? supportsViewTimeline() : supportsScrollTimeline(); - } - - /** - * A time in milliseconds, beyond which we consider the scroll velocity to be 0. - */ - const maxElapsed = 50; - const createAxisInfo = () => ({ - current: 0, - offset: [], - progress: 0, - scrollLength: 0, - targetOffset: 0, - targetLength: 0, - containerLength: 0, - velocity: 0, - }); - const createScrollInfo = () => ({ - time: 0, - x: createAxisInfo(), - y: createAxisInfo(), - }); - const keys = { - x: { - length: "Width", - position: "Left", - }, - y: { - length: "Height", - position: "Top", - }, - }; - function updateAxisInfo(element, axisName, info, time) { - const axis = info[axisName]; - const { length, position } = keys[axisName]; - const prev = axis.current; - const prevTime = info.time; - axis.current = Math.abs(element[`scroll${position}`]); - axis.scrollLength = element[`scroll${length}`] - element[`client${length}`]; - axis.offset.length = 0; - axis.offset[0] = 0; - axis.offset[1] = axis.scrollLength; - axis.progress = progress(0, axis.scrollLength, axis.current); - const elapsed = time - prevTime; - axis.velocity = - elapsed > maxElapsed - ? 0 - : velocityPerSecond(axis.current - prev, elapsed); - } - function updateScrollInfo(element, info, time) { - updateAxisInfo(element, "x", info, time); - updateAxisInfo(element, "y", info, time); - info.time = time; - } - - function calcInset(element, container) { - const inset = { x: 0, y: 0 }; - let current = element; - while (current && current !== container) { - if (isHTMLElement(current)) { - inset.x += current.offsetLeft; - inset.y += current.offsetTop; - current = current.offsetParent; - } - else if (current.tagName === "svg") { - /** - * This isn't an ideal approach to measuring the offset of tags. - * It would be preferable, given they behave like HTMLElements in most ways - * to use offsetLeft/Top. But these don't exist on . Likewise we - * can't use .getBBox() like most SVG elements as these provide the offset - * relative to the SVG itself, which for is usually 0x0. - */ - const svgBoundingBox = current.getBoundingClientRect(); - current = current.parentElement; - const parentBoundingBox = current.getBoundingClientRect(); - inset.x += svgBoundingBox.left - parentBoundingBox.left; - inset.y += svgBoundingBox.top - parentBoundingBox.top; - } - else if (current instanceof SVGGraphicsElement) { - const { x, y } = current.getBBox(); - inset.x += x; - inset.y += y; - let svg = null; - let parent = current.parentNode; - while (!svg) { - if (parent.tagName === "svg") { - svg = parent; - } - parent = current.parentNode; - } - current = svg; - } - else { - break; - } - } - return inset; - } - - const namedEdges = { - start: 0, - center: 0.5, - end: 1, - }; - function resolveEdge(edge, length, inset = 0) { - let delta = 0; - /** - * If we have this edge defined as a preset, replace the definition - * with the numerical value. - */ - if (edge in namedEdges) { - edge = namedEdges[edge]; - } - /** - * Handle unit values - */ - if (typeof edge === "string") { - const asNumber = parseFloat(edge); - if (edge.endsWith("px")) { - delta = asNumber; - } - else if (edge.endsWith("%")) { - edge = asNumber / 100; - } - else if (edge.endsWith("vw")) { - delta = (asNumber / 100) * document.documentElement.clientWidth; - } - else if (edge.endsWith("vh")) { - delta = (asNumber / 100) * document.documentElement.clientHeight; - } - else { - edge = asNumber; - } - } - /** - * If the edge is defined as a number, handle as a progress value. - */ - if (typeof edge === "number") { - delta = length * edge; - } - return inset + delta; - } - - const defaultOffset = [0, 0]; - function resolveOffset(offset, containerLength, targetLength, targetInset) { - let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset; - let targetPoint = 0; - let containerPoint = 0; - if (typeof offset === "number") { - /** - * If we're provided offset: [0, 0.5, 1] then each number x should become - * [x, x], so we default to the behaviour of mapping 0 => 0 of both target - * and container etc. - */ - offsetDefinition = [offset, offset]; - } - else if (typeof offset === "string") { - offset = offset.trim(); - if (offset.includes(" ")) { - offsetDefinition = offset.split(" "); - } - else { - /** - * If we're provided a definition like "100px" then we want to apply - * that only to the top of the target point, leaving the container at 0. - * Whereas a named offset like "end" should be applied to both. - */ - offsetDefinition = [offset, namedEdges[offset] ? offset : `0`]; - } - } - targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset); - containerPoint = resolveEdge(offsetDefinition[1], containerLength); - return targetPoint - containerPoint; - } - - const ScrollOffset = { - Enter: [ - [0, 1], - [1, 1], - ], - Exit: [ - [0, 0], - [1, 0], - ], - Any: [ - [1, 0], - [0, 1], - ], - All: [ - [0, 0], - [1, 1], - ], - }; - - const point = { x: 0, y: 0 }; - function getTargetSize(target) { - return "getBBox" in target && target.tagName !== "svg" - ? target.getBBox() - : { width: target.clientWidth, height: target.clientHeight }; - } - function resolveOffsets(container, info, options) { - const { offset: offsetDefinition = ScrollOffset.All } = options; - const { target = container, axis = "y" } = options; - const lengthLabel = axis === "y" ? "height" : "width"; - const inset = target !== container ? calcInset(target, container) : point; - /** - * Measure the target and container. If they're the same thing then we - * use the container's scrollWidth/Height as the target, from there - * all other calculations can remain the same. - */ - const targetSize = target === container - ? { width: container.scrollWidth, height: container.scrollHeight } - : getTargetSize(target); - const containerSize = { - width: container.clientWidth, - height: container.clientHeight, - }; - /** - * Reset the length of the resolved offset array rather than creating a new one. - * TODO: More reusable data structures for targetSize/containerSize would also be good. - */ - info[axis].offset.length = 0; - /** - * Populate the offset array by resolving the user's offset definition into - * a list of pixel scroll offets. - */ - let hasChanged = !info[axis].interpolate; - const numOffsets = offsetDefinition.length; - for (let i = 0; i < numOffsets; i++) { - const offset = resolveOffset(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]); - if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) { - hasChanged = true; - } - info[axis].offset[i] = offset; - } - /** - * If the pixel scroll offsets have changed, create a new interpolator function - * to map scroll value into a progress. - */ - if (hasChanged) { - info[axis].interpolate = interpolate(info[axis].offset, defaultOffset$1(offsetDefinition), { clamp: false }); - info[axis].interpolatorOffsets = [...info[axis].offset]; - } - info[axis].progress = clamp(0, 1, info[axis].interpolate(info[axis].current)); - } - - function measure(container, target = container, info) { - /** - * Find inset of target within scrollable container - */ - info.x.targetOffset = 0; - info.y.targetOffset = 0; - if (target !== container) { - let node = target; - while (node && node !== container) { - info.x.targetOffset += node.offsetLeft; - info.y.targetOffset += node.offsetTop; - node = node.offsetParent; - } - } - info.x.targetLength = - target === container ? target.scrollWidth : target.clientWidth; - info.y.targetLength = - target === container ? target.scrollHeight : target.clientHeight; - info.x.containerLength = container.clientWidth; - info.y.containerLength = container.clientHeight; - /** - * In development mode ensure scroll containers aren't position: static as this makes - * it difficult to measure their relative positions. The document scrolling element - * is exempt: offsetParent measurements naturally resolve relative to the document. - */ - { - if (container && - target && - target !== container && - container !== document.documentElement && - container !== document.scrollingElement && - container !== document.body) { - warnOnce(getComputedStyle(container).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly."); - } - } - } - function createOnScrollHandler(element, onScroll, info, options = {}) { - return { - measure: (time) => { - measure(element, options.target, info); - updateScrollInfo(element, info, time); - if (options.offset || options.target) { - resolveOffsets(element, info, options); - } - }, - notify: () => onScroll(info), - }; - } - - const scrollListeners = new WeakMap(); - const resizeListeners = new WeakMap(); - const onScrollHandlers = new WeakMap(); - const scrollSize = new WeakMap(); - const dimensionCheckProcesses = new WeakMap(); - const getEventTarget = (element) => element === document.scrollingElement ? window : element; - function scrollInfo(onScroll, { container = document.scrollingElement, trackContentSize = false, ...options } = {}) { - if (!container) - return noop$1; - let containerHandlers = onScrollHandlers.get(container); - /** - * Get the onScroll handlers for this container. - * If one isn't found, create a new one. - */ - if (!containerHandlers) { - containerHandlers = new Set(); - onScrollHandlers.set(container, containerHandlers); - } - /** - * Create a new onScroll handler for the provided callback. - */ - const info = createScrollInfo(); - const containerHandler = createOnScrollHandler(container, onScroll, info, options); - containerHandlers.add(containerHandler); - /** - * Check if there's a scroll event listener for this container. - * If not, create one. - */ - if (!scrollListeners.has(container)) { - const measureAll = () => { - for (const handler of containerHandlers) { - handler.measure(frameData.timestamp); - } - frame.preUpdate(notifyAll); - }; - const notifyAll = () => { - for (const handler of containerHandlers) { - handler.notify(); - } - }; - const listener = () => frame.read(measureAll); - scrollListeners.set(container, listener); - const target = getEventTarget(container); - window.addEventListener("resize", listener); - if (container !== document.documentElement) { - resizeListeners.set(container, resize(container, listener)); - } - target.addEventListener("scroll", listener); - listener(); - } - /** - * Enable content size tracking if requested and not already enabled. - */ - if (trackContentSize && !dimensionCheckProcesses.has(container)) { - const listener = scrollListeners.get(container); - // Store initial scroll dimensions (object is reused to avoid allocation) - const size = { - width: container.scrollWidth, - height: container.scrollHeight, - }; - scrollSize.set(container, size); - // Add frame-based scroll dimension checking to detect content changes - const checkScrollDimensions = () => { - const newWidth = container.scrollWidth; - const newHeight = container.scrollHeight; - if (size.width !== newWidth || size.height !== newHeight) { - listener(); - size.width = newWidth; - size.height = newHeight; - } - }; - // Schedule with keepAlive=true to run every frame - const dimensionCheckProcess = frame.read(checkScrollDimensions, true); - dimensionCheckProcesses.set(container, dimensionCheckProcess); - } - const listener = scrollListeners.get(container); - frame.read(listener, false, true); - return () => { - cancelFrame(listener); - /** - * Check if we even have any handlers for this container. - */ - const currentHandlers = onScrollHandlers.get(container); - if (!currentHandlers) - return; - currentHandlers.delete(containerHandler); - if (currentHandlers.size) - return; - /** - * If no more handlers, remove the scroll listener too. - */ - const scrollListener = scrollListeners.get(container); - scrollListeners.delete(container); - if (scrollListener) { - getEventTarget(container).removeEventListener("scroll", scrollListener); - resizeListeners.get(container)?.(); - window.removeEventListener("resize", scrollListener); - } - // Clean up scroll dimension checking - const dimensionCheckProcess = dimensionCheckProcesses.get(container); - if (dimensionCheckProcess) { - cancelFrame(dimensionCheckProcess); - dimensionCheckProcesses.delete(container); - } - scrollSize.delete(container); - }; - } - - /** - * Maps from ProgressIntersection pairs used by Motion's preset offsets to - * ViewTimeline named ranges. Returns undefined for unrecognised patterns, - * which signals the caller to fall back to JS-based scroll tracking. - */ - const presets = [ - [ScrollOffset.Enter, "entry"], - [ScrollOffset.Exit, "exit"], - [ScrollOffset.Any, "cover"], - [ScrollOffset.All, "contain"], - ]; - const stringToProgress = { - start: 0, - end: 1, - }; - function parseStringOffset(s) { - const parts = s.trim().split(/\s+/); - if (parts.length !== 2) - return undefined; - const a = stringToProgress[parts[0]]; - const b = stringToProgress[parts[1]]; - if (a === undefined || b === undefined) - return undefined; - return [a, b]; - } - function normaliseOffset(offset) { - if (offset.length !== 2) - return undefined; - const result = []; - for (const item of offset) { - if (Array.isArray(item)) { - result.push(item); - } - else if (typeof item === "string") { - const parsed = parseStringOffset(item); - if (!parsed) - return undefined; - result.push(parsed); - } - else { - return undefined; - } - } - return result; - } - function matchesPreset(offset, preset) { - const normalised = normaliseOffset(offset); - if (!normalised) - return false; - for (let i = 0; i < 2; i++) { - const o = normalised[i]; - const p = preset[i]; - if (o[0] !== p[0] || o[1] !== p[1]) - return false; - } - return true; - } - function offsetToViewTimelineRange(offset) { - if (!offset) { - return { rangeStart: "contain 0%", rangeEnd: "contain 100%" }; - } - for (const [preset, name] of presets) { - if (matchesPreset(offset, preset)) { - return { rangeStart: `${name} 0%`, rangeEnd: `${name} 100%` }; - } - } - return undefined; - } - - const timelineCache = new Map(); - function scrollTimelineFallback(options) { - const currentTime = { value: 0 }; - const cancel = scrollInfo((info) => { - currentTime.value = info[options.axis].progress * 100; - }, options); - return { currentTime, cancel }; - } - function getTimeline({ source, container, ...options }) { - const { axis } = options; - if (source) - container = source; - let containerCache = timelineCache.get(container); - if (!containerCache) { - containerCache = new Map(); - timelineCache.set(container, containerCache); - } - const targetKey = options.target ?? "self"; - let targetCache = containerCache.get(targetKey); - if (!targetCache) { - targetCache = {}; - containerCache.set(targetKey, targetCache); - } - const axisKey = axis + (options.offset ?? []).join(","); - if (!targetCache[axisKey]) { - if (options.target && canUseNativeTimeline(options.target)) { - const range = offsetToViewTimelineRange(options.offset); - if (range) { - targetCache[axisKey] = new ViewTimeline({ - subject: options.target, - axis, - }); - } - else { - targetCache[axisKey] = scrollTimelineFallback({ - container, - ...options, - }); - } - } - else if (canUseNativeTimeline()) { - targetCache[axisKey] = new ScrollTimeline({ - source: container, - axis, - }); - } - else { - targetCache[axisKey] = scrollTimelineFallback({ - container, - ...options, - }); - } - } - return targetCache[axisKey]; - } - - function attachToAnimation(animation, options) { - const timeline = getTimeline(options); - const range = options.target - ? offsetToViewTimelineRange(options.offset) - : undefined; - /** - * Use native timeline when: - * - No target: ScrollTimeline (existing behaviour) - * - Target with mappable offset: ViewTimeline with named range - * - Target with unmappable offset: fall back to JS observe - */ - const useNative = options.target - ? canUseNativeTimeline(options.target) && !!range - : canUseNativeTimeline(); - return animation.attachTimeline({ - timeline: useNative ? timeline : undefined, - ...(range && - useNative && { - rangeStart: range.rangeStart, - rangeEnd: range.rangeEnd, - }), - observe: (valueAnimation) => { - valueAnimation.pause(); - return observeTimeline((progress) => { - valueAnimation.time = - valueAnimation.iterationDuration * progress; - }, timeline); - }, - }); - } - - /** - * Currently, we only support element tracking with `scrollInfo`, though in - * the future we can also offer ViewTimeline support. - */ - function isElementTracking(options) { - return options && (options.target || options.offset); - } - - /** - * If the onScroll function has two arguments, it's expecting - * more specific information about the scroll from scrollInfo. - */ - function isOnScrollWithInfo(onScroll) { - return onScroll.length === 2; - } - function attachToFunction(onScroll, options) { - if (isOnScrollWithInfo(onScroll) || isElementTracking(options)) { - return scrollInfo((info) => { - onScroll(info[options.axis].progress, info); - }, options); - } - else { - return observeTimeline(onScroll, getTimeline(options)); - } - } - - function scroll(onScroll, { axis = "y", container = document.scrollingElement, ...options } = {}) { - if (!container) - return noop$1; - const optionsWithDefaults = { axis, container, ...options }; - return typeof onScroll === "function" - ? attachToFunction(onScroll, optionsWithDefaults) - : attachToAnimation(onScroll, optionsWithDefaults); - } - - const thresholds = { - some: 0, - all: 1, - }; - function inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = "some" } = {}) { - const elements = resolveElements(elementOrSelector); - const activeIntersections = new WeakMap(); - const onIntersectionChange = (entries) => { - entries.forEach((entry) => { - const onEnd = activeIntersections.get(entry.target); - /** - * If there's no change to the intersection, we don't need to - * do anything here. - */ - if (entry.isIntersecting === Boolean(onEnd)) - return; - if (entry.isIntersecting) { - const newOnEnd = onStart(entry.target, entry); - if (typeof newOnEnd === "function") { - activeIntersections.set(entry.target, newOnEnd); - } - else { - observer.unobserve(entry.target); - } - } - else if (typeof onEnd === "function") { - onEnd(entry); - activeIntersections.delete(entry.target); - } - }); - }; - const observer = new IntersectionObserver(onIntersectionChange, { - root, - rootMargin, - threshold: typeof amount === "number" ? amount : thresholds[amount], - }); - elements.forEach((element) => observer.observe(element)); - return () => observer.disconnect(); - } - - const m = /*@__PURE__*/ createMotionProxy(); - - function useUnmountEffect(callback) { - return React$1.useEffect(() => () => callback(), []); - } - - /** - * @public - */ - const domAnimation = { - renderer: createDomVisualElement, - ...animations, - ...gestureAnimations, - }; - - /** - * @public - */ - const domMax = { - ...domAnimation, - ...drag, - ...layout, - }; - - /** - * @public - */ - const domMin = { - renderer: createDomVisualElement, - ...animations, - }; - - function useMotionValueEvent(value, event, callback) { - /** - * useInsertionEffect will create subscriptions before any other - * effects will run. Effects run upwards through the tree so it - * can be that binding a useLayoutEffect higher up the tree can - * miss changes from lower down the tree. - */ - React$1.useInsertionEffect(() => value.on(event, callback), [value, event, callback]); - } - - const createScrollMotionValues = () => ({ - scrollX: motionValue(0), - scrollY: motionValue(0), - scrollXProgress: motionValue(0), - scrollYProgress: motionValue(0), - }); - const isRefPending = (ref) => { - if (!ref) - return false; - return !ref.current; - }; - function makeAccelerateConfig(axis, options, container, target) { - return { - // Refs attach child-first; defer so target.current is populated - // before scroll() reads it. - factory: (animation) => { - let cleanup; - const start = () => { - // A provided ref may be hydrated by an effect declared after - // useScroll (or in a parent). Don't attach to the window - // scroll in the meantime — that result gets cached and would - // permanently mistrack. Wait until the ref resolves. - if (isRefPending(container) || isRefPending(target)) { - microtask.read(start); - return; - } - cleanup = scroll(animation, { - ...options, - axis, - container: container?.current || undefined, - target: target?.current || undefined, - }); - }; - microtask.read(start); - return () => { - cancelMicrotask(start); - cleanup?.(); - }; - }, - times: [0, 1], - keyframes: [0, 1], - ease: (v) => v, - duration: 1, - }; - } - function canAccelerateScroll(target, offset) { - if (typeof window === "undefined") - return false; - return target - ? supportsViewTimeline() && !!offsetToViewTimelineRange(offset) - : supportsScrollTimeline(); - } - function useScroll({ container, target, ...options } = {}) { - const values = useConstant(createScrollMotionValues); - if (canAccelerateScroll(target, options.offset)) { - values.scrollXProgress.accelerate = makeAccelerateConfig("x", options, container, target); - values.scrollYProgress.accelerate = makeAccelerateConfig("y", options, container, target); - } - const scrollAnimation = React$1.useRef(null); - const needsStart = React$1.useRef(false); - const start = React$1.useCallback(() => { - scrollAnimation.current = scroll((_progress, { x, y, }) => { - values.scrollX.set(x.current); - values.scrollXProgress.set(x.progress); - values.scrollY.set(y.current); - values.scrollYProgress.set(y.progress); - }, { - ...options, - container: container?.current || undefined, - target: target?.current || undefined, - }); - return () => { - scrollAnimation.current?.(); - }; - }, [container, target, JSON.stringify(options.offset)]); - useIsomorphicLayoutEffect(() => { - needsStart.current = false; - if (isRefPending(container) || isRefPending(target)) { - needsStart.current = true; - return; - } - else { - return start(); - } - }, [start]); - React$1.useEffect(() => { - if (!needsStart.current) - return; - // Defer to a microtask so any sibling/parent effect that hydrates the - // ref has a chance to run first. - let cleanup; - const tryStart = () => { - const containerPending = isRefPending(container); - const targetPending = isRefPending(target); - exports.invariant(!containerPending, "Container ref is defined but not hydrated", "use-scroll-ref"); - exports.invariant(!targetPending, "Target ref is defined but not hydrated", "use-scroll-ref"); - if (!containerPending && !targetPending) - cleanup = start(); - }; - microtask.read(tryStart); - return () => { - cancelMicrotask(tryStart); - cleanup?.(); - }; - }, [start]); - return values; - } - - /** - * @deprecated useElementScroll is deprecated. Convert to useScroll({ container: ref }) - */ - function useElementScroll(ref) { - { - warnOnce(false, "useElementScroll is deprecated. Convert to useScroll({ container: ref })."); - } - return useScroll({ container: ref }); - } - - /** - * @deprecated useViewportScroll is deprecated. Convert to useScroll() - */ - function useViewportScroll() { - { - warnOnce(false, "useViewportScroll is deprecated. Convert to useScroll()."); - } - return useScroll(); - } - - /** - * Combine multiple motion values into a new one using a string template literal. - * - * ```jsx - * import { - * motion, - * useSpring, - * useMotionValue, - * useMotionTemplate - * } from "framer-motion" - * - * function Component() { - * const shadowX = useSpring(0) - * const shadowY = useMotionValue(0) - * const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))` - * - * return - * } - * ``` - * - * @public - */ - function useMotionTemplate(fragments, ...values) { - /** - * Create a function that will build a string from the latest motion values. - */ - const numFragments = fragments.length; - function buildValue() { - let output = ``; - for (let i = 0; i < numFragments; i++) { - output += fragments[i]; - const value = values[i]; - if (value) { - output += isMotionValue(value) ? value.get() : value; - } - } - return output; - } - return useCombineMotionValues(values.filter(isMotionValue), buildValue); - } - - function useFollowValue(source, options = {}) { - const { isStatic } = React$1.useContext(MotionConfigContext); - const getFromSource = () => (isMotionValue(source) ? source.get() : source); - // isStatic will never change, allowing early hooks return - if (isStatic) { - return useTransform(getFromSource); - } - const value = useMotionValue(getFromSource()); - React$1.useInsertionEffect(() => { - return attachFollow(value, source, options); - }, [value, JSON.stringify(options)]); - return value; - } - - function useSpring(source, options = {}) { - return useFollowValue(source, { type: "spring", ...options }); - } - - function useAnimationFrame(callback) { - const initialTimestamp = React$1.useRef(0); - const { isStatic } = React$1.useContext(MotionConfigContext); - React$1.useEffect(() => { - if (isStatic) - return; - const provideTimeSinceStart = ({ timestamp, delta }) => { - if (!initialTimestamp.current) - initialTimestamp.current = timestamp; - callback(timestamp - initialTimestamp.current, delta); - }; - frame.update(provideTimeSinceStart, true); - return () => cancelFrame(provideTimeSinceStart); - }, [callback]); - } - - function useTime() { - const time = useMotionValue(0); - useAnimationFrame((t) => time.set(t)); - return time; - } - - /** - * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes. - * - * ```javascript - * const x = useMotionValue(0) - * const xVelocity = useVelocity(x) - * const xAcceleration = useVelocity(xVelocity) - * ``` - * - * @public - */ - function useVelocity(value) { - const velocity = useMotionValue(value.getVelocity()); - const updateVelocity = () => { - const latest = value.getVelocity(); - velocity.set(latest); - /** - * If we still have velocity, schedule an update for the next frame - * to keep checking until it is zero. - */ - if (latest) - frame.update(updateVelocity); - }; - useMotionValueEvent(value, "change", () => { - // Schedule an update to this value at the end of the current frame. - frame.update(updateVelocity, false, true); - }); - return velocity; - } - - class WillChangeMotionValue extends MotionValue { - constructor() { - super(...arguments); - this.isEnabled = false; - } - add(name) { - if (transformProps.has(name) || acceleratedValues.has(name)) { - this.isEnabled = true; - this.update(); - } - } - update() { - this.set(this.isEnabled ? "transform" : "auto"); - } - } - - function useWillChange() { - return useConstant(() => new WillChangeMotionValue("auto")); - } - - /** - * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting. - * - * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing - * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion. - * - * It will actively respond to changes and re-render your components with the latest setting. - * - * ```jsx - * export function Sidebar({ isOpen }) { - * const shouldReduceMotion = useReducedMotion() - * const closedX = shouldReduceMotion ? 0 : "-100%" - * - * return ( - * - * ) - * } - * ``` - * - * @return boolean - * - * @public - */ - function useReducedMotion() { - /** - * Lazy initialisation of prefersReducedMotion - */ - !hasReducedMotionListener.current && initPrefersReducedMotion(); - const [shouldReduceMotion] = React$1.useState(prefersReducedMotion.current); - { - warnOnce(shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"); - } - /** - * TODO See if people miss automatically updating shouldReduceMotion setting - */ - return shouldReduceMotion; - } - - function useReducedMotionConfig() { - const reducedMotionPreference = useReducedMotion(); - const { reducedMotion } = React$1.useContext(MotionConfigContext); - if (reducedMotion === "never") { - return false; - } - else if (reducedMotion === "always") { - return true; - } - else { - return reducedMotionPreference; - } - } - - function stopAnimation(visualElement) { - visualElement.values.forEach((value) => value.stop()); - } - function setVariants(visualElement, variantLabels) { - const reversedLabels = [...variantLabels].reverse(); - reversedLabels.forEach((key) => { - const variant = visualElement.getVariant(key); - variant && setTarget(visualElement, variant); - if (visualElement.variantChildren) { - visualElement.variantChildren.forEach((child) => { - setVariants(child, variantLabels); - }); - } - }); - } - function setValues(visualElement, definition) { - if (Array.isArray(definition)) { - return setVariants(visualElement, definition); - } - else if (typeof definition === "string") { - return setVariants(visualElement, [definition]); - } - else { - setTarget(visualElement, definition); - } - } - /** - * @public - */ - function animationControls() { - /** - * Track whether the host component has mounted. - */ - let hasMounted = false; - /** - * A collection of linked component animation controls. - */ - const subscribers = new Set(); - const controls = { - subscribe(visualElement) { - subscribers.add(visualElement); - return () => void subscribers.delete(visualElement); - }, - start(definition, transitionOverride) { - exports.invariant(hasMounted, "controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook."); - const animations = []; - subscribers.forEach((visualElement) => { - animations.push(animateVisualElement(visualElement, definition, { - transitionOverride, - })); - }); - return Promise.all(animations); - }, - set(definition) { - exports.invariant(hasMounted, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."); - return subscribers.forEach((visualElement) => { - setValues(visualElement, definition); - }); - }, - stop() { - subscribers.forEach((visualElement) => { - stopAnimation(visualElement); - }); - }, - mount() { - hasMounted = true; - return () => { - hasMounted = false; - controls.stop(); - }; - }, - }; - return controls; - } - - function useAnimate() { - const scope = useConstant(() => ({ - current: null, // Will be hydrated by React - animations: [], - })); - const reduceMotion = useReducedMotionConfig() ?? undefined; - const { skipAnimations } = React$1.useContext(MotionConfigContext); - const animate = React$1.useMemo(() => createScopedAnimate({ scope, reduceMotion, skipAnimations }), [scope, reduceMotion, skipAnimations]); - useUnmountEffect(() => { - scope.animations.forEach((animation) => animation.stop()); - scope.animations.length = 0; - }); - return [scope, animate]; - } - - function useAnimateMini() { - const scope = useConstant(() => ({ - current: null, // Will be hydrated by React - animations: [], - })); - const animate = useConstant(() => createScopedWaapiAnimate(scope)); - useUnmountEffect(() => { - scope.animations.forEach((animation) => animation.stop()); - }); - return [scope, animate]; - } - - /** - * Creates `LegacyAnimationControls`, which can be used to manually start, stop - * and sequence animations on one or more components. - * - * The returned `LegacyAnimationControls` should be passed to the `animate` property - * of the components you want to animate. - * - * These components can then be animated with the `start` method. - * - * ```jsx - * import * as React from 'react' - * import { motion, useAnimation } from 'framer-motion' - * - * export function MyComponent(props) { - * const controls = useAnimation() - * - * controls.start({ - * x: 100, - * transition: { duration: 0.5 }, - * }) - * - * return - * } - * ``` - * - * @returns Animation controller with `start` and `stop` methods - * - * @public - */ - function useAnimationControls() { - const controls = useConstant(animationControls); - useIsomorphicLayoutEffect(controls.mount, []); - return controls; - } - const useAnimation = useAnimationControls; - - function usePresenceData() { - const context = React$1.useContext(PresenceContext); - return context ? context.custom : undefined; - } - - /** - * Attaches an event listener directly to the provided DOM element. - * - * Bypassing React's event system can be desirable, for instance when attaching non-passive - * event handlers. - * - * ```jsx - * const ref = useRef(null) - * - * useDomEvent(ref, 'wheel', onWheel, { passive: false }) - * - * return
- * ``` - * - * @param ref - React.RefObject that's been provided to the element you want to bind the listener to. - * @param eventName - Name of the event you want listen for. - * @param handler - Function to fire when receiving the event. - * @param options - Options to pass to `Event.addEventListener`. - * - * @public - */ - function useDomEvent(ref, eventName, handler, options) { - React$1.useEffect(() => { - const element = ref.current; - if (handler && element) { - return addDomEvent(element, eventName, handler, options); - } - }, [ref, eventName, handler, options]); - } - - /** - * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components. - * - * ```jsx - * const dragControls = useDragControls() - * - * function startDrag(event) { - * dragControls.start(event, { snapToCursor: true }) - * } - * - * return ( - * <> - *
- * - * - * ) - * ``` - * - * @public - */ - class DragControls { - constructor() { - this.componentControls = new Set(); - } - /** - * Subscribe a component's internal `VisualElementDragControls` to the user-facing API. - * - * @internal - */ - subscribe(controls) { - this.componentControls.add(controls); - return () => this.componentControls.delete(controls); - } - /** - * Start a drag gesture on every `motion` component that has this set of drag controls - * passed into it via the `dragControls` prop. - * - * ```jsx - * dragControls.start(e, { - * snapToCursor: true - * }) - * ``` - * - * @param event - PointerEvent - * @param options - Options - * - * @public - */ - start(event, options) { - this.componentControls.forEach((controls) => { - controls.start(event.nativeEvent || event, options); - }); - } - /** - * Cancels a drag gesture. - * - * ```jsx - * dragControls.cancel() - * ``` - * - * @public - */ - cancel() { - this.componentControls.forEach((controls) => { - controls.cancel(); - }); - } - /** - * Stops a drag gesture. - * - * ```jsx - * dragControls.stop() - * ``` - * - * @public - */ - stop() { - this.componentControls.forEach((controls) => { - controls.stop(); - }); - } - } - const createDragControls = () => new DragControls(); - /** - * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop - * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we - * might want to initiate that dragging from a different component than the draggable one. - * - * By creating a `dragControls` using the `useDragControls` hook, we can pass this into - * the draggable component's `dragControls` prop. It exposes a `start` method - * that can start dragging from pointer events on other components. - * - * ```jsx - * const dragControls = useDragControls() - * - * function startDrag(event) { - * dragControls.start(event, { snapToCursor: true }) - * } - * - * return ( - * <> - *
- * - * - * ) - * ``` - * - * @public - */ - function useDragControls() { - return useConstant(createDragControls); - } - - /** - * Checks if a component is a `motion` component. - */ - function isMotionComponent(component) { - return (component !== null && - typeof component === "object" && - motionComponentSymbol in component); - } - - /** - * Unwraps a `motion` component and returns either a string for `motion.div` or - * the React component for `motion(Component)`. - * - * If the component is not a `motion` component it returns undefined. - */ - function unwrapMotionComponent(component) { - if (isMotionComponent(component)) { - return component[motionComponentSymbol]; - } - return undefined; - } - - function useInstantLayoutTransition() { - return startTransition; - } - function startTransition(callback) { - if (!rootProjectionNode.current) - return; - rootProjectionNode.current.isUpdating = false; - rootProjectionNode.current.blockUpdate(); - callback && callback(); - } - - function useResetProjection() { - const reset = React$1.useCallback(() => { - const root = rootProjectionNode.current; - if (!root) - return; - root.resetTree(); - }, []); - return reset; - } - - /** - * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments. - * - * An index value can be passed to the returned `cycle` function to cycle to a specific index. - * - * ```jsx - * import * as React from "react" - * import { motion, useCycle } from "framer-motion" - * - * export const MyComponent = () => { - * const [x, cycleX] = useCycle(0, 50, 100) - * - * return ( - * cycleX()} - * /> - * ) - * } - * ``` - * - * @param items - items to cycle through - * @returns [currentState, cycleState] - * - * @public - */ - function useCycle(...items) { - const index = React$1.useRef(0); - const [item, setItem] = React$1.useState(items[index.current]); - const runCycle = React$1.useCallback((next) => { - index.current = - typeof next !== "number" - ? wrap(0, items.length, index.current + 1) - : next; - setItem(items[index.current]); - }, - // The array will change on each call, but by putting items.length at - // the front of this array, we guarantee the dependency comparison will match up - // eslint-disable-next-line react-hooks/exhaustive-deps - [items.length, ...items]); - return [item, runCycle]; - } - - function useInView(ref, { root, margin, amount, once = false, initial = false, } = {}) { - const [isInView, setInView] = React$1.useState(initial); - React$1.useEffect(() => { - if (!ref.current || (once && isInView)) - return; - const onEnter = () => { - setInView(true); - return once ? undefined : () => setInView(false); - }; - const options = { - root: (root && root.current) || undefined, - margin, - amount, - }; - return inView(ref.current, onEnter, options); - }, [root, ref, margin, once, amount]); - return isInView; - } - - function useInstantTransition() { - const [forceUpdate, forcedRenderCount] = useForceUpdate(); - const startInstantLayoutTransition = useInstantLayoutTransition(); - const unlockOnFrameRef = React$1.useRef(-1); - React$1.useEffect(() => { - /** - * Unblock after two animation frames, otherwise this will unblock too soon. - */ - frame.postRender(() => frame.postRender(() => { - /** - * If the callback has been called again after the effect - * triggered this 2 frame delay, don't unblock animations. This - * prevents the previous effect from unblocking the current - * instant transition too soon. This becomes more likely when - * used in conjunction with React.startTransition(). - */ - if (forcedRenderCount !== unlockOnFrameRef.current) - return; - MotionGlobalConfig.instantAnimations = false; - })); - }, [forcedRenderCount]); - return (callback) => { - startInstantLayoutTransition(() => { - MotionGlobalConfig.instantAnimations = true; - forceUpdate(); - callback(); - unlockOnFrameRef.current = forcedRenderCount + 1; - }); - }; - } - function disableInstantTransitions() { - MotionGlobalConfig.instantAnimations = false; - } - - function usePageInView() { - const [isInView, setIsInView] = React$1.useState(true); - React$1.useEffect(() => { - const handleVisibilityChange = () => setIsInView(!document.hidden); - if (document.hidden) { - handleVisibilityChange(); - } - document.addEventListener("visibilitychange", handleVisibilityChange); - return () => { - document.removeEventListener("visibilitychange", handleVisibilityChange); - }; - }, []); - return isInView; - } - - /** - * Creates a `transformPagePoint` function that accounts for SVG viewBox scaling. - * - * When dragging SVG elements inside an SVG with a viewBox that differs from - * the rendered dimensions (e.g., `viewBox="0 0 100 100"` but rendered at 500x500 pixels), - * pointer coordinates need to be transformed to match the SVG's coordinate system. - * - * @example - * ```jsx - * function App() { - * const svgRef = useRef(null) - * - * return ( - * - * - * - * - * - * ) - * } - * ``` - * - * @param svgRef - A React ref to the SVG element - * @returns A transformPagePoint function for use with MotionConfig - * - * @public - */ - function transformViewBoxPoint(svgRef) { - return (point) => { - const svg = svgRef.current; - if (!svg) { - return point; - } - // Get the viewBox attribute - const viewBox = svg.viewBox?.baseVal; - if (!viewBox || (viewBox.width === 0 && viewBox.height === 0)) { - // No viewBox or empty viewBox - no transformation needed - return point; - } - // Get the rendered dimensions of the SVG - const bbox = svg.getBoundingClientRect(); - if (bbox.width === 0 || bbox.height === 0) { - return point; - } - // Calculate scale factors - const scaleX = viewBox.width / bbox.width; - const scaleY = viewBox.height / bbox.height; - // Get the SVG's position on the page - const svgX = bbox.left + window.scrollX; - const svgY = bbox.top + window.scrollY; - // Transform the point: - // 1. Calculate position relative to SVG - // 2. Scale by viewBox/viewport ratio - // 3. Add back the SVG position (but in SVG coordinates) - return { - x: (point.x - svgX) * scaleX + svgX, - y: (point.y - svgY) * scaleY + svgY, - }; - }; - } - - /** - * Creates a `transformPagePoint` function that corrects pointer coordinates - * for a parent container with CSS transforms (rotation, scale, skew). - * - * When dragging elements inside a transformed parent, pointer coordinates - * need to be transformed through the inverse of the parent's transform - * so the drag offset is in local space. - * - * Works with both static and continuously animating transforms. - * - * @example - * ```jsx - * function App() { - * const ref = useRef(null) - * - * return ( - * - * - * - * - * - * ) - * } - * ``` - * - * @param parentRef - A React ref to the transformed parent element - * @returns A transformPagePoint function for use with MotionConfig - * - * @public - */ - function correctParentTransform(parentRef) { - return (point) => { - const parent = parentRef.current; - if (!parent) - return point; - const inv = getInverseMatrix(parent); - if (!inv) - return point; - // Get center of rotation in page space - const rect = parent.getBoundingClientRect(); - const cx = rect.left + window.scrollX + rect.width / 2; - const cy = rect.top + window.scrollY + rect.height / 2; - // Transform (point - center) through inverse, then add center back - const dx = point.x - cx; - const dy = point.y - cy; - return { - x: cx + inv.a * dx + inv.c * dy, - y: cy + inv.b * dx + inv.d * dy, - }; - }; - } - function getInverseMatrix(element) { - const { transform } = getComputedStyle(element); - if (!transform || transform === "none") - return null; - const match = transform.match(/^matrix3d\((.*)\)$/u) || - transform.match(/^matrix\((.*)\)$/u); - if (!match) - return null; - const v = match[1].split(",").map(Number); - const is3d = transform.startsWith("matrix3d"); - const a = v[0], b = v[1]; - const c = is3d ? v[4] : v[2]; - const d = is3d ? v[5] : v[3]; - const det = a * d - b * c; - if (Math.abs(det) < 1e-10) - return null; - return { a: d / det, b: -b / det, c: -c / det, d: a / det }; - } - - const appearAnimationStore = new Map(); - const appearComplete = new Map(); - - const appearStoreId = (elementId, valueName) => { - const key = transformProps.has(valueName) ? "transform" : valueName; - return `${elementId}: ${key}`; - }; - - function handoffOptimizedAppearAnimation(elementId, valueName, frame) { - const storeId = appearStoreId(elementId, valueName); - const optimisedAnimation = appearAnimationStore.get(storeId); - if (!optimisedAnimation) { - return null; - } - const { animation, startTime } = optimisedAnimation; - function cancelAnimation() { - window.MotionCancelOptimisedAnimation?.(elementId, valueName, frame); - } - /** - * We can cancel the animation once it's finished now that we've synced - * with Motion. - * - * Prefer onfinish over finished as onfinish is backwards compatible with - * older browsers. - */ - animation.onfinish = cancelAnimation; - if (startTime === null || window.MotionHandoffIsComplete?.(elementId)) { - /** - * If the startTime is null, this animation is the Paint Ready detection animation - * and we can cancel it immediately without handoff. - * - * Or if we've already handed off the animation then we're now interrupting it. - * In which case we need to cancel it. - */ - cancelAnimation(); - return null; - } - else { - return startTime; - } - } - - /** - * A single time to use across all animations to manually set startTime - * and ensure they're all in sync. - */ - let startFrameTime; - /** - * A dummy animation to detect when Chrome is ready to start - * painting the page and hold off from triggering the real animation - * until then. We only need one animation to detect paint ready. - * - * https://bugs.chromium.org/p/chromium/issues/detail?id=1406850 - */ - let readyAnimation; - /** - * Keep track of animations that were suspended vs cancelled so we - * can easily resume them when we're done measuring layout. - */ - const suspendedAnimations = new Set(); - function resumeSuspendedAnimations() { - suspendedAnimations.forEach((data) => { - data.animation.play(); - data.animation.startTime = data.startTime; - }); - suspendedAnimations.clear(); - } - function startOptimizedAppearAnimation(element, name, keyframes, options, onReady) { - // Prevent optimised appear animations if Motion has already started animating. - if (window.MotionIsMounted) { - return; - } - const id = element.dataset[optimizedAppearDataId]; - if (!id) - return; - window.MotionHandoffAnimation = handoffOptimizedAppearAnimation; - const storeId = appearStoreId(id, name); - if (!readyAnimation) { - readyAnimation = startWaapiAnimation(element, name, [keyframes[0], keyframes[0]], - /** - * 10 secs is basically just a super-safe duration to give Chrome - * long enough to get the animation ready. - */ - { duration: 10000, ease: "linear" }); - appearAnimationStore.set(storeId, { - animation: readyAnimation, - startTime: null, - }); - /** - * If there's no readyAnimation then there's been no instantiation - * of handoff animations. - */ - window.MotionHandoffAnimation = handoffOptimizedAppearAnimation; - window.MotionHasOptimisedAnimation = (elementId, valueName) => { - if (!elementId) - return false; - /** - * Keep a map of elementIds that have started animating. We check - * via ID instead of Element because of hydration errors and - * pre-hydration checks. We also actively record IDs as they start - * animating rather than simply checking for data-appear-id as - * this attrbute might be present but not lead to an animation, for - * instance if the element's appear animation is on a different - * breakpoint. - */ - if (!valueName) { - return appearComplete.has(elementId); - } - const animationId = appearStoreId(elementId, valueName); - return Boolean(appearAnimationStore.get(animationId)); - }; - window.MotionHandoffMarkAsComplete = (elementId) => { - if (appearComplete.has(elementId)) { - appearComplete.set(elementId, true); - } - }; - window.MotionHandoffIsComplete = (elementId) => { - return appearComplete.get(elementId) === true; - }; - /** - * We only need to cancel transform animations as - * they're the ones that will interfere with the - * layout animation measurements. - */ - window.MotionCancelOptimisedAnimation = (elementId, valueName, frame, canResume) => { - const animationId = appearStoreId(elementId, valueName); - const data = appearAnimationStore.get(animationId); - if (!data) - return; - if (frame && canResume === undefined) { - /** - * Wait until the end of the subsequent frame to cancel the animation - * to ensure we don't remove the animation before the main thread has - * had a chance to resolve keyframes and render. - */ - frame.postRender(() => { - frame.postRender(() => { - data.animation.cancel(); - }); - }); - } - else { - data.animation.cancel(); - } - if (frame && canResume) { - suspendedAnimations.add(data); - frame.render(resumeSuspendedAnimations); - } - else { - appearAnimationStore.delete(animationId); - /** - * If there are no more animations left, we can remove the cancel function. - * This will let us know when we can stop checking for conflicting layout animations. - */ - if (!appearAnimationStore.size) { - window.MotionCancelOptimisedAnimation = undefined; - } - } - }; - window.MotionCheckAppearSync = (visualElement, valueName, value) => { - const appearId = getOptimisedAppearId(visualElement); - if (!appearId) - return; - const valueIsOptimised = window.MotionHasOptimisedAnimation?.(appearId, valueName); - const externalAnimationValue = visualElement.props.values?.[valueName]; - if (!valueIsOptimised || !externalAnimationValue) - return; - const removeSyncCheck = value.on("change", (latestValue) => { - if (externalAnimationValue.get() !== latestValue) { - window.MotionCancelOptimisedAnimation?.(appearId, valueName); - removeSyncCheck(); - } - }); - return removeSyncCheck; - }; - } - const startAnimation = () => { - readyAnimation.cancel(); - const appearAnimation = startWaapiAnimation(element, name, keyframes, options); - /** - * Record the time of the first started animation. We call performance.now() once - * here and once in handoff to ensure we're getting - * close to a frame-locked time. This keeps all animations in sync. - */ - if (startFrameTime === undefined) { - startFrameTime = performance.now(); - } - appearAnimation.startTime = startFrameTime; - appearAnimationStore.set(storeId, { - animation: appearAnimation, - startTime: startFrameTime, - }); - if (onReady) - onReady(appearAnimation); - }; - appearComplete.set(id, false); - if (readyAnimation.ready) { - readyAnimation.ready.then(startAnimation).catch(noop$1); - } - else { - startAnimation(); - } - } - - const createObject = () => ({}); - class StateVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.measureInstanceViewportBox = createBox; - } - build() { } - resetTransform() { } - restoreTransform() { } - removeValueFromRenderState() { } - renderInstance() { } - scrapeMotionValuesFromProps() { - return createObject(); - } - getBaseTargetFromProps() { - return undefined; - } - readValueFromInstance(_state, key, options) { - return options.initialState[key] || 0; - } - sortInstanceNodePosition() { - return 0; - } - } - const useVisualState = makeUseVisualState({ - scrapeMotionValuesFromProps: createObject, - createRenderState: createObject, - }); - /** - * This is not an officially supported API and may be removed - * on any version. - */ - function useAnimatedState(initialState) { - const [animationState, setAnimationState] = React$1.useState(initialState); - const visualState = useVisualState({}, false); - const element = useConstant(() => { - return new StateVisualElement({ - props: { - onUpdate: (v) => { - setAnimationState({ ...v }); - }, - }, - visualState, - presenceContext: null, - }, { initialState }); - }); - React$1.useLayoutEffect(() => { - element.mount({}); - return () => element.unmount(); - }, [element]); - const startAnimation = useConstant(() => (animationDefinition) => { - return animateVisualElement(element, animationDefinition); - }); - return [animationState, startAnimation]; - } - - let id = 0; - const AnimateSharedLayout = ({ children }) => { - React__namespace.useEffect(() => { - exports.invariant(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations"); - }, []); - return (jsx(LayoutGroup, { id: useConstant(() => `asl-${id++}`), children: children })); - }; - - // Keep things reasonable and avoid scale: Infinity. In practise we might need - // to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1] - // to simply hide content at unreasonable scales. - const maxScale = 100000; - const invertScale = (scale) => scale > 0.001 ? 1 / scale : maxScale; - let hasWarned = false; - /** - * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse - * of their respective parent scales. - * - * This is useful for undoing the distortion of content when scaling a parent component. - * - * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent. - * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output - * of those instead. - * - * ```jsx - * const MyComponent = () => { - * const { scaleX, scaleY } = useInvertedScale() - * return - * } - * ``` - * - * @deprecated - */ - function useInvertedScale(scale) { - let parentScaleX = useMotionValue(1); - let parentScaleY = useMotionValue(1); - const { visualElement } = React$1.useContext(MotionContext); - exports.invariant(!!(scale || visualElement), "If no scale values are provided, useInvertedScale must be used within a child of another motion component."); - exports.warning(hasWarned, "useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."); - hasWarned = true; - if (scale) { - parentScaleX = scale.scaleX || parentScaleX; - parentScaleY = scale.scaleY || parentScaleY; - } - else if (visualElement) { - parentScaleX = visualElement.getValue("scaleX", 1); - parentScaleY = visualElement.getValue("scaleY", 1); - } - const scaleX = useTransform(parentScaleX, invertScale); - const scaleY = useTransform(parentScaleY, invertScale); - return { scaleX, scaleY }; - } - - exports.AnimatePresence = AnimatePresence; - exports.AnimateSharedLayout = AnimateSharedLayout; - exports.AsyncMotionValueAnimation = AsyncMotionValueAnimation; - exports.DOMKeyframesResolver = DOMKeyframesResolver; - exports.DOMVisualElement = DOMVisualElement; - exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext; - exports.DocumentProjectionNode = DocumentProjectionNode; - exports.DragControls = DragControls; - exports.Feature = Feature; - exports.FlatTree = FlatTree; - exports.GroupAnimation = GroupAnimation; - exports.GroupAnimationWithThen = GroupAnimationWithThen; - exports.HTMLProjectionNode = HTMLProjectionNode; - exports.HTMLVisualElement = HTMLVisualElement; - exports.JSAnimation = JSAnimation; - exports.KeyframeResolver = KeyframeResolver; - exports.LayoutAnimationBuilder = LayoutAnimationBuilder; - exports.LayoutGroup = LayoutGroup; - exports.LayoutGroupContext = LayoutGroupContext; - exports.LazyMotion = LazyMotion; - exports.MotionConfig = MotionConfig; - exports.MotionConfigContext = MotionConfigContext; - exports.MotionContext = MotionContext; - exports.MotionGlobalConfig = MotionGlobalConfig; - exports.MotionValue = MotionValue; - exports.NativeAnimation = NativeAnimation; - exports.NativeAnimationExtended = NativeAnimationExtended; - exports.NativeAnimationWrapper = NativeAnimationWrapper; - exports.NodeStack = NodeStack; - exports.ObjectVisualElement = ObjectVisualElement; - exports.PopChild = PopChild; - exports.PresenceChild = PresenceChild; - exports.PresenceContext = PresenceContext; - exports.Reorder = namespace; - exports.SVGVisualElement = SVGVisualElement; - exports.SubscriptionManager = SubscriptionManager; - exports.SwitchLayoutGroupContext = SwitchLayoutGroupContext; - exports.ViewTransitionBuilder = ViewTransitionBuilder; - exports.VisualElement = VisualElement; - exports.WillChangeMotionValue = WillChangeMotionValue; - exports.acceleratedValues = acceleratedValues; - exports.activeAnimations = activeAnimations; - exports.addAttrValue = addAttrValue; - exports.addDomEvent = addDomEvent; - exports.addPointerEvent = addPointerEvent; - exports.addPointerInfo = addPointerInfo; - exports.addScaleCorrector = addScaleCorrector; - exports.addStyleValue = addStyleValue; - exports.addUniqueItem = addUniqueItem; - exports.addValueToWillChange = addValueToWillChange; - exports.alpha = alpha; - exports.analyseComplexValue = analyseComplexValue; - exports.animate = animate; - exports.animateMini = animateMini; - exports.animateMotionValue = animateMotionValue; - exports.animateSingleValue = animateSingleValue; - exports.animateTarget = animateTarget; - exports.animateValue = animateValue; - exports.animateVariant = animateVariant; - exports.animateView = animateView; - exports.animateVisualElement = animateVisualElement; - exports.animationControls = animationControls; - exports.animationMapKey = animationMapKey; - exports.animations = animations; - exports.anticipate = anticipate; - exports.applyAxisDelta = applyAxisDelta; - exports.applyBoxDelta = applyBoxDelta; - exports.applyGeneratorOptions = applyGeneratorOptions; - exports.applyPointDelta = applyPointDelta; - exports.applyPxDefaults = applyPxDefaults; - exports.applyTreeDeltas = applyTreeDeltas; - exports.arc = arc; - exports.aspectRatio = aspectRatio; - exports.attachFollow = attachFollow; - exports.attachSpring = attachSpring; - exports.attrEffect = attrEffect; - exports.axisDeltaEquals = axisDeltaEquals; - exports.axisEquals = axisEquals; - exports.axisEqualsRounded = axisEqualsRounded; - exports.backIn = backIn; - exports.backInOut = backInOut; - exports.backOut = backOut; - exports.boxEquals = boxEquals; - exports.boxEqualsRounded = boxEqualsRounded; - exports.buildHTMLStyles = buildHTMLStyles; - exports.buildProjectionTransform = buildProjectionTransform; - exports.buildSVGAttrs = buildSVGAttrs; - exports.buildSVGPath = buildSVGPath; - exports.buildTransform = buildTransform; - exports.calcAxisDelta = calcAxisDelta; - exports.calcBoxDelta = calcBoxDelta; - exports.calcChildStagger = calcChildStagger; - exports.calcGeneratorDuration = calcGeneratorDuration; - exports.calcLength = calcLength; - exports.calcRelativeAxis = calcRelativeAxis; - exports.calcRelativeAxisPosition = calcRelativeAxisPosition; - exports.calcRelativeBox = calcRelativeBox; - exports.calcRelativePosition = calcRelativePosition; - exports.camelCaseAttributes = camelCaseAttributes; - exports.camelToDash = camelToDash; - exports.cancelFrame = cancelFrame; - exports.cancelMicrotask = cancelMicrotask; - exports.cancelSync = cancelSync; - exports.checkVariantsDidChange = checkVariantsDidChange; - exports.circIn = circIn; - exports.circInOut = circInOut; - exports.circOut = circOut; - exports.clamp = clamp; - exports.cleanDirtyNodes = cleanDirtyNodes; - exports.collectMotionValues = collectMotionValues; - exports.color = color; - exports.compareByDepth = compareByDepth; - exports.complex = complex; - exports.containsCSSVariable = containsCSSVariable; - exports.convertBoundingBoxToBox = convertBoundingBoxToBox; - exports.convertBoxToBoundingBox = convertBoxToBoundingBox; - exports.convertOffsetToTimes = convertOffsetToTimes; - exports.copyAxisDeltaInto = copyAxisDeltaInto; - exports.copyAxisInto = copyAxisInto; - exports.copyBoxInto = copyBoxInto; - exports.correctBorderRadius = correctBorderRadius; - exports.correctBoxShadow = correctBoxShadow; - exports.correctParentTransform = correctParentTransform; - exports.createAnimationState = createAnimationState; - exports.createAxis = createAxis; - exports.createAxisDelta = createAxisDelta; - exports.createBox = createBox; - exports.createDelta = createDelta; - exports.createGeneratorEasing = createGeneratorEasing; - exports.createProjectionNode = createProjectionNode$1; - exports.createRenderBatcher = createRenderBatcher; - exports.createScopedAnimate = createScopedAnimate; - exports.cubicBezier = cubicBezier; - exports.cubicBezierAsString = cubicBezierAsString; - exports.defaultEasing = defaultEasing; - exports.defaultOffset = defaultOffset$1; - exports.defaultTransformValue = defaultTransformValue; - exports.defaultValueTypes = defaultValueTypes; - exports.degrees = degrees; - exports.delay = delay; - exports.delayInSeconds = delayInSeconds; - exports.dimensionValueTypes = dimensionValueTypes; - exports.disableInstantTransitions = disableInstantTransitions; - exports.distance = distance; - exports.distance2D = distance2D; - exports.domAnimation = domAnimation; - exports.domMax = domMax; - exports.domMin = domMin; - exports.eachAxis = eachAxis; - exports.easeIn = easeIn; - exports.easeInOut = easeInOut; - exports.easeOut = easeOut; - exports.easingDefinitionToFunction = easingDefinitionToFunction; - exports.fillOffset = fillOffset; - exports.fillWildcards = fillWildcards; - exports.filterProps = filterProps; - exports.findDimensionValueType = findDimensionValueType; - exports.findValueType = findValueType; - exports.flushKeyframeResolvers = flushKeyframeResolvers; - exports.followValue = followValue; - exports.frame = frame; - exports.frameData = frameData; - exports.frameSteps = frameSteps; - exports.generateLinearEasing = generateLinearEasing; - exports.getAnimatableNone = getAnimatableNone; - exports.getAnimationMap = getAnimationMap; - exports.getComputedStyle = getComputedStyle$2; - exports.getDefaultTransition = getDefaultTransition; - exports.getDefaultValueType = getDefaultValueType; - exports.getEasingForSegment = getEasingForSegment; - exports.getFeatureDefinitions = getFeatureDefinitions; - exports.getFinalKeyframe = getFinalKeyframe; - exports.getMixer = getMixer; - exports.getOptimisedAppearId = getOptimisedAppearId; - exports.getOriginIndex = getOriginIndex; - exports.getValueAsType = getValueAsType; - exports.getValueTransition = getValueTransition$1; - exports.getVariableValue = getVariableValue; - exports.getVariantContext = getVariantContext; - exports.getViewAnimationLayerInfo = getViewAnimationLayerInfo; - exports.getViewAnimations = getViewAnimations; - exports.globalProjectionState = globalProjectionState; - exports.has2DTranslate = has2DTranslate; - exports.hasReducedMotionListener = hasReducedMotionListener; - exports.hasScale = hasScale; - exports.hasTransform = hasTransform; - exports.hasWarned = hasWarned$1; - exports.hex = hex; - exports.hover = hover; - exports.hsla = hsla; - exports.hslaToRgba = hslaToRgba; - exports.inView = inView; - exports.inertia = inertia; - exports.initPrefersReducedMotion = initPrefersReducedMotion; - exports.interpolate = interpolate; - exports.invisibleValues = invisibleValues; - exports.isAnimationControls = isAnimationControls; - exports.isBezierDefinition = isBezierDefinition; - exports.isBrowser = isBrowser$1; - exports.isCSSVariableName = isCSSVariableName; - exports.isCSSVariableToken = isCSSVariableToken; - exports.isControllingVariants = isControllingVariants; - exports.isDeltaZero = isDeltaZero; - exports.isDragActive = isDragActive; - exports.isDragging = isDragging; - exports.isEasingArray = isEasingArray; - exports.isElementKeyboardAccessible = isElementKeyboardAccessible; - exports.isElementTextInput = isElementTextInput; - exports.isForcedMotionValue = isForcedMotionValue; - exports.isGenerator = isGenerator; - exports.isHTMLElement = isHTMLElement; - exports.isKeyframesTarget = isKeyframesTarget; - exports.isMotionComponent = isMotionComponent; - exports.isMotionValue = isMotionValue; - exports.isNear = isNear; - exports.isNodeOrChild = isNodeOrChild; - exports.isNumericalString = isNumericalString; - exports.isObject = isObject; - exports.isPrimaryPointer = isPrimaryPointer; - exports.isSVGElement = isSVGElement; - exports.isSVGSVGElement = isSVGSVGElement; - exports.isSVGTag = isSVGTag; - exports.isTransitionDefined = isTransitionDefined; - exports.isValidMotionProp = isValidMotionProp; - exports.isVariantLabel = isVariantLabel; - exports.isVariantNode = isVariantNode; - exports.isWaapiSupportedEasing = isWaapiSupportedEasing; - exports.isWillChangeMotionValue = isWillChangeMotionValue; - exports.isZeroValueString = isZeroValueString; - exports.keyframes = keyframes; - exports.m = m; - exports.makeAnimationInstant = makeAnimationInstant; - exports.makeUseVisualState = makeUseVisualState; - exports.mapEasingToNativeEasing = mapEasingToNativeEasing; - exports.mapValue = mapValue; - exports.maxGeneratorDuration = maxGeneratorDuration; - exports.measurePageBox = measurePageBox; - exports.measureViewportBox = measureViewportBox; - exports.memo = memo; - exports.microtask = microtask; - exports.millisecondsToSeconds = millisecondsToSeconds; - exports.mirrorEasing = mirrorEasing; - exports.mix = mix; - exports.mixArray = mixArray; - exports.mixColor = mixColor; - exports.mixComplex = mixComplex; - exports.mixImmediate = mixImmediate; - exports.mixLinearColor = mixLinearColor; - exports.mixNumber = mixNumber$1; - exports.mixObject = mixObject; - exports.mixValues = mixValues; - exports.mixVisibility = mixVisibility; - exports.motion = motion; - exports.motionValue = motionValue; - exports.moveItem = moveItem; - exports.nodeGroup = nodeGroup; - exports.noop = noop$1; - exports.number = number; - exports.numberValueTypes = numberValueTypes; - exports.observeTimeline = observeTimeline; - exports.optimizedAppearDataAttribute = optimizedAppearDataAttribute; - exports.optimizedAppearDataId = optimizedAppearDataId; - exports.parseAnimateLayoutArgs = parseAnimateLayoutArgs; - exports.parseCSSVariable = parseCSSVariable; - exports.parseValueFromTransform = parseValueFromTransform; - exports.percent = percent; - exports.pipe = pipe; - exports.pixelsToPercent = pixelsToPercent; - exports.positionalKeys = positionalKeys; - exports.prefersReducedMotion = prefersReducedMotion; - exports.press = press; - exports.progress = progress; - exports.progressPercentage = progressPercentage; - exports.propEffect = propEffect; - exports.propagateDirtyNodes = propagateDirtyNodes; - exports.px = px; - exports.readTransformValue = readTransformValue; - exports.recordStats = recordStats; - exports.removeAxisDelta = removeAxisDelta; - exports.removeAxisTransforms = removeAxisTransforms; - exports.removeBoxTransforms = removeBoxTransforms; - exports.removeItem = removeItem; - exports.removePointDelta = removePointDelta; - exports.renderHTML = renderHTML; - exports.renderSVG = renderSVG; - exports.resize = resize; - exports.resolveElements = resolveElements; - exports.resolveMotionValue = resolveMotionValue; - exports.resolveTransition = resolveTransition; - exports.resolveVariant = resolveVariant; - exports.resolveVariantFromProps = resolveVariantFromProps; - exports.reverseEasing = reverseEasing; - exports.rgbUnit = rgbUnit; - exports.rgba = rgba; - exports.rootProjectionNode = rootProjectionNode; - exports.scale = scale; - exports.scaleCorrectors = scaleCorrectors; - exports.scalePoint = scalePoint; - exports.scrapeHTMLMotionValuesFromProps = scrapeMotionValuesFromProps$1; - exports.scrapeSVGMotionValuesFromProps = scrapeMotionValuesFromProps; - exports.scroll = scroll; - exports.scrollInfo = scrollInfo; - exports.secondsToMilliseconds = secondsToMilliseconds; - exports.setDragLock = setDragLock; - exports.setFeatureDefinitions = setFeatureDefinitions; - exports.setStyle = setStyle; - exports.setTarget = setTarget; - exports.spring = spring; - exports.springValue = springValue; - exports.stagger = stagger; - exports.startOptimizedAppearAnimation = startOptimizedAppearAnimation; - exports.startWaapiAnimation = startWaapiAnimation; - exports.statsBuffer = statsBuffer; - exports.steps = steps; - exports.styleEffect = styleEffect; - exports.supportedWaapiEasing = supportedWaapiEasing; - exports.supportsBrowserAnimation = supportsBrowserAnimation; - exports.supportsFlags = supportsFlags; - exports.supportsLinearEasing = supportsLinearEasing; - exports.supportsPartialKeyframes = supportsPartialKeyframes; - exports.supportsScrollTimeline = supportsScrollTimeline; - exports.supportsViewTimeline = supportsViewTimeline; - exports.svgEffect = svgEffect; - exports.sync = sync; - exports.testValueType = testValueType; - exports.time = time; - exports.transform = transform; - exports.transformAxis = transformAxis; - exports.transformBox = transformBox; - exports.transformBoxPoints = transformBoxPoints; - exports.transformPropOrder = transformPropOrder; - exports.transformProps = transformProps; - exports.transformValue = transformValue; - exports.transformValueTypes = transformValueTypes; - exports.transformViewBoxPoint = transformViewBoxPoint; - exports.translateAxis = translateAxis; - exports.unwrapMotionComponent = unwrapMotionComponent; - exports.updateMotionValuesFromProps = updateMotionValuesFromProps; - exports.useAnimate = useAnimate; - exports.useAnimateMini = useAnimateMini; - exports.useAnimation = useAnimation; - exports.useAnimationControls = useAnimationControls; - exports.useAnimationFrame = useAnimationFrame; - exports.useComposedRefs = useComposedRefs; - exports.useCycle = useCycle; - exports.useDeprecatedAnimatedState = useAnimatedState; - exports.useDeprecatedInvertedScale = useInvertedScale; - exports.useDomEvent = useDomEvent; - exports.useDragControls = useDragControls; - exports.useElementScroll = useElementScroll; - exports.useFollowValue = useFollowValue; - exports.useForceUpdate = useForceUpdate; - exports.useInView = useInView; - exports.useInstantLayoutTransition = useInstantLayoutTransition; - exports.useInstantTransition = useInstantTransition; - exports.useIsPresent = useIsPresent; - exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect; - exports.useMotionTemplate = useMotionTemplate; - exports.useMotionValue = useMotionValue; - exports.useMotionValueEvent = useMotionValueEvent; - exports.usePageInView = usePageInView; - exports.usePresence = usePresence; - exports.usePresenceData = usePresenceData; - exports.useReducedMotion = useReducedMotion; - exports.useReducedMotionConfig = useReducedMotionConfig; - exports.useResetProjection = useResetProjection; - exports.useScroll = useScroll; - exports.useSpring = useSpring; - exports.useTime = useTime; - exports.useTransform = useTransform; - exports.useUnmountEffect = useUnmountEffect; - exports.useVelocity = useVelocity; - exports.useViewportScroll = useViewportScroll; - exports.useWillChange = useWillChange; - exports.variantPriorityOrder = variantPriorityOrder; - exports.variantProps = variantProps; - exports.velocityPerSecond = velocityPerSecond; - exports.vh = vh; - exports.visualElementStore = visualElementStore; - exports.vw = vw; - exports.warnOnce = warnOnce; - exports.wrap = wrap; - -})); diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/framer-motion.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/framer-motion.js deleted file mode 100644 index 2b8922fb..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/framer-motion.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var i=n(e),o=React,s=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(t,e,n){var i,o={},r=null,u=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(u=e.ref),e)a.call(e,i)&&!c.hasOwnProperty(i)&&(o[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===o[i]&&(o[i]=e[i]);return{$$typeof:s,type:t,key:r,ref:u,props:o,_owner:l.current}}const h=r,d=u,p=u,m=e.createContext({});function f(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null);function x(t,e){-1===t.indexOf(e)&&t.push(e)}function w(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function T([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&in>e?e:n{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(S(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(S(e,n))});const P={},E=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),A=t=>"object"==typeof t&&null!==t,M=t=>/^0[^.\s]+$/u.test(t);function V(t){let e;return()=>(void 0===e&&(e=t()),e)}const C=t=>t,k=(...t)=>t.reduce((t,e)=>n=>e(t(n))),R=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class D{constructor(){this.subscriptions=[]}add(t){return x(this.subscriptions,t),()=>w(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let o=0;o1e3*t,B=t=>t/1e3,j=(t,e)=>e?t*(1e3/e):0,I=new Set;const O=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},F=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function W(t,e,n,i){if(t===e&&n===i)return C;const o=e=>function(t,e,n,i,o){let s,r,a=0;do{r=e+(n-e)/2,s=F(r,i,o)-t,s>0?n=r:e=r}while(Math.abs(s)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:F(o(t),e,i)}const U=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,N=t=>e=>1-t(1-e),$=W(.33,1.53,.69,.99),z=N($),Y=U(z),H=t=>t>=1?1:(t*=2)<1?.5*z(t):.5*(2-Math.pow(2,-10*(t-1))),X=t=>1-Math.sin(Math.acos(t)),G=N(X),K=U(X),_=W(.42,0,1,1),q=W(0,0,.58,1),Z=W(.42,0,.58,1);const J=t=>Array.isArray(t)&&"number"!=typeof t[0];function Q(t,e){return J(t)?t[O(0,t.length,e)]:t}const tt=t=>Array.isArray(t)&&"number"==typeof t[0],et={linear:C,easeIn:_,easeInOut:Z,easeOut:q,circIn:X,circInOut:K,circOut:G,backIn:z,backInOut:Y,backOut:$,anticipate:H},nt=e=>{if(tt(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,o,s]=e;return W(n,i,o,s)}return"string"==typeof e?(t.invariant(void 0!==et[e],`Invalid easing type '${e}'`,"invalid-easing-type"),et[e]):e},it=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],ot={value:null,addProjectionMetrics:null};function st(t,e){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,r=it.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,o=!1,s=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={schedule:(t,e=!1,s=!1)=>{const a=s&&o?n:i;return e&&r.add(t),a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,o)return void(s=!0);o=!0;const r=n;n=i,i=r,n.forEach(c),e&&ot.value&&ot.value.frameloop[e].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(t))}};return u}(s,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:p,postRender:m}=r,f=()=>{const s=P.useManualTiming,r=s?o.timestamp:performance.now();n=!1,s||(o.delta=i?1e3/60:Math.max(Math.min(r-o.timestamp,40),1)),o.timestamp=r,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),h.process(o),d.process(o),p.process(o),m.process(o),o.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:it.reduce((e,s)=>{const a=r[s];return e[s]=(e,s=!1,r=!1)=>(n||(n=!0,i=!0,o.isProcessing||t(f)),a.schedule(e,s,r)),e},{}),cancel:t=>{for(let e=0;e(void 0===ut&&dt.set(lt.isProcessing||P.useManualTiming?lt.timestamp:performance.now()),ut),set:t=>{ut=t,queueMicrotask(ht)}},pt={layout:0,mainThread:0,waapi:0},mt=t=>e=>"string"==typeof e&&e.startsWith(t),ft=mt("--"),gt=mt("var(--"),yt=t=>!!gt(t)&&vt.test(t.split("/*")[0].trim()),vt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function xt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const wt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Tt={...wt,transform:t=>b(0,1,t)},bt={...wt,default:1},St=t=>Math.round(1e5*t)/1e5,Pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Et=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,At=(t,e)=>n=>Boolean("string"==typeof n&&Et.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Mt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[o,s,r,a]=i.match(Pt);return{[t]:parseFloat(o),[e]:parseFloat(s),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Vt={...wt,transform:t=>Math.round((t=>b(0,255,t))(t))},Ct={test:At("rgb","red"),parse:Mt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Vt.transform(t)+", "+Vt.transform(e)+", "+Vt.transform(n)+", "+St(Tt.transform(i))+")"};const kt={test:At("#"),parse:function(t){let e="",n="",i="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,i+=i,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}},transform:Ct.transform},Rt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Dt=Rt("deg"),Lt=Rt("%"),Bt=Rt("px"),jt=Rt("vh"),It=Rt("vw"),Ot=(()=>({...Lt,parse:t=>Lt.parse(t)/100,transform:t=>Lt.transform(100*t)}))(),Ft={test:At("hsl","hue"),parse:Mt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Lt.transform(St(e))+", "+Lt.transform(St(n))+", "+St(Tt.transform(i))+")"},Wt={test:t=>Ct.test(t)||kt.test(t)||Ft.test(t),parse:t=>Ct.test(t)?Ct.parse(t):Ft.test(t)?Ft.parse(t):kt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Ct.transform(t):Ft.transform(t),getAnimatableNone:t=>{const e=Wt.parse(t);return e.alpha=0,Wt.transform(e)}},Ut=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Nt="number",$t="color",zt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Yt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},o=[];let s=0;const r=e.replace(zt,t=>(Wt.test(t)?(i.color.push(s),o.push($t),n.push(Wt.parse(t))):t.startsWith("var(")?(i.var.push(s),o.push("var"),n.push(t)):(i.number.push(s),o.push(Nt),n.push(parseFloat(t))),++s,"${}")).split("${}");return{values:n,split:r,indexes:i,types:o}}function Ht({split:t,types:e}){const n=t.length;return i=>{let o="";for(let s=0;s{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:Wt.test(n)?Wt.getAnimatableNone(n):n;var n};const Gt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Pt)?.length||0)+(t.match(Ut)?.length||0)>0},parse:function(t){return Yt(t).values},createTransformer:function(t){return Ht(Yt(t))},getAnimatableNone:function(t){const e=Yt(t);return Ht(e)(e.values.map((t,n)=>Xt(t,e.split[n])))}};function Kt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function _t({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let o=0,s=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;o=Kt(a,i,t+1/3),s=Kt(a,i,t),r=Kt(a,i,t-1/3)}else o=s=r=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*r),alpha:i}}function qt(t,e){return n=>n>0?e:t}const Zt=(t,e,n)=>t+(e-t)*n,Jt=(t,e,n)=>{const i=t*t,o=n*(e*e-i)+i;return o<0?0:Math.sqrt(o)},Qt=[kt,Ct,Ft];function te(e){const n=(i=e,Qt.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let o=n.parse(e);return n===Ft&&(o=_t(o)),o}const ee=(t,e)=>{const n=te(t),i=te(e);if(!n||!i)return qt(t,e);const o={...n};return t=>(o.red=Jt(n.red,i.red,t),o.green=Jt(n.green,i.green,t),o.blue=Jt(n.blue,i.blue,t),o.alpha=Zt(n.alpha,i.alpha,t),Ct.transform(o))},ne=new Set(["none","hidden"]);function ie(t,e){return ne.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function oe(t,e){return n=>Zt(t,e,n)}function se(t){return"number"==typeof t?oe:"string"==typeof t?yt(t)?qt:Wt.test(t)?ee:le:Array.isArray(t)?re:"object"==typeof t?Wt.test(t)?ee:ae:qt}function re(t,e){const n=[...t],i=n.length,o=t.map((t,n)=>se(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in i)n[e]=i[e](t);return n}}const le=(e,n)=>{const i=Gt.createTransformer(n),o=Yt(e),s=Yt(n);return o.indexes.var.length===s.indexes.var.length&&o.indexes.color.length===s.indexes.color.length&&o.indexes.number.length>=s.indexes.number.length?ne.has(e)&&!s.values.length||ne.has(n)&&!o.values.length?ie(e,n):k(re(function(t,e){const n=[],i={color:0,var:0,number:0};for(let o=0;o{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>rt.update(e,t),stop:()=>at(e),now:()=>lt.isProcessing?lt.timestamp:dt.now()}},he=(t,e,n=10)=>{let i="";const o=Math.max(Math.round(e/n),2);for(let e=0;e=de?1/0:e}function me(t,e=100,n){const i=n({...t,keyframes:[0,e]}),o=Math.min(pe(i),de);return{type:"keyframes",ease:t=>i.next(o*t).value/e,duration:B(o)}}const fe=100,ge=10,ye=1,ve=0,xe=800,we=.3,Te=.3,be={granular:.01,default:2},Se={granular:.005,default:.5},Pe=.01,Ee=10,Ae=.05,Me=1;function Ve(t,e){return t*Math.sqrt(1-e*e)}const Ce=.001;const ke=["duration","bounce"],Re=["stiffness","damping","mass"];function De(t,e){return e.some(e=>void 0!==t[e])}function Le(e){let n={velocity:ve,stiffness:fe,damping:ge,mass:ye,isResolvedFromDuration:!1,...e};if(!De(e,Re)&&De(e,ke))if(n.velocity=0,e.visualDuration){const t=e.visualDuration,i=2*Math.PI/(1.2*t),o=i*i,s=2*b(.05,1,1-(e.bounce||0))*Math.sqrt(o);n={...n,mass:ye,stiffness:o,damping:s}}else{const i=function({duration:e=xe,bounce:n=we,velocity:i=ve,mass:o=ye}){let s,r;t.warning(e<=L(Ee),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-n;a=b(Ae,Me,a),e=b(Pe,Ee,B(e)),a<1?(s=t=>{const n=t*a,o=n*e,s=n-i,r=Ve(t,a),l=Math.exp(-o);return Ce-s/r*l},r=t=>{const n=t*a*e,o=n*i+i,r=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-n),c=Ve(Math.pow(t,2),a);return(-s(t)+Ce>0?-1:1)*((o-r)*l)/c}):(s=t=>Math.exp(-t*e)*((t-i)*e+1)-.001,r=t=>Math.exp(-t*e)*(e*e*(i-t)));const l=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,r,5/e);if(e=L(e),isNaN(l))return{stiffness:fe,damping:ge,duration:e};{const t=Math.pow(l,2)*o;return{stiffness:t,damping:2*a*Math.sqrt(o*t),duration:e}}}({...e,velocity:0});n={...n,...i,mass:ye},n.isResolvedFromDuration=!0}return n}function Be(t=Te,e=we){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:o}=n;const s=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:p}=Le({...n,velocity:-B(n.velocity||0)}),m=d||0,f=c/(2*Math.sqrt(l*u)),g=r-s,y=B(Math.sqrt(l/u)),v=Math.abs(g)<5;let x,w,T,b,S,P;if(i||(i=v?be.granular:be.default),o||(o=v?Se.granular:Se.default),f<1)T=Ve(y,f),b=(m+f*y*g)/T,x=t=>{const e=Math.exp(-f*y*t);return r-e*(b*Math.sin(T*t)+g*Math.cos(T*t))},S=f*y*b+g*T,P=f*y*g-b*T,w=t=>Math.exp(-f*y*t)*(S*Math.sin(T*t)+P*Math.cos(T*t));else if(1===f){x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);const t=m+y*g;w=e=>Math.exp(-y*e)*(y*t*e-m)}else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t};const e=(m+f*y*g)/t,n=f*y*e-g*t,i=f*y*g-e*t;w=e=>{const o=Math.exp(-f*y*e),s=Math.min(t*e,300);return o*(n*Math.sinh(s)+i*Math.cosh(s))}}const E={calculatedDuration:p&&h||null,velocity:t=>L(w(t)),next:t=>{if(!p&&f<1){const e=Math.exp(-f*y*t),n=Math.sin(T*t),s=Math.cos(T*t),l=r-e*(b*n+g*s),c=L(e*(S*n+P*s));return a.done=Math.abs(c)<=i&&Math.abs(r-l)<=o,a.value=a.done?r:l,a}const e=x(t);if(p)a.done=t>=h;else{const n=L(w(t));a.done=Math.abs(n)<=i&&Math.abs(r-e)<=o}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(pe(E),de),e=he(e=>E.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return E}Be.applyToOptions=t=>{const e=me(t,100,Be);return t.ease=e.ease,t.duration=L(e.duration),t.type="keyframes",t};function je(t,e,n){const i=Math.max(e-5,0);return j(n-t(i),e-i)}function Ie({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let w,T;const b=t=>{var e;(e=d.value,void 0!==a&&el)&&(w=t,T=Be({keyframes:[d.value,p(d.value)],velocity:je(v,t,d.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==w||(e=!0,x(t),b(t)),void 0!==w&&t>=w?T.next(t-w):(!e&&x(t),d)}}}function Oe(e,n,{clamp:i=!0,ease:o,mixer:s}={}){const r=e.length;if(t.invariant(r===n.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),n=[...n].reverse());const l=function(t,e,n){const i=[],o=n||P.mix||ce,s=t.length-1;for(let n=0;n{if(a&&t1)for(;iu(b(e[0],e[r-1],t)):u}function Fe(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const o=R(0,e,i);t.push(Zt(n,1,o))}}function We(t){const e=[0];return Fe(e,t.length-1),e}function Ue(t,e){return t.map(t=>t*e)}function Ne(t,e){return t.map(()=>e||Z).splice(0,t.length-1)}function $e({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const o=J(i)?i.map(nt):nt(i),s={done:!1,value:e[0]},r=Oe(Ue(n&&n.length===e.length?n:We(e),t),e,{ease:Array.isArray(o)?o:Ne(e,o)});return{calculatedDuration:t,next:e=>(s.value=r(e),s.done=e>=t,s)}}const ze=t=>null!==t;function Ye(t,{repeat:e,repeatType:n="loop"},i,o=1){const s=t.filter(ze),r=o<0||e&&"loop"!==n&&e%2==1?0:s.length-1;return r&&void 0!==i?i:s[r]}const He={decay:Ie,inertia:Ie,tween:$e,keyframes:$e,spring:Be};function Xe(t){"string"==typeof t.type&&(t.type=He[t.type])}class Ge{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ke=t=>t/100;class _e extends Ge{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==dt.now()&&this.tick(dt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},pt.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Xe(t);const{type:e=$e,repeat:n=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:r}=t;const a=e||$e;a!==$e&&"number"!=typeof r[0]&&(this.mixKeyframes=k(Ke,ce(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===o&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=pe(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v,x=this.currentTime,w=n;if(u){const t=Math.min(this.currentTime,i)/r;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,u+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/r)):"mirror"===h&&(w=s)),x=b(0,1,n)*r}y?(this.delayState.value=c[0],v=this.delayState):v=w.next(x),o&&!y&&(v.value=o(v.value));let{done:T}=v;y||null===a||(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return S&&p!==Ie&&(v.value=Ye(c,this.options,f,this.speed)),m&&m(v.value),S&&this.finish(),v}then(t,e){return this.finished.then(t,e)}get duration(){return B(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+B(t)}get time(){return B(this.currentTime)}set time(t){t=L(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return je(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(dt.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=B(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ue,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(dt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,pt.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function qe(t){for(let e=1;e180*t/Math.PI,Je=t=>{const e=Ze(Math.atan2(t[1],t[0]));return tn(e)},Qe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Je,rotateZ:Je,skewX:t=>Ze(Math.atan(t[1])),skewY:t=>Ze(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},tn=t=>((t%=360)<0&&(t+=360),t),en=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),nn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),on={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:en,scaleY:nn,scale:t=>(en(t)+nn(t))/2,rotateX:t=>tn(Ze(Math.atan2(t[6],t[5]))),rotateY:t=>tn(Ze(Math.atan2(-t[2],t[0]))),rotateZ:Je,rotate:Je,skewX:t=>Ze(Math.atan(t[4])),skewY:t=>Ze(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function sn(t){return t.includes("scale")?1:0}function rn(t,e){if(!t||"none"===t)return sn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(n)i=on,o=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Qe,o=e}if(!o)return sn(e);const s=i[e],r=o[1].split(",").map(ln);return"function"==typeof s?s(r):r[s]}const an=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return rn(n,e)};function ln(t){return parseFloat(t.trim())}const cn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],un=(()=>new Set([...cn,"pathRotation"]))(),hn=t=>t===wt||t===Bt,dn=new Set(["x","y","z"]),pn=cn.filter(t=>!dn.has(t));const mn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const o=t.max-t.min;return"border-box"===i?o:o-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const o=t.max-t.min;return"border-box"===i?o:o-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>rn(e,"x"),y:(t,{transform:e})=>rn(e,"y")};mn.translateX=mn.x,mn.translateY=mn.y;const fn=new Set;let gn=!1,yn=!1,vn=!1;function xn(){if(yn){const t=Array.from(fn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return pn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}yn=!1,gn=!1,fn.forEach(t=>t.complete(vn)),fn.clear()}function wn(){fn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(yn=!0)})}function Tn(){vn=!0,wn(),xn(),vn=!1}class bn{constructor(t,e,n,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(fn.add(this),gn||(gn=!0,rt.read(wn),rt.resolveKeyframes(xn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const o=i?.get(),s=t[t.length-1];if(void 0!==o)t[0]=o;else if(n&&e){const i=n.readValue(e,s);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=s),i&&void 0===o&&i.set(t[0])}qe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),fn.delete(this)}cancel(){"scheduled"===this.state&&(fn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Sn=t=>t.startsWith("--");function Pn(t,e,n){Sn(e)?t.style.setProperty(e,n):t.style[e]=n}const En={};function An(t,e){const n=V(t);return()=>En[e]??n()}const Mn=An(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Vn=An(()=>void 0!==window.ViewTimeline,"viewTimeline"),Cn=An(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),kn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Rn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kn([0,.65,.55,1]),circOut:kn([.55,0,1,.45]),backIn:kn([.31,.01,.66,-.59]),backOut:kn([.33,1.53,.69,.99])};function Dn(t,e){return t?"function"==typeof t?Cn()?he(t,e):"ease-out":tt(t)?kn(t):Array.isArray(t)?t.map(t=>Dn(t,e)||Rn.easeOut):Rn[t]:void 0}function Ln(t,e,n,{delay:i=0,duration:o=300,repeat:s=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Dn(a,o);Array.isArray(h)&&(u.easing=h),ot.value&&pt.waapi++;const d={delay:i,duration:o,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:"reverse"===r?"alternate":"normal"};c&&(d.pseudoElement=c);const p=t.animate(u,d);return ot.value&&p.finished.finally(()=>{pt.waapi--}),p}function Bn(t){return"function"==typeof t&&"applyToOptions"in t}function jn({type:t,...e}){return Bn(t)&&Cn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class In extends Ge{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:o,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(s),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=jn(e);this.animation=Ln(n,i,o,c,s),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=Ye(o,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t),Pn(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return B(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+B(t)}get time(){return B(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=L(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Mn()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),C):i(this)}}const On={anticipate:H,backInOut:Y,circInOut:K};function Fn(t){"string"==typeof t.ease&&t.ease in On&&(t.ease=On[t.ease])}class Wn extends In{constructor(t){Fn(t),Xe(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:o,...s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new _e({...s,autoplay:!1}),a=Math.max(10,dt.now()-this.startTime),l=b(0,10,a-10),c=r.sample(a).value,{name:u}=this.options;o&&u&&Pn(o,u,c),e.setWithVelocity(r.sample(Math.max(0,a-l)).value,c,l),r.stop()}}const Un=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Gt.test(t)&&"0"!==t||t.startsWith("url(")));function Nn(t){t.duration=0,t.type="keyframes"}const $n=new Set(["opacity","clipPath","filter","transform"]),zn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Yn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Hn=V(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Xn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:o,damping:s,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Hn()&&n&&($n.has(n)||Yn.has(n)&&function(t){for(let e=0;e{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=dt.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:o,repeatType:s,name:a,motionValue:l,element:c,...u},d=c?.KeyframeResolver||bn;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,o){this.keyframeResolver=void 0;const{name:s,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=dt.now();let h=!0;(function(e,n,i,o){const s=e[0];if(null===s)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=Un(s,n),l=Un(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${s}" to "${r}". "${a?r:s}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},p=h&&!c&&Xn(d),m=d.motionValue?.owner?.current;let f;if(p)try{f=new Wn({...d,element:m})}catch{f=new _e(d)}else f=new _e(d);f.finished.then(()=>{this.notifyFinished()}).catch(C),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Tn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Kn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return _n(this.animations,"duration")}get iterationDuration(){return _n(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function _n(t,e){let n=0;for(let i=0;in&&(n=o)}return n}class qn extends Kn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Zn extends In{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Jn=new WeakMap,Qn=(t,e="")=>`${t}:${e}`;function ti(t){let e=Jn.get(t);return e||(e=new Map,Jn.set(t,e)),e}function ei(t,e,n,i=0,o=1){const s=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(s,r):1===o?s*i:a-s*i}const ni={current:void 0};class ii{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=dt.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=dt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new D);const n=this.events[t].add(e);return"change"===t?()=>{n(),rt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ni.current&&ni.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=dt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return j(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function oi(t,e){return new ii(t,e)}function si(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function ri(t,e){const n=t?.[e]??t?.default??t;return n!==t?si(n,t):n}const ai={type:"spring",stiffness:500,damping:25,restSpeed:10},li={type:"keyframes",duration:.8},ci={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ui=(t,{keyframes:e})=>e.length>2?li:un.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ai:ci,hi=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function di(t){for(const e in t)if(!hi.has(e))return!0;return!1}const pi=(t,e,n,i={},o,s)=>r=>{const a=ri(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=L(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:o};di(a)||Object.assign(u,ui(t,u)),u.duration&&(u.duration=L(u.duration)),u.repeatDelay&&(u.repeatDelay=L(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let h=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(Nn(u),0===u.delay&&(h=!0)),(P.instantAnimations||P.skipAnimations||o?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Nn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!s&&void 0!==e.get()){const t=Ye(u.keyframes,a);if(void 0!==t)return void rt.update(()=>{u.onUpdate(t),u.onComplete()})}return a.isSync?new _e(u):new Gn(u)};function mi(t,e,n,i){const o=1-t;return o*o*e+2*o*t*n+t*t*i}function fi(t,e,n,i,o,s,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(s-o)+2*t*(r-s);return Math.atan2(l,a)*(180/Math.PI)}function gi(t,e,n,i,o,s){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=o*l;return{x:t+r*s+-a/l*n,y:e+a*s+r/l*n}}return{x:t,y:e}}const yi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vi(t){const e=yi.exec(t);if(!e)return[,];const[,n,i,o]=e;return[`--${n??i}`,o]}function xi(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,s]=vi(e);if(!o)return;const r=window.getComputedStyle(n).getPropertyValue(o);if(r){const t=r.trim();return E(t)?parseFloat(t):t}return yt(s)?xi(s,n,i+1):s}function wi(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Ti(t,e,n,i){if("function"==typeof e){const[o,s]=wi(i);e=e(void 0!==n?n:t.custom,o,s)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[o,s]=wi(i);e=e(void 0!==n?n:t.custom,o,s)}return e}function bi(t,e,n){const i=t.getProps();return Ti(i,e,void 0!==n?n:i.custom,t)}const Si=new Set(["width","height","top","left","right","bottom",...cn]),Pi=t=>Array.isArray(t);function Ei(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,oi(n))}function Ai(t){return Pi(t)?t[t.length-1]||0:t}function Mi(t,e){const n=bi(t,e);let{transitionEnd:i={},transition:o={},...s}=n||{};s={...s,...i};for(const e in s){Ei(t,e,Ai(s[e]))}}const Vi=t=>Boolean(t&&t.getVelocity);function Ci(t){return Boolean(Vi(t)&&t.add)}function ki(t,e){const n=t.getValue("willChange");if(Ci(n))return n.add(e);if(!n&&P.WillChange){const n=new P.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Ri(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Di="framerAppearId",Li="data-"+Ri(Di);function Bi(t){return t.props[Li]}function ji({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Ii(t,e,{delay:n=0,transitionOverride:i,type:o}={}){let{transition:s,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();s=s?si(s,l):l;const c=s?.reduceMotion,u=s?.skipAnimations;i&&(s=i);const h=[],d=o&&t.animationState&&t.animationState.getState()[o],p=s?.path;p&&p.animateVisualElement(t,a,s,n,h);for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),o=a[e];if(void 0===o||d&&ji(d,e))continue;const r={delay:n,...ri(s||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(o)&&o===l&&!r.velocity){rt.update(()=>i.set(o));continue}let p=!1;if(window.MotionHandoffAnimation){const n=Bi(t);if(n){const t=window.MotionHandoffAnimation(n,e,rt);null!==t&&(r.startTime=t,p=!0)}}ki(t,e);const m=c??t.shouldReduceMotion;i.start(pi(e,i,o,m&&Si.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>rt.update(()=>{r&&Mi(t,r)});h.length?Promise.all(h).then(e):e()}return h}function Oi(t,e,n={}){const i=bi(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Ii(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,i=0,o=0,s=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Oi(l,e,{...r,delay:n+("function"==typeof i?0:i)+ei(t.variantChildren,l,i,o,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,s,r,a,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[t,e]="beforeChildren"===a?[s,r]:[r,s];return t().then(()=>e())}return Promise.all([s(),r(n.delay)])}function Fi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const o=e.map(e=>Oi(t,e,n));i=Promise.all(o)}else if("string"==typeof e)i=Oi(t,e,n);else{const o="function"==typeof e?bi(t,e,n.custom):e;i=Promise.all(Ii(t,o,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Wi=t=>e=>e.test(t),Ui=[wt,Bt,Lt,Dt,It,jt,{test:t=>"auto"===t,parse:t=>t}],Ni=t=>Ui.find(Wi(t));function $i(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||M(t))}const zi=new Set(["brightness","contrast","saturate","opacity"]);function Yi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Pt)||[];if(!i)return t;const o=n.replace(i,"");let s=zi.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+o+")"}const Hi=/\b([a-z-]*)\(.*?\)/gu,Xi={...Gt,getAnimatableNone:t=>{const e=t.match(Hi);return e?e.map(Yi).join(" "):t}},Gi={...Gt,getAnimatableNone:t=>{const e=Gt.parse(t);return Gt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Ki={...wt,transform:Math.round},_i={rotate:Dt,pathRotation:Dt,rotateX:Dt,rotateY:Dt,rotateZ:Dt,scale:bt,scaleX:bt,scaleY:bt,scaleZ:bt,skew:Dt,skewX:Dt,skewY:Dt,distance:Bt,translateX:Bt,translateY:Bt,translateZ:Bt,x:Bt,y:Bt,z:Bt,perspective:Bt,transformPerspective:Bt,opacity:Tt,originX:Ot,originY:Ot,originZ:Bt},qi={borderWidth:Bt,borderTopWidth:Bt,borderRightWidth:Bt,borderBottomWidth:Bt,borderLeftWidth:Bt,borderRadius:Bt,borderTopLeftRadius:Bt,borderTopRightRadius:Bt,borderBottomRightRadius:Bt,borderBottomLeftRadius:Bt,width:Bt,maxWidth:Bt,height:Bt,maxHeight:Bt,top:Bt,right:Bt,bottom:Bt,left:Bt,inset:Bt,insetBlock:Bt,insetBlockStart:Bt,insetBlockEnd:Bt,insetInline:Bt,insetInlineStart:Bt,insetInlineEnd:Bt,padding:Bt,paddingTop:Bt,paddingRight:Bt,paddingBottom:Bt,paddingLeft:Bt,paddingBlock:Bt,paddingBlockStart:Bt,paddingBlockEnd:Bt,paddingInline:Bt,paddingInlineStart:Bt,paddingInlineEnd:Bt,margin:Bt,marginTop:Bt,marginRight:Bt,marginBottom:Bt,marginLeft:Bt,marginBlock:Bt,marginBlockStart:Bt,marginBlockEnd:Bt,marginInline:Bt,marginInlineStart:Bt,marginInlineEnd:Bt,fontSize:Bt,backgroundPositionX:Bt,backgroundPositionY:Bt,..._i,zIndex:Ki,fillOpacity:Tt,strokeOpacity:Tt,numOctaves:Ki},Zi={...qi,color:Wt,backgroundColor:Wt,outlineColor:Wt,fill:Wt,stroke:Wt,borderColor:Wt,borderTopColor:Wt,borderRightColor:Wt,borderBottomColor:Wt,borderLeftColor:Wt,filter:Xi,WebkitFilter:Xi,mask:Gi,WebkitMask:Gi},Ji=t=>Zi[t],Qi=new Set([Xi,Gi]);function to(t,e){let n=Ji(t);return Qi.has(n)||(n=Gt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const eo=new Set(["auto","none","0"]);class no extends bn{constructor(t,e,n,i,o){super(t,e,n,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const io=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function oo(t,e){for(let n=0;n{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0});function ro(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const o=n?.[t]??i.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t).filter(t=>null!=t)}function ao(t){return(e,n)=>{const i=ro(e),o=[];for(const e of i){const i=t(e,n);o.push(i)}return()=>{for(const t of o)t()}}}const lo=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class co{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,o=!0){const s=this.values.get(t);s&&s.onRemove();const r=()=>{const i=e.get();this.latest[t]=o?lo(i,qi[t]):i,n&&rt.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&at(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}}function uo(t){const e=new WeakMap;return(n,i)=>{const o=e.get(n)??new co;e.set(n,o);const s=[];for(const e in i){const r=i[e],a=t(n,o,e,r);s.push(a)}return()=>{for(const t of s)t()}}}const ho=(t,e,n,i)=>{const o=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),s=o?n:n.startsWith("data")||n.startsWith("aria")?Ri(n):n,r=o?()=>{t[s]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(s):t.setAttribute(s,String(i))};return e.set(n,i,r)},po=ao(uo(ho)),mo=uo((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function fo(t){return A(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const go={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const yo=new Set(["originX","originY","originZ"]),vo=(t,e,n,i)=>{let o,s;return un.has(n)?(e.get("transform")||(fo(t)||e.get("transformBox")||vo(t,e,"transformBox",new ii("fill-box")),e.set("transform",new ii("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",o=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${o}`}),s=e.get("transformOrigin")):o=Sn(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,o,s)},xo=ao(uo(vo));const wo=ao(uo((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return rt.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ii("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return ho(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?vo:ho)(t,e,n,i)}));const{schedule:To,cancel:bo}=st(queueMicrotask,!1),So={x:!1,y:!1};function Po(){return So.x||So.y}function Eo(t){return"x"===t||"y"===t?So[t]?null:(So[t]=!0,()=>{So[t]=!1}):So.x||So.y?null:(So.x=So.y=!0,()=>{So.x=So.y=!1})}function Ao(t,e){const n=ro(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Mo(t,e,n={}){const[i,o,s]=Ao(t,n);return i.forEach(t=>{let n,i=!1,s=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),s&&(s=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?s=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||Po())return;s=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,o))},o),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,o),window.addEventListener("pointercancel",a,o)},o)}),s}const Vo=(t,e)=>!!e&&(t===e||Vo(t,e.parentElement)),Co=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,ko=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ro(t){return ko.has(t.tagName)||!0===t.isContentEditable}const Do=new Set(["INPUT","SELECT","TEXTAREA"]);function Lo(t){return Do.has(t.tagName)||!0===t.isContentEditable}const Bo=new WeakSet;function jo(t){return e=>{"Enter"===e.key&&t(e)}}function Io(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Oo(t){return Co(t)&&!Po()}const Fo=new WeakSet;function Wo(t,e,n={}){const[i,o,s]=Ao(t,n),r=t=>{const i=t.currentTarget;if(!Oo(t))return;if(Fo.has(t))return;Bo.add(i),n.stopPropagation&&Fo.add(t);const s=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Bo.has(i)&&Bo.delete(i),Oo(t)&&"function"==typeof s&&s(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Vo(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,o),window.addEventListener("pointercancel",l,o)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,o),fo(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=jo(()=>{if(Bo.has(n))return;Io(n,"down");const t=jo(()=>{Io(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Io(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,o)),Ro(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),s}function Uo(t,e){const n=window.getComputedStyle(t);return Sn(e)?n.getPropertyValue(e):n[e]}function No(t){return A(t)&&"ownerSVGElement"in t}const $o=new WeakMap;let zo;const Yo=(t,e,n)=>(i,o)=>o&&o[0]?o[0][t+"Size"]:No(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Ho=Yo("inline","width","offsetWidth"),Xo=Yo("block","height","offsetHeight");function Go({target:t,borderBoxSize:e}){$o.get(t)?.forEach(n=>{n(t,{get width(){return Ho(t,e)},get height(){return Xo(t,e)}})})}function Ko(t){t.forEach(Go)}function _o(t,e){zo||"undefined"!=typeof ResizeObserver&&(zo=new ResizeObserver(Ko));const n=ro(t);return n.forEach(t=>{let n=$o.get(t);n||(n=new Set,$o.set(t,n)),n.add(e),zo?.observe(t)}),()=>{n.forEach(t=>{const n=$o.get(t);n?.delete(e),n?.size||zo?.unobserve(t)})}}const qo=new Set;let Zo;function Jo(t){return qo.add(t),Zo||(Zo=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};qo.forEach(e=>e(t))},window.addEventListener("resize",Zo)),()=>{qo.delete(t),qo.size||"function"!=typeof Zo||(window.removeEventListener("resize",Zo),Zo=void 0)}}function Qo(t,e){return"function"==typeof t?Jo(t):_o(t,e)}function ts(t,e){let n;const i=()=>{const{currentTime:i}=e,o=(null===i?0:i.value)/100;n!==o&&t(o),n=o};return rt.preUpdate(i,!0),()=>at(i)}function es(){const{value:t}=ot;null!==t?(t.frameloop.rate.push(lt.delta),t.animations.mainThread.push(pt.mainThread),t.animations.waapi.push(pt.waapi),t.animations.layout.push(pt.layout)):at(es)}function ns(t){return t.reduce((t,e)=>t+e,0)/t.length}function is(t,e=ns){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const os=t=>Math.round(1e3/t);function ss(){ot.value=null,ot.addProjectionMetrics=null}function rs(){const{value:t}=ot;if(!t)throw new Error("Stats are not being measured");ss(),at(es);const e={frameloop:{setup:is(t.frameloop.setup),rate:is(t.frameloop.rate),read:is(t.frameloop.read),resolveKeyframes:is(t.frameloop.resolveKeyframes),preUpdate:is(t.frameloop.preUpdate),update:is(t.frameloop.update),preRender:is(t.frameloop.preRender),render:is(t.frameloop.render),postRender:is(t.frameloop.postRender)},animations:{mainThread:is(t.animations.mainThread),waapi:is(t.animations.waapi),layout:is(t.animations.layout)},layoutProjection:{nodes:is(t.layoutProjection.nodes),calculatedTargetDeltas:is(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:is(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=os(n.min),n.max=os(n.max),n.avg=os(n.avg),[n.min,n.max]=[n.max,n.min],e}function as(t){return No(t)&&"svg"===t.tagName}function ls(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function cs(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],o=Oe(t[1+n],t[2+n],t[3+n]);return e?o(i):o}function us(t,e){const n=oi(Vi(t)?t.get():t);return hs(n,t,e),n}function hs(t,e,n={}){const i=t.get();let o,s=null,r=i;const a="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,l=()=>{s&&(s.stop(),s=null),t.animation=void 0},c=()=>{(()=>{const e=ps(t.get()),i=ps(r);if(e===i)return void l();const a=s?s.getGeneratorVelocity():t.getVelocity();l(),s=new _e({keyframes:[e,i],velocity:a,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:o})})(),t.animation=s??void 0,t.events.animationStart?.notify(),s?.then(()=>{t.animation=void 0,t.events.animationComplete?.notify()})};if(t.attach((t,e)=>{r=t,o=t=>e(ds(t,a)),rt.postRender(c)},l),Vi(e)){let i=!0===n.skipInitialAnimation;const o=e.on("change",e=>{i?(i=!1,t.jump(ds(e,a),!1)):t.set(ds(e,a))}),s=t.on("destroy",o);return()=>{o(),s()}}return l}function ds(t,e){return e?t+e:t}function ps(t){return"number"==typeof t?t:parseFloat(t)}function ms(t){const e=[];ni.current=e;const n=t();ni.current=void 0;const i=oi(n);return function(t,e,n){const i=()=>e.set(n()),o=()=>rt.preRender(i,!1,!0),s=t.map(t=>t.on("change",o));e.on("destroy",()=>{s.forEach(t=>t()),at(i)})}(e,i,t),i}const fs=[...Ui,Wt,Gt],gs=t=>fs.find(Wi(t));function ys(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let vs={},xs=null;const ws=(t,e)=>{vs[t]=e},Ts=()=>{xs||(xs=document.createElement("style"),xs.id="motion-view");let t="";for(const e in vs){const n=vs[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}xs.textContent=t,document.head.appendChild(xs),vs={}},bs=()=>{xs&&xs.parentElement&&xs.parentElement.removeChild(xs)};function Ss(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Ps(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Es(){return document.getAnimations().filter(Ps)}const As=["layout","enter","exit","new","old"];function Ms(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new Kn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||ws(":root",{"view-transition-name":"none"}),ws("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),Ts();const o=document.startViewTransition(async()=>{await e()});return o.finished.finally(()=>{bs()}),new Promise(t=>{o.ready.then(()=>{const e=Es(),o=[];n.forEach((t,e)=>{for(const n of As){if(!t[n])continue;const{keyframes:s,options:r}=t[n];for(let[t,a]of Object.entries(s)){if(!a)continue;const s={...ri(i,t),...ri(r,t)},l=ys(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof s.delay&&(s.delay=s.delay(0,1)),s.duration&&(s.duration=L(s.duration)),s.delay&&(s.delay=L(s.delay));const c=new In({...s,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});o.push(c)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:s}=e;if(!s)continue;const r=Ss(s);if(!r)continue;const a=n.get(r.layer);if(a)Vs(a,"enter")&&Vs(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?o.push(new Zn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let s={...ri(i,n)};s.duration&&(s.duration=L(s.duration)),s=jn(s);const a=Dn(s.ease,s.duration);e.updateTiming({delay:L(s.delay??0),duration:s.duration,easing:a}),o.push(new Zn(t))}}t(new Kn(o))})})}function Vs(t,e){return t?.[e]?.keyframes.opacity}let Cs=[],ks=null;function Rs(){ks=null;const[t]=Cs;var e;t&&(w(Cs,e=t),ks=e,Ms(e).then(t=>{e.notifyReady(t),t.finished.finally(Rs)}))}function Ds(){for(let t=Cs.length-1;t>=0;t--){const e=Cs[t],{interrupt:n}=e.options;if("immediate"===n){const n=Cs.slice(0,t+1).map(t=>t.update),i=Cs.slice(t+1);e.update=()=>{n.forEach(t=>t())},Cs=[e,...i];break}}ks&&"immediate"!==Cs[0]?.options.interrupt||Rs()}class Ls{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=C,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,Cs.push(n),To.render(Ds)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:o}=this;o.has(i)||o.set(i,{});o.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Bs=()=>({translate:0,scale:1,origin:0,originPoint:0}),js=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Is=()=>({min:0,max:0}),Os=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Fs=new WeakMap;function Ws(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Us(t){return"string"==typeof t||Array.isArray(t)}const Ns=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$s=["initial",...Ns];function zs(t){return Ws(t.animate)||$s.some(e=>Us(t[e]))}function Ys(t){return Boolean(zs(t)||t.variants)}function Hs(t,e,n){for(const i in e){const o=e[i],s=n[i];if(Vi(o))t.addValue(i,o);else if(Vi(s))t.addValue(i,oi(o,{owner:t}));else if(s!==o)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(o):e.hasAnimated||e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,oi(void 0!==e?e:o,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Xs={current:null},Gs={current:!1},Ks="undefined"!=typeof window;function _s(){if(Gs.current=!0,Ks)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Xs.current=t.matches;t.addEventListener("change",e),e()}else Xs.current=!1}const qs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Zs={};function Js(t){Zs=t}function Qs(){return Zs}class tr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:s,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=dt.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Gs.current||_s(),this.shouldReduceMotion=Xs.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),at(this.notifyUpdate),at(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&$n.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:o,ease:s,duration:r}=e.accelerate,a=new In({element:this.current,name:t,keyframes:i,times:o,ease:s,duration:L(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=un.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&rt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),o&&o()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Zs){const e=Zs[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=oi(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(E(n)||M(n))?n=parseFloat(n):!gs(n)&&Gt.test(e)&&(n=to(t,e)),this.setBaseTarget(t,Vi(n)?n.get():n)),Vi(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Ti(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Vi(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new D),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){To.render(this.render)}}class er extends tr{constructor(){super(...arguments),this.KeyframeResolver=no}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Vi(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class nr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ir({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function or({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function sr(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function rr(t){return void 0===t||1===t}function ar({scale:t,scaleX:e,scaleY:n}){return!rr(t)||!rr(e)||!rr(n)}function lr(t){return ar(t)||cr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function cr(t){return ur(t.x)||ur(t.y)}function ur(t){return t&&"0%"!==t}function hr(t,e,n){return n+e*(t-n)}function dr(t,e,n,i,o){return void 0!==o&&(t=hr(t,o,i)),hr(t,n,i)+e}function pr(t,e=0,n=1,i,o){t.min=dr(t.min,e,n,i,o),t.max=dr(t.max,e,n,i,o)}function mr(t,{x:e,y:n}){pr(t.x,e.translate,e.scale,e.originPoint),pr(t.y,n.translate,n.scale,n.originPoint)}const fr=.999999999999,gr=1.0000000000001;function yr(t,e,n,i=!1){const o=n.length;if(!o)return;let s,r;e.x=e.y=1;for(let a=0;afr&&(e.x=1),e.yfr&&(e.y=1)}function vr(t,e){t.min+=e,t.max+=e}function xr(t,e,n,i,o=.5){pr(t,e,n,Zt(t.min,t.max,o),i)}function wr(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function Tr(t,e,n){const i=n??t;xr(t.x,wr(e.x,i.x),e.scaleX,e.scale,e.originX),xr(t.y,wr(e.y,i.y),e.scaleY,e.scale,e.originY)}function br(t,e){return ir(sr(t.getBoundingClientRect(),e))}function Sr(t,e,n){const i=br(t,n),{scroll:o}=e;return o&&(vr(i.x,o.offset.x),vr(i.y,o.offset.y)),i}const Pr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Er=cn.length;function Ar(t,e,n){let i="",o=!0;for(let s=0;s{if(!e.target)return t;if("string"==typeof t){if(!Bt.test(t))return t;t=parseFloat(t)}return`${Cr(t,e.target.x)}% ${Cr(t,e.target.y)}%`}},Rr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,o=Gt.parse(t);if(o.length>5)return i;const s=Gt.createTransformer(t),r="number"!=typeof o[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+r]/=a,o[1+r]/=l;const c=Zt(a,l,.5);return"number"==typeof o[2+r]&&(o[2+r]/=c),"number"==typeof o[3+r]&&(o[3+r]/=c),s(o)}},Dr={borderRadius:{...kr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:kr,borderTopRightRadius:kr,borderBottomLeftRadius:kr,borderBottomRightRadius:kr,boxShadow:Rr};function Lr(t,{layout:e,layoutId:n}){return un.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Dr[t]||"opacity"===t)}function Br(t,e,n){const i=t.style,o=e?.style,s={};if(!i)return s;for(const e in i)(Vi(i[e])||o&&Vi(o[e])||Lr(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(s[e]=i[e]);return s}class jr extends er{constructor(){super(...arguments),this.type="html",this.renderInstance=Vr}readValueFromInstance(t,e){if(un.has(e))return this.projection?.isProjecting?sn(e):an(t,e);{const i=(n=t,window.getComputedStyle(n)),o=(ft(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return br(t,e)}build(t,e,n){Mr(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Br(t,e,n)}}class Ir extends tr{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Or={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fr={offset:"strokeDashoffset",array:"strokeDasharray"};function Wr(t,e,n=1,i=0,o=!0){t.pathLength=1;const s=o?Or:Fr;t[s.offset]=""+-i,t[s.array]=`${e} ${n}`}const Ur=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Nr(t,{attrX:e,attrY:n,attrScale:i,pathLength:o,pathSpacing:s=1,pathOffset:r=0,...a},l,c,u){if(Mr(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const t of Ur)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==o&&Wr(h,o,s,r,!1)}const $r=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),zr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Yr(t,e,n,i){Vr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute($r.has(n)?n:Ri(n),e.attrs[n])}function Hr(t,e,n){const i=Br(t,e,n);for(const n in t)if(Vi(t[n])||Vi(e[n])){i[-1!==cn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class Xr extends er{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Os}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(un.has(e)){const t=Ji(e);return t&&t.default||0}return e=$r.has(e)?e:Ri(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Hr(t,e,n)}build(t,e,n){Nr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Yr(t,e,0,i)}mount(t){this.isSVGTag=zr(t.tagName),super.mount(t)}}const Gr=$s.length;function Kr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Kr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;nPromise.all(e.map(({animation:e,options:n})=>Fi(t,e,n)))}(t),n=ea(),i=!0,o=!1;const s=e=>(n,i)=>{const o=bi(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=Kr(t.parent)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;ed&&g,T=!1;const b=Array.isArray(f)?f:[f];let S=b.reduce(s(p),{});!1===y&&(S={});const{prevResolvedValues:P={}}=m,E={...P,...S},A=e=>{w=!0,u.has(e)&&(T=!0,u.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in E){const e=S[t],n=P[t];if(h.hasOwnProperty(t))continue;let i=!1;i=Pi(e)&&Pi(n)?!_r(e,n)||x:e!==n,i?null!=e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=S,m.isActive&&(h={...h,...S}),(i||o)&&t.blockInitialAnimation&&(w=!1);const M=v&&x;w&&(!M||T)&&c.push(...b.map(e=>{const n={type:p};if("string"==typeof e&&(i||o)&&!M&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,o=bi(i,e);if(i.enteringChildren&&o){const{delayChildren:e}=o.transition||{};n.delay=ei(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof a.initial){const n=bi(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),o=t.getValue(n);o&&(o.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let p=Boolean(c.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,o=!1,p?e(c):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const o=r(e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=ea(),o=!0}}}function Qr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!_r(e,t)}function ta(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ea(){return{animate:ta(!0),whileInView:ta(),whileHover:ta(),whileTap:ta(),whileDrag:ta(),whileFocus:ta(),exit:ta()}}function na(t,e){t.min=e.min,t.max=e.max}function ia(t,e){na(t.x,e.x),na(t.y,e.y)}function oa(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function sa(t){return t.max-t.min}function ra(t,e,n){return Math.abs(t-e)<=n}function aa(t,e,n,i=.5){t.origin=i,t.originPoint=Zt(e.min,e.max,t.origin),t.scale=sa(n)/sa(e),t.translate=Zt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function la(t,e,n,i){aa(t.x,e.x,n.x,i?i.originX:void 0),aa(t.y,e.y,n.y,i?i.originY:void 0)}function ca(t,e,n,i=0){const o=i?Zt(n.min,n.max,i):n.min;t.min=o+e.min,t.max=t.min+sa(e)}function ua(t,e,n,i){ca(t.x,e.x,n.x,i?.x),ca(t.y,e.y,n.y,i?.y)}function ha(t,e,n,i=0){const o=i?Zt(n.min,n.max,i):n.min;t.min=e.min-o,t.max=t.min+sa(e)}function da(t,e,n,i){ha(t.x,e.x,n.x,i?.x),ha(t.y,e.y,n.y,i?.y)}function pa(t,e,n,i,o){return t=hr(t-=e,1/n,i),void 0!==o&&(t=hr(t,1/o,i)),t}function ma(t,e=0,n=1,i=.5,o,s=t,r=t){if(Lt.test(e)){e=parseFloat(e);e=Zt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Zt(s.min,s.max,i);t===s&&(a-=e),t.min=pa(t.min,e,n,a,o),t.max=pa(t.max,e,n,a,o)}function fa(t,e,[n,i,o],s,r){ma(t,e[n],e[i],e[o],e.scale,s,r)}const ga=["x","scaleX","originX"],ya=["y","scaleY","originY"];function va(t,e,n,i){fa(t.x,e,ga,n?n.x:void 0,i?i.x:void 0),fa(t.y,e,ya,n?n.y:void 0,i?i.y:void 0)}function xa(t){return 0===t.translate&&1===t.scale}function wa(t){return xa(t.x)&&xa(t.y)}function Ta(t,e){return t.min===e.min&&t.max===e.max}function ba(t,e){return Ta(t.x,e.x)&&Ta(t.y,e.y)}function Sa(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Pa(t,e){return Sa(t.x,e.x)&&Sa(t.y,e.y)}function Ea(t){return sa(t.x)/sa(t.y)}function Aa(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Ma(t){return[t("x"),t("y")]}function Va(t,e,n){let i="";const o=t.x.translate/e.x,s=t.y.translate/e.y,r=n?.z||0;if((o||s||r)&&(i=`translate3d(${o}px, ${s}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,pathRotation:o,rotateX:s,rotateY:r,skewX:a,skewY:l}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),o&&(i+=`rotate(${o}deg) `),s&&(i+=`rotateX(${s}deg) `),r&&(i+=`rotateY(${r}deg) `),a&&(i+=`skewX(${a}deg) `),l&&(i+=`skewY(${l}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Ca=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ka=Ca.length,Ra=t=>"string"==typeof t?parseFloat(t):t,Da=t=>"number"==typeof t||Bt.test(t);function La(t,e,n,i,o,s){o?(t.opacity=Zt(0,n.opacity??1,ja(i)),t.opacityExit=Zt(e.opacity??1,0,Ia(i))):s&&(t.opacity=Zt(e.opacity??1,n.opacity??1,i));for(let o=0;oie?1:n(R(t,e,i))}function Fa(t,e,n){const i=Vi(t)?t:oi(t);return i.start(pi("",i,e,n)),i.animation}function Wa(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Ua=(t,e)=>t.depth-e.depth;class Na{constructor(){this.children=[],this.isDirty=!1}add(t){x(this.children,t),this.isDirty=!0}remove(t){w(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ua),this.isDirty=!1,this.children.forEach(t)}}function $a(t,e){const n=dt.now(),i=({timestamp:o})=>{const s=o-n;s>=e&&(at(i),t(s-e))};return rt.setup(i,!0),()=>at(i)}function za(t){return Vi(t)?t.get():t}class Ya{constructor(){this.members=[]}add(t){x(this.members,t);for(let e=this.members.length-1;e>=0;e--){const n=this.members[e];if(n===t||n===this.lead||n===this.prevLead)continue;const i=n.instance;i&&!1!==i.isConnected||n.snapshot||(w(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(w(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:o}=t.options;void 0!==i&&i===o||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Ha={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Xa={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ga=["","X","Y","Z"];let Ka=0;function _a(t,e,n,i){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),i&&(i[t]=0))}function qa(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Bi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",rt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&qa(i)}function Za({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=Ka++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ot.value&&(Xa.nodes=Xa.calculatedTargetDeltas=Xa.calculatedProjections=0),this.nodes.forEach(tl),this.nodes.forEach(cl),this.nodes.forEach(ul),this.nodes.forEach(el),ot.addProjectionMetrics&&ot.addProjectionMetrics(Xa)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;rt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=$a(o,250),Ha.hasAnimatedSinceResize&&(Ha.hasAnimatedSinceResize=!1,this.nodes.forEach(ll)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&o&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||gl,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Pa(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...ri(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||ll(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),at(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(hl),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&qa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||sa(this.snapshot.measuredBox.x)||sa(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t{const n=e/1e3,i=p?.(n);i?(r.x.translate=i.x,r.x.scale=Zt(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Zt(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(pl(r.x,t.x,n),pl(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(da(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),function(t,e,n,i){ml(t.x,e.x,n.x,i),ml(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&ba(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),ia(d,this.relativeTarget)),l&&(this.animationValues=s,La(s,o,this.latestValues,n,h,u)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=s),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(at(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{Ha.hasAnimatedSinceResize=!0,pt.layout++,this.motionValue||(this.motionValue=oi(0)),this.motionValue.jump(0,!1),this.currentAnimation=Fa(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{pt.layout--},onComplete:()=>{pt.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:o}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&wl(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=sa(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=sa(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ia(e,n),Tr(e,o),la(this.projectionDeltaWithTransform,this.layoutCorrected,e,o)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Ya);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&_a("z",t,i,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(il),this.root.sharedNodes.clear()}}}function Ja(t){t.updateLayout()}function Qa(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:o}=t.options,s=e.source!==t.layout.source;if("size"===o)Ma(t=>{const i=s?e.measuredBox[t]:e.layoutBox[t],o=sa(i);i.min=n[t].min,i.max=i.min+o});else if("x"===o||"y"===o){const t="x"===o?"y":"x";na(s?e.measuredBox[t]:e.layoutBox[t],n[t])}else wl(o,e.layoutBox,n)&&Ma(i=>{const o=s?e.measuredBox[i]:e.layoutBox[i],r=sa(n[i]);o.max=o.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};la(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};s?la(a,t.applyTransform(i,!0),e.measuredBox):la(a,n,e.layoutBox);const l=!wa(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:o,layout:s}=i;if(o&&s){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};da(a,e.layoutBox,o.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};da(l,n,s.layoutBox,r),Pa(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function tl(t){ot.value&&Xa.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function el(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function nl(t){t.clearSnapshot()}function il(t){t.clearMeasurements()}function ol(t){t.isLayoutDirty=!0,t.updateLayout()}function sl(t){t.isLayoutDirty=!1}function rl(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function al(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ll(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function cl(t){t.resolveTargetDelta()}function ul(t){t.calcProjection()}function hl(t){t.resetSkewAndRotation()}function dl(t){t.removeLeadSnapshot()}function pl(t,e,n){t.translate=Zt(e.translate,0,n),t.scale=Zt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ml(t,e,n,i){t.min=Zt(e.min,n.min,i),t.max=Zt(e.max,n.max,i)}function fl(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const gl={duration:.45,ease:[.4,0,.1,1]},yl=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),vl=yl("applewebkit/")&&!yl("chrome/")?Math.round:C;function xl(t){t.min=vl(t.min),t.max=vl(t.max)}function wl(t,e,n){return"position"===t||"preserve-aspect"===t&&!ra(Ea(e),Ea(n),.2)}function Tl(t){return t!==t.root&&t.scroll?.wasRoot}const bl=Za({attachResizeListener:(t,e)=>Wa(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Sl=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Pl(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Sl);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const o=e.get(i);o&&(o(),e.delete(i)),n()},dirty:n}}const El={current:void 0},Al=Za({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!El.current){const t=new bl({});t.mount(window),t.setOptions({layoutScroll:!0}),El.current=t}return El.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ml="[data-layout], [data-layout-id]",Vl=()=>{};function Cl(t){const e=Array.from(t.querySelectorAll(Ml));return t instanceof Element&&t.matches(Ml)&&(e.includes(t)||e.unshift(t)),e}function kl(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e}}function Rl(t,e,n){const i=Fs.get(t),o=i??new jr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&o.projection||(o.projection=new Al(o.latestValues,e)),o.projection.setOptions({...n,visualElement:o}),o.current?o.projection.instance||o.projection.mount(t):o.mount(t),i||Fs.set(t,o),{element:t,visualElement:o,projection:o.projection}}function Dl(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const Ll=rt,Bl=it.reduce((t,e)=>(t[e]=t=>at(t),t),{}),jl=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Il(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function Ol(...t){return i.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=Il(t,e);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let e=0;e{const{width:t,height:e,top:i,left:d,right:p,bottom:m,direction:f}=u.current;if(n||!1===a||!c.current||!t||!e)return;const g="rtl"===f,y="left"===o?g?`right: ${p}`:`left: ${d}`:g?`left: ${d}`:`right: ${p}`,v="bottom"===s?`bottom: ${m}`:`top: ${i}`;c.current.dataset.motionPopId=l;const x=document.createElement("style");h&&(x.nonce=h);const w=r??document.head;return w.appendChild(x),x.sheet&&x.sheet.insertRule(`\n [data-motion-pop-id="${l}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${y}px !important;\n ${v}px !important;\n }\n `),()=>{c.current?.removeAttribute("data-motion-pop-id"),w.contains(x)&&w.removeChild(x)}},[n]),d(Fl,{isPresent:n,childRef:c,sizeRef:u,pop:a,children:!1===a?t:i.cloneElement(t,{ref:m})})}const Ul=({children:t,initial:n,isPresent:o,onExitComplete:s,custom:r,presenceAffectsLayout:a,mode:l,anchorX:c,anchorY:u,root:h})=>{const p=f(Nl),m=e.useId();let g=!0,y=e.useMemo(()=>(g=!1,{id:m,initial:n,isPresent:o,custom:r,onExitComplete:t=>{p.set(t,!0);for(const t of p.values())if(!t)return;s&&s()},register:t=>(p.set(t,!1),()=>p.delete(t))}),[o,p,s]);return a&&g&&(y={...y}),e.useMemo(()=>{p.forEach((t,e)=>p.set(e,!1))},[o]),i.useEffect(()=>{!o&&!p.size&&s&&s()},[o]),t=d(Wl,{pop:"popLayout"===l,isPresent:o,anchorX:c,anchorY:u,root:h,children:t}),d(v.Provider,{value:y,children:t})};function Nl(){return new Map}function $l(t=!0){const n=e.useContext(v);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:o,register:s}=n,r=e.useId();e.useEffect(()=>{if(t)return s(r)},[t]);const a=e.useCallback(()=>t&&o&&o(r),[r,o,t]);return!i&&o?[!1,a]:[!0]}const zl=t=>t.key||"";function Yl(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const Hl=e.createContext(null);function Xl(){const t=function(){const t=e.useRef(!1);return y(()=>(t.current=!0,()=>{t.current=!1}),[]),t}(),[n,i]=e.useState(0),o=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>rt.postRender(o),[o]),n]}const Gl=t=>!0===t,Kl=({children:t,id:n,inherit:i=!0})=>{const o=e.useContext(m),s=e.useContext(Hl),[r,a]=Xl(),l=e.useRef(null),c=o.id||s;null===l.current&&((t=>Gl(!0===t)||"id"===t)(i)&&c&&(n=n?c+"-"+n:c),l.current={id:n,group:Gl(i)&&o.group||Pl()});const u=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(m.Provider,{value:u,children:t})},_l=e.createContext({strict:!1}),ql={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Zl=!1;function Jl(){return function(){if(Zl)return;const t={};for(const e in ql)t[e]={isEnabled:t=>ql[e].some(e=>!!t[e])};Js(t),Zl=!0}(),Qs()}function Ql(t){const e=Jl();for(const n in t)e[n]={...e[n],...t[n]};Js(e)}function tc(t){return"function"==typeof t}const ec=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function nc(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ec.has(t)}let ic=t=>!nc(t);function oc(t){"function"==typeof t&&(ic=e=>e.startsWith("on")?!nc(e):t(e))}try{oc(require("@emotion/is-prop-valid").default)}catch{}function sc(t,e,n){const i={};for(const o in t)"values"===o&&"object"==typeof t.values||Vi(t[o])||(ic(o)||!0===n&&nc(o)||!e&&!nc(o)||t.draggable&&o.startsWith("onDrag"))&&(i[o]=t[o]);return i}const rc=e.createContext(null),ac=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function lc(t){return"string"==typeof t&&!t.includes("-")&&!!(ac.indexOf(t)>-1||/[A-Z]/u.test(t))}const cc=(t,n)=>n.isSVG??lc(t)?new Xr(n):new jr(n,{allowProjection:t!==e.Fragment}),uc=e.createContext({});function hc(t){const{initial:n,animate:i}=function(t,e){if(zs(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Us(e)?e:void 0,animate:Us(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(uc));return e.useMemo(()=>({initial:n,animate:i}),[dc(n),dc(i)])}function dc(t){return Array.isArray(t)?t.join(" "):t}const pc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mc(t,e,n){for(const i in e)Vi(e[i])||Lr(i,n)||(t[i]=e[i])}function fc(t,n){const i={};return mc(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Mr(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function gc(t,e){const n={},i=fc(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const yc=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function vc(t,n,i,o){const s=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Nr(e,n,zr(o),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};mc(e,t.style,t),s.style={...e,...s.style}}return s}function xc(t,n,i,{latestValues:o},s,r=!1,a){const l=(a??lc(t)?vc:gc)(n,o,s,t),c=sc(n,"string"==typeof t,r),u=t!==e.Fragment?{...c,...l,ref:i}:{},{children:h}=n,d=e.useMemo(()=>Vi(h)?h.get():h,[h]);return e.createElement(t,{...u,children:d})}function wc(t,e,n,i){const o={},s=i(t,{});for(const t in s)o[t]=za(s[t]);let{initial:r,animate:a}=t;const l=zs(t),c=Ys(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const h=u?a:r;if(h&&"boolean"!=typeof h&&!Ws(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n(n,i)=>{const o=e.useContext(uc),s=e.useContext(v),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,o){return{latestValues:wc(n,i,o,t),renderState:e()}}(t,n,o,s);return i?r():f(r)},bc=Tc({scrapeMotionValuesFromProps:Br,createRenderState:pc}),Sc=Tc({scrapeMotionValuesFromProps:Hr,createRenderState:yc}),Pc=Symbol.for("motionComponentSymbol");function Ec(t,n,i){const o=e.useRef(i);e.useInsertionEffect(()=>{o.current=i});const s=e.useRef(null);return e.useCallback(e=>{e&&t.onMount?.(e),n&&(e?n.mount(e):n.unmount());const i=o.current;if("function"==typeof i)if(e){const t=i(e);"function"==typeof t&&(s.current=t)}else s.current?(s.current(),s.current=null):i(e);else i&&(i.current=e)},[n])}const Ac=e.createContext({});function Mc(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function Vc(t,n,i,o,s,r){const{visualElement:a}=e.useContext(uc),l=e.useContext(_l),c=e.useContext(v),u=e.useContext(jl),h=u.reducedMotion,d=u.skipAnimations,p=e.useRef(null),m=e.useRef(!1);o=o||l.renderer,!p.current&&o&&(p.current=o(t,{visualState:n,parent:a,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:h,skipAnimations:d,isSVG:r}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const f=p.current,g=e.useContext(Ac);!f||f.projection||!s||"html"!==f.type&&"svg"!==f.type||function(t,e,n,i){const{layoutId:o,layout:s,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Cc(t.parent)),t.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:Boolean(r)||a&&Mc(a),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}(p.current,i,s,g);const x=e.useRef(!1);e.useInsertionEffect(()=>{f&&x.current&&f.update(i,c)});const w=i[Li],T=e.useRef(Boolean(w)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return y(()=>{m.current=!0,f&&(x.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),T.current&&f.animationState&&f.animationState.animateChanges())}),e.useEffect(()=>{f&&(!T.current&&f.animationState&&f.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),T.current=!1),f.enteringChildren=void 0)}),f}function Cc(t){if(t)return!1!==t.options.allowProjection?t.projection:Cc(t.parent)}function kc(t,{forwardMotionProps:n=!1,type:i}={},o,s){o&&Ql(o);const r=i?"svg"===i:lc(t),a=r?Sc:bc;function l(i,o){let l;const c={...e.useContext(jl),...i,layoutId:Rc(i)},{isStatic:u}=c,h=hc(i),m=a(i,u);if(!u&&"undefined"!=typeof window){e.useContext(_l).strict;const n=function(t){const e=Jl(),{drag:n,layout:i}=e;if(!n&&!i)return{};const o={...n,...i};return{MeasureLayout:n?.isEnabled(t)||i?.isEnabled(t)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(c);l=n.MeasureLayout,h.visualElement=Vc(t,m,c,s,n.ProjectionNode,r)}return p(uc.Provider,{value:h,children:[l&&h.visualElement?d(l,{visualElement:h.visualElement,...c}):null,xc(t,i,Ec(m,h.visualElement,o),m,u,n,r)]})}l.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const c=e.forwardRef(l);return c[Pc]=t,c}function Rc({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}function Dc(t,e){if("undefined"==typeof Proxy)return kc;const n=new Map,i=(n,i)=>kc(n,i,t,e);return new Proxy((t,e)=>i(t,e),{get:(o,s)=>"create"===s?i:(n.has(s)||n.set(s,kc(s,void 0,t,e)),n.get(s))})}let Lc=0;const Bc={animation:{Feature:class extends nr{constructor(t){super(t),t.animationState||(t.animationState=Jr(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ws(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends nr{constructor(){super(...arguments),this.id=Lc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&!1===n){if(this.isExitComplete){const{initial:t,custom:e}=this.node.getProps();if("string"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)){const n=bi(this.node,t,e);if(n){const{transition:t,transitionEnd:e,...i}=n;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function jc(t){return{point:{x:t.pageX,y:t.pageY}}}const Ic=t=>e=>Co(e)&&t(e,jc(e));function Oc(t,e,n,i){return Wa(t,e,Ic(n),i)}const Fc=({current:t})=>t?t.ownerDocument.defaultView:null,Wc=(t,e)=>Math.abs(t-e);function Uc(t,e){const n=Wc(t.x,e.x),i=Wc(t.y,e.y);return Math.sqrt(n**2+i**2)}const Nc=new Set(["auto","scroll"]);class $c{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=zc(this.lastRawMoveEventInfo,this.transformPagePoint));const t=Hc(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Uc(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:o}=lt;this.history.push({...i,timestamp:o});const{onStart:s,onMove:r}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=zc(e,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const s=Hc("pointercancel"===t.type?this.lastMoveEventInfo:zc(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),i&&i(t,s)},!Co(t))return;this.dragSnapToOrigin=o,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=s,this.contextWindow=i||window;const a=zc(jc(t),this.transformPagePoint),{point:l}=a,{timestamp:c}=lt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=e;u&&u(t,Hc(a,this.history)),this.removeListeners=k(Oc(this.contextWindow,"pointermove",this.handlePointerMove),Oc(this.contextWindow,"pointerup",this.handlePointerUp),Oc(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(Nc.has(t.overflowX)||Nc.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o=i.x-e.x,s=i.y-e.y;0===o&&0===s||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o,this.lastMoveEventInfo.point.y+=s):this.history.length>0&&(this.history[0].x-=o,this.history[0].y-=s),this.scrollPositions.set(t,i),rt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),at(this.updatePoint)}}function zc(t,e){return e?{point:e(t.point)}:t}function Yc(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Hc({point:t},e){return{point:t,delta:Yc(t,Gc(e)),offset:Yc(t,Xc(e)),velocity:Kc(e,.1)}}function Xc(t){return t[0]}function Gc(t){return t[t.length-1]}function Kc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const o=Gc(t);for(;n>=0&&(i=t[n],!(o.timestamp-i.timestamp>L(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&o.timestamp-i.timestamp>2*L(e)&&(i=t[1]);const s=B(o.timestamp-i.timestamp);if(0===s)return{x:0,y:0};const r={x:(o.x-i.x)/s,y:(o.y-i.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function _c(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function qc(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min{e&&this.snapToCursor(jc(t).point),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:o}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Eo(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ma(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Lt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=sa(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),o&&rt.update(()=>o(t,e),!1,!0),ki(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:o,onDrag:s}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),s&&rt.update(()=>s(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:n,contextWindow:Fc(this.visualElement),element:this.visualElement.current})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!n)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:r}=this.getProps();r&&rt.postRender(()=>r(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!iu(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:n},i){return void 0!==e&&tn&&(t=i?Zt(n,t,i.max):Math.min(t,n)),t}(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&Mc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:o}){return{x:_c(t.x,n,o),y:_c(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=Zc){return!1===t?t=0:!0===t&&(t=Zc),{x:Jc(t,"left","right"),y:Jc(t,"top","bottom")}}(e),i!==this.constraints&&!Mc(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ma(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Mc(e))return!1;const i=e.current;t.invariant(null!==i,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;o.root&&(o.root.scroll=void 0,o.root.updateScroll());const s=Sr(i,o.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:qc(t.x,e.x),y:qc(t.y,e.y)}}(o.layout.layoutBox,s);if(n){const t=n(or(r));this.hasMutatedConstraints=!!t,t&&(r=ir(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Ma(r=>{if(!iu(r,e,this.currentDirection))return;let l=a&&a[r]||{};!0!==s&&s!==r||(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return ki(this.visualElement,t),n.start(pi(t,n,0,e,this.visualElement,!1))}stopAnimation(){Ma(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Ma(e=>{const{drag:n}=this.getProps();if(!iu(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:s}=i.layout.layoutBox[e],r=o.get()||0;o.set(t[e]-Zt(n,s,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Mc(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ma(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=sa(t),o=sa(e);return o>i?n=R(e.min,e.max-i,t.min):i>o&&(n=R(t.min,t.max-o,e.min)),b(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ma(e=>{if(!iu(e,t,null))return;const n=this.getAxisMotionValue(e),{min:o,max:s}=this.constraints[e];n.set(Zt(o,s,i[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;tu.set(this.visualElement,this);const t=this.visualElement.current,e=Oc(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),o=e.target,s=o!==t&&Lo(o);n&&i&&!s&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps();Mc(e)&&e.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=Qo(t,nu(n)),o=Qo(e,nu(n));return()=>{i(),o()}}(t,e.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,s=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),rt.read(i);const r=Wa(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ma(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),e(),s(),a&&a(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Zc,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:r}}}function nu(t){let e=!0;return()=>{e?e=!1:t()}}function iu(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const ou=t=>(e,n)=>{t&&rt.update(()=>t(e,n),!1,!0)};let su=!1;class ru extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;o&&(e.group&&e.group.add(o),n&&n.register&&i&&n.register(o),su&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ha.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:o}=this.props,{projection:s}=n;return s?(s.isPresent=o,t.layoutDependency!==e&&s.setOptions({...s.options,layoutDependency:e}),su=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||rt.postRender(()=>{const t=s.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:t,layoutAnchor:e}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=e,n.root.didUpdate(),To.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;su=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function au(t){const[n,i]=$l(),o=e.useContext(m);return d(ru,{...t,layoutGroup:o,switchLayoutGroup:e.useContext(Ac),isPresent:n,safeToRemove:i})}const lu={pan:{Feature:class extends nr{constructor(){super(...arguments),this.removePointerDownListener=C}onPointerDown(t){this.session=new $c(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Fc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:ou(t),onStart:ou(e),onMove:ou(n),onEnd:(t,e)=>{delete this.session,i&&rt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Oc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends nr{constructor(t){super(t),this.removeGroupControls=C,this.removeListeners=C,this.controls=new eu(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||C}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Al,MeasureLayout:au}};function cu(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const o=i["onHover"+n];o&&rt.postRender(()=>o(e,jc(e)))}function uu(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const o=i["onTap"+("End"===n?"":n)];o&&rt.postRender(()=>o(e,jc(e)))}const hu=new WeakMap,du=new WeakMap,pu=t=>{const e=hu.get(t.target);e&&e(t)},mu=t=>{t.forEach(pu)};function fu(t,e,n){const i=function({root:t,...e}){const n=t||document;du.has(n)||du.set(n,{});const i=du.get(n),o=JSON.stringify(e);return i[o]||(i[o]=new IntersectionObserver(mu,{root:t,...e})),i[o]}(e);return hu.set(t,n),i.observe(t),()=>{hu.delete(t),i.unobserve(t)}}const gu={some:0,all:1};const yu={inView:{Feature:class extends nr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:o}=t,s={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:gu[i]};this.stopObserver=fu(this.node.current,s,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,o&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),s=e?n:i;s&&s(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends nr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=Wo(t,(t,e)=>(uu(this.node,e,"Start"),(t,{success:e})=>uu(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends nr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=k(Wa(this.node.current,"focus",()=>this.onFocus()),Wa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=Mo(t,(t,e)=>(cu(this.node,e,"Start"),t=>cu(this.node,t,"End"))))}unmount(){}}}},vu={layout:{ProjectionNode:Al,MeasureLayout:au}},xu=Dc({...Bc,...yu,...lu,...vu},cc);function wu({children:n,as:i="ul",axis:o="y",onReorder:s,values:r,...a},l){const c=f(()=>xu[i]),u=[],h=e.useRef(!1),p=e.useRef(null);t.invariant(Boolean(r),"Reorder.Group must be provided a values prop","reorder-values");const m={axis:o,groupRef:p,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[o]:u.push({value:t,layout:e[o]}),u.sort(bu)},updateOrder:(t,e,n)=>{if(h.current)return;const i=function(t,e,n,i){if(!i)return t;const o=t.findIndex(t=>t.value===e);if(-1===o)return t;const s=i>0?1:-1,r=t[o+s];if(!r)return t;const a=t[o],l=r.layout,c=Zt(l.min,l.max,.5);return 1===s&&a.layout.max+n>c||-1===s&&a.layout.min+n{h.current=!1});const g={overflowAnchor:"none",...a.style};return d(c,{...a,style:g,ref:t=>{p.current=t,"function"==typeof l?l(t):l&&(l.current=t)},ignoreStrict:!0,children:d(rc.Provider,{value:m,children:n})})}const Tu=e.forwardRef(wu);function bu(t,e){return t.layout.min-e.layout.min}function Su(t){const n=f(()=>oi(t)),{isStatic:i}=e.useContext(jl);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function Pu(t,e){const n=Su(e()),i=()=>n.set(e());return i(),y(()=>{const e=()=>rt.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),at(i)}}),n}function Eu(t,e,n,i){if("function"==typeof t)return function(t){ni.current=[],t();const e=Pu(ni.current,t);return ni.current=void 0,e}(t);if(void 0!==n&&!Array.isArray(n)&&"function"!=typeof e)return function(t,e,n,i){const o=f(()=>Object.keys(n)),s=f(()=>({}));for(const r of o)s[r]=Eu(t,e,n[r],i);return s}(t,e,n,i);const o="function"==typeof e?e:cs(e,n,i),s=Array.isArray(t)?Au(t,o):Au([t],([t])=>o(t)),r=Array.isArray(t)?void 0:t.accelerate;return r&&!r.isTransformed&&"function"!=typeof e&&Array.isArray(n)&&!1!==i?.clamp&&(s.accelerate={...r,times:e,keyframes:n,isTransformed:!0,...i?.ease?{ease:i.ease}:{}}),s}function Au(t,e){const n=f(()=>[]);return Pu(t,()=>{n.length=0;const i=t.length;for(let e=0;e0))return;Cu.set(o,a);const t="x"===n?o.scrollWidth-(c?window.innerWidth:o.clientWidth):o.scrollHeight-(c?window.innerHeight:o.clientHeight);Vu.set(o,t)}if(r>0){const t=Vu.get(o);if(("x"===n?c?window.scrollX:o.scrollLeft:c?window.scrollY:o.scrollTop)>=t)return}"x"===n?c?window.scrollBy({left:r}):o.scrollLeft+=r:c?window.scrollBy({top:r}):o.scrollTop+=r}function Bu(t,e=0){return Vi(t)?t:Su(e)}function ju({children:n,style:i={},value:o,as:s="li",onDrag:r,onDragEnd:a,layout:l=!0,...c},u){const h=f(()=>xu[s]),p=e.useContext(rc),m={x:Bu(i.x),y:Bu(i.y)},g=Eu([m.x,m.y],([t,e])=>t||e?1:"unset");t.invariant(Boolean(p),"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:y,registerItem:v,updateOrder:x,groupRef:w}=p;return d(h,{drag:y,...c,dragSnapToOrigin:!0,style:{...i,x:m.x,y:m.y,zIndex:g},layout:l,onDrag:(t,e)=>{const{velocity:n,point:i}=e,s=m[y].get();x(o,s,n[y]),Lu(w.current,i[y],y,n[y]),r&&r(t,e)},onDragEnd:(t,e)=>{!function(){if(ku){const t=Du(ku,"y");t&&(Cu.delete(t),Vu.delete(t));const e=Du(ku,"x");e&&e!==t&&(Cu.delete(e),Vu.delete(e)),ku=null}}(),a&&a(t,e)},onLayoutMeasure:t=>{v(o,t)},ref:u,ignoreStrict:!0,children:n})}const Iu=e.forwardRef(ju);var Ou=Object.freeze({__proto__:null,Group:Tu,Item:Iu});function Fu(t){return"object"==typeof t&&!Array.isArray(t)}function Wu(t,e,n,i){return null==t?[]:"string"==typeof t&&Fu(e)?ro(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function Uu(t,e,n){return t*(e+1)+n*e}function Nu(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function $u(t,e,n,i,o,s){!function(t,e,n){for(let i=0;ie&&o.at"number"==typeof t,qu=t=>t.every(_u);function Zu(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=No(t)&&!as(t)?new Xr(e):new jr(e);n.mount(t),Fs.set(t,n)}function Ju(t){const e=new Ir({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Fs.set(t,e)}function Qu(e,n,i,o){const s=[];if(function(t,e){return Vi(t)||"number"==typeof t||"string"==typeof t&&!Fu(e)}(e,n))s.push(Fa(e,Fu(n)&&n.default||n,i&&i.default||i));else{if(null==e)return s;const r=Wu(e,n,o),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t{const c=Gu(e),{delay:u=0,times:h=We(c),type:m=n.type||"keyframes",repeat:f,repeatType:g,repeatDelay:v=0,...x}=i;let{ease:w=n.ease||"easeOut",duration:T}=i;const b="function"==typeof u?u(a,l):u,S=c.length,P=Bn(m)?m:s?.[m||"keyframes"];if(S<=2&&P){let t=100;if(2===S&&qu(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...n,...x};void 0!==T&&(e.duration=L(T));const i=me(e,t,P);w=i.ease,T=i.duration}T??(T=r);const E=d+b;1===h.length&&0===h[0]&&(h[1]=1);const A=h.length-c.length;if(A>0&&Fe(h,A),1===c.length&&c.unshift(null),f&&t.warning(f<20,`Sequence segments can't repeat ${f} times — ignoring repeat option. Use a value below 20 or apply repeat at the sequence level instead.`),f&&f<20){const t=T>0?v/T:0;T=Uu(T,f,v);const e=[...c],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w],o="reverse"===g||"mirror"===g;let s=e,r=i;o&&(s=[...e].reverse(),"reverse"===g&&(r=[...i].reverse().map(t=>"function"==typeof t?N(t):t)));for(let a=0;a0&&(c.push(c[c.length-1]),h.push(p),w.push("linear")),c.push(...u);for(let t=0;t{for(const o in t){const s=t[o];s.sort(Yu);const r=[],l=[],c=[];for(let t=0;t{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=oi(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:Be});return s.forEach(({keyframes:t,transition:e},n)=>{o.push(...Qu(n,t,e))}),o}function eh(t={}){const{scope:e,reduceMotion:n,skipAnimations:i}=t;return function(t,o,s){let r,a=[];const l={};if(void 0!==n&&(l.reduceMotion=n),void 0!==i&&(l.skipAnimations=i),c=t,Array.isArray(c)&&c.some(Array.isArray)){const{onComplete:n,...i}=o||{};"function"==typeof n&&(r=n),a=th(t,{...l,...i},e)}else{const{onComplete:n,...i}=s||{};"function"==typeof n&&(r=n),a=Qu(t,o,{...l,...i},e)}var c;const u=new qn(a);return r&&u.finished.then(r),e&&(e.animations.push(u),u.finished.then(()=>{w(e.animations,u)})),u}}const nh=eh();const ih=e=>function(n,i,o){return new qn(function(e,n,i,o){if(null==e)return[];const s=ro(e,o),r=s.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;te.delete(n)),l.push(o)}return l}(n,i,o,e))},oh=ih();function sh(t){return"undefined"!=typeof window&&(t?Vn():Mn())}const rh={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ah(t,e,n,i){const o=n[e],{length:s,position:r}=rh[e],a=o.current,l=n.time;o.current=Math.abs(t[`scroll${r}`]),o.scrollLength=t[`scroll${s}`]-t[`client${s}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=R(0,o.scrollLength,o.current);const c=i-l;o.velocity=c>50?0:j(o.current-a,c)}const lh={start:0,center:.5,end:1};function ch(t,e,n=0){let i=0;if(t in lh&&(t=lh[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const uh=[0,0];function hh(t,e,n,i){let o=Array.isArray(t)?t:uh,s=0,r=0;return"number"==typeof t?o=[t,t]:"string"==typeof t&&(o=(t=t.trim()).includes(" ")?t.split(" "):[t,lh[t]?t:"0"]),s=ch(o[0],n,i),r=ch(o[1],e),s-r}const dh={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ph={x:0,y:0};function mh(t,e,n){const{offset:i=dh.All}=n,{target:o=t,axis:s="y"}=n,r="y"===s?"height":"width",a=o!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(fo(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let o=null,s=i.parentNode;for(;!o;)"svg"===s.tagName&&(o=s),s=i.parentNode;i=o}}return n}(o,t):ph,l=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o),c={width:t.clientWidth,height:t.clientHeight};e[s].offset.length=0;let u=!e[s].interpolate;const h=i.length;for(let t=0;t{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),function(t,e,n){ah(t,"x",e,n),ah(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&mh(t,n,i)},notify:()=>e(n)}}const gh=new WeakMap,yh=new WeakMap,vh=new WeakMap,xh=new WeakMap,wh=new WeakMap,Th=t=>t===document.scrollingElement?window:t;function bh(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return C;let o=vh.get(e);o||(o=new Set,vh.set(e,o));const s=fh(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(o.add(s),!gh.has(e)){const t=()=>{for(const t of o)t.measure(lt.timestamp);rt.preUpdate(n)},n=()=>{for(const t of o)t.notify()},i=()=>rt.read(t);gh.set(e,i);const s=Th(e);window.addEventListener("resize",i),e!==document.documentElement&&yh.set(e,Qo(e,i)),s.addEventListener("scroll",i),i()}if(n&&!wh.has(e)){const t=gh.get(e),n={width:e.scrollWidth,height:e.scrollHeight};xh.set(e,n);const i=()=>{const i=e.scrollWidth,o=e.scrollHeight;n.width===i&&n.height===o||(t(),n.width=i,n.height=o)},o=rt.read(i,!0);wh.set(e,o)}const r=gh.get(e);return rt.read(r,!1,!0),()=>{at(r);const t=vh.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=gh.get(e);gh.delete(e),n&&(Th(e).removeEventListener("scroll",n),yh.get(e)?.(),window.removeEventListener("resize",n));const i=wh.get(e);i&&(at(i),wh.delete(e)),xh.delete(e)}}const Sh=[[dh.Enter,"entry"],[dh.Exit,"exit"],[dh.Any,"cover"],[dh.All,"contain"]],Ph={start:0,end:1};function Eh(t){const e=t.trim().split(/\s+/);if(2!==e.length)return;const n=Ph[e[0]],i=Ph[e[1]];return void 0!==n&&void 0!==i?[n,i]:void 0}function Ah(t,e){const n=function(t){if(2!==t.length)return;const e=[];for(const n of t)if(Array.isArray(n))e.push(n);else{if("string"!=typeof n)return;{const t=Eh(n);if(!t)return;e.push(t)}}return e}(t);if(!n)return!1;for(let t=0;t<2;t++){const i=n[t],o=e[t];if(i[0]!==o[0]||i[1]!==o[1])return!1}return!0}function Mh(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of Sh)if(Ah(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const Vh=new Map;function Ch(t){const e={value:0},n=bh(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}function kh({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);let o=Vh.get(e);o||(o=new Map,Vh.set(e,o));const s=n.target??"self";let r=o.get(s);r||(r={},o.set(s,r));const a=i+(n.offset??[]).join(",");if(!r[a])if(n.target&&sh(n.target)){const t=Mh(n.offset);r[a]=t?new ViewTimeline({subject:n.target,axis:i}):Ch({container:e,...n})}else sh()?r[a]=new ScrollTimeline({source:e,axis:i}):r[a]=Ch({container:e,...n});return r[a]}function Rh(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return C;const o={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||function(t){return t&&(t.target||t.offset)}(e)?bh(n=>{t(n[e.axis].progress,n)},e):ts(t,kh(e))}(t,o):function(t,e){const n=kh(e),i=e.target?Mh(e.offset):void 0,o=e.target?sh(e.target)&&!!i:sh();return t.attachTimeline({timeline:o?n:void 0,...i&&o&&{rangeStart:i.rangeStart,rangeEnd:i.rangeEnd},observe:t=>(t.pause(),ts(e=>{t.time=t.iterationDuration*e},n))})}(t,o)}const Dh={some:0,all:1};function Lh(t,e,{root:n,margin:i,amount:o="some"}={}){const s=ro(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof o?o:Dh[o]});return s.forEach(t=>a.observe(t)),()=>a.disconnect()}const Bh=Dc();function jh(t){return e.useEffect(()=>()=>t(),[])}const Ih={renderer:cc,...Bc,...yu},Oh={...Ih,...lu,...vu},Fh={renderer:cc,...Bc};function Wh(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}const Uh=()=>({scrollX:oi(0),scrollY:oi(0),scrollXProgress:oi(0),scrollYProgress:oi(0)}),Nh=t=>!!t&&!t.current;function $h(t,e,n,i){return{factory:o=>{let s;const r=()=>{Nh(n)||Nh(i)?To.read(r):s=Rh(o,{...e,axis:t,container:n?.current||void 0,target:i?.current||void 0})};return To.read(r),()=>{bo(r),s?.()}},times:[0,1],keyframes:[0,1],ease:t=>t,duration:1}}function zh({container:n,target:i,...o}={}){const s=f(Uh);(function(t,e){return"undefined"!=typeof window&&(t?Vn()&&!!Mh(e):Mn())})(i,o.offset)&&(s.scrollXProgress.accelerate=$h("x",o,n,i),s.scrollYProgress.accelerate=$h("y",o,n,i));const r=e.useRef(null),a=e.useRef(!1),l=e.useCallback(()=>(r.current=Rh((t,{x:e,y:n})=>{s.scrollX.set(e.current),s.scrollXProgress.set(e.progress),s.scrollY.set(n.current),s.scrollYProgress.set(n.progress)},{...o,container:n?.current||void 0,target:i?.current||void 0}),()=>{r.current?.()}),[n,i,JSON.stringify(o.offset)]);return y(()=>(a.current=!1,Nh(n)||Nh(i)?void(a.current=!0):l()),[l]),e.useEffect(()=>{if(!a.current)return;let e;const o=()=>{const o=Nh(n),s=Nh(i);t.invariant(!o,"Container ref is defined but not hydrated","use-scroll-ref"),t.invariant(!s,"Target ref is defined but not hydrated","use-scroll-ref"),o||s||(e=l())};return To.read(o),()=>{bo(o),e?.()}},[l]),s}function Yh(t,n={}){const{isStatic:i}=e.useContext(jl),o=()=>Vi(t)?t.get():t;if(i)return Eu(o);const s=Su(o());return e.useInsertionEffect(()=>hs(s,t,n),[s,JSON.stringify(n)]),s}function Hh(t){const n=e.useRef(0),{isStatic:i}=e.useContext(jl);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return rt.update(e,!0),()=>at(e)},[t])}class Xh extends ii{constructor(){super(...arguments),this.isEnabled=!1}add(t){(un.has(t)||$n.has(t))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?"transform":"auto")}}function Gh(){!Gs.current&&_s();const[t]=e.useState(Xs.current);return t}function Kh(){const t=Gh(),{reducedMotion:n}=e.useContext(jl);return"never"!==n&&("always"===n||t)}function _h(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&Mi(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{_h(t,e)})})}function qh(){let e=!1;const n=new Set,i={subscribe:t=>(n.add(t),()=>{n.delete(t)}),start(i,o){t.invariant(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const s=[];return n.forEach(t=>{s.push(Fi(t,i,{transitionOverride:o}))}),Promise.all(s)},set:i=>(t.invariant(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(t=>{!function(t,e){Array.isArray(e)?_h(t,e):"string"==typeof e?_h(t,[e]):Mi(t,e)}(t,i)})),stop(){n.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(e=!0,()=>{e=!1,i.stop()})};return i}function Zh(){const t=f(qh);return y(t.mount,[]),t}const Jh=Zh;class Qh{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const td=()=>new Qh;function ed(t){return null!==t&&"object"==typeof t&&Pc in t}function nd(){return id}function id(t){El.current&&(El.current.isUpdating=!1,El.current.blockUpdate(),t&&t())}const od=new Map,sd=new Map,rd=(t,e)=>`${t}: ${un.has(e)?"transform":e}`;function ad(t,e,n){const i=rd(t,e),o=od.get(i);if(!o)return null;const{animation:s,startTime:r}=o;function a(){window.MotionCancelOptimisedAnimation?.(t,e,n)}return s.onfinish=a,null===r||window.MotionHandoffIsComplete?.(t)?(a(),null):r}let ld,cd;const ud=new Set;function hd(){ud.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),ud.clear()}const dd=()=>({});class pd extends tr{constructor(){super(...arguments),this.measureInstanceViewportBox=Os}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const md=Tc({scrapeMotionValuesFromProps:dd,createRenderState:dd});let fd=0;const gd=t=>t>.001?1/t:1e5;let yd=!1;t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:o,presenceAffectsLayout:s=!0,mode:r="sync",propagate:a=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[p,g]=$l(a),v=e.useMemo(()=>Yl(t),[t]),x=a&&!p?[]:v.map(zl),w=e.useRef(!0),T=e.useRef(v),b=f(()=>new Map),S=e.useRef(new Set),[P,E]=e.useState(v),[A,M]=e.useState(v);y(()=>{w.current=!1,T.current=v;for(let t=0;t{const e=zl(t),h=!(a&&!p)&&(v===A||x.includes(e));return d(Ul,{isPresent:h,initial:!(w.current&&!i)&&void 0,custom:n,presenceAffectsLayout:s,mode:r,root:u,onExitComplete:h?void 0:()=>{if(S.current.has(e))return;if(!b.has(e))return;S.current.add(e),b.set(e,!0);let t=!0;b.forEach(e=>{e||(t=!1)}),t&&(C?.(),M(T.current),a&&g?.(),o&&o())},anchorX:l,anchorY:c,children:t},e)})})},t.AnimateSharedLayout=({children:e})=>(i.useEffect(()=>{t.invariant(!1,"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations")},[]),d(Kl,{id:f(()=>"asl-"+fd++),children:e})),t.AsyncMotionValueAnimation=Gn,t.DOMKeyframesResolver=no,t.DOMVisualElement=er,t.DeprecatedLayoutGroupContext=Hl,t.DocumentProjectionNode=bl,t.DragControls=Qh,t.Feature=nr,t.FlatTree=Na,t.GroupAnimation=Kn,t.GroupAnimationWithThen=qn,t.HTMLProjectionNode=Al,t.HTMLVisualElement=jr,t.JSAnimation=_e,t.KeyframeResolver=bn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=Vl,this.rejectReady=Vl,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),rt.postRender(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=Cl(this.scope),e=this.buildRecords(t);e.forEach(({projection:t})=>{const e=Boolean(t.currentAnimation),n=Boolean(t.options.layoutId);if(e&&n){const e=function(t){const e=t.targetWithTransforms||t.target;if(!e)return;const n={x:{min:0,max:0},y:{min:0,max:0}},i={x:{min:0,max:0},y:{min:0,max:0}};return ia(n,e),ia(i,e),{animationId:t.root?.animationId??0,measuredBox:n,layoutBox:i,latestValues:t.animationValues||t.latestValues||{},source:t.id}}(t);e?t.snapshot=e:t.snapshot&&(t.snapshot=void 0)}else t.snapshot&&(t.currentAnimation||t.isProjecting())&&(t.snapshot=void 0);t.isPresent=!0,t.willUpdate()}),await this.updateDom();const n=Cl(this.scope),i=this.buildRecords(n);this.handleExitingElements(e,i),i.forEach(({projection:t})=>{const e=t.instance,n=t.resumeFrom?.instance;if(!e||!n)return;if(!("style"in e))return;const i=e.style.transform,o=n.style.transform;i&&o&&i===o&&(e.style.transform="",e.style.transformOrigin="")}),i.forEach(({projection:t})=>{t.isPresent=!0});const o=function(t,e){const n=t[0]||e[0];return n?.projection.root}(i,e);o?.didUpdate(),await new Promise(t=>{rt.postRender(()=>t())});const s=function(t){const e=new Set;return t.forEach(t=>{const n=t.projection.currentAnimation;n&&e.add(n)}),Array.from(e)}(i);return new Kn(s)}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=Dl(i,n,this.scope),{layout:o,layoutId:s}=kl(i),r=(s?this.sharedTransitions.get(s):void 0)||this.defaultOptions,a=Rl(i,t?.projection,{layout:o,layoutId:s,animationType:"string"==typeof o?o:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e){const n=new Set(e.map(t=>t.element));t.forEach(t=>{n.has(t.element)||(t.projection.options.layoutId&&(t.projection.isPresent=!1,t.projection.relegate()),t.visualElement.unmount(),Fs.delete(t.element))});const i=new Set(t.map(t=>t.element));e.forEach(({element:t,projection:e})=>{i.has(t)&&e.resumeFrom&&!e.resumeFrom.instance&&!e.isLead()&&(e.resumeFrom=void 0,e.snapshot=void 0)})}},t.LayoutGroup=Kl,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,o]=e.useState(!tc(n)),s=e.useRef(void 0);if(!tc(n)){const{renderer:t,...e}=n;s.current=t,Ql(e)}return e.useEffect(()=>{tc(n)&&n().then(({renderer:t,...e})=>{Ql(e),s.current=t,o(!0)})},[]),d(_l.Provider,{value:{renderer:s.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&oc(n);const o=e.useContext(jl);(i={...o,...i}).transition=si(i.transition,o.transition),i.isStatic=f(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion,i.skipAnimations]);return d(jl.Provider,{value:s,children:t})},t.MotionConfigContext=jl,t.MotionContext=uc,t.MotionGlobalConfig=P,t.MotionValue=ii,t.NativeAnimation=In,t.NativeAnimationExtended=Wn,t.NativeAnimationWrapper=Zn,t.NodeStack=Ya,t.ObjectVisualElement=Ir,t.PopChild=Wl,t.PresenceChild=Ul,t.PresenceContext=v,t.Reorder=Ou,t.SVGVisualElement=Xr,t.SubscriptionManager=D,t.SwitchLayoutGroupContext=Ac,t.ViewTransitionBuilder=Ls,t.VisualElement=tr,t.WillChangeMotionValue=Xh,t.acceleratedValues=$n,t.activeAnimations=pt,t.addAttrValue=ho,t.addDomEvent=Wa,t.addPointerEvent=Oc,t.addPointerInfo=Ic,t.addScaleCorrector=function(t){for(const e in t)Dr[e]=t[e],ft(e)&&(Dr[e].isCSSVariable=!0)},t.addStyleValue=vo,t.addUniqueItem=x,t.addValueToWillChange=ki,t.alpha=Tt,t.analyseComplexValue=Yt,t.animate=nh,t.animateMini=oh,t.animateMotionValue=pi,t.animateSingleValue=Fa,t.animateTarget=Ii,t.animateValue=function(t){return new _e(t)},t.animateVariant=Oi,t.animateView=function(t,e={}){return new Ls(t,e)},t.animateVisualElement=Fi,t.animationControls=qh,t.animationMapKey=Qn,t.animations=Bc,t.anticipate=H,t.applyAxisDelta=pr,t.applyBoxDelta=mr,t.applyGeneratorOptions=jn,t.applyPointDelta=dr,t.applyPxDefaults=oo,t.applyTreeDeltas=yr,t.arc=function(t={}){const e=function({strength:t=.5,peak:e=.5,direction:n,rotate:i=!1}={}){const o=!0===i?1:"number"==typeof i?i:0;let s;return(i,r)=>{const a=r.x-i.x,l=r.y-i.y;let c;c="cw"===n?-t:"ccw"===n?t:(Math.abs(a)>=Math.abs(l)?a:l)<0?-t:t;let u=gi(i.x,i.y,r.x,r.y,c,e);if(void 0===n){const t=Math.abs(a){const e={x:mi(t,i.x,u.x,r.x),y:mi(t,i.y,u.y,r.y)};if(o){const n=fi(t,i.x,u.x,r.x,i.y,u.y,r.y),s=h+p*t;e.rotate=O(-180,180,n-s)*o}return e}}}(t),n={interpolateProjection(t){const n=t.x.translate,i=t.y.translate;if(!(Math.sqrt(n*n+i*i)<20))return e({x:n,y:i},{x:0,y:0})},animateVisualElement(t,n,i,o,s){if(!("x"in n)&&!("y"in n))return;const r=t.getValue("x",t.latestValues.x??0),a=t.getValue("y",t.latestValues.y??0),l=n.x,c=n.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=e({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t.getValue("pathRotation",0):void 0,g={delay:o,...ri(i||{},"x")};delete g.path;const y=oi(0);y.start(pi("",y,[0,1e3],{...g,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),y.animation&&s.push(y.animation),delete n.x,delete n.y}};return n},t.aspectRatio=Ea,t.attachFollow=hs,t.attachSpring=function(t,e,n){return hs(t,e,{type:"spring",...n})},t.attrEffect=po,t.axisDeltaEquals=Aa,t.axisEquals=Ta,t.axisEqualsRounded=Sa,t.backIn=z,t.backInOut=Y,t.backOut=$,t.boxEquals=ba,t.boxEqualsRounded=Pa,t.buildHTMLStyles=Mr,t.buildProjectionTransform=Va,t.buildSVGAttrs=Nr,t.buildSVGPath=Wr,t.buildTransform=Ar,t.calcAxisDelta=aa,t.calcBoxDelta=la,t.calcChildStagger=ei,t.calcGeneratorDuration=pe,t.calcLength=sa,t.calcRelativeAxis=ca,t.calcRelativeAxisPosition=ha,t.calcRelativeBox=ua,t.calcRelativePosition=da,t.camelCaseAttributes=$r,t.camelToDash=Ri,t.cancelFrame=at,t.cancelMicrotask=bo,t.cancelSync=Bl,t.checkVariantsDidChange=Qr,t.circIn=X,t.circInOut=K,t.circOut=G,t.clamp=b,t.cleanDirtyNodes=el,t.collectMotionValues=ni,t.color=Wt,t.compareByDepth=Ua,t.complex=Gt,t.containsCSSVariable=xt,t.convertBoundingBoxToBox=ir,t.convertBoxToBoundingBox=or,t.convertOffsetToTimes=Ue,t.copyAxisDeltaInto=oa,t.copyAxisInto=na,t.copyBoxInto=ia,t.correctBorderRadius=kr,t.correctBoxShadow=Rr,t.correctParentTransform=function(t){return e=>{const n=t.current;if(!n)return e;const i=function(t){const{transform:e}=getComputedStyle(t);if(!e||"none"===e)return null;const n=e.match(/^matrix3d\((.*)\)$/u)||e.match(/^matrix\((.*)\)$/u);if(!n)return null;const i=n[1].split(",").map(Number),o=e.startsWith("matrix3d"),s=i[0],r=i[1],a=o?i[4]:i[2],l=o?i[5]:i[3],c=s*l-r*a;return Math.abs(c)<1e-10?null:{a:l/c,b:-r/c,c:-a/c,d:s/c}}(n);if(!i)return e;const o=n.getBoundingClientRect(),s=o.left+window.scrollX+o.width/2,r=o.top+window.scrollY+o.height/2,a=e.x-s,l=e.y-r;return{x:s+i.a*a+i.c*l,y:r+i.b*a+i.d*l}}},t.createAnimationState=Jr,t.createAxis=Is,t.createAxisDelta=Bs,t.createBox=Os,t.createDelta=js,t.createGeneratorEasing=me,t.createProjectionNode=Za,t.createRenderBatcher=st,t.createScopedAnimate=eh,t.cubicBezier=W,t.cubicBezierAsString=kn,t.defaultEasing=Ne,t.defaultOffset=We,t.defaultTransformValue=sn,t.defaultValueTypes=Zi,t.degrees=Dt,t.delay=$a,t.delayInSeconds=function(t,e){return $a(t,L(e))},t.dimensionValueTypes=Ui,t.disableInstantTransitions=function(){P.instantAnimations=!1},t.distance=Wc,t.distance2D=Uc,t.domAnimation=Ih,t.domMax=Oh,t.domMin=Fh,t.eachAxis=Ma,t.easeIn=_,t.easeInOut=Z,t.easeOut=q,t.easingDefinitionToFunction=nt,t.fillOffset=Fe,t.fillWildcards=qe,t.filterProps=sc,t.findDimensionValueType=Ni,t.findValueType=gs,t.flushKeyframeResolvers=Tn,t.followValue=us,t.frame=rt,t.frameData=lt,t.frameSteps=ct,t.generateLinearEasing=he,t.getAnimatableNone=to,t.getAnimationMap=ti,t.getComputedStyle=Uo,t.getDefaultTransition=ui,t.getDefaultValueType=Ji,t.getEasingForSegment=Q,t.getFeatureDefinitions=Qs,t.getFinalKeyframe=Ye,t.getMixer=se,t.getOptimisedAppearId=Bi,t.getOriginIndex=ls,t.getValueAsType=lo,t.getValueTransition=ri,t.getVariableValue=xi,t.getVariantContext=Kr,t.getViewAnimationLayerInfo=Ss,t.getViewAnimations=Es,t.globalProjectionState=Ha,t.has2DTranslate=cr,t.hasReducedMotionListener=Gs,t.hasScale=ar,t.hasTransform=lr,t.hasWarned=function(t){return I.has(t)},t.hex=kt,t.hover=Mo,t.hsla=Ft,t.hslaToRgba=_t,t.inView=Lh,t.inertia=Ie,t.initPrefersReducedMotion=_s,t.interpolate=Oe,t.invisibleValues=ne,t.isAnimationControls=Ws,t.isBezierDefinition=tt,t.isBrowser=g,t.isCSSVariableName=ft,t.isCSSVariableToken=yt,t.isControllingVariants=zs,t.isDeltaZero=wa,t.isDragActive=Po,t.isDragging=So,t.isEasingArray=J,t.isElementKeyboardAccessible=Ro,t.isElementTextInput=Lo,t.isForcedMotionValue=Lr,t.isGenerator=Bn,t.isHTMLElement=fo,t.isKeyframesTarget=Pi,t.isMotionComponent=ed,t.isMotionValue=Vi,t.isNear=ra,t.isNodeOrChild=Vo,t.isNumericalString=E,t.isObject=A,t.isPrimaryPointer=Co,t.isSVGElement=No,t.isSVGSVGElement=as,t.isSVGTag=zr,t.isTransitionDefined=di,t.isValidMotionProp=nc,t.isVariantLabel=Us,t.isVariantNode=Ys,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&Cn()||!e||"string"==typeof e&&(e in Rn||Cn())||tt(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=Ci,t.isZeroValueString=M,t.keyframes=$e,t.m=Bh,t.makeAnimationInstant=Nn,t.makeUseVisualState=Tc,t.mapEasingToNativeEasing=Dn,t.mapValue=function(t,e,n,i){const o=cs(e,n,i);return ms(()=>o(t.get()))},t.maxGeneratorDuration=de,t.measurePageBox=Sr,t.measureViewportBox=br,t.memo=V,t.microtask=To,t.millisecondsToSeconds=B,t.mirrorEasing=U,t.mix=ce,t.mixArray=re,t.mixColor=ee,t.mixComplex=le,t.mixImmediate=qt,t.mixLinearColor=Jt,t.mixNumber=Zt,t.mixObject=ae,t.mixValues=La,t.mixVisibility=ie,t.motion=xu,t.motionValue=oi,t.moveItem=T,t.nodeGroup=Pl,t.noop=C,t.number=wt,t.numberValueTypes=qi,t.observeTimeline=ts,t.optimizedAppearDataAttribute=Li,t.optimizedAppearDataId=Di,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:ro(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=vi,t.parseValueFromTransform=rn,t.percent=Lt,t.pipe=k,t.pixelsToPercent=Cr,t.positionalKeys=Si,t.prefersReducedMotion=Xs,t.press=Wo,t.progress=R,t.progressPercentage=Ot,t.propEffect=mo,t.propagateDirtyNodes=tl,t.px=Bt,t.readTransformValue=an,t.recordStats=function(){if(ot.value)throw ss(),new Error("Stats are already being measured");const t=ot;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},rt.postRender(es,!0),rs},t.removeAxisDelta=ma,t.removeAxisTransforms=fa,t.removeBoxTransforms=va,t.removeItem=w,t.removePointDelta=pa,t.renderHTML=Vr,t.renderSVG=Yr,t.resize=Qo,t.resolveElements=ro,t.resolveMotionValue=za,t.resolveTransition=si,t.resolveVariant=bi,t.resolveVariantFromProps=Ti,t.reverseEasing=N,t.rgbUnit=Vt,t.rgba=Ct,t.rootProjectionNode=El,t.scale=bt,t.scaleCorrectors=Dr,t.scalePoint=hr,t.scrapeHTMLMotionValuesFromProps=Br,t.scrapeSVGMotionValuesFromProps=Hr,t.scroll=Rh,t.scrollInfo=bh,t.secondsToMilliseconds=L,t.setDragLock=Eo,t.setFeatureDefinitions=Js,t.setStyle=Pn,t.setTarget=Mi,t.spring=Be,t.springValue=function(t,e){return us(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(o,s)=>{const r="number"==typeof n?n:ls(n,s),a=Math.abs(r-o);let l=t*a;if(i){const e=s*t;l=nt(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,o){if(window.MotionIsMounted)return;const s=t.dataset[Di];if(!s)return;window.MotionHandoffAnimation=ad;const r=rd(s,e);cd||(cd=Ln(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),od.set(r,{animation:cd,startTime:null}),window.MotionHandoffAnimation=ad,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return sd.has(t);const n=rd(t,e);return Boolean(od.get(n))},window.MotionHandoffMarkAsComplete=t=>{sd.has(t)&&sd.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===sd.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const o=rd(t,e),s=od.get(o);s&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{s.animation.cancel()})}):s.animation.cancel(),n&&i?(ud.add(s),n.render(hd)):(od.delete(o),od.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{const i=Bi(t);if(!i)return;const o=window.MotionHasOptimisedAnimation?.(i,e),s=t.props.values?.[e];if(!o||!s)return;const r=n.on("change",t=>{s.get()!==t&&(window.MotionCancelOptimisedAnimation?.(i,e),r())});return r});const a=()=>{cd.cancel();const s=Ln(t,e,n,i);void 0===ld&&(ld=performance.now()),s.startTime=ld,od.set(r,{animation:s,startTime:ld}),o&&o(s)};sd.set(s,!1),cd.ready?cd.ready.then(a).catch(C):a()},t.startWaapiAnimation=Ln,t.statsBuffer=ot,t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(i):Math.ceil(i);return b(0,1,o/t)}},t.styleEffect=xo,t.supportedWaapiEasing=Rn,t.supportsBrowserAnimation=Xn,t.supportsFlags=En,t.supportsLinearEasing=Cn,t.supportsPartialKeyframes=so,t.supportsScrollTimeline=Mn,t.supportsViewTimeline=Vn,t.svgEffect=wo,t.sync=Ll,t.testValueType=Wi,t.time=dt,t.transform=cs,t.transformAxis=xr,t.transformBox=Tr,t.transformBoxPoints=sr,t.transformPropOrder=cn,t.transformProps=un,t.transformValue=ms,t.transformValueTypes=_i,t.transformViewBoxPoint=function(t){return e=>{const n=t.current;if(!n)return e;const i=n.viewBox?.baseVal;if(!i||0===i.width&&0===i.height)return e;const o=n.getBoundingClientRect();if(0===o.width||0===o.height)return e;const s=i.width/o.width,r=i.height/o.height,a=o.left+window.scrollX,l=o.top+window.scrollY;return{x:(e.x-a)*s+a,y:(e.y-l)*r+l}}},t.translateAxis=vr,t.unwrapMotionComponent=function(t){if(ed(t))return t[Pc]},t.updateMotionValuesFromProps=Hs,t.useAnimate=function(){const t=f(()=>({current:null,animations:[]})),n=Kh()??void 0,{skipAnimations:i}=e.useContext(jl),o=e.useMemo(()=>eh({scope:t,reduceMotion:n,skipAnimations:i}),[t,n,i]);return jh(()=>{t.animations.forEach(t=>t.stop()),t.animations.length=0}),[t,o]},t.useAnimateMini=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>ih(t));return jh(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=Jh,t.useAnimationControls=Zh,t.useAnimationFrame=Hh,t.useComposedRefs=Ol,t.useCycle=function(...t){const n=e.useRef(0),[i,o]=e.useState(t[n.current]),s=e.useCallback(e=>{n.current="number"!=typeof e?O(0,t.length,n.current+1):e,o(t[n.current])},[t.length,...t]);return[i,s]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),o=md({},!1),s=f(()=>new pd({props:{onUpdate:t=>{i({...t})}},visualState:o,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(s.mount({}),()=>s.unmount()),[s]),[n,f(()=>t=>Fi(s,t))]},t.useDeprecatedInvertedScale=function(n){let i=Su(1),o=Su(1);const{visualElement:s}=e.useContext(uc);return t.invariant(!(!n&&!s),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),t.warning(yd,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."),yd=!0,n?(i=n.scaleX||i,o=n.scaleY||o):s&&(i=s.getValue("scaleX",1),o=s.getValue("scaleY",1)),{scaleX:Eu(i,gd),scaleY:Eu(o,gd)}},t.useDomEvent=function(t,n,i,o){e.useEffect(()=>{const e=t.current;if(i&&e)return Wa(e,n,i,o)},[t,n,i,o])},t.useDragControls=function(){return f(td)},t.useElementScroll=function(t){return zh({container:t})},t.useFollowValue=Yh,t.useForceUpdate=Xl,t.useInView=function(t,{root:n,margin:i,amount:o,once:s=!1,initial:r=!1}={}){const[a,l]=e.useState(r);return e.useEffect(()=>{if(!t.current||s&&a)return;const e={root:n&&n.current||void 0,margin:i,amount:o};return Lh(t.current,()=>(l(!0),s?void 0:()=>l(!1)),e)},[n,t,i,s,o]),a},t.useInstantLayoutTransition=nd,t.useInstantTransition=function(){const[t,n]=Xl(),i=nd(),o=e.useRef(-1);return e.useEffect(()=>{rt.postRender(()=>rt.postRender(()=>{n===o.current&&(P.instantAnimations=!1)}))},[n]),e=>{i(()=>{P.instantAnimations=!0,t(),e(),o.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(v))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return Pu(e.filter(Vi),function(){let i="";for(let o=0;o{const t=()=>n(!document.hidden);return document.hidden&&t(),document.addEventListener("visibilitychange",t),()=>{document.removeEventListener("visibilitychange",t)}},[]),t},t.usePresence=$l,t.usePresenceData=function(){const t=e.useContext(v);return t?t.custom:void 0},t.useReducedMotion=Gh,t.useReducedMotionConfig=Kh,t.useResetProjection=function(){return e.useCallback(()=>{const t=El.current;t&&t.resetTree()},[])},t.useScroll=zh,t.useSpring=function(t,e={}){return Yh(t,{type:"spring",...e})},t.useTime=function(){const t=Su(0);return Hh(e=>t.set(e)),t},t.useTransform=Eu,t.useUnmountEffect=jh,t.useVelocity=function(t){const e=Su(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&rt.update(n)};return Wh(t,"change",()=>{rt.update(n,!1,!0)}),e},t.useViewportScroll=function(){return zh()},t.useWillChange=function(){return f(()=>new Xh("auto"))},t.variantPriorityOrder=Ns,t.variantProps=$s,t.velocityPerSecond=j,t.vh=jt,t.visualElementStore=Fs,t.vw=It,t.warnOnce=function(t,e,n){t||I.has(e)||(console.warn(S(e,n)),I.add(e))},t.wrap=O}); diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/index.d.ts b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/index.d.ts deleted file mode 100644 index 4542f26e..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/index.d.ts +++ /dev/null @@ -1,1733 +0,0 @@ -/// -import * as motion_dom from 'motion-dom'; -import { AnyResolvedKeyframe, OnKeyframesResolved, KeyframeResolver, MotionNodeOptions, MotionValue, TransformProperties, SVGPathProperties, Transition, PresenceContextProps, ResolvedValues, VisualElement, Feature, UnresolvedValueKeyframe, AnimationOptions, ElementOrSelector, DOMKeyframesDefinition, AnimationPlaybackOptions, AnimationPlaybackControlsWithThen, ValueAnimationTransition, AnimationScope, AnimationPlaybackControls, EventInfo, MotionValueEventCallbacks, FollowValueOptions, SpringOptions, TransformOptions, WillChange, LegacyAnimationControls, NodeGroup, IProjectionNode } from 'motion-dom'; -export * from 'motion-dom'; -export { ArcOptions, DelayedFunction, FlatTree, FollowValueOptions, IProjectionNode, MotionPath, ResolvedValues, VisualElement, addScaleCorrector, animateVisualElement, arc, buildTransform, calcLength, createBox, delay, optimizedAppearDataAttribute, resolveMotionValue, visualElementStore } from 'motion-dom'; -import * as react_jsx_runtime from 'react/jsx-runtime'; -import * as React$1 from 'react'; -import { CSSProperties, PropsWithoutRef, RefAttributes, JSX, SVGAttributes, useEffect, RefObject } from 'react'; -import { TransformPoint, Easing, EasingFunction, Point } from 'motion-utils'; -export * from 'motion-utils'; -export { MotionGlobalConfig } from 'motion-utils'; - -type ResolveKeyframes = (keyframes: V[], onComplete: OnKeyframesResolved, name?: string, motionValue?: any) => KeyframeResolver; - -/** - * @public - */ -interface AnimatePresenceProps { - /** - * By passing `initial={false}`, `AnimatePresence` will disable any initial animations on children - * that are present when the component is first rendered. - * - * ```jsx - * - * {isVisible && ( - * - * )} - * - * ``` - * - * @public - */ - initial?: boolean; - /** - * When a component is removed, there's no longer a chance to update its props. So if a component's `exit` - * prop is defined as a dynamic variant and you want to pass a new `custom` prop, you can do so via `AnimatePresence`. - * This will ensure all leaving components animate using the latest data. - * - * @public - */ - custom?: any; - /** - * Fires when all exiting nodes have completed animating out. - * - * @public - */ - onExitComplete?: () => void; - /** - * Determines how to handle entering and exiting elements. - * - * - `"sync"`: Default. Elements animate in and out as soon as they're added/removed. - * - `"popLayout"`: Exiting elements are "popped" from the page layout, allowing sibling - * elements to immediately occupy their new layouts. - * - `"wait"`: Only renders one component at a time. Wait for the exiting component to animate out - * before animating the next component in. - * - * @public - */ - mode?: "sync" | "popLayout" | "wait"; - /** - * Root element to use when injecting styles, used when mode === `"popLayout"`. - * This defaults to document.head but can be overridden e.g. for use in shadow DOM. - */ - root?: HTMLElement | ShadowRoot; - /** - * Internal. Used in Framer to flag that sibling children *shouldn't* re-render as a result of a - * child being removed. - */ - presenceAffectsLayout?: boolean; - /** - * If true, the `AnimatePresence` component will propagate parent exit animations - * to its children. - */ - propagate?: boolean; - /** - * Internal. Set whether to anchor the x position of the exiting element to the left or right - * when using `mode="popLayout"`. - */ - anchorX?: "left" | "right"; - /** - * Internal. Set whether to anchor the y position of the exiting element to the top or bottom - * when using `mode="popLayout"`. Use `"bottom"` for elements originally positioned with - * `bottom: 0` to prevent them from shifting during exit animations. - */ - anchorY?: "top" | "bottom"; -} - -/** - * `AnimatePresence` enables the animation of components that have been removed from the tree. - * - * When adding/removing more than a single child, every child **must** be given a unique `key` prop. - * - * Any `motion` components that have an `exit` property defined will animate out when removed from - * the tree. - * - * ```jsx - * import { motion, AnimatePresence } from 'framer-motion' - * - * export const Items = ({ items }) => ( - * - * {items.map(item => ( - * - * ))} - * - * ) - * ``` - * - * You can sequence exit animations throughout a tree using variants. - * - * If a child contains multiple `motion` components with `exit` props, it will only unmount the child - * once all `motion` components have finished animating out. Likewise, any components using - * `usePresence` all need to call `safeToRemove`. - * - * @public - */ -declare const AnimatePresence: ({ children, custom, initial, onExitComplete, presenceAffectsLayout, mode, propagate, anchorX, anchorY, root }: React$1.PropsWithChildren) => react_jsx_runtime.JSX.Element | null; - -interface Props$3 { - children: React$1.ReactElement; - isPresent: boolean; - anchorX?: "left" | "right"; - anchorY?: "top" | "bottom"; - root?: HTMLElement | ShadowRoot; - pop?: boolean; -} -declare function PopChild({ children, isPresent, anchorX, anchorY, root, pop }: Props$3): react_jsx_runtime.JSX.Element; - -/** - * Either a string, or array of strings, that reference variants defined via the `variants` prop. - * @public - */ -type VariantLabels = string | string[]; - -type MotionValueString = MotionValue; -type MotionValueNumber = MotionValue; -type MotionValueAny = MotionValue; -type AnyMotionValue = MotionValueNumber | MotionValueString | MotionValueAny; -type MotionValueHelper = T | AnyMotionValue; -type MakeMotionHelper = { - [K in keyof T]: MotionValueHelper; -}; -type MakeCustomValueTypeHelper = MakeMotionHelper; -type MakeMotion = MakeCustomValueTypeHelper; -type MotionCSS = MakeMotion>; -/** - * @public - */ -type MotionTransform = MakeMotion; -type MotionSVGProps = MakeMotion; -/** - * @public - */ -interface MotionStyle extends MotionCSS, MotionTransform, MotionSVGProps { -} -/** - * Props for `motion` components. - * - * @public - */ -interface MotionProps extends MotionNodeOptions { - /** - * - * The React DOM `style` prop, enhanced with support for `MotionValue`s and separate `transform` values. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * - * return - * } - * ``` - */ - style?: MotionStyle; - children?: React.ReactNode | MotionValueNumber | MotionValueString; -} - -interface PresenceChildProps { - children: React$1.ReactElement; - isPresent: boolean; - onExitComplete?: () => void; - initial?: false | VariantLabels; - custom?: any; - presenceAffectsLayout: boolean; - mode: "sync" | "popLayout" | "wait"; - anchorX?: "left" | "right"; - anchorY?: "top" | "bottom"; - root?: HTMLElement | ShadowRoot; -} -declare const PresenceChild: ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }: PresenceChildProps) => react_jsx_runtime.JSX.Element; - -type InheritOption = boolean | "id"; -interface Props$2 { - id?: string; - inherit?: InheritOption; -} -declare const LayoutGroup: React$1.FunctionComponent>; - -type ReducedMotionConfig = "always" | "never" | "user"; -/** - * @public - */ -interface MotionConfigContext { - /** - * Internal, exported only for usage in Framer - */ - transformPagePoint: TransformPoint; - /** - * Internal. Determines whether this is a static context ie the Framer canvas. If so, - * it'll disable all dynamic functionality. - */ - isStatic: boolean; - /** - * Defines a new default transition for the entire tree. - * - * @public - */ - transition?: Transition; - /** - * If true, will respect the device prefersReducedMotion setting by switching - * transform animations off. - * - * @public - */ - reducedMotion?: ReducedMotionConfig; - /** - * A custom `nonce` attribute used when wanting to enforce a Content Security Policy (CSP). - * For more details see: - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles - * - * @public - */ - nonce?: string; - /** - * If true, all animations will be skipped and values will be set instantly. - * Useful for E2E tests and visual regression testing. - * - * @public - */ - skipAnimations?: boolean; -} -/** - * @public - */ -declare const MotionConfigContext: React$1.Context; - -/** - * @public - */ -declare const PresenceContext: React$1.Context; - -interface VisualState { - renderState: RenderState; - latestValues: ResolvedValues; - onMount?: (instance: Instance) => void; -} -type UseVisualState = (props: MotionProps, isStatic: boolean) => VisualState; -interface UseVisualStateConfig { - scrapeMotionValuesFromProps: ScrapeMotionValuesFromProps; - createRenderState: () => RenderState; -} -declare const makeUseVisualState: (config: UseVisualStateConfig) => UseVisualState; - -interface HTMLElements { - a: HTMLAnchorElement; - abbr: HTMLElement; - address: HTMLElement; - area: HTMLAreaElement; - article: HTMLElement; - aside: HTMLElement; - audio: HTMLAudioElement; - b: HTMLElement; - base: HTMLBaseElement; - bdi: HTMLElement; - bdo: HTMLElement; - big: HTMLElement; - blockquote: HTMLQuoteElement; - body: HTMLBodyElement; - br: HTMLBRElement; - button: HTMLButtonElement; - canvas: HTMLCanvasElement; - caption: HTMLElement; - center: HTMLElement; - cite: HTMLElement; - code: HTMLElement; - col: HTMLTableColElement; - colgroup: HTMLTableColElement; - data: HTMLDataElement; - datalist: HTMLDataListElement; - dd: HTMLElement; - del: HTMLModElement; - details: HTMLDetailsElement; - dfn: HTMLElement; - dialog: HTMLDialogElement; - div: HTMLDivElement; - dl: HTMLDListElement; - dt: HTMLElement; - em: HTMLElement; - embed: HTMLEmbedElement; - fieldset: HTMLFieldSetElement; - figcaption: HTMLElement; - figure: HTMLElement; - footer: HTMLElement; - form: HTMLFormElement; - h1: HTMLHeadingElement; - h2: HTMLHeadingElement; - h3: HTMLHeadingElement; - h4: HTMLHeadingElement; - h5: HTMLHeadingElement; - h6: HTMLHeadingElement; - head: HTMLHeadElement; - header: HTMLElement; - hgroup: HTMLElement; - hr: HTMLHRElement; - html: HTMLHtmlElement; - i: HTMLElement; - iframe: HTMLIFrameElement; - img: HTMLImageElement; - input: HTMLInputElement; - ins: HTMLModElement; - kbd: HTMLElement; - keygen: HTMLElement; - label: HTMLLabelElement; - legend: HTMLLegendElement; - li: HTMLLIElement; - link: HTMLLinkElement; - main: HTMLElement; - map: HTMLMapElement; - mark: HTMLElement; - menu: HTMLElement; - menuitem: HTMLElement; - meta: HTMLMetaElement; - meter: HTMLMeterElement; - nav: HTMLElement; - noindex: HTMLElement; - noscript: HTMLElement; - object: HTMLObjectElement; - ol: HTMLOListElement; - optgroup: HTMLOptGroupElement; - option: HTMLOptionElement; - output: HTMLOutputElement; - p: HTMLParagraphElement; - param: HTMLParamElement; - picture: HTMLElement; - pre: HTMLPreElement; - progress: HTMLProgressElement; - q: HTMLQuoteElement; - rp: HTMLElement; - rt: HTMLElement; - ruby: HTMLElement; - s: HTMLElement; - samp: HTMLElement; - search: HTMLElement; - slot: HTMLSlotElement; - script: HTMLScriptElement; - section: HTMLElement; - select: HTMLSelectElement; - small: HTMLElement; - source: HTMLSourceElement; - span: HTMLSpanElement; - strong: HTMLElement; - style: HTMLStyleElement; - sub: HTMLElement; - summary: HTMLElement; - sup: HTMLElement; - table: HTMLTableElement; - template: HTMLTemplateElement; - tbody: HTMLTableSectionElement; - td: HTMLTableDataCellElement; - textarea: HTMLTextAreaElement; - tfoot: HTMLTableSectionElement; - th: HTMLTableHeaderCellElement; - thead: HTMLTableSectionElement; - time: HTMLTimeElement; - title: HTMLTitleElement; - tr: HTMLTableRowElement; - track: HTMLTrackElement; - u: HTMLElement; - ul: HTMLUListElement; - var: HTMLElement; - video: HTMLVideoElement; - wbr: HTMLElement; - webview: HTMLWebViewElement; -} - -/** - * @public - */ -type ForwardRefComponent = { - readonly $$typeof: symbol; -} & ((props: PropsWithoutRef

& RefAttributes) => JSX.Element); -type AttributesWithoutMotionProps = { - [K in Exclude]?: Attributes[K]; -}; -/** - * @public - */ -type HTMLMotionProps = AttributesWithoutMotionProps & MotionProps; -/** - * Motion-optimised versions of React's HTML components. - * - * @public - */ -type HTMLMotionComponents = { - [K in keyof HTMLElements]: ForwardRefComponent>; -}; - -type UnionStringArray> = T[number]; -declare const svgElements: readonly ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "svg", "switch", "symbol", "text", "tspan", "use", "view", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "linearGradient", "radialGradient", "textPath"]; -type SVGElements = UnionStringArray; - -interface SVGAttributesWithoutMotionProps extends Pick, Exclude, keyof MotionProps>> { -} -/** - * Blanket-accept any SVG attribute as a `MotionValue` - * @public - */ -type SVGAttributesAsMotionValues = MakeMotion>; -type UnwrapSVGFactoryElement = F extends React.SVGProps ? P : never; -/** - * @public - */ -interface SVGMotionProps extends SVGAttributesAsMotionValues, MotionProps { -} -/** - * Motion-optimised versions of React's SVG components. - * - * @public - */ -type SVGMotionComponents = { - [K in SVGElements]: ForwardRefComponent, SVGMotionProps>>; -}; - -type DOMMotionComponents = HTMLMotionComponents & SVGMotionComponents; - -type ScrapeMotionValuesFromProps = (props: MotionProps, prevProps: MotionProps, visualElement?: VisualElement) => { - [key: string]: MotionValue | AnyResolvedKeyframe; -}; -interface VisualElementOptions { - visualState: VisualState; - parent?: VisualElement; - variantParent?: VisualElement; - presenceContext: PresenceContextProps | null; - props: MotionProps; - blockInitialAnimation?: boolean; - reducedMotionConfig?: ReducedMotionConfig; - /** - * If true, all animations will be skipped and values will be set instantly. - * Useful for E2E tests and visual regression testing. - */ - skipAnimations?: boolean; - /** - * Explicit override for SVG detection. When true, uses SVG rendering; - * when false, uses HTML rendering. If undefined, auto-detects. - */ - isSVG?: boolean; -} - -type CreateVisualElement = (Component: TagName | string | React.ComponentType, options: VisualElementOptions) => VisualElement; - -declare function MeasureLayout(props: MotionProps & { - visualElement: VisualElement; -}): react_jsx_runtime.JSX.Element; - -interface FeatureClass { - new (props: Props): Feature; -} -interface HydratedFeatureDefinition { - isEnabled: (props: MotionProps) => boolean; - Feature: FeatureClass; - ProjectionNode?: any; - MeasureLayout?: typeof MeasureLayout; -} -interface HydratedFeatureDefinitions { - animation?: HydratedFeatureDefinition; - exit?: HydratedFeatureDefinition; - drag?: HydratedFeatureDefinition; - tap?: HydratedFeatureDefinition; - focus?: HydratedFeatureDefinition; - hover?: HydratedFeatureDefinition; - pan?: HydratedFeatureDefinition; - inView?: HydratedFeatureDefinition; - layout?: HydratedFeatureDefinition; -} -interface FeatureDefinition { - isEnabled: HydratedFeatureDefinition["isEnabled"]; - Feature?: HydratedFeatureDefinition["Feature"]; - ProjectionNode?: HydratedFeatureDefinition["ProjectionNode"]; - MeasureLayout?: HydratedFeatureDefinition["MeasureLayout"]; -} -type FeatureDefinitions = { - [K in keyof HydratedFeatureDefinitions]: FeatureDefinition; -}; -interface FeaturePackage { - Feature?: HydratedFeatureDefinition["Feature"]; - ProjectionNode?: HydratedFeatureDefinition["ProjectionNode"]; - MeasureLayout?: HydratedFeatureDefinition["MeasureLayout"]; -} -type FeaturePackages = { - [K in keyof HydratedFeatureDefinitions]: FeaturePackage; -}; -interface FeatureBundle extends FeaturePackages { - renderer: CreateVisualElement; -} -type LazyFeatureBundle$1 = () => Promise; - -type LazyFeatureBundle = () => Promise; -/** - * @public - */ -interface LazyProps { - children?: React.ReactNode; - /** - * Can be used to provide a feature bundle synchronously or asynchronously. - * - * ```jsx - * // features.js - * import { domAnimation } from "framer-motion" - * export default domAnimation - * - * // index.js - * import { LazyMotion, m } from "framer-motion" - * - * const loadFeatures = () =>import("./features.js") - * .then(res => res.default) - * - * function Component() { - * return ( - * - * - * - * ) - * } - * ``` - * - * @public - */ - features: FeatureBundle | LazyFeatureBundle; - /** - * If `true`, will throw an error if a `motion` component renders within - * a `LazyMotion` component. - * - * ```jsx - * // This component will throw an error that explains using a motion component - * // instead of the m component will break the benefits of code-splitting. - * function Component() { - * return ( - * - * - * - * ) - * } - * ``` - * - * @public - */ - strict?: boolean; -} - -/** - * Used in conjunction with the `m` component to reduce bundle size. - * - * `m` is a version of the `motion` component that only loads functionality - * critical for the initial render. - * - * `LazyMotion` can then be used to either synchronously or asynchronously - * load animation and gesture support. - * - * ```jsx - * // Synchronous loading - * import { LazyMotion, m, domAnimation } from "framer-motion" - * - * function App() { - * return ( - * - * - * - * ) - * } - * - * // Asynchronous loading - * import { LazyMotion, m } from "framer-motion" - * - * function App() { - * return ( - * import('./path/to/domAnimation')}> - * - * - * ) - * } - * ``` - * - * @public - */ -declare function LazyMotion({ children, features, strict }: LazyProps): react_jsx_runtime.JSX.Element; - -type IsValidProp = (key: string) => boolean; -declare function filterProps(props: MotionProps, isDom: boolean, forwardMotionProps: boolean): MotionProps; - -interface MotionConfigProps extends Partial { - children?: React$1.ReactNode; - isValidProp?: IsValidProp; -} -/** - * `MotionConfig` is used to set configuration options for all children `motion` components. - * - * ```jsx - * import { motion, MotionConfig } from "framer-motion" - * - * export function App() { - * return ( - * - * - * - * ) - * } - * ``` - * - * @public - */ -declare function MotionConfig({ children, isValidProp, ...config }: MotionConfigProps): react_jsx_runtime.JSX.Element; - -/** - * Lifecycle callbacks are not supported on individual sequence segments - * because segments are consolidated into a single animation per subject. - * Use sequence-level options (e.g. SequenceOptions.onComplete) instead. - */ -type LifecycleCallbacks = "onUpdate" | "onPlay" | "onComplete" | "onRepeat" | "onStop"; -/** - * Distributive Omit preserves union branches (unlike plain Omit). - */ -type DistributiveOmit = T extends any ? Omit : never; -type SegmentTransitionOptions = DistributiveOmit & At; -type SegmentValueTransitionOptions = DistributiveOmit & At; -type ObjectTarget = { - [K in keyof O]?: O[K] | UnresolvedValueKeyframe[]; -}; -type SequenceTime = number | "<" | `+${number}` | `-${number}` | `${string}`; -type SequenceLabel = string; -interface SequenceLabelWithTime { - name: SequenceLabel; - at: SequenceTime; -} -interface At { - at?: SequenceTime; -} -type MotionValueSegment = [ - MotionValue, - UnresolvedValueKeyframe | UnresolvedValueKeyframe[] -]; -type MotionValueSegmentWithTransition = [ - MotionValue, - UnresolvedValueKeyframe | UnresolvedValueKeyframe[], - SegmentValueTransitionOptions -]; -type DOMSegment = [ElementOrSelector, DOMKeyframesDefinition]; -type DOMSegmentWithTransition = [ - ElementOrSelector, - DOMKeyframesDefinition, - SegmentTransitionOptions -]; -type ObjectSegment = [O, ObjectTarget]; -type ObjectSegmentWithTransition = [ - O, - ObjectTarget, - SegmentTransitionOptions -]; -type SequenceProgressCallback = (value: any) => void; -type FunctionSegment = [SequenceProgressCallback] | [SequenceProgressCallback, SegmentTransitionOptions] | [ - SequenceProgressCallback, - UnresolvedValueKeyframe | UnresolvedValueKeyframe[], - SegmentTransitionOptions -]; -type Segment = ObjectSegment | ObjectSegmentWithTransition | SequenceLabel | SequenceLabelWithTime | MotionValueSegment | MotionValueSegmentWithTransition | DOMSegment | DOMSegmentWithTransition | FunctionSegment; -type AnimationSequence = Segment[]; -interface SequenceOptions extends AnimationPlaybackOptions { - delay?: number; - duration?: number; - defaultTransition?: Transition; - reduceMotion?: boolean; - skipAnimations?: boolean; - onComplete?: () => void; -} -interface AbsoluteKeyframe { - value: AnyResolvedKeyframe | null; - at: number; - easing?: Easing; -} -type ValueSequence = AbsoluteKeyframe[]; -interface SequenceMap { - [key: string]: ValueSequence; -} -type ResolvedAnimationDefinition = { - keyframes: { - [key: string]: UnresolvedValueKeyframe[]; - }; - transition: { - [key: string]: Transition; - }; -}; -type ResolvedAnimationDefinitions = Map; - -interface ScopedAnimateOptions { - scope?: AnimationScope; - reduceMotion?: boolean; - skipAnimations?: boolean; -} -/** - * Creates an animation function that is optionally scoped - * to a specific element. - */ -declare function createScopedAnimate(options?: ScopedAnimateOptions): { - (sequence: AnimationSequence, options?: SequenceOptions): AnimationPlaybackControlsWithThen; - (value: string | MotionValue, keyframes: string | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (value: number | MotionValue, keyframes: number | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (value: V | MotionValue, keyframes: V | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (element: ElementOrSelector, keyframes: DOMKeyframesDefinition, options?: AnimationOptions): AnimationPlaybackControlsWithThen; - (object: O | O[], keyframes: ObjectTarget, options?: AnimationOptions): AnimationPlaybackControlsWithThen; -}; -declare const animate: { - (sequence: AnimationSequence, options?: SequenceOptions): AnimationPlaybackControlsWithThen; - (value: string | MotionValue, keyframes: string | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (value: number | MotionValue, keyframes: number | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (value: V | MotionValue, keyframes: V | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - (element: ElementOrSelector, keyframes: DOMKeyframesDefinition, options?: AnimationOptions): AnimationPlaybackControlsWithThen; - (object: O | O[], keyframes: ObjectTarget, options?: AnimationOptions): AnimationPlaybackControlsWithThen; -}; - -declare const animateMini: (elementOrSelector: ElementOrSelector, keyframes: DOMKeyframesDefinition, options?: AnimationOptions) => AnimationPlaybackControlsWithThen; - -interface ScrollOptions { - source?: HTMLElement; - container?: Element; - target?: Element; - axis?: "x" | "y"; - offset?: ScrollOffset; -} -type OnScrollProgress = (progress: number) => void; -type OnScrollWithInfo = (progress: number, info: ScrollInfo) => void; -type OnScroll = OnScrollProgress | OnScrollWithInfo; -interface AxisScrollInfo { - current: number; - offset: number[]; - progress: number; - scrollLength: number; - velocity: number; - targetOffset: number; - targetLength: number; - containerLength: number; - interpolatorOffsets?: number[]; - interpolate?: EasingFunction; -} -interface ScrollInfo { - time: number; - x: AxisScrollInfo; - y: AxisScrollInfo; -} -type OnScrollInfo = (info: ScrollInfo) => void; -type SupportedEdgeUnit = "px" | "vw" | "vh" | "%"; -type EdgeUnit = `${number}${SupportedEdgeUnit}`; -type NamedEdges = "start" | "end" | "center"; -type EdgeString = NamedEdges | EdgeUnit | `${number}`; -type Edge = EdgeString | number; -type ProgressIntersection = [number, number]; -type Intersection = `${Edge} ${Edge}`; -type ScrollOffset = Array; -interface ScrollInfoOptions { - container?: Element; - target?: Element; - axis?: "x" | "y"; - offset?: ScrollOffset; - /** - * When true, enables per-frame checking of scrollWidth/scrollHeight - * to detect content size changes and recalculate scroll progress. - * - * @default false - */ - trackContentSize?: boolean; -} - -declare function scroll(onScroll: OnScroll | AnimationPlaybackControls, { axis, container, ...options }?: ScrollOptions): VoidFunction; - -declare function scrollInfo(onScroll: OnScrollInfo, { container, trackContentSize, ...options }?: ScrollInfoOptions): VoidFunction; - -type ViewChangeHandler = (entry: IntersectionObserverEntry) => void; -type MarginValue = `${number}${"px" | "%"}`; -type MarginType = MarginValue | `${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue} ${MarginValue}`; -interface InViewOptions { - root?: Element | Document; - margin?: MarginType; - amount?: "some" | "all" | number; -} -declare function inView(elementOrSelector: ElementOrSelector, onStart: (element: Element, entry: IntersectionObserverEntry) => void | ViewChangeHandler, { root, margin: rootMargin, amount }?: InViewOptions): VoidFunction; - -declare const distance: (a: number, b: number) => number; -declare function distance2D(a: Point, b: Point): number; - -type ReorderElementTag = keyof HTMLElements; -type DefaultGroupElement = "ul"; -type DefaultItemElement = "li"; - -interface Props$1 { - /** - * A HTML element to render this component as. Defaults to `"ul"`. - * - * @public - */ - as?: TagName; - /** - * The axis to reorder along. By default, items will be draggable on this axis. - * To make draggable on both axes, set `` - * - * @public - */ - axis?: "x" | "y"; - /** - * A callback to fire with the new value order. For instance, if the values - * are provided as a state from `useState`, this could be the set state function. - * - * @public - */ - onReorder: (newOrder: V[]) => void; - /** - * The latest values state. - * - * ```jsx - * function Component() { - * const [items, setItems] = useState([0, 1, 2]) - * - * return ( - * - * {items.map((item) => )} - * - * ) - * } - * ``` - * - * @public - */ - values: V[]; -} -type ReorderGroupProps = Props$1 & Omit, "values"> & React$1.PropsWithChildren<{}>; -declare function ReorderGroupComponent({ children, as, axis, onReorder, values, ...props }: ReorderGroupProps, externalRef?: React$1.ForwardedRef): JSX.Element; -declare const ReorderGroup: (props: Omit, "values" | "onReorder"> & { - values: Values; - onReorder: (newOrder: Values) => void; -} & { - ref?: React$1.ForwardedRef | undefined; -}) => ReturnType; - -interface Props { - /** - * A HTML element to render this component as. Defaults to `"li"`. - * - * @public - */ - as?: TagName; - /** - * The value in the list that this component represents. - * - * @public - */ - value: V; - /** - * A subset of layout options primarily used to disable layout="size" - * - * @public - * @default true - */ - layout?: true | "position"; -} -type ReorderItemProps = Props & Omit, "value" | "layout"> & React$1.PropsWithChildren<{}>; -declare function ReorderItemComponent({ children, style, value, as, onDrag, onDragEnd, layout, ...props }: ReorderItemProps, externalRef?: React$1.ForwardedRef): React$1.JSX.Element; -declare const ReorderItem: (props: ReorderItemProps & { - ref?: React$1.ForwardedRef; -}) => ReturnType; - -declare namespace namespace_d { - export { ReorderGroup as Group, ReorderItem as Item }; -} - -type MotionComponentProps = { - [K in Exclude]?: Props[K]; -} & MotionProps; -type MotionComponent = T extends keyof DOMMotionComponents ? DOMMotionComponents[T] : React$1.ComponentType, "children"> & { - children?: "children" extends keyof P ? P["children"] | MotionComponentProps

["children"] : MotionComponentProps

["children"]; -}>; -interface MotionComponentOptions { - forwardMotionProps?: boolean; - /** - * Specify whether the component renders an HTML or SVG element. - * This is useful when wrapping custom SVG components that need - * SVG-specific attribute handling (like viewBox animation). - * By default, Motion auto-detects based on the component name, - * but custom React components are always treated as HTML. - */ - type?: "html" | "svg"; -} -/** - * Create a `motion` component. - * - * This function accepts a Component argument, which can be either a string (ie "div" - * for `motion.div`), or an actual React component. - * - * Alongside this is a config option which provides a way of rendering the provided - * component "offline", or outside the React render cycle. - */ -declare function createMotionComponent(Component: TagName | string | React$1.ComponentType, { forwardMotionProps, type }?: MotionComponentOptions, preloadedFeatures?: FeaturePackages, createVisualElement?: CreateVisualElement): MotionComponent; - -declare const m: typeof createMotionComponent & HTMLMotionComponents & SVGMotionComponents & { - create: typeof createMotionComponent; -}; - -declare const motion: typeof createMotionComponent & HTMLMotionComponents & SVGMotionComponents & { - create: typeof createMotionComponent; -}; - -type EventListenerWithPointInfo = (e: PointerEvent, info: EventInfo) => void; -declare const addPointerInfo: (handler: EventListenerWithPointInfo) => EventListener; - -declare function addPointerEvent(target: EventTarget, eventName: string, handler: EventListenerWithPointInfo, options?: AddEventListenerOptions): () => void; - -declare const animations: FeaturePackages; - -type AnimationType = "animate" | "whileHover" | "whileTap" | "whileDrag" | "whileFocus" | "whileInView" | "exit"; - -declare const isBrowser: boolean; - -/** - * Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx - */ - -type PossibleRef = React$1.Ref | undefined; -/** - * A custom hook that composes multiple refs - * Accepts callback refs and RefObject(s) - */ -declare function useComposedRefs(...refs: PossibleRef[]): React$1.RefCallback; - -declare function useForceUpdate(): [VoidFunction, number]; - -declare const useIsomorphicLayoutEffect: typeof useEffect; - -declare function useUnmountEffect(callback: () => void): void; - -/** - * @public - */ -declare const domAnimation: FeatureBundle; - -/** - * @public - */ -declare const domMax: FeatureBundle; - -/** - * @public - */ -declare const domMin: FeatureBundle; - -declare function useMotionValueEvent>(value: MotionValue, event: EventName, callback: MotionValueEventCallbacks[EventName]): void; - -/** - * @deprecated useElementScroll is deprecated. Convert to useScroll({ container: ref }) - */ -declare function useElementScroll(ref: RefObject): { - scrollX: motion_dom.MotionValue; - scrollY: motion_dom.MotionValue; - scrollXProgress: motion_dom.MotionValue; - scrollYProgress: motion_dom.MotionValue; -}; - -/** - * @deprecated useViewportScroll is deprecated. Convert to useScroll() - */ -declare function useViewportScroll(): { - scrollX: motion_dom.MotionValue; - scrollY: motion_dom.MotionValue; - scrollXProgress: motion_dom.MotionValue; - scrollYProgress: motion_dom.MotionValue; -}; - -/** - * Combine multiple motion values into a new one using a string template literal. - * - * ```jsx - * import { - * motion, - * useSpring, - * useMotionValue, - * useMotionTemplate - * } from "framer-motion" - * - * function Component() { - * const shadowX = useSpring(0) - * const shadowY = useMotionValue(0) - * const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))` - * - * return - * } - * ``` - * - * @public - */ -declare function useMotionTemplate(fragments: TemplateStringsArray, ...values: Array): MotionValue; - -/** - * Creates a `MotionValue` to track the state and velocity of a value. - * - * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop. - * - * ```jsx - * export const MyComponent = () => { - * const scale = useMotionValue(1) - * - * return - * } - * ``` - * - * @param initial - The initial state. - * - * @public - */ -declare function useMotionValue(initial: T): MotionValue; - -interface UseScrollOptions extends Omit { - container?: RefObject; - target?: RefObject; -} -declare function useScroll({ container, target, ...options }?: UseScrollOptions): { - scrollX: motion_dom.MotionValue; - scrollY: motion_dom.MotionValue; - scrollXProgress: motion_dom.MotionValue; - scrollYProgress: motion_dom.MotionValue; -}; - -/** - * Creates a `MotionValue` that, when `set`, will use the specified animation transition to animate to its new state. - * - * Unlike `useSpring` which is limited to spring animations, `useFollowValue` accepts any motion transition - * including spring, tween, inertia, and keyframes. - * - * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber - * to another `MotionValue`. - * - * @remarks - * - * ```jsx - * // Spring animation (default) - * const x = useFollowValue(0, { stiffness: 300 }) - * - * // Tween animation - * const y = useFollowValue(0, { type: "tween", duration: 0.5, ease: "easeOut" }) - * - * // Track another MotionValue with spring - * const source = useMotionValue(0) - * const z = useFollowValue(source, { type: "spring", damping: 10 }) - * - * // Inertia animation - * const w = useFollowValue(0, { type: "inertia", velocity: 100 }) - * ``` - * - * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will animate towards that value using the specified transition. - * @param options - Animation transition options. Supports all transition types: spring, tween, inertia, keyframes. - * @returns `MotionValue` - * - * @public - */ -declare function useFollowValue(source: MotionValue, options?: FollowValueOptions): MotionValue; -declare function useFollowValue(source: string, options?: FollowValueOptions): MotionValue; -declare function useFollowValue(source: MotionValue, options?: FollowValueOptions): MotionValue; -declare function useFollowValue(source: number, options?: FollowValueOptions): MotionValue; - -type UseSpringOptions = SpringOptions & Pick; -/** - * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state. - * - * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber - * to another `MotionValue`. - * - * @remarks - * - * ```jsx - * const x = useSpring(0, { stiffness: 300 }) - * const y = useSpring(x, { damping: 10 }) - * ``` - * - * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value. - * @param springConfig - Configuration options for the spring. - * @returns `MotionValue` - * - * @public - */ -declare function useSpring(source: MotionValue, options?: UseSpringOptions): MotionValue; -declare function useSpring(source: string, options?: UseSpringOptions): MotionValue; -declare function useSpring(source: MotionValue, options?: UseSpringOptions): MotionValue; -declare function useSpring(source: number, options?: UseSpringOptions): MotionValue; - -declare function useTime(): motion_dom.MotionValue; - -type InputRange = number[]; -type SingleTransformer = (input: I) => O; -type MultiTransformer = (input: I[]) => O; -/** - * Create multiple `MotionValue`s that transform the output of another `MotionValue` by mapping it from one range of values into multiple output ranges. - * - * @remarks - * - * This is useful when you want to derive multiple values from a single input value. - * The keys of the output map must remain constant across renders. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * const { opacity, scale } = useTransform(x, [0, 100], { - * opacity: [0, 1], - * scale: [0.5, 1] - * }) - * - * return ( - * - * ) - * } - * ``` - * - * @param inputValue - `MotionValue` - * @param inputRange - A linear series of numbers (either all increasing or decreasing) - * @param outputMap - An object where keys map to output ranges. Each output range must be the same length as `inputRange`. - * @param options - Transform options applied to all outputs - * - * @returns An object with the same keys as `outputMap`, where each value is a `MotionValue` - * - * @public - */ -declare function useTransform>(inputValue: MotionValue, inputRange: InputRange, outputMap: T, options?: TransformOptions): { - [K in keyof T]: MotionValue; -}; -/** - * Create a `MotionValue` that transforms the output of another `MotionValue` by mapping it from one range of values into another. - * - * @remarks - * - * Given an input range of `[-200, -100, 100, 200]` and an output range of - * `[0, 1, 1, 0]`, the returned `MotionValue` will: - * - * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`. - * - When provided a value between `-100` and `100`, will return `1`. - * - When provided a value between `100` and `200`, will return a value between `1` and `0` - * - * - * The input range must be a linear series of numbers. The output range - * can be any value type supported by Motion: numbers, colors, shadows, etc. - * - * Every value in the output range must be of the same type and in the same format. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * const xRange = [-200, -100, 100, 200] - * const opacityRange = [0, 1, 1, 0] - * const opacity = useTransform(x, xRange, opacityRange) - * - * return ( - * - * ) - * } - * ``` - * - * @param inputValue - `MotionValue` - * @param inputRange - A linear series of numbers (either all increasing or decreasing) - * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`. - * @param options - - * - * - clamp: boolean. Clamp values to within the given range. Defaults to `true` - * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each. - * - * @returns `MotionValue` - * - * @public - */ -declare function useTransform(value: MotionValue, inputRange: InputRange, outputRange: O[], options?: TransformOptions): MotionValue; -/** - * Create a `MotionValue` that transforms the output of another `MotionValue` through a function. - * In this example, `y` will always be double `x`. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(10) - * const y = useTransform(x, value => value * 2) - * - * return - * } - * ``` - * - * @param input - A `MotionValue` that will pass its latest value through `transform` to update the returned `MotionValue`. - * @param transform - A function that accepts the latest value from `input` and returns a new value. - * @returns `MotionValue` - * - * @public - */ -declare function useTransform(input: MotionValue, transformer: SingleTransformer): MotionValue; -/** - * Pass an array of `MotionValue`s and a function to combine them. In this example, `z` will be the `x` multiplied by `y`. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * const y = useMotionValue(0) - * const z = useTransform([x, y], ([latestX, latestY]) => latestX * latestY) - * - * return - * } - * ``` - * - * @param input - An array of `MotionValue`s that will pass their latest values through `transform` to update the returned `MotionValue`. - * @param transform - A function that accepts the latest values from `input` and returns a new value. - * @returns `MotionValue` - * - * @public - */ -declare function useTransform(input: MotionValue[] | MotionValue[] | MotionValue[], transformer: MultiTransformer): MotionValue; -declare function useTransform(transformer: () => O): MotionValue; - -/** - * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes. - * - * ```javascript - * const x = useMotionValue(0) - * const xVelocity = useVelocity(x) - * const xAcceleration = useVelocity(xVelocity) - * ``` - * - * @public - */ -declare function useVelocity(value: MotionValue): MotionValue; - -declare function useWillChange(): WillChange; - -declare class WillChangeMotionValue extends MotionValue implements WillChange { - private isEnabled; - add(name: string): void; - private update; -} - -/** - * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting. - * - * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing - * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion. - * - * It will actively respond to changes and re-render your components with the latest setting. - * - * ```jsx - * export function Sidebar({ isOpen }) { - * const shouldReduceMotion = useReducedMotion() - * const closedX = shouldReduceMotion ? 0 : "-100%" - * - * return ( - * - * ) - * } - * ``` - * - * @return boolean - * - * @public - */ -declare function useReducedMotion(): boolean | null; - -declare function useReducedMotionConfig(): boolean | null; - -/** - * @public - */ -declare function animationControls(): LegacyAnimationControls; - -declare function useAnimate(): [AnimationScope, { - (sequence: AnimationSequence, options?: SequenceOptions | undefined): motion_dom.AnimationPlaybackControlsWithThen; - (value: string | motion_dom.MotionValue, keyframes: string | motion_dom.UnresolvedValueKeyframe[], options?: motion_dom.ValueAnimationTransition | undefined): motion_dom.AnimationPlaybackControlsWithThen; - (value: number | motion_dom.MotionValue, keyframes: number | motion_dom.UnresolvedValueKeyframe[], options?: motion_dom.ValueAnimationTransition | undefined): motion_dom.AnimationPlaybackControlsWithThen; - (value: V | motion_dom.MotionValue, keyframes: V | motion_dom.UnresolvedValueKeyframe[], options?: motion_dom.ValueAnimationTransition | undefined): motion_dom.AnimationPlaybackControlsWithThen; - (element: motion_dom.ElementOrSelector, keyframes: motion_dom.DOMKeyframesDefinition, options?: motion_dom.AnimationOptions | undefined): motion_dom.AnimationPlaybackControlsWithThen; - (object: O | O[], keyframes: ObjectTarget, options?: motion_dom.AnimationOptions | undefined): motion_dom.AnimationPlaybackControlsWithThen; -}]; - -declare function useAnimateMini(): [AnimationScope, (elementOrSelector: motion_dom.ElementOrSelector, keyframes: motion_dom.DOMKeyframesDefinition, options?: motion_dom.AnimationOptions | undefined) => motion_dom.AnimationPlaybackControlsWithThen]; - -/** - * Creates `LegacyAnimationControls`, which can be used to manually start, stop - * and sequence animations on one or more components. - * - * The returned `LegacyAnimationControls` should be passed to the `animate` property - * of the components you want to animate. - * - * These components can then be animated with the `start` method. - * - * ```jsx - * import * as React from 'react' - * import { motion, useAnimation } from 'framer-motion' - * - * export function MyComponent(props) { - * const controls = useAnimation() - * - * controls.start({ - * x: 100, - * transition: { duration: 0.5 }, - * }) - * - * return - * } - * ``` - * - * @returns Animation controller with `start` and `stop` methods - * - * @public - */ -declare function useAnimationControls(): LegacyAnimationControls; -declare const useAnimation: typeof useAnimationControls; - -type SafeToRemove = () => void; -type AlwaysPresent = [true, null]; -type Present = [true]; -type NotPresent = [false, SafeToRemove]; -/** - * When a component is the child of `AnimatePresence`, it can use `usePresence` - * to access information about whether it's still present in the React tree. - * - * ```jsx - * import { usePresence } from "framer-motion" - * - * export const Component = () => { - * const [isPresent, safeToRemove] = usePresence() - * - * useEffect(() => { - * !isPresent && setTimeout(safeToRemove, 1000) - * }, [isPresent]) - * - * return

- * } - * ``` - * - * If `isPresent` is `false`, it means that a component has been removed from the tree, - * but `AnimatePresence` won't really remove it until `safeToRemove` has been called. - * - * @public - */ -declare function usePresence(subscribe?: boolean): AlwaysPresent | Present | NotPresent; -/** - * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present. - * There is no `safeToRemove` function. - * - * ```jsx - * import { useIsPresent } from "framer-motion" - * - * export const Component = () => { - * const isPresent = useIsPresent() - * - * useEffect(() => { - * !isPresent && console.log("I've been removed!") - * }, [isPresent]) - * - * return
- * } - * ``` - * - * @public - */ -declare function useIsPresent(): boolean; - -declare function usePresenceData(): any; - -/** - * Attaches an event listener directly to the provided DOM element. - * - * Bypassing React's event system can be desirable, for instance when attaching non-passive - * event handlers. - * - * ```jsx - * const ref = useRef(null) - * - * useDomEvent(ref, 'wheel', onWheel, { passive: false }) - * - * return
- * ``` - * - * @param ref - React.RefObject that's been provided to the element you want to bind the listener to. - * @param eventName - Name of the event you want listen for. - * @param handler - Function to fire when receiving the event. - * @param options - Options to pass to `Event.addEventListener`. - * - * @public - */ -declare function useDomEvent(ref: RefObject, eventName: string, handler?: EventListener | undefined, options?: AddEventListenerOptions): void; - -interface DragControlOptions { - /** - * This distance after which dragging starts and a direction is locked in. - * - * @public - */ - distanceThreshold?: number; - /** - * Whether to immediately snap to the cursor when dragging starts. - * - * @public - */ - snapToCursor?: boolean; -} - -/** - * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components. - * - * ```jsx - * const dragControls = useDragControls() - * - * function startDrag(event) { - * dragControls.start(event, { snapToCursor: true }) - * } - * - * return ( - * <> - *
- * - * - * ) - * ``` - * - * @public - */ -declare class DragControls { - private componentControls; - /** - * Start a drag gesture on every `motion` component that has this set of drag controls - * passed into it via the `dragControls` prop. - * - * ```jsx - * dragControls.start(e, { - * snapToCursor: true - * }) - * ``` - * - * @param event - PointerEvent - * @param options - Options - * - * @public - */ - start(event: React$1.PointerEvent | PointerEvent, options?: DragControlOptions): void; - /** - * Cancels a drag gesture. - * - * ```jsx - * dragControls.cancel() - * ``` - * - * @public - */ - cancel(): void; - /** - * Stops a drag gesture. - * - * ```jsx - * dragControls.stop() - * ``` - * - * @public - */ - stop(): void; -} -/** - * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop - * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we - * might want to initiate that dragging from a different component than the draggable one. - * - * By creating a `dragControls` using the `useDragControls` hook, we can pass this into - * the draggable component's `dragControls` prop. It exposes a `start` method - * that can start dragging from pointer events on other components. - * - * ```jsx - * const dragControls = useDragControls() - * - * function startDrag(event) { - * dragControls.start(event, { snapToCursor: true }) - * } - * - * return ( - * <> - *
- * - * - * ) - * ``` - * - * @public - */ -declare function useDragControls(): DragControls; - -/** - * Checks if a component is a `motion` component. - */ -declare function isMotionComponent(component: React.ComponentType | string): boolean; - -/** - * Unwraps a `motion` component and returns either a string for `motion.div` or - * the React component for `motion(Component)`. - * - * If the component is not a `motion` component it returns undefined. - */ -declare function unwrapMotionComponent(component: React.ComponentType | string): React.ComponentType | string | undefined; - -/** - * Check whether a prop name is a valid `MotionProp` key. - * - * @param key - Name of the property to check - * @returns `true` is key is a valid `MotionProp`. - * - * @public - */ -declare function isValidMotionProp(key: string): boolean; - -declare function useInstantLayoutTransition(): (cb?: (() => void) | undefined) => void; - -declare function useResetProjection(): () => void; - -type FrameCallback = (timestamp: number, delta: number) => void; -declare function useAnimationFrame(callback: FrameCallback): void; - -type Cycle = (i?: number) => void; -type CycleState = [T, Cycle]; -/** - * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments. - * - * An index value can be passed to the returned `cycle` function to cycle to a specific index. - * - * ```jsx - * import * as React from "react" - * import { motion, useCycle } from "framer-motion" - * - * export const MyComponent = () => { - * const [x, cycleX] = useCycle(0, 50, 100) - * - * return ( - * cycleX()} - * /> - * ) - * } - * ``` - * - * @param items - items to cycle through - * @returns [currentState, cycleState] - * - * @public - */ -declare function useCycle(...items: T[]): CycleState; - -interface UseInViewOptions extends Omit { - root?: RefObject; - once?: boolean; - amount?: "some" | "all" | number; - initial?: boolean; -} -declare function useInView(ref: RefObject, { root, margin, amount, once, initial, }?: UseInViewOptions): boolean; - -declare function useInstantTransition(): (callback: () => void) => void; -declare function disableInstantTransitions(): void; - -declare function usePageInView(): boolean; - -/** - * Creates a `transformPagePoint` function that accounts for SVG viewBox scaling. - * - * When dragging SVG elements inside an SVG with a viewBox that differs from - * the rendered dimensions (e.g., `viewBox="0 0 100 100"` but rendered at 500x500 pixels), - * pointer coordinates need to be transformed to match the SVG's coordinate system. - * - * @example - * ```jsx - * function App() { - * const svgRef = useRef(null) - * - * return ( - * - * - * - * - * - * ) - * } - * ``` - * - * @param svgRef - A React ref to the SVG element - * @returns A transformPagePoint function for use with MotionConfig - * - * @public - */ -declare function transformViewBoxPoint(svgRef: RefObject): TransformPoint; - -/** - * Creates a `transformPagePoint` function that corrects pointer coordinates - * for a parent container with CSS transforms (rotation, scale, skew). - * - * When dragging elements inside a transformed parent, pointer coordinates - * need to be transformed through the inverse of the parent's transform - * so the drag offset is in local space. - * - * Works with both static and continuously animating transforms. - * - * @example - * ```jsx - * function App() { - * const ref = useRef(null) - * - * return ( - * - * - * - * - * - * ) - * } - * ``` - * - * @param parentRef - A React ref to the transformed parent element - * @returns A transformPagePoint function for use with MotionConfig - * - * @public - */ -declare function correctParentTransform(parentRef: RefObject): TransformPoint; - -declare function startOptimizedAppearAnimation(element: HTMLElement, name: string, keyframes: string[] | number[], options: ValueAnimationTransition, onReady?: (animation: Animation) => void): void; - -interface LayoutGroupContextProps { - id?: string; - group?: NodeGroup; - forceRender?: VoidFunction; -} -declare const LayoutGroupContext: React$1.Context; - -interface MotionContextProps { - visualElement?: VisualElement; - initial?: false | string | string[]; - animate?: string | string[]; -} -declare const MotionContext: React$1.Context>; - -interface SwitchLayoutGroup { - register?: (member: IProjectionNode) => void; - deregister?: (member: IProjectionNode) => void; -} -type InitialPromotionConfig = { - /** - * The initial transition to use when the elements in this group mount (and automatically promoted). - * Subsequent updates should provide a transition in the promote method. - */ - transition?: Transition; - /** - * If the follow tree should preserve its opacity when the lead is promoted on mount - */ - shouldPreserveFollowOpacity?: (member: IProjectionNode) => boolean; -}; -type SwitchLayoutGroupContext = SwitchLayoutGroup & InitialPromotionConfig; -/** - * Internal, exported only for usage in Framer - */ -declare const SwitchLayoutGroupContext: React$1.Context; - -/** - * @public - */ -interface ScrollMotionValues { - scrollX: MotionValue; - scrollY: MotionValue; - scrollXProgress: MotionValue; - scrollYProgress: MotionValue; -} - -/** - * This is not an officially supported API and may be removed - * on any version. - */ -declare function useAnimatedState(initialState: any): any[]; - -declare const AnimateSharedLayout: React$1.FunctionComponent>; - -/** - * Note: Still used by components generated by old versions of Framer - * - * @deprecated - */ -declare const DeprecatedLayoutGroupContext: React$1.Context; - -interface ScaleMotionValues { - scaleX: MotionValue; - scaleY: MotionValue; -} -/** - * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse - * of their respective parent scales. - * - * This is useful for undoing the distortion of content when scaling a parent component. - * - * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent. - * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output - * of those instead. - * - * ```jsx - * const MyComponent = () => { - * const { scaleX, scaleY } = useInvertedScale() - * return - * } - * ``` - * - * @deprecated - */ -declare function useInvertedScale(scale?: Partial): ScaleMotionValues; - -export { type AbsoluteKeyframe, AnimatePresence, type AnimatePresenceProps, AnimateSharedLayout, type AnimationSequence, type AnimationType, type At, type CreateVisualElement, type Cycle, type CycleState, type DOMMotionComponents, type DOMSegment, type DOMSegmentWithTransition, DeprecatedLayoutGroupContext, DragControls, type FeatureBundle, type FeatureDefinition, type FeatureDefinitions, type FeaturePackage, type FeaturePackages, type ForwardRefComponent, type FunctionSegment, type HTMLElements, type HTMLMotionProps, type HydratedFeatureDefinition, type HydratedFeatureDefinitions, LayoutGroup, LayoutGroupContext, type LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, type LazyProps, MotionConfig, MotionConfigContext, type MotionConfigProps, MotionContext, type MotionProps, type MotionStyle, type MotionTransform, type MotionValueSegment, type MotionValueSegmentWithTransition, type ObjectSegment, type ObjectSegmentWithTransition, type ObjectTarget, PopChild, PresenceChild, PresenceContext, namespace_d as Reorder, type ResolveKeyframes, type ResolvedAnimationDefinition, type ResolvedAnimationDefinitions, type SVGAttributesAsMotionValues, type SVGMotionProps, type ScrapeMotionValuesFromProps, type ScrollMotionValues, type Segment, type SegmentTransitionOptions, type SegmentValueTransitionOptions, type SequenceLabel, type SequenceLabelWithTime, type SequenceMap, type SequenceOptions, type SequenceProgressCallback, type SequenceTime, SwitchLayoutGroupContext, type UseInViewOptions, type UseScrollOptions, type ValueSequence, type VariantLabels, type VisualState, WillChangeMotionValue, addPointerEvent, addPointerInfo, animate, animateMini, animationControls, animations, correctParentTransform, createScopedAnimate, disableInstantTransitions, distance, distance2D, domAnimation, domMax, domMin, filterProps, inView, isBrowser, isMotionComponent, isValidMotionProp, m, makeUseVisualState, motion, scroll, scrollInfo, startOptimizedAppearAnimation, transformViewBoxPoint, unwrapMotionComponent, useAnimate, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useComposedRefs, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useFollowValue, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePageInView, usePresence, usePresenceData, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useWillChange }; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/m.d.ts b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/m.d.ts deleted file mode 100644 index b155f073..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/m.d.ts +++ /dev/null @@ -1,412 +0,0 @@ -/// -import * as React$1 from 'react'; -import { CSSProperties, PropsWithoutRef, RefAttributes, JSX, SVGAttributes } from 'react'; -import { MotionNodeOptions, MotionValue, TransformProperties, SVGPathProperties } from 'motion-dom'; - -type MotionValueString = MotionValue; -type MotionValueNumber = MotionValue; -type MotionValueAny = MotionValue; -type AnyMotionValue = MotionValueNumber | MotionValueString | MotionValueAny; -type MotionValueHelper = T | AnyMotionValue; -type MakeMotionHelper = { - [K in keyof T]: MotionValueHelper; -}; -type MakeCustomValueTypeHelper = MakeMotionHelper; -type MakeMotion = MakeCustomValueTypeHelper; -type MotionCSS = MakeMotion>; -/** - * @public - */ -type MotionTransform = MakeMotion; -type MotionSVGProps = MakeMotion; -/** - * @public - */ -interface MotionStyle$1 extends MotionCSS, MotionTransform, MotionSVGProps { -} -/** - * Props for `motion` components. - * - * @public - */ -interface MotionProps extends MotionNodeOptions { - /** - * - * The React DOM `style` prop, enhanced with support for `MotionValue`s and separate `transform` values. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * - * return - * } - * ``` - */ - style?: MotionStyle$1; - children?: React.ReactNode | MotionValueNumber | MotionValueString; -} - -interface HTMLElements { - a: HTMLAnchorElement; - abbr: HTMLElement; - address: HTMLElement; - area: HTMLAreaElement; - article: HTMLElement; - aside: HTMLElement; - audio: HTMLAudioElement; - b: HTMLElement; - base: HTMLBaseElement; - bdi: HTMLElement; - bdo: HTMLElement; - big: HTMLElement; - blockquote: HTMLQuoteElement; - body: HTMLBodyElement; - br: HTMLBRElement; - button: HTMLButtonElement; - canvas: HTMLCanvasElement; - caption: HTMLElement; - center: HTMLElement; - cite: HTMLElement; - code: HTMLElement; - col: HTMLTableColElement; - colgroup: HTMLTableColElement; - data: HTMLDataElement; - datalist: HTMLDataListElement; - dd: HTMLElement; - del: HTMLModElement; - details: HTMLDetailsElement; - dfn: HTMLElement; - dialog: HTMLDialogElement; - div: HTMLDivElement; - dl: HTMLDListElement; - dt: HTMLElement; - em: HTMLElement; - embed: HTMLEmbedElement; - fieldset: HTMLFieldSetElement; - figcaption: HTMLElement; - figure: HTMLElement; - footer: HTMLElement; - form: HTMLFormElement; - h1: HTMLHeadingElement; - h2: HTMLHeadingElement; - h3: HTMLHeadingElement; - h4: HTMLHeadingElement; - h5: HTMLHeadingElement; - h6: HTMLHeadingElement; - head: HTMLHeadElement; - header: HTMLElement; - hgroup: HTMLElement; - hr: HTMLHRElement; - html: HTMLHtmlElement; - i: HTMLElement; - iframe: HTMLIFrameElement; - img: HTMLImageElement; - input: HTMLInputElement; - ins: HTMLModElement; - kbd: HTMLElement; - keygen: HTMLElement; - label: HTMLLabelElement; - legend: HTMLLegendElement; - li: HTMLLIElement; - link: HTMLLinkElement; - main: HTMLElement; - map: HTMLMapElement; - mark: HTMLElement; - menu: HTMLElement; - menuitem: HTMLElement; - meta: HTMLMetaElement; - meter: HTMLMeterElement; - nav: HTMLElement; - noindex: HTMLElement; - noscript: HTMLElement; - object: HTMLObjectElement; - ol: HTMLOListElement; - optgroup: HTMLOptGroupElement; - option: HTMLOptionElement; - output: HTMLOutputElement; - p: HTMLParagraphElement; - param: HTMLParamElement; - picture: HTMLElement; - pre: HTMLPreElement; - progress: HTMLProgressElement; - q: HTMLQuoteElement; - rp: HTMLElement; - rt: HTMLElement; - ruby: HTMLElement; - s: HTMLElement; - samp: HTMLElement; - search: HTMLElement; - slot: HTMLSlotElement; - script: HTMLScriptElement; - section: HTMLElement; - select: HTMLSelectElement; - small: HTMLElement; - source: HTMLSourceElement; - span: HTMLSpanElement; - strong: HTMLElement; - style: HTMLStyleElement; - sub: HTMLElement; - summary: HTMLElement; - sup: HTMLElement; - table: HTMLTableElement; - template: HTMLTemplateElement; - tbody: HTMLTableSectionElement; - td: HTMLTableDataCellElement; - textarea: HTMLTextAreaElement; - tfoot: HTMLTableSectionElement; - th: HTMLTableHeaderCellElement; - thead: HTMLTableSectionElement; - time: HTMLTimeElement; - title: HTMLTitleElement; - tr: HTMLTableRowElement; - track: HTMLTrackElement; - u: HTMLElement; - ul: HTMLUListElement; - var: HTMLElement; - video: HTMLVideoElement; - wbr: HTMLElement; - webview: HTMLWebViewElement; -} - -/** - * @public - */ -type ForwardRefComponent = { - readonly $$typeof: symbol; -} & ((props: PropsWithoutRef

& RefAttributes) => JSX.Element); -type AttributesWithoutMotionProps = { - [K in Exclude]?: Attributes[K]; -}; -/** - * @public - */ -type HTMLMotionProps = AttributesWithoutMotionProps & MotionProps; -/** - * Motion-optimised versions of React's HTML components. - * - * @public - */ -type HTMLMotionComponents = { - [K in keyof HTMLElements]: ForwardRefComponent>; -}; - -type UnionStringArray> = T[number]; -declare const svgElements: readonly ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "svg", "switch", "symbol", "text", "tspan", "use", "view", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "linearGradient", "radialGradient", "textPath"]; -type SVGElements = UnionStringArray; - -interface SVGAttributesWithoutMotionProps extends Pick, Exclude, keyof MotionProps>> { -} -/** - * Blanket-accept any SVG attribute as a `MotionValue` - * @public - */ -type SVGAttributesAsMotionValues = MakeMotion>; -type UnwrapSVGFactoryElement = F extends React.SVGProps ? P : never; -/** - * @public - */ -interface SVGMotionProps extends SVGAttributesAsMotionValues, MotionProps { -} -/** - * Motion-optimised versions of React's SVG components. - * - * @public - */ -type SVGMotionComponents = { - [K in SVGElements]: ForwardRefComponent, SVGMotionProps>>; -}; - -type DOMMotionComponents = HTMLMotionComponents & SVGMotionComponents; - -type MotionComponentProps = { - [K in Exclude]?: Props[K]; -} & MotionProps; -type MotionComponent = T extends keyof DOMMotionComponents ? DOMMotionComponents[T] : React$1.ComponentType, "children"> & { - children?: "children" extends keyof P ? P["children"] | MotionComponentProps

["children"] : MotionComponentProps

["children"]; -}>; -interface MotionComponentOptions { - forwardMotionProps?: boolean; - /** - * Specify whether the component renders an HTML or SVG element. - * This is useful when wrapping custom SVG components that need - * SVG-specific attribute handling (like viewBox animation). - * By default, Motion auto-detects based on the component name, - * but custom React components are always treated as HTML. - */ - type?: "html" | "svg"; -} - -declare function createMinimalMotionComponent(Component: TagName | string | React.ComponentType, options?: MotionComponentOptions): MotionComponent; - -/** - * HTML components - */ -declare const MotionA: ForwardRefComponent>; -declare const MotionAbbr: ForwardRefComponent>; -declare const MotionAddress: ForwardRefComponent>; -declare const MotionArea: ForwardRefComponent>; -declare const MotionArticle: ForwardRefComponent>; -declare const MotionAside: ForwardRefComponent>; -declare const MotionAudio: ForwardRefComponent>; -declare const MotionB: ForwardRefComponent>; -declare const MotionBase: ForwardRefComponent>; -declare const MotionBdi: ForwardRefComponent>; -declare const MotionBdo: ForwardRefComponent>; -declare const MotionBig: ForwardRefComponent>; -declare const MotionBlockquote: ForwardRefComponent>; -declare const MotionBody: ForwardRefComponent>; -declare const MotionButton: ForwardRefComponent>; -declare const MotionCanvas: ForwardRefComponent>; -declare const MotionCaption: ForwardRefComponent>; -declare const MotionCite: ForwardRefComponent>; -declare const MotionCode: ForwardRefComponent>; -declare const MotionCol: ForwardRefComponent>; -declare const MotionColgroup: ForwardRefComponent>; -declare const MotionData: ForwardRefComponent>; -declare const MotionDatalist: ForwardRefComponent>; -declare const MotionDd: ForwardRefComponent>; -declare const MotionDel: ForwardRefComponent>; -declare const MotionDetails: ForwardRefComponent>; -declare const MotionDfn: ForwardRefComponent>; -declare const MotionDialog: ForwardRefComponent>; -declare const MotionDiv: ForwardRefComponent>; -declare const MotionDl: ForwardRefComponent>; -declare const MotionDt: ForwardRefComponent>; -declare const MotionEm: ForwardRefComponent>; -declare const MotionEmbed: ForwardRefComponent>; -declare const MotionFieldset: ForwardRefComponent>; -declare const MotionFigcaption: ForwardRefComponent>; -declare const MotionFigure: ForwardRefComponent>; -declare const MotionFooter: ForwardRefComponent>; -declare const MotionForm: ForwardRefComponent>; -declare const MotionH1: ForwardRefComponent>; -declare const MotionH2: ForwardRefComponent>; -declare const MotionH3: ForwardRefComponent>; -declare const MotionH4: ForwardRefComponent>; -declare const MotionH5: ForwardRefComponent>; -declare const MotionH6: ForwardRefComponent>; -declare const MotionHead: ForwardRefComponent>; -declare const MotionHeader: ForwardRefComponent>; -declare const MotionHgroup: ForwardRefComponent>; -declare const MotionHr: ForwardRefComponent>; -declare const MotionHtml: ForwardRefComponent>; -declare const MotionI: ForwardRefComponent>; -declare const MotionIframe: ForwardRefComponent>; -declare const MotionImg: ForwardRefComponent>; -declare const MotionInput: ForwardRefComponent>; -declare const MotionIns: ForwardRefComponent>; -declare const MotionKbd: ForwardRefComponent>; -declare const MotionKeygen: ForwardRefComponent>; -declare const MotionLabel: ForwardRefComponent>; -declare const MotionLegend: ForwardRefComponent>; -declare const MotionLi: ForwardRefComponent>; -declare const MotionLink: ForwardRefComponent>; -declare const MotionMain: ForwardRefComponent>; -declare const MotionMap: ForwardRefComponent>; -declare const MotionMark: ForwardRefComponent>; -declare const MotionMenu: ForwardRefComponent>; -declare const MotionMenuitem: ForwardRefComponent>; -declare const MotionMeter: ForwardRefComponent>; -declare const MotionNav: ForwardRefComponent>; -declare const MotionObject: ForwardRefComponent>; -declare const MotionOl: ForwardRefComponent>; -declare const MotionOptgroup: ForwardRefComponent>; -declare const MotionOption: ForwardRefComponent>; -declare const MotionOutput: ForwardRefComponent>; -declare const MotionP: ForwardRefComponent>; -declare const MotionParam: ForwardRefComponent>; -declare const MotionPicture: ForwardRefComponent>; -declare const MotionPre: ForwardRefComponent>; -declare const MotionProgress: ForwardRefComponent>; -declare const MotionQ: ForwardRefComponent>; -declare const MotionRp: ForwardRefComponent>; -declare const MotionRt: ForwardRefComponent>; -declare const MotionRuby: ForwardRefComponent>; -declare const MotionS: ForwardRefComponent>; -declare const MotionSamp: ForwardRefComponent>; -declare const MotionScript: ForwardRefComponent>; -declare const MotionSection: ForwardRefComponent>; -declare const MotionSelect: ForwardRefComponent>; -declare const MotionSmall: ForwardRefComponent>; -declare const MotionSource: ForwardRefComponent>; -declare const MotionSpan: ForwardRefComponent>; -declare const MotionStrong: ForwardRefComponent>; -declare const MotionStyle: ForwardRefComponent>; -declare const MotionSub: ForwardRefComponent>; -declare const MotionSummary: ForwardRefComponent>; -declare const MotionSup: ForwardRefComponent>; -declare const MotionTable: ForwardRefComponent>; -declare const MotionTbody: ForwardRefComponent>; -declare const MotionTd: ForwardRefComponent>; -declare const MotionTextarea: ForwardRefComponent>; -declare const MotionTfoot: ForwardRefComponent>; -declare const MotionTh: ForwardRefComponent>; -declare const MotionThead: ForwardRefComponent>; -declare const MotionTime: ForwardRefComponent>; -declare const MotionTitle: ForwardRefComponent>; -declare const MotionTr: ForwardRefComponent>; -declare const MotionTrack: ForwardRefComponent>; -declare const MotionU: ForwardRefComponent>; -declare const MotionUl: ForwardRefComponent>; -declare const MotionVideo: ForwardRefComponent>; -declare const MotionWbr: ForwardRefComponent>; -declare const MotionWebview: ForwardRefComponent>; -/** - * SVG components - */ -declare const MotionAnimate: ForwardRefComponent>; -declare const MotionCircle: ForwardRefComponent>; -declare const MotionDefs: ForwardRefComponent>; -declare const MotionDesc: ForwardRefComponent>; -declare const MotionEllipse: ForwardRefComponent>; -declare const MotionG: ForwardRefComponent>; -declare const MotionImage: ForwardRefComponent>; -declare const MotionLine: ForwardRefComponent>; -declare const MotionFilter: ForwardRefComponent>; -declare const MotionMarker: ForwardRefComponent>; -declare const MotionMask: ForwardRefComponent>; -declare const MotionMetadata: ForwardRefComponent>; -declare const MotionPath: ForwardRefComponent>; -declare const MotionPattern: ForwardRefComponent>; -declare const MotionPolygon: ForwardRefComponent>; -declare const MotionPolyline: ForwardRefComponent>; -declare const MotionRect: ForwardRefComponent>; -declare const MotionStop: ForwardRefComponent>; -declare const MotionSvg: ForwardRefComponent>; -declare const MotionSymbol: ForwardRefComponent>; -declare const MotionText: ForwardRefComponent>; -declare const MotionTspan: ForwardRefComponent>; -declare const MotionUse: ForwardRefComponent>; -declare const MotionView: ForwardRefComponent>; -declare const MotionClipPath: ForwardRefComponent>; -declare const MotionFeBlend: ForwardRefComponent>; -declare const MotionFeColorMatrix: ForwardRefComponent>; -declare const MotionFeComponentTransfer: ForwardRefComponent>; -declare const MotionFeComposite: ForwardRefComponent>; -declare const MotionFeConvolveMatrix: ForwardRefComponent>; -declare const MotionFeDiffuseLighting: ForwardRefComponent>; -declare const MotionFeDisplacementMap: ForwardRefComponent>; -declare const MotionFeDistantLight: ForwardRefComponent>; -declare const MotionFeDropShadow: ForwardRefComponent>; -declare const MotionFeFlood: ForwardRefComponent>; -declare const MotionFeFuncA: ForwardRefComponent>; -declare const MotionFeFuncB: ForwardRefComponent>; -declare const MotionFeFuncG: ForwardRefComponent>; -declare const MotionFeFuncR: ForwardRefComponent>; -declare const MotionFeGaussianBlur: ForwardRefComponent>; -declare const MotionFeImage: ForwardRefComponent>; -declare const MotionFeMerge: ForwardRefComponent>; -declare const MotionFeMergeNode: ForwardRefComponent>; -declare const MotionFeMorphology: ForwardRefComponent>; -declare const MotionFeOffset: ForwardRefComponent>; -declare const MotionFePointLight: ForwardRefComponent>; -declare const MotionFeSpecularLighting: ForwardRefComponent>; -declare const MotionFeSpotLight: ForwardRefComponent>; -declare const MotionFeTile: ForwardRefComponent>; -declare const MotionFeTurbulence: ForwardRefComponent>; -declare const MotionForeignObject: ForwardRefComponent>; -declare const MotionLinearGradient: ForwardRefComponent>; -declare const MotionRadialGradient: ForwardRefComponent>; -declare const MotionTextPath: ForwardRefComponent>; - -export { MotionA as a, MotionAbbr as abbr, MotionAddress as address, MotionAnimate as animate, MotionArea as area, MotionArticle as article, MotionAside as aside, MotionAudio as audio, MotionB as b, MotionBase as base, MotionBdi as bdi, MotionBdo as bdo, MotionBig as big, MotionBlockquote as blockquote, MotionBody as body, MotionButton as button, MotionCanvas as canvas, MotionCaption as caption, MotionCircle as circle, MotionCite as cite, MotionClipPath as clipPath, MotionCode as code, MotionCol as col, MotionColgroup as colgroup, createMinimalMotionComponent as create, MotionData as data, MotionDatalist as datalist, MotionDd as dd, MotionDefs as defs, MotionDel as del, MotionDesc as desc, MotionDetails as details, MotionDfn as dfn, MotionDialog as dialog, MotionDiv as div, MotionDl as dl, MotionDt as dt, MotionEllipse as ellipse, MotionEm as em, MotionEmbed as embed, MotionFeBlend as feBlend, MotionFeColorMatrix as feColorMatrix, MotionFeComponentTransfer as feComponentTransfer, MotionFeComposite as feComposite, MotionFeConvolveMatrix as feConvolveMatrix, MotionFeDiffuseLighting as feDiffuseLighting, MotionFeDisplacementMap as feDisplacementMap, MotionFeDistantLight as feDistantLight, MotionFeDropShadow as feDropShadow, MotionFeFlood as feFlood, MotionFeFuncA as feFuncA, MotionFeFuncB as feFuncB, MotionFeFuncG as feFuncG, MotionFeFuncR as feFuncR, MotionFeGaussianBlur as feGaussianBlur, MotionFeImage as feImage, MotionFeMerge as feMerge, MotionFeMergeNode as feMergeNode, MotionFeMorphology as feMorphology, MotionFeOffset as feOffset, MotionFePointLight as fePointLight, MotionFeSpecularLighting as feSpecularLighting, MotionFeSpotLight as feSpotLight, MotionFeTile as feTile, MotionFeTurbulence as feTurbulence, MotionFieldset as fieldset, MotionFigcaption as figcaption, MotionFigure as figure, MotionFilter as filter, MotionFooter as footer, MotionForeignObject as foreignObject, MotionForm as form, MotionG as g, MotionH1 as h1, MotionH2 as h2, MotionH3 as h3, MotionH4 as h4, MotionH5 as h5, MotionH6 as h6, MotionHead as head, MotionHeader as header, MotionHgroup as hgroup, MotionHr as hr, MotionHtml as html, MotionI as i, MotionIframe as iframe, MotionImage as image, MotionImg as img, MotionInput as input, MotionIns as ins, MotionKbd as kbd, MotionKeygen as keygen, MotionLabel as label, MotionLegend as legend, MotionLi as li, MotionLine as line, MotionLinearGradient as linearGradient, MotionLink as link, MotionMain as main, MotionMap as map, MotionMark as mark, MotionMarker as marker, MotionMask as mask, MotionMenu as menu, MotionMenuitem as menuitem, MotionMetadata as metadata, MotionMeter as meter, MotionNav as nav, MotionObject as object, MotionOl as ol, MotionOptgroup as optgroup, MotionOption as option, MotionOutput as output, MotionP as p, MotionParam as param, MotionPath as path, MotionPattern as pattern, MotionPicture as picture, MotionPolygon as polygon, MotionPolyline as polyline, MotionPre as pre, MotionProgress as progress, MotionQ as q, MotionRadialGradient as radialGradient, MotionRect as rect, MotionRp as rp, MotionRt as rt, MotionRuby as ruby, MotionS as s, MotionSamp as samp, MotionScript as script, MotionSection as section, MotionSelect as select, MotionSmall as small, MotionSource as source, MotionSpan as span, MotionStop as stop, MotionStrong as strong, MotionStyle as style, MotionSub as sub, MotionSummary as summary, MotionSup as sup, MotionSvg as svg, MotionSymbol as symbol, MotionTable as table, MotionTbody as tbody, MotionTd as td, MotionText as text, MotionTextPath as textPath, MotionTextarea as textarea, MotionTfoot as tfoot, MotionTh as th, MotionThead as thead, MotionTime as time, MotionTitle as title, MotionTr as tr, MotionTrack as track, MotionTspan as tspan, MotionU as u, MotionUl as ul, MotionUse as use, MotionVideo as video, MotionView as view, MotionWbr as wbr, MotionWebview as webview }; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/mini.d.ts b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/mini.d.ts deleted file mode 100644 index 0c2d756c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/mini.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as motion_dom from 'motion-dom'; -import { AnimationScope } from 'motion-dom'; - -declare function useAnimateMini(): [AnimationScope, (elementOrSelector: motion_dom.ElementOrSelector, keyframes: motion_dom.DOMKeyframesDefinition, options?: motion_dom.AnimationOptions | undefined) => motion_dom.AnimationPlaybackControlsWithThen]; - -export { useAnimateMini as useAnimate }; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/mini.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/mini.js deleted file mode 100644 index ed7ee2e6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/mini.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,function(t,e){"use strict";function n(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}let i=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(i=(t,e,n)=>{if(!t)throw new Error(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n))});const s=t=>t,a=t=>1e3*t,o=t=>t/1e3,r=t=>null!==t;class l{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}function u(t){for(let e=1;et.startsWith("--");const d={};function m(t,e){const n=function(t){let e;return()=>(void 0===e&&(e=t()),e)}(t);return()=>d[e]??n()}const c=m(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),p=m(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),f=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,g={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:f([0,.65,.55,1]),circOut:f([.55,0,1,.45]),backIn:f([.31,.01,.66,-.59]),backOut:f([.33,1.53,.69,.99])};function y(t,e){return t?"function"==typeof t?p()?((t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;eArray.isArray(t)&&"number"==typeof t[0])(t)?f(t):Array.isArray(t)?t.map(t=>y(t,e)||g.easeOut):g[t]:void 0}class T extends l{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:s,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=Boolean(a),this.allowFlatten=o,this.options=t,i("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const d=function({type:t,...e}){return function(t){return"function"==typeof t&&"applyToOptions"in t}(t)&&p()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,n,{delay:i=0,duration:s=300,repeat:a=0,repeatType:o="loop",ease:r="easeOut",times:l}={},u){const h={[e]:n};l&&(h.offset=l);const d=y(r,s);Array.isArray(d)&&(h.easing=d);const m={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};return u&&(m.pseudoElement=u),t.animate(h,m)}(e,n,s,d,a),!1===d.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const t=function(t,{repeat:e,repeatType:n="loop"},i,s=1){const a=t.filter(r),o=s<0||e&&"loop"!==n&&e%2==1?0:a.length-1;return o&&void 0!==i?i:a[o]}(s,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(t),function(t,e,n){h(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return o(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+o(t)}get time(){return o(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=a(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&c()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),s):i(this)}}class b{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return A(this.animations,"duration")}get iterationDuration(){return A(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function A(t,e){let n=0;for(let i=0;in&&(n=s)}return n}class S extends b{then(t,e){return this.finished.finally(t).then(()=>{})}}const E=new WeakMap,k=(t,e="")=>`${t}:${e}`;function v(t){let e=E.get(t);return e||(e=new Map,E.set(t,e)),e}function w(t,e){const n=t?.[e]??t?.default??t;return n!==t?function(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}(n,t):n}const B=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function R(t,e){for(let n=0;nnull!=t)}(t,s),r=o.length;i(Boolean(r),"No valid elements provided.","no-valid-elements");const l=[];for(let t=0;te.delete(n)),h.push(s)}return h}t.useAnimate=function(){const t=n(()=>({current:null,animations:[]})),i=n(()=>(t=>function(e,n,i){return new S(M(e,n,i,t))})(t));var s;return s=()=>{t.animations.forEach(t=>t.stop())},e.useEffect(()=>()=>s(),[]),[t,i]}}); diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/projection.d.ts b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/projection.d.ts deleted file mode 100644 index 32faa619..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/projection.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { HTMLProjectionNode, HTMLVisualElement, addScaleCorrector, buildTransform, calcBoxDelta, correctBorderRadius, correctBoxShadow, frame, frameData, mix, nodeGroup, recordStats, statsBuffer } from 'motion-dom'; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-animate.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-animate.js deleted file mode 100644 index b1fb3752..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-animate.js +++ /dev/null @@ -1,2 +0,0 @@ -function t(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const e=(t,e,n)=>n>e?e:n{},i=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(s=(t,e,s)=>{t||"undefined"==typeof console||console.warn(n(e,s))},i=(t,e,s)=>{if(!t)throw new Error(n(e,s))});const r={},a=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),o=t=>/^0[^.\s]+$/u.test(t);function l(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(...t)=>t.reduce((t,e)=>n=>e(t(n))),c=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class d{constructor(){this.subscriptions=[]}add(e){var n,s;return n=this.subscriptions,s=e,-1===n.indexOf(s)&&n.push(s),()=>t(this.subscriptions,e)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i1e3*t,m=t=>t/1e3,f=(t,e)=>e?t*(1e3/e):0,g=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function y(t,e,n,s){if(t===e&&n===s)return u;const i=e=>function(t,e,n,s,i){let r,a,o=0;do{a=e+(n-e)/2,r=g(a,s,i)-t,r>0?n=a:e=a}while(Math.abs(r)>1e-7&&++o<12);return a}(e,0,1,t,n);return t=>0===t||1===t?t:g(i(t),e,s)}const v=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,b=t=>e=>1-t(1-e),T=y(.33,1.53,.69,.99),w=b(T),M=v(w),S=t=>t>=1?1:(t*=2)<1?.5*w(t):.5*(2-Math.pow(2,-10*(t-1))),x=t=>1-Math.sin(Math.acos(t)),A=b(x),k=v(x),V=y(.42,0,1,1),C=y(0,0,.58,1),F=y(.42,0,.58,1),P=t=>Array.isArray(t)&&"number"!=typeof t[0];function R(t,e){return P(t)?t[((t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t})(0,t.length,e)]:t}const E=t=>Array.isArray(t)&&"number"==typeof t[0],B={linear:u,easeIn:V,easeInOut:F,easeOut:C,circIn:x,circInOut:k,circOut:A,backIn:w,backInOut:M,backOut:T,anticipate:S},D=t=>{if(E(t)){i(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,r]=t;return y(e,n,s,r)}return"string"==typeof t?(i(void 0!==B[t],`Invalid easing type '${t}'`,"invalid-easing-type"),B[t]):t},I=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function O(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=I.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function o(e){r.has(e)&&(l.schedule(e),t()),e(a)}const l={schedule:(t,i=!1,a=!1)=>{const o=a&&s?e:n;return i&&r.add(t),o.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(i=!0);s=!0;const r=e;e=n,n=r,e.forEach(o),e.clear(),s=!1,i&&(i=!1,l.process(t))}};return l}(a),t),{}),{setup:l,read:u,resolveKeyframes:h,preUpdate:c,update:d,preRender:p,render:m,postRender:f}=o,g=()=>{const a=r.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=s?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,l.process(i),u.process(i),h.process(i),c.process(i),d.process(i),p.process(i),m.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))};return{schedule:I.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(g)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e(void 0===j&&L.set(K.isProcessing||r.useManualTiming?K.timestamp:performance.now()),j),set:t=>{j=t,queueMicrotask(W)}},Y=t=>e=>"string"==typeof e&&e.startsWith(t),U=Y("--"),X=Y("var(--"),q=t=>!!X(t)&&z.test(t.split("/*")[0].trim()),z=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Z(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const _={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},H={..._,transform:t=>e(0,1,t)},G={..._,default:1},J=t=>Math.round(1e5*t)/1e5,Q=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const tt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,et=(t,e)=>n=>Boolean("string"==typeof n&&tt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),nt=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,a,o]=s.match(Q);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},st={..._,transform:t=>Math.round((t=>e(0,255,t))(t))},it={test:et("rgb","red"),parse:nt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+st.transform(t)+", "+st.transform(e)+", "+st.transform(n)+", "+J(H.transform(s))+")"};const rt={test:et("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:it.transform},at=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ot=at("deg"),lt=at("%"),ut=at("px"),ht=at("vh"),ct=at("vw"),dt=(()=>({...lt,parse:t=>lt.parse(t)/100,transform:t=>lt.transform(100*t)}))(),pt={test:et("hsl","hue"),parse:nt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+lt.transform(J(e))+", "+lt.transform(J(n))+", "+J(H.transform(s))+")"},mt={test:t=>it.test(t)||rt.test(t)||pt.test(t),parse:t=>it.test(t)?it.parse(t):pt.test(t)?pt.parse(t):rt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?it.transform(t):pt.transform(t),getAnimatableNone:t=>{const e=mt.parse(t);return e.alpha=0,mt.transform(e)}},ft=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const gt="number",yt="color",vt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function bt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(vt,t=>(mt.test(t)?(s.color.push(r),i.push(yt),n.push(mt.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push(gt),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:a,indexes:s,types:i}}function Tt({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:mt.test(n)?mt.getAnimatableNone(n):n;var n};const Mt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Q)?.length||0)+(t.match(ft)?.length||0)>0},parse:function(t){return bt(t).values},createTransformer:function(t){return Tt(bt(t))},getAnimatableNone:function(t){const e=bt(t);return Tt(e)(e.values.map((t,n)=>wt(t,e.split[n])))}};function St(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function xt(t,e){return n=>n>0?e:t}const At=(t,e,n)=>t+(e-t)*n,kt=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Vt=[rt,it,pt];function Ct(t){const e=(n=t,Vt.find(t=>t.test(n)));var n;if(s(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let i=e.parse(t);return e===pt&&(i=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,r=0,a=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,o=2*n-s;i=St(o,s,t+1/3),r=St(o,s,t),a=St(o,s,t-1/3)}else i=r=a=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*a),alpha:s}}(i)),i}const Ft=(t,e)=>{const n=Ct(t),s=Ct(e);if(!n||!s)return xt(t,e);const i={...n};return t=>(i.red=kt(n.red,s.red,t),i.green=kt(n.green,s.green,t),i.blue=kt(n.blue,s.blue,t),i.alpha=At(n.alpha,s.alpha,t),it.transform(i))},Pt=new Set(["none","hidden"]);function Rt(t,e){return n=>At(t,e,n)}function Et(t){return"number"==typeof t?Rt:"string"==typeof t?q(t)?xt:mt.test(t)?Ft:It:Array.isArray(t)?Bt:"object"==typeof t?mt.test(t)?Ft:Dt:xt}function Bt(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>Et(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in s)n[e]=s[e](t);return n}}const It=(t,e)=>{const n=Mt.createTransformer(e),i=bt(t),r=bt(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Pt.has(t)&&!r.values.length||Pt.has(e)&&!i.values.length?function(t,e){return Pt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):h(Bt(function(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>N.update(e,t),stop:()=>$(e),now:()=>K.isProcessing?K.timestamp:L.now()}},$t=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let e=0;e=Kt?1/0:e}function Wt(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(jt(s),Kt);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:m(i)}}const Lt=100,Yt=10,Ut=1,Xt=0,qt=800,zt=.3,Zt=.3,_t={granular:.01,default:2},Ht={granular:.005,default:.5},Gt=.01,Jt=10,Qt=.05,te=1;function ee(t,e){return t*Math.sqrt(1-e*e)}const ne=.001;const se=["duration","bounce"],ie=["stiffness","damping","mass"];function re(t,e){return e.some(e=>void 0!==t[e])}function ae(t){let n={velocity:Xt,stiffness:Lt,damping:Yt,mass:Ut,isResolvedFromDuration:!1,...t};if(!re(t,ie)&&re(t,se))if(n.velocity=0,t.visualDuration){const s=t.visualDuration,i=2*Math.PI/(1.2*s),r=i*i,a=2*e(.05,1,1-(t.bounce||0))*Math.sqrt(r);n={...n,mass:Ut,stiffness:r,damping:a}}else{const i=function({duration:t=qt,bounce:n=zt,velocity:i=Xt,mass:r=Ut}){let a,o;s(t<=p(Jt),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=e(Qt,te,l),t=e(Gt,Jt,m(t)),l<1?(a=e=>{const n=e*l,s=n*t,r=n-i,a=ee(e,l),o=Math.exp(-s);return ne-r/a*o},o=e=>{const n=e*l*t,s=n*i+i,r=Math.pow(l,2)*Math.pow(e,2)*t,o=Math.exp(-n),u=ee(Math.pow(e,2),l);return(-a(e)+ne>0?-1:1)*((s-r)*o)/u}):(a=e=>Math.exp(-e*t)*((e-i)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(i-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(a,o,5/t);if(t=p(t),isNaN(u))return{stiffness:Lt,damping:Yt,duration:t};{const e=Math.pow(u,2)*r;return{stiffness:e,damping:2*l*Math.sqrt(r*e),duration:t}}}({...t,velocity:0});n={...n,...i,mass:Ut},n.isResolvedFromDuration=!0}return n}function oe(t=Zt,e=zt){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],o={done:!1,value:r},{stiffness:l,damping:u,mass:h,duration:c,velocity:d,isResolvedFromDuration:f}=ae({...n,velocity:-m(n.velocity||0)}),g=d||0,y=u/(2*Math.sqrt(l*h)),v=a-r,b=m(Math.sqrt(l/h)),T=Math.abs(v)<5;let w,M,S,x,A,k;if(s||(s=T?_t.granular:_t.default),i||(i=T?Ht.granular:Ht.default),y<1)S=ee(b,y),x=(g+y*b*v)/S,w=t=>{const e=Math.exp(-y*b*t);return a-e*(x*Math.sin(S*t)+v*Math.cos(S*t))},A=y*b*x+v*S,k=y*b*v-x*S,M=t=>Math.exp(-y*b*t)*(A*Math.sin(S*t)+k*Math.cos(S*t));else if(1===y){w=t=>a-Math.exp(-b*t)*(v+(g+b*v)*t);const t=g+b*v;M=e=>Math.exp(-b*e)*(b*t*e-g)}else{const t=b*Math.sqrt(y*y-1);w=e=>{const n=Math.exp(-y*b*e),s=Math.min(t*e,300);return a-n*((g+y*b*v)*Math.sinh(s)+t*v*Math.cosh(s))/t};const e=(g+y*b*v)/t,n=y*b*e-v*t,s=y*b*v-e*t;M=e=>{const i=Math.exp(-y*b*e),r=Math.min(t*e,300);return i*(n*Math.sinh(r)+s*Math.cosh(r))}}const V={calculatedDuration:f&&c||null,velocity:t=>p(M(t)),next:t=>{if(!f&&y<1){const e=Math.exp(-y*b*t),n=Math.sin(S*t),r=Math.cos(S*t),l=a-e*(x*n+v*r),u=p(e*(A*n+k*r));return o.done=Math.abs(u)<=s&&Math.abs(a-l)<=i,o.value=o.done?a:l,o}const e=w(t);if(f)o.done=t>=c;else{const n=p(M(t));o.done=Math.abs(n)<=s&&Math.abs(a-e)<=i}return o.value=o.done?a:e,o},toString:()=>{const t=Math.min(jt(V),Kt),e=$t(e=>V.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return V}oe.applyToOptions=t=>{const e=Wt(t,100,oe);return t.ease=e.ease,t.duration=p(e.duration),t.type="keyframes",t};function le(t,e,n){const s=Math.max(e-5,0);return f(n-t(s),e-s)}function ue({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:h}){const c=t[0],d={done:!1,value:c},p=t=>void 0===o?l:void 0===l||Math.abs(o-t)-m*Math.exp(-t/s),v=t=>g+y(t),b=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let T,w;const M=t=>{var e;(e=d.value,void 0!==o&&el)&&(T=t,w=oe({keyframes:[d.value,p(d.value)],velocity:le(v,t,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:h}))};return M(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==T||(e=!0,b(t),M(t)),void 0!==T&&t>=T?w.next(t-T):(!e&&b(t),d)}}}function he(t,n,{clamp:s=!0,ease:a,mixer:o}={}){const l=t.length;if(i(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const d=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),n=[...n].reverse());const p=function(t,e,n){const s=[],i=n||r.mix||Ot,a=t.length-1;for(let n=0;n{if(d&&e1)for(;sf(e(t[0],t[l-1],n)):f}function ce(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=c(0,e,s);t.push(At(n,1,i))}}function de(t){const e=[0];return ce(e,t.length-1),e}function pe({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=P(s)?s.map(D):D(s),r={done:!1,value:e[0]},a=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:de(e),t),o=he(a,e,{ease:Array.isArray(i)?i:(l=e,u=i,l.map(()=>u||F).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}const me=t=>null!==t;function fe(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(me),a=i<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return a&&void 0!==s?s:r[a]}const ge={decay:ue,inertia:ue,tween:pe,keyframes:pe,spring:oe};function ye(t){"string"==typeof t.type&&(t.type=ge[t.type])}class ve{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const be=t=>t/100;class Te extends ve{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==L.now()&&this.tick(L.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;ye(t);const{type:e=pe,repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=t;let{keyframes:a}=t;const o=e||pe;o!==pe&&"number"!=typeof a[0]&&(this.mixKeyframes=h(be,Ot(a[0],a[1])),a=[0,100]);const l=o({...t,keyframes:a});"mirror"===i&&(this.mirroredGenerator=o({...t,keyframes:[...a].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=jt(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:l}=this;if(null===this.startTime)return s.next(0);const{delay:u=0,keyframes:h,repeat:c,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let b,T=this.currentTime,w=s;if(c){const t=Math.min(this.currentTime,i)/o;let n=Math.floor(t),s=t%1;!s&&t>=1&&(s=1),1===s&&n--,n=Math.min(n,c+1);Boolean(n%2)&&("reverse"===d?(s=1-s,p&&(s-=p/o)):"mirror"===d&&(w=a)),T=e(0,1,s)*o}v?(this.delayState.value=h[0],b=this.delayState):b=w.next(T),r&&!v&&(b.value=r(b.value));let{done:M}=b;v||null===l||(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&M);return S&&m!==ue&&(b.value=fe(h,this.options,g,this.speed)),f&&f(b.value),S&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return m(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(this.currentTime)}set time(t){t=p(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return le(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(L.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=m(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Nt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(L.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const we=t=>180*t/Math.PI,Me=t=>{const e=we(Math.atan2(t[1],t[0]));return xe(e)},Se={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Me,rotateZ:Me,skewX:t=>we(Math.atan(t[1])),skewY:t=>we(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},xe=t=>((t%=360)<0&&(t+=360),t),Ae=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ke=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ve={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ae,scaleY:ke,scale:t=>(Ae(t)+ke(t))/2,rotateX:t=>xe(we(Math.atan2(t[6],t[5]))),rotateY:t=>xe(we(Math.atan2(-t[2],t[0]))),rotateZ:Me,rotate:Me,skewX:t=>we(Math.atan(t[4])),skewY:t=>we(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ce(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||"none"===t)return Ce(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Ve,i=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Se,i=e}if(!i)return Ce(e);const r=s[e],a=i[1].split(",").map(Pe);return"function"==typeof r?r(a):a[r]}function Pe(t){return parseFloat(t.trim())}const Re=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ee=(()=>new Set([...Re,"pathRotation"]))(),Be=t=>t===_||t===ut,De=new Set(["x","y","z"]),Ie=Re.filter(t=>!De.has(t));const Oe={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return"border-box"===s?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return"border-box"===s?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Fe(e,"x"),y:(t,{transform:e})=>Fe(e,"y")};Oe.translateX=Oe.x,Oe.translateY=Oe.y;const Ne=new Set;let $e=!1,Ke=!1,je=!1;function We(){if(Ke){const t=Array.from(Ne).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ie.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ke=!1,$e=!1,Ne.forEach(t=>t.complete(je)),Ne.clear()}function Le(){Ne.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ke=!0)})}class Ye{constructor(t,e,n,s,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ne.add(this),$e||($e=!0,N.read(Le),N.resolveKeyframes(We))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;if(null===t[0]){const i=s?.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,r);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===i&&s.set(t[0])}!function(t){for(let e=1;et.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}const Xe={};function qe(t,e){const n=l(t);return()=>Xe[e]??n()}const ze=qe(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Ze=qe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),_e=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,He={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_e([0,.65,.55,1]),circOut:_e([.55,0,1,.45]),backIn:_e([.31,.01,.66,-.59]),backOut:_e([.33,1.53,.69,.99])};function Ge(t,e){return t?"function"==typeof t?Ze()?$t(t,e):"ease-out":E(t)?_e(t):Array.isArray(t)?t.map(t=>Ge(t,e)||He.easeOut):He[t]:void 0}function Je(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:l}={},u=void 0){const h={[e]:n};l&&(h.offset=l);const c=Ge(o,i);Array.isArray(c)&&(h.easing=c);const d={delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};u&&(d.pseudoElement=u);return t.animate(h,d)}function Qe(t){return"function"==typeof t&&"applyToOptions"in t}class tn extends ve{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:s,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:l}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=a,this.options=t,i("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=function({type:t,...e}){return Qe(t)&&Ze()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Je(e,n,s,u,r),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=fe(s,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(t),Ue(e,n,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return m(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+m(t)}get time(){return m(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=p(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ze()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),u):s(this)}}const en={anticipate:S,backInOut:M,circInOut:k};function nn(t){"string"==typeof t.ease&&t.ease in en&&(t.ease=en[t.ease])}class sn extends tn{constructor(t){nn(t),ye(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...a}=this.options;if(!n)return;if(void 0!==t)return void n.set(t);const o=new Te({...a,autoplay:!1}),l=Math.max(10,L.now()-this.startTime),u=e(0,10,l-10),h=o.sample(l).value,{name:c}=this.options;r&&c&&Ue(r,c,h),n.setWithVelocity(o.sample(Math.max(0,l-u)).value,h,u),o.stop()}}const rn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Mt.test(t)&&"0"!==t||t.startsWith("url(")));function an(t){t.duration=0,t.type="keyframes"}const on=new Set(["opacity","clipPath","filter","transform"]),ln=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const un=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),hn=l(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function cn(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:a,keyframes:o}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:h}=e.owner.getProps();return hn()&&n&&(on.has(n)||un.has(n)&&function(t){for(let e=0;e{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=L.now();const c={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,name:o,motionValue:l,element:u,...h},d=u?.KeyframeResolver||Ye;this.keyframeResolver=new d(a,(t,e,n)=>this.onKeyframesResolved(t,e,c,!n),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:a,type:o,velocity:l,delay:h,isHandoff:c,onUpdate:d}=n;this.resolvedAt=L.now();let p=!0;(function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const a=t[t.length-1],o=rn(r,e),l=rn(a,e);return s(o===l,`You are trying to animate ${e} from "${r}" to "${a}". "${o?a:r}" is not an animatable value.`,"value-not-animatable"),!(!o||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},f=p&&!c&&cn(m),g=m.motionValue?.owner?.current;let y;if(f)try{y=new sn({...m,element:g})}catch{y=new Te(m)}else y=new Te(m);y.finished.then(()=>{this.notifyFinished()}).catch(u),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),je=!0,Le(),We(),je=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class pn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return mn(this.animations,"duration")}get iterationDuration(){return mn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function mn(t,e){let n=0;for(let s=0;sn&&(n=i)}return n}class fn extends pn{then(t,e){return this.finished.finally(t).then(()=>{})}}class gn{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=L.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=L.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new d);const n=this.events[t].add(e);return"change"===t?()=>{n(),N.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=L.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return f(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function yn(t,e){return new gn(t,e)}function vn(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function bn(t,e){const n=t?.[e]??t?.default??t;return n!==t?vn(n,t):n}const Tn={type:"spring",stiffness:500,damping:25,restSpeed:10},wn={type:"keyframes",duration:.8},Mn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Sn=(t,{keyframes:e})=>e.length>2?wn:Ee.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Tn:Mn,xn=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const An=(t,e,n,s={},i,a)=>o=>{const l=bn(s,t)||{},u=l.delay||s.delay||0;let{elapsed:h=0}=s;h-=p(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-h,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:a?void 0:i};(function(t){for(const e in t)if(!xn.has(e))return!0;return!1})(l)||Object.assign(c,Sn(t,c)),c.duration&&(c.duration=p(c.duration)),c.repeatDelay&&(c.repeatDelay=p(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(an(c),0===c.delay&&(d=!0)),(r.instantAnimations||r.skipAnimations||i?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,an(c),c.delay=0),c.allowFlatten=!l.type&&!l.ease,d&&!a&&void 0!==e.get()){const t=fe(c.keyframes,l);if(void 0!==t)return void N.update(()=>{c.onUpdate(t),c.onComplete()})}return l.isSync?new Te(c):new dn(c)},kn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vn(t,e,n=1){i(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=function(t){const e=kn.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const t=o.trim();return a(t)?parseFloat(t):t}return q(r)?Vn(r,e,n+1):r}function Cn(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Fn(t,e,n,s){if("function"==typeof e){const[i,r]=Cn(s);e=e(void 0!==n?n:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=Cn(s);e=e(void 0!==n?n:t.custom,i,r)}return e}const Pn=new Set(["width","height","top","left","right","bottom",...Re]);function Rn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,yn(n))}function En(t){return(t=>Array.isArray(t))(t)?t[t.length-1]||0:t}function Bn(t,e){const n=function(t,e){const n=t.getProps();return Fn(n,e,n.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){Rn(t,e,En(r[e]))}}const Dn=t=>Boolean(t&&t.getVelocity);function In(t,e){const n=t.getValue("willChange");if(s=n,Boolean(Dn(s)&&s.add))return n.add(e);if(!n&&r.WillChange){const n=new r.WillChange("auto");t.addValue("willChange",n),n.add(e)}var s}function On(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Nn="data-"+On("framerAppearId");function $n(t){return t.props[Nn]}function Kn({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function jn(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:a,...o}=e;const l=t.getDefaultTransition();r=r?vn(r,l):l;const u=r?.reduceMotion,h=r?.skipAnimations;s&&(r=s);const c=[],d=i&&t.animationState&&t.animationState.getState()[i],p=r?.path;p&&p.animateVisualElement(t,o,r,n,c);for(const e in o){const s=t.getValue(e,t.latestValues[e]??null),i=o[e];if(void 0===i||d&&Kn(d,e))continue;const a={delay:n,...bn(r||{},e)};h&&(a.skipAnimations=!0);const l=s.get();if(void 0!==l&&!s.isAnimating()&&!Array.isArray(i)&&i===l&&!a.velocity){N.update(()=>s.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){const n=$n(t);if(n){const t=window.MotionHandoffAnimation(n,e,N);null!==t&&(a.startTime=t,p=!0)}}In(t,e);const m=u??t.shouldReduceMotion;s.start(An(e,s,i,m&&Pn.has(e)?{type:!1}:a,t,p));const f=s.animation;f&&c.push(f)}if(a){const e=()=>N.update(()=>{a&&Bn(t,a)});c.length?Promise.all(c).then(e):e()}return c}const Wn=t=>e=>e.test(t),Ln=[_,ut,lt,ot,ct,ht,{test:t=>"auto"===t,parse:t=>t}],Yn=t=>Ln.find(Wn(t));function Un(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||o(t))}const Xn=new Set(["brightness","contrast","saturate","opacity"]);function qn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Q)||[];if(!s)return t;const i=n.replace(s,"");let r=Xn.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const zn=/\b([a-z-]*)\(.*?\)/gu,Zn={...Mt,getAnimatableNone:t=>{const e=t.match(zn);return e?e.map(qn).join(" "):t}},_n={...Mt,getAnimatableNone:t=>{const e=Mt.parse(t);return Mt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Hn={..._,transform:Math.round},Gn={borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,top:ut,right:ut,bottom:ut,left:ut,inset:ut,insetBlock:ut,insetBlockStart:ut,insetBlockEnd:ut,insetInline:ut,insetInlineStart:ut,insetInlineEnd:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,paddingBlock:ut,paddingBlockStart:ut,paddingBlockEnd:ut,paddingInline:ut,paddingInlineStart:ut,paddingInlineEnd:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,marginBlock:ut,marginBlockStart:ut,marginBlockEnd:ut,marginInline:ut,marginInlineStart:ut,marginInlineEnd:ut,fontSize:ut,backgroundPositionX:ut,backgroundPositionY:ut,...{rotate:ot,pathRotation:ot,rotateX:ot,rotateY:ot,rotateZ:ot,scale:G,scaleX:G,scaleY:G,scaleZ:G,skew:ot,skewX:ot,skewY:ot,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:H,originX:dt,originY:dt,originZ:ut},zIndex:Hn,fillOpacity:H,strokeOpacity:H,numOctaves:Hn},Jn={...Gn,color:mt,backgroundColor:mt,outlineColor:mt,fill:mt,stroke:mt,borderColor:mt,borderTopColor:mt,borderRightColor:mt,borderBottomColor:mt,borderLeftColor:mt,filter:Zn,WebkitFilter:Zn,mask:_n,WebkitMask:_n},Qn=t=>Jn[t],ts=new Set([Zn,_n]);function es(t,e){let n=Qn(t);return ts.has(n)||(n=Mt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ns=new Set(["auto","none","0"]);class ss extends Ye{constructor(t,e,n,s,i){super(t,e,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const is=(t,e)=>e&&"number"==typeof t?e.transform(t):t,{schedule:rs}=O(queueMicrotask,!1);function as(t){return"object"==typeof(e=t)&&null!==e&&"ownerSVGElement"in t;var e}const os=[...Ln,mt,Mt],ls=()=>({x:{min:0,max:0},y:{min:0,max:0}}),us=new WeakMap;const hs=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function cs(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||hs.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const ds={current:null},ps={current:!1},ms="undefined"!=typeof window;const fs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let gs={};class ys{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:r,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ye,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=L.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ps.current||function(){if(ps.current=!0,ms)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ds.current=t.matches;t.addEventListener("change",e),e()}else ds.current=!1}(),this.shouldReduceMotion=ds.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),$(this.notifyUpdate),$(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&on.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:s,times:i,ease:r,duration:a}=e.accelerate,o=new tn({element:this.current,name:t,keyframes:s,times:i,ease:r,duration:p(a)}),l=n(o);return void this.valueSubscriptions.set(t,()=>{l(),o.cancel()})}const n=Ee.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&N.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i&&i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in gs){const e=gs[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=yn(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var s;return null!=n&&("string"==typeof n&&(a(n)||o(n))?n=parseFloat(n):(s=n,!os.find(Wn(s))&&Mt.test(e)&&(n=es(t,e))),this.setBaseTarget(t,Dn(n)?n.get():n)),Dn(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const s=Fn(this.props,e,this.presenceContext?.custom);s&&(n=s[t])}if(e&&void 0!==n)return n;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||Dn(s)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new d),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){rs.render(this.render)}}class vs extends ys{constructor(){super(...arguments),this.KeyframeResolver=ss}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Dn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const bs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ts=Re.length;function ws(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let a=!1,o=!1;for(const t in e){const n=e[t];if(Ee.has(t))a=!0;else if(U(t))i[t]=n;else{const e=is(n,Gn[t]);t.startsWith("origin")?(o=!0,r[t]=e):s[t]=e}}if(e.transform||(a||n?s.transform=function(t,e,n){let s="",i=!0;for(let r=0;r{if(!e.target)return t;if("string"==typeof t){if(!ut.test(t))return t;t=parseFloat(t)}return`${Ss(t,e.target.x)}% ${Ss(t,e.target.y)}%`}},As={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Mt.parse(t);if(i.length>5)return s;const r=Mt.createTransformer(t),a="number"!=typeof i[0]?1:0,o=n.x.scale*e.x,l=n.y.scale*e.y;i[0+a]/=o,i[1+a]/=l;const u=At(o,l,.5);return"number"==typeof i[2+a]&&(i[2+a]/=u),"number"==typeof i[3+a]&&(i[3+a]/=u),r(i)}},ks={borderRadius:{...xs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xs,borderTopRightRadius:xs,borderBottomLeftRadius:xs,borderBottomRightRadius:xs,boxShadow:As};function Vs(t,{layout:e,layoutId:n}){return Ee.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!ks[t]||"opacity"===t)}function Cs(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const e in s)(Dn(s[e])||i&&Dn(i[e])||Vs(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(r[e]=s[e]);return r}class Fs extends vs{constructor(){super(...arguments),this.type="html",this.renderInstance=Ms}readValueFromInstance(t,e){if(Ee.has(e))return this.projection?.isProjecting?Ce(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)})(t,e);{const s=(n=t,window.getComputedStyle(n)),i=(U(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){ws(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Cs(t,e,n)}}class Ps extends ys{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Rs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Es={offset:"strokeDashoffset",array:"strokeDasharray"};const Bs=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ds(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...o},l,u,h){if(ws(t,o,u),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:c,style:d}=t;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=h?.transformBox??"fill-box",delete c.transformBox);for(const t of Bs)void 0!==c[t]&&(d[t]=c[t],delete c[t]);void 0!==e&&(c.x=e),void 0!==n&&(c.y=n),void 0!==s&&(c.scale=s),void 0!==i&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Rs:Es;t[r.offset]=""+-s,t[r.array]=`${e} ${n}`}(c,i,r,a,!1)}const Is=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class Os extends vs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ls}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ee.has(e)){const t=Qn(e);return t&&t.default||0}return e=Is.has(e)?e:On(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Cs(t,e,n);for(const n in t)(Dn(t[n])||Dn(e[n]))&&(s[-1!==Re.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]);return s}(t,e,n)}build(t,e,n){Ds(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,s){!function(t,e,n,s){Ms(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Is.has(n)?n:On(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}function Ns(t){return"object"==typeof t&&!Array.isArray(t)}function $s(t,e,n,s){return null==t?[]:"string"==typeof t&&Ns(e)?function(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(t=>null!=t)}(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function Ks(t,e,n){return t*(e+1)+n*e}function js(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):s.get(e)??t}function Ws(e,n,s,i,r,a){!function(e,n,s){for(let i=0;in&&r.at"number"==typeof t,_s=t=>t.every(Zs);function Hs(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=as(t)&&!function(t){return as(t)&&"svg"===t.tagName}(t)?new Os(e):new Fs(e);n.mount(t),us.set(t,n)}function Gs(t){const e=new Ps({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),us.set(t,e)}function Js(t,e,n,s){const r=[];if(function(t,e){return Dn(t)||"number"==typeof t||"string"==typeof t&&!Ns(e)}(t,e))r.push(function(t,e,n){const s=Dn(t)?t:yn(t);return s.start(An("",s,e,n)),s.animation}(t,Ns(e)&&e.default||e,n&&n.default||n));else{if(null==t)return r;const a=$s(t,e,s),o=a.length;i(Boolean(o),"No valid elements provided.","no-valid-elements");for(let t=0;t{const u=qs(t),{delay:h=0,times:c=de(u),type:d=e.type||"keyframes",repeat:g,repeatType:y,repeatDelay:T=0,...w}=n;let{ease:M=e.ease||"easeOut",duration:S}=n;const x="function"==typeof h?h(o,l):h,A=u.length,k=Qe(d)?d:r?.[d||"keyframes"];if(A<=2&&k){let t=100;if(2===A&&_s(u)){const e=u[1]-u[0];t=Math.abs(e)}const n={...e,...w};void 0!==S&&(n.duration=p(S));const s=Wt(n,t,k);M=s.ease,S=s.duration}S??(S=a);const V=m+x;1===c.length&&0===c[0]&&(c[1]=1);const C=c.length-u.length;if(C>0&&ce(c,C),1===u.length&&u.unshift(null),g&&s(g<20,`Sequence segments can't repeat ${g} times — ignoring repeat option. Use a value below 20 or apply repeat at the sequence level instead.`),g&&g<20){const t=S>0?T/S:0;S=Ks(S,g,T);const e=[...u],n=[...c];M=Array.isArray(M)?[...M]:[M];const s=[...M],i="reverse"===y||"mirror"===y;let r=e,a=s;i&&(r=[...e].reverse(),"reverse"===y&&(a=[...s].reverse().map(t=>"function"==typeof t?b(t):t)));for(let o=0;o0&&(u.push(u[u.length-1]),c.push(p),M.push("linear")),u.push(...h);for(let t=0;t{for(const i in t){const r=t[i];r.sort(Ys);const a=[],l=[],u=[];for(let t=0;t{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=yn(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),e,n,{spring:oe});return r.forEach(({keyframes:t,transition:e},n)=>{i.push(...Js(n,t,e))}),i}function ti(e={}){const{scope:n,reduceMotion:s,skipAnimations:i}=e;return function(e,r,a){let o,l=[];const u={};if(void 0!==s&&(u.reduceMotion=s),void 0!==i&&(u.skipAnimations=i),h=e,Array.isArray(h)&&h.some(Array.isArray)){const{onComplete:t,...s}=r||{};"function"==typeof t&&(o=t),l=Qs(e,{...u,...s},n)}else{const{onComplete:t,...s}=a||{};"function"==typeof t&&(o=t),l=Js(e,r,{...u,...s},n)}var h;const c=new fn(l);return o&&c.finished.then(o),n&&(n.animations.push(c),c.finished.then(()=>{t(n.animations,c)})),c}}const ei=ti();export{ei as animate,ti as createScopedAnimate}; -//# sourceMappingURL=size-rollup-animate.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-animate.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-animate.js.map deleted file mode 100644 index cef8529c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-animate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"size-rollup-animate.js","sources":["../../motion-utils/dist/es/array.mjs","../../motion-utils/dist/es/clamp.mjs","../../motion-utils/dist/es/format-error-message.mjs","../../motion-utils/dist/es/errors.mjs","../../motion-utils/dist/es/global-config.mjs","../../motion-utils/dist/es/is-numerical-string.mjs","../../motion-utils/dist/es/is-zero-value-string.mjs","../../motion-utils/dist/es/memo.mjs","../../motion-utils/dist/es/noop.mjs","../../motion-utils/dist/es/pipe.mjs","../../motion-utils/dist/es/progress.mjs","../../motion-utils/dist/es/subscription-manager.mjs","../../motion-utils/dist/es/time-conversion.mjs","../../motion-utils/dist/es/velocity-per-second.mjs","../../motion-utils/dist/es/easing/cubic-bezier.mjs","../../motion-utils/dist/es/easing/modifiers/mirror.mjs","../../motion-utils/dist/es/easing/modifiers/reverse.mjs","../../motion-utils/dist/es/easing/back.mjs","../../motion-utils/dist/es/easing/anticipate.mjs","../../motion-utils/dist/es/easing/circ.mjs","../../motion-utils/dist/es/easing/ease.mjs","../../motion-utils/dist/es/easing/utils/is-easing-array.mjs","../../motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs","../../motion-utils/dist/es/wrap.mjs","../../motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","../../motion-utils/dist/es/easing/utils/map.mjs","../../motion-dom/dist/es/frameloop/order.mjs","../../motion-dom/dist/es/frameloop/batcher.mjs","../../motion-dom/dist/es/frameloop/render-step.mjs","../../motion-dom/dist/es/frameloop/frame.mjs","../../motion-dom/dist/es/frameloop/sync-time.mjs","../../motion-dom/dist/es/animation/utils/is-css-variable.mjs","../../motion-dom/dist/es/value/types/numbers/index.mjs","../../motion-dom/dist/es/value/types/utils/sanitize.mjs","../../motion-dom/dist/es/value/types/utils/float-regex.mjs","../../motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../../motion-dom/dist/es/value/types/color/utils.mjs","../../motion-dom/dist/es/value/types/utils/is-nullish.mjs","../../motion-dom/dist/es/value/types/color/rgba.mjs","../../motion-dom/dist/es/value/types/color/hex.mjs","../../motion-dom/dist/es/value/types/numbers/units.mjs","../../motion-dom/dist/es/value/types/color/hsla.mjs","../../motion-dom/dist/es/value/types/color/index.mjs","../../motion-dom/dist/es/value/types/utils/color-regex.mjs","../../motion-dom/dist/es/value/types/complex/index.mjs","../../motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../../motion-dom/dist/es/utils/mix/immediate.mjs","../../motion-dom/dist/es/utils/mix/number.mjs","../../motion-dom/dist/es/utils/mix/color.mjs","../../motion-dom/dist/es/utils/mix/visibility.mjs","../../motion-dom/dist/es/utils/mix/complex.mjs","../../motion-dom/dist/es/utils/mix/index.mjs","../../motion-dom/dist/es/animation/drivers/frame.mjs","../../motion-dom/dist/es/animation/waapi/utils/linear.mjs","../../motion-dom/dist/es/animation/generators/utils/calc-duration.mjs","../../motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs","../../motion-dom/dist/es/animation/generators/spring.mjs","../../motion-dom/dist/es/animation/generators/utils/velocity.mjs","../../motion-dom/dist/es/animation/generators/inertia.mjs","../../motion-dom/dist/es/utils/interpolate.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../../motion-dom/dist/es/animation/generators/keyframes.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/time.mjs","../../motion-dom/dist/es/animation/keyframes/get-final.mjs","../../motion-dom/dist/es/animation/utils/replace-transition-type.mjs","../../motion-dom/dist/es/animation/utils/WithPromise.mjs","../../motion-dom/dist/es/animation/JSAnimation.mjs","../../motion-dom/dist/es/render/dom/parse-transform.mjs","../../motion-dom/dist/es/render/utils/keys-transform.mjs","../../motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs","../../motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs","../../motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","../../motion-dom/dist/es/render/dom/style-set.mjs","../../motion-dom/dist/es/render/dom/is-css-var.mjs","../../motion-dom/dist/es/utils/supports/flags.mjs","../../motion-dom/dist/es/utils/supports/memo.mjs","../../motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../../motion-dom/dist/es/utils/supports/linear-easing.mjs","../../motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","../../motion-dom/dist/es/animation/waapi/easing/supported.mjs","../../motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","../../motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs","../../motion-dom/dist/es/animation/NativeAnimation.mjs","../../motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","../../motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs","../../motion-dom/dist/es/animation/NativeAnimationExtended.mjs","../../motion-dom/dist/es/animation/utils/is-animatable.mjs","../../motion-dom/dist/es/animation/utils/make-animation-instant.mjs","../../motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs","../../motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs","../../motion-dom/dist/es/animation/waapi/supports/waapi.mjs","../../motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs","../../motion-dom/dist/es/animation/utils/can-animate.mjs","../../motion-dom/dist/es/animation/GroupAnimation.mjs","../../motion-dom/dist/es/animation/GroupAnimationWithThen.mjs","../../motion-dom/dist/es/value/index.mjs","../../motion-dom/dist/es/animation/utils/resolve-transition.mjs","../../motion-dom/dist/es/animation/utils/get-value-transition.mjs","../../motion-dom/dist/es/animation/utils/default-transitions.mjs","../../motion-dom/dist/es/animation/utils/is-transition-defined.mjs","../../motion-dom/dist/es/animation/interfaces/motion-value.mjs","../../motion-dom/dist/es/animation/utils/css-variables-conversion.mjs","../../motion-dom/dist/es/render/utils/resolve-variants.mjs","../../motion-dom/dist/es/render/utils/keys-position.mjs","../../motion-dom/dist/es/render/utils/setters.mjs","../../motion-dom/dist/es/render/utils/is-keyframes-target.mjs","../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs","../../motion-dom/dist/es/value/utils/is-motion-value.mjs","../../motion-dom/dist/es/value/will-change/add-will-change.mjs","../../motion-dom/dist/es/value/will-change/is.mjs","../../motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs","../../motion-dom/dist/es/animation/optimized-appear/data-id.mjs","../../motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs","../../motion-dom/dist/es/animation/interfaces/visual-element-target.mjs","../../motion-dom/dist/es/value/types/auto.mjs","../../motion-dom/dist/es/value/types/test.mjs","../../motion-dom/dist/es/value/types/dimensions.mjs","../../motion-dom/dist/es/animation/keyframes/utils/is-none.mjs","../../motion-dom/dist/es/value/types/complex/filter.mjs","../../motion-dom/dist/es/value/types/complex/mask.mjs","../../motion-dom/dist/es/value/types/int.mjs","../../motion-dom/dist/es/value/types/maps/number.mjs","../../motion-dom/dist/es/value/types/maps/transform.mjs","../../motion-dom/dist/es/value/types/maps/defaults.mjs","../../motion-dom/dist/es/value/types/utils/animatable-none.mjs","../../motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs","../../motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs","../../motion-dom/dist/es/value/types/utils/get-as-type.mjs","../../motion-dom/dist/es/frameloop/microtask.mjs","../../motion-dom/dist/es/utils/is-svg-element.mjs","../../motion-utils/dist/es/is-object.mjs","../../motion-dom/dist/es/value/types/utils/find.mjs","../../motion-dom/dist/es/projection/geometry/models.mjs","../../motion-dom/dist/es/render/store.mjs","../../motion-dom/dist/es/render/utils/variant-props.mjs","../../motion-dom/dist/es/render/utils/is-controlling-variants.mjs","../../motion-dom/dist/es/render/utils/is-animation-controls.mjs","../../motion-dom/dist/es/render/utils/is-variant-label.mjs","../../motion-dom/dist/es/render/utils/reduced-motion/state.mjs","../../motion-dom/dist/es/render/utils/reduced-motion/index.mjs","../../motion-dom/dist/es/render/VisualElement.mjs","../../motion-dom/dist/es/render/utils/motion-values.mjs","../../motion-dom/dist/es/render/dom/DOMVisualElement.mjs","../../motion-dom/dist/es/render/html/utils/build-transform.mjs","../../motion-dom/dist/es/render/html/utils/build-styles.mjs","../../motion-dom/dist/es/render/html/utils/render.mjs","../../motion-dom/dist/es/projection/styles/scale-border-radius.mjs","../../motion-dom/dist/es/projection/styles/scale-box-shadow.mjs","../../motion-dom/dist/es/projection/styles/scale-correction.mjs","../../motion-dom/dist/es/render/utils/is-forced-motion-value.mjs","../../motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs","../../motion-dom/dist/es/render/html/HTMLVisualElement.mjs","../../motion-dom/dist/es/projection/utils/measure.mjs","../../motion-dom/dist/es/projection/geometry/conversion.mjs","../../motion-dom/dist/es/render/object/ObjectVisualElement.mjs","../../motion-dom/dist/es/render/svg/utils/path.mjs","../../motion-dom/dist/es/render/svg/utils/build-attrs.mjs","../../motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs","../../motion-dom/dist/es/render/svg/SVGVisualElement.mjs","../../motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs","../../motion-dom/dist/es/render/svg/utils/render.mjs","../../motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs","../lib/animation/utils/is-dom-keyframes.js","../lib/animation/animate/resolve-subjects.js","../../motion-dom/dist/es/utils/resolve-elements.mjs","../lib/animation/sequence/utils/calc-repeat-duration.js","../lib/animation/sequence/utils/calc-time.js","../lib/animation/sequence/utils/edit.js","../lib/animation/sequence/utils/normalize-times.js","../lib/animation/sequence/utils/sort.js","../lib/animation/sequence/create.js","../lib/animation/utils/create-visual-element.js","../../motion-dom/dist/es/utils/is-svg-svg-element.mjs","../lib/animation/animate/subject.js","../../motion-dom/dist/es/animation/animate/single-value.mjs","../lib/animation/animate/sequence.js","../lib/animation/animate/index.js"],"sourcesContent":["function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n//# sourceMappingURL=array.mjs.map\n","const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n//# sourceMappingURL=clamp.mjs.map\n","function formatErrorMessage(message, errorCode) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message;\n}\n\nexport { formatErrorMessage };\n//# sourceMappingURL=format-error-message.mjs.map\n","import { formatErrorMessage } from './format-error-message.mjs';\n\nlet warning = () => { };\nlet invariant = () => { };\nif (typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\") {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode));\n }\n };\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode));\n }\n };\n}\n\nexport { invariant, warning };\n//# sourceMappingURL=errors.mjs.map\n","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n//# sourceMappingURL=global-config.mjs.map\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v);\n\nexport { isNumericalString };\n//# sourceMappingURL=is-numerical-string.mjs.map\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/u.test(v);\n\nexport { isZeroValueString };\n//# sourceMappingURL=is-zero-value-string.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n//# sourceMappingURL=memo.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n//# sourceMappingURL=noop.mjs.map\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));\n\nexport { pipe };\n//# sourceMappingURL=pipe.mjs.map\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst progress = (from, to, value) => {\n const range = to - from;\n return range ? (value - from) / range : 1;\n};\n\nexport { progress };\n//# sourceMappingURL=progress.mjs.map\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n//# sourceMappingURL=subscription-manager.mjs.map\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n/*#__NO_SIDE_EFFECTS__*/\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\n/*#__NO_SIDE_EFFECTS__*/\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n//# sourceMappingURL=time-conversion.mjs.map\n","/*\n Convert velocity into velocity per second\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0;\n\nexport { velocityPerSecond };\n//# sourceMappingURL=velocity-per-second.mjs.map\n","import { noop } from '../noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticeably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\n/*#__NO_SIDE_EFFECTS__*/\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n//# sourceMappingURL=mirror.mjs.map\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\n/*#__NO_SIDE_EFFECTS__*/\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n//# sourceMappingURL=reverse.mjs.map\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = /*@__PURE__*/ reverseEasing(backOut);\nconst backInOut = /*@__PURE__*/ mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n//# sourceMappingURL=back.mjs.map\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => p >= 1\n ? 1\n : (p *= 2) < 1\n ? 0.5 * backIn(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n//# sourceMappingURL=anticipate.mjs.map\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circIn);\n\nexport { circIn, circInOut, circOut };\n//# sourceMappingURL=circ.mjs.map\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);\nconst easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n//# sourceMappingURL=ease.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n//# sourceMappingURL=is-easing-array.mjs.map\n","import { wrap } from '../../wrap.mjs';\nimport { isEasingArray } from './is-easing-array.mjs';\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction getEasingForSegment(easing, i) {\n return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing;\n}\n\nexport { getEasingForSegment };\n//# sourceMappingURL=get-easing-for-segment.mjs.map\n","const wrap = (min, max, v) => {\n const rangeSize = max - min;\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;\n};\n\nexport { wrap };\n//# sourceMappingURL=wrap.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n//# sourceMappingURL=is-bezier-definition.mjs.map\n","import { invariant } from '../../errors.mjs';\nimport { noop } from '../../noop.mjs';\nimport { anticipate } from '../anticipate.mjs';\nimport { backOut, backInOut, backIn } from '../back.mjs';\nimport { circOut, circInOut, circIn } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeOut, easeInOut, easeIn } from '../ease.mjs';\nimport { isBezierDefinition } from './is-bezier-definition.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst isValidEasing = (easing) => {\n return typeof easing === \"string\";\n};\nconst easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, \"cubic-bezier-length\");\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (isValidEasing(definition)) {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, \"invalid-easing-type\");\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n//# sourceMappingURL=map.mjs.map\n","const stepsOrder = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n\nexport { stepsOrder };\n//# sourceMappingURL=order.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming;\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n//# sourceMappingURL=batcher.mjs.map\n","import { statsBuffer } from '../stats/buffer.mjs';\n\nfunction createRenderStep(runNextFrame, stepName) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n let numCalls = 0;\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n numCalls++;\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame;\n thisFrame = nextFrame;\n nextFrame = prevFrame;\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n /**\n * If we're recording stats then\n */\n if (stepName && statsBuffer.value) {\n statsBuffer.value.frameloop[stepName].push(numCalls);\n }\n numCalls = 0;\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n//# sourceMappingURL=render-step.mjs.map\n","import { noop } from 'motion-utils';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\n//# sourceMappingURL=frame.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { frameData } from './frame.mjs';\n\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n\nexport { time };\n//# sourceMappingURL=sync-time.mjs.map\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nfunction containsCSSVariable(value) {\n if (typeof value !== \"string\")\n return false;\n // Strip comments to avoid false positives\n return value.split(\"/*\")[0].includes(\"var(--\");\n}\n\nexport { containsCSSVariable, isCSSVariableName, isCSSVariableToken };\n//# sourceMappingURL=is-css-variable.mjs.map\n","import { clamp } from 'motion-utils';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n//# sourceMappingURL=index.mjs.map\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n//# sourceMappingURL=sanitize.mjs.map\n","const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n//# sourceMappingURL=float-regex.mjs.map\n","const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n//# sourceMappingURL=single-color-regex.mjs.map\n","import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n//# sourceMappingURL=utils.mjs.map\n","function isNullish(v) {\n return v == null;\n}\n\nexport { isNullish };\n//# sourceMappingURL=is-nullish.mjs.map\n","import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n//# sourceMappingURL=rgba.mjs.map\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n//# sourceMappingURL=hex.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n}))();\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n//# sourceMappingURL=units.mjs.map\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n//# sourceMappingURL=hsla.mjs.map\n","import { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n getAnimatableNone: (v) => {\n const parsed = color.parse(v);\n parsed.alpha = 0;\n return color.transform(parsed);\n },\n};\n\nexport { color };\n//# sourceMappingURL=index.mjs.map\n","const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n//# sourceMappingURL=color-regex.mjs.map\n","import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (v.match(floatRegex)?.length || 0) +\n (v.match(colorRegex)?.length || 0) >\n 0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction buildTransformer({ split, types }) {\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nfunction createTransformer(source) {\n return buildTransformer(analyseComplexValue(source));\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (value, splitBefore) => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0;\n }\n return convertNumbersToZero(value);\n};\nfunction getAnimatableNone(v) {\n const info = analyseComplexValue(v);\n const transformer = buildTransformer(info);\n return transformer(info.values.map((value, i) => convertToZero(value, info.split[i])));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n//# sourceMappingURL=index.mjs.map\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n//# sourceMappingURL=hsla-to-rgba.mjs.map\n","function mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n//# sourceMappingURL=immediate.mjs.map\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n//# sourceMappingURL=number.mjs.map\n","import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, \"color-not-animatable\");\n if (!Boolean(type))\n return false;\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n//# sourceMappingURL=color.mjs.map\n","const invisibleValues = new Set([\"none\", \"hidden\"]);\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nfunction mixVisibility(origin, target) {\n if (invisibleValues.has(origin)) {\n return (p) => (p <= 0 ? origin : target);\n }\n else {\n return (p) => (p >= 1 ? target : origin);\n }\n}\n\nexport { invisibleValues, mixVisibility };\n//# sourceMappingURL=visibility.mjs.map\n","import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = origin.values[originIndex] ?? 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, \"complex-values-different\");\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n//# sourceMappingURL=complex.mjs.map\n","import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\nfunction mix(from, to, p) {\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n//# sourceMappingURL=index.mjs.map\n","import { time } from '../../frameloop/sync-time.mjs';\nimport { frameData, cancelFrame, frame } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n//# sourceMappingURL=frame.mjs.map\n","const generateLinearEasing = (easing, duration, // as milliseconds\nresolution = 10 // as milliseconds\n) => {\n let points = \"\";\n const numPoints = Math.max(Math.round(duration / resolution), 2);\n for (let i = 0; i < numPoints; i++) {\n points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + \", \";\n }\n return `linear(${points.substring(0, points.length - 2)})`;\n};\n\nexport { generateLinearEasing };\n//# sourceMappingURL=linear.mjs.map\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n//# sourceMappingURL=calc-duration.mjs.map\n","import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n//# sourceMappingURL=create-generator-easing.mjs.map\n","import { millisecondsToSeconds, clamp, secondsToMilliseconds, warning } from 'motion-utils';\nimport { generateLinearEasing } from '../waapi/utils/linear.mjs';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './utils/calc-duration.mjs';\nimport { createGeneratorEasing } from './utils/create-generator-easing.mjs';\n\nconst springDefaults = {\n // Default spring physics\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n velocity: 0.0,\n // Default duration/bounce-based options\n duration: 800, // in ms\n bounce: 0.3,\n visualDuration: 0.3, // in seconds\n // Rest thresholds\n restSpeed: {\n granular: 0.01,\n default: 2,\n },\n restDelta: {\n granular: 0.005,\n default: 0.5,\n },\n // Limits\n minDuration: 0.01, // in seconds\n maxDuration: 10.0, // in seconds\n minDamping: 0.05,\n maxDamping: 1,\n};\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\", \"spring-duration-limit\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: springDefaults.velocity,\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n mass: springDefaults.mass,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n // Time-defined springs should ignore inherited velocity.\n // Velocity from interrupted animations can cause findSpring()\n // to compute wildly different spring parameters, leading to\n // massive oscillation on small-range animations.\n springOptions.velocity = 0;\n if (options.visualDuration) {\n const visualDuration = options.visualDuration;\n const root = (2 * Math.PI) / (visualDuration * 1.2);\n const stiffness = root * root;\n const damping = 2 *\n clamp(0.05, 1, 1 - (options.bounce || 0)) *\n Math.sqrt(stiffness);\n springOptions = {\n ...springOptions,\n mass: springDefaults.mass,\n stiffness,\n damping,\n };\n }\n else {\n const derived = findSpring({ ...options, velocity: 0 });\n springOptions = {\n ...springOptions,\n ...derived,\n mass: springDefaults.mass,\n };\n springOptions.isResolvedFromDuration = true;\n }\n }\n return springOptions;\n}\nfunction spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {\n const options = typeof optionsOrVisualDuration !== \"object\"\n ? {\n visualDuration: optionsOrVisualDuration,\n keyframes: [0, 1],\n bounce,\n }\n : optionsOrVisualDuration;\n let { restSpeed, restDelta } = options;\n const origin = options.keyframes[0];\n const target = options.keyframes[options.keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n });\n const initialVelocity = velocity || 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default);\n restDelta || (restDelta = isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default);\n let resolveSpring;\n let resolveVelocity;\n // Underdamped coefficients, hoisted for use in the inlined next() hot path\n let angularFreq;\n let A;\n let sinCoeff;\n let cosCoeff;\n if (dampingRatio < 1) {\n angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n A =\n (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq;\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (A * Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n // Analytical derivative of underdamped spring (px/ms)\n sinCoeff =\n dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;\n cosCoeff =\n dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return envelope *\n (sinCoeff * Math.sin(angularFreq * t) +\n cosCoeff * Math.cos(angularFreq * t));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n // Analytical derivative of critically damped spring (px/ms)\n const C = initialVelocity + undampedAngularFreq * initialDelta;\n resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) *\n (undampedAngularFreq * C * t - initialVelocity);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n // Analytical derivative of overdamped spring (px/ms)\n const P = (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n dampedAngularFreq;\n const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;\n const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return envelope *\n (sinhCoeff * Math.sinh(freqForT) +\n coshCoeff * Math.cosh(freqForT));\n };\n }\n const generator = {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),\n next: (t) => {\n /**\n * For underdamped physics springs we need both position and\n * velocity each tick. Compute shared trig values once to avoid\n * duplicate Math.exp/sin/cos calls on the hot path.\n */\n if (!isResolvedFromDuration && dampingRatio < 1) {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const sin = Math.sin(angularFreq * t);\n const cos = Math.cos(angularFreq * t);\n const current = target -\n envelope *\n (A * sin + initialDelta * cos);\n const currentVelocity = secondsToMilliseconds(envelope *\n (sinCoeff * sin + cosCoeff * cos));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n state.value = state.done ? target : current;\n return state;\n }\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = secondsToMilliseconds(resolveVelocity(t));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n toString: () => {\n const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);\n return calculatedDuration + \"ms \" + easing;\n },\n toTransition: () => { },\n };\n return generator;\n}\nspring.applyToOptions = (options) => {\n const generatorOptions = createGeneratorEasing(options, 100, spring);\n options.ease = generatorOptions.ease;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n return options;\n};\n\nexport { spring };\n//# sourceMappingURL=spring.mjs.map\n","import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction getGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { getGeneratorVelocity };\n//# sourceMappingURL=velocity.mjs.map\n","import { spring } from './spring.mjs';\nimport { getGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n//# sourceMappingURL=inertia.mjs.map\n","import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\", \"range-length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n//# sourceMappingURL=interpolate.mjs.map\n","import { progress } from 'motion-utils';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n//# sourceMappingURL=fill.mjs.map\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n//# sourceMappingURL=default.mjs.map\n","import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n//# sourceMappingURL=keyframes.mjs.map\n","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n//# sourceMappingURL=time.mjs.map\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe, speed = 1) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const useFirstKeyframe = speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1);\n const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n//# sourceMappingURL=get-final.mjs.map\n","import { inertia } from '../generators/inertia.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { spring } from '../generators/spring.mjs';\n\nconst transitionTypeMap = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\nfunction replaceTransitionType(transition) {\n if (typeof transition.type === \"string\") {\n transition.type = transitionTypeMap[transition.type];\n }\n}\n\nexport { replaceTransitionType };\n//# sourceMappingURL=replace-transition-type.mjs.map\n","class WithPromise {\n constructor() {\n this.updateFinished();\n }\n get finished() {\n return this._finished;\n }\n updateFinished() {\n this._finished = new Promise((resolve) => {\n this.resolve = resolve;\n });\n }\n notifyFinished() {\n this.resolve();\n }\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve, onReject) {\n return this.finished.then(onResolve, onReject);\n }\n}\n\nexport { WithPromise };\n//# sourceMappingURL=WithPromise.mjs.map\n","import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { activeAnimations } from '../stats/animation-count.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/frame.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getGeneratorVelocity } from './generators/utils/velocity.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * Reusable state object for the delay phase to avoid\n * allocating a new object every frame.\n */\n this.delayState = {\n done: false,\n value: undefined,\n };\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n this.options.onStop?.();\n };\n activeAnimations.mainThread++;\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, \"spring-two-frames\");\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n let state;\n if (isInDelayPhase) {\n this.delayState.value = keyframes[0];\n state = this.delayState;\n }\n else {\n state = frameGenerator.next(elapsed);\n }\n if (mixKeyframes && !isInDelayPhase) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n if (this.driver) {\n this.driver.start(false);\n }\n else {\n this.startTime = 0;\n this.state = \"paused\";\n this.holdTime = newTime;\n this.tick(newTime);\n }\n }\n /**\n * Returns the generator's velocity at the current time in units/second.\n * Uses the analytical derivative when available (springs), avoiding\n * the MotionValue's frame-dependent velocity estimation.\n */\n getGeneratorVelocity() {\n const t = this.currentTime;\n if (t <= 0)\n return this.options.velocity || 0;\n if (this.generator.velocity) {\n return this.generator.velocity(t);\n }\n // Fallback: finite difference\n const current = this.generator.next(t).value;\n return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n if (hasChanged && this.driver) {\n this.updateTime(time.now());\n }\n this.playbackSpeed = newSpeed;\n if (hasChanged && this.driver) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n this.options.onPlay?.();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.notifyFinished();\n this.teardown();\n this.state = \"finished\";\n this.options.onComplete?.();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n this.options.onCancel?.();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n activeAnimations.mainThread--;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n this.driver?.stop();\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n//# sourceMappingURL=JSAnimation.mjs.map\n","const radToDeg = (rad) => (rad * 180) / Math.PI;\nconst rotate = (v) => {\n const angle = radToDeg(Math.atan2(v[1], v[0]));\n return rebaseAngle(angle);\n};\nconst matrix2dParsers = {\n x: 4,\n y: 5,\n translateX: 4,\n translateY: 5,\n scaleX: 0,\n scaleY: 3,\n scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n};\nconst rebaseAngle = (angle) => {\n angle = angle % 360;\n if (angle < 0)\n angle += 360;\n return angle;\n};\nconst rotateZ = rotate;\nconst scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]);\nconst scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]);\nconst matrix3dParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n};\nfunction defaultTransformValue(name) {\n return name.includes(\"scale\") ? 1 : 0;\n}\nfunction parseValueFromTransform(transform, name) {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name);\n }\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);\n let parsers;\n let match;\n if (matrix3dMatch) {\n parsers = matrix3dParsers;\n match = matrix3dMatch;\n }\n else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);\n parsers = matrix2dParsers;\n match = matrix2dMatch;\n }\n if (!match) {\n return defaultTransformValue(name);\n }\n const valueParser = parsers[name];\n const values = match[1].split(\",\").map(convertTransformToNumber);\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser];\n}\nconst readTransformValue = (instance, name) => {\n const { transform = \"none\" } = getComputedStyle(instance);\n return parseValueFromTransform(transform, name);\n};\nfunction convertTransformToNumber(value) {\n return parseFloat(value.trim());\n}\n\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue };\n//# sourceMappingURL=parse-transform.mjs.map\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n *\n * `pathRotation` is a transform for routing purposes (skipped from raw\n * style application, wired to the transform composite, flags transform\n * dirty) but is intentionally NOT in `transformPropOrder` — it is\n * composed onto `rotate` at the build sites, not serialized in its own\n * slot, and must stay out of the order-array consumers (parse-transform,\n * unit-conversion, keys-position).\n */\nconst transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, \"pathRotation\"]))();\n\nexport { transformPropOrder, transformProps };\n//# sourceMappingURL=keys-transform.mjs.map\n","import { parseValueFromTransform } from '../../../render/dom/parse-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst isNumOrPxType = (v) => v === number || v === px;\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n return removedTransforms;\n}\nconst positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\", boxSizing }) => {\n const width = x.max - x.min;\n return boxSizing === \"border-box\"\n ? width\n : width - parseFloat(paddingLeft) - parseFloat(paddingRight);\n },\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\", boxSizing }) => {\n const height = y.max - y.min;\n return boxSizing === \"border-box\"\n ? height\n : height - parseFloat(paddingTop) - parseFloat(paddingBottom);\n },\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: (_bbox, { transform }) => parseValueFromTransform(transform, \"x\"),\n y: (_bbox, { transform }) => parseValueFromTransform(transform, \"y\"),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\n\nexport { isNumOrPxType, positionalValues, removeNonTranslationalTransform };\n//# sourceMappingURL=unit-conversion.mjs.map\n","import { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n const transformsToRestore = new Map();\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete(isForced));\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n isForced = true;\n readAllKeyframes();\n measureAllKeyframes();\n isForced = false;\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n this.state = \"pending\";\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.state = \"scheduled\";\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n }\n else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this;\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get();\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n fillWildcards(unresolvedKeyframes);\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete(isForcedComplete = false) {\n this.state = \"complete\";\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n toResolve.delete(this);\n }\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this);\n this.state = \"pending\";\n }\n }\n resume() {\n if (this.state === \"pending\")\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n//# sourceMappingURL=KeyframesResolver.mjs.map\n","function fillWildcards(keyframes) {\n for (let i = 1; i < keyframes.length; i++) {\n keyframes[i] ?? (keyframes[i] = keyframes[i - 1]);\n }\n}\n\nexport { fillWildcards };\n//# sourceMappingURL=fill-wildcards.mjs.map\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction setStyle(element, name, value) {\n isCSSVar(name)\n ? element.style.setProperty(name, value)\n : (element.style[name] = value);\n}\n\nexport { setStyle };\n//# sourceMappingURL=style-set.mjs.map\n","const isCSSVar = (name) => name.startsWith(\"--\");\n\nexport { isCSSVar };\n//# sourceMappingURL=is-css-var.mjs.map\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {};\n\nexport { supportsFlags };\n//# sourceMappingURL=flags.mjs.map\n","import { memo } from 'motion-utils';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => supportsFlags[supportsFlag] ?? memoized();\n}\n\nexport { memoSupports };\n//# sourceMappingURL=memo.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, \"scrollTimeline\");\nconst supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, \"viewTimeline\");\n\nexport { supportsScrollTimeline, supportsViewTimeline };\n//# sourceMappingURL=scroll-timeline.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n}, \"linearEasing\");\n\nexport { supportsLinearEasing };\n//# sourceMappingURL=linear-easing.mjs.map\n","const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { cubicBezierAsString };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","import { cubicBezierAsString } from './cubic-bezier.mjs';\n\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\n\nexport { supportedWaapiEasing };\n//# sourceMappingURL=supported.mjs.map\n","import { isBezierDefinition } from 'motion-utils';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\n\nfunction mapEasingToNativeEasing(easing, duration) {\n if (!easing) {\n return undefined;\n }\n else if (typeof easing === \"function\") {\n return supportsLinearEasing()\n ? generateLinearEasing(easing, duration)\n : \"ease-out\";\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||\n supportedWaapiEasing.easeOut);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { mapEasingToNativeEasing };\n//# sourceMappingURL=map-easing.mjs.map\n","import { activeAnimations } from '../../stats/animation-count.mjs';\nimport { statsBuffer } from '../../stats/buffer.mjs';\nimport { mapEasingToNativeEasing } from './easing/map-easing.mjs';\n\nfunction startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease = \"easeOut\", times, } = {}, pseudoElement = undefined) {\n const keyframeOptions = {\n [valueName]: keyframes,\n };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease, duration);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n if (statsBuffer.value) {\n activeAnimations.waapi++;\n }\n const options = {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n };\n if (pseudoElement)\n options.pseudoElement = pseudoElement;\n const animation = element.animate(keyframeOptions, options);\n if (statsBuffer.value) {\n animation.finished.finally(() => {\n activeAnimations.waapi--;\n });\n }\n return animation;\n}\n\nexport { startWaapiAnimation };\n//# sourceMappingURL=start-waapi-animation.mjs.map\n","function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n//# sourceMappingURL=is-generator.mjs.map\n","import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n this.manualStartTime = null;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `Mini animate() doesn't support \"type\" as a string.`, \"mini-spring\");\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe);\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n }\n play() {\n if (this.isStopped)\n return;\n this.manualStartTime = null;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n const element = this.options?.element;\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n const wasFinished = this.finishedTime !== null;\n this.manualStartTime = null;\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n if (wasFinished) {\n this.animation.pause();\n }\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.manualStartTime = this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n if (rangeStart)\n this.animation.rangeStart = rangeStart;\n if (rangeEnd)\n this.animation.rangeEnd = rangeEnd;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n//# sourceMappingURL=NativeAnimation.mjs.map\n","import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { isGenerator } from '../../generators/utils/is-generator.mjs';\n\nfunction applyGeneratorOptions({ type, ...options }) {\n if (isGenerator(type) && supportsLinearEasing()) {\n return type.applyToOptions(options);\n }\n else {\n options.duration ?? (options.duration = 300);\n options.ease ?? (options.ease = \"easeOut\");\n }\n return options;\n}\n\nexport { applyGeneratorOptions };\n//# sourceMappingURL=apply-generator.mjs.map\n","import { circInOut, backInOut, anticipate } from 'motion-utils';\n\nconst unsupportedEasingFunctions = {\n anticipate,\n backInOut,\n circInOut,\n};\nfunction isUnsupportedEase(key) {\n return key in unsupportedEasingFunctions;\n}\nfunction replaceStringEasing(transition) {\n if (typeof transition.ease === \"string\" &&\n isUnsupportedEase(transition.ease)) {\n transition.ease = unsupportedEasingFunctions[transition.ease];\n }\n}\n\nexport { replaceStringEasing };\n//# sourceMappingURL=unsupported-easing.mjs.map\n","import { clamp } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n constructor(options) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options);\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options);\n super(options);\n /**\n * Only set startTime when the animation should autoplay.\n * Setting startTime on a paused WAAPI animation unpauses it\n * (per the WAAPI spec), which breaks autoplay: false.\n */\n if (options.startTime !== undefined && options.autoplay !== false) {\n this.startTime = options.startTime;\n }\n this.options = options;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read committed styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value) {\n const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n if (!motionValue)\n return;\n if (value !== undefined) {\n motionValue.set(value);\n return;\n }\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n });\n /**\n * Use wall-clock elapsed time for sampling.\n * Under CPU load, WAAPI's currentTime may not reflect actual\n * elapsed time, causing incorrect sampling and visual jumps.\n */\n const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);\n const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);\n const current = sampleAnimation.sample(sampleTime).value;\n /**\n * Write the estimated value to inline style so it persists\n * after cancel(), covering the async gap before the next\n * animation starts.\n */\n const { name } = this.options;\n if (element && name)\n setStyle(element, name, current);\n motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);\n sampleAnimation.stop();\n }\n}\n\nexport { NativeAnimationExtended };\n//# sourceMappingURL=NativeAnimationExtended.mjs.map\n","import { complex } from '../../value/types/complex/index.mjs';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nconst isAnimatable = (value, name) => {\n // If the list of keys that might be non-animatable grows, replace with Set\n if (name === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n//# sourceMappingURL=is-animatable.mjs.map\n","function makeAnimationInstant(options) {\n options.duration = 0;\n options.type = \"keyframes\";\n}\n\nexport { makeAnimationInstant };\n//# sourceMappingURL=make-animation-instant.mjs.map\n","/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved\n // or until we implement support for linear() easing.\n // \"background-color\"\n]);\n\nexport { acceleratedValues };\n//# sourceMappingURL=accelerated-values.mjs.map\n","const browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\\(/;\nfunction hasBrowserOnlyColors(keyframes) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"string\" &&\n browserColorFunctions.test(keyframes[i])) {\n return true;\n }\n }\n return false;\n}\n\nexport { hasBrowserOnlyColors };\n//# sourceMappingURL=is-browser-color.mjs.map\n","import { memo } from 'motion-utils';\nimport { acceleratedValues } from '../utils/accelerated-values.mjs';\nimport { hasBrowserOnlyColors } from '../utils/is-browser-color.mjs';\n\nconst colorProperties = new Set([\n \"color\",\n \"backgroundColor\",\n \"outlineColor\",\n \"fill\",\n \"stroke\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n]);\nconst supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\nfunction supportsBrowserAnimation(options) {\n const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options;\n const subject = motionValue?.owner?.current;\n /**\n * We use this check instead of isHTMLElement() because we explicitly\n * **don't** want elements in different timing contexts (i.e. popups)\n * to be accelerated, as it's not possible to sync these animations\n * properly with those driven from the main window frameloop.\n */\n if (!(subject instanceof HTMLElement)) {\n return false;\n }\n const { onUpdate, transformTemplate } = motionValue.owner.getProps();\n return (supportsWaapi() &&\n name &&\n /**\n * Force WAAPI for color properties with browser-only color formats\n * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n */\n (acceleratedValues.has(name) ||\n (colorProperties.has(name) &&\n hasBrowserOnlyColors(keyframes))) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\");\n}\n\nexport { supportsBrowserAnimation };\n//# sourceMappingURL=waapi.mjs.map\n","import { MotionGlobalConfig, noop } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { makeAnimationInstant } from './utils/make-animation-instant.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass AsyncMotionValueAnimation extends WithPromise {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", keyframes, name, motionValue, element, ...options }) {\n super();\n /**\n * Bound to support return animation.stop pattern\n */\n this.stop = () => {\n if (this._animation) {\n this._animation.stop();\n this.stopTimeline?.();\n }\n this.keyframeResolver?.cancel();\n };\n this.createdAt = time.now();\n const optionsWithDefaults = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n };\n const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n this.keyframeResolver?.scheduleResolve();\n }\n onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n this.keyframeResolver = undefined;\n const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n this.resolvedAt = time.now();\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n let canAnimateValue = true;\n if (!canAnimate(keyframes, name, type, velocity)) {\n canAnimateValue = false;\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n }\n keyframes[0] = keyframes[keyframes.length - 1];\n makeAnimationInstant(options);\n options.repeat = 0;\n }\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first committed frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined;\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n };\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n *\n * Also skip WAAPI when keyframes aren't animatable, as the resolved\n * values may not be valid CSS and would trigger browser warnings.\n */\n const useWaapi = canAnimateValue &&\n !isHandoff &&\n supportsBrowserAnimation(resolvedOptions);\n const element = resolvedOptions.motionValue?.owner?.current;\n let animation;\n if (useWaapi) {\n try {\n animation = new NativeAnimationExtended({\n ...resolvedOptions,\n element,\n });\n }\n catch {\n animation = new JSAnimation(resolvedOptions);\n }\n }\n else {\n animation = new JSAnimation(resolvedOptions);\n }\n animation.finished.then(() => {\n this.notifyFinished();\n }).catch(noop);\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n this.pendingTimeline = undefined;\n }\n this._animation = animation;\n }\n get finished() {\n if (!this._animation) {\n return this._finished;\n }\n else {\n return this.animation.finished;\n }\n }\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n get animation() {\n if (!this._animation) {\n this.keyframeResolver?.resume();\n flushKeyframeResolvers();\n }\n return this._animation;\n }\n get duration() {\n return this.animation.duration;\n }\n get iterationDuration() {\n return this.animation.iterationDuration;\n }\n get time() {\n return this.animation.time;\n }\n set time(newTime) {\n this.animation.time = newTime;\n }\n get speed() {\n return this.animation.speed;\n }\n get state() {\n return this.animation.state;\n }\n set speed(newSpeed) {\n this.animation.speed = newSpeed;\n }\n get startTime() {\n return this.animation.startTime;\n }\n attachTimeline(timeline) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline);\n }\n else {\n this.pendingTimeline = timeline;\n }\n return () => this.stop();\n }\n play() {\n this.animation.play();\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.complete();\n }\n cancel() {\n if (this._animation) {\n this.animation.cancel();\n }\n this.keyframeResolver?.cancel();\n }\n}\n\nexport { AsyncMotionValueAnimation };\n//# sourceMappingURL=AsyncMotionValueAnimation.mjs.map\n","import { warning } from 'motion-utils';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\n\nfunction hasKeyframesChanged(keyframes) {\n const current = keyframes[0];\n if (keyframes.length === 1)\n return true;\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current)\n return true;\n }\n}\nfunction canAnimate(keyframes, name, type, velocity) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n if (originKeyframe === null) {\n return false;\n }\n /**\n * These aren't traditionally animatable but we do support them.\n * In future we could look into making this more generic or replacing\n * this function with mix() === mixImmediate\n */\n if (name === \"display\" || name === \"visibility\")\n return true;\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(originKeyframe, name);\n const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". \"${isOriginAnimatable ? targetKeyframe : originKeyframe}\" is not an animatable value.`, \"value-not-animatable\");\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n return false;\n }\n return (hasKeyframesChanged(keyframes) ||\n ((type === \"spring\" || isGenerator(type)) && velocity));\n}\n\nexport { canAnimate };\n//# sourceMappingURL=can-animate.mjs.map\n","class GroupAnimation {\n constructor(animations) {\n // Bound to accomadate common `return animation.stop` pattern\n this.stop = () => this.runAll(\"stop\");\n this.animations = animations.filter(Boolean);\n }\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n getAll(propName) {\n return this.animations[0][propName];\n }\n setAll(propName, newValue) {\n for (let i = 0; i < this.animations.length; i++) {\n this.animations[i][propName] = newValue;\n }\n }\n attachTimeline(timeline) {\n const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline));\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel();\n this.animations[i].stop();\n });\n };\n }\n get time() {\n return this.getAll(\"time\");\n }\n set time(time) {\n this.setAll(\"time\", time);\n }\n get speed() {\n return this.getAll(\"speed\");\n }\n set speed(speed) {\n this.setAll(\"speed\", speed);\n }\n get state() {\n return this.getAll(\"state\");\n }\n get startTime() {\n return this.getAll(\"startTime\");\n }\n get duration() {\n return getMax(this.animations, \"duration\");\n }\n get iterationDuration() {\n return getMax(this.animations, \"iterationDuration\");\n }\n runAll(methodName) {\n this.animations.forEach((controls) => controls[methodName]());\n }\n play() {\n this.runAll(\"play\");\n }\n pause() {\n this.runAll(\"pause\");\n }\n cancel() {\n this.runAll(\"cancel\");\n }\n complete() {\n this.runAll(\"complete\");\n }\n}\nfunction getMax(animations, propName) {\n let max = 0;\n for (let i = 0; i < animations.length; i++) {\n const value = animations[i][propName];\n if (value !== null && value > max) {\n max = value;\n }\n }\n return max;\n}\n\nexport { GroupAnimation };\n//# sourceMappingURL=GroupAnimation.mjs.map\n","import { GroupAnimation } from './GroupAnimation.mjs';\n\nclass GroupAnimationWithThen extends GroupAnimation {\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n}\n\nexport { GroupAnimationWithThen };\n//# sourceMappingURL=GroupAnimationWithThen.mjs.map\n","import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init, options = {}) {\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.events.change?.notify(this.current);\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return \n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n dirty() {\n this.events.change?.notify(this.current);\n }\n addDependent(dependent) {\n if (!this.dependents) {\n this.dependents = new Set();\n }\n this.dependents.add(dependent);\n }\n removeDependent(dependent) {\n if (this.dependents) {\n this.dependents.delete(dependent);\n }\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n//# sourceMappingURL=index.mjs.map\n","/**\n * If `transition` has `inherit: true`, shallow-merge it with\n * `parentTransition` (child keys win) and strip the `inherit` key.\n * Otherwise return `transition` unchanged.\n */\nfunction resolveTransition(transition, parentTransition) {\n if (transition?.inherit && parentTransition) {\n const { inherit: _, ...rest } = transition;\n return { ...parentTransition, ...rest };\n }\n return transition;\n}\n\nexport { resolveTransition };\n//# sourceMappingURL=resolve-transition.mjs.map\n","import { resolveTransition } from './resolve-transition.mjs';\n\nfunction getValueTransition(transition, key) {\n const valueTransition = transition?.[key] ??\n transition?.[\"default\"] ??\n transition;\n if (valueTransition !== transition) {\n return resolveTransition(valueTransition, transition);\n }\n return valueTransition;\n}\n\nexport { getValueTransition };\n//# sourceMappingURL=get-value-transition.mjs.map\n","import { transformProps } from '../../render/utils/keys-transform.mjs';\n\nconst underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n});\nconst keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n if (keyframes.length > 2) {\n return keyframesTransition;\n }\n else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring;\n }\n return ease;\n};\n\nexport { getDefaultTransition };\n//# sourceMappingURL=default-transitions.mjs.map\n","const orchestrationKeys = new Set([\n \"when\",\n \"delay\",\n \"delayChildren\",\n \"staggerChildren\",\n \"staggerDirection\",\n \"repeat\",\n \"repeatType\",\n \"repeatDelay\",\n \"from\",\n \"elapsed\",\n]);\n/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined(transition) {\n for (const key in transition) {\n if (!orchestrationKeys.has(key))\n return true;\n }\n return false;\n}\n\nexport { isTransitionDefined };\n//# sourceMappingURL=is-transition-defined.mjs.map\n","import { secondsToMilliseconds, MotionGlobalConfig } from 'motion-utils';\nimport { AsyncMotionValueAnimation } from '../AsyncMotionValueAnimation.mjs';\nimport { JSAnimation } from '../JSAnimation.mjs';\nimport { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { makeAnimationInstant } from '../utils/make-animation-instant.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { getFinalKeyframe } from '../keyframes/get-final.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const options = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unique transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n Object.assign(options, getDefaultTransition(name, options));\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n options.duration && (options.duration = secondsToMilliseconds(options.duration));\n options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));\n /**\n * Support deprecated way to set initial value. Prefer keyframe syntax.\n */\n if (options.from !== undefined) {\n options.keyframes[0] = options.from;\n }\n let shouldSkip = false;\n if (options.type === false ||\n (options.duration === 0 && !options.repeatDelay)) {\n makeAnimationInstant(options);\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (MotionGlobalConfig.instantAnimations ||\n MotionGlobalConfig.skipAnimations ||\n element?.shouldSkipAnimations ||\n valueTransition.skipAnimations) {\n shouldSkip = true;\n makeAnimationInstant(options);\n options.delay = 0;\n }\n /**\n * If the transition type or easing has been explicitly set by the user\n * then we don't want to allow flattening the animation.\n */\n options.allowFlatten = !valueTransition.type && !valueTransition.ease;\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate(finalKeyframe);\n options.onComplete();\n });\n return;\n }\n }\n return valueTransition.isSync\n ? new JSAnimation(options)\n : new AsyncMotionValueAnimation(options);\n};\n\nexport { animateMotionValue };\n//# sourceMappingURL=motion-value.mjs.map\n","import { invariant, isNumericalString } from 'motion-utils';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nconst splitCSSVariableRegex = \n// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token1, token2, fallback] = match;\n return [`--${token1 ?? token2}`, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`, \"max-css-var-depth\");\n const [token, fallback] = parseCSSVariable(current);\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n return isCSSVariableToken(fallback)\n ? getVariableValue(fallback, element, depth + 1)\n : fallback;\n}\n\nexport { getVariableValue, parseCSSVariable };\n//# sourceMappingURL=css-variables-conversion.mjs.map\n","function getValueState(visualElement) {\n const state = [{}, {}];\n visualElement?.values.forEach((value, key) => {\n state[0][key] = value.get();\n state[1][key] = value.getVelocity();\n });\n return state;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n//# sourceMappingURL=resolve-variants.mjs.map\n","import { transformPropOrder } from './keys-transform.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n ...transformPropOrder,\n]);\n\nexport { positionalKeys };\n//# sourceMappingURL=keys-position.mjs.map\n","import { motionValue } from '../../value/index.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction resolveFinalValueInKeyframes(v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\nexport { setTarget };\n//# sourceMappingURL=setters.mjs.map\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n//# sourceMappingURL=is-keyframes-target.mjs.map\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement);\n}\n\nexport { resolveVariant };\n//# sourceMappingURL=resolve-dynamic-variants.mjs.map\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n//# sourceMappingURL=is-motion-value.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { isWillChangeMotionValue } from './is.mjs';\n\nfunction addValueToWillChange(visualElement, key) {\n const willChange = visualElement.getValue(\"willChange\");\n /**\n * It could be that a user has set willChange to a regular MotionValue,\n * in which case we can't add the value to it.\n */\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key);\n }\n else if (!willChange && MotionGlobalConfig.WillChange) {\n const newWillChange = new MotionGlobalConfig.WillChange(\"auto\");\n visualElement.addValue(\"willChange\", newWillChange);\n newWillChange.add(key);\n }\n}\n\nexport { addValueToWillChange };\n//# sourceMappingURL=add-will-change.mjs.map\n","import { isMotionValue } from '../utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n//# sourceMappingURL=is.mjs.map\n","function camelToDash(str) {\n return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);\n}\n\nexport { camelToDash };\n//# sourceMappingURL=camel-to-dash.mjs.map\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n//# sourceMappingURL=data-id.mjs.map\n","import { optimizedAppearDataAttribute } from './data-id.mjs';\n\nfunction getOptimisedAppearId(visualElement) {\n return visualElement.props[optimizedAppearDataAttribute];\n}\n\nexport { getOptimisedAppearId };\n//# sourceMappingURL=get-appear-id.mjs.map\n","import { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { resolveTransition } from '../utils/resolve-transition.mjs';\nimport { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { addValueToWillChange } from '../../value/will-change/add-will-change.mjs';\nimport { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n let { transition, transitionEnd, ...target } = targetAndTransition;\n const defaultTransition = visualElement.getDefaultTransition();\n transition = transition\n ? resolveTransition(transition, defaultTransition)\n : defaultTransition;\n const reduceMotion = transition?.reduceMotion;\n const skipAnimations = transition?.skipAnimations;\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n const path = transition?.path;\n if (path) {\n // path mutates `target` to claim x/y; loop below skips them.\n path.animateVisualElement(visualElement, target, transition, delay, animations);\n }\n for (const key in target) {\n const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);\n const valueTarget = target[key];\n if (valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n };\n if (skipAnimations)\n valueTransition.skipAnimations = true;\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const currentValue = value.get();\n if (currentValue !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity) {\n frame.update(() => value.set(valueTarget));\n continue;\n }\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false;\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement);\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n if (startTime !== null) {\n valueTransition.startTime = startTime;\n isHandoff = true;\n }\n }\n }\n addValueToWillChange(visualElement, key);\n const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;\n value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n animations.push(animation);\n }\n }\n if (transitionEnd) {\n const applyTransitionEnd = () => frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n if (animations.length) {\n Promise.all(animations).then(applyTransitionEnd);\n }\n else {\n applyTransitionEnd();\n }\n }\n return animations;\n}\n\nexport { animateTarget };\n//# sourceMappingURL=visual-element-target.mjs.map\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n//# sourceMappingURL=auto.mjs.map\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n//# sourceMappingURL=test.mjs.map\n","import { auto } from './auto.mjs';\nimport { number } from './numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from './numbers/units.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n//# sourceMappingURL=dimensions.mjs.map\n","import { isZeroValueString } from 'motion-utils';\n\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n }\n else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n }\n else {\n return true;\n }\n}\n\nexport { isNone };\n//# sourceMappingURL=is-none.mjs.map\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [name, value] = v.slice(0, -1).split(\"(\");\n if (name === \"drop-shadow\")\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, \"\");\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + \"(\" + defaultValue + unit + \")\";\n}\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu;\nconst filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n//# sourceMappingURL=filter.mjs.map\n","import { complex } from './index.mjs';\n\nconst mask = {\n ...complex,\n getAnimatableNone: (v) => {\n const parsed = complex.parse(v);\n const transformer = complex.createTransformer(v);\n return transformer(parsed.map((v) => typeof v === \"number\" ? 0 : typeof v === \"object\" ? { ...v, alpha: 1 } : v));\n },\n};\n\nexport { mask };\n//# sourceMappingURL=mask.mjs.map\n","import { number } from './numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n//# sourceMappingURL=int.mjs.map\n","import { int } from '../int.mjs';\nimport { alpha } from '../numbers/index.mjs';\nimport { px } from '../numbers/units.mjs';\nimport { transformValueTypes } from './transform.mjs';\n\nconst numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n inset: px,\n insetBlock: px,\n insetBlockStart: px,\n insetBlockEnd: px,\n insetInline: px,\n insetInlineStart: px,\n insetInlineEnd: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n paddingBlock: px,\n paddingBlockStart: px,\n paddingBlockEnd: px,\n paddingInline: px,\n paddingInlineStart: px,\n paddingInlineEnd: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n marginBlock: px,\n marginBlockStart: px,\n marginBlockEnd: px,\n marginInline: px,\n marginInlineStart: px,\n marginInlineEnd: px,\n // Typography\n fontSize: px,\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n ...transformValueTypes,\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n//# sourceMappingURL=number.mjs.map\n","import { alpha, scale } from '../numbers/index.mjs';\nimport { px, progressPercentage, degrees } from '../numbers/units.mjs';\n\nconst transformValueTypes = {\n rotate: degrees,\n /**\n * Internal channel for `transition.path` orientToPath. Composed onto\n * `rotate` at the transform-build sites so the user's `rotate` is\n * never read or overwritten. Not part of `transformPropOrder`.\n */\n pathRotation: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n};\n\nexport { transformValueTypes };\n//# sourceMappingURL=transform.mjs.map\n","import { color } from '../color/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n mask,\n WebkitMask: mask,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n//# sourceMappingURL=defaults.mjs.map\n","import { complex } from '../complex/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { getDefaultValueType } from '../maps/defaults.mjs';\n\nconst customTypes = /*@__PURE__*/ new Set([filter, mask]);\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (!customTypes.has(defaultValueType))\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n//# sourceMappingURL=animatable-none.mjs.map\n","import { analyseComplexValue } from '../../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../../value/types/utils/animatable-none.mjs';\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"]);\nfunction makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {\n let i = 0;\n let animatableTemplate = undefined;\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\" &&\n !invalidTemplates.has(keyframe) &&\n analyseComplexValue(keyframe).values.length) {\n animatableTemplate = unresolvedKeyframes[i];\n }\n i++;\n }\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);\n }\n }\n}\n\nexport { makeNoneKeyframesAnimatable };\n//# sourceMappingURL=make-none-animatable.mjs.map\n","import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { isCSSVariableToken, containsCSSVariable } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { positionalValues, isNumOrPxType } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin);\n const targetHasVar = containsCSSVariable(target);\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true;\n return;\n }\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n const { element, name, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n const value = element.getValue(name);\n value && value.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n//# sourceMappingURL=DOMKeyframesResolver.mjs.map\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n//# sourceMappingURL=get-as-type.mjs.map\n","import { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: microtask, cancel: cancelMicrotask } = \n/* @__PURE__ */ createRenderBatcher(queueMicrotask, false);\n\nexport { cancelMicrotask, microtask };\n//# sourceMappingURL=microtask.mjs.map\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nfunction isSVGElement(element) {\n return isObject(element) && \"ownerSVGElement\" in element;\n}\n\nexport { isSVGElement };\n//# sourceMappingURL=is-svg-element.mjs.map\n","const isObject = (value) => typeof value === \"object\" && value !== null;\n\nexport { isObject };\n//# sourceMappingURL=is-object.mjs.map\n","import { color } from '../color/index.mjs';\nimport { complex } from '../complex/index.mjs';\nimport { dimensionValueTypes } from '../dimensions.mjs';\nimport { testValueType } from '../test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n//# sourceMappingURL=find.mjs.map\n","const createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n});\nconst createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\n x: createAxis(),\n y: createAxis(),\n});\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n//# sourceMappingURL=models.mjs.map\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n//# sourceMappingURL=store.mjs.map\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n//# sourceMappingURL=variant-props.mjs.map\n","import { isAnimationControls } from './is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n//# sourceMappingURL=is-controlling-variants.mjs.map\n","function isAnimationControls(v) {\n return (v !== null &&\n typeof v === \"object\" &&\n typeof v.start === \"function\");\n}\n\nexport { isAnimationControls };\n//# sourceMappingURL=is-animation-controls.mjs.map\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n//# sourceMappingURL=is-variant-label.mjs.map\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n//# sourceMappingURL=state.mjs.map\n","import { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nconst isBrowser = typeof window !== \"undefined\";\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addEventListener(\"change\", setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { hasReducedMotionListener, initPrefersReducedMotion, prefersReducedMotion };\n//# sourceMappingURL=index.mjs.map\n","import { warnOnce, secondsToMilliseconds, isNumericalString, isZeroValueString, SubscriptionManager } from 'motion-utils';\nimport { KeyframeResolver } from '../animation/keyframes/KeyframesResolver.mjs';\nimport { NativeAnimation } from '../animation/NativeAnimation.mjs';\nimport { acceleratedValues } from '../animation/waapi/utils/accelerated-values.mjs';\nimport { microtask } from '../frameloop/microtask.mjs';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { complex } from '../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../value/types/utils/animatable-none.mjs';\nimport { findValueType } from '../value/types/utils/find.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { transformProps } from './utils/keys-transform.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { initPrefersReducedMotion } from './utils/reduced-motion/index.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './utils/reduced-motion/state.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions = {};\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nfunction setFeatureDefinitions(definitions) {\n featureDefinitions = definitions;\n}\n/**\n * Get the current feature definitions\n */\nfunction getFeatureDefinitions() {\n return featureDefinitions;\n}\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * Decides whether animations should be skipped for this VisualElement.\n * Useful for E2E tests and visual regression testing.\n */\n this.shouldSkipAnimations = false;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * Track whether this element has been mounted before, to detect\n * remounts after Suspense unmount/remount cycles.\n */\n this.hasBeenMounted = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0.0;\n this.scheduleRender = () => {\n const now = time.now();\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.skipAnimationsConfig = skipAnimations;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key]);\n }\n }\n }\n mount(instance) {\n /**\n * If this element has been mounted before (e.g. after a Suspense\n * unmount/remount), reset motion values to their initial state\n * so animations replay correctly from initial → animate.\n */\n if (this.hasBeenMounted) {\n for (const key in this.initialValues) {\n this.values.get(key)?.jump(this.initialValues[key]);\n this.latestValues[key] = this.initialValues[key];\n }\n }\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n /**\n * Determine reduced motion preference. Only initialize the matchMedia\n * listener if we actually need the dynamic value (i.e., when config\n * is neither \"never\" nor \"always\").\n */\n if (this.reducedMotionConfig === \"never\") {\n this.shouldReduceMotion = false;\n }\n else if (this.reducedMotionConfig === \"always\") {\n this.shouldReduceMotion = true;\n }\n else {\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion = prefersReducedMotion.current;\n }\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\", \"reduced-motion-disabled\");\n }\n /**\n * Set whether animations should be skipped based on the config.\n */\n this.shouldSkipAnimations = this.skipAnimationsConfig ?? false;\n this.parent?.addChild(this);\n this.update(this.props, this.presenceContext);\n this.hasBeenMounted = true;\n }\n unmount() {\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent?.removeChild(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n addChild(child) {\n this.children.add(child);\n this.enteringChildren ?? (this.enteringChildren = new Set());\n this.enteringChildren.add(child);\n }\n removeChild(child) {\n this.children.delete(child);\n this.enteringChildren && this.enteringChildren.delete(child);\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n if (value.accelerate &&\n acceleratedValues.has(key) &&\n this.current instanceof HTMLElement) {\n const { factory, keyframes, times, ease, duration } = value.accelerate;\n const animation = new NativeAnimation({\n element: this.current,\n name: key,\n keyframes,\n times,\n ease,\n duration: secondsToMilliseconds(duration),\n });\n const cleanup = factory(animation);\n this.valueSubscriptions.set(key, () => {\n cleanup();\n animation.cancel();\n });\n return;\n }\n const valueIsTransform = transformProps.has(key);\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform();\n }\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n this.scheduleRender();\n });\n let removeSyncCheck;\n if (typeof window !== \"undefined\" &&\n window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n if (removeSyncCheck)\n removeSyncCheck();\n // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n // can resubscribe before the animation is cancelled (#3315).\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (!this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n scheduleRenderMicrotask() {\n microtask.render(this.render);\n }\n}\n\nexport { VisualElement, getFeatureDefinitions, setFeatureDefinitions };\n//# sourceMappingURL=VisualElement.mjs.map\n","import { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\n/**\n * Updates motion values from props changes.\n * Uses `any` type for element to avoid circular dependencies with VisualElement.\n */\nfunction updateMotionValuesFromProps(element, next, prev) {\n for (const key in next) {\n const nextValue = next[key];\n const prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }));\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key);\n if (existingValue.liveStyle === true) {\n existingValue.jump(nextValue);\n }\n else if (!existingValue.hasAnimated) {\n existingValue.set(nextValue);\n }\n }\n else {\n const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n//# sourceMappingURL=motion-values.mjs.map\n","import { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { DOMKeyframesResolver } from '../../animation/keyframes/DOMKeyframesResolver.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n const style = props.style;\n return style ? style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`;\n }\n });\n }\n }\n}\n\nexport { DOMVisualElement };\n//# sourceMappingURL=DOMVisualElement.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(latestValues, transform, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n let transformIsDefault = true;\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n const value = latestValues[key];\n if (value === undefined)\n continue;\n let valueIsDefault = true;\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n }\n else {\n const parsed = parseFloat(value);\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0;\n }\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (!valueIsDefault) {\n transformIsDefault = false;\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${valueAsType}) `;\n }\n if (transformTemplate) {\n transform[key] = valueAsType;\n }\n }\n }\n // `pathRotation` composes onto `rotate` as a separate additive term so\n // the user's `rotate` is never clobbered. Deliberately not a slot in\n // `transformPropOrder`.\n const pathRotation = latestValues.pathRotation;\n if (pathRotation) {\n transformIsDefault = false;\n transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `;\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform };\n//# sourceMappingURL=build-transform.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformProps } from '../../utils/keys-transform.mjs';\nimport { isCSSVariableName } from '../../../animation/utils/is-css-variable.mjs';\nimport { buildTransform } from './build-transform.mjs';\n\nfunction buildHTMLStyles(state, latestValues, transformTemplate) {\n const { style, vars, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept separately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key];\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n continue;\n }\n else if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n else {\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] =\n valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(latestValues, state.transform, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n//# sourceMappingURL=build-styles.mjs.map\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n const elementStyle = element.style;\n let key;\n for (key in style) {\n // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type.\n elementStyle[key] = style[key];\n }\n // Write projection styles directly to element style\n projection?.applyProjectionStyles(elementStyle, styleProp);\n for (key in vars) {\n // Loop over any CSS variables and assign those.\n // They can only be assigned using `setProperty`.\n elementStyle.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n//# sourceMappingURL=render.mjs.map\n","import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n//# sourceMappingURL=scale-border-radius.mjs.map\n","import { complex } from '../../value/types/complex/index.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n//# sourceMappingURL=scale-box-shadow.mjs.map\n","import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { correctBorderRadius } from './scale-border-radius.mjs';\nimport { correctBoxShadow } from './scale-box-shadow.mjs';\n\nconst scaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\nfunction addScaleCorrector(correctors) {\n for (const key in correctors) {\n scaleCorrectors[key] = correctors[key];\n if (isCSSVariableName(key)) {\n scaleCorrectors[key].isCSSVariable = true;\n }\n }\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n//# sourceMappingURL=scale-correction.mjs.map\n","import { transformProps } from './keys-transform.mjs';\nimport { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nexport { addScaleCorrector } from '../../projection/styles/scale-correction.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue, scaleCorrectors };\n//# sourceMappingURL=is-forced-motion-value.mjs.map\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { isForcedMotionValue } from '../../utils/is-forced-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const style = props.style;\n const prevStyle = prevProps?.style;\n const newValues = {};\n if (!style)\n return newValues;\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevStyle && isMotionValue(prevStyle[key])) ||\n isForcedMotionValue(key, props) ||\n visualElement?.getValue(key)?.liveStyle !== undefined) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n","import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { transformProps } from '../utils/keys-transform.mjs';\nimport { defaultTransformValue, readTransformValue } from '../dom/parse-transform.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"html\";\n this.renderInstance = renderHTML;\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n return this.projection?.isProjecting\n ? defaultTransformValue(key)\n : readTransformValue(instance, key);\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, props) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n//# sourceMappingURL=HTMLVisualElement.mjs.map\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n//# sourceMappingURL=measure.mjs.map\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n const topLeft = transformPoint({ x: point.left, y: point.top });\n const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n//# sourceMappingURL=conversion.mjs.map\n","import { createBox } from '../../projection/geometry/models.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nfunction isObjectKey(key, object) {\n return key in object;\n}\nclass ObjectVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.type = \"object\";\n }\n readValueFromInstance(instance, key) {\n if (isObjectKey(key, instance)) {\n const value = instance[key];\n if (typeof value === \"string\" || typeof value === \"number\") {\n return value;\n }\n }\n return undefined;\n }\n getBaseTargetFromProps() {\n return undefined;\n }\n removeValueFromRenderState(key, renderState) {\n delete renderState.output[key];\n }\n measureInstanceViewportBox() {\n return createBox();\n }\n build(renderState, latestValues) {\n Object.assign(renderState.output, latestValues);\n }\n renderInstance(instance, { output }) {\n Object.assign(instance, output);\n }\n sortInstanceNodePosition() {\n return 0;\n }\n}\n\nexport { ObjectVisualElement };\n//# sourceMappingURL=ObjectVisualElement.mjs.map\n","const dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n *\n * Note: We use unitless values for stroke-dasharray and stroke-dashoffset\n * because Safari incorrectly scales px values when the page is zoomed.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset (unitless to avoid Safari zoom bug)\n attrs[keys.offset] = `${-offset}`;\n // Build the dash array (unitless to avoid Safari zoom bug)\n attrs[keys.array] = `${length} ${spacing}`;\n}\n\nexport { buildSVGPath };\n//# sourceMappingURL=path.mjs.map\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * CSS Motion Path properties that should remain as CSS styles on SVG elements.\n */\nconst cssMotionPathProperties = [\n \"offsetDistance\",\n \"offsetPath\",\n \"offsetRotate\",\n \"offsetAnchor\",\n];\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate, styleProp) {\n buildHTMLStyles(state, latest, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style } = state;\n /**\n * However, we apply transforms as CSS transforms.\n * So if we detect a transform, transformOrigin we take it from attrs and copy it into style.\n */\n if (attrs.transform) {\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\";\n delete attrs.transformOrigin;\n }\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = styleProp?.transformBox ?? \"fill-box\";\n delete attrs.transformBox;\n }\n for (const key of cssMotionPathProperties) {\n if (attrs[key] !== undefined) {\n style[key] = attrs[key];\n delete attrs[key];\n }\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n//# sourceMappingURL=build-attrs.mjs.map\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nconst camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n]);\n\nexport { camelCaseAttributes };\n//# sourceMappingURL=camel-case-attrs.mjs.map\n","import { transformProps } from '../utils/keys-transform.mjs';\nimport { getDefaultValueType } from '../../value/types/maps/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"svg\";\n this.isSVGTag = false;\n this.measureInstanceViewportBox = createBox;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n build(renderState, latestValues, props) {\n buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n//# sourceMappingURL=SVGVisualElement.mjs.map\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n for (const key in props) {\n if (isMotionValue(props[key]) ||\n isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (const key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n//# sourceMappingURL=render.mjs.map\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n//# sourceMappingURL=is-svg-tag.mjs.map\n","export function isDOMKeyframes(keyframes) {\n return typeof keyframes === \"object\" && !Array.isArray(keyframes);\n}\n//# sourceMappingURL=is-dom-keyframes.js.map","import { resolveElements, } from \"motion-dom\";\nimport { isDOMKeyframes } from \"../utils/is-dom-keyframes\";\nexport function resolveSubjects(subject, keyframes, scope, selectorCache) {\n if (subject == null) {\n return [];\n }\n if (typeof subject === \"string\" && isDOMKeyframes(keyframes)) {\n return resolveElements(subject, scope, selectorCache);\n }\n else if (subject instanceof NodeList) {\n return Array.from(subject);\n }\n else if (Array.isArray(subject)) {\n return subject.filter((s) => s != null);\n }\n else {\n return [subject];\n }\n}\n//# sourceMappingURL=resolve-subjects.js.map","function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector == null) {\n return [];\n }\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector).filter((element) => element != null);\n}\n\nexport { resolveElements };\n//# sourceMappingURL=resolve-elements.mjs.map\n","export function calculateRepeatDuration(duration, repeat, repeatDelay) {\n return duration * (repeat + 1) + repeatDelay * repeat;\n}\n//# sourceMappingURL=calc-repeat-duration.js.map","/**\n * Given a absolute or relative time definition and current/prev time state of the sequence,\n * calculate an absolute time for the next keyframes.\n */\nexport function calcNextTime(current, next, prev, labels) {\n if (typeof next === \"number\") {\n return next;\n }\n else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next));\n }\n else if (next === \"<\") {\n return prev;\n }\n else if (next.startsWith(\"<\")) {\n return Math.max(0, prev + parseFloat(next.slice(1)));\n }\n else {\n return labels.get(next) ?? current;\n }\n}\n//# sourceMappingURL=calc-time.js.map","import { mixNumber } from \"motion-dom\";\nimport { getEasingForSegment, removeItem } from \"motion-utils\";\nexport function eraseKeyframes(sequence, startTime, endTime) {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i];\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe);\n // If we remove this item we have to push the pointer back one\n i--;\n }\n }\n}\nexport function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {\n /**\n * Erase every existing value between currentTime and targetTime,\n * this will essentially splice this timeline into any currently\n * defined ones.\n */\n eraseKeyframes(sequence, startTime, endTime);\n for (let i = 0; i < keyframes.length; i++) {\n sequence.push({\n value: keyframes[i],\n at: mixNumber(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i),\n });\n }\n}\n//# sourceMappingURL=edit.js.map","/**\n * Take an array of times that represent repeated keyframes. For instance\n * if we have original times of [0, 0.5, 1] then our repeated times will\n * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back\n * down to a 0-1 scale.\n *\n * `repeatDelayUnits` is the repeatDelay expressed in units of a single\n * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`.\n */\nexport function normalizeTimes(times, repeat, repeatDelayUnits = 0) {\n const totalUnits = repeat + 1 + repeat * repeatDelayUnits;\n for (let i = 0; i < times.length; i++) {\n times[i] = times[i] / totalUnits;\n }\n}\n//# sourceMappingURL=normalize-times.js.map","export function compareByTime(a, b) {\n if (a.at === b.at) {\n if (a.value === null)\n return 1;\n if (b.value === null)\n return -1;\n return 0;\n }\n else {\n return a.at - b.at;\n }\n}\n//# sourceMappingURL=sort.js.map","import { createGeneratorEasing, defaultOffset, fillOffset, isGenerator, isMotionValue, } from \"motion-dom\";\nimport { getEasingForSegment, progress, reverseEasing, secondsToMilliseconds, warning, } from \"motion-utils\";\nimport { resolveSubjects } from \"../animate/resolve-subjects\";\nimport { calculateRepeatDuration } from \"./utils/calc-repeat-duration\";\nimport { calcNextTime } from \"./utils/calc-time\";\nimport { addKeyframes } from \"./utils/edit\";\nimport { normalizeTimes } from \"./utils/normalize-times\";\nimport { compareByTime } from \"./utils/sort\";\nconst defaultSegmentEasing = \"easeInOut\";\nconst MAX_REPEAT = 20;\nexport function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) {\n const defaultDuration = defaultTransition.duration || 0.3;\n const animationDefinitions = new Map();\n const sequences = new Map();\n const elementCache = {};\n const timeLabels = new Map();\n let prevTime = 0;\n let currentTime = 0;\n let totalDuration = 0;\n /**\n * Build the timeline by mapping over the sequence array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i];\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime);\n continue;\n }\n else if (!Array.isArray(segment)) {\n timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels));\n continue;\n }\n let [subject, keyframes, transition = {}] = segment;\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (transition.at !== undefined) {\n currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels);\n }\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0;\n const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes);\n const { delay = 0, times = defaultOffset(valueKeyframesAsList), type = defaultTransition.type || \"keyframes\", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition;\n let { ease = defaultTransition.ease || \"easeOut\", duration } = valueTransition;\n /**\n * Resolve stagger() if defined.\n */\n const calculatedDelay = typeof delay === \"function\"\n ? delay(elementIndex, numSubjects)\n : delay;\n /**\n * If this animation should and can use a spring, generate a spring easing function.\n */\n const numKeyframes = valueKeyframesAsList.length;\n const createGenerator = isGenerator(type)\n ? type\n : generators?.[type || \"keyframes\"];\n if (numKeyframes <= 2 && createGenerator) {\n /**\n * As we're creating an easing function from a spring,\n * ideally we want to generate it using the real distance\n * between the two keyframes. However this isn't always\n * possible - in these situations we use 0-100.\n */\n let absoluteDelta = 100;\n if (numKeyframes === 2 &&\n isNumberKeyframesArray(valueKeyframesAsList)) {\n const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0];\n absoluteDelta = Math.abs(delta);\n }\n const springTransition = {\n ...defaultTransition,\n ...remainingTransition,\n };\n if (duration !== undefined) {\n springTransition.duration = secondsToMilliseconds(duration);\n }\n const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator);\n ease = springEasing.ease;\n duration = springEasing.duration;\n }\n duration ?? (duration = defaultDuration);\n const startTime = currentTime + calculatedDelay;\n /**\n * If there's only one time offset of 0, fill in a second with length 1\n */\n if (times.length === 1 && times[0] === 0) {\n times[1] = 1;\n }\n /**\n * Fill out if offset if fewer offsets than keyframes\n */\n const remainder = times.length - valueKeyframesAsList.length;\n remainder > 0 && fillOffset(times, remainder);\n /**\n * If only one value has been set, ie [1], push a null to the start of\n * the keyframe array. This will let us mark a keyframe at this point\n * that will later be hydrated with the previous value.\n */\n valueKeyframesAsList.length === 1 &&\n valueKeyframesAsList.unshift(null);\n /**\n * Segments can't express `repeat: Infinity` or very large\n * counts — they'd leave dead time after the segment or\n * explode the keyframe array. Ignore with a warning.\n */\n if (repeat) {\n warning(repeat < MAX_REPEAT, `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`);\n }\n if (repeat && repeat < MAX_REPEAT) {\n /**\n * Express repeatDelay in units of a single iteration's duration\n * so it can be added to the per-iteration time offsets below\n * before they're normalized to 0-1.\n */\n const repeatDelayUnits = duration > 0 ? repeatDelay / duration : 0;\n duration = calculateRepeatDuration(duration, repeat, repeatDelay);\n const originalKeyframes = [...valueKeyframesAsList];\n const originalTimes = [...times];\n ease = Array.isArray(ease) ? [...ease] : [ease];\n const originalEase = [...ease];\n /**\n * For reverse/mirror, alternate iterations play the segment\n * backwards. mirror matches JSAnimation's mirroredGenerator:\n * reversed keyframes, easings unchanged. reverse matches\n * JSAnimation's iterationProgress = 1 - p: reversed\n * keyframes, easing array reversed AND each function easing\n * mapped through reverseEasing (string easings unchanged —\n * they're resolved later by the keyframes engine).\n */\n const isFlipping = repeatType === \"reverse\" || repeatType === \"mirror\";\n let flippedKeyframes = originalKeyframes;\n let flippedEases = originalEase;\n if (isFlipping) {\n flippedKeyframes = [...originalKeyframes].reverse();\n if (repeatType === \"reverse\") {\n flippedEases = [...originalEase]\n .reverse()\n .map((e) => typeof e === \"function\"\n ? reverseEasing(e)\n : e);\n }\n }\n for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) {\n const isFlipped = isFlipping && repeatIndex % 2 === 0;\n const iterKeyframes = isFlipped\n ? flippedKeyframes\n : originalKeyframes;\n const iterEase = isFlipped ? flippedEases : originalEase;\n const iterStartOffset = (repeatIndex + 1) * (1 + repeatDelayUnits);\n /**\n * If repeatDelay is set, hold the previous iteration's\n * final value through the delay by inserting a keyframe\n * at the moment the next iteration begins.\n */\n if (repeatDelayUnits > 0) {\n valueKeyframesAsList.push(valueKeyframesAsList[valueKeyframesAsList.length - 1]);\n times.push(iterStartOffset);\n ease.push(\"linear\");\n }\n valueKeyframesAsList.push(...iterKeyframes);\n for (let keyframeIndex = 0; keyframeIndex < iterKeyframes.length; keyframeIndex++) {\n times.push(originalTimes[keyframeIndex] + iterStartOffset);\n ease.push(keyframeIndex === 0\n ? \"linear\"\n : getEasingForSegment(iterEase, keyframeIndex - 1));\n }\n }\n normalizeTimes(times, repeat, repeatDelayUnits);\n }\n const targetTime = startTime + duration;\n /**\n * Add keyframes, mapping offsets to absolute time.\n */\n addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime);\n maxDuration = Math.max(calculatedDelay + duration, maxDuration);\n totalDuration = Math.max(targetTime, totalDuration);\n };\n if (isMotionValue(subject)) {\n const subjectSequence = getSubjectSequence(subject, sequences);\n resolveValueSequence(keyframes, transition, getValueSequence(\"default\", subjectSequence));\n }\n else {\n const subjects = resolveSubjects(subject, keyframes, scope, elementCache);\n const numSubjects = subjects.length;\n /**\n * For every element in this segment, process the defined values.\n */\n for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) {\n /**\n * Cast necessary, but we know these are of this type\n */\n keyframes = keyframes;\n transition = transition;\n const thisSubject = subjects[subjectIndex];\n const subjectSequence = getSubjectSequence(thisSubject, sequences);\n for (const key in keyframes) {\n resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects);\n }\n }\n }\n prevTime = currentTime;\n currentTime += maxDuration;\n }\n /**\n * For every element and value combination create a new animation.\n */\n sequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key];\n /**\n * Arrange all the keyframes in ascending time order.\n */\n valueSequence.sort(compareByTime);\n const keyframes = [];\n const valueOffset = [];\n const valueEasing = [];\n /**\n * For each keyframe, translate absolute times into\n * relative offsets based on the total duration of the timeline.\n */\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i];\n keyframes.push(value);\n valueOffset.push(progress(0, totalDuration, at));\n valueEasing.push(easing || \"easeOut\");\n }\n /**\n * If the first keyframe doesn't land on offset: 0\n * provide one by duplicating the initial keyframe. This ensures\n * it snaps to the first keyframe when the animation starts.\n */\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0);\n keyframes.unshift(keyframes[0]);\n valueEasing.unshift(defaultSegmentEasing);\n }\n /**\n * If the last keyframe doesn't land on offset: 1\n * provide one with a null wildcard value. This will ensure it\n * stays static until the end of the animation.\n */\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1);\n keyframes.push(null);\n }\n if (!animationDefinitions.has(element)) {\n animationDefinitions.set(element, {\n keyframes: {},\n transition: {},\n });\n }\n const definition = animationDefinitions.get(element);\n definition.keyframes[key] = keyframes;\n /**\n * Exclude `type` from defaultTransition since springs have been\n * converted to duration-based easing functions in resolveValueSequence.\n * Including `type: \"spring\"` would cause JSAnimation to error when\n * the merged keyframes array has more than 2 keyframes.\n */\n const { type: _type, ...remainingDefaultTransition } = defaultTransition;\n definition.transition[key] = {\n ...remainingDefaultTransition,\n duration: totalDuration,\n ease: valueEasing,\n times: valueOffset,\n ...sequenceTransition,\n };\n }\n });\n return animationDefinitions;\n}\nfunction getSubjectSequence(subject, sequences) {\n !sequences.has(subject) && sequences.set(subject, {});\n return sequences.get(subject);\n}\nfunction getValueSequence(name, sequences) {\n if (!sequences[name])\n sequences[name] = [];\n return sequences[name];\n}\nfunction keyframesAsList(keyframes) {\n return Array.isArray(keyframes) ? keyframes : [keyframes];\n}\nexport function getValueTransition(transition, key) {\n return transition && transition[key]\n ? {\n ...transition,\n ...transition[key],\n }\n : { ...transition };\n}\nconst isNumber = (keyframe) => typeof keyframe === \"number\";\nconst isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber);\n//# sourceMappingURL=create.js.map","import { HTMLVisualElement, isSVGElement, isSVGSVGElement, ObjectVisualElement, SVGVisualElement, visualElementStore, } from \"motion-dom\";\nexport function createDOMVisualElement(element) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n transform: {},\n transformOrigin: {},\n style: {},\n vars: {},\n attrs: {},\n },\n latestValues: {},\n },\n };\n const node = isSVGElement(element) && !isSVGSVGElement(element)\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options);\n node.mount(element);\n visualElementStore.set(element, node);\n}\nexport function createObjectVisualElement(subject) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n output: {},\n },\n latestValues: {},\n },\n };\n const node = new ObjectVisualElement(options);\n node.mount(subject);\n visualElementStore.set(subject, node);\n}\n//# sourceMappingURL=create-visual-element.js.map","import { isSVGElement } from './is-svg-element.mjs';\n\n/**\n * Checks if an element is specifically an SVGSVGElement (the root SVG element)\n * in a way that works across iframes\n */\nfunction isSVGSVGElement(element) {\n return isSVGElement(element) && element.tagName === \"svg\";\n}\n\nexport { isSVGSVGElement };\n//# sourceMappingURL=is-svg-svg-element.mjs.map\n","import { animateTarget, isMotionValue, visualElementStore, } from \"motion-dom\";\nimport { invariant } from \"motion-utils\";\nimport { createDOMVisualElement, createObjectVisualElement, } from \"../utils/create-visual-element\";\nimport { isDOMKeyframes } from \"../utils/is-dom-keyframes\";\nimport { resolveSubjects } from \"./resolve-subjects\";\nimport { animateSingleValue } from \"motion-dom\";\nfunction isSingleValue(subject, keyframes) {\n return (isMotionValue(subject) ||\n typeof subject === \"number\" ||\n (typeof subject === \"string\" && !isDOMKeyframes(keyframes)));\n}\n/**\n * Implementation\n */\nexport function animateSubject(subject, keyframes, options, scope) {\n const animations = [];\n if (isSingleValue(subject, keyframes)) {\n animations.push(animateSingleValue(subject, isDOMKeyframes(keyframes)\n ? keyframes.default || keyframes\n : keyframes, options ? options.default || options : options));\n }\n else {\n // Gracefully handle null/undefined subjects (e.g., from querySelector returning null)\n if (subject == null) {\n return animations;\n }\n const subjects = resolveSubjects(subject, keyframes, scope);\n const numSubjects = subjects.length;\n invariant(Boolean(numSubjects), \"No valid elements provided.\", \"no-valid-elements\");\n for (let i = 0; i < numSubjects; i++) {\n const thisSubject = subjects[i];\n const createVisualElement = thisSubject instanceof Element\n ? createDOMVisualElement\n : createObjectVisualElement;\n if (!visualElementStore.has(thisSubject)) {\n createVisualElement(thisSubject);\n }\n const visualElement = visualElementStore.get(thisSubject);\n const transition = { ...options };\n /**\n * Resolve stagger function if provided.\n */\n if (\"delay\" in transition &&\n typeof transition.delay === \"function\") {\n transition.delay = transition.delay(i, numSubjects);\n }\n animations.push(...animateTarget(visualElement, { ...keyframes, transition }, {}));\n }\n }\n return animations;\n}\n//# sourceMappingURL=subject.js.map","import { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n//# sourceMappingURL=single-value.mjs.map\n","import { motionValue, spring, } from \"motion-dom\";\nimport { createAnimationsFromSequence } from \"../sequence/create\";\nimport { animateSubject } from \"./subject\";\nexport function animateSequence(sequence, options, scope) {\n const animations = [];\n /**\n * Pre-process: replace function segments with MotionValue segments,\n * subscribe callbacks immediately\n */\n const processedSequence = sequence.map((segment) => {\n if (Array.isArray(segment) && typeof segment[0] === \"function\") {\n const callback = segment[0];\n const mv = motionValue(0);\n mv.on(\"change\", callback);\n if (segment.length === 1) {\n return [mv, [0, 1]];\n }\n else if (segment.length === 2) {\n return [mv, [0, 1], segment[1]];\n }\n else {\n return [mv, segment[1], segment[2]];\n }\n }\n return segment;\n });\n const animationDefinitions = createAnimationsFromSequence(processedSequence, options, scope, { spring });\n animationDefinitions.forEach(({ keyframes, transition }, subject) => {\n animations.push(...animateSubject(subject, keyframes, transition));\n });\n return animations;\n}\n//# sourceMappingURL=sequence.js.map","import { GroupAnimationWithThen } from \"motion-dom\";\nimport { removeItem } from \"motion-utils\";\nimport { animateSequence } from \"./sequence\";\nimport { animateSubject } from \"./subject\";\nfunction isSequence(value) {\n return Array.isArray(value) && value.some(Array.isArray);\n}\n/**\n * Creates an animation function that is optionally scoped\n * to a specific element.\n */\nexport function createScopedAnimate(options = {}) {\n const { scope, reduceMotion, skipAnimations } = options;\n /**\n * Implementation\n */\n function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) {\n let animations = [];\n let animationOnComplete;\n const inherited = {};\n if (reduceMotion !== undefined)\n inherited.reduceMotion = reduceMotion;\n if (skipAnimations !== undefined)\n inherited.skipAnimations = skipAnimations;\n if (isSequence(subjectOrSequence)) {\n const { onComplete, ...sequenceOptions } = optionsOrKeyframes || {};\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete;\n }\n animations = animateSequence(subjectOrSequence, { ...inherited, ...sequenceOptions }, scope);\n }\n else {\n // Extract top-level onComplete so it doesn't get applied per-value\n const { onComplete, ...rest } = options || {};\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete;\n }\n animations = animateSubject(subjectOrSequence, optionsOrKeyframes, { ...inherited, ...rest }, scope);\n }\n const animation = new GroupAnimationWithThen(animations);\n if (animationOnComplete) {\n animation.finished.then(animationOnComplete);\n }\n if (scope) {\n scope.animations.push(animation);\n animation.finished.then(() => {\n removeItem(scope.animations, animation);\n });\n }\n return animation;\n }\n return scopedAnimate;\n}\nexport const animate = createScopedAnimate();\n//# sourceMappingURL=index.js.map"],"names":["removeItem","arr","item","index","indexOf","splice","clamp","min","max","v","formatErrorMessage","message","errorCode","warning","invariant","process","env","NODE_ENV","check","console","warn","Error","MotionGlobalConfig","isNumericalString","test","isZeroValueString","memo","callback","result","undefined","noop","any","pipe","transformers","reduce","a","b","progress","from","to","value","range","SubscriptionManager","constructor","this","subscriptions","add","handler","push","notify","c","numSubscriptions","length","i","getSize","clear","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","velocityPerSecond","velocity","frameDuration","calcBezier","t","a1","a2","cubicBezier","mX1","mY1","mX2","mY2","getTForX","aX","x","lowerBound","upperBound","currentX","currentT","Math","abs","binarySubdivide","mirrorEasing","easing","p","reverseEasing","backOut","backIn","backInOut","anticipate","pow","circIn","sin","acos","circOut","circInOut","easeIn","easeOut","easeInOut","isEasingArray","ease","Array","isArray","getEasingForSegment","rangeSize","wrap","isBezierDefinition","easingLookup","linear","easingDefinitionToFunction","definition","x1","y1","x2","y2","stepsOrder","createRenderBatcher","scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","state","delta","timestamp","isProcessing","flagRunNextFrame","steps","acc","key","thisFrame","Set","nextFrame","flushNextFrame","toKeepAlive","WeakSet","latestFrameData","triggerCallback","has","step","schedule","keepAlive","immediate","queue","cancel","delete","frameData","prevFrame","forEach","createRenderStep","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","useManualTiming","performance","now","frame","cancelFrame","requestAnimationFrame","clearTime","time","set","newTime","queueMicrotask","checkStringStartsWith","token","startsWith","isCSSVariableName","startsAsVariableToken","isCSSVariableToken","singleCssVariableRegex","split","trim","containsCSSVariable","includes","number","parse","parseFloat","transform","alpha","scale","default","sanitize","round","floatRegex","singleColorRegex","isColorString","type","testProp","Boolean","isNullish","Object","prototype","hasOwnProperty","call","splitColor","aName","bName","cName","match","rgbUnit","clampRgbUnit","rgba","red","green","blue","alpha$1","hex","r","g","substring","parseInt","createUnitType","unit","endsWith","degrees","percent","px","vh","vw","progressPercentage","hsla","hue","saturation","lightness","color","getAnimatableNone","parsed","colorRegex","NUMBER_TOKEN","COLOR_TOKEN","complexRegex","analyseComplexValue","originalValue","toString","values","indexes","var","types","replace","parsedValue","buildTransformer","numSections","output","convertToZero","splitBefore","complex","isNaN","createTransformer","source","info","transformer","map","hueToRgb","q","mixImmediate","mixNumber","mixLinearColor","fromExpo","expo","sqrt","colorTypes","asRGBA","find","model","hslaToRgba","mixColor","fromRGBA","toRGBA","blended","invisibleValues","mixNumber$1","getMixer","mixComplex","mixArray","mixObject","numValues","blendValue","origin","target","template","originStats","targetStats","mixVisibility","orderedOrigin","pointers","originIndex","originValue","matchOrder","mix","mixer","frameloopDriver","passTimestamp","start","stop","generateLinearEasing","duration","resolution","points","numPoints","maxGeneratorDuration","calcGeneratorDuration","generator","next","done","Infinity","createGeneratorEasing","options","createGenerator","keyframes","springDefaults","granular","calcAngularFreq","undampedFreq","dampingRatio","safeMin","durationKeys","physicsKeys","isSpringType","keys","some","getSpringOptions","springOptions","stiffness","damping","mass","isResolvedFromDuration","visualDuration","root","PI","bounce","derived","envelope","derivative","exponentialDecay","exp","d","e","f","initialGuess","approximateRoot","findSpring","spring","optionsOrVisualDuration","restSpeed","restDelta","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","resolveSpring","resolveVelocity","angularFreq","A","sinCoeff","cosCoeff","cos","C","dampedAngularFreq","freqForT","sinh","cosh","P","sinhCoeff","coshCoeff","calculatedDuration","current","currentVelocity","toTransition","applyToOptions","generatorOptions","getGeneratorVelocity","resolveValue","prevT","inertia","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","nearestBoundary","amplitude","ideal","calcDelta","calcLatest","applyFriction","latest","timeReachedBoundary","spring$1","checkCatchBoundary","hasUpdatedFrame","interpolate","input","isClamp","inputLength","isZeroDeltaRange","reverse","mixers","customMixer","mixerFactory","numMixers","easingFunction","createMixers","interpolator","progressInRange","fillOffset","offset","remaining","offsetProgress","defaultOffset","keyframeValues","times","easingFunctions","absoluteTimes","o","convertOffsetToTimes","mapTimeToKeyframe","isNotNull","getFinalKeyframe","repeat","repeatType","finalKeyframe","speed","resolvedKeyframes","filter","transitionTypeMap","decay","tween","replaceTransitionType","transition","WithPromise","updateFinished","finished","_finished","Promise","resolve","notifyFinished","then","onResolve","onReject","percentToProgress","JSAnimation","super","startTime","isStopped","currentTime","holdTime","playbackSpeed","delayState","motionValue","updatedAt","tick","teardown","onStop","initAnimation","play","autoplay","pause","repeatDelay","keyframes$1","generatorFactory","mixKeyframes","mirroredGenerator","resolvedDuration","totalDuration","updateTime","animationTime","sample","delay","onUpdate","timeWithoutDelay","isInDelayPhase","elapsed","frameGenerator","currentIteration","floor","iterationProgress","isAnimationFinished","finish","reject","iterationDuration","driver","s","newSpeed","hasChanged","onPlay","complete","onComplete","onCancel","stopDriver","sampleTime","attachTimeline","timeline","allowFlatten","observe","radToDeg","rad","rotate","angle","atan2","rebaseAngle","matrix2dParsers","y","translateX","translateY","scaleX","scaleY","rotateZ","skewX","atan","skewY","skew","matrix3dParsers","z","translateZ","rotateX","rotateY","defaultTransformValue","name","parseValueFromTransform","matrix3dMatch","parsers","matrix2dMatch","valueParser","convertTransformToNumber","transformPropOrder","transformProps","isNumOrPxType","transformKeys","nonTranslationalTransformKeys","positionalValues","width","paddingLeft","paddingRight","boxSizing","height","paddingTop","paddingBottom","top","_bbox","left","bottom","right","toResolve","isScheduled","anyNeedsMeasurement","isForced","measureAllKeyframes","resolversToMeasure","resolver","needsMeasurement","elementsToMeasure","element","transformsToRestore","Map","removedTransforms","visualElement","getValue","get","removeNonTranslationalTransform","measureInitialState","restore","measureEndState","suspendedScrollY","window","scrollTo","readAllKeyframes","readKeyframes","KeyframeResolver","unresolvedKeyframes","isAsync","scheduleResolve","currentValue","valueAsRead","readValue","fillWildcards","setFinalKeyframe","renderEndStyles","isForcedComplete","resume","setStyle","isCSSVar","style","setProperty","supportsFlags","memoSupports","supportsFlag","memoized","supportsScrollTimeline","ScrollTimeline","supportsLinearEasing","document","createElement","animate","opacity","cubicBezierAsString","supportedWaapiEasing","mapEasingToNativeEasing","segmentEasing","startWaapiAnimation","valueName","pseudoElement","keyframeOptions","fill","iterations","direction","isGenerator","NativeAnimation","finishedTime","manualStartTime","isPseudoElement","applyGeneratorOptions","animation","onfinish","keyframe","updateMotionValue","commitStyles","isConnected","effect","getComputedTiming","Number","wasFinished","playbackRate","playState","newStartTime","rangeStart","rangeEnd","updateTiming","unsupportedEasingFunctions","replaceStringEasing","NativeAnimationExtended","sampleAnimation","setWithVelocity","isAnimatable","makeAnimationInstant","acceleratedValues","browserColorFunctions","colorProperties","supportsWaapi","Element","supportsBrowserAnimation","subject","owner","HTMLElement","transformTemplate","getProps","hasBrowserOnlyColors","AsyncMotionValueAnimation","_animation","stopTimeline","keyframeResolver","createdAt","optionsWithDefaults","KeyframeResolver$1","forced","onKeyframesResolved","sync","isHandoff","resolvedAt","canAnimateValue","originKeyframe","targetKeyframe","isOriginAnimatable","isTargetAnimatable","hasKeyframesChanged","canAnimate","instantAnimations","resolvedOptions","useWaapi","catch","pendingTimeline","_onReject","finally","GroupAnimation","animations","runAll","all","getAll","propName","setAll","newValue","getMax","methodName","controls","GroupAnimationWithThen","MotionValue","init","canTrackVelocity","events","updateAndNotify","setPrevFrameValue","prev","setCurrent","change","dependents","dependent","dirty","hasAnimated","prevFrameValue","prevUpdatedAt","onChange","subscription","on","eventName","unsubscribe","clearListeners","eventManagers","attach","passiveEffect","stopPassiveEffect","jump","endAnimation","addDependent","removeDependent","getPrevious","getVelocity","startAnimation","animationStart","animationComplete","clearAnimation","animationCancel","isAnimating","destroy","resolveTransition","parentTransition","inherit","_","rest","getValueTransition","valueTransition","underDampedSpring","keyframesTransition","getDefaultTransition","valueKey","orchestrationKeys","animateMotionValue","isTransitionDefined","assign","shouldSkip","skipAnimations","shouldSkipAnimations","isSync","splitCSSVariableRegex","getVariableValue","depth","fallback","exec","token1","token2","parseCSSVariable","resolved","getComputedStyle","getPropertyValue","trimmed","getValueState","resolveVariantFromProps","props","custom","variants","positionalKeys","setMotionValue","hasValue","addValue","resolveFinalValueInKeyframes","isKeyframesTarget","setTarget","resolveVariant","transitionEnd","isMotionValue","addValueToWillChange","willChange","WillChange","newWillChange","camelToDash","str","toLowerCase","optimizedAppearDataAttribute","getOptimisedAppearId","shouldBlockAnimation","protectedKeys","needsAnimating","shouldBlock","animateTarget","targetAndTransition","transitionOverride","defaultTransition","reduceMotion","animationTypeState","animationState","getState","path","animateVisualElement","latestValues","valueTarget","MotionHandoffAnimation","appearId","shouldReduceMotion","applyTransitionEnd","testValueType","dimensionValueTypes","findDimensionValueType","isNone","maxDefaults","applyDefaultFilter","slice","defaultValue","functionRegex","functions","join","mask","int","numberValueTypes","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","maxWidth","maxHeight","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY","pathRotation","scaleZ","distance","perspective","transformPerspective","originX","originY","originZ","zIndex","fillOpacity","strokeOpacity","numOctaves","defaultValueTypes","backgroundColor","outlineColor","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","WebkitFilter","WebkitMask","getDefaultValueType","customTypes","defaultValueType","invalidTemplates","DOMKeyframesResolver","resolveNoneKeyframes","originType","targetType","noneKeyframeIndexes","animatableTemplate","noneIndex","makeNoneKeyframesAnimatable","pageYOffset","measuredOrigin","measureViewportBox","measureKeyframe","finalKeyframeIndex","unsetTransformName","unsetTransformValue","getValueAsType","microtask","isSVGElement","valueTypes","createBox","visualElementStore","WeakMap","variantProps","isControllingVariants","isVariantLabel","prefersReducedMotion","hasReducedMotionListener","isBrowser","propEventHandlers","featureDefinitions","VisualElement","scrapeMotionValuesFromProps","_props","_prevProps","_visualElement","parent","presenceContext","reducedMotionConfig","blockInitialAnimation","visualState","children","isVariantNode","features","valueSubscriptions","prevMotionValues","hasBeenMounted","propEventSubscriptions","notifyUpdate","triggerBuild","renderInstance","renderState","projection","renderScheduledAt","scheduleRender","baseTarget","initialValues","initial","skipAnimationsConfig","variantChildren","manuallyAnimateOnMount","initialMotionValues","mount","instance","removeFromVariantTree","addVariantChild","bindToMotionValue","matchMedia","motionMediaQuery","setReducedMotionPreferences","matches","addEventListener","initPrefersReducedMotion","addChild","unmount","remove","removeChild","feature","isMounted","child","enteringChildren","accelerate","factory","cleanup","valueIsTransform","onBindTransform","removeOnChange","latestValue","isTransformDirty","removeSyncCheck","MotionCheckAppearSync","sortNodePosition","other","sortInstanceNodePosition","updateFeatures","featureDefinition","isEnabled","Feature","FeatureConstructor","build","measureInstanceViewportBox","getStaticValue","setStaticValue","prevProps","prevPresenceContext","listener","nextValue","prevValue","existingValue","liveStyle","removeValue","updateMotionValuesFromProps","handleChildMotionValue","getVariant","getTransformPagePoint","transformPagePoint","getClosestVariantNode","closestVariantNode","removeValueFromRenderState","getBaseTargetFromProps","readValueFromInstance","setBaseTarget","getBaseTarget","valueFromInitial","variant","args","scheduleRenderMicrotask","DOMVisualElement","arguments","compareDocumentPosition","vars","childSubscription","textContent","translateAlias","numTransforms","buildHTMLStyles","transformOrigin","hasTransform","hasTransformOrigin","valueAsType","transformString","transformIsDefault","valueIsDefault","buildTransform","renderHTML","styleProp","elementStyle","applyProjectionStyles","pixelsToPercent","pixels","axis","correctBorderRadius","correct","node","correctBoxShadow","treeScale","projectionDelta","original","shadow","xScale","yScale","averageScale","scaleCorrectors","applyTo","boxShadow","isForcedMotionValue","layout","layoutId","prevStyle","newValues","HTMLVisualElement","isProjecting","readTransformValue","computedStyle","transformPoint","convertBoundingBoxToBox","point","topLeft","bottomRight","transformBoxPoints","getBoundingClientRect","ObjectVisualElement","object","isObjectKey","dashKeys","array","camelKeys","cssMotionPathProperties","buildSVGAttrs","attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset","isSVGTag","viewBox","attrs","transformBox","spacing","useDashCase","buildSVGPath","camelCaseAttributes","SVGVisualElement","defaultType","getAttribute","scrapeMotionValuesFromProps$1","charAt","toUpperCase","_styleProp","setAttribute","renderSVG","tag","tagName","isDOMKeyframes","resolveSubjects","scope","selectorCache","elementOrSelector","EventTarget","elements","querySelectorAll","resolveElements","NodeList","calculateRepeatDuration","calcNextTime","labels","addKeyframes","sequence","endTime","at","eraseKeyframes","normalizeTimes","repeatDelayUnits","totalUnits","compareByTime","getSubjectSequence","sequences","getValueSequence","keyframesAsList","isNumber","isNumberKeyframesArray","every","createDOMVisualElement","isSVGSVGElement","createObjectVisualElement","animateSubject","isSingleValue","motionValue$1","animateSingleValue","subjects","numSubjects","thisSubject","createVisualElement","animateSequence","animationDefinitions","sequenceTransition","generators","defaultDuration","elementCache","timeLabels","prevTime","segment","maxDuration","resolveValueSequence","valueKeyframes","valueSequence","elementIndex","valueKeyframesAsList","remainingTransition","calculatedDelay","numKeyframes","absoluteDelta","springTransition","springEasing","remainder","unshift","originalKeyframes","originalTimes","originalEase","isFlipping","flippedKeyframes","flippedEases","repeatIndex","isFlipped","iterKeyframes","iterEase","iterStartOffset","keyframeIndex","targetTime","subjectIndex","subjectSequence","valueSequences","sort","valueOffset","valueEasing","_type","remainingDefaultTransition","createAnimationsFromSequence","mv","createScopedAnimate","subjectOrSequence","optionsOrKeyframes","animationOnComplete","inherited","sequenceOptions"],"mappings":"AAIA,SAASA,EAAWC,EAAKC,GACrB,MAAMC,EAAQF,EAAIG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EnDqP,CACX,CCpBO,SAASwf,GAAoBv2B,EAAU,IAC1C,MAAMmxB,MAAEA,EAAKpT,aAAEA,EAAY/C,eAAEA,GAAmBhb,EAuChD,OAnCA,SAAuBw2B,EAAmBC,EAAoBz2B,GAC1D,IACI02B,EADA3f,EAAa,GAEjB,MAAM4f,EAAY,CAAA,EAKlB,QAJqBtoC,IAAjB0vB,IACA4Y,EAAU5Y,aAAeA,QACN1vB,IAAnB2sB,IACA2b,EAAU3b,eAAiBA,GAnBnBhsB,EAoBGwnC,EAnBZ3jC,MAAMC,QAAQ9D,IAAUA,EAAM6R,KAAKhO,MAAMC,SAmBT,CAC/B,MAAMsY,WAAEA,KAAewrB,GAAoBH,GAAsB,CAAA,EACvC,mBAAfrrB,IACPsrB,EAAsBtrB,GAE1B2L,EAAa0c,GAAgB+C,EAAmB,IAAKG,KAAcC,GAAmBzF,EAC1F,KACK,CAED,MAAM/lB,WAAEA,KAAegP,GAASpa,GAAW,CAAA,EACjB,mBAAfoL,IACPsrB,EAAsBtrB,GAE1B2L,EAAakc,GAAeuD,EAAmBC,EAAoB,IAAKE,KAAcvc,GAAQ+W,EAClG,CAlCR,IAAoBniC,EAmCZ,MAAMikB,EAAY,IAAIwE,GAAuBV,GAU7C,OATI2f,GACAzjB,EAAUpL,SAASK,KAAKwuB,GAExBvF,IACAA,EAAMpa,WAAWvnB,KAAKyjB,GACtBA,EAAUpL,SAASK,KAAK,KACpB1b,EAAW2kC,EAAMpa,WAAY9D,MAG9BA,CACX,CAEJ,CACY,MAACnB,GAAUykB"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-animation-assets.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-animation-assets.js deleted file mode 100644 index f31de544..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-animation-assets.js +++ /dev/null @@ -1 +0,0 @@ -const t=(t,e,s)=>s>e?e:s{},n=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(s=(t,s,n)=>{t||"undefined"==typeof console||console.warn(e(s,n))},n=(t,s,n)=>{if(!t)throw new Error(e(s,n))});const i={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>/^0[^.\s]+$/u.test(t);function o(t){let e;return()=>(void 0===e&&(e=t()),e)}const h=t=>t;class l{constructor(){this.subscriptions=[]}add(t){var e,s;return e=this.subscriptions,s=t,-1===e.indexOf(s)&&e.push(s),()=>function(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}(this.subscriptions,t)}notify(t,e,s){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,s);else for(let i=0;i1e3*t,c=t=>t/1e3,d=(t,e)=>e?t*(1e3/e):0,p=t=>Array.isArray(t)&&"number"==typeof t[0],f=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function m(t,e){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,o=f.reduce((t,e)=>(t[e]=function(t){let e=new Set,s=new Set,n=!1,i=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function o(e){r.has(e)&&(h.schedule(e),t()),e(a)}const h={schedule:(t,i=!1,a=!1)=>{const o=a&&n?e:s;return i&&r.add(t),o.add(t),t},cancel:t=>{s.delete(t),r.delete(t)},process:t=>{if(a=t,n)return void(i=!0);n=!0;const r=e;e=s,s=r,e.forEach(o),e.clear(),n=!1,i&&(i=!1,h.process(t))}};return h}(a),t),{}),{setup:h,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:p,render:m,postRender:g}=o,v=()=>{const a=i.useManualTiming,o=a?r.timestamp:performance.now();s=!1,a||(r.delta=n?1e3/60:Math.max(Math.min(o-r.timestamp,40),1)),r.timestamp=o,r.isProcessing=!0,h.process(r),l.process(r),u.process(r),c.process(r),d.process(r),p.process(r),m.process(r),g.process(r),r.isProcessing=!1,s&&e&&(n=!1,t(v))};return{schedule:f.reduce((e,i)=>{const a=o[i];return e[i]=(e,i=!1,o=!1)=>(s||(s=!0,n=!0,r.isProcessing||t(v)),a.schedule(e,i,o)),e},{}),cancel:t=>{for(let e=0;e(void 0===b&&V.set(y.isProcessing||i.useManualTiming?y.timestamp:performance.now()),b),set:t=>{b=t,queueMicrotask(w)}},S=t=>e=>"string"==typeof e&&e.startsWith(t),M=S("--"),T=S("var(--"),A=t=>!!T(t)&&x.test(t.split("/*")[0].trim()),x=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function C(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const k={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},F={...k,transform:e=>t(0,1,e)},E={...k,default:1},R=t=>Math.round(1e5*t)/1e5,B=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const P=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,I=(t,e)=>s=>Boolean("string"==typeof s&&P.test(s)&&s.startsWith(t)||e&&!function(t){return null==t}(s)&&Object.prototype.hasOwnProperty.call(s,e)),N=(t,e,s)=>n=>{if("string"!=typeof n)return n;const[i,r,a,o]=n.match(B);return{[t]:parseFloat(i),[e]:parseFloat(r),[s]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},O={...k,transform:e=>Math.round((e=>t(0,255,e))(e))},$={test:I("rgb","red"),parse:N("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+O.transform(t)+", "+O.transform(e)+", "+O.transform(s)+", "+R(F.transform(n))+")"};const L={test:I("#"),parse:function(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:$.transform},Y=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),W=Y("deg"),X=Y("%"),j=Y("px"),z=Y("vh"),K=Y("vw"),U=(()=>({...X,parse:t=>X.parse(t)/100,transform:t=>X.transform(100*t)}))(),Z={test:I("hsl","hue"),parse:N("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+X.transform(R(e))+", "+X.transform(R(s))+", "+R(F.transform(n))+")"},D={test:t=>$.test(t)||L.test(t)||Z.test(t),parse:t=>$.test(t)?$.parse(t):Z.test(t)?Z.parse(t):L.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?$.transform(t):Z.transform(t),getAnimatableNone:t=>{const e=D.parse(t);return e.alpha=0,D.transform(e)}},q=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const H="number",_="color",G=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function J(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(G,t=>(D.test(t)?(n.color.push(r),i.push(_),s.push(D.parse(t))):t.startsWith("var(")?(n.var.push(r),i.push("var"),s.push(t)):(n.number.push(r),i.push(H),s.push(parseFloat(t))),++r,"${}")).split("${}");return{values:s,split:a,indexes:n,types:i}}function Q({split:t,types:e}){const s=t.length;return n=>{let i="";for(let r=0;r{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(s=t)?0:D.test(s)?D.getAnimatableNone(s):s;var s};const et={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(B)?.length||0)+(t.match(q)?.length||0)>0},parse:function(t){return J(t).values},createTransformer:function(t){return Q(J(t))},getAnimatableNone:function(t){const e=J(t);return Q(e)(e.values.map((t,s)=>tt(t,e.split[s])))}},st=(t,e,s)=>t+(e-t)*s,nt=(t,e,s=10)=>{let n="";const i=Math.max(Math.round(e/s),2);for(let e=0;enull!==t;function rt(t,{repeat:e,repeatType:s="loop"},n,i=1){const r=t.filter(it),a=i<0||e&&"loop"!==s&&e%2==1?0:r.length-1;return a&&void 0!==n?n:r[a]}class at{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const ot=t=>180*t/Math.PI,ht=t=>{const e=ot(Math.atan2(t[1],t[0]));return ut(e)},lt={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ht,rotateZ:ht,skewX:t=>ot(Math.atan(t[1])),skewY:t=>ot(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ut=t=>((t%=360)<0&&(t+=360),t),ct=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),dt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),pt={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ct,scaleY:dt,scale:t=>(ct(t)+dt(t))/2,rotateX:t=>ut(ot(Math.atan2(t[6],t[5]))),rotateY:t=>ut(ot(Math.atan2(-t[2],t[0]))),rotateZ:ht,rotate:ht,skewX:t=>ot(Math.atan(t[4])),skewY:t=>ot(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ft(t){return t.includes("scale")?1:0}function mt(t,e){if(!t||"none"===t)return ft(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=pt,i=s;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=lt,i=e}if(!i)return ft(e);const r=n[e],a=i[1].split(",").map(vt);return"function"==typeof r?r(a):a[r]}const gt=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return mt(s,e)};function vt(t){return parseFloat(t.trim())}const yt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],bt=(()=>new Set([...yt,"pathRotation"]))(),wt=t=>t===k||t===j,Vt=new Set(["x","y","z"]),St=yt.filter(t=>!Vt.has(t));const Mt={width:({x:t},{paddingLeft:e="0",paddingRight:s="0",boxSizing:n})=>{const i=t.max-t.min;return"border-box"===n?i:i-parseFloat(e)-parseFloat(s)},height:({y:t},{paddingTop:e="0",paddingBottom:s="0",boxSizing:n})=>{const i=t.max-t.min;return"border-box"===n?i:i-parseFloat(e)-parseFloat(s)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>mt(e,"x"),y:(t,{transform:e})=>mt(e,"y")};Mt.translateX=Mt.x,Mt.translateY=Mt.y;const Tt=new Set;let At=!1,xt=!1,Ct=!1;function kt(){if(xt){const t=Array.from(Tt).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),s=new Map;e.forEach(t=>{const e=function(t){const e=[];return St.forEach(s=>{const n=t.getValue(s);void 0!==n&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}(t);e.length&&(s.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=s.get(t);e&&e.forEach(([e,s])=>{t.getValue(e)?.set(s)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}xt=!1,At=!1,Tt.forEach(t=>t.complete(Ct)),Tt.clear()}function Ft(){Tt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(xt=!0)})}function Et(){Ct=!0,Ft(),kt(),Ct=!1}class Rt{constructor(t,e,s,n,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=s,this.motionValue=n,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Tt.add(this),At||(At=!0,g.read(Ft),g.resolveKeyframes(kt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:s,motionValue:n}=this;if(null===t[0]){const i=n?.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(s&&e){const n=s.readValue(e,r);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=r),n&&void 0===i&&n.set(t[0])}!function(t){for(let e=1;et.startsWith("--"))(e)?t.style.setProperty(e,s):t.style[e]=s}const Pt={};function It(t,e){const s=o(t);return()=>Pt[e]??s()}const Nt=It(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Ot=It(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),$t=([t,e,s,n])=>`cubic-bezier(${t}, ${e}, ${s}, ${n})`,Lt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$t([0,.65,.55,1]),circOut:$t([.55,0,1,.45]),backIn:$t([.31,.01,.66,-.59]),backOut:$t([.33,1.53,.69,.99])};function Yt(t,e){return t?"function"==typeof t?Ot()?nt(t,e):"ease-out":p(t)?$t(t):Array.isArray(t)?t.map(t=>Yt(t,e)||Lt.easeOut):Lt[t]:void 0}function Wt(t,e,s,{delay:n=0,duration:i=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:h}={},l=void 0){const u={[e]:s};h&&(u.offset=h);const c=Yt(o,i);Array.isArray(c)&&(u.easing=c);const d={delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};l&&(d.pseudoElement=l);return t.animate(u,d)}function Xt(t){return"function"==typeof t&&"applyToOptions"in t}class jt extends at{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:s,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:h}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=a,this.options=t,n("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return Xt(t)&&Ot()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Wt(e,s,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=rt(i,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(t),Bt(e,s,t),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return c(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+c(t)}get time(){return c(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=u(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:s,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Nt()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),s&&(this.animation.rangeEnd=s),h):n(this)}}const zt=new Set(["opacity","clipPath","filter","transform"]);class Kt{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=V.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=V.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new l);const s=this.events[t].add(e);return"change"===t?()=>{s(),g.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=V.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return d(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ut(t,e){return new Kt(t,e)}function Zt(t){const e=[{},{}];return t?.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function Dt(t,e,s,n){if("function"==typeof e){const[i,r]=Zt(n);e=e(void 0!==s?s:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=Zt(n);e=e(void 0!==s?s:t.custom,i,r)}return e}const qt=t=>Boolean(t&&t.getVelocity);function Ht(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const _t="data-"+Ht("framerAppearId"),Gt=t=>e=>e.test(t),Jt=[k,j,X,W,K,z,{test:t=>"auto"===t,parse:t=>t}],Qt=t=>Jt.find(Gt(t)),te=new Set(["brightness","contrast","saturate","opacity"]);function ee(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=s.match(B)||[];if(!n)return t;const i=s.replace(n,"");let r=te.has(e)?1:0;return n!==s&&(r*=100),e+"("+r+i+")"}const se=/\b([a-z-]*)\(.*?\)/gu,ne={...et,getAnimatableNone:t=>{const e=t.match(se);return e?e.map(ee).join(" "):t}},ie={...et,getAnimatableNone:t=>{const e=et.parse(t);return et.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},re={...k,transform:Math.round},ae={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,inset:j,insetBlock:j,insetBlockStart:j,insetBlockEnd:j,insetInline:j,insetInlineStart:j,insetInlineEnd:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,paddingBlock:j,paddingBlockStart:j,paddingBlockEnd:j,paddingInline:j,paddingInlineStart:j,paddingInlineEnd:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,marginBlock:j,marginBlockStart:j,marginBlockEnd:j,marginInline:j,marginInlineStart:j,marginInlineEnd:j,fontSize:j,backgroundPositionX:j,backgroundPositionY:j,...{rotate:W,pathRotation:W,rotateX:W,rotateY:W,rotateZ:W,scale:E,scaleX:E,scaleY:E,scaleZ:E,skew:W,skewX:W,skewY:W,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:F,originX:U,originY:U,originZ:j},zIndex:re,fillOpacity:F,strokeOpacity:F,numOctaves:re},oe={...ae,color:D,backgroundColor:D,outlineColor:D,fill:D,stroke:D,borderColor:D,borderTopColor:D,borderRightColor:D,borderBottomColor:D,borderLeftColor:D,filter:ne,WebkitFilter:ne,mask:ie,WebkitMask:ie},he=t=>oe[t],le=new Set([ne,ie]);function ue(t,e){let s=he(t);return le.has(s)||(s=et),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const ce=(t,e)=>e&&"number"==typeof t?e.transform(t):t,{schedule:de}=m(queueMicrotask,!1),pe=[...Jt,D,et],fe=()=>({x:{min:0,max:0},y:{min:0,max:0}}),me=new WeakMap;function ge(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ve(t){return"string"==typeof t||Array.isArray(t)}const ye=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],be=["initial",...ye];function we(t){return ge(t.animate)||be.some(e=>ve(t[e]))}function Ve(t){return Boolean(we(t)||t.variants)}const Se={current:null},Me={current:!1},Te="undefined"!=typeof window;const Ae=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let xe={};function Ce(t){xe=t}function ke(){return xe}class Fe{scrapeMotionValuesFromProps(t,e,s){return{}}constructor({parent:t,props:e,presenceContext:s,reducedMotionConfig:n,skipAnimations:i,blockInitialAnimation:r,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Rt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=V.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Me.current||function(){if(Me.current=!0,Te)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Se.current=t.matches;t.addEventListener("change",e),e()}else Se.current=!1}(),this.shouldReduceMotion=Se.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),v(this.notifyUpdate),v(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&zt.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:n,times:i,ease:r,duration:a}=e.accelerate,o=new jt({element:this.current,name:t,keyframes:n,times:i,ease:r,duration:u(a)}),h=s(o);return void this.valueSubscriptions.set(t,()=>{h(),o.cancel()})}const s=bt.has(t);s&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&g.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),i&&i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in xe){const e=xe[t];if(!e)continue;const{isEnabled:s,Feature:n}=e;if(!this.features[t]&&n&&s(this.props)&&(this.features[t]=new n(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const s=this.values.get(t);e!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return void 0===s&&void 0!==e&&(s=Ut(null===e?void 0:e,{owner:this}),this.addValue(t,s)),s}readValue(t,e){let s=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var n;return null!=s&&("string"==typeof s&&(r(s)||a(s))?s=parseFloat(s):(n=s,!pe.find(Gt(n))&&et.test(e)&&(s=ue(t,e))),this.setBaseTarget(t,qt(s)?s.get():s)),qt(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let s;if("string"==typeof e||"object"==typeof e){const n=Dt(this.props,e,this.presenceContext?.custom);n&&(s=n[t])}if(e&&void 0!==s)return s;const n=this.getBaseTargetFromProps(this.props,t);return void 0===n||qt(n)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new l),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){de.render(this.render)}}const Ee={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Re=yt.length;function Be(t,e,s){const{style:n,vars:i,transformOrigin:r}=t;let a=!1,o=!1;for(const t in e){const s=e[t];if(bt.has(t))a=!0;else if(M(t))i[t]=s;else{const e=ce(s,ae[t]);t.startsWith("origin")?(o=!0,r[t]=e):n[t]=e}}if(e.transform||(a||s?n.transform=function(t,e,s){let n="",i=!0;for(let r=0;r{if(!e.target)return t;if("string"==typeof t){if(!j.test(t))return t;t=parseFloat(t)}return`${Pe(t,e.target.x)}% ${Pe(t,e.target.y)}%`}},Ne={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,i=et.parse(t);if(i.length>5)return n;const r=et.createTransformer(t),a="number"!=typeof i[0]?1:0,o=s.x.scale*e.x,h=s.y.scale*e.y;i[0+a]/=o,i[1+a]/=h;const l=st(o,h,.5);return"number"==typeof i[2+a]&&(i[2+a]/=l),"number"==typeof i[3+a]&&(i[3+a]/=l),r(i)}},Oe={borderRadius:{...Ie,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ie,borderTopRightRadius:Ie,borderBottomLeftRadius:Ie,borderBottomRightRadius:Ie,boxShadow:Ne};function $e(t,{layout:e,layoutId:s}){return bt.has(t)||t.startsWith("origin")||(e||void 0!==s)&&(!!Oe[t]||"opacity"===t)}function Le(t,e,s){const n=t.style,i=e?.style,r={};if(!n)return r;for(const e in n)(qt(n[e])||i&&qt(i[e])||$e(e,t)||void 0!==s?.getValue(e)?.liveStyle)&&(r[e]=n[e]);return r}const Ye={offset:"stroke-dashoffset",array:"stroke-dasharray"},We={offset:"strokeDashoffset",array:"strokeDasharray"};const Xe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function je(t,{attrX:e,attrY:s,attrScale:n,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...o},h,l,u){if(Be(t,o,l),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:c,style:d}=t;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete c.transformBox);for(const t of Xe)void 0!==c[t]&&(d[t]=c[t],delete c[t]);void 0!==e&&(c.x=e),void 0!==s&&(c.y=s),void 0!==n&&(c.scale=n),void 0!==i&&function(t,e,s=1,n=0,i=!0){t.pathLength=1;const r=i?Ye:We;t[r.offset]=""+-n,t[r.array]=`${e} ${s}`}(c,i,r,a,!1)}const ze=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ke(t,e,s){const n=Le(t,e,s);for(const s in t)if(qt(t[s])||qt(e[s])){n[-1!==yt.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}const Ue=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ze(t){return"string"==typeof t&&!t.includes("-")&&!!(Ue.indexOf(t)>-1||/[A-Z]/u.test(t))}export{Qt as $,et as A,J as B,y as C,V as D,v as E,g as F,c as G,t as H,nt as I,u as J,d as K,rt as L,i as M,jt as N,Bt as O,Xt as P,zt as Q,o as R,Rt as S,Et as T,bt as U,r as V,at as W,yt as X,Ut as Y,a as Z,ue as _,we as a,C as a0,Mt as a1,wt as a2,Fe as a3,ft as a4,gt as a5,M as a6,Ht as a7,fe as a8,he as a9,be as aa,ye as ab,ve as b,$e as c,Be as d,je as e,ze as f,Ze as g,Ve as h,qt as i,ge as j,Ke as k,ke as l,Ce as m,h as n,_t as o,p,n as q,Dt as r,Le as s,st as t,$ as u,Z as v,L as w,s as x,A as y,D as z}; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-animation-m.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-animation-m.js deleted file mode 100644 index a855cf01..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-animation-m.js +++ /dev/null @@ -1 +0,0 @@ -import{jsxs as t,jsx as n}from"react/jsx-runtime";import{createContext as o,useContext as e,useMemo as r,Fragment as a,createElement as i,useRef as s,useInsertionEffect as u,useCallback as c,useLayoutEffect as l,useEffect as d,forwardRef as f}from"react";import{i as m,a as p,b as y,c as g,d as v,e as h,f as w,g as S,P as M,r as b,h as E,j as P,k as A,s as T,l as C,m as j,n as V,S as x,o as I,p as L,L as k}from"./size-rollup-dom-max-assets.js";const W=o({strict:!1}),H=o({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),O=o({});function D(t){const{initial:n,animate:o}=function(t,n){if(m(t)){const{initial:n,animate:o}=t;return{initial:!1===n||p(n)?n:void 0,animate:p(o)?o:void 0}}return!1!==t.inherit?n:{}}(t,e(O));return r(()=>({initial:n,animate:o}),[F(n),F(o)])}function F(t){return Array.isArray(t)?t.join(" "):t}const R=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function N(t,n,o){for(const e in n)y(n[e])||g(e,o)||(t[e]=n[e])}function B(t,n){const o={};return N(o,t.style||{},t),Object.assign(o,function({transformTemplate:t},n){return r(()=>{const o={style:{},transform:{},transformOrigin:{},vars:{}};return v(o,n,t),Object.assign({},o.vars,o.style)},[n])}(t,n)),o}function q(t,n){const o={},e=B(t,n);return t.drag&&!1!==t.dragListener&&(o.draggable=!1,e.userSelect=e.WebkitUserSelect=e.WebkitTouchCallout="none",e.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(o.tabIndex=0),o.style=e,o}const U=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function $(t,n,o,e){const a=r(()=>{const o={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return h(o,n,w(e),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[n]);if(t.style){const n={};N(n,t.style,t),a.style={...n,...a.style}}return a}const _=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function z(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||_.has(t)}let G=t=>!z(t);try{"function"==typeof(X=require("@emotion/is-prop-valid").default)&&(G=t=>t.startsWith("on")?!z(t):X(t))}catch{}var X;function Y(t,n,o,{latestValues:e},s,u=!1,c){const l=(c??S(t)?$:q)(n,e,s,t),d=function(t,n,o){const e={};for(const r in t)"values"===r&&"object"==typeof t.values||y(t[r])||(G(r)||!0===o&&z(r)||!n&&!z(r)||t.draggable&&r.startsWith("onDrag"))&&(e[r]=t[r]);return e}(n,"string"==typeof t,u),f=t!==a?{...d,...l,ref:o}:{},{children:m}=n,p=r(()=>y(m)?m.get():m,[m]);return i(t,{...f,children:p})}function J(t,n,o,e){const r={},a=e(t,{});for(const t in a)r[t]=b(a[t]);let{initial:i,animate:s}=t;const u=m(t),c=E(t);n&&c&&!u&&!1!==t.inherit&&(void 0===i&&(i=n.initial),void 0===s&&(s=n.animate));let l=!!o&&!1===o.initial;l=l||!1===i;const d=l?s:i;if(d&&"boolean"!=typeof d&&!P(d)){const n=Array.isArray(d)?d:[d];for(let o=0;o(n,o)=>{const r=e(O),a=e(M),i=()=>function({scrapeMotionValuesFromProps:t,createRenderState:n},o,e,r){return{latestValues:J(o,e,r,t),renderState:n()}}(t,n,r,a);return o?i():function(t){const n=s(null);return null===n.current&&(n.current=t()),n.current}(i)},Q=K({scrapeMotionValuesFromProps:T,createRenderState:R}),Z=K({scrapeMotionValuesFromProps:C,createRenderState:U}),tt={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let nt=!1;function ot(){return function(){if(nt)return;const t={};for(const n in tt)t[n]={isEnabled:t=>tt[n].some(n=>!!t[n])};V(t),nt=!0}(),j()}const et=Symbol.for("motionComponentSymbol");function rt(t,n,o){const e=s(o);u(()=>{e.current=o});const r=s(null);return c(o=>{o&&t.onMount?.(o),n&&(o?n.mount(o):n.unmount());const a=e.current;if("function"==typeof a)if(o){const t=a(o);"function"==typeof t&&(r.current=t)}else r.current?(r.current(),r.current=null):a(o);else a&&(a.current=o)},[n])}const at="undefined"!=typeof window?l:d;function it(t,n,o,r,a,i){const{visualElement:c}=e(O),l=e(W),f=e(M),m=e(H),p=m.reducedMotion,y=m.skipAnimations,g=s(null),v=s(!1);r=r||l.renderer,!g.current&&r&&(g.current=r(t,{visualState:n,parent:c,props:o,presenceContext:f,blockInitialAnimation:!!f&&!1===f.initial,reducedMotionConfig:p,skipAnimations:y,isSVG:i}),v.current&&g.current&&(g.current.manuallyAnimateOnMount=!0));const h=g.current,w=e(x);!h||h.projection||!a||"html"!==h.type&&"svg"!==h.type||function(t,n,o,e){const{layoutId:r,layout:a,drag:i,dragConstraints:s,layoutScroll:u,layoutRoot:c,layoutAnchor:l,layoutCrossfade:d}=n;t.projection=new o(t.latestValues,n["data-framer-portal-id"]?void 0:st(t.parent)),t.projection.setOptions({layoutId:r,layout:a,alwaysMeasureLayout:Boolean(i)||s&&L(s),visualElement:t,animationType:"string"==typeof a?a:"both",initialPromotionConfig:e,crossfade:d,layoutScroll:u,layoutRoot:c,layoutAnchor:l})}(g.current,o,a,w);const S=s(!1);u(()=>{h&&S.current&&h.update(o,f)});const b=o[I],E=s(Boolean(b)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return at(()=>{v.current=!0,h&&(S.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),E.current&&h.animationState&&h.animationState.animateChanges())}),d(()=>{h&&(!E.current&&h.animationState&&h.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),E.current=!1),h.enteringChildren=void 0)}),h}function st(t){if(t)return!1!==t.options.allowProjection?t.projection:st(t.parent)}function ut(o,{forwardMotionProps:r=!1,type:a}={},i,s){const u=a?"svg"===a:S(o),c=u?Z:Q;function l(a,i){let l;const d={...e(H),...a,layoutId:ct(a)},{isStatic:f}=d,m=D(a),p=c(a,f);if(!f&&"undefined"!=typeof window){e(W).strict;const t=function(t){const n=ot(),{drag:o,layout:e}=n;if(!o&&!e)return{};const r={...o,...e};return{MeasureLayout:o?.isEnabled(t)||e?.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(d);l=t.MeasureLayout,m.visualElement=it(o,p,d,s,t.ProjectionNode,u)}return t(O.Provider,{value:m,children:[l&&m.visualElement?n(l,{visualElement:m.visualElement,...d}):null,Y(o,a,rt(p,m.visualElement,i),p,f,r,u)]})}l.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const d=f(l);return d[et]=o,d}function ct({layoutId:t}){const n=e(k).id;return n&&void 0!==t?n+"-"+t:t}function lt(t,n){return ut(t,n)}const dt=lt("div");export{dt as MotionDiv}; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-animation.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-animation.js deleted file mode 100644 index 01e854d6..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-animation.js +++ /dev/null @@ -1 +0,0 @@ -import{n as t,p as e,q as n,t as i,u as s,v as r,w as o,x as a,y as u,z as l,A as c,B as h,C as d,D as p,E as m,F as f,G as y,H as v,I as g,J as w,K as b,M as T,W as x,L as A,N as S,O as M,P as k,Q as C,R as E,S as V,T as P,U as D,V as O,r as I,X as F,Y as L,i as R,o as K,Z as B,_ as j,$ as q,a0 as N,a1 as U,a2 as G,a3 as H,a4 as $,a5 as W,a6 as _,d as z,s as Y,a7 as X,a8 as J,k as Z,e as Q,f as tt,a9 as et,b as nt,aa as it,j as st,ab as rt,g as ot}from"./size-rollup-dom-animation-assets.js";import{Fragment as at}from"react";const ut=(...t)=>t.reduce((t,e)=>n=>e(t(n))),lt=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1},ct=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ht(e,n,i,s){if(e===n&&i===s)return t;const r=t=>function(t,e,n,i,s){let r,o,a=0;do{o=e+(n-e)/2,r=ct(o,i,s)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(t,0,1,e,i);return t=>0===t||1===t?t:ct(r(t),n,s)}const dt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,pt=t=>e=>1-t(1-e),mt=ht(.33,1.53,.69,.99),ft=pt(mt),yt=dt(ft),vt=t=>t>=1?1:(t*=2)<1?.5*ft(t):.5*(2-Math.pow(2,-10*(t-1))),gt=t=>1-Math.sin(Math.acos(t)),wt=pt(gt),bt=dt(gt),Tt=ht(.42,0,1,1),xt=ht(0,0,.58,1),At=ht(.42,0,.58,1),St={linear:t,easeIn:Tt,easeInOut:At,easeOut:xt,circIn:gt,circInOut:bt,circOut:wt,backIn:ft,backInOut:yt,backOut:mt,anticipate:vt},Mt=t=>{if(e(t)){n(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,i,s,r]=t;return ht(e,i,s,r)}return"string"==typeof t?(n(void 0!==St[t],`Invalid easing type '${t}'`,"invalid-easing-type"),St[t]):t};function kt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ct(t,e){return n=>n>0?e:t}const Et=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Vt=[o,s,r];function Pt(t){const e=(n=t,Vt.find(t=>t.test(n)));var n;if(a(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let i=e.parse(t);return e===r&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,r=0,o=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=kt(a,i,t+1/3),r=kt(a,i,t),o=kt(a,i,t-1/3)}else s=r=o=n;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:i}}(i)),i}const Dt=(t,e)=>{const n=Pt(t),r=Pt(e);if(!n||!r)return Ct(t,e);const o={...n};return t=>(o.red=Et(n.red,r.red,t),o.green=Et(n.green,r.green,t),o.blue=Et(n.blue,r.blue,t),o.alpha=i(n.alpha,r.alpha,t),s.transform(o))},Ot=new Set(["none","hidden"]);function It(t,e){return n=>i(t,e,n)}function Ft(t){return"number"==typeof t?It:"string"==typeof t?u(t)?Ct:l.test(t)?Dt:Kt:Array.isArray(t)?Lt:"object"==typeof t?l.test(t)?Dt:Rt:Ct}function Lt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ft(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in i)n[e]=i[e](t);return n}}const Kt=(t,e)=>{const n=c.createTransformer(e),i=h(t),s=h(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ot.has(t)&&!s.values.length||Ot.has(e)&&!i.values.length?function(t,e){return Ot.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):ut(Lt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>f.update(e,t),stop:()=>m(e),now:()=>d.isProcessing?d.timestamp:p.now()}},qt=2e4;function Nt(t){let e=0;let n=t.next(e);for(;!n.done&&e=qt?1/0:e}const Ut=100,Gt=10,Ht=1,$t=0,Wt=800,_t=.3,zt=.3,Yt={granular:.01,default:2},Xt={granular:.005,default:.5},Jt=.01,Zt=10,Qt=.05,te=1;function ee(t,e){return t*Math.sqrt(1-e*e)}const ne=.001;const ie=["duration","bounce"],se=["stiffness","damping","mass"];function re(t,e){return e.some(e=>void 0!==t[e])}function oe(t){let e={velocity:$t,stiffness:Ut,damping:Gt,mass:Ht,isResolvedFromDuration:!1,...t};if(!re(t,se)&&re(t,ie))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,r=2*v(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Ht,stiffness:s,damping:r}}else{const n=function({duration:t=Wt,bounce:e=_t,velocity:n=$t,mass:i=Ht}){let s,r;a(t<=w(Zt),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=v(Qt,te,o),t=v(Jt,Zt,y(t)),o<1?(s=e=>{const i=e*o,s=i*t,r=i-n,a=ee(e,o),u=Math.exp(-s);return ne-r/a*u},r=e=>{const i=e*o*t,r=i*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,u=Math.exp(-i),l=ee(Math.pow(e,2),o);return(-s(e)+ne>0?-1:1)*((r-a)*u)/l}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,r,5/t);if(t=w(t),isNaN(u))return{stiffness:Ut,damping:Gt,duration:t};{const e=Math.pow(u,2)*i;return{stiffness:e,damping:2*o*Math.sqrt(i*e),duration:t}}}({...t,velocity:0});e={...e,...n,mass:Ht},e.isResolvedFromDuration=!0}return e}function ae(t=zt,e=_t){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:u,damping:l,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=oe({...n,velocity:-y(n.velocity||0)}),m=d||0,f=l/(2*Math.sqrt(u*c)),v=o-r,b=y(Math.sqrt(u/c)),T=Math.abs(v)<5;let x,A,S,M,k,C;if(i||(i=T?Yt.granular:Yt.default),s||(s=T?Xt.granular:Xt.default),f<1)S=ee(b,f),M=(m+f*b*v)/S,x=t=>{const e=Math.exp(-f*b*t);return o-e*(M*Math.sin(S*t)+v*Math.cos(S*t))},k=f*b*M+v*S,C=f*b*v-M*S,A=t=>Math.exp(-f*b*t)*(k*Math.sin(S*t)+C*Math.cos(S*t));else if(1===f){x=t=>o-Math.exp(-b*t)*(v+(m+b*v)*t);const t=m+b*v;A=e=>Math.exp(-b*e)*(b*t*e-m)}else{const t=b*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*b*e),i=Math.min(t*e,300);return o-n*((m+f*b*v)*Math.sinh(i)+t*v*Math.cosh(i))/t};const e=(m+f*b*v)/t,n=f*b*e-v*t,i=f*b*v-e*t;A=e=>{const s=Math.exp(-f*b*e),r=Math.min(t*e,300);return s*(n*Math.sinh(r)+i*Math.cosh(r))}}const E={calculatedDuration:p&&h||null,velocity:t=>w(A(t)),next:t=>{if(!p&&f<1){const e=Math.exp(-f*b*t),n=Math.sin(S*t),r=Math.cos(S*t),u=o-e*(M*n+v*r),l=w(e*(k*n+C*r));return a.done=Math.abs(l)<=i&&Math.abs(o-u)<=s,a.value=a.done?o:u,a}const e=x(t);if(p)a.done=t>=h;else{const n=w(A(t));a.done=Math.abs(n)<=i&&Math.abs(o-e)<=s}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(Nt(E),qt),e=g(e=>E.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return E}ae.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Nt(i),qt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:y(s)}}(t,100,ae);return t.ease=e.ease,t.duration=w(e.duration),t.type="keyframes",t};function ue(t,e,n){const i=Math.max(e-5,0);return b(n-t(i),e-i)}function le({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?u:void 0===u||Math.abs(a-t)-m*Math.exp(-t/i),g=t=>y+v(t),w=t=>{const e=v(t),n=g(t);d.done=Math.abs(e)<=l,d.value=d.done?y:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&eu)&&(b=t,T=ae({keyframes:[d.value,p(d.value)],velocity:ue(g,t,d.value),damping:s,stiffness:r,restDelta:l,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}function ce(e,i,{clamp:s=!0,ease:r,mixer:o}={}){const a=e.length;if(n(a===i.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>i[0];if(2===a&&i[0]===i[1])return()=>i[1];const u=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),i=[...i].reverse());const l=function(e,n,i){const s=[],r=i||T.mix||Bt,o=e.length-1;for(let i=0;i{if(u&&t1)for(;nh(v(e[0],e[a-1],t)):h}function he(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=lt(0,e,s);t.push(i(n,1,r))}}(e,t.length-1),e}function de({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Mt):Mt(i),r={done:!1,value:e[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:he(e),t),a=ce(o,e,{ease:Array.isArray(s)?s:(u=e,l=s,u.map(()=>l||At).splice(0,u.length-1))});var u,l;return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}const pe={decay:le,inertia:le,tween:de,keyframes:de,spring:ae};function me(t){"string"==typeof t.type&&(t.type=pe[t.type])}const fe=t=>t/100;class ye extends x{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==p.now()&&this.tick(p.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;me(t);const{type:e=de,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=t;let{keyframes:o}=t;const a=e||de;a!==de&&"number"!=typeof o[0]&&(this.mixKeyframes=ut(fe,Bt(o[0],o[1])),o=[0,100]);const u=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=Nt(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:u=0,keyframes:l,repeat:c,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let w,b=this.currentTime,T=n;if(c){const t=Math.min(this.currentTime,i)/o;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/o)):"mirror"===h&&(T=r)),b=v(0,1,n)*o}g?(this.delayState.value=l[0],w=this.delayState):w=T.next(b),s&&!g&&(w.value=s(w.value));let{done:x}=w;g||null===a||(x=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return S&&p!==le&&(w.value=A(l,this.options,f,this.speed)),m&&m(w.value),S&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+y(t)}get time(){return y(this.currentTime)}set time(t){t=w(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return ue(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(p.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=y(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=jt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(p.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const ve={anticipate:vt,backInOut:yt,circInOut:bt};function ge(t){"string"==typeof t.ease&&t.ease in ve&&(t.ease=ve[t.ease])}class we extends S{constructor(t){ge(t),me(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new ye({...r,autoplay:!1}),a=Math.max(10,p.now()-this.startTime),u=v(0,10,a-10),l=o.sample(a).value,{name:c}=this.options;s&&c&&M(s,c,l),e.setWithVelocity(o.sample(Math.max(0,a-u)).value,l,u),o.stop()}}const be=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!c.test(t)&&"0"!==t||t.startsWith("url(")));function Te(t){t.duration=0,t.type="keyframes"}const xe=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Ae=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Se=E(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Me(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o,keyframes:a}=t,u=e?.owner?.current;if(!(u instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Se()&&n&&(C.has(n)||Ae.has(n)&&function(t){for(let e=0;e{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=p.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:r,name:a,motionValue:u,element:l,...c},d=l?.KeyframeResolver||V;this.keyframeResolver=new d(o,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:u,delay:l,isHandoff:c,onUpdate:h}=i;this.resolvedAt=p.now();let d=!0;(function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=be(s,e),u=be(r,e);return a(o===u,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!(!o||!u)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},f=d&&!c&&Me(m),y=m.motionValue?.owner?.current;let v;if(f)try{v=new we({...m,element:y})}catch{v=new ye(m)}else v=new ye(m);v.finished.then(()=>{this.notifyFinished()}).catch(t),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),P()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Ce(t,e,n,i=0,s=1){const r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*i;return"function"==typeof n?n(r,o):1===s?r*i:a-r*i}function Ee(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Ve(t,e){const n=t?.[e]??t?.default??t;return n!==t?Ee(n,t):n}const Pe={type:"spring",stiffness:500,damping:25,restSpeed:10},De={type:"keyframes",duration:.8},Oe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ie=(t,{keyframes:e})=>e.length>2?De:D.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Pe:Oe,Fe=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const Le=(t,e,n,i={},s,r)=>o=>{const a=Ve(i,t)||{},u=a.delay||i.delay||0;let{elapsed:l=0}=i;l-=w(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};(function(t){for(const e in t)if(!Fe.has(e))return!0;return!1})(a)||Object.assign(c,Ie(t,c)),c.duration&&(c.duration=w(c.duration)),c.repeatDelay&&(c.repeatDelay=w(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(Te(c),0===c.delay&&(h=!0)),(T.instantAnimations||T.skipAnimations||s?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Te(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&void 0!==e.get()){const t=A(c.keyframes,a);if(void 0!==t)return void f.update(()=>{c.onUpdate(t),c.onComplete()})}return a.isSync?new ye(c):new ke(c)},Re=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ke(t,e,i=1){n(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=function(t){const e=Re.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const t=o.trim();return O(t)?parseFloat(t):t}return u(r)?Ke(r,e,i+1):r}function Be(t,e,n){const i=t.getProps();return I(i,e,void 0!==n?n:i.custom,t)}const je=new Set(["width","height","top","left","right","bottom",...F]),qe=t=>Array.isArray(t);function Ne(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,L(n))}function Ue(t){return qe(t)?t[t.length-1]||0:t}function Ge(t,e){const n=t.getValue("willChange");if(i=n,Boolean(R(i)&&i.add))return n.add(e);if(!n&&T.WillChange){const n=new T.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function He(t){return t.props[K]}function $e({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function We(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=e;const u=t.getDefaultTransition();r=r?Ee(r,u):u;const l=r?.reduceMotion,c=r?.skipAnimations;i&&(r=i);const h=[],d=s&&t.animationState&&t.animationState.getState()[s],p=r?.path;p&&p.animateVisualElement(t,a,r,n,h);for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&$e(d,e))continue;const o={delay:n,...Ve(r||{},e)};c&&(o.skipAnimations=!0);const u=i.get();if(void 0!==u&&!i.isAnimating()&&!Array.isArray(s)&&s===u&&!o.velocity){f.update(()=>i.set(s));continue}let p=!1;if(window.MotionHandoffAnimation){const n=He(t);if(n){const t=window.MotionHandoffAnimation(n,e,f);null!==t&&(o.startTime=t,p=!0)}}Ge(t,e);const m=l??t.shouldReduceMotion;i.start(Le(e,i,s,m&&je.has(e)?{type:!1}:o,t,p));const y=i.animation;y&&h.push(y)}if(o){const e=()=>f.update(()=>{o&&function(t,e){const n=Be(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const e in r)Ne(t,e,Ue(r[e]))}(t,o)});h.length?Promise.all(h).then(e):e()}return h}function _e(t,e,n={}){const i=Be(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(We(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(_e(u,e,{...o,delay:n+("function"==typeof i?0:i)+Ce(t.variantChildren,u,i,s,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,r,o,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}return Promise.all([r(),o(n.delay)])}function ze(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||B(t))}const Ye=new Set(["auto","none","0"]);class Xe extends V{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Je=!1;function Ze(t,e){const n=function(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=n?.[t]??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(t=>null!=t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Qe(t){return!("touch"===t.pointerType||Je)}function tn(t,e,n={}){const[i,s,r]=Ze(t,n);return i.forEach(t=>{let n,i=!1,r=!1;const o=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",u)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),r&&(r=!1,o(t))},u=t=>{"touch"!==t.pointerType&&(i?r=!0:o(t))};t.addEventListener("pointerenter",i=>{if(!Qe(i))return;r=!1;const o=e(t,i);"function"==typeof o&&(n=o,t.addEventListener("pointerleave",u,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),r}const en=(t,e)=>!!e&&(t===e||en(t,e.parentElement)),nn=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const sn=new WeakSet;function rn(t){return e=>{"Enter"===e.key&&t(e)}}function on(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function an(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!0}const un=new WeakSet;function ln(t,e,n={}){const[i,s,r]=Ze(t,n),o=t=>{const i=t.currentTarget;if(!an(t))return;if(un.has(t))return;sn.add(i),n.stopPropagation&&un.add(t);const r=e(i,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",u),sn.has(i)&&sn.delete(i),an(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,i===window||i===document||n.useGlobalTarget||en(i,t.target))},u=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",u,s)};return i.forEach(t=>{var e,i;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),"object"==typeof(i=e=t)&&null!==i&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=rn(()=>{if(sn.has(n))return;on(n,"down");const t=rn(()=>{on(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>on(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),function(t){return nn.has(t.tagName)||!0===t.isContentEditable}(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}class cn extends H{constructor(){super(...arguments),this.KeyframeResolver=Xe}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;R(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class hn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function dn(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];for(o in s?.applyProjectionStyles(r,i),n)r.setProperty(o,n[o])}class pn extends cn{constructor(){super(...arguments),this.type="html",this.renderInstance=dn}readValueFromInstance(t,e){if(D.has(e))return this.projection?.isProjecting?$(e):W(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(_(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){z(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Y(t,e,n)}}const mn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class fn extends cn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(D.has(e)){const t=et(e);return t&&t.default||0}return e=mn.has(e)?e:X(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Z(t,e,n)}build(t,e,n){Q(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){dn(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(mn.has(n)?n:X(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=tt(t.tagName),super.mount(t)}}const yn=it.length;function vn(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&vn(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;nPromise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>_e(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=_e(t,e,n);else{const s="function"==typeof e?Be(t,e,n.custom):e;i=Promise.all(We(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function xn(t){let e=Tn(t),n=Mn(),i=!0,s=!1;const r=e=>(n,i)=>{const s=Be(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:a}=t,u=vn(t.parent)||{},l=[],c=new Set;let h={},d=1/0;for(let e=0;ed&&y,T=!1;const x=Array.isArray(f)?f:[f];let A=x.reduce(r(p),{});!1===v&&(A={});const{prevResolvedValues:S={}}=m,M={...S,...A},k=e=>{b=!0,c.has(e)&&(T=!0,c.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in M){const e=A[t],n=S[t];if(h.hasOwnProperty(t))continue;let i=!1;i=qe(e)&&qe(n)?!gn(e,n)||w:e!==n,i?null!=e?k(t):c.add(t):void 0!==e&&c.has(t)?k(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=A,m.isActive&&(h={...h,...A}),(i||s)&&t.blockInitialAnimation&&(b=!1);const C=g&&w;b&&(!C||T)&&l.push(...x.map(e=>{const n={type:p};if("string"==typeof e&&(i||s)&&!C&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=Be(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=Ce(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(c.size){const e={};if("boolean"!=typeof a.initial){const n=Be(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let p=Boolean(l.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,s=!1,p?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Mn(),s=!0}}}function An(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!gn(e,t)}function Sn(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mn(){return{animate:Sn(!0),whileInView:Sn(),whileHover:Sn(),whileTap:Sn(),whileDrag:Sn(),whileFocus:Sn(),exit:Sn()}}function kn(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}let Cn=0;const En={animation:{Feature:class extends hn{constructor(t){super(t),t.animationState||(t.animationState=xn(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();st(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends hn{constructor(){super(...arguments),this.id=Cn++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&!1===n){if(this.isExitComplete){const{initial:t,custom:e}=this.node.getProps();if("string"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)){const n=Be(this.node,t,e);if(n){const{transition:t,transitionEnd:e,...i}=n;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Vn(t){return{point:{x:t.pageX,y:t.pageY}}}function Pn(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&f.postRender(()=>s(e,Vn(e)))}function Dn(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&f.postRender(()=>s(e,Vn(e)))}const On=new WeakMap,In=new WeakMap,Fn=t=>{const e=On.get(t.target);e&&e(t)},Ln=t=>{t.forEach(Fn)};function Rn(t,e,n){const i=function({root:t,...e}){const n=t||document;In.has(n)||In.set(n,{});const i=In.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Ln,{root:t,...e})),i[s]}(e);return On.set(t,n),i.observe(t),()=>{On.delete(t),i.unobserve(t)}}const Kn={some:0,all:1};const Bn={renderer:(t,e)=>e.isSVG??ot(t)?new fn(e):new pn(e,{allowProjection:t!==at}),...En,...{inView:{Feature:class extends hn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,r={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Kn[i]};this.stopObserver=Rn(this.node.current,r,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=e?n:i;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends hn{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=ln(t,(t,e)=>(Dn(this.node,e,"Start"),(t,{success:e})=>Dn(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends hn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ut(kn(this.node.current,"focus",()=>this.onFocus()),kn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends hn{mount(){const{current:t}=this.node;t&&(this.unmount=tn(t,(t,e)=>(Pn(this.node,e,"Start"),t=>Pn(this.node,t,"End"))))}unmount(){}}}}};export{Bn as domAnimation}; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-max-assets.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-max-assets.js deleted file mode 100644 index 0b3e0434..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-max-assets.js +++ /dev/null @@ -1 +0,0 @@ -import{createContext as t}from"react";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function s(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const n=(t,e,s)=>s>e?e:s{},r=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(a=(t,e,s)=>{t||"undefined"==typeof console||console.warn(i(e,s))},r=(t,e,s)=>{if(!t)throw new Error(i(e,s))});const o={},h=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),l=t=>/^0[^.\s]+$/u.test(t);function u(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t;class d{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>s(this.subscriptions,t)}notify(t,e,s){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,s);else for(let i=0;i1e3*t,f=t=>t/1e3,m=(t,e)=>e?t*(1e3/e):0,g=t=>Array.isArray(t)&&"number"==typeof t[0],v=t({}),y=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function b(t,e){let s=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,r=y.reduce((t,e)=>(t[e]=function(t){let e=new Set,s=new Set,n=!1,i=!1;const a=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function o(e){a.has(e)&&(h.schedule(e),t()),e(r)}const h={schedule:(t,i=!1,r=!1)=>{const o=r&&n?e:s;return i&&a.add(t),o.add(t),t},cancel:t=>{s.delete(t),a.delete(t)},process:t=>{if(r=t,n)return void(i=!0);n=!0;const a=e;e=s,s=a,e.forEach(o),e.clear(),n=!1,i&&(i=!1,h.process(t))}};return h}(a),t),{}),{setup:h,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:p,render:f,postRender:m}=r,g=()=>{const a=o.useManualTiming,r=a?i.timestamp:performance.now();s=!1,a||(i.delta=n?1e3/60:Math.max(Math.min(r-i.timestamp,40),1)),i.timestamp=r,i.isProcessing=!0,h.process(i),l.process(i),u.process(i),c.process(i),d.process(i),p.process(i),f.process(i),m.process(i),i.isProcessing=!1,s&&e&&(n=!1,t(g))};return{schedule:y.reduce((e,a)=>{const o=r[a];return e[a]=(e,a=!1,r=!1)=>(s||(s=!0,n=!0,i.isProcessing||t(g)),o.schedule(e,a,r)),e},{}),cancel:t=>{for(let e=0;e(void 0===T&&A.set(S.isProcessing||o.useManualTiming?S.timestamp:performance.now()),T),set:t=>{T=t,queueMicrotask(x)}},C=t=>e=>"string"==typeof e&&e.startsWith(t),k=C("--"),F=C("var(--"),E=t=>!!F(t)&&P.test(t.split("/*")[0].trim()),P=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function R(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const B={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},I={...B,transform:t=>n(0,1,t)},N={...B,default:1},O=t=>Math.round(1e5*t)/1e5,$=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const L=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Y=(t,e)=>s=>Boolean("string"==typeof s&&L.test(s)&&s.startsWith(t)||e&&!function(t){return null==t}(s)&&Object.prototype.hasOwnProperty.call(s,e)),W=(t,e,s)=>n=>{if("string"!=typeof n)return n;const[i,a,r,o]=n.match($);return{[t]:parseFloat(i),[e]:parseFloat(a),[s]:parseFloat(r),alpha:void 0!==o?parseFloat(o):1}},X={...B,transform:t=>Math.round((t=>n(0,255,t))(t))},j={test:Y("rgb","red"),parse:W("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+X.transform(t)+", "+X.transform(e)+", "+X.transform(s)+", "+O(I.transform(n))+")"};const z={test:Y("#"),parse:function(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:j.transform},K=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),U=K("deg"),Z=K("%"),D=K("px"),q=K("vh"),H=K("vw"),_=(()=>({...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(100*t)}))(),G={test:Y("hsl","hue"),parse:W("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+Z.transform(O(e))+", "+Z.transform(O(s))+", "+O(I.transform(n))+")"},J={test:t=>j.test(t)||z.test(t)||G.test(t),parse:t=>j.test(t)?j.parse(t):G.test(t)?G.parse(t):z.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?j.transform(t):G.transform(t),getAnimatableNone:t=>{const e=J.parse(t);return e.alpha=0,J.transform(e)}},Q=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const tt="number",et="color",st=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function nt(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},i=[];let a=0;const r=e.replace(st,t=>(J.test(t)?(n.color.push(a),i.push(et),s.push(J.parse(t))):t.startsWith("var(")?(n.var.push(a),i.push("var"),s.push(t)):(n.number.push(a),i.push(tt),s.push(parseFloat(t))),++a,"${}")).split("${}");return{values:s,split:r,indexes:n,types:i}}function it({split:t,types:e}){const s=t.length;return n=>{let i="";for(let a=0;a{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(s=t)?0:J.test(s)?J.getAnimatableNone(s):s;var s};const rt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match($)?.length||0)+(t.match(Q)?.length||0)>0},parse:function(t){return nt(t).values},createTransformer:function(t){return it(nt(t))},getAnimatableNone:function(t){const e=nt(t);return it(e)(e.values.map((t,s)=>at(t,e.split[s])))}},ot=(t,e,s)=>t+(e-t)*s,ht=(t,e,s=10)=>{let n="";const i=Math.max(Math.round(e/s),2);for(let e=0;enull!==t;function ut(t,{repeat:e,repeatType:s="loop"},n,i=1){const a=t.filter(lt),r=i<0||e&&"loop"!==s&&e%2==1?0:a.length-1;return r&&void 0!==n?n:a[r]}class ct{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const dt=t=>180*t/Math.PI,pt=t=>{const e=dt(Math.atan2(t[1],t[0]));return mt(e)},ft={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:pt,rotateZ:pt,skewX:t=>dt(Math.atan(t[1])),skewY:t=>dt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},mt=t=>((t%=360)<0&&(t+=360),t),gt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),vt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),yt={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gt,scaleY:vt,scale:t=>(gt(t)+vt(t))/2,rotateX:t=>mt(dt(Math.atan2(t[6],t[5]))),rotateY:t=>mt(dt(Math.atan2(-t[2],t[0]))),rotateZ:pt,rotate:pt,skewX:t=>dt(Math.atan(t[4])),skewY:t=>dt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function bt(t){return t.includes("scale")?1:0}function wt(t,e){if(!t||"none"===t)return bt(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=yt,i=s;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ft,i=e}if(!i)return bt(e);const a=n[e],r=i[1].split(",").map(St);return"function"==typeof a?a(r):r[a]}const Vt=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return wt(s,e)};function St(t){return parseFloat(t.trim())}const Mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Tt=(()=>new Set([...Mt,"pathRotation"]))(),xt=t=>t===B||t===D,At=new Set(["x","y","z"]),Ct=Mt.filter(t=>!At.has(t));const kt={width:({x:t},{paddingLeft:e="0",paddingRight:s="0",boxSizing:n})=>{const i=t.max-t.min;return"border-box"===n?i:i-parseFloat(e)-parseFloat(s)},height:({y:t},{paddingTop:e="0",paddingBottom:s="0",boxSizing:n})=>{const i=t.max-t.min;return"border-box"===n?i:i-parseFloat(e)-parseFloat(s)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>wt(e,"x"),y:(t,{transform:e})=>wt(e,"y")};kt.translateX=kt.x,kt.translateY=kt.y;const Ft=new Set;let Et=!1,Pt=!1,Rt=!1;function Bt(){if(Pt){const t=Array.from(Ft).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),s=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ct.forEach(s=>{const n=t.getValue(s);void 0!==n&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}(t);e.length&&(s.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=s.get(t);e&&e.forEach(([e,s])=>{t.getValue(e)?.set(s)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Pt=!1,Et=!1,Ft.forEach(t=>t.complete(Rt)),Ft.clear()}function It(){Ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Pt=!0)})}function Nt(){Rt=!0,It(),Bt(),Rt=!1}class Ot{constructor(t,e,s,n,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=s,this.motionValue=n,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Ft.add(this),Et||(Et=!0,w.read(It),w.resolveKeyframes(Bt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:s,motionValue:n}=this;if(null===t[0]){const i=n?.get(),a=t[t.length-1];if(void 0!==i)t[0]=i;else if(s&&e){const n=s.readValue(e,a);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=a),n&&void 0===i&&n.set(t[0])}!function(t){for(let e=1;et.startsWith("--"))(e)?t.style.setProperty(e,s):t.style[e]=s}const Lt={};function Yt(t,e){const s=u(t);return()=>Lt[e]??s()}const Wt=Yt(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Xt=Yt(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),jt=([t,e,s,n])=>`cubic-bezier(${t}, ${e}, ${s}, ${n})`,zt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jt([0,.65,.55,1]),circOut:jt([.55,0,1,.45]),backIn:jt([.31,.01,.66,-.59]),backOut:jt([.33,1.53,.69,.99])};function Kt(t,e){return t?"function"==typeof t?Xt()?ht(t,e):"ease-out":g(t)?jt(t):Array.isArray(t)?t.map(t=>Kt(t,e)||zt.easeOut):zt[t]:void 0}function Ut(t,e,s,{delay:n=0,duration:i=300,repeat:a=0,repeatType:r="loop",ease:o="easeOut",times:h}={},l=void 0){const u={[e]:s};h&&(u.offset=h);const c=Kt(o,i);Array.isArray(c)&&(u.easing=c);const d={delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:"reverse"===r?"alternate":"normal"};l&&(d.pseudoElement=l);return t.animate(u,d)}function Zt(t){return"function"==typeof t&&"applyToOptions"in t}class Dt extends ct{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:s,keyframes:n,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:h}=t;this.isPseudoElement=Boolean(i),this.allowFlatten=a,this.options=t,r("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return Zt(t)&&Xt()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Ut(e,s,n,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const t=ut(n,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(t),$t(e,s,t),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return f(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=p(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:s,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Wt()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),s&&(this.animation.rangeEnd=s),c):n(this)}}const qt=new Set(["opacity","clipPath","filter","transform"]);class Ht{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=A.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=A.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new d);const s=this.events[t].add(e);return"change"===t?()=>{s(),w.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=A.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return m(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _t(t,e){return new Ht(t,e)}function Gt(t){const e=[{},{}];return t?.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function Jt(t,e,s,n){if("function"==typeof e){const[i,a]=Gt(n);e=e(void 0!==s?s:t.custom,i,a)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,a]=Gt(n);e=e(void 0!==s?s:t.custom,i,a)}return e}const Qt=t=>Boolean(t&&t.getVelocity);function te(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ee="data-"+te("framerAppearId"),se=t=>e=>e.test(t),ne=[B,D,Z,U,H,q,{test:t=>"auto"===t,parse:t=>t}],ie=t=>ne.find(se(t)),ae=new Set(["brightness","contrast","saturate","opacity"]);function re(t){const[e,s]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=s.match($)||[];if(!n)return t;const i=s.replace(n,"");let a=ae.has(e)?1:0;return n!==s&&(a*=100),e+"("+a+i+")"}const oe=/\b([a-z-]*)\(.*?\)/gu,he={...rt,getAnimatableNone:t=>{const e=t.match(oe);return e?e.map(re).join(" "):t}},le={...rt,getAnimatableNone:t=>{const e=rt.parse(t);return rt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},ue={...B,transform:Math.round},ce={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,top:D,right:D,bottom:D,left:D,inset:D,insetBlock:D,insetBlockStart:D,insetBlockEnd:D,insetInline:D,insetInlineStart:D,insetInlineEnd:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,paddingBlock:D,paddingBlockStart:D,paddingBlockEnd:D,paddingInline:D,paddingInlineStart:D,paddingInlineEnd:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,marginBlock:D,marginBlockStart:D,marginBlockEnd:D,marginInline:D,marginInlineStart:D,marginInlineEnd:D,fontSize:D,backgroundPositionX:D,backgroundPositionY:D,...{rotate:U,pathRotation:U,rotateX:U,rotateY:U,rotateZ:U,scale:N,scaleX:N,scaleY:N,scaleZ:N,skew:U,skewX:U,skewY:U,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:I,originX:_,originY:_,originZ:D},zIndex:ue,fillOpacity:I,strokeOpacity:I,numOctaves:ue},de={...ce,color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,filter:he,WebkitFilter:he,mask:le,WebkitMask:le},pe=t=>de[t],fe=new Set([he,le]);function me(t,e){let s=pe(t);return fe.has(s)||(s=rt),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const ge=(t,e)=>e&&"number"==typeof t?e.transform(t):t,{schedule:ve}=b(queueMicrotask,!1),ye=[...ne,J,rt],be=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),we=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Ve=new WeakMap;function Se(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Me(t){return"string"==typeof t||Array.isArray(t)}const Te=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xe=["initial",...Te];function Ae(t){return Se(t.animate)||xe.some(e=>Me(t[e]))}function Ce(t){return Boolean(Ae(t)||t.variants)}const ke={current:null},Fe={current:!1},Ee="undefined"!=typeof window;const Pe=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Re={};function Be(t){Re=t}function Ie(){return Re}class Ne{scrapeMotionValuesFromProps(t,e,s){return{}}constructor({parent:t,props:e,presenceContext:s,reducedMotionConfig:n,skipAnimations:i,blockInitialAnimation:a,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ot,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=A.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Fe.current||function(){if(Fe.current=!0,Ee)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ke.current=t.matches;t.addEventListener("change",e),e()}else ke.current=!1}(),this.shouldReduceMotion=ke.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),V(this.notifyUpdate),V(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&qt.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:n,times:i,ease:a,duration:r}=e.accelerate,o=new Dt({element:this.current,name:t,keyframes:n,times:i,ease:a,duration:p(r)}),h=s(o);return void this.valueSubscriptions.set(t,()=>{h(),o.cancel()})}const s=Tt.has(t);s&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&w.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),i&&i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Re){const e=Re[t];if(!e)continue;const{isEnabled:s,Feature:n}=e;if(!this.features[t]&&n&&s(this.props)&&(this.features[t]=new n(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const s=this.values.get(t);e!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return void 0===s&&void 0!==e&&(s=_t(null===e?void 0:e,{owner:this}),this.addValue(t,s)),s}readValue(t,e){let s=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var n;return null!=s&&("string"==typeof s&&(h(s)||l(s))?s=parseFloat(s):(n=s,!ye.find(se(n))&&rt.test(e)&&(s=me(t,e))),this.setBaseTarget(t,Qt(s)?s.get():s)),Qt(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let s;if("string"==typeof e||"object"==typeof e){const n=Jt(this.props,e,this.presenceContext?.custom);n&&(s=n[t])}if(e&&void 0!==s)return s;const n=this.getBaseTargetFromProps(this.props,t);return void 0===n||Qt(n)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new d),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){ve.render(this.render)}}const Oe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$e=Mt.length;function Le(t,e,s){const{style:n,vars:i,transformOrigin:a}=t;let r=!1,o=!1;for(const t in e){const s=e[t];if(Tt.has(t))r=!0;else if(k(t))i[t]=s;else{const e=ge(s,ce[t]);t.startsWith("origin")?(o=!0,a[t]=e):n[t]=e}}if(e.transform||(r||s?n.transform=function(t,e,s){let n="",i=!0;for(let a=0;a<$e;a++){const r=Mt[a],o=t[r];if(void 0===o)continue;let h=!0;if("number"==typeof o)h=o===(r.startsWith("scale")?1:0);else{const t=parseFloat(o);h=r.startsWith("scale")?1===t:0===t}if(!h||s){const t=ge(o,ce[r]);h||(i=!1,n+=`${Oe[r]||r}(${t}) `),s&&(e[r]=t)}}const a=t.pathRotation;return a&&(i=!1,n+=`rotate(${ge(a,ce.pathRotation)}) `),n=n.trim(),s?n=s(e,i?"":n):i&&(n="none"),n}(e,t.transform,s):n.transform&&(n.transform="none")),o){const{originX:t="50%",originY:e="50%",originZ:s=0}=a;n.transformOrigin=`${t} ${e} ${s}`}}function Ye(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const We={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!D.test(t))return t;t=parseFloat(t)}return`${Ye(t,e.target.x)}% ${Ye(t,e.target.y)}%`}},Xe={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,i=rt.parse(t);if(i.length>5)return n;const a=rt.createTransformer(t),r="number"!=typeof i[0]?1:0,o=s.x.scale*e.x,h=s.y.scale*e.y;i[0+r]/=o,i[1+r]/=h;const l=ot(o,h,.5);return"number"==typeof i[2+r]&&(i[2+r]/=l),"number"==typeof i[3+r]&&(i[3+r]/=l),a(i)}},je={borderRadius:{...We,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:We,borderTopRightRadius:We,borderBottomLeftRadius:We,borderBottomRightRadius:We,boxShadow:Xe};function ze(t,{layout:e,layoutId:s}){return Tt.has(t)||t.startsWith("origin")||(e||void 0!==s)&&(!!je[t]||"opacity"===t)}function Ke(t,e,s){const n=t.style,i=e?.style,a={};if(!n)return a;for(const e in n)(Qt(n[e])||i&&Qt(i[e])||ze(e,t)||void 0!==s?.getValue(e)?.liveStyle)&&(a[e]=n[e]);return a}const Ue={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ze={offset:"strokeDashoffset",array:"strokeDasharray"};const De=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function qe(t,{attrX:e,attrY:s,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:r=0,...o},h,l,u){if(Le(t,o,l),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:c,style:d}=t;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete c.transformBox);for(const t of De)void 0!==c[t]&&(d[t]=c[t],delete c[t]);void 0!==e&&(c.x=e),void 0!==s&&(c.y=s),void 0!==n&&(c.scale=n),void 0!==i&&function(t,e,s=1,n=0,i=!0){t.pathLength=1;const a=i?Ue:Ze;t[a.offset]=""+-n,t[a.array]=`${e} ${s}`}(c,i,a,r,!1)}const He=t=>"string"==typeof t&&"svg"===t.toLowerCase();function _e(t,e,s){const n=Ke(t,e,s);for(const s in t)if(Qt(t[s])||Qt(e[s])){n[-1!==Mt.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}function Ge(t){return Qt(t)?t.get():t}const Je=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Qe(t){return"string"==typeof t&&!t.includes("-")&&!!(Je.indexOf(t)>-1||/[A-Z]/u.test(t))}const ts=t(null),es=t({});function ss(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}export{h as $,E as A,J as B,rt as C,nt as D,S as E,A as F,V as G,w as H,f as I,n as J,ht as K,v as L,p as M,m as N,o as O,ts as P,ut as Q,Dt as R,es as S,$t as T,Zt as U,u as V,ct as W,qt as X,Ot as Y,Nt as Z,Tt as _,Me as a,Mt as a0,_t as a1,l as a2,me as a3,ie as a4,R as a5,kt as a6,xt as a7,Ne as a8,bt as a9,Vt as aa,k as ab,te as ac,we as ad,pe as ae,xe as af,Te as ag,Z as ah,D as ai,e as aj,s as ak,d as al,M as am,ve as an,be as ao,je as ap,Qt as b,ze as c,Le as d,qe as e,He as f,Qe as g,Ce as h,Ae as i,Se as j,Jt as k,_e as l,Ie as m,Be as n,ee as o,ss as p,c as q,Ge as r,Ke as s,g as t,r as u,ot as v,j as w,G as x,z as y,a as z}; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-max.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-max.js deleted file mode 100644 index ace81a97..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-dom-max.js +++ /dev/null @@ -1 +0,0 @@ -import{q as t,t as e,u as i,v as n,w as s,x as o,y as r,z as a,A as l,B as h,C as u,D as c,E as d,F as m,G as p,H as f,I as y,J as g,K as v,M as x,N as T,O as P,W as w,Q as S,R as E,T as A,U as D,V as b,X as M,Y as k,Z as C,_ as V,$ as L,k as R,a0 as B,a1 as j,b as I,o as O,a2 as F,a3 as U,a4 as z,a5 as W,a6 as $,a7 as N,a8 as G,a9 as H,aa as K,ab as Y,d as X,s as q,ac as _,ad as Z,l as J,e as Q,f as tt,ae as et,a as it,af as nt,j as st,ag as ot,ah as rt,ai as at,aj as lt,ak as ht,al as ut,am as ct,an as dt,ao as mt,r as pt,ap as ft,p as yt,P as gt,L as vt,S as xt,g as Tt}from"./size-rollup-dom-max-assets.js";import{jsx as Pt}from"react/jsx-runtime";import{useContext as wt,useId as St,useEffect as Et,useCallback as At,Component as Dt,Fragment as bt}from"react";const Mt=t=>"object"==typeof t&&null!==t,kt=(...t)=>t.reduce((t,e)=>i=>e(t(i))),Ct=(t,e,i)=>{const n=e-t;return n?(i-t)/n:1},Vt=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function Lt(e,i,n,s){if(e===i&&n===s)return t;const o=t=>function(t,e,i,n,s){let o,r,a=0;do{r=e+(i-e)/2,o=Vt(r,n,s)-t,o>0?i=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(t,0,1,e,n);return t=>0===t||1===t?t:Vt(o(t),i,s)}const Rt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Bt=t=>e=>1-t(1-e),jt=Lt(.33,1.53,.69,.99),It=Bt(jt),Ot=Rt(It),Ft=t=>t>=1?1:(t*=2)<1?.5*It(t):.5*(2-Math.pow(2,-10*(t-1))),Ut=t=>1-Math.sin(Math.acos(t)),zt=Bt(Ut),Wt=Rt(Ut),$t=Lt(.42,0,1,1),Nt=Lt(0,0,.58,1),Gt=Lt(.42,0,.58,1),Ht={linear:t,easeIn:$t,easeInOut:Gt,easeOut:Nt,circIn:Ut,circInOut:Wt,circOut:zt,backIn:It,backInOut:Ot,backOut:jt,anticipate:Ft},Kt=t=>{if(e(t)){i(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,o]=t;return Lt(e,n,s,o)}return"string"==typeof t?(i(void 0!==Ht[t],`Invalid easing type '${t}'`,"invalid-easing-type"),Ht[t]):t};function Yt(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function Xt(t,e){return i=>i>0?e:t}const qt=(t,e,i)=>{const n=t*t,s=i*(e*e-n)+n;return s<0?0:Math.sqrt(s)},_t=[r,s,o];function Zt(t){const e=(i=t,_t.find(t=>t.test(i)));var i;if(a(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let n=e.parse(t);return e===o&&(n=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let s=0,o=0,r=0;if(e/=100){const n=i<.5?i*(1+e):i+e-i*e,a=2*i-n;s=Yt(a,n,t+1/3),o=Yt(a,n,t),r=Yt(a,n,t-1/3)}else s=o=r=i;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:n}}(n)),n}const Jt=(t,e)=>{const i=Zt(t),o=Zt(e);if(!i||!o)return Xt(t,e);const r={...i};return t=>(r.red=qt(i.red,o.red,t),r.green=qt(i.green,o.green,t),r.blue=qt(i.blue,o.blue,t),r.alpha=n(i.alpha,o.alpha,t),s.transform(r))},Qt=new Set(["none","hidden"]);function te(t,e){return i=>n(t,e,i)}function ee(t){return"number"==typeof t?te:"string"==typeof t?l(t)?Xt:h.test(t)?Jt:se:Array.isArray(t)?ie:"object"==typeof t?h.test(t)?Jt:ne:Xt}function ie(t,e){const i=[...t],n=i.length,s=t.map((t,i)=>ee(t)(t,e[i]));return t=>{for(let e=0;e{for(const e in n)i[e]=n[e](t);return i}}const se=(t,e)=>{const i=u.createTransformer(e),n=c(t),s=c(e);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?Qt.has(t)&&!s.values.length||Qt.has(e)&&!n.values.length?function(t,e){return Qt.has(t)?i=>i<=0?t:e:i=>i>=1?e:t}(t,e):kt(ie(function(t,e){const i=[],n={color:0,var:0,number:0};for(let s=0;s{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>f.update(e,t),stop:()=>p(e),now:()=>d.isProcessing?d.timestamp:m.now()}},ae=2e4;function le(t){let e=0;let i=t.next(e);for(;!i.done&&e=ae?1/0:e}const he=100,ue=10,ce=1,de=0,me=800,pe=.3,fe=.3,ye={granular:.01,default:2},ge={granular:.005,default:.5},ve=.01,xe=10,Te=.05,Pe=1;function we(t,e){return t*Math.sqrt(1-e*e)}const Se=.001;const Ee=["duration","bounce"],Ae=["stiffness","damping","mass"];function De(t,e){return e.some(e=>void 0!==t[e])}function be(t){let e={velocity:de,stiffness:he,damping:ue,mass:ce,isResolvedFromDuration:!1,...t};if(!De(t,Ae)&&De(t,Ee))if(e.velocity=0,t.visualDuration){const i=t.visualDuration,n=2*Math.PI/(1.2*i),s=n*n,o=2*g(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:ce,stiffness:s,damping:o}}else{const i=function({duration:t=me,bounce:e=pe,velocity:i=de,mass:n=ce}){let s,o;a(t<=x(xe),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=g(Te,Pe,r),t=g(ve,xe,y(t)),r<1?(s=e=>{const n=e*r,s=n*t,o=n-i,a=we(e,r),l=Math.exp(-s);return Se-o/a*l},o=e=>{const n=e*r*t,o=n*i+i,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-n),h=we(Math.pow(e,2),r);return(-s(e)+Se>0?-1:1)*((o-a)*l)/h}):(s=e=>Math.exp(-e*t)*((e-i)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(i-e)));const l=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(s,o,5/t);if(t=x(t),isNaN(l))return{stiffness:he,damping:ue,duration:t};{const e=Math.pow(l,2)*n;return{stiffness:e,damping:2*r*Math.sqrt(n*e),duration:t}}}({...t,velocity:0});e={...e,...i,mass:ce},e.isResolvedFromDuration=!0}return e}function Me(t=fe,e=pe){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:s}=i;const o=i.keyframes[0],r=i.keyframes[i.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:h,mass:u,duration:c,velocity:d,isResolvedFromDuration:m}=be({...i,velocity:-y(i.velocity||0)}),p=d||0,f=h/(2*Math.sqrt(l*u)),g=r-o,T=y(Math.sqrt(l/u)),P=Math.abs(g)<5;let w,S,E,A,D,b;if(n||(n=P?ye.granular:ye.default),s||(s=P?ge.granular:ge.default),f<1)E=we(T,f),A=(p+f*T*g)/E,w=t=>{const e=Math.exp(-f*T*t);return r-e*(A*Math.sin(E*t)+g*Math.cos(E*t))},D=f*T*A+g*E,b=f*T*g-A*E,S=t=>Math.exp(-f*T*t)*(D*Math.sin(E*t)+b*Math.cos(E*t));else if(1===f){w=t=>r-Math.exp(-T*t)*(g+(p+T*g)*t);const t=p+T*g;S=e=>Math.exp(-T*e)*(T*t*e-p)}else{const t=T*Math.sqrt(f*f-1);w=e=>{const i=Math.exp(-f*T*e),n=Math.min(t*e,300);return r-i*((p+f*T*g)*Math.sinh(n)+t*g*Math.cosh(n))/t};const e=(p+f*T*g)/t,i=f*T*e-g*t,n=f*T*g-e*t;S=e=>{const s=Math.exp(-f*T*e),o=Math.min(t*e,300);return s*(i*Math.sinh(o)+n*Math.cosh(o))}}const M={calculatedDuration:m&&c||null,velocity:t=>x(S(t)),next:t=>{if(!m&&f<1){const e=Math.exp(-f*T*t),i=Math.sin(E*t),o=Math.cos(E*t),l=r-e*(A*i+g*o),h=x(e*(D*i+b*o));return a.done=Math.abs(h)<=n&&Math.abs(r-l)<=s,a.value=a.done?r:l,a}const e=w(t);if(m)a.done=t>=c;else{const i=x(S(t));a.done=Math.abs(i)<=n&&Math.abs(r-e)<=s}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(le(M),ae),e=v(e=>M.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return M}Me.applyToOptions=t=>{const e=function(t,e=100,i){const n=i({...t,keyframes:[0,e]}),s=Math.min(le(n),ae);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:y(s)}}(t,100,Me);return t.ease=e.ease,t.duration=x(e.duration),t.type="keyframes",t};function ke(t,e,i){const n=Math.max(e-5,0);return T(i-t(n),e-n)}function Ce({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:h=.5,restSpeed:u}){const c=t[0],d={done:!1,value:c},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)-p*Math.exp(-t/n),v=t=>y+g(t),x=t=>{const e=g(t),i=v(t);d.done=Math.abs(e)<=h,d.value=d.done?y:i};let T,P;const w=t=>{var e;(e=d.value,void 0!==a&&el)&&(T=t,P=Me({keyframes:[d.value,m(d.value)],velocity:ke(v,t,d.value),damping:s,stiffness:o,restDelta:h,restSpeed:u}))};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return P||void 0!==T||(e=!0,x(t),w(t)),void 0!==T&&t>=T?P.next(t-T):(!e&&x(t),d)}}}function Ve(e,n,{clamp:s=!0,ease:o,mixer:r}={}){const a=e.length;if(i(a===n.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>n[0];if(2===a&&n[0]===n[1])return()=>n[1];const l=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),n=[...n].reverse());const h=function(e,i,n){const s=[],o=n||P.mix||oe,r=e.length-1;for(let n=0;n{if(l&&t1)for(;ic(g(e[0],e[a-1],t)):c}function Le(t){const e=[0];return function(t,e){const i=t[t.length-1];for(let s=1;s<=e;s++){const o=Ct(0,e,s);t.push(n(i,1,o))}}(e,t.length-1),e}function Re({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(n)?n.map(Kt):Kt(n),o={done:!1,value:e[0]},r=function(t,e){return t.map(t=>t*e)}(i&&i.length===e.length?i:Le(e),t),a=Ve(r,e,{ease:Array.isArray(s)?s:(l=e,h=s,l.map(()=>h||Gt).splice(0,l.length-1))});var l,h;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const Be={decay:Ce,inertia:Ce,tween:Re,keyframes:Re,spring:Me};function je(t){"string"==typeof t.type&&(t.type=Be[t.type])}const Ie=t=>t/100;class Oe extends w{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==m.now()&&this.tick(m.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;je(t);const{type:e=Re,repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Re;a!==Re&&"number"!=typeof r[0]&&(this.mixKeyframes=kt(Ie,oe(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=le(l));const{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:i,totalDuration:n,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return i.next(0);const{delay:l=0,keyframes:h,repeat:u,repeatType:c,repeatDelay:d,type:m,onUpdate:p,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>n;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let x,T=this.currentTime,P=i;if(u){const t=Math.min(this.currentTime,n)/r;let e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,e=Math.min(e,u+1);Boolean(e%2)&&("reverse"===c?(i=1-i,d&&(i-=d/r)):"mirror"===c&&(P=o)),T=g(0,1,i)*r}v?(this.delayState.value=h[0],x=this.delayState):x=P.next(T),s&&!v&&(x.value=s(x.value));let{done:w}=x;v||null===a||(w=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return E&&m!==Ce&&(x.value=S(h,this.options,f,this.speed)),p&&p(x.value),E&&this.finish(),x}then(t,e){return this.finished.then(t,e)}get duration(){return y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+y(t)}get time(){return y(this.currentTime)}set time(t){t=x(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return ke(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(m.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=y(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=re,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(m.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Fe={anticipate:Ft,backInOut:Ot,circInOut:Wt};function Ue(t){"string"==typeof t.ease&&t.ease in Fe&&(t.ease=Fe[t.ease])}class ze extends E{constructor(t){Ue(t),je(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:i,onComplete:n,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new Oe({...o,autoplay:!1}),a=Math.max(10,m.now()-this.startTime),l=g(0,10,a-10),h=r.sample(a).value,{name:u}=this.options;s&&u&&A(s,u,h),e.setWithVelocity(r.sample(Math.max(0,a-l)).value,h,l),r.stop()}}const We=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!u.test(t)&&"0"!==t||t.startsWith("url(")));function $e(t){t.duration=0,t.type="keyframes"}const Ne=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Ge=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),He=b(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ke(t){const{motionValue:e,name:i,repeatDelay:n,repeatType:s,damping:o,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:u}=e.owner.getProps();return He()&&i&&(M.has(i)||Ge.has(i)&&function(t){for(let e=0;e{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=m.now();const c={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:h,...u},d=h?.KeyframeResolver||k;this.keyframeResolver=new d(r,(t,e,i)=>this.onKeyframesResolved(t,e,c,!i),a,l,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,i,n,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:l,delay:h,isHandoff:u,onUpdate:c}=n;this.resolvedAt=m.now();let d=!0;(function(t,e,i,n){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=We(s,e),l=We(o,e);return a(r===l,`You are trying to animate ${e} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!(!r||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let i=0;i40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:i,...n,keyframes:e},f=d&&!u&&Ke(p),y=p.motionValue?.owner?.current;let g;if(f)try{g=new ze({...p,element:y})}catch{g=new Oe(p)}else g=new Oe(p);g.finished.then(()=>{this.notifyFinished()}).catch(t),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),C()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Xe(t,e,i,n=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*n;return"function"==typeof i?i(o,r):1===s?o*n:a-o*n}function qe(t,e){if(t?.inherit&&e){const{inherit:i,...n}=t;return{...e,...n}}return t}function _e(t,e){const i=t?.[e]??t?.default??t;return i!==t?qe(i,t):i}const Ze={type:"spring",stiffness:500,damping:25,restSpeed:10},Je={type:"keyframes",duration:.8},Qe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ti=(t,{keyframes:e})=>e.length>2?Je:V.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Ze:Qe,ei=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const ii=(t,e,i,n={},s,o)=>r=>{const a=_e(n,t)||{},l=a.delay||n.delay||0;let{elapsed:h=0}=n;h-=x(l);const u={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function(t){for(const e in t)if(!ei.has(e))return!0;return!1})(a)||Object.assign(u,ti(t,u)),u.duration&&(u.duration=x(u.duration)),u.repeatDelay&&(u.repeatDelay=x(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let c=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&($e(u),0===u.delay&&(c=!0)),(P.instantAnimations||P.skipAnimations||s?.shouldSkipAnimations||a.skipAnimations)&&(c=!0,$e(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,c&&!o&&void 0!==e.get()){const t=S(u.keyframes,a);if(void 0!==t)return void f.update(()=>{u.onUpdate(t),u.onComplete()})}return a.isSync?new Oe(u):new Ye(u)},ni=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function si(t,e,n=1){i(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=function(t){const e=ni.exec(t);if(!e)return[,];const[,i,n,s]=e;return[`--${i??n}`,s]}(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return L(t)?parseFloat(t):t}return l(o)?si(o,e,n+1):o}function oi(t,e,i){const n=t.getProps();return R(n,e,void 0!==i?i:n.custom,t)}const ri=new Set(["width","height","top","left","right","bottom",...B]),ai=t=>Array.isArray(t);function li(t,e,i){t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,j(i))}function hi(t){return ai(t)?t[t.length-1]||0:t}function ui(t,e){const i=t.getValue("willChange");if(n=i,Boolean(I(n)&&n.add))return i.add(e);if(!i&&P.WillChange){const i=new P.WillChange("auto");t.addValue("willChange",i),i.add(e)}var n}function ci(t){return t.props[O]}function di({protectedKeys:t,needsAnimating:e},i){const n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}function mi(t,e,{delay:i=0,transitionOverride:n,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?qe(o,l):l;const h=o?.reduceMotion,u=o?.skipAnimations;n&&(o=n);const c=[],d=s&&t.animationState&&t.animationState.getState()[s],m=o?.path;m&&m.animateVisualElement(t,a,o,i,c);for(const e in a){const n=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&di(d,e))continue;const r={delay:i,..._e(o||{},e)};u&&(r.skipAnimations=!0);const l=n.get();if(void 0!==l&&!n.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){f.update(()=>n.set(s));continue}let m=!1;if(window.MotionHandoffAnimation){const i=ci(t);if(i){const t=window.MotionHandoffAnimation(i,e,f);null!==t&&(r.startTime=t,m=!0)}}ui(t,e);const p=h??t.shouldReduceMotion;n.start(ii(e,n,s,p&&ri.has(e)?{type:!1}:r,t,m));const y=n.animation;y&&c.push(y)}if(r){const e=()=>f.update(()=>{r&&function(t,e){const i=oi(t,e);let{transitionEnd:n={},transition:s={},...o}=i||{};o={...o,...n};for(const e in o)li(t,e,hi(o[e]))}(t,r)});c.length?Promise.all(c).then(e):e()}return c}function pi(t,e,i={}){const n=oi(t,e,"exit"===i.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(s=i.transitionOverride);const o=n?()=>Promise.all(mi(t,n,i)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(n=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,i=0,n=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(pi(l,e,{...r,delay:i+("function"==typeof n?0:n)+Xe(t.variantChildren,l,n,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,n,o,r,a,i)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(i.delay)])}function fi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||F(t))}const yi=new Set(["auto","none","0"]);class gi extends k{constructor(t,e,i,n,s){super(t,e,i,n,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}function vi(t,e,i){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const n=i?.[t]??e.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(t=>null!=t)}const xi={x:!1,y:!1};function Ti(){return xi.x||xi.y}function Pi(t,e){const i=vi(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}function wi(t,e,i={}){const[n,s,o]=Pi(t,i);return n.forEach(t=>{let i,n=!1,o=!1;const r=e=>{i&&(i(e),i=void 0),t.removeEventListener("pointerleave",l)},a=t=>{n=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(n?o=!0:r(t))};t.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||Ti())return;o=!1;const r=e(t,n);"function"==typeof r&&(i=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o}const Si=(t,e)=>!!e&&(t===e||Si(t,e.parentElement)),Ei=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Ai=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Di=new Set(["INPUT","SELECT","TEXTAREA"]);const bi=new WeakSet;function Mi(t){return e=>{"Enter"===e.key&&t(e)}}function ki(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ci(t){return Ei(t)&&!Ti()}const Vi=new WeakSet;function Li(t,e,i={}){const[n,s,o]=Pi(t,i),r=t=>{const n=t.currentTarget;if(!Ci(t))return;if(Vi.has(t))return;bi.add(n),i.stopPropagation&&Vi.add(t);const o=e(n,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),bi.has(n)&&bi.delete(n),Ci(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,n===window||n===document||i.useGlobalTarget||Si(n,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return n.forEach(t=>{var e;(i.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Mt(e=t)&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(t.addEventListener("focus",t=>((t,e)=>{const i=t.currentTarget;if(!i)return;const n=Mi(()=>{if(bi.has(i))return;ki(i,"down");const t=Mi(()=>{ki(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>ki(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)})(t,s)),function(t){return Ai.has(t.tagName)||!0===t.isContentEditable}(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function Ri(t){return Mt(t)&&"ownerSVGElement"in t}const Bi=new WeakMap;let ji;const Ii=(t,e,i)=>(n,s)=>s&&s[0]?s[0][t+"Size"]:Ri(n)&&"getBBox"in n?n.getBBox()[e]:n[i],Oi=Ii("inline","width","offsetWidth"),Fi=Ii("block","height","offsetHeight");function Ui({target:t,borderBoxSize:e}){Bi.get(t)?.forEach(i=>{i(t,{get width(){return Oi(t,e)},get height(){return Fi(t,e)}})})}function zi(t){t.forEach(Ui)}function Wi(t,e){ji||"undefined"!=typeof ResizeObserver&&(ji=new ResizeObserver(zi));const i=vi(t);return i.forEach(t=>{let i=Bi.get(t);i||(i=new Set,Bi.set(t,i)),i.add(e),ji?.observe(t)}),()=>{i.forEach(t=>{const i=Bi.get(t);i?.delete(e),i?.size||ji?.unobserve(t)})}}const $i=new Set;let Ni;function Gi(t){return $i.add(t),Ni||(Ni=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};$i.forEach(e=>e(t))},window.addEventListener("resize",Ni)),()=>{$i.delete(t),$i.size||"function"!=typeof Ni||(window.removeEventListener("resize",Ni),Ni=void 0)}}function Hi(t,e){return"function"==typeof t?Gi(t):Wi(t,e)}class Ki extends G{constructor(){super(...arguments),this.KeyframeResolver=gi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const i=t.style;return i?i[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;I(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class Yi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Xi({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function qi(t){return void 0===t||1===t}function _i({scale:t,scaleX:e,scaleY:i}){return!qi(t)||!qi(e)||!qi(i)}function Zi(t){return _i(t)||Ji(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ji(t){return Qi(t.x)||Qi(t.y)}function Qi(t){return t&&"0%"!==t}function tn(t,e,i){return i+e*(t-i)}function en(t,e,i,n,s){return void 0!==s&&(t=tn(t,s,n)),tn(t,i,n)+e}function nn(t,e=0,i=1,n,s){t.min=en(t.min,e,i,n,s),t.max=en(t.max,e,i,n,s)}function sn(t,{x:e,y:i}){nn(t.x,e.translate,e.scale,e.originPoint),nn(t.y,i.translate,i.scale,i.originPoint)}const on=.999999999999,rn=1.0000000000001;function an(t,e){t.min+=e,t.max+=e}function ln(t,e,i,s,o=.5){nn(t,e,i,n(t.min,t.max,o),s)}function hn(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function un(t,e,i){const n=i??t;ln(t.x,hn(e.x,n.x),e.scaleX,e.scale,e.originX),ln(t.y,hn(e.y,n.y),e.scaleY,e.scale,e.originY)}function cn(t,e){return Xi(function(t,e){if(!e)return t;const i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}function dn(t,{style:e,vars:i},n,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,n),i)o.setProperty(r,i[r])}class mn extends Ki{constructor(){super(...arguments),this.type="html",this.renderInstance=dn}readValueFromInstance(t,e){if(V.has(e))return this.projection?.isProjecting?H(e):K(t,e);{const n=(i=t,window.getComputedStyle(i)),s=(Y(e)?n.getPropertyValue(e):n[e])||0;return"string"==typeof s?s.trim():s}var i}measureInstanceViewportBox(t,{transformPagePoint:e}){return cn(t,e)}build(t,e,i){X(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return q(t,e,i)}}const pn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class fn extends Ki{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(V.has(e)){const t=et(e);return t&&t.default||0}return e=pn.has(e)?e:_(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return J(t,e,i)}build(t,e,i){Q(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){!function(t,e,i,n){dn(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(pn.has(i)?i:_(i),e.attrs[i])}(t,e,0,n)}mount(t){this.isSVGTag=tt(t.tagName),super.mount(t)}}const yn=nt.length;function gn(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&gn(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let i=0;iPromise.all(e.map(({animation:e,options:i})=>function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>pi(t,e,i));n=Promise.all(s)}else if("string"==typeof e)n=pi(t,e,i);else{const s="function"==typeof e?oi(t,e,i.custom):e;n=Promise.all(mi(t,s,i))}return n.then(()=>{t.notify("AnimationComplete",e)})}(t,e,i)))}function wn(t){let e=Pn(t),i=An(),n=!0,s=!1;const o=e=>(i,n)=>{const s=oi(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function r(r){const{props:a}=t,l=gn(t.parent)||{},h=[],u=new Set;let c={},d=1/0;for(let e=0;ed&&y,P=!1;const w=Array.isArray(f)?f:[f];let S=w.reduce(o(m),{});!1===g&&(S={});const{prevResolvedValues:E={}}=p,A={...E,...S},D=e=>{T=!0,u.has(e)&&(P=!0,u.delete(e)),p.needsAnimating[e]=!0;const i=t.getValue(e);i&&(i.liveStyle=!1)};for(const t in A){const e=S[t],i=E[t];if(c.hasOwnProperty(t))continue;let n=!1;n=ai(e)&&ai(i)?!vn(e,i)||x:e!==i,n?null!=e?D(t):u.add(t):void 0!==e&&u.has(t)?D(t):p.protectedKeys[t]=!0}p.prevProp=f,p.prevResolvedValues=S,p.isActive&&(c={...c,...S}),(n||s)&&t.blockInitialAnimation&&(T=!1);const b=v&&x;T&&(!b||P)&&h.push(...w.map(e=>{const i={type:m};if("string"==typeof e&&(n||s)&&!b&&t.manuallyAnimateOnMount&&t.parent){const{parent:n}=t,s=oi(n,e);if(n.enteringChildren&&s){const{delayChildren:e}=s.transition||{};i.delay=Xe(n.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(u.size){const e={};if("boolean"!=typeof a.initial){const i=oi(t,Array.isArray(a.initial)?a.initial[0]:a.initial);i&&i.transition&&(e.transition=i.transition)}u.forEach(i=>{const n=t.getBaseTarget(i),s=t.getValue(i);s&&(s.liveStyle=!0),e[i]=n??null}),h.push({animation:e})}let m=Boolean(h.length);return!n||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(m=!1),n=!1,s=!1,m?e(h):Promise.resolve()}return{animateChanges:r,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;const s=r(e);for(const t in i)i[t].protectedKeys={};return s},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=An(),s=!0}}}function Sn(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!vn(e,t)}function En(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function An(){return{animate:En(!0),whileInView:En(),whileHover:En(),whileTap:En(),whileDrag:En(),whileFocus:En(),exit:En()}}function Dn(t,e){t.min=e.min,t.max=e.max}function bn(t,e){Dn(t.x,e.x),Dn(t.y,e.y)}function Mn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function kn(t){return t.max-t.min}function Cn(t,e,i,s=.5){t.origin=s,t.originPoint=n(e.min,e.max,t.origin),t.scale=kn(i)/kn(e),t.translate=n(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Vn(t,e,i,n){Cn(t.x,e.x,i.x,n?n.originX:void 0),Cn(t.y,e.y,i.y,n?n.originY:void 0)}function Ln(t,e,i,s=0){const o=s?n(i.min,i.max,s):i.min;t.min=o+e.min,t.max=t.min+kn(e)}function Rn(t,e,i,s=0){const o=s?n(i.min,i.max,s):i.min;t.min=e.min-o,t.max=t.min+kn(e)}function Bn(t,e,i,n){Rn(t.x,e.x,i.x,n?.x),Rn(t.y,e.y,i.y,n?.y)}function jn(t,e,i,n,s){return t=tn(t-=e,1/i,n),void 0!==s&&(t=tn(t,1/s,n)),t}function In(t,e,[i,s,o],r,a){!function(t,e=0,i=1,s=.5,o,r=t,a=t){rt.test(e)&&(e=parseFloat(e),e=n(a.min,a.max,e/100)-a.min);if("number"!=typeof e)return;let l=n(r.min,r.max,s);t===r&&(l-=e),t.min=jn(t.min,e,i,l,o),t.max=jn(t.max,e,i,l,o)}(t,e[i],e[s],e[o],e.scale,r,a)}const On=["x","scaleX","originX"],Fn=["y","scaleY","originY"];function Un(t,e,i,n){In(t.x,e,On,i?i.x:void 0,n?n.x:void 0),In(t.y,e,Fn,i?i.y:void 0,n?n.y:void 0)}function zn(t){return 0===t.translate&&1===t.scale}function Wn(t){return zn(t.x)&&zn(t.y)}function $n(t,e){return t.min===e.min&&t.max===e.max}function Nn(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Gn(t,e){return Nn(t.x,e.x)&&Nn(t.y,e.y)}function Hn(t){return kn(t.x)/kn(t.y)}function Kn(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Yn(t){return[t("x"),t("y")]}const Xn=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],qn=Xn.length,_n=t=>"string"==typeof t?parseFloat(t):t,Zn=t=>"number"==typeof t||at.test(t);function Jn(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Qn=es(0,.5,zt),ts=es(.5,.95,t);function es(t,e,i){return n=>ne?1:i(Ct(t,e,n))}function is(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}const ns=(t,e)=>t.depth-e.depth;class ss{constructor(){this.children=[],this.isDirty=!1}add(t){lt(this.children,t),this.isDirty=!0}remove(t){ht(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ns),this.isDirty=!1,this.children.forEach(t)}}class os{constructor(){this.members=[]}add(t){lt(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const n=i.instance;n&&!1!==n.isConnected||i.snapshot||(ht(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(ht(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:n}=i.options,{layoutDependency:s}=t.options;void 0!==n&&n===s||(t.resumeFrom=i,e&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const rs={hasAnimatedSinceResize:!0,hasEverUpdated:!1},as=["","X","Y","Z"];let ls=0;function hs(t,e,i,n){const{latestValues:s}=e;s[t]&&(i[t]=s[t],e.setStaticValue(t,0),n&&(n[t]=0))}function us(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const i=ci(e);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(i,"transform",f,!(e||n))}const{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&us(n)}function cs({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},i=e?.()){this.id=ls++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ps),this.nodes.forEach(Ss),this.nodes.forEach(Es),this.nodes.forEach(fs)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;f.read(()=>{n=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==n&&(n=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){const i=m.now(),n=({timestamp:s})=>{const o=s-i;o>=e&&(p(n),t(o-e))};return f.setup(n,!0),()=>p(n)}(s,250),rs.hasAnimatedSinceResize&&(rs.hasAnimatedSinceResize=!1,this.nodes.forEach(ws)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&o&&(n||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||Cs,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Gn(this.targetLayout,n),h=!e&&i;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={..._e(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h,e.path)}else e||ws(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),p(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(As),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&us(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||kn(this.snapshot.measuredBox.x)||kn(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;ton&&(e.x=1),e.yon&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=Z());const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(Mn(this.prevProjectionDelta.x,this.projectionDelta.x),Mn(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Vn(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Kn(this.projectionDelta.x,this.prevProjectionDelta.x)&&Kn(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=mt(),this.projectionDelta=mt(),this.projectionDeltaWithTransform=mt()}setAnimationOrigin(t,e=!1,i){const s=this.snapshot,o=s?s.latestValues:{},r={...this.latestValues},a=mt();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const l=Z(),h=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),c=!u||u.members.length<=1,d=Boolean(h&&!c&&!0===this.options.crossfade&&!this.path.some(ks));let m;this.animationProgress=0;const p=i?.interpolateProjection(t);this.mixTargetDelta=e=>{const i=e/1e3,s=p?.(i);var u,f,y,g,v,x;s?(a.x.translate=s.x,a.x.scale=n(t.x.scale,1,i),a.x.origin=t.x.origin,a.x.originPoint=t.x.originPoint,a.y.translate=s.y,a.y.scale=n(t.y.scale,1,i),a.y.origin=t.y.origin,a.y.originPoint=t.y.originPoint):(bs(a.x,t.x,i),bs(a.y,t.y,i)),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bn(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),y=this.relativeTarget,g=this.relativeTargetOrigin,v=l,x=i,Ms(y.x,g.x,v.x,x),Ms(y.y,g.y,v.y,x),m&&(u=this.relativeTarget,f=m,$n(u.x,f.x)&&$n(u.y,f.y))&&(this.isProjectionDirty=!1),m||(m=Z()),bn(m,this.relativeTarget)),h&&(this.animationValues=r,function(t,e,i,s,o,r){o?(t.opacity=n(0,i.opacity??1,Qn(s)),t.opacityExit=n(e.opacity??1,0,ts(s))):r&&(t.opacity=n(e.opacity??1,i.opacity??1,s));for(let o=0;o{rs.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=j(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(t,e,i){const n=I(t)?t:j(t);return n.start(ii("",n,e,i)),n.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:i,layout:n,latestValues:s}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&Bs(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||Z();const e=kn(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;const n=kn(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}bn(e,i),un(e,s),Vn(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new os);this.sharedNodes.get(t).add(e);const i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){const n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;const n={};i.z&&hs("z",t,n,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(gs),this.root.sharedNodes.clear()}}}function ds(t){t.updateLayout()}function ms(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:n}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)Yn(t=>{const n=o?e.measuredBox[t]:e.layoutBox[t],s=kn(n);n.min=i[t].min,n.max=n.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";Dn(o?e.measuredBox[t]:e.layoutBox[t],i[t])}else Bs(s,e.layoutBox,i)&&Yn(n=>{const s=o?e.measuredBox[n]:e.layoutBox[n],r=kn(i[n]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+r)});const r=mt();Vn(r,i,e.layoutBox);const a=mt();o?Vn(a,t.applyTransform(n,!0),e.measuredBox):Vn(a,i,e.layoutBox);const l=!Wn(r);let h=!1;if(!t.resumeFrom){const n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:s,layout:o}=n;if(s&&o){const r=t.options.layoutAnchor||void 0,a=Z();Bn(a,e.layoutBox,s.layoutBox,r);const l=Z();Bn(l,i,o.layoutBox,r),Gn(a,l)||(h=!0),n.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ps(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function fs(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ys(t){t.clearSnapshot()}function gs(t){t.clearMeasurements()}function vs(t){t.isLayoutDirty=!0,t.updateLayout()}function xs(t){t.isLayoutDirty=!1}function Ts(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Ps(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ws(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ss(t){t.resolveTargetDelta()}function Es(t){t.calcProjection()}function As(t){t.resetSkewAndRotation()}function Ds(t){t.removeLeadSnapshot()}function bs(t,e,i){t.translate=n(e.translate,0,i),t.scale=n(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function Ms(t,e,i,s){t.min=n(e.min,i.min,s),t.max=n(e.max,i.max,s)}function ks(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Cs={duration:.45,ease:[.4,0,.1,1]},Vs=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ls=Vs("applewebkit/")&&!Vs("chrome/")?Math.round:t;function Rs(t){t.min=Ls(t.min),t.max=Ls(t.max)}function Bs(t,e,i){return"position"===t||"preserve-aspect"===t&&(n=Hn(e),s=Hn(i),o=.2,!(Math.abs(n-s)<=o));var n,s,o}function js(t){return t!==t.root&&t.scroll?.wasRoot}const Is=cs({attachResizeListener:(t,e)=>is(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Os={current:void 0},Fs=cs({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Os.current){const t=new Is({});t.mount(window),t.setOptions({layoutScroll:!0}),Os.current=t}return Os.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function Us(t){return{point:{x:t.pageX,y:t.pageY}}}function zs(t,e,i,n){return is(t,e,(t=>e=>Ei(e)&&t(e,Us(e)))(i),n)}const Ws=({current:t})=>t?t.ownerDocument.defaultView:null,$s=(t,e)=>Math.abs(t-e);const Ns=new Set(["auto","scroll"]);class Gs{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Hs(this.lastRawMoveEventInfo,this.transformPagePoint));const t=Ys(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){const i=$s(t.x,e.x),n=$s(t.y,e.y);return Math.sqrt(i**2+n**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!i)return;const{point:n}=t,{timestamp:s}=d;this.history.push({...n,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=Hs(e,this.transformPagePoint),f.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:i,onSessionEnd:n,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ys("pointercancel"===t.type?this.lastMoveEventInfo:Hs(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,o),n&&n(t,o)},!Ei(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=n||window;const a=Hs(Us(t),this.transformPagePoint),{point:l}=a,{timestamp:h}=d;this.history=[{...l,timestamp:h}];const{onSessionStart:u}=e;u&&u(t,Ys(a,this.history)),this.removeListeners=kt(zs(this.contextWindow,"pointermove",this.handlePointerMove),zs(this.contextWindow,"pointerup",this.handlePointerUp),zs(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(Ns.has(t.overflowX)||Ns.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const i=t===window,n=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s=n.x-e.x,o=n.y-e.y;0===s&&0===o||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,n),f.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),p(this.updatePoint)}}function Hs(t,e){return e?{point:e(t.point)}:t}function Ks(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ys({point:t},e){return{point:t,delta:Ks(t,qs(e)),offset:Ks(t,Xs(e)),velocity:_s(e,.1)}}function Xs(t){return t[0]}function qs(t){return t[t.length-1]}function _s(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null;const s=qs(t);for(;i>=0&&(n=t[i],!(s.timestamp-n.timestamp>x(e)));)i--;if(!n)return{x:0,y:0};n===t[0]&&t.length>2&&s.timestamp-n.timestamp>2*x(e)&&(n=t[1]);const o=y(s.timestamp-n.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-n.x)/o,y:(s.y-n.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Zs(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function Js(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min{e&&this.snapToCursor(Us(t).point),this.stopAnimation()},onStart:(t,e)=>{const{drag:i,dragPropagation:n,onDragStart:s}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=i)||"y"===o?xi[o]?null:(xi[o]=!0,()=>{xi[o]=!1}):xi.x||xi.y?null:(xi.x=xi.y=!0,()=>{xi.x=xi.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Yn(t=>{let e=this.getAxisMotionValue(t).get()||0;if(rt.test(e)){const{projection:i}=this.visualElement;if(i&&i.layout){const n=i.layout.layoutBox[t];if(n){e=kn(n)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&f.update(()=>s(t,e),!1,!0),ui(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:i,dragDirectionLock:n,onDirectionLock:s,onDrag:o}=this.getProps();if(!i&&!this.openDragLock)return;const{offset:r}=e;if(n&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let i=null;Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x");return i}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&f.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:i,contextWindow:Ws(this.visualElement),element:this.visualElement.current})}stop(t,e){const i=t||this.latestPointerEvent,n=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!n||!i)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&f.postRender(()=>r(i,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,i){const{drag:s}=this.getProps();if(!i||!oo(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:i},s){return void 0!==e&&ti&&(t=s?n(i,t,s.max):Math.min(t,i)),t}(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&yt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(t,{top:e,left:i,bottom:n,right:s}){return{x:Zs(t.x,i,s),y:Zs(t.y,e,n)}}(i.layoutBox,t),this.elastic=function(t=Qs){return!1===t?t=0:!0===t&&(t=Qs),{x:to(t,"left","right"),y:to(t,"top","bottom")}}(e),n!==this.constraints&&!yt(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&Yn(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!yt(t))return!1;const n=t.current;i(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const o=function(t,e,i){const n=cn(t,i),{scroll:s}=e;return s&&(an(n.x,s.offset.x),an(n.y,s.offset.y)),n}(n,s.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:Js(t.x,e.x),y:Js(t.y,e.y)}}(s.layout.layoutBox,o);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(r));this.hasMutatedConstraints=!!t,t&&(r=Xi(t))}return r}startAnimation(t){const{drag:e,dragMomentum:i,dragElastic:n,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Yn(r=>{if(!oo(r,e,this.currentDirection))return;let l=a&&a[r]||{};!0!==o&&o!==r||(l={min:0,max:0});const h=n?200:1e6,u=n?40:1e7,c={type:"inertia",velocity:i?t[r]:0,bounceStiffness:h,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,c)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const i=this.getAxisMotionValue(t);return ui(this.visualElement,t),i.start(ii(t,i,0,e,this.visualElement,!1))}stopAnimation(){Yn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[e];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Yn(e=>{const{drag:i}=this.getProps();if(!oo(e,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(e);if(s&&s.layout){const{min:i,max:r}=s.layout.layoutBox[e],a=o.get()||0;o.set(t[e]-n(i,r,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!yt(e)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Yn(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const i=e.get();s[t]=function(t,e){let i=.5;const n=kn(t),s=kn(e);return s>n?i=Ct(e.min,e.max-n,t.min):n>s&&(i=Ct(t.min,t.max-s,e.min)),g(0,1,i)}({min:i,max:i},this.constraints[t])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Yn(e=>{if(!oo(e,t,null))return;const i=this.getAxisMotionValue(e),{min:o,max:r}=this.constraints[e];i.set(n(o,r,s[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;io.set(this.visualElement,this);const t=this.visualElement.current,e=zs(t,"pointerdown",e=>{const{drag:i,dragListener:n=!0}=this.getProps(),s=e.target,o=s!==t&&function(t){return Di.has(t.tagName)||!0===t.isContentEditable}(s);i&&n&&!o&&this.start(e)});let i;const n=()=>{const{dragConstraints:e}=this.getProps();yt(e)&&e.current&&(this.constraints=this.resolveRefConstraints(),i||(i=function(t,e,i){const n=Hi(t,so(i)),s=Hi(e,so(i));return()=>{n(),s()}}(t,e.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),f.read(n);const r=is(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Yn(e=>{const i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),e(),o(),a&&a(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:s=!1,dragElastic:o=Qs,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function so(t){let e=!0;return()=>{e?e=!1:t()}}function oo(t,e,i){return!(!0!==e&&e!==t||null!==i&&i!==t)}const ro=t=>(e,i)=>{t&&f.update(()=>t(e,i),!1,!0)};let ao=!1;class lo extends Dt{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),i&&i.register&&n&&i.register(s),ao&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:i,drag:n,isPresent:s}=this.props,{projection:o}=i;return o?(o.isPresent=s,t.layoutDependency!==e&&o.setOptions({...o.options,layoutDependency:e}),ao=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||f.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:t,layoutAnchor:e}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=e,i.root.didUpdate(),dt.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;ao=!0,n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ho(t){const[e,i]=function(t=!0){const e=wt(gt);if(null===e)return[!0,null];const{isPresent:i,onExitComplete:n,register:s}=e,o=St();Et(()=>{if(t)return s(o)},[t]);const r=At(()=>t&&n&&n(o),[o,n,t]);return!i&&n?[!1,r]:[!0]}(),n=wt(vt);return Pt(lo,{...t,layoutGroup:n,switchLayoutGroup:wt(xt),isPresent:e,safeToRemove:i})}const uo={pan:{Feature:class extends Yi{constructor(){super(...arguments),this.removePointerDownListener=t}onPointerDown(t){this.session=new Gs(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ws(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:ro(t),onStart:ro(e),onMove:ro(i),onEnd:(t,e)=>{delete this.session,n&&f.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=zs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Yi{constructor(e){super(e),this.removeGroupControls=t,this.removeListeners=t,this.controls=new no(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||t}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Fs,MeasureLayout:ho}},co={layout:{ProjectionNode:Fs,MeasureLayout:ho}};let mo=0;const po={animation:{Feature:class extends Yi{constructor(t){super(t),t.animationState||(t.animationState=wn(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();st(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Yi{constructor(){super(...arguments),this.id=mo++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&!1===i){if(this.isExitComplete){const{initial:t,custom:e}=this.node.getProps();if("string"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)){const i=oi(this.node,t,e);if(i){const{transition:t,transitionEnd:e,...n}=i;for(const t in n)this.node.getValue(t)?.jump(n[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function fo(t,e,i){const{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);const s=n["onHover"+i];s&&f.postRender(()=>s(e,Us(e)))}function yo(t,e,i){const{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);const s=n["onTap"+("End"===i?"":i)];s&&f.postRender(()=>s(e,Us(e)))}const go=new WeakMap,vo=new WeakMap,xo=t=>{const e=go.get(t.target);e&&e(t)},To=t=>{t.forEach(xo)};function Po(t,e,i){const n=function({root:t,...e}){const i=t||document;vo.has(i)||vo.set(i,{});const n=vo.get(i),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(To,{root:t,...e})),n[s]}(e);return go.set(t,i),n.observe(t),()=>{go.delete(t),n.unobserve(t)}}const wo={some:0,all:1};const So={renderer:(t,e)=>e.isSVG??Tt(t)?new fn(e):new mn(e,{allowProjection:t!==bt}),...po,...{inView:{Feature:class extends Yi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:wo[n]};this.stopObserver=Po(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),o=e?i:n;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends Yi{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:i}=this.node.props;this.unmount=Li(t,(t,e)=>(yo(this.node,e,"Start"),(t,{success:e})=>yo(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===i?.tap})}unmount(){}}},focus:{Feature:class extends Yi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=kt(is(this.node.current,"focus",()=>this.onFocus()),is(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Yi{mount(){const{current:t}=this.node;t&&(this.unmount=wi(t,(t,e)=>(fo(this.node,e,"Start"),t=>fo(this.node,t,"End"))))}unmount(){}}}}},Eo={...So,...uo,...co};export{Eo as domMax}; diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-m.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-m.js deleted file mode 100644 index 2380dcd5..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-m.js +++ /dev/null @@ -1,2 +0,0 @@ -import{jsxs as t,jsx as n}from"react/jsx-runtime";import{createContext as r,useContext as e,useMemo as o,Fragment as a,createElement as s,useRef as i,useInsertionEffect as l,useCallback as u,useLayoutEffect as c,useEffect as f,forwardRef as d}from"react";const p=(t,n,r)=>r>n?n:rt,isStatic:!1,reducedMotion:"never"}),y=r({}),v=(t=>n=>"string"==typeof n&&n.startsWith(t))("--"),b={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},w={...b,transform:t=>p(0,1,t)},S={...b,default:1},x=t=>Math.round(1e5*t)/1e5,R=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const k=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,B=(t,n)=>r=>Boolean("string"==typeof r&&k.test(r)&&r.startsWith(t)||n&&!function(t){return null==t}(r)&&Object.prototype.hasOwnProperty.call(r,n)),T=(t,n,r)=>e=>{if("string"!=typeof e)return e;const[o,a,s,i]=e.match(R);return{[t]:parseFloat(o),[n]:parseFloat(a),[r]:parseFloat(s),alpha:void 0!==i?parseFloat(i):1}},I={...b,transform:t=>Math.round((t=>p(0,255,t))(t))},A={test:B("rgb","red"),parse:T("red","green","blue"),transform:({red:t,green:n,blue:r,alpha:e=1})=>"rgba("+I.transform(t)+", "+I.transform(n)+", "+I.transform(r)+", "+x(w.transform(e))+")"};const M={test:B("#"),parse:function(t){let n="",r="",e="",o="";return t.length>5?(n=t.substring(1,3),r=t.substring(3,5),e=t.substring(5,7),o=t.substring(7,9)):(n=t.substring(1,2),r=t.substring(2,3),e=t.substring(3,4),o=t.substring(4,5),n+=n,r+=r,e+=e,o+=o),{red:parseInt(n,16),green:parseInt(r,16),blue:parseInt(e,16),alpha:o?parseInt(o,16)/255:1}},transform:A.transform},O=t=>({test:n=>"string"==typeof n&&n.endsWith(t)&&1===n.split(" ").length,parse:parseFloat,transform:n=>`${n}${t}`}),P=O("deg"),W=O("%"),E=O("px"),L=(()=>({...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(100*t)}))(),C={test:B("hsl","hue"),parse:T("hue","saturation","lightness"),transform:({hue:t,saturation:n,lightness:r,alpha:e=1})=>"hsla("+Math.round(t)+", "+W.transform(x(n))+", "+W.transform(x(r))+", "+x(w.transform(e))+")"},j={test:t=>A.test(t)||M.test(t)||C.test(t),parse:t=>A.test(t)?A.parse(t):C.test(t)?C.parse(t):M.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?A.transform(t):C.transform(t),getAnimatableNone:t=>{const n=j.parse(t);return n.alpha=0,j.transform(n)}},$=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const V="number",F="color",X=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Y(t){const n=t.toString(),r=[],e={color:[],number:[],var:[]},o=[];let a=0;const s=n.replace(X,t=>(j.test(t)?(e.color.push(a),o.push(F),r.push(j.parse(t))):t.startsWith("var(")?(e.var.push(a),o.push("var"),r.push(t)):(e.number.push(a),o.push(V),r.push(parseFloat(t))),++a,"${}")).split("${}");return{values:r,split:s,indexes:e,types:o}}function D({split:t,types:n}){const r=t.length;return e=>{let o="";for(let a=0;a{return"number"==typeof t?n?.trim().endsWith("/")?t:0:"number"==typeof(r=t)?0:j.test(r)?j.getAnimatableNone(r):r;var r};const N={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(R)?.length||0)+(t.match($)?.length||0)>0},parse:function(t){return Y(t).values},createTransformer:function(t){return D(Y(t))},getAnimatableNone:function(t){const n=Y(t);return D(n)(n.values.map((t,r)=>H(t,n.split[r])))}},Z=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],z=(()=>new Set([...Z,"pathRotation"]))();function U(t,n,r,e){if("function"==typeof n){const[r,e]=[{},{}];n=n(t.custom,r,e)}if("string"==typeof n&&(n=t.variants&&t.variants[n]),"function"==typeof n){const[r,e]=[{},{}];n=n(t.custom,r,e)}return n}const q=t=>Boolean(t&&t.getVelocity);const _="data-"+"framerAppearId".replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`);const G={...b,transform:Math.round},J={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,inset:E,insetBlock:E,insetBlockStart:E,insetBlockEnd:E,insetInline:E,insetInlineStart:E,insetInlineEnd:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,paddingBlock:E,paddingBlockStart:E,paddingBlockEnd:E,paddingInline:E,paddingInlineStart:E,paddingInlineEnd:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,marginBlock:E,marginBlockStart:E,marginBlockEnd:E,marginInline:E,marginInlineStart:E,marginInlineEnd:E,fontSize:E,backgroundPositionX:E,backgroundPositionY:E,...{rotate:P,pathRotation:P,rotateX:P,rotateY:P,rotateZ:P,scale:S,scaleX:S,scaleY:S,scaleZ:S,skew:P,skewX:P,skewY:P,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:w,originX:L,originY:L,originZ:E},zIndex:G,fillOpacity:w,strokeOpacity:w,numOctaves:G},K=(t,n)=>n&&"number"==typeof t?n.transform(t):t;function Q(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function tt(t){return"string"==typeof t||Array.isArray(t)}const nt=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function rt(t){return Q(t.animate)||nt.some(n=>tt(t[n]))}let et={};const ot={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},at=Z.length;function st(t,n,r){const{style:e,vars:o,transformOrigin:a}=t;let s=!1,i=!1;for(const t in n){const r=n[t];if(z.has(t))s=!0;else if(v(t))o[t]=r;else{const n=K(r,J[t]);t.startsWith("origin")?(i=!0,a[t]=n):e[t]=n}}if(n.transform||(s||r?e.transform=function(t,n,r){let e="",o=!0;for(let a=0;a{if(!n.target)return t;if("string"==typeof t){if(!E.test(t))return t;t=parseFloat(t)}return`${it(t,n.target.x)}% ${it(t,n.target.y)}%`}},ut={correct:(t,{treeScale:n,projectionDelta:r})=>{const e=t,o=N.parse(t);if(o.length>5)return e;const a=N.createTransformer(t),s="number"!=typeof o[0]?1:0,i=r.x.scale*n.x,l=r.y.scale*n.y;o[0+s]/=i,o[1+s]/=l;const u=(c=i)+(l-c)*.5;var c;return"number"==typeof o[2+s]&&(o[2+s]/=u),"number"==typeof o[3+s]&&(o[3+s]/=u),a(o)}},ct={borderRadius:{...lt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomLeftRadius:lt,borderBottomRightRadius:lt,boxShadow:ut};function ft(t,{layout:n,layoutId:r}){return z.has(t)||t.startsWith("origin")||(n||void 0!==r)&&(!!ct[t]||"opacity"===t)}function dt(t,n,r){const e=t.style,o=n?.style,a={};if(!e)return a;for(const n in e)(q(e[n])||o&&q(o[n])||ft(n,t)||void 0!==r?.getValue(n)?.liveStyle)&&(a[n]=e[n]);return a}const pt={offset:"stroke-dashoffset",array:"stroke-dasharray"},mt={offset:"strokeDashoffset",array:"strokeDasharray"};const gt=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ht(t,{attrX:n,attrY:r,attrScale:e,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...i},l,u,c){if(st(t,i,u),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete f.transformBox);for(const t of gt)void 0!==f[t]&&(d[t]=f[t],delete f[t]);void 0!==n&&(f.x=n),void 0!==r&&(f.y=r),void 0!==e&&(f.scale=e),void 0!==o&&function(t,n,r=1,e=0,o=!0){t.pathLength=1;const a=o?pt:mt;t[a.offset]=""+-e,t[a.array]=`${n} ${r}`}(f,o,a,s,!1)}function yt(t){return q(t)?t.get():t}function vt(t){const{initial:n,animate:r}=function(t,n){if(rt(t)){const{initial:n,animate:r}=t;return{initial:!1===n||tt(n)?n:void 0,animate:tt(r)?r:void 0}}return!1!==t.inherit?n:{}}(t,e(y));return o(()=>({initial:n,animate:r}),[bt(n),bt(r)])}function bt(t){return Array.isArray(t)?t.join(" "):t}const wt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function St(t,n,r){for(const e in n)q(n[e])||ft(e,r)||(t[e]=n[e])}function xt(t,n){const r={};return St(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return o(()=>{const r={style:{},transform:{},transformOrigin:{},vars:{}};return st(r,n,t),Object.assign({},r.vars,r.style)},[n])}(t,n)),r}function Rt(t,n){const r={},e=xt(t,n);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,e.userSelect=e.WebkitUserSelect=e.WebkitTouchCallout="none",e.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=e,r}const kt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Bt(t,n,r,e){const a=o(()=>{const r={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};var o;return ht(r,n,"string"==typeof(o=e)&&"svg"===o.toLowerCase(),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[n]);if(t.style){const n={};St(n,t.style,t),a.style={...n,...a.style}}return a}const Tt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function It(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Tt.has(t)}let At=t=>!It(t);try{"function"==typeof(Mt=require("@emotion/is-prop-valid").default)&&(At=t=>t.startsWith("on")?!It(t):Mt(t))}catch{}var Mt;const Ot=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Pt(t){return"string"==typeof t&&!t.includes("-")&&!!(Ot.indexOf(t)>-1||/[A-Z]/u.test(t))}function Wt(t,n,r,{latestValues:e},i,l=!1,u){const c=(u??Pt(t)?Bt:Rt)(n,e,i,t),f=function(t,n,r){const e={};for(const o in t)"values"===o&&"object"==typeof t.values||q(t[o])||(At(o)||!0===r&&It(o)||!n&&!It(o)||t.draggable&&o.startsWith("onDrag"))&&(e[o]=t[o]);return e}(n,"string"==typeof t,l),d=t!==a?{...f,...c,ref:r}:{},{children:p}=n,m=o(()=>q(p)?p.get():p,[p]);return s(t,{...d,children:m})}const Et=r(null);function Lt(t,n,r,e){const o={},a=e(t,{});for(const t in a)o[t]=yt(a[t]);let{initial:s,animate:i}=t;const l=rt(t),u=function(t){return Boolean(rt(t)||t.variants)}(t);n&&u&&!l&&!1!==t.inherit&&(void 0===s&&(s=n.initial),void 0===i&&(i=n.animate));let c=!!r&&!1===r.initial;c=c||!1===s;const f=c?i:s;if(f&&"boolean"!=typeof f&&!Q(f)){const n=Array.isArray(f)?f:[f];for(let r=0;r(n,r)=>{const o=e(y),a=e(Et),s=()=>function({scrapeMotionValuesFromProps:t,createRenderState:n},r,e,o){return{latestValues:Lt(r,e,o,t),renderState:n()}}(t,n,o,a);return r?s():function(t){const n=i(null);return null===n.current&&(n.current=t()),n.current}(s)},jt=Ct({scrapeMotionValuesFromProps:dt,createRenderState:wt}),$t=Ct({scrapeMotionValuesFromProps:function(t,n,r){const e=dt(t,n,r);for(const r in t)if(q(t[r])||q(n[r])){e[-1!==Z.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=t[r]}return e},createRenderState:kt}),Vt={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Ft=!1;function Xt(){if(Ft)return;const t={};for(const n in Vt)t[n]={isEnabled:t=>Vt[n].some(n=>!!t[n])};et=t,Ft=!0}function Yt(){return Xt(),et}const Dt=Symbol.for("motionComponentSymbol");function Ht(t,n,r){const e=i(r);l(()=>{e.current=r});const o=i(null);return u(r=>{r&&t.onMount?.(r),n&&(r?n.mount(r):n.unmount());const a=e.current;if("function"==typeof a)if(r){const t=a(r);"function"==typeof t&&(o.current=t)}else o.current?(o.current(),o.current=null):a(r);else a&&(a.current=r)},[n])}const Nt=r({});function Zt(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const zt="undefined"!=typeof window?c:f;function Ut(t,n,r,o,a,s){const{visualElement:u}=e(y),c=e(g),d=e(Et),p=e(h),m=p.reducedMotion,v=p.skipAnimations,b=i(null),w=i(!1);o=o||c.renderer,!b.current&&o&&(b.current=o(t,{visualState:n,parent:u,props:r,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:m,skipAnimations:v,isSVG:s}),w.current&&b.current&&(b.current.manuallyAnimateOnMount=!0));const S=b.current,x=e(Nt);!S||S.projection||!a||"html"!==S.type&&"svg"!==S.type||function(t,n,r,e){const{layoutId:o,layout:a,drag:s,dragConstraints:i,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:f}=n;t.projection=new r(t.latestValues,n["data-framer-portal-id"]?void 0:qt(t.parent)),t.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:Boolean(s)||i&&Zt(i),visualElement:t,animationType:"string"==typeof a?a:"both",initialPromotionConfig:e,crossfade:f,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}(b.current,r,a,x);const R=i(!1);l(()=>{S&&R.current&&S.update(r,d)});const k=r[_],B=i(Boolean(k)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(k)&&window.MotionHasOptimisedAnimation?.(k));return zt(()=>{w.current=!0,S&&(R.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),B.current&&S.animationState&&S.animationState.animateChanges())}),f(()=>{S&&(!B.current&&S.animationState&&S.animationState.animateChanges(),B.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(k)}),B.current=!1),S.enteringChildren=void 0)}),S}function qt(t){if(t)return!1!==t.options.allowProjection?t.projection:qt(t.parent)}function _t(r,{forwardMotionProps:o=!1,type:a}={},s,i){const l=a?"svg"===a:Pt(r),u=l?$t:jt;function c(a,s){let c;const f={...e(h),...a,layoutId:Gt(a)},{isStatic:d}=f,p=vt(a),m=u(a,d);if(!d&&"undefined"!=typeof window){e(g).strict;const t=function(t){const n=Yt(),{drag:r,layout:e}=n;if(!r&&!e)return{};const o={...r,...e};return{MeasureLayout:r?.isEnabled(t)||e?.isEnabled(t)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(f);c=t.MeasureLayout,p.visualElement=Ut(r,m,f,i,t.ProjectionNode,l)}return t(y.Provider,{value:p,children:[c&&p.visualElement?n(c,{visualElement:p.visualElement,...f}):null,Wt(r,a,Ht(m,p.visualElement,s),m,d,o,l)]})}c.displayName=`motion.${"string"==typeof r?r:`create(${r.displayName??r.name??""})`}`;const f=d(c);return f[Dt]=r,f}function Gt({layoutId:t}){const n=e(m).id;return n&&void 0!==t?n+"-"+t:t}function Jt(t,n){return _t(t,n)}const Kt=Jt("div");export{Kt as MotionDiv}; -//# sourceMappingURL=size-rollup-m.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-m.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-m.js.map deleted file mode 100644 index 42cbb925..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-m.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"size-rollup-m.js","sources":["../../motion-utils/dist/es/clamp.mjs","../lib/context/LayoutGroupContext.js","../lib/context/LazyContext.js","../lib/context/MotionConfigContext.js","../lib/context/MotionContext/index.js","../../motion-dom/dist/es/animation/utils/is-css-variable.mjs","../../motion-dom/dist/es/value/types/numbers/index.mjs","../../motion-dom/dist/es/value/types/utils/sanitize.mjs","../../motion-dom/dist/es/value/types/utils/float-regex.mjs","../../motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../../motion-dom/dist/es/value/types/color/utils.mjs","../../motion-dom/dist/es/value/types/utils/is-nullish.mjs","../../motion-dom/dist/es/value/types/color/rgba.mjs","../../motion-dom/dist/es/value/types/color/hex.mjs","../../motion-dom/dist/es/value/types/numbers/units.mjs","../../motion-dom/dist/es/value/types/color/hsla.mjs","../../motion-dom/dist/es/value/types/color/index.mjs","../../motion-dom/dist/es/value/types/utils/color-regex.mjs","../../motion-dom/dist/es/value/types/complex/index.mjs","../../motion-dom/dist/es/render/utils/keys-transform.mjs","../../motion-dom/dist/es/render/utils/resolve-variants.mjs","../../motion-dom/dist/es/value/utils/is-motion-value.mjs","../../motion-dom/dist/es/animation/optimized-appear/data-id.mjs","../../motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs","../../motion-dom/dist/es/value/types/int.mjs","../../motion-dom/dist/es/value/types/maps/number.mjs","../../motion-dom/dist/es/value/types/maps/transform.mjs","../../motion-dom/dist/es/value/types/utils/get-as-type.mjs","../../motion-dom/dist/es/render/utils/is-animation-controls.mjs","../../motion-dom/dist/es/render/utils/is-variant-label.mjs","../../motion-dom/dist/es/render/utils/variant-props.mjs","../../motion-dom/dist/es/render/utils/is-controlling-variants.mjs","../../motion-dom/dist/es/render/VisualElement.mjs","../../motion-dom/dist/es/render/html/utils/build-transform.mjs","../../motion-dom/dist/es/render/html/utils/build-styles.mjs","../../motion-dom/dist/es/projection/styles/scale-border-radius.mjs","../../motion-dom/dist/es/projection/styles/scale-box-shadow.mjs","../../motion-dom/dist/es/utils/mix/number.mjs","../../motion-dom/dist/es/projection/styles/scale-correction.mjs","../../motion-dom/dist/es/render/utils/is-forced-motion-value.mjs","../../motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs","../../motion-dom/dist/es/render/svg/utils/path.mjs","../../motion-dom/dist/es/render/svg/utils/build-attrs.mjs","../../motion-dom/dist/es/value/utils/resolve-motion-value.mjs","../lib/context/MotionContext/create.js","../lib/context/MotionContext/utils.js","../lib/render/html/utils/create-render-state.js","../lib/render/html/use-props.js","../lib/render/svg/utils/create-render-state.js","../lib/render/svg/use-props.js","../../motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs","../lib/motion/utils/valid-prop.js","../lib/render/dom/utils/filter-props.js","../lib/render/svg/lowercase-elements.js","../lib/render/dom/utils/is-svg-component.js","../lib/render/dom/use-render.js","../lib/context/PresenceContext.js","../lib/motion/utils/use-visual-state.js","../lib/utils/use-constant.js","../lib/render/html/use-html-visual-state.js","../lib/render/svg/use-svg-visual-state.js","../../motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs","../lib/motion/features/definitions.js","../lib/motion/utils/symbol.js","../lib/motion/utils/use-motion-ref.js","../lib/context/SwitchLayoutGroupContext.js","../lib/utils/is-ref-object.js","../lib/utils/is-browser.js","../lib/utils/use-isomorphic-effect.js","../lib/motion/utils/use-visual-element.js","../lib/motion/index.js","../lib/render/components/m/create.js","../lib/render/components/m/elements.js","../lib/render/components/m/size.js"],"sourcesContent":["const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n//# sourceMappingURL=clamp.mjs.map\n","\"use client\";\nimport { createContext } from \"react\";\nexport const LayoutGroupContext = createContext({});\n//# sourceMappingURL=LayoutGroupContext.js.map","\"use client\";\nimport { createContext } from \"react\";\nexport const LazyContext = createContext({ strict: false });\n//# sourceMappingURL=LazyContext.js.map","\"use client\";\nimport { createContext } from \"react\";\n/**\n * @public\n */\nexport const MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n//# sourceMappingURL=MotionConfigContext.js.map","\"use client\";\nimport { createContext } from \"react\";\nexport const MotionContext = /* @__PURE__ */ createContext({});\n//# sourceMappingURL=index.js.map","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nfunction containsCSSVariable(value) {\n if (typeof value !== \"string\")\n return false;\n // Strip comments to avoid false positives\n return value.split(\"/*\")[0].includes(\"var(--\");\n}\n\nexport { containsCSSVariable, isCSSVariableName, isCSSVariableToken };\n//# sourceMappingURL=is-css-variable.mjs.map\n","import { clamp } from 'motion-utils';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n//# sourceMappingURL=index.mjs.map\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n//# sourceMappingURL=sanitize.mjs.map\n","const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n//# sourceMappingURL=float-regex.mjs.map\n","const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n//# sourceMappingURL=single-color-regex.mjs.map\n","import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n//# sourceMappingURL=utils.mjs.map\n","function isNullish(v) {\n return v == null;\n}\n\nexport { isNullish };\n//# sourceMappingURL=is-nullish.mjs.map\n","import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n//# sourceMappingURL=rgba.mjs.map\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n//# sourceMappingURL=hex.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n}))();\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n//# sourceMappingURL=units.mjs.map\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n//# sourceMappingURL=hsla.mjs.map\n","import { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n getAnimatableNone: (v) => {\n const parsed = color.parse(v);\n parsed.alpha = 0;\n return color.transform(parsed);\n },\n};\n\nexport { color };\n//# sourceMappingURL=index.mjs.map\n","const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n//# sourceMappingURL=color-regex.mjs.map\n","import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (v.match(floatRegex)?.length || 0) +\n (v.match(colorRegex)?.length || 0) >\n 0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction buildTransformer({ split, types }) {\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nfunction createTransformer(source) {\n return buildTransformer(analyseComplexValue(source));\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (value, splitBefore) => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0;\n }\n return convertNumbersToZero(value);\n};\nfunction getAnimatableNone(v) {\n const info = analyseComplexValue(v);\n const transformer = buildTransformer(info);\n return transformer(info.values.map((value, i) => convertToZero(value, info.split[i])));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n//# sourceMappingURL=index.mjs.map\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n *\n * `pathRotation` is a transform for routing purposes (skipped from raw\n * style application, wired to the transform composite, flags transform\n * dirty) but is intentionally NOT in `transformPropOrder` — it is\n * composed onto `rotate` at the build sites, not serialized in its own\n * slot, and must stay out of the order-array consumers (parse-transform,\n * unit-conversion, keys-position).\n */\nconst transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, \"pathRotation\"]))();\n\nexport { transformPropOrder, transformProps };\n//# sourceMappingURL=keys-transform.mjs.map\n","function getValueState(visualElement) {\n const state = [{}, {}];\n visualElement?.values.forEach((value, key) => {\n state[0][key] = value.get();\n state[1][key] = value.getVelocity();\n });\n return state;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n//# sourceMappingURL=resolve-variants.mjs.map\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n//# sourceMappingURL=is-motion-value.mjs.map\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n//# sourceMappingURL=data-id.mjs.map\n","function camelToDash(str) {\n return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);\n}\n\nexport { camelToDash };\n//# sourceMappingURL=camel-to-dash.mjs.map\n","import { number } from './numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n//# sourceMappingURL=int.mjs.map\n","import { int } from '../int.mjs';\nimport { alpha } from '../numbers/index.mjs';\nimport { px } from '../numbers/units.mjs';\nimport { transformValueTypes } from './transform.mjs';\n\nconst numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n inset: px,\n insetBlock: px,\n insetBlockStart: px,\n insetBlockEnd: px,\n insetInline: px,\n insetInlineStart: px,\n insetInlineEnd: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n paddingBlock: px,\n paddingBlockStart: px,\n paddingBlockEnd: px,\n paddingInline: px,\n paddingInlineStart: px,\n paddingInlineEnd: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n marginBlock: px,\n marginBlockStart: px,\n marginBlockEnd: px,\n marginInline: px,\n marginInlineStart: px,\n marginInlineEnd: px,\n // Typography\n fontSize: px,\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n ...transformValueTypes,\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n//# sourceMappingURL=number.mjs.map\n","import { alpha, scale } from '../numbers/index.mjs';\nimport { px, progressPercentage, degrees } from '../numbers/units.mjs';\n\nconst transformValueTypes = {\n rotate: degrees,\n /**\n * Internal channel for `transition.path` orientToPath. Composed onto\n * `rotate` at the transform-build sites so the user's `rotate` is\n * never read or overwritten. Not part of `transformPropOrder`.\n */\n pathRotation: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n};\n\nexport { transformValueTypes };\n//# sourceMappingURL=transform.mjs.map\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n//# sourceMappingURL=get-as-type.mjs.map\n","function isAnimationControls(v) {\n return (v !== null &&\n typeof v === \"object\" &&\n typeof v.start === \"function\");\n}\n\nexport { isAnimationControls };\n//# sourceMappingURL=is-animation-controls.mjs.map\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n//# sourceMappingURL=is-variant-label.mjs.map\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n//# sourceMappingURL=variant-props.mjs.map\n","import { isAnimationControls } from './is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n//# sourceMappingURL=is-controlling-variants.mjs.map\n","import { warnOnce, secondsToMilliseconds, isNumericalString, isZeroValueString, SubscriptionManager } from 'motion-utils';\nimport { KeyframeResolver } from '../animation/keyframes/KeyframesResolver.mjs';\nimport { NativeAnimation } from '../animation/NativeAnimation.mjs';\nimport { acceleratedValues } from '../animation/waapi/utils/accelerated-values.mjs';\nimport { microtask } from '../frameloop/microtask.mjs';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { complex } from '../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../value/types/utils/animatable-none.mjs';\nimport { findValueType } from '../value/types/utils/find.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { transformProps } from './utils/keys-transform.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { initPrefersReducedMotion } from './utils/reduced-motion/index.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './utils/reduced-motion/state.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions = {};\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nfunction setFeatureDefinitions(definitions) {\n featureDefinitions = definitions;\n}\n/**\n * Get the current feature definitions\n */\nfunction getFeatureDefinitions() {\n return featureDefinitions;\n}\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * Decides whether animations should be skipped for this VisualElement.\n * Useful for E2E tests and visual regression testing.\n */\n this.shouldSkipAnimations = false;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * Track whether this element has been mounted before, to detect\n * remounts after Suspense unmount/remount cycles.\n */\n this.hasBeenMounted = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0.0;\n this.scheduleRender = () => {\n const now = time.now();\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.skipAnimationsConfig = skipAnimations;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key]);\n }\n }\n }\n mount(instance) {\n /**\n * If this element has been mounted before (e.g. after a Suspense\n * unmount/remount), reset motion values to their initial state\n * so animations replay correctly from initial → animate.\n */\n if (this.hasBeenMounted) {\n for (const key in this.initialValues) {\n this.values.get(key)?.jump(this.initialValues[key]);\n this.latestValues[key] = this.initialValues[key];\n }\n }\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n /**\n * Determine reduced motion preference. Only initialize the matchMedia\n * listener if we actually need the dynamic value (i.e., when config\n * is neither \"never\" nor \"always\").\n */\n if (this.reducedMotionConfig === \"never\") {\n this.shouldReduceMotion = false;\n }\n else if (this.reducedMotionConfig === \"always\") {\n this.shouldReduceMotion = true;\n }\n else {\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion = prefersReducedMotion.current;\n }\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\", \"reduced-motion-disabled\");\n }\n /**\n * Set whether animations should be skipped based on the config.\n */\n this.shouldSkipAnimations = this.skipAnimationsConfig ?? false;\n this.parent?.addChild(this);\n this.update(this.props, this.presenceContext);\n this.hasBeenMounted = true;\n }\n unmount() {\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent?.removeChild(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n addChild(child) {\n this.children.add(child);\n this.enteringChildren ?? (this.enteringChildren = new Set());\n this.enteringChildren.add(child);\n }\n removeChild(child) {\n this.children.delete(child);\n this.enteringChildren && this.enteringChildren.delete(child);\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n if (value.accelerate &&\n acceleratedValues.has(key) &&\n this.current instanceof HTMLElement) {\n const { factory, keyframes, times, ease, duration } = value.accelerate;\n const animation = new NativeAnimation({\n element: this.current,\n name: key,\n keyframes,\n times,\n ease,\n duration: secondsToMilliseconds(duration),\n });\n const cleanup = factory(animation);\n this.valueSubscriptions.set(key, () => {\n cleanup();\n animation.cancel();\n });\n return;\n }\n const valueIsTransform = transformProps.has(key);\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform();\n }\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n this.scheduleRender();\n });\n let removeSyncCheck;\n if (typeof window !== \"undefined\" &&\n window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n if (removeSyncCheck)\n removeSyncCheck();\n // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n // can resubscribe before the animation is cancelled (#3315).\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (!this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n scheduleRenderMicrotask() {\n microtask.render(this.render);\n }\n}\n\nexport { VisualElement, getFeatureDefinitions, setFeatureDefinitions };\n//# sourceMappingURL=VisualElement.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(latestValues, transform, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n let transformIsDefault = true;\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n const value = latestValues[key];\n if (value === undefined)\n continue;\n let valueIsDefault = true;\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n }\n else {\n const parsed = parseFloat(value);\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0;\n }\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (!valueIsDefault) {\n transformIsDefault = false;\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${valueAsType}) `;\n }\n if (transformTemplate) {\n transform[key] = valueAsType;\n }\n }\n }\n // `pathRotation` composes onto `rotate` as a separate additive term so\n // the user's `rotate` is never clobbered. Deliberately not a slot in\n // `transformPropOrder`.\n const pathRotation = latestValues.pathRotation;\n if (pathRotation) {\n transformIsDefault = false;\n transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `;\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform };\n//# sourceMappingURL=build-transform.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformProps } from '../../utils/keys-transform.mjs';\nimport { isCSSVariableName } from '../../../animation/utils/is-css-variable.mjs';\nimport { buildTransform } from './build-transform.mjs';\n\nfunction buildHTMLStyles(state, latestValues, transformTemplate) {\n const { style, vars, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept separately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key];\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n continue;\n }\n else if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n else {\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] =\n valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(latestValues, state.transform, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n//# sourceMappingURL=build-styles.mjs.map\n","import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n//# sourceMappingURL=scale-border-radius.mjs.map\n","import { complex } from '../../value/types/complex/index.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n//# sourceMappingURL=scale-box-shadow.mjs.map\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n//# sourceMappingURL=number.mjs.map\n","import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { correctBorderRadius } from './scale-border-radius.mjs';\nimport { correctBoxShadow } from './scale-box-shadow.mjs';\n\nconst scaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\nfunction addScaleCorrector(correctors) {\n for (const key in correctors) {\n scaleCorrectors[key] = correctors[key];\n if (isCSSVariableName(key)) {\n scaleCorrectors[key].isCSSVariable = true;\n }\n }\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n//# sourceMappingURL=scale-correction.mjs.map\n","import { transformProps } from './keys-transform.mjs';\nimport { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nexport { addScaleCorrector } from '../../projection/styles/scale-correction.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue, scaleCorrectors };\n//# sourceMappingURL=is-forced-motion-value.mjs.map\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { isForcedMotionValue } from '../../utils/is-forced-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const style = props.style;\n const prevStyle = prevProps?.style;\n const newValues = {};\n if (!style)\n return newValues;\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevStyle && isMotionValue(prevStyle[key])) ||\n isForcedMotionValue(key, props) ||\n visualElement?.getValue(key)?.liveStyle !== undefined) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n","const dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n *\n * Note: We use unitless values for stroke-dasharray and stroke-dashoffset\n * because Safari incorrectly scales px values when the page is zoomed.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset (unitless to avoid Safari zoom bug)\n attrs[keys.offset] = `${-offset}`;\n // Build the dash array (unitless to avoid Safari zoom bug)\n attrs[keys.array] = `${length} ${spacing}`;\n}\n\nexport { buildSVGPath };\n//# sourceMappingURL=path.mjs.map\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * CSS Motion Path properties that should remain as CSS styles on SVG elements.\n */\nconst cssMotionPathProperties = [\n \"offsetDistance\",\n \"offsetPath\",\n \"offsetRotate\",\n \"offsetAnchor\",\n];\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate, styleProp) {\n buildHTMLStyles(state, latest, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style } = state;\n /**\n * However, we apply transforms as CSS transforms.\n * So if we detect a transform, transformOrigin we take it from attrs and copy it into style.\n */\n if (attrs.transform) {\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\";\n delete attrs.transformOrigin;\n }\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = styleProp?.transformBox ?? \"fill-box\";\n delete attrs.transformBox;\n }\n for (const key of cssMotionPathProperties) {\n if (attrs[key] !== undefined) {\n style[key] = attrs[key];\n delete attrs[key];\n }\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n//# sourceMappingURL=build-attrs.mjs.map\n","import { isMotionValue } from './is-motion-value.mjs';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n */\nfunction resolveMotionValue(value) {\n return isMotionValue(value) ? value.get() : value;\n}\n\nexport { resolveMotionValue };\n//# sourceMappingURL=resolve-motion-value.mjs.map\n","\"use client\";\nimport { useContext, useMemo } from \"react\";\nimport { MotionContext } from \".\";\nimport { getCurrentTreeVariants } from \"./utils\";\nexport function useCreateMotionContext(props) {\n const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));\n return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n//# sourceMappingURL=create.js.map","import { isControllingVariants, isVariantLabel } from \"motion-dom\";\nexport function getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n//# sourceMappingURL=utils.js.map","export const createHtmlRenderState = () => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {},\n});\n//# sourceMappingURL=create-render-state.js.map","\"use client\";\nimport { buildHTMLStyles, isForcedMotionValue, isMotionValue } from \"motion-dom\";\nimport { useMemo } from \"react\";\nimport { createHtmlRenderState } from \"./utils/create-render-state\";\nexport function copyRawValuesOnly(target, source, props) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState) {\n return useMemo(() => {\n const state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, transformTemplate);\n return Object.assign({}, state.vars, state.style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState) {\n const styleProp = props.style || {};\n const style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState));\n return style;\n}\nexport function useHTMLProps(props, visualState) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps = {};\n const style = useStyle(props, visualState);\n if (props.drag && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n }\n if (props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)) {\n htmlProps.tabIndex = 0;\n }\n htmlProps.style = style;\n return htmlProps;\n}\n//# sourceMappingURL=use-props.js.map","import { createHtmlRenderState } from \"../../html/utils/create-render-state\";\nexport const createSvgRenderState = () => ({\n ...createHtmlRenderState(),\n attrs: {},\n});\n//# sourceMappingURL=create-render-state.js.map","\"use client\";\nimport { buildSVGAttrs, isSVGTag } from \"motion-dom\";\nimport { useMemo } from \"react\";\nimport { copyRawValuesOnly } from \"../html/use-props\";\nimport { createSvgRenderState } from \"./utils/create-render-state\";\nexport function useSVGProps(props, visualState, _isStatic, Component) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState();\n buildSVGAttrs(state, visualState, isSVGTag(Component), props.transformTemplate, props.style);\n return {\n ...state.attrs,\n style: { ...state.style },\n };\n }, [visualState]);\n if (props.style) {\n const rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = { ...rawStyles, ...visualProps.style };\n }\n return visualProps;\n}\n//# sourceMappingURL=use-props.js.map","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n//# sourceMappingURL=is-svg-tag.mjs.map\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"custom\",\n \"inherit\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"globalTapTarget\",\n \"propagate\",\n \"ignoreStrict\",\n \"viewport\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nexport function isValidMotionProp(key) {\n return (key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n key.startsWith(\"onLayout\") ||\n validMotionProps.has(key));\n}\n//# sourceMappingURL=valid-prop.js.map","import { isMotionValue } from \"motion-dom\";\nimport { isValidMotionProp } from \"../../../motion/utils/valid-prop\";\nlet shouldForward = (key) => !isValidMotionProp(key);\nexport function loadExternalIsValidProp(isValidProp) {\n if (typeof isValidProp !== \"function\")\n return;\n // Explicitly filter our events\n shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n *\n * String concatenation prevents bundlers like webpack (e.g. Storybook)\n * from statically resolving this optional dependency at build time.\n */\n const emotionPkg = \"@emotion/is-prop-\" + \"valid\";\n loadExternalIsValidProp(require(emotionPkg).default);\n}\ncatch {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nexport function filterProps(props, isDom, forwardMotionProps) {\n const filteredProps = {};\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\")\n continue;\n if (isMotionValue(props[key]))\n continue;\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] &&\n key.startsWith(\"onDrag\"))) {\n filteredProps[key] =\n props[key];\n }\n }\n return filteredProps;\n}\n//# sourceMappingURL=filter-props.js.map","/**\n * We keep these listed separately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nexport const lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n//# sourceMappingURL=lowercase-elements.js.map","import { lowercaseSVGElements } from \"../../svg/lowercase-elements\";\nexport function isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n }\n else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/u.test(Component)) {\n return true;\n }\n return false;\n}\n//# sourceMappingURL=is-svg-component.js.map","\"use client\";\nimport { isMotionValue } from \"motion-dom\";\nimport { Fragment, createElement, useMemo } from \"react\";\nimport { useHTMLProps } from \"../html/use-props\";\nimport { useSVGProps } from \"../svg/use-props\";\nimport { filterProps } from \"./utils/filter-props\";\nimport { isSVGComponent } from \"./utils/is-svg-component\";\nexport function useRender(Component, props, ref, { latestValues, }, isStatic, forwardMotionProps = false, isSVG) {\n const useVisualProps = (isSVG ?? isSVGComponent(Component)) ? useSVGProps : useHTMLProps;\n const visualProps = useVisualProps(props, latestValues, isStatic, Component);\n const filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n const elementProps = Component !== Fragment ? { ...filteredProps, ...visualProps, ref } : {};\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props;\n const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n });\n}\n//# sourceMappingURL=use-render.js.map","\"use client\";\nimport { createContext } from \"react\";\n/**\n * @public\n */\nexport const PresenceContext = \n/* @__PURE__ */ createContext(null);\n//# sourceMappingURL=PresenceContext.js.map","\"use client\";\nimport { isAnimationControls, isControllingVariants as checkIsControllingVariants, isVariantNode as checkIsVariantNode, resolveVariantFromProps, } from \"motion-dom\";\nimport { useContext } from \"react\";\nimport { MotionContext } from \"../../context/MotionContext\";\nimport { PresenceContext, } from \"../../context/PresenceContext\";\nimport { useConstant } from \"../../utils/use-constant\";\nimport { resolveMotionValue } from \"motion-dom\";\nfunction makeState({ scrapeMotionValuesFromProps, createRenderState, }, props, context, presenceContext) {\n const state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n return state;\n}\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n const values = {};\n const motionValues = scrapeMotionValues(props, {});\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n let { initial, animate } = props;\n const isControllingVariants = checkIsControllingVariants(props);\n const isVariantNode = checkIsVariantNode(props);\n if (context &&\n isVariantNode &&\n !isControllingVariants &&\n props.inherit !== false) {\n if (initial === undefined)\n initial = context.initial;\n if (animate === undefined)\n animate = context.animate;\n }\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false;\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n const variantToSet = isInitialAnimationBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n for (let i = 0; i < list.length; i++) {\n const resolved = resolveVariantFromProps(props, list[i]);\n if (resolved) {\n const { transitionEnd, transition, ...target } = resolved;\n for (const key in target) {\n let valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (const key in transitionEnd) {\n values[key] = transitionEnd[key];\n }\n }\n }\n }\n return values;\n}\nexport const makeUseVisualState = (config) => (props, isStatic) => {\n const context = useContext(MotionContext);\n const presenceContext = useContext(PresenceContext);\n const make = () => makeState(config, props, context, presenceContext);\n return isStatic ? make() : useConstant(make);\n};\n//# sourceMappingURL=use-visual-state.js.map","\"use client\";\nimport { useRef } from \"react\";\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nexport function useConstant(init) {\n const ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n//# sourceMappingURL=use-constant.js.map","\"use client\";\nimport { scrapeHTMLMotionValuesFromProps } from \"motion-dom\";\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\";\nimport { createHtmlRenderState } from \"./utils/create-render-state\";\nexport const useHTMLVisualState = /*@__PURE__*/ makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeHTMLMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n});\n//# sourceMappingURL=use-html-visual-state.js.map","\"use client\";\nimport { scrapeSVGMotionValuesFromProps } from \"motion-dom\";\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\";\nimport { createSvgRenderState } from \"./utils/create-render-state\";\nexport const useSVGVisualState = /*@__PURE__*/ makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeSVGMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n});\n//# sourceMappingURL=use-svg-visual-state.js.map","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n for (const key in props) {\n if (isMotionValue(props[key]) ||\n isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n","import { getFeatureDefinitions, setFeatureDefinitions } from \"motion-dom\";\nconst featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nlet isInitialized = false;\n/**\n * Initialize feature definitions with isEnabled checks.\n * This must be called before any motion components are rendered.\n */\nexport function initFeatureDefinitions() {\n if (isInitialized)\n return;\n const initialFeatureDefinitions = {};\n for (const key in featureProps) {\n initialFeatureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n }\n setFeatureDefinitions(initialFeatureDefinitions);\n isInitialized = true;\n}\n/**\n * Get the current feature definitions, initializing if needed.\n */\nexport function getInitializedFeatureDefinitions() {\n initFeatureDefinitions();\n return getFeatureDefinitions();\n}\n//# sourceMappingURL=definitions.js.map","export const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n//# sourceMappingURL=symbol.js.map","\"use client\";\nimport { useCallback, useInsertionEffect, useRef } from \"react\";\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nexport function useMotionRef(visualState, visualElement, externalRef) {\n /**\n * Store externalRef in a ref to avoid including it in the useCallback\n * dependency array. Including externalRef in dependencies causes issues\n * with libraries like Radix UI that create new callback refs on each render\n * when using asChild - this would cause the callback to be recreated,\n * triggering element remounts and breaking AnimatePresence exit animations.\n */\n const externalRefContainer = useRef(externalRef);\n useInsertionEffect(() => {\n externalRefContainer.current = externalRef;\n });\n // Store cleanup function returned by callback refs (React 19 feature)\n const refCleanup = useRef(null);\n return useCallback((instance) => {\n if (instance) {\n visualState.onMount?.(instance);\n }\n if (visualElement) {\n instance ? visualElement.mount(instance) : visualElement.unmount();\n }\n const ref = externalRefContainer.current;\n if (typeof ref === \"function\") {\n if (instance) {\n const cleanup = ref(instance);\n if (typeof cleanup === \"function\") {\n refCleanup.current = cleanup;\n }\n }\n else if (refCleanup.current) {\n refCleanup.current();\n refCleanup.current = null;\n }\n else {\n ref(instance);\n }\n }\n else if (ref) {\n ;\n ref.current = instance;\n }\n }, [visualElement]);\n}\n//# sourceMappingURL=use-motion-ref.js.map","\"use client\";\nimport { createContext } from \"react\";\n/**\n * Internal, exported only for usage in Framer\n */\nexport const SwitchLayoutGroupContext = createContext({});\n//# sourceMappingURL=SwitchLayoutGroupContext.js.map","export function isRefObject(ref) {\n return (ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n//# sourceMappingURL=is-ref-object.js.map","export const isBrowser = typeof window !== \"undefined\";\n//# sourceMappingURL=is-browser.js.map","\"use client\";\nimport { useEffect, useLayoutEffect } from \"react\";\nimport { isBrowser } from \"./is-browser\";\nexport const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n//# sourceMappingURL=use-isomorphic-effect.js.map","\"use client\";\nimport { optimizedAppearDataAttribute, } from \"motion-dom\";\nimport { useContext, useEffect, useInsertionEffect, useRef } from \"react\";\nimport { LazyContext } from \"../../context/LazyContext\";\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\";\nimport { MotionContext } from \"../../context/MotionContext\";\nimport { PresenceContext } from \"../../context/PresenceContext\";\nimport { SwitchLayoutGroupContext, } from \"../../context/SwitchLayoutGroupContext\";\nimport { isRefObject } from \"../../utils/is-ref-object\";\nimport { useIsomorphicLayoutEffect } from \"../../utils/use-isomorphic-effect\";\nexport function useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor, isSVG) {\n const { visualElement: parent } = useContext(MotionContext);\n const lazyContext = useContext(LazyContext);\n const presenceContext = useContext(PresenceContext);\n const motionConfig = useContext(MotionConfigContext);\n const reducedMotionConfig = motionConfig.reducedMotion;\n const skipAnimations = motionConfig.skipAnimations;\n const visualElementRef = useRef(null);\n /**\n * Track whether the component has been through React's commit phase.\n * Used to detect when LazyMotion features load after the component has mounted.\n */\n const hasMountedOnce = useRef(false);\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement =\n createVisualElement ||\n lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n skipAnimations,\n isSVG,\n });\n /**\n * If the component has already mounted before features loaded (e.g. via\n * LazyMotion with async feature loading), we need to force the initial\n * animation to run. Otherwise state changes that occurred before features\n * loaded will be lost and the element will snap to its final state.\n */\n if (hasMountedOnce.current && visualElementRef.current) {\n visualElementRef.current.manuallyAnimateOnMount = true;\n }\n }\n const visualElement = visualElementRef.current;\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);\n if (visualElement &&\n !visualElement.projection &&\n ProjectionNodeConstructor &&\n (visualElement.type === \"html\" || visualElement.type === \"svg\")) {\n createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);\n }\n const isMounted = useRef(false);\n useInsertionEffect(() => {\n /**\n * Check the component has already mounted before calling\n * `update` unnecessarily. This ensures we skip the initial update.\n */\n if (visualElement && isMounted.current) {\n visualElement.update(props, presenceContext);\n }\n });\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const optimisedAppearId = props[optimizedAppearDataAttribute];\n const wantsHandoff = useRef(Boolean(optimisedAppearId) &&\n typeof window !== \"undefined\" &&\n !window.MotionHandoffIsComplete?.(optimisedAppearId) &&\n window.MotionHasOptimisedAnimation?.(optimisedAppearId));\n useIsomorphicLayoutEffect(() => {\n /**\n * Track that this component has mounted. This is used to detect when\n * LazyMotion features load after the component has already committed.\n */\n hasMountedOnce.current = true;\n if (!visualElement)\n return;\n isMounted.current = true;\n window.MotionIsMounted = true;\n visualElement.updateFeatures();\n visualElement.scheduleRenderMicrotask();\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n });\n useEffect(() => {\n if (!visualElement)\n return;\n if (!wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n if (wantsHandoff.current) {\n // This ensures all future calls to animateChanges() in this component will run in useEffect\n queueMicrotask(() => {\n window.MotionHandoffMarkAsComplete?.(optimisedAppearId);\n });\n wantsHandoff.current = false;\n }\n /**\n * Now we've finished triggering animations for this element we\n * can wipe the enteringChildren set for the next render.\n */\n visualElement.enteringChildren = undefined;\n });\n return visualElement;\n}\nfunction createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {\n const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutAnchor, layoutCrossfade, } = props;\n visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props[\"data-framer-portal-id\"]\n ? undefined\n : getClosestProjectingNode(visualElement.parent));\n visualElement.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement,\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig,\n crossfade: layoutCrossfade,\n layoutScroll,\n layoutRoot,\n layoutAnchor,\n });\n}\nfunction getClosestProjectingNode(visualElement) {\n if (!visualElement)\n return undefined;\n return visualElement.options.allowProjection !== false\n ? visualElement.projection\n : getClosestProjectingNode(visualElement.parent);\n}\n//# sourceMappingURL=use-visual-element.js.map","\"use client\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { invariant, warning } from \"motion-utils\";\nimport { forwardRef, useContext } from \"react\";\nimport { LayoutGroupContext } from \"../context/LayoutGroupContext\";\nimport { LazyContext } from \"../context/LazyContext\";\nimport { MotionConfigContext } from \"../context/MotionConfigContext\";\nimport { MotionContext } from \"../context/MotionContext\";\nimport { useCreateMotionContext } from \"../context/MotionContext/create\";\nimport { useRender } from \"../render/dom/use-render\";\nimport { isSVGComponent } from \"../render/dom/utils/is-svg-component\";\nimport { useHTMLVisualState } from \"../render/html/use-html-visual-state\";\nimport { useSVGVisualState } from \"../render/svg/use-svg-visual-state\";\nimport { getInitializedFeatureDefinitions } from \"./features/definitions\";\nimport { loadFeatures } from \"./features/load-features\";\nimport { motionComponentSymbol } from \"./utils/symbol\";\nimport { useMotionRef } from \"./utils/use-motion-ref\";\nimport { useVisualElement } from \"./utils/use-visual-element\";\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nexport function createMotionComponent(Component, { forwardMotionProps = false, type } = {}, preloadedFeatures, createVisualElement) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n /**\n * Determine whether to use SVG or HTML rendering based on:\n * 1. Explicit `type` option (highest priority)\n * 2. Auto-detection via `isSVGComponent`\n */\n const isSVG = type ? type === \"svg\" : isSVGComponent(Component);\n const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState;\n function MotionDOMComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && typeof window !== \"undefined\") {\n useStrictMode(configAndProps, preloadedFeatures);\n const layoutProjection = getProjectionFunctionality(configAndProps);\n MeasureLayout = layoutProjection.MeasureLayout;\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode, isSVG);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (_jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (_jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, forwardMotionProps, isSVG)] }));\n }\n MotionDOMComponent.displayName = `motion.${typeof Component === \"string\"\n ? Component\n : `create(${Component.displayName ?? Component.name ?? \"\"})`}`;\n const ForwardRefMotionComponent = forwardRef(MotionDOMComponent);\n ForwardRefMotionComponent[motionComponentSymbol] = Component;\n return ForwardRefMotionComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\nfunction useStrictMode(configAndProps, preloadedFeatures) {\n const isStrict = useContext(LazyContext).strict;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n configAndProps.ignoreStrict\n ? warning(false, strictMessage, \"lazy-strict-mode\")\n : invariant(false, strictMessage, \"lazy-strict-mode\");\n }\n}\nfunction getProjectionFunctionality(props) {\n const featureDefinitions = getInitializedFeatureDefinitions();\n const { drag, layout } = featureDefinitions;\n if (!drag && !layout)\n return {};\n const combined = { ...drag, ...layout };\n return {\n MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props)\n ? combined.MeasureLayout\n : undefined,\n ProjectionNode: combined.ProjectionNode,\n };\n}\n//# sourceMappingURL=index.js.map","import { createMotionComponent } from \"../../../motion\";\nexport function createMinimalMotionComponent(Component, options) {\n return createMotionComponent(Component, options);\n}\n//# sourceMappingURL=create.js.map","\"use client\";\nimport { createMinimalMotionComponent } from \"./create\";\n/**\n * HTML components\n */\nexport const MotionA = /*@__PURE__*/ createMinimalMotionComponent(\"a\");\nexport const MotionAbbr = /*@__PURE__*/ createMinimalMotionComponent(\"abbr\");\nexport const MotionAddress = \n/*@__PURE__*/ createMinimalMotionComponent(\"address\");\nexport const MotionArea = /*@__PURE__*/ createMinimalMotionComponent(\"area\");\nexport const MotionArticle = \n/*@__PURE__*/ createMinimalMotionComponent(\"article\");\nexport const MotionAside = /*@__PURE__*/ createMinimalMotionComponent(\"aside\");\nexport const MotionAudio = /*@__PURE__*/ createMinimalMotionComponent(\"audio\");\nexport const MotionB = /*@__PURE__*/ createMinimalMotionComponent(\"b\");\nexport const MotionBase = /*@__PURE__*/ createMinimalMotionComponent(\"base\");\nexport const MotionBdi = /*@__PURE__*/ createMinimalMotionComponent(\"bdi\");\nexport const MotionBdo = /*@__PURE__*/ createMinimalMotionComponent(\"bdo\");\nexport const MotionBig = /*@__PURE__*/ createMinimalMotionComponent(\"big\");\nexport const MotionBlockquote = \n/*@__PURE__*/ createMinimalMotionComponent(\"blockquote\");\nexport const MotionBody = /*@__PURE__*/ createMinimalMotionComponent(\"body\");\nexport const MotionButton = /*@__PURE__*/ createMinimalMotionComponent(\"button\");\nexport const MotionCanvas = /*@__PURE__*/ createMinimalMotionComponent(\"canvas\");\nexport const MotionCaption = \n/*@__PURE__*/ createMinimalMotionComponent(\"caption\");\nexport const MotionCite = /*@__PURE__*/ createMinimalMotionComponent(\"cite\");\nexport const MotionCode = /*@__PURE__*/ createMinimalMotionComponent(\"code\");\nexport const MotionCol = /*@__PURE__*/ createMinimalMotionComponent(\"col\");\nexport const MotionColgroup = \n/*@__PURE__*/ createMinimalMotionComponent(\"colgroup\");\nexport const MotionData = /*@__PURE__*/ createMinimalMotionComponent(\"data\");\nexport const MotionDatalist = \n/*@__PURE__*/ createMinimalMotionComponent(\"datalist\");\nexport const MotionDd = /*@__PURE__*/ createMinimalMotionComponent(\"dd\");\nexport const MotionDel = /*@__PURE__*/ createMinimalMotionComponent(\"del\");\nexport const MotionDetails = \n/*@__PURE__*/ createMinimalMotionComponent(\"details\");\nexport const MotionDfn = /*@__PURE__*/ createMinimalMotionComponent(\"dfn\");\nexport const MotionDialog = /*@__PURE__*/ createMinimalMotionComponent(\"dialog\");\nexport const MotionDiv = /*@__PURE__*/ createMinimalMotionComponent(\"div\");\nexport const MotionDl = /*@__PURE__*/ createMinimalMotionComponent(\"dl\");\nexport const MotionDt = /*@__PURE__*/ createMinimalMotionComponent(\"dt\");\nexport const MotionEm = /*@__PURE__*/ createMinimalMotionComponent(\"em\");\nexport const MotionEmbed = /*@__PURE__*/ createMinimalMotionComponent(\"embed\");\nexport const MotionFieldset = \n/*@__PURE__*/ createMinimalMotionComponent(\"fieldset\");\nexport const MotionFigcaption = \n/*@__PURE__*/ createMinimalMotionComponent(\"figcaption\");\nexport const MotionFigure = /*@__PURE__*/ createMinimalMotionComponent(\"figure\");\nexport const MotionFooter = /*@__PURE__*/ createMinimalMotionComponent(\"footer\");\nexport const MotionForm = /*@__PURE__*/ createMinimalMotionComponent(\"form\");\nexport const MotionH1 = /*@__PURE__*/ createMinimalMotionComponent(\"h1\");\nexport const MotionH2 = /*@__PURE__*/ createMinimalMotionComponent(\"h2\");\nexport const MotionH3 = /*@__PURE__*/ createMinimalMotionComponent(\"h3\");\nexport const MotionH4 = /*@__PURE__*/ createMinimalMotionComponent(\"h4\");\nexport const MotionH5 = /*@__PURE__*/ createMinimalMotionComponent(\"h5\");\nexport const MotionH6 = /*@__PURE__*/ createMinimalMotionComponent(\"h6\");\nexport const MotionHead = /*@__PURE__*/ createMinimalMotionComponent(\"head\");\nexport const MotionHeader = /*@__PURE__*/ createMinimalMotionComponent(\"header\");\nexport const MotionHgroup = /*@__PURE__*/ createMinimalMotionComponent(\"hgroup\");\nexport const MotionHr = /*@__PURE__*/ createMinimalMotionComponent(\"hr\");\nexport const MotionHtml = /*@__PURE__*/ createMinimalMotionComponent(\"html\");\nexport const MotionI = /*@__PURE__*/ createMinimalMotionComponent(\"i\");\nexport const MotionIframe = /*@__PURE__*/ createMinimalMotionComponent(\"iframe\");\nexport const MotionImg = /*@__PURE__*/ createMinimalMotionComponent(\"img\");\nexport const MotionInput = /*@__PURE__*/ createMinimalMotionComponent(\"input\");\nexport const MotionIns = /*@__PURE__*/ createMinimalMotionComponent(\"ins\");\nexport const MotionKbd = /*@__PURE__*/ createMinimalMotionComponent(\"kbd\");\nexport const MotionKeygen = /*@__PURE__*/ createMinimalMotionComponent(\"keygen\");\nexport const MotionLabel = /*@__PURE__*/ createMinimalMotionComponent(\"label\");\nexport const MotionLegend = /*@__PURE__*/ createMinimalMotionComponent(\"legend\");\nexport const MotionLi = /*@__PURE__*/ createMinimalMotionComponent(\"li\");\nexport const MotionLink = /*@__PURE__*/ createMinimalMotionComponent(\"link\");\nexport const MotionMain = /*@__PURE__*/ createMinimalMotionComponent(\"main\");\nexport const MotionMap = /*@__PURE__*/ createMinimalMotionComponent(\"map\");\nexport const MotionMark = /*@__PURE__*/ createMinimalMotionComponent(\"mark\");\nexport const MotionMenu = /*@__PURE__*/ createMinimalMotionComponent(\"menu\");\nexport const MotionMenuitem = \n/*@__PURE__*/ createMinimalMotionComponent(\"menuitem\");\nexport const MotionMeter = /*@__PURE__*/ createMinimalMotionComponent(\"meter\");\nexport const MotionNav = /*@__PURE__*/ createMinimalMotionComponent(\"nav\");\nexport const MotionObject = /*@__PURE__*/ createMinimalMotionComponent(\"object\");\nexport const MotionOl = /*@__PURE__*/ createMinimalMotionComponent(\"ol\");\nexport const MotionOptgroup = \n/*@__PURE__*/ createMinimalMotionComponent(\"optgroup\");\nexport const MotionOption = /*@__PURE__*/ createMinimalMotionComponent(\"option\");\nexport const MotionOutput = /*@__PURE__*/ createMinimalMotionComponent(\"output\");\nexport const MotionP = /*@__PURE__*/ createMinimalMotionComponent(\"p\");\nexport const MotionParam = /*@__PURE__*/ createMinimalMotionComponent(\"param\");\nexport const MotionPicture = \n/*@__PURE__*/ createMinimalMotionComponent(\"picture\");\nexport const MotionPre = /*@__PURE__*/ createMinimalMotionComponent(\"pre\");\nexport const MotionProgress = \n/*@__PURE__*/ createMinimalMotionComponent(\"progress\");\nexport const MotionQ = /*@__PURE__*/ createMinimalMotionComponent(\"q\");\nexport const MotionRp = /*@__PURE__*/ createMinimalMotionComponent(\"rp\");\nexport const MotionRt = /*@__PURE__*/ createMinimalMotionComponent(\"rt\");\nexport const MotionRuby = /*@__PURE__*/ createMinimalMotionComponent(\"ruby\");\nexport const MotionS = /*@__PURE__*/ createMinimalMotionComponent(\"s\");\nexport const MotionSamp = /*@__PURE__*/ createMinimalMotionComponent(\"samp\");\nexport const MotionScript = /*@__PURE__*/ createMinimalMotionComponent(\"script\");\nexport const MotionSection = \n/*@__PURE__*/ createMinimalMotionComponent(\"section\");\nexport const MotionSelect = /*@__PURE__*/ createMinimalMotionComponent(\"select\");\nexport const MotionSmall = /*@__PURE__*/ createMinimalMotionComponent(\"small\");\nexport const MotionSource = /*@__PURE__*/ createMinimalMotionComponent(\"source\");\nexport const MotionSpan = /*@__PURE__*/ createMinimalMotionComponent(\"span\");\nexport const MotionStrong = /*@__PURE__*/ createMinimalMotionComponent(\"strong\");\nexport const MotionStyle = /*@__PURE__*/ createMinimalMotionComponent(\"style\");\nexport const MotionSub = /*@__PURE__*/ createMinimalMotionComponent(\"sub\");\nexport const MotionSummary = \n/*@__PURE__*/ createMinimalMotionComponent(\"summary\");\nexport const MotionSup = /*@__PURE__*/ createMinimalMotionComponent(\"sup\");\nexport const MotionTable = /*@__PURE__*/ createMinimalMotionComponent(\"table\");\nexport const MotionTbody = /*@__PURE__*/ createMinimalMotionComponent(\"tbody\");\nexport const MotionTd = /*@__PURE__*/ createMinimalMotionComponent(\"td\");\nexport const MotionTextarea = \n/*@__PURE__*/ createMinimalMotionComponent(\"textarea\");\nexport const MotionTfoot = /*@__PURE__*/ createMinimalMotionComponent(\"tfoot\");\nexport const MotionTh = /*@__PURE__*/ createMinimalMotionComponent(\"th\");\nexport const MotionThead = /*@__PURE__*/ createMinimalMotionComponent(\"thead\");\nexport const MotionTime = /*@__PURE__*/ createMinimalMotionComponent(\"time\");\nexport const MotionTitle = /*@__PURE__*/ createMinimalMotionComponent(\"title\");\nexport const MotionTr = /*@__PURE__*/ createMinimalMotionComponent(\"tr\");\nexport const MotionTrack = /*@__PURE__*/ createMinimalMotionComponent(\"track\");\nexport const MotionU = /*@__PURE__*/ createMinimalMotionComponent(\"u\");\nexport const MotionUl = /*@__PURE__*/ createMinimalMotionComponent(\"ul\");\nexport const MotionVideo = /*@__PURE__*/ createMinimalMotionComponent(\"video\");\nexport const MotionWbr = /*@__PURE__*/ createMinimalMotionComponent(\"wbr\");\nexport const MotionWebview = \n/*@__PURE__*/ createMinimalMotionComponent(\"webview\");\n/**\n * SVG components\n */\nexport const MotionAnimate = \n/*@__PURE__*/ createMinimalMotionComponent(\"animate\");\nexport const MotionCircle = /*@__PURE__*/ createMinimalMotionComponent(\"circle\");\nexport const MotionDefs = /*@__PURE__*/ createMinimalMotionComponent(\"defs\");\nexport const MotionDesc = /*@__PURE__*/ createMinimalMotionComponent(\"desc\");\nexport const MotionEllipse = \n/*@__PURE__*/ createMinimalMotionComponent(\"ellipse\");\nexport const MotionG = /*@__PURE__*/ createMinimalMotionComponent(\"g\");\nexport const MotionImage = /*@__PURE__*/ createMinimalMotionComponent(\"image\");\nexport const MotionLine = /*@__PURE__*/ createMinimalMotionComponent(\"line\");\nexport const MotionFilter = /*@__PURE__*/ createMinimalMotionComponent(\"filter\");\nexport const MotionMarker = /*@__PURE__*/ createMinimalMotionComponent(\"marker\");\nexport const MotionMask = /*@__PURE__*/ createMinimalMotionComponent(\"mask\");\nexport const MotionMetadata = \n/*@__PURE__*/ createMinimalMotionComponent(\"metadata\");\nexport const MotionPath = /*@__PURE__*/ createMinimalMotionComponent(\"path\");\nexport const MotionPattern = \n/*@__PURE__*/ createMinimalMotionComponent(\"pattern\");\nexport const MotionPolygon = \n/*@__PURE__*/ createMinimalMotionComponent(\"polygon\");\nexport const MotionPolyline = \n/*@__PURE__*/ createMinimalMotionComponent(\"polyline\");\nexport const MotionRect = /*@__PURE__*/ createMinimalMotionComponent(\"rect\");\nexport const MotionStop = /*@__PURE__*/ createMinimalMotionComponent(\"stop\");\nexport const MotionSvg = /*@__PURE__*/ createMinimalMotionComponent(\"svg\");\nexport const MotionSymbol = /*@__PURE__*/ createMinimalMotionComponent(\"symbol\");\nexport const MotionText = /*@__PURE__*/ createMinimalMotionComponent(\"text\");\nexport const MotionTspan = /*@__PURE__*/ createMinimalMotionComponent(\"tspan\");\nexport const MotionUse = /*@__PURE__*/ createMinimalMotionComponent(\"use\");\nexport const MotionView = /*@__PURE__*/ createMinimalMotionComponent(\"view\");\nexport const MotionClipPath = \n/*@__PURE__*/ createMinimalMotionComponent(\"clipPath\");\nexport const MotionFeBlend = \n/*@__PURE__*/ createMinimalMotionComponent(\"feBlend\");\nexport const MotionFeColorMatrix = \n/*@__PURE__*/ createMinimalMotionComponent(\"feColorMatrix\");\nexport const MotionFeComponentTransfer = \n/*@__PURE__*/ createMinimalMotionComponent(\"feComponentTransfer\");\nexport const MotionFeComposite = \n/*@__PURE__*/ createMinimalMotionComponent(\"feComposite\");\nexport const MotionFeConvolveMatrix = \n/*@__PURE__*/ createMinimalMotionComponent(\"feConvolveMatrix\");\nexport const MotionFeDiffuseLighting = \n/*@__PURE__*/ createMinimalMotionComponent(\"feDiffuseLighting\");\nexport const MotionFeDisplacementMap = \n/*@__PURE__*/ createMinimalMotionComponent(\"feDisplacementMap\");\nexport const MotionFeDistantLight = \n/*@__PURE__*/ createMinimalMotionComponent(\"feDistantLight\");\nexport const MotionFeDropShadow = \n/*@__PURE__*/ createMinimalMotionComponent(\"feDropShadow\");\nexport const MotionFeFlood = \n/*@__PURE__*/ createMinimalMotionComponent(\"feFlood\");\nexport const MotionFeFuncA = \n/*@__PURE__*/ createMinimalMotionComponent(\"feFuncA\");\nexport const MotionFeFuncB = \n/*@__PURE__*/ createMinimalMotionComponent(\"feFuncB\");\nexport const MotionFeFuncG = \n/*@__PURE__*/ createMinimalMotionComponent(\"feFuncG\");\nexport const MotionFeFuncR = \n/*@__PURE__*/ createMinimalMotionComponent(\"feFuncR\");\nexport const MotionFeGaussianBlur = \n/*@__PURE__*/ createMinimalMotionComponent(\"feGaussianBlur\");\nexport const MotionFeImage = \n/*@__PURE__*/ createMinimalMotionComponent(\"feImage\");\nexport const MotionFeMerge = \n/*@__PURE__*/ createMinimalMotionComponent(\"feMerge\");\nexport const MotionFeMergeNode = \n/*@__PURE__*/ createMinimalMotionComponent(\"feMergeNode\");\nexport const MotionFeMorphology = \n/*@__PURE__*/ createMinimalMotionComponent(\"feMorphology\");\nexport const MotionFeOffset = \n/*@__PURE__*/ createMinimalMotionComponent(\"feOffset\");\nexport const MotionFePointLight = \n/*@__PURE__*/ createMinimalMotionComponent(\"fePointLight\");\nexport const MotionFeSpecularLighting = \n/*@__PURE__*/ createMinimalMotionComponent(\"feSpecularLighting\");\nexport const MotionFeSpotLight = \n/*@__PURE__*/ createMinimalMotionComponent(\"feSpotLight\");\nexport const MotionFeTile = /*@__PURE__*/ createMinimalMotionComponent(\"feTile\");\nexport const MotionFeTurbulence = \n/*@__PURE__*/ createMinimalMotionComponent(\"feTurbulence\");\nexport const MotionForeignObject = \n/*@__PURE__*/ createMinimalMotionComponent(\"foreignObject\");\nexport const MotionLinearGradient = \n/*@__PURE__*/ createMinimalMotionComponent(\"linearGradient\");\nexport const MotionRadialGradient = \n/*@__PURE__*/ createMinimalMotionComponent(\"radialGradient\");\nexport const MotionTextPath = \n/*@__PURE__*/ createMinimalMotionComponent(\"textPath\");\n//# sourceMappingURL=elements.js.map","import { m } from \"./\";\nexport const MotionDiv = m.div;\n//# sourceMappingURL=size.js.map"],"names":["clamp","min","max","v","LayoutGroupContext","createContext","LazyContext","strict","MotionConfigContext","transformPagePoint","p","isStatic","reducedMotion","MotionContext","isCSSVariableName","token","key","startsWith","checkStringStartsWith","number","test","parse","parseFloat","transform","alpha","scale","default","sanitize","Math","round","floatRegex","singleColorRegex","isColorString","type","testProp","Boolean","isNullish","Object","prototype","hasOwnProperty","call","splitColor","aName","bName","cName","a","b","c","match","undefined","rgbUnit","clampRgbUnit","rgba","red","green","blue","alpha$1","hex","r","g","length","substring","parseInt","createUnitType","unit","endsWith","split","degrees","percent","px","progressPercentage","hsla","hue","saturation","lightness","color","getAnimatableNone","parsed","colorRegex","NUMBER_TOKEN","COLOR_TOKEN","complexRegex","analyseComplexValue","value","originalValue","toString","values","indexes","var","types","i","replace","parsedValue","push","buildTransformer","numSections","output","convertToZero","splitBefore","trim","complex","isNaN","createTransformer","source","info","transformer","map","transformPropOrder","transformProps","Set","resolveVariantFromProps","props","definition","custom","visualElement","current","velocity","variants","isMotionValue","getVelocity","optimizedAppearDataAttribute","toLowerCase","int","numberValueTypes","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY","rotate","pathRotation","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ","skew","skewX","skewY","distance","translateX","translateY","translateZ","x","y","z","perspective","transformPerspective","opacity","originX","originY","originZ","zIndex","fillOpacity","strokeOpacity","numOctaves","getValueAsType","isAnimationControls","start","isVariantLabel","Array","isArray","variantProps","isControllingVariants","animate","some","name","featureDefinitions","translateAlias","numTransforms","buildHTMLStyles","state","latestValues","transformTemplate","style","vars","transformOrigin","hasTransform","hasTransformOrigin","has","valueAsType","transformString","transformIsDefault","valueIsDefault","buildTransform","pixelsToPercent","pixels","axis","correctBorderRadius","correct","latest","node","target","correctBoxShadow","treeScale","projectionDelta","original","shadow","template","offset","xScale","yScale","averageScale","from","scaleCorrectors","applyTo","boxShadow","isForcedMotionValue","layout","layoutId","scrapeMotionValuesFromProps","prevProps","prevStyle","newValues","getValue","liveStyle","dashKeys","array","camelKeys","cssMotionPathProperties","buildSVGAttrs","attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset","isSVGTag","styleProp","viewBox","attrs","transformBox","spacing","useDashCase","keys","buildSVGPath","resolveMotionValue","get","useCreateMotionContext","initial","context","inherit","getCurrentTreeVariants","useContext","useMemo","variantLabelsAsDependency","prop","join","createHtmlRenderState","copyRawValuesOnly","useStyle","visualState","assign","useInitialMotionValues","useHTMLProps","htmlProps","drag","dragListener","draggable","userSelect","WebkitUserSelect","WebkitTouchCallout","touchAction","tabIndex","onTap","onTapStart","whileTap","createSvgRenderState","useSVGProps","_isStatic","Component","visualProps","tag","rawStyles","validMotionProps","isValidMotionProp","shouldForward","isValidProp","require","lowercaseSVGElements","isSVGComponent","includes","indexOf","useRender","ref","forwardMotionProps","isSVG","filteredProps","isDom","filterProps","elementProps","Fragment","children","renderedChildren","createElement","PresenceContext","makeLatestValues","presenceContext","scrapeMotionValues","motionValues","checkIsControllingVariants","isVariantNode","checkIsVariantNode","isInitialAnimationBlocked","variantToSet","list","resolved","transitionEnd","transition","valueTarget","makeUseVisualState","config","make","createRenderState","renderState","makeState","init","useRef","useConstant","useHTMLVisualState","scrapeHTMLMotionValuesFromProps","useSVGVisualState","scrapeMotionValuesFromProps$1","charAt","toUpperCase","featureProps","animation","exit","focus","hover","tap","pan","inView","isInitialized","initFeatureDefinitions","initialFeatureDefinitions","isEnabled","getInitializedFeatureDefinitions","motionComponentSymbol","Symbol","for","useMotionRef","externalRef","externalRefContainer","useInsertionEffect","refCleanup","useCallback","instance","onMount","mount","unmount","cleanup","SwitchLayoutGroupContext","isRefObject","useIsomorphicLayoutEffect","window","useLayoutEffect","useEffect","useVisualElement","createVisualElement","ProjectionNodeConstructor","parent","lazyContext","motionConfig","reducedMotionConfig","skipAnimations","visualElementRef","hasMountedOnce","renderer","blockInitialAnimation","manuallyAnimateOnMount","initialLayoutGroupConfig","projection","initialPromotionConfig","dragConstraints","layoutScroll","layoutRoot","layoutAnchor","layoutCrossfade","getClosestProjectingNode","setOptions","alwaysMeasureLayout","animationType","crossfade","createProjectionNode","isMounted","update","optimisedAppearId","wantsHandoff","MotionHandoffIsComplete","MotionHasOptimisedAnimation","MotionIsMounted","updateFeatures","scheduleRenderMicrotask","animationState","animateChanges","queueMicrotask","MotionHandoffMarkAsComplete","enteringChildren","options","allowProjection","createMotionComponent","preloadedFeatures","useVisualState","MotionDOMComponent","MeasureLayout","configAndProps","useLayoutId","layoutProjection","combined","ProjectionNode","getProjectionFunctionality","_jsxs","Provider","_jsx","displayName","ForwardRefMotionComponent","forwardRef","layoutGroupId","id","createMinimalMotionComponent","MotionDiv"],"mappings":"+PAAA,MAAMA,EAAQ,CAACC,EAAKC,EAAKC,IACjBA,EAAID,EACGA,EACPC,EAAIF,EACGA,EACJE,ECHEC,EAAqBC,EAAc,ICAnCC,EAAcD,EAAc,CAAEE,QAAQ,ICGtCC,EAAsBH,EAAc,CAC7CI,mBAAqBC,GAAMA,EAC3BC,UAAU,EACVC,cAAe,UCNNC,EAAgCR,EAAc,ICDrDS,EADwB,CAACC,GAAWC,GAAuB,iBAARA,GAAoBA,EAAIC,WAAWF,GAE9EG,CAAsB,MCA9BC,EAAS,CACXC,KAAOjB,GAAmB,iBAANA,EACpBkB,MAAOC,WACPC,UAAYpB,GAAMA,GAEhBqB,EAAQ,IACPL,EACHI,UAAYpB,GAAMH,EAAM,EAAG,EAAGG,IAE5BsB,EAAQ,IACPN,EACHO,QAAS,GCXPC,EAAYxB,GAAMyB,KAAKC,MAAU,IAAJ1B,GAAc,ICF3C2B,EAAa,8BCAnB,MAAMC,EAAmB,sHCQnBC,EAAgB,CAACC,EAAMC,IAAc/B,GAChCgC,QAAsB,iBAANhC,GACnB4B,EAAiBX,KAAKjB,IACtBA,EAAEc,WAAWgB,IACZC,ICZT,SAAmB/B,GACf,OAAY,MAALA,CACX,CDWaiC,CAAUjC,IACXkC,OAAOC,UAAUC,eAAeC,KAAKrC,EAAG+B,IAE9CO,EAAa,CAACC,EAAOC,EAAOC,IAAWzC,IACzC,GAAiB,iBAANA,EACP,OAAOA,EACX,MAAO0C,EAAGC,EAAGC,EAAGvB,GAASrB,EAAE6C,MAAMlB,GACj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AAsBnI,EAAWiI,EAC5C,CCqCO,MCvCMsB,GDuC0BD,GAA6B"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-motion.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-motion.js deleted file mode 100644 index 2a4c26cb..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-motion.js +++ /dev/null @@ -1,2 +0,0 @@ -import{jsxs as t,jsx as e}from"react/jsx-runtime";import{createContext as n,useContext as i,useMemo as s,Fragment as o,createElement as r,useRef as a,useInsertionEffect as l,useCallback as h,useLayoutEffect as u,useEffect as c,forwardRef as d,useId as p,Component as m}from"react";function f(t,e){-1===t.indexOf(e)&&t.push(e)}function y(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const g=(t,e,n)=>n>e?e:n{},w=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(x=(t,e,n)=>{t||"undefined"==typeof console||console.warn(v(e,n))},w=(t,e,n)=>{if(!t)throw new Error(v(e,n))});const T={},S=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),P=t=>"object"==typeof t&&null!==t,b=t=>/^0[^.\s]+$/u.test(t);function E(t){let e;return()=>(void 0===e&&(e=t()),e)}const A=t=>t,M=(...t)=>t.reduce((t,e)=>n=>e(t(n))),V=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class C{constructor(){this.subscriptions=[]}add(t){return f(this.subscriptions,t),()=>y(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s1e3*t,D=t=>t/1e3,R=(t,e)=>e?t*(1e3/e):0,L=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function B(t,e,n,i){if(t===e&&n===i)return A;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=L(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:L(s(t),e,i)}const j=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,F=t=>e=>1-t(1-e),I=B(.33,1.53,.69,.99),O=F(I),U=j(O),W=t=>t>=1?1:(t*=2)<1?.5*O(t):.5*(2-Math.pow(2,-10*(t-1))),N=t=>1-Math.sin(Math.acos(t)),$=F(N),z=j(N),Y=B(.42,0,1,1),X=B(0,0,.58,1),H=B(.42,0,.58,1),K=t=>Array.isArray(t)&&"number"==typeof t[0],G={linear:A,easeIn:Y,easeInOut:H,easeOut:X,circIn:N,circInOut:z,circOut:$,backIn:O,backInOut:U,backOut:I,anticipate:W},q=t=>{if(K(t)){w(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,s]=t;return B(e,n,i,s)}return"string"==typeof t?(w(void 0!==G[t],`Invalid easing type '${t}'`,"invalid-easing-type"),G[t]):t},Z=n({}),_=n({strict:!1}),J=n({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Q=n({}),tt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function et(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=tt.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(r=t,i)return void(s=!0);i=!0;const o=e;e=n,n=o,e.forEach(a),e.clear(),i=!1,s&&(s=!1,l.process(t))}};return l}(o),t),{}),{setup:a,read:l,resolveKeyframes:h,preUpdate:u,update:c,preRender:d,render:p,postRender:m}=r,f=()=>{const o=T.useManualTiming,r=o?s.timestamp:performance.now();n=!1,o||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,a.process(s),l.process(s),h.process(s),u.process(s),c.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:tt.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e(void 0===rt&<.set(st.isProcessing||T.useManualTiming?st.timestamp:performance.now()),rt),set:t=>{rt=t,queueMicrotask(at)}},ht=t=>e=>"string"==typeof e&&e.startsWith(t),ut=ht("--"),ct=ht("var(--"),dt=t=>!!ct(t)&&pt.test(t.split("/*")[0].trim()),pt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function mt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const ft={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},yt={...ft,transform:t=>g(0,1,t)},gt={...ft,default:1},vt=t=>Math.round(1e5*t)/1e5,xt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const wt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Tt=(t,e)=>n=>Boolean("string"==typeof n&&wt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),St=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(xt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Pt={...ft,transform:t=>Math.round((t=>g(0,255,t))(t))},bt={test:Tt("rgb","red"),parse:St("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Pt.transform(t)+", "+Pt.transform(e)+", "+Pt.transform(n)+", "+vt(yt.transform(i))+")"};const Et={test:Tt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:bt.transform},At=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Mt=At("deg"),Vt=At("%"),Ct=At("px"),kt=At("vh"),Dt=At("vw"),Rt=(()=>({...Vt,parse:t=>Vt.parse(t)/100,transform:t=>Vt.transform(100*t)}))(),Lt={test:Tt("hsl","hue"),parse:St("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Vt.transform(vt(e))+", "+Vt.transform(vt(n))+", "+vt(yt.transform(i))+")"},Bt={test:t=>bt.test(t)||Et.test(t)||Lt.test(t),parse:t=>bt.test(t)?bt.parse(t):Lt.test(t)?Lt.parse(t):Et.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?bt.transform(t):Lt.transform(t),getAnimatableNone:t=>{const e=Bt.parse(t);return e.alpha=0,Bt.transform(e)}},jt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Ft="number",It="color",Ot=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ut(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Ot,t=>(Bt.test(t)?(i.color.push(o),s.push(It),n.push(Bt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(Ft),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Wt({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:Bt.test(n)?Bt.getAnimatableNone(n):n;var n};const $t={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(xt)?.length||0)+(t.match(jt)?.length||0)>0},parse:function(t){return Ut(t).values},createTransformer:function(t){return Wt(Ut(t))},getAnimatableNone:function(t){const e=Ut(t);return Wt(e)(e.values.map((t,n)=>Nt(t,e.split[n])))}};function zt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Yt(t,e){return n=>n>0?e:t}const Xt=(t,e,n)=>t+(e-t)*n,Ht=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Kt=[Et,bt,Lt];function Gt(t){const e=(n=t,Kt.find(t=>t.test(n)));var n;if(x(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let i=e.parse(t);return e===Lt&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=zt(a,i,t+1/3),o=zt(a,i,t),r=zt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const qt=(t,e)=>{const n=Gt(t),i=Gt(e);if(!n||!i)return Yt(t,e);const s={...n};return t=>(s.red=Ht(n.red,i.red,t),s.green=Ht(n.green,i.green,t),s.blue=Ht(n.blue,i.blue,t),s.alpha=Xt(n.alpha,i.alpha,t),bt.transform(s))},Zt=new Set(["none","hidden"]);function _t(t,e){return n=>Xt(t,e,n)}function Jt(t){return"number"==typeof t?_t:"string"==typeof t?dt(t)?Yt:Bt.test(t)?qt:ee:Array.isArray(t)?Qt:"object"==typeof t?Bt.test(t)?qt:te:Yt}function Qt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Jt(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in i)n[e]=i[e](t);return n}}const ee=(t,e)=>{const n=$t.createTransformer(e),i=Ut(t),s=Ut(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Zt.has(t)&&!s.values.length||Zt.has(e)&&!i.values.length?function(t,e){return Zt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):M(Qt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>nt.update(e,t),stop:()=>it(e),now:()=>st.isProcessing?st.timestamp:lt.now()}},se=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e=oe?1/0:e}const ae=100,le=10,he=1,ue=0,ce=800,de=.3,pe=.3,me={granular:.01,default:2},fe={granular:.005,default:.5},ye=.01,ge=10,ve=.05,xe=1;function we(t,e){return t*Math.sqrt(1-e*e)}const Te=.001;const Se=["duration","bounce"],Pe=["stiffness","damping","mass"];function be(t,e){return e.some(e=>void 0!==t[e])}function Ee(t){let e={velocity:ue,stiffness:ae,damping:le,mass:he,isResolvedFromDuration:!1,...t};if(!be(t,Pe)&&be(t,Se))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*g(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:he,stiffness:s,damping:o}}else{const n=function({duration:t=ce,bounce:e=de,velocity:n=ue,mass:i=he}){let s,o;x(t<=k(ge),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=g(ve,xe,r),t=g(ye,ge,D(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=we(e,r),l=Math.exp(-s);return Te-o/a*l},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),h=we(Math.pow(e,2),r);return(-s(e)+Te>0?-1:1)*((o-a)*l)/h}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=k(t),isNaN(a))return{stiffness:ae,damping:le,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}({...t,velocity:0});e={...e,...n,mass:he},e.isResolvedFromDuration=!0}return e}function Ae(t=pe,e=de){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:h,mass:u,duration:c,velocity:d,isResolvedFromDuration:p}=Ee({...n,velocity:-D(n.velocity||0)}),m=d||0,f=h/(2*Math.sqrt(l*u)),y=r-o,g=D(Math.sqrt(l/u)),v=Math.abs(y)<5;let x,w,T,S,P,b;if(i||(i=v?me.granular:me.default),s||(s=v?fe.granular:fe.default),f<1)T=we(g,f),S=(m+f*g*y)/T,x=t=>{const e=Math.exp(-f*g*t);return r-e*(S*Math.sin(T*t)+y*Math.cos(T*t))},P=f*g*S+y*T,b=f*g*y-S*T,w=t=>Math.exp(-f*g*t)*(P*Math.sin(T*t)+b*Math.cos(T*t));else if(1===f){x=t=>r-Math.exp(-g*t)*(y+(m+g*y)*t);const t=m+g*y;w=e=>Math.exp(-g*e)*(g*t*e-m)}else{const t=g*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*g*e),i=Math.min(t*e,300);return r-n*((m+f*g*y)*Math.sinh(i)+t*y*Math.cosh(i))/t};const e=(m+f*g*y)/t,n=f*g*e-y*t,i=f*g*y-e*t;w=e=>{const s=Math.exp(-f*g*e),o=Math.min(t*e,300);return s*(n*Math.sinh(o)+i*Math.cosh(o))}}const E={calculatedDuration:p&&c||null,velocity:t=>k(w(t)),next:t=>{if(!p&&f<1){const e=Math.exp(-f*g*t),n=Math.sin(T*t),o=Math.cos(T*t),l=r-e*(S*n+y*o),h=k(e*(P*n+b*o));return a.done=Math.abs(h)<=i&&Math.abs(r-l)<=s,a.value=a.done?r:l,a}const e=x(t);if(p)a.done=t>=c;else{const n=k(w(t));a.done=Math.abs(n)<=i&&Math.abs(r-e)<=s}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(re(E),oe),e=se(e=>E.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return E}Ae.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(re(i),oe);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:D(s)}}(t,100,Ae);return t.ease=e.ease,t.duration=k(e.duration),t.type="keyframes",t};function Me(t,e,n){const i=Math.max(e-5,0);return R(n-t(i),e-i)}function Ve({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:h=.5,restSpeed:u}){const c=t[0],d={done:!1,value:c},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=h,d.value=d.done?y:n};let w,T;const S=t=>{var e;(e=d.value,void 0!==a&&el)&&(w=t,T=Ae({keyframes:[d.value,p(d.value)],velocity:Me(v,t,d.value),damping:s,stiffness:o,restDelta:h,restSpeed:u}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==w||(e=!0,x(t),S(t)),void 0!==w&&t>=w?T.next(t-w):(!e&&x(t),d)}}}function Ce(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(w(o===e.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||T.mix||ne,o=t.length-1;for(let n=0;n{if(r&&n1)for(;ih(g(t[0],t[o-1],e)):h}function ke(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=V(0,e,i);t.push(Xt(n,1,s))}}(e,t.length-1),e}function De({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(q):q(i),o={done:!1,value:e[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:ke(e),t),a=Ce(r,e,{ease:Array.isArray(s)?s:(l=e,h=s,l.map(()=>h||H).splice(0,l.length-1))});var l,h;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const Re=t=>null!==t;function Le(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Re),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Be={decay:Ve,inertia:Ve,tween:De,keyframes:De,spring:Ae};function je(t){"string"==typeof t.type&&(t.type=Be[t.type])}class Fe{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ie=t=>t/100;class Oe extends Fe{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==lt.now()&&this.tick(lt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;je(t);const{type:e=De,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||De;a!==De&&"number"!=typeof r[0]&&(this.mixKeyframes=M(Ie,ne(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=re(l));const{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:h,repeat:u,repeatType:c,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let x,w=this.currentTime,T=n;if(u){const t=Math.min(this.currentTime,i)/r;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,u+1);Boolean(e%2)&&("reverse"===c?(n=1-n,d&&(n-=d/r)):"mirror"===c&&(T=o)),w=g(0,1,n)*r}v?(this.delayState.value=h[0],x=this.delayState):x=T.next(w),s&&!v&&(x.value=s(x.value));let{done:S}=x;v||null===a||(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const P=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return P&&p!==Ve&&(x.value=Le(h,this.options,f,this.speed)),m&&m(x.value),P&&this.finish(),x}then(t,e){return this.finished.then(t,e)}get duration(){return D(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+D(t)}get time(){return D(this.currentTime)}set time(t){t=k(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return Me(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(lt.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=D(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ie,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(lt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Ue=t=>180*t/Math.PI,We=t=>{const e=Ue(Math.atan2(t[1],t[0]));return $e(e)},Ne={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:We,rotateZ:We,skewX:t=>Ue(Math.atan(t[1])),skewY:t=>Ue(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},$e=t=>((t%=360)<0&&(t+=360),t),ze=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ye=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Xe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ze,scaleY:Ye,scale:t=>(ze(t)+Ye(t))/2,rotateX:t=>$e(Ue(Math.atan2(t[6],t[5]))),rotateY:t=>$e(Ue(Math.atan2(-t[2],t[0]))),rotateZ:We,rotate:We,skewX:t=>Ue(Math.atan(t[4])),skewY:t=>Ue(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function He(t){return t.includes("scale")?1:0}function Ke(t,e){if(!t||"none"===t)return He(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Xe,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Ne,s=e}if(!s)return He(e);const o=i[e],r=s[1].split(",").map(Ge);return"function"==typeof o?o(r):r[o]}function Ge(t){return parseFloat(t.trim())}const qe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ze=(()=>new Set([...qe,"pathRotation"]))(),_e=t=>t===ft||t===Ct,Je=new Set(["x","y","z"]),Qe=qe.filter(t=>!Je.has(t));const tn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ke(e,"x"),y:(t,{transform:e})=>Ke(e,"y")};tn.translateX=tn.x,tn.translateY=tn.y;const en=new Set;let nn=!1,sn=!1,on=!1;function rn(){if(sn){const t=Array.from(en).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Qe.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}sn=!1,nn=!1,en.forEach(t=>t.complete(on)),en.clear()}function an(){en.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(sn=!0)})}class ln{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(en.add(this),nn||(nn=!0,nt.read(an),nt.resolveKeyframes(rn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}!function(t){for(let e=1;et.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}const un={};function cn(t,e){const n=E(t);return()=>un[e]??n()}const dn=cn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),pn=cn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),mn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,fn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mn([0,.65,.55,1]),circOut:mn([.55,0,1,.45]),backIn:mn([.31,.01,.66,-.59]),backOut:mn([.33,1.53,.69,.99])};function yn(t,e){return t?"function"==typeof t?pn()?se(t,e):"ease-out":K(t)?mn(t):Array.isArray(t)?t.map(t=>yn(t,e)||fn.easeOut):fn[t]:void 0}function gn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},h=void 0){const u={[e]:n};l&&(u.offset=l);const c=yn(a,s);Array.isArray(c)&&(u.easing=c);const d={delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};h&&(d.pseudoElement=h);return t.animate(u,d)}function vn(t){return"function"==typeof t&&"applyToOptions"in t}class xn extends Fe{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,w("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return vn(t)&&pn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=gn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=Le(i,this.options,r,this.speed);this.updateMotionValue&&this.updateMotionValue(t),hn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return D(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+D(t)}get time(){return D(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=k(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&dn()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),A):i(this)}}const wn={anticipate:W,backInOut:U,circInOut:z};function Tn(t){"string"==typeof t.ease&&t.ease in wn&&(t.ease=wn[t.ease])}class Sn extends xn{constructor(t){Tn(t),je(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new Oe({...o,autoplay:!1}),a=Math.max(10,lt.now()-this.startTime),l=g(0,10,a-10),h=r.sample(a).value,{name:u}=this.options;s&&u&&hn(s,u,h),e.setWithVelocity(r.sample(Math.max(0,a-l)).value,h,l),r.stop()}}const Pn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!$t.test(t)&&"0"!==t||t.startsWith("url(")));function bn(t){t.duration=0,t.type="keyframes"}const En=new Set(["opacity","clipPath","filter","transform"]),An=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Mn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Vn=E(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Cn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:u}=e.owner.getProps();return Vn()&&n&&(En.has(n)||Mn.has(n)&&function(t){for(let e=0;e{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=lt.now();const c={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:h,...u},d=h?.KeyframeResolver||ln;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,c,!n),a,l,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:r,delay:a,isHandoff:l,onUpdate:h}=n;this.resolvedAt=lt.now();let u=!0;(function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Pn(s,e),a=Pn(o,e);return x(r===a,`You are trying to animate ${e} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},d=u&&!l&&Cn(c),p=c.motionValue?.owner?.current;let m;if(d)try{m=new Sn({...c,element:p})}catch{m=new Oe(c)}else m=new Oe(c);m.finished.then(()=>{this.notifyFinished()}).catch(A),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),on=!0,an(),rn(),on=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Dn(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}class Rn{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=lt.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=lt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new C);const n=this.events[t].add(e);return"change"===t?()=>{n(),nt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=lt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return R(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ln(t,e){return new Rn(t,e)}function Bn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function jn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Bn(n,t):n}const Fn={type:"spring",stiffness:500,damping:25,restSpeed:10},In={type:"keyframes",duration:.8},On={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Un=(t,{keyframes:e})=>e.length>2?In:Ze.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Fn:On,Wn=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const Nn=(t,e,n,i={},s,o)=>r=>{const a=jn(i,t)||{},l=a.delay||i.delay||0;let{elapsed:h=0}=i;h-=k(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function(t){for(const e in t)if(!Wn.has(e))return!0;return!1})(a)||Object.assign(u,Un(t,u)),u.duration&&(u.duration=k(u.duration)),u.repeatDelay&&(u.repeatDelay=k(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let c=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(bn(u),0===u.delay&&(c=!0)),(T.instantAnimations||T.skipAnimations||s?.shouldSkipAnimations||a.skipAnimations)&&(c=!0,bn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,c&&!o&&void 0!==e.get()){const t=Le(u.keyframes,a);if(void 0!==t)return void nt.update(()=>{u.onUpdate(t),u.onComplete()})}return a.isSync?new Oe(u):new kn(u)},$n=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zn(t,e,n=1){w(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=function(t){const e=$n.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return S(t)?parseFloat(t):t}return dt(s)?zn(s,e,n+1):s}function Yn(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Xn(t,e,n,i){if("function"==typeof e){const[s,o]=Yn(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=Yn(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function Hn(t,e,n){const i=t.getProps();return Xn(i,e,void 0!==n?n:i.custom,t)}const Kn=new Set(["width","height","top","left","right","bottom",...qe]),Gn=t=>Array.isArray(t);function qn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ln(n))}function Zn(t){return Gn(t)?t[t.length-1]||0:t}const _n=t=>Boolean(t&&t.getVelocity);function Jn(t,e){const n=t.getValue("willChange");if(i=n,Boolean(_n(i)&&i.add))return n.add(e);if(!n&&T.WillChange){const n=new T.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function Qn(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ti="data-"+Qn("framerAppearId");function ei(t){return t.props[ti]}function ni({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function ii(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Bn(o,l):l;const h=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const c=[],d=s&&t.animationState&&t.animationState.getState()[s],p=o?.path;p&&p.animateVisualElement(t,a,o,n,c);for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&ni(d,e))continue;const r={delay:n,...jn(o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){nt.update(()=>i.set(s));continue}let p=!1;if(window.MotionHandoffAnimation){const n=ei(t);if(n){const t=window.MotionHandoffAnimation(n,e,nt);null!==t&&(r.startTime=t,p=!0)}}Jn(t,e);const m=h??t.shouldReduceMotion;i.start(Nn(e,i,s,m&&Kn.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&c.push(f)}if(r){const e=()=>nt.update(()=>{r&&function(t,e){const n=Hn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o)qn(t,e,Zn(o[e]))}(t,r)});c.length?Promise.all(c).then(e):e()}return c}function si(t,e,n={}){const i=Hn(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(ii(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(si(l,e,{...r,delay:n+("function"==typeof i?0:i)+Dn(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}const oi=t=>e=>e.test(t),ri=[ft,Ct,Vt,Mt,Dt,kt,{test:t=>"auto"===t,parse:t=>t}],ai=t=>ri.find(oi(t));function li(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||b(t))}const hi=new Set(["brightness","contrast","saturate","opacity"]);function ui(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(xt)||[];if(!i)return t;const s=n.replace(i,"");let o=hi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const ci=/\b([a-z-]*)\(.*?\)/gu,di={...$t,getAnimatableNone:t=>{const e=t.match(ci);return e?e.map(ui).join(" "):t}},pi={...$t,getAnimatableNone:t=>{const e=$t.parse(t);return $t.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},mi={...ft,transform:Math.round},fi={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,inset:Ct,insetBlock:Ct,insetBlockStart:Ct,insetBlockEnd:Ct,insetInline:Ct,insetInlineStart:Ct,insetInlineEnd:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,paddingBlock:Ct,paddingBlockStart:Ct,paddingBlockEnd:Ct,paddingInline:Ct,paddingInlineStart:Ct,paddingInlineEnd:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,marginBlock:Ct,marginBlockStart:Ct,marginBlockEnd:Ct,marginInline:Ct,marginInlineStart:Ct,marginInlineEnd:Ct,fontSize:Ct,backgroundPositionX:Ct,backgroundPositionY:Ct,...{rotate:Mt,pathRotation:Mt,rotateX:Mt,rotateY:Mt,rotateZ:Mt,scale:gt,scaleX:gt,scaleY:gt,scaleZ:gt,skew:Mt,skewX:Mt,skewY:Mt,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:yt,originX:Rt,originY:Rt,originZ:Ct},zIndex:mi,fillOpacity:yt,strokeOpacity:yt,numOctaves:mi},yi={...fi,color:Bt,backgroundColor:Bt,outlineColor:Bt,fill:Bt,stroke:Bt,borderColor:Bt,borderTopColor:Bt,borderRightColor:Bt,borderBottomColor:Bt,borderLeftColor:Bt,filter:di,WebkitFilter:di,mask:pi,WebkitMask:pi},gi=t=>yi[t],vi=new Set([di,pi]);function xi(t,e){let n=gi(t);return vi.has(n)||(n=$t),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const wi=new Set(["auto","none","0"]);class Ti extends ln{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}function Si(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=n?.[t]??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(t=>null!=t)}const Pi=(t,e)=>e&&"number"==typeof t?e.transform(t):t;const{schedule:bi}=et(queueMicrotask,!1),Ei={x:!1,y:!1};function Ai(){return Ei.x||Ei.y}function Mi(t,e){const n=Si(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Vi(t,e,n={}){const[i,s,o]=Mi(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||Ai())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o}const Ci=(t,e)=>!!e&&(t===e||Ci(t,e.parentElement)),ki=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Di=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Ri=new Set(["INPUT","SELECT","TEXTAREA"]);const Li=new WeakSet;function Bi(t){return e=>{"Enter"===e.key&&t(e)}}function ji(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Fi(t){return ki(t)&&!Ai()}const Ii=new WeakSet;function Oi(t,e,n={}){const[i,s,o]=Mi(t,n),r=t=>{const i=t.currentTarget;if(!Fi(t))return;if(Ii.has(t))return;Li.add(i),n.stopPropagation&&Ii.add(t);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Li.has(i)&&Li.delete(i),Fi(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Ci(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),P(e=t)&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Bi(()=>{if(Li.has(n))return;ji(n,"down");const t=Bi(()=>{ji(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>ji(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),function(t){return Di.has(t.tagName)||!0===t.isContentEditable}(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function Ui(t){return P(t)&&"ownerSVGElement"in t}const Wi=new WeakMap;let Ni;const $i=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Ui(i)&&"getBBox"in i?i.getBBox()[e]:i[n],zi=$i("inline","width","offsetWidth"),Yi=$i("block","height","offsetHeight");function Xi({target:t,borderBoxSize:e}){Wi.get(t)?.forEach(n=>{n(t,{get width(){return zi(t,e)},get height(){return Yi(t,e)}})})}function Hi(t){t.forEach(Xi)}function Ki(t,e){Ni||"undefined"!=typeof ResizeObserver&&(Ni=new ResizeObserver(Hi));const n=Si(t);return n.forEach(t=>{let n=Wi.get(t);n||(n=new Set,Wi.set(t,n)),n.add(e),Ni?.observe(t)}),()=>{n.forEach(t=>{const n=Wi.get(t);n?.delete(e),n?.size||Ni?.unobserve(t)})}}const Gi=new Set;let qi;function Zi(t){return Gi.add(t),qi||(qi=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Gi.forEach(e=>e(t))},window.addEventListener("resize",qi)),()=>{Gi.delete(t),Gi.size||"function"!=typeof qi||(window.removeEventListener("resize",qi),qi=void 0)}}function _i(t,e){return"function"==typeof t?Zi(t):Ki(t,e)}const Ji=[...ri,Bt,$t],Qi=()=>({x:{min:0,max:0},y:{min:0,max:0}}),ts=new WeakMap;function es(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ns(t){return"string"==typeof t||Array.isArray(t)}const is=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ss=["initial",...is];function os(t){return es(t.animate)||ss.some(e=>ns(t[e]))}function rs(t){return Boolean(os(t)||t.variants)}const as={current:null},ls={current:!1},hs="undefined"!=typeof window;const us=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let cs={};function ds(t){cs=t}class ps{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ln,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=lt.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ls.current||function(){if(ls.current=!0,hs)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>as.current=t.matches;t.addEventListener("change",e),e()}else as.current=!1}(),this.shouldReduceMotion=as.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&En.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new xn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:k(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=Ze.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&nt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in cs){const e=cs[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Ln(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(S(n)||b(n))?n=parseFloat(n):(i=n,!Ji.find(oi(i))&&$t.test(e)&&(n=xi(t,e))),this.setBaseTarget(t,_n(n)?n.get():n)),_n(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Xn(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||_n(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new C),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){bi.render(this.render)}}class ms extends ps{constructor(){super(...arguments),this.KeyframeResolver=Ti}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_n(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class fs{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ys({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function gs(t){return void 0===t||1===t}function vs({scale:t,scaleX:e,scaleY:n}){return!gs(t)||!gs(e)||!gs(n)}function xs(t){return vs(t)||ws(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ws(t){return Ts(t.x)||Ts(t.y)}function Ts(t){return t&&"0%"!==t}function Ss(t,e,n){return n+e*(t-n)}function Ps(t,e,n,i,s){return void 0!==s&&(t=Ss(t,s,i)),Ss(t,n,i)+e}function bs(t,e=0,n=1,i,s){t.min=Ps(t.min,e,n,i,s),t.max=Ps(t.max,e,n,i,s)}function Es(t,{x:e,y:n}){bs(t.x,e.translate,e.scale,e.originPoint),bs(t.y,n.translate,n.scale,n.originPoint)}const As=.999999999999,Ms=1.0000000000001;function Vs(t,e){t.min+=e,t.max+=e}function Cs(t,e,n,i,s=.5){bs(t,e,n,Xt(t.min,t.max,s),i)}function ks(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function Ds(t,e,n){const i=n??t;Cs(t.x,ks(e.x,i.x),e.scaleX,e.scale,e.originX),Cs(t.y,ks(e.y,i.y),e.scaleY,e.scale,e.originY)}function Rs(t,e){return ys(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const Ls={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Bs=qe.length;function js(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(Ze.has(t))r=!0;else if(ut(t))s[t]=n;else{const e=Pi(n,fi[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=function(t,e,n){let i="",s=!0;for(let o=0;o{if(!e.target)return t;if("string"==typeof t){if(!Ct.test(t))return t;t=parseFloat(t)}return`${Is(t,e.target.x)}% ${Is(t,e.target.y)}%`}},Us={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=$t.parse(t);if(s.length>5)return i;const o=$t.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const h=Xt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=h),"number"==typeof s[3+r]&&(s[3+r]/=h),o(s)}},Ws={borderRadius:{...Os,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Os,borderTopRightRadius:Os,borderBottomLeftRadius:Os,borderBottomRightRadius:Os,boxShadow:Us};function Ns(t,{layout:e,layoutId:n}){return Ze.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ws[t]||"opacity"===t)}function $s(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(_n(i[e])||s&&_n(s[e])||Ns(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class zs extends ms{constructor(){super(...arguments),this.type="html",this.renderInstance=Fs}readValueFromInstance(t,e){if(Ze.has(e))return this.projection?.isProjecting?He(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ke(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(ut(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Rs(t,e)}build(t,e,n){js(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return $s(t,e,n)}}const Ys={offset:"stroke-dashoffset",array:"stroke-dasharray"},Xs={offset:"strokeDashoffset",array:"strokeDasharray"};const Hs=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ks(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,h,u){if(js(t,a,h),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:c,style:d}=t;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete c.transformBox);for(const t of Hs)void 0!==c[t]&&(d[t]=c[t],delete c[t]);void 0!==e&&(c.x=e),void 0!==n&&(c.y=n),void 0!==i&&(c.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ys:Xs;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}(c,s,o,r,!1)}const Gs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),qs=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Zs(t,e,n){const i=$s(t,e,n);for(const n in t)if(_n(t[n])||_n(e[n])){i[-1!==qe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class _s extends ms{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qi}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ze.has(e)){const t=gi(e);return t&&t.default||0}return e=Gs.has(e)?e:Qn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Zs(t,e,n)}build(t,e,n){Ks(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Fs(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Gs.has(n)?n:Qn(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=qs(t.tagName),super.mount(t)}}const Js=ss.length;function Qs(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Qs(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;nPromise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>si(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=si(t,e,n);else{const s="function"==typeof e?Hn(t,e,n.custom):e;i=Promise.all(ii(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function so(t){let e=io(t),n=ao(),i=!0,s=!1;const o=e=>(n,i)=>{const s=Hn(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=Qs(t.parent)||{},h=[],u=new Set;let c={},d=1/0;for(let e=0;ed&&y,T=!1;const S=Array.isArray(f)?f:[f];let P=S.reduce(o(p),{});!1===g&&(P={});const{prevResolvedValues:b={}}=m,E={...b,...P},A=e=>{w=!0,u.has(e)&&(T=!0,u.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in E){const e=P[t],n=b[t];if(c.hasOwnProperty(t))continue;let i=!1;i=Gn(e)&&Gn(n)?!to(e,n)||x:e!==n,i?null!=e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=P,m.isActive&&(c={...c,...P}),(i||s)&&t.blockInitialAnimation&&(w=!1);const M=v&&x;w&&(!M||T)&&h.push(...S.map(e=>{const n={type:p};if("string"==typeof e&&(i||s)&&!M&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=Hn(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=Dn(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof a.initial){const n=Hn(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),h.push({animation:e})}let p=Boolean(h.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,s=!1,p?e(h):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=ao(),s=!0}}}function oo(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!to(e,t)}function ro(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ao(){return{animate:ro(!0),whileInView:ro(),whileHover:ro(),whileTap:ro(),whileDrag:ro(),whileFocus:ro(),exit:ro()}}function lo(t,e){t.min=e.min,t.max=e.max}function ho(t,e){lo(t.x,e.x),lo(t.y,e.y)}function uo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function co(t){return t.max-t.min}function po(t,e,n,i=.5){t.origin=i,t.originPoint=Xt(e.min,e.max,t.origin),t.scale=co(n)/co(e),t.translate=Xt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function mo(t,e,n,i){po(t.x,e.x,n.x,i?i.originX:void 0),po(t.y,e.y,n.y,i?i.originY:void 0)}function fo(t,e,n,i=0){const s=i?Xt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+co(e)}function yo(t,e,n,i=0){const s=i?Xt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+co(e)}function go(t,e,n,i){yo(t.x,e.x,n.x,i?.x),yo(t.y,e.y,n.y,i?.y)}function vo(t,e,n,i,s){return t=Ss(t-=e,1/n,i),void 0!==s&&(t=Ss(t,1/s,i)),t}function xo(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){Vt.test(e)&&(e=parseFloat(e),e=Xt(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Xt(o.min,o.max,i);t===o&&(a-=e),t.min=vo(t.min,e,n,a,s),t.max=vo(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const wo=["x","scaleX","originX"],To=["y","scaleY","originY"];function So(t,e,n,i){xo(t.x,e,wo,n?n.x:void 0,i?i.x:void 0),xo(t.y,e,To,n?n.y:void 0,i?i.y:void 0)}function Po(t){return 0===t.translate&&1===t.scale}function bo(t){return Po(t.x)&&Po(t.y)}function Eo(t,e){return t.min===e.min&&t.max===e.max}function Ao(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Mo(t,e){return Ao(t.x,e.x)&&Ao(t.y,e.y)}function Vo(t){return co(t.x)/co(t.y)}function Co(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function ko(t){return[t("x"),t("y")]}const Do=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Ro=Do.length,Lo=t=>"string"==typeof t?parseFloat(t):t,Bo=t=>"number"==typeof t||Ct.test(t);function jo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Fo=Oo(0,.5,$),Io=Oo(.5,.95,A);function Oo(t,e,n){return i=>ie?1:n(V(t,e,i))}function Uo(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Wo=(t,e)=>t.depth-e.depth;class No{constructor(){this.children=[],this.isDirty=!1}add(t){f(this.children,t),this.isDirty=!0}remove(t){y(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Wo),this.isDirty=!1,this.children.forEach(t)}}function $o(t){return _n(t)?t.get():t}class zo{constructor(){this.members=[]}add(t){f(this.members,t);for(let e=this.members.length-1;e>=0;e--){const n=this.members[e];if(n===t||n===this.lead||n===this.prevLead)continue;const i=n.instance;i&&!1!==i.isConnected||n.snapshot||(y(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(y(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Yo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Xo=["","X","Y","Z"];let Ho=0;function Ko(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Go(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ei(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",nt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Go(i)}function qo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=Ho++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Jo),this.nodes.forEach(ar),this.nodes.forEach(lr),this.nodes.forEach(Qo)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;nt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=lt.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(it(i),t(o-e))};return nt.setup(i,!0),()=>it(i)}(s,250),Yo.hasAnimatedSinceResize&&(Yo.hasAnimatedSinceResize=!1,this.nodes.forEach(rr)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||mr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Mo(this.targetLayout,i),h=!e&&n;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...jn(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h,e.path)}else e||rr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),it(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(hr),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Go(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||co(this.snapshot.measuredBox.x)||co(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;tAs&&(e.x=1),e.yAs&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(uo(this.prevProjectionDelta.x,this.projectionDelta.x),uo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),mo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Co(this.projectionDelta.x,this.prevProjectionDelta.x)&&Co(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,c=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(pr));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var h,m,f,y,g,v;i?(r.x.translate=i.x,r.x.scale=Xt(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Xt(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(cr(r.x,t.x,n),cr(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(go(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),f=this.relativeTarget,y=this.relativeTargetOrigin,g=a,v=n,dr(f.x,y.x,g.x,v),dr(f.y,y.y,g.y,v),d&&(h=this.relativeTarget,m=d,Eo(h.x,m.x)&&Eo(h.y,m.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),ho(d,this.relativeTarget)),l&&(this.animationValues=o,function(t,e,n,i,s,o){s?(t.opacity=Xt(0,n.opacity??1,Fo(i)),t.opacityExit=Xt(e.opacity??1,0,Io(i))):o&&(t.opacity=Xt(e.opacity??1,n.opacity??1,i));for(let s=0;s{Yo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ln(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(t,e,n){const i=_n(t)?t:Ln(t);return i.start(Nn("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&vr(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=co(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=co(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ho(e,n),Ds(e,s),mo(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new zo);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Ko("z",t,i,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(er),this.root.sharedNodes.clear()}}}function Zo(t){t.updateLayout()}function _o(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)ko(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=co(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";lo(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else vr(s,e.layoutBox,n)&&ko(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=co(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};mo(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?mo(a,t.applyTransform(i,!0),e.measuredBox):mo(a,n,e.layoutBox);const l=!bo(r);let h=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};go(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};go(l,n,o.layoutBox,r),Mo(a,l)||(h=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Jo(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Qo(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tr(t){t.clearSnapshot()}function er(t){t.clearMeasurements()}function nr(t){t.isLayoutDirty=!0,t.updateLayout()}function ir(t){t.isLayoutDirty=!1}function sr(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function or(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ar(t){t.resolveTargetDelta()}function lr(t){t.calcProjection()}function hr(t){t.resetSkewAndRotation()}function ur(t){t.removeLeadSnapshot()}function cr(t,e,n){t.translate=Xt(e.translate,0,n),t.scale=Xt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function dr(t,e,n,i){t.min=Xt(e.min,n.min,i),t.max=Xt(e.max,n.max,i)}function pr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const mr={duration:.45,ease:[.4,0,.1,1]},fr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),yr=fr("applewebkit/")&&!fr("chrome/")?Math.round:A;function gr(t){t.min=yr(t.min),t.max=yr(t.max)}function vr(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Vo(e),s=Vo(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function xr(t){return t!==t.root&&t.scroll?.wasRoot}const wr=qo({attachResizeListener:(t,e)=>Uo(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Tr={current:void 0},Sr=qo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Tr.current){const t=new wr({});t.mount(window),t.setOptions({layoutScroll:!0}),Tr.current=t}return Tr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function Pr(t){const{initial:e,animate:n}=function(t,e){if(os(t)){const{initial:e,animate:n}=t;return{initial:!1===e||ns(e)?e:void 0,animate:ns(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,i(Q));return s(()=>({initial:e,animate:n}),[br(e),br(n)])}function br(t){return Array.isArray(t)?t.join(" "):t}const Er=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ar(t,e,n){for(const i in e)_n(e[i])||Ns(i,n)||(t[i]=e[i])}function Mr(t,e){const n={};return Ar(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return s(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return js(n,e,t),Object.assign({},n.vars,n.style)},[e])}(t,e)),n}function Vr(t,e){const n={},i=Mr(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Cr=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function kr(t,e,n,i){const o=s(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ks(n,e,qs(i),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};Ar(e,t.style,t),o.style={...e,...o.style}}return o}const Dr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Rr(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Dr.has(t)}let Lr=t=>!Rr(t);try{"function"==typeof(Br=require("@emotion/is-prop-valid").default)&&(Lr=t=>t.startsWith("on")?!Rr(t):Br(t))}catch{}var Br;const jr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Fr(t){return"string"==typeof t&&!t.includes("-")&&!!(jr.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ir(t,e,n,{latestValues:i},a,l=!1,h){const u=(h??Fr(t)?kr:Vr)(e,i,a,t),c=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||_n(t[s])||(Lr(s)||!0===n&&Rr(s)||!e&&!Rr(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(e,"string"==typeof t,l),d=t!==o?{...c,...u,ref:n}:{},{children:p}=e,m=s(()=>_n(p)?p.get():p,[p]);return r(t,{...d,children:m})}const Or=n(null);function Ur(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=$o(o[t]);let{initial:r,animate:a}=t;const l=os(t),h=rs(t);e&&h&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const c=u?a:r;if(c&&"boolean"!=typeof c&&!es(c)){const e=Array.isArray(c)?c:[c];for(let n=0;n(e,n)=>{const s=i(Q),o=i(Or),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:Ur(n,i,s,t),renderState:e()}}(t,e,s,o);return n?r():function(t){const e=a(null);return null===e.current&&(e.current=t()),e.current}(r)},Nr=Wr({scrapeMotionValuesFromProps:$s,createRenderState:Er}),$r=Wr({scrapeMotionValuesFromProps:Zs,createRenderState:Cr}),zr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Yr=!1;function Xr(){return function(){if(Yr)return;const t={};for(const e in zr)t[e]={isEnabled:t=>zr[e].some(e=>!!t[e])};ds(t),Yr=!0}(),cs}const Hr=Symbol.for("motionComponentSymbol");function Kr(t,e,n){const i=a(n);l(()=>{i.current=n});const s=a(null);return h(n=>{n&&t.onMount?.(n),e&&(n?e.mount(n):e.unmount());const o=i.current;if("function"==typeof o)if(n){const t=o(n);"function"==typeof t&&(s.current=t)}else s.current?(s.current(),s.current=null):o(n);else o&&(o.current=n)},[e])}const Gr=n({});function qr(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const Zr="undefined"!=typeof window?u:c;function _r(t,e,n,s,o,r){const{visualElement:h}=i(Q),u=i(_),d=i(Or),p=i(J),m=p.reducedMotion,f=p.skipAnimations,y=a(null),g=a(!1);s=s||u.renderer,!y.current&&s&&(y.current=s(t,{visualState:e,parent:h,props:n,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:m,skipAnimations:f,isSVG:r}),g.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const v=y.current,x=i(Gr);!v||v.projection||!o||"html"!==v.type&&"svg"!==v.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:h,layoutAnchor:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Jr(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&qr(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:h,layoutAnchor:u})}(y.current,n,o,x);const w=a(!1);l(()=>{v&&w.current&&v.update(n,d)});const T=n[ti],S=a(Boolean(T)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(T)&&window.MotionHasOptimisedAnimation?.(T));return Zr(()=>{g.current=!0,v&&(w.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),S.current&&v.animationState&&v.animationState.animateChanges())}),c(()=>{v&&(!S.current&&v.animationState&&v.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(T)}),S.current=!1),v.enteringChildren=void 0)}),v}function Jr(t){if(t)return!1!==t.options.allowProjection?t.projection:Jr(t.parent)}function Qr(n,{forwardMotionProps:s=!1,type:o}={},r,a){r&&function(t){const e=Xr();for(const n in t)e[n]={...e[n],...t[n]};ds(e)}(r);const l=o?"svg"===o:Fr(n),h=l?$r:Nr;function u(o,r){let u;const c={...i(J),...o,layoutId:ta(o)},{isStatic:d}=c,p=Pr(o),m=h(o,d);if(!d&&"undefined"!=typeof window){i(_).strict;const t=function(t){const e=Xr(),{drag:n,layout:i}=e;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n?.isEnabled(t)||i?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}(c);u=t.MeasureLayout,p.visualElement=_r(n,m,c,a,t.ProjectionNode,l)}return t(Q.Provider,{value:p,children:[u&&p.visualElement?e(u,{visualElement:p.visualElement,...c}):null,Ir(n,o,Kr(m,p.visualElement,r),m,d,s,l)]})}u.displayName=`motion.${"string"==typeof n?n:`create(${n.displayName??n.name??""})`}`;const c=d(u);return c[Hr]=n,c}function ta({layoutId:t}){const e=i(Z).id;return e&&void 0!==t?e+"-"+t:t}const ea=(t,e)=>e.isSVG??Fr(t)?new _s(e):new zs(e,{allowProjection:t!==o});let na=0;const ia={animation:{Feature:class extends fs{constructor(t){super(t),t.animationState||(t.animationState=so(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();es(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends fs{constructor(){super(...arguments),this.id=na++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&!1===n){if(this.isExitComplete){const{initial:t,custom:e}=this.node.getProps();if("string"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)){const n=Hn(this.node,t,e);if(n){const{transition:t,transitionEnd:e,...i}=n;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function sa(t){return{point:{x:t.pageX,y:t.pageY}}}function oa(t,e,n,i){return Uo(t,e,(t=>e=>ki(e)&&t(e,sa(e)))(n),i)}const ra=({current:t})=>t?t.ownerDocument.defaultView:null,aa=(t,e)=>Math.abs(t-e);const la=new Set(["auto","scroll"]);class ha{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ua(this.lastRawMoveEventInfo,this.transformPagePoint));const t=da(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=aa(t.x,e.x),i=aa(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=st;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=ua(e,this.transformPagePoint),nt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=da("pointercancel"===t.type?this.lastMoveEventInfo:ua(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!ki(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=ua(sa(t),this.transformPagePoint),{point:l}=a,{timestamp:h}=st;this.history=[{...l,timestamp:h}];const{onSessionStart:u}=e;u&&u(t,da(a,this.history)),this.removeListeners=M(oa(this.contextWindow,"pointermove",this.handlePointerMove),oa(this.contextWindow,"pointerup",this.handlePointerUp),oa(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(la.has(t.overflowX)||la.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),nt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),it(this.updatePoint)}}function ua(t,e){return e?{point:e(t.point)}:t}function ca(t,e){return{x:t.x-e.x,y:t.y-e.y}}function da({point:t},e){return{point:t,delta:ca(t,ma(e)),offset:ca(t,pa(e)),velocity:fa(e,.1)}}function pa(t){return t[0]}function ma(t){return t[t.length-1]}function fa(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=ma(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>k(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>2*k(e)&&(i=t[1]);const o=D(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function ya(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ga(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min{e&&this.snapToCursor(sa(t).point),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?Ei[o]?null:(Ei[o]=!0,()=>{Ei[o]=!1}):Ei.x||Ei.y?null:(Ei.x=Ei.y=!0,()=>{Ei.x=Ei.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ko(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Vt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=co(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&nt.update(()=>s(t,e),!1,!0),Jn(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&nt.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:n,contextWindow:ra(this.visualElement),element:this.visualElement.current})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&nt.postRender(()=>r(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!ba(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&tn&&(t=i?Xt(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&qr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:ya(t.x,n,s),y:ya(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=va){return!1===t?t=0:!0===t&&(t=va),{x:xa(t,"left","right"),y:xa(t,"top","bottom")}}(e),i!==this.constraints&&!qr(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&ko(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!qr(t))return!1;const n=t.current;w(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const s=function(t,e,n){const i=Rs(t,n),{scroll:s}=e;return s&&(Vs(i.x,s.offset.x),Vs(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ga(t.x,e.x),y:ga(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=ys(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=ko(r=>{if(!ba(r,e,this.currentDirection))return;let l=a&&a[r]||{};!0!==o&&o!==r||(l={min:0,max:0});const h=i?200:1e6,u=i?40:1e7,c={type:"inertia",velocity:n?t[r]:0,bounceStiffness:h,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,c)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Jn(this.visualElement,t),n.start(Nn(t,n,0,e,this.visualElement,!1))}stopAnimation(){ko(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps()[e];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){ko(e=>{const{drag:n}=this.getProps();if(!ba(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e],r=s.get()||0;s.set(t[e]-Xt(n,o,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!qr(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ko(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=co(t),s=co(e);return s>i?n=V(e.min,e.max-i,t.min):i>s&&(n=V(t.min,t.max-s,e.min)),g(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),ko(e=>{if(!ba(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Xt(s,o,i[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ta.set(this.visualElement,this);const t=this.visualElement.current,e=oa(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&function(t){return Ri.has(t.tagName)||!0===t.isContentEditable}(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps();qr(e)&&e.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=_i(t,Pa(n)),s=_i(e,Pa(n));return()=>{i(),s()}}(t,e.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),nt.read(i);const r=Uo(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(ko(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),e(),o(),a&&a(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=va,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Pa(t){let e=!0;return()=>{e?e=!1:t()}}function ba(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ea=t=>(e,n)=>{t&&nt.update(()=>t(e,n),!1,!0)};let Aa=!1;class Ma extends m{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),Aa&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Yo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o?(o.isPresent=s,t.layoutDependency!==e&&o.setOptions({...o.options,layoutDependency:e}),Aa=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||nt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:t,layoutAnchor:e}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=e,n.root.didUpdate(),bi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;Aa=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Va(t){const[n,s]=function(t=!0){const e=i(Or);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=e,r=p();c(()=>{if(t)return o(r)},[t]);const a=h(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,a]:[!0]}(),o=i(Z);return e(Ma,{...t,layoutGroup:o,switchLayoutGroup:i(Gr),isPresent:n,safeToRemove:s})}const Ca={pan:{Feature:class extends fs{constructor(){super(...arguments),this.removePointerDownListener=A}onPointerDown(t){this.session=new ha(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ra(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ea(t),onStart:Ea(e),onMove:Ea(n),onEnd:(t,e)=>{delete this.session,i&&nt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=oa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends fs{constructor(t){super(t),this.removeGroupControls=A,this.removeListeners=A,this.controls=new Sa(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||A}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Sr,MeasureLayout:Va}};function ka(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&nt.postRender(()=>s(e,sa(e)))}function Da(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&nt.postRender(()=>s(e,sa(e)))}const Ra=new WeakMap,La=new WeakMap,Ba=t=>{const e=Ra.get(t.target);e&&e(t)},ja=t=>{t.forEach(Ba)};function Fa(t,e,n){const i=function({root:t,...e}){const n=t||document;La.has(n)||La.set(n,{});const i=La.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(ja,{root:t,...e})),i[s]}(e);return Ra.set(t,n),i.observe(t),()=>{Ra.delete(t),i.unobserve(t)}}const Ia={some:0,all:1};const Oa={...ia,...{inView:{Feature:class extends fs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Ia[i]};this.stopObserver=Fa(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends fs{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=Oi(t,(t,e)=>(Da(this.node,e,"Start"),(t,{success:e})=>Da(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends fs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=M(Uo(this.node.current,"focus",()=>this.onFocus()),Uo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends fs{mount(){const{current:t}=this.node;t&&(this.unmount=Vi(t,(t,e)=>(ka(this.node,e,"Start"),t=>ka(this.node,t,"End"))))}unmount(){}}}},...Ca,...{layout:{ProjectionNode:Sr,MeasureLayout:Va}}};function Ua(t,e){return Qr(t,e,Oa,ea)}const Wa=Ua("div");export{Wa as MotionDiv}; -//# sourceMappingURL=size-rollup-motion.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-motion.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-motion.js.map deleted file mode 100644 index f617e71f..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-motion.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"size-rollup-motion.js","sources":["../../motion-utils/dist/es/array.mjs","../../motion-utils/dist/es/clamp.mjs","../../motion-utils/dist/es/format-error-message.mjs","../../motion-utils/dist/es/errors.mjs","../../motion-utils/dist/es/global-config.mjs","../../motion-utils/dist/es/is-numerical-string.mjs","../../motion-utils/dist/es/is-object.mjs","../../motion-utils/dist/es/is-zero-value-string.mjs","../../motion-utils/dist/es/memo.mjs","../../motion-utils/dist/es/noop.mjs","../../motion-utils/dist/es/pipe.mjs","../../motion-utils/dist/es/progress.mjs","../../motion-utils/dist/es/subscription-manager.mjs","../../motion-utils/dist/es/time-conversion.mjs","../../motion-utils/dist/es/velocity-per-second.mjs","../../motion-utils/dist/es/easing/cubic-bezier.mjs","../../motion-utils/dist/es/easing/modifiers/mirror.mjs","../../motion-utils/dist/es/easing/modifiers/reverse.mjs","../../motion-utils/dist/es/easing/back.mjs","../../motion-utils/dist/es/easing/anticipate.mjs","../../motion-utils/dist/es/easing/circ.mjs","../../motion-utils/dist/es/easing/ease.mjs","../../motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","../../motion-utils/dist/es/easing/utils/map.mjs","../lib/context/LayoutGroupContext.js","../lib/context/LazyContext.js","../lib/context/MotionConfigContext.js","../lib/context/MotionContext/index.js","../../motion-dom/dist/es/frameloop/order.mjs","../../motion-dom/dist/es/frameloop/batcher.mjs","../../motion-dom/dist/es/frameloop/render-step.mjs","../../motion-dom/dist/es/frameloop/frame.mjs","../../motion-dom/dist/es/frameloop/sync-time.mjs","../../motion-dom/dist/es/animation/utils/is-css-variable.mjs","../../motion-dom/dist/es/value/types/numbers/index.mjs","../../motion-dom/dist/es/value/types/utils/sanitize.mjs","../../motion-dom/dist/es/value/types/utils/float-regex.mjs","../../motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../../motion-dom/dist/es/value/types/color/utils.mjs","../../motion-dom/dist/es/value/types/utils/is-nullish.mjs","../../motion-dom/dist/es/value/types/color/rgba.mjs","../../motion-dom/dist/es/value/types/color/hex.mjs","../../motion-dom/dist/es/value/types/numbers/units.mjs","../../motion-dom/dist/es/value/types/color/hsla.mjs","../../motion-dom/dist/es/value/types/color/index.mjs","../../motion-dom/dist/es/value/types/utils/color-regex.mjs","../../motion-dom/dist/es/value/types/complex/index.mjs","../../motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../../motion-dom/dist/es/utils/mix/immediate.mjs","../../motion-dom/dist/es/utils/mix/number.mjs","../../motion-dom/dist/es/utils/mix/color.mjs","../../motion-dom/dist/es/utils/mix/visibility.mjs","../../motion-dom/dist/es/utils/mix/complex.mjs","../../motion-dom/dist/es/utils/mix/index.mjs","../../motion-dom/dist/es/animation/drivers/frame.mjs","../../motion-dom/dist/es/animation/waapi/utils/linear.mjs","../../motion-dom/dist/es/animation/generators/utils/calc-duration.mjs","../../motion-dom/dist/es/animation/generators/spring.mjs","../../motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs","../../motion-dom/dist/es/animation/generators/utils/velocity.mjs","../../motion-dom/dist/es/animation/generators/inertia.mjs","../../motion-dom/dist/es/utils/interpolate.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../../motion-dom/dist/es/animation/generators/keyframes.mjs","../../motion-utils/dist/es/easing/utils/is-easing-array.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/time.mjs","../../motion-dom/dist/es/animation/keyframes/get-final.mjs","../../motion-dom/dist/es/animation/utils/replace-transition-type.mjs","../../motion-dom/dist/es/animation/utils/WithPromise.mjs","../../motion-dom/dist/es/animation/JSAnimation.mjs","../../motion-dom/dist/es/render/dom/parse-transform.mjs","../../motion-dom/dist/es/render/utils/keys-transform.mjs","../../motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs","../../motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs","../../motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","../../motion-dom/dist/es/render/dom/style-set.mjs","../../motion-dom/dist/es/render/dom/is-css-var.mjs","../../motion-dom/dist/es/utils/supports/flags.mjs","../../motion-dom/dist/es/utils/supports/memo.mjs","../../motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../../motion-dom/dist/es/utils/supports/linear-easing.mjs","../../motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","../../motion-dom/dist/es/animation/waapi/easing/supported.mjs","../../motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","../../motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs","../../motion-dom/dist/es/animation/NativeAnimation.mjs","../../motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","../../motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs","../../motion-dom/dist/es/animation/NativeAnimationExtended.mjs","../../motion-dom/dist/es/animation/utils/is-animatable.mjs","../../motion-dom/dist/es/animation/utils/make-animation-instant.mjs","../../motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs","../../motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs","../../motion-dom/dist/es/animation/waapi/supports/waapi.mjs","../../motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs","../../motion-dom/dist/es/animation/utils/can-animate.mjs","../../motion-dom/dist/es/animation/utils/calc-child-stagger.mjs","../../motion-dom/dist/es/value/index.mjs","../../motion-dom/dist/es/animation/utils/resolve-transition.mjs","../../motion-dom/dist/es/animation/utils/get-value-transition.mjs","../../motion-dom/dist/es/animation/utils/default-transitions.mjs","../../motion-dom/dist/es/animation/utils/is-transition-defined.mjs","../../motion-dom/dist/es/animation/interfaces/motion-value.mjs","../../motion-dom/dist/es/animation/utils/css-variables-conversion.mjs","../../motion-dom/dist/es/render/utils/resolve-variants.mjs","../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs","../../motion-dom/dist/es/render/utils/keys-position.mjs","../../motion-dom/dist/es/render/utils/is-keyframes-target.mjs","../../motion-dom/dist/es/render/utils/setters.mjs","../../motion-dom/dist/es/value/utils/is-motion-value.mjs","../../motion-dom/dist/es/value/will-change/add-will-change.mjs","../../motion-dom/dist/es/value/will-change/is.mjs","../../motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs","../../motion-dom/dist/es/animation/optimized-appear/data-id.mjs","../../motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs","../../motion-dom/dist/es/animation/interfaces/visual-element-target.mjs","../../motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs","../../motion-dom/dist/es/value/types/auto.mjs","../../motion-dom/dist/es/value/types/test.mjs","../../motion-dom/dist/es/value/types/dimensions.mjs","../../motion-dom/dist/es/animation/keyframes/utils/is-none.mjs","../../motion-dom/dist/es/value/types/complex/filter.mjs","../../motion-dom/dist/es/value/types/complex/mask.mjs","../../motion-dom/dist/es/value/types/int.mjs","../../motion-dom/dist/es/value/types/maps/number.mjs","../../motion-dom/dist/es/value/types/maps/transform.mjs","../../motion-dom/dist/es/value/types/maps/defaults.mjs","../../motion-dom/dist/es/value/types/utils/animatable-none.mjs","../../motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs","../../motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs","../../motion-dom/dist/es/utils/resolve-elements.mjs","../../motion-dom/dist/es/value/types/utils/get-as-type.mjs","../../motion-dom/dist/es/frameloop/microtask.mjs","../../motion-dom/dist/es/gestures/drag/state/is-active.mjs","../../motion-dom/dist/es/gestures/utils/setup.mjs","../../motion-dom/dist/es/gestures/hover.mjs","../../motion-dom/dist/es/gestures/utils/is-node-or-child.mjs","../../motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs","../../motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs","../../motion-dom/dist/es/gestures/press/utils/state.mjs","../../motion-dom/dist/es/gestures/press/utils/keyboard.mjs","../../motion-dom/dist/es/gestures/press/index.mjs","../../motion-dom/dist/es/utils/is-html-element.mjs","../../motion-dom/dist/es/utils/is-svg-element.mjs","../../motion-dom/dist/es/resize/handle-element.mjs","../../motion-dom/dist/es/resize/handle-window.mjs","../../motion-dom/dist/es/resize/index.mjs","../../motion-dom/dist/es/value/types/utils/find.mjs","../../motion-dom/dist/es/projection/geometry/models.mjs","../../motion-dom/dist/es/render/store.mjs","../../motion-dom/dist/es/render/utils/is-animation-controls.mjs","../../motion-dom/dist/es/render/utils/is-variant-label.mjs","../../motion-dom/dist/es/render/utils/variant-props.mjs","../../motion-dom/dist/es/render/utils/is-controlling-variants.mjs","../../motion-dom/dist/es/render/utils/reduced-motion/state.mjs","../../motion-dom/dist/es/render/utils/reduced-motion/index.mjs","../../motion-dom/dist/es/render/VisualElement.mjs","../../motion-dom/dist/es/render/utils/motion-values.mjs","../../motion-dom/dist/es/render/dom/DOMVisualElement.mjs","../../motion-dom/dist/es/render/Feature.mjs","../../motion-dom/dist/es/projection/geometry/conversion.mjs","../../motion-dom/dist/es/projection/utils/has-transform.mjs","../../motion-dom/dist/es/projection/geometry/delta-apply.mjs","../../motion-dom/dist/es/projection/utils/measure.mjs","../../motion-dom/dist/es/render/html/utils/build-transform.mjs","../../motion-dom/dist/es/render/html/utils/build-styles.mjs","../../motion-dom/dist/es/render/html/utils/render.mjs","../../motion-dom/dist/es/projection/styles/scale-border-radius.mjs","../../motion-dom/dist/es/projection/styles/scale-box-shadow.mjs","../../motion-dom/dist/es/projection/styles/scale-correction.mjs","../../motion-dom/dist/es/render/utils/is-forced-motion-value.mjs","../../motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs","../../motion-dom/dist/es/render/html/HTMLVisualElement.mjs","../../motion-dom/dist/es/render/svg/utils/path.mjs","../../motion-dom/dist/es/render/svg/utils/build-attrs.mjs","../../motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs","../../motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs","../../motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs","../../motion-dom/dist/es/render/svg/SVGVisualElement.mjs","../../motion-dom/dist/es/render/svg/utils/render.mjs","../../motion-dom/dist/es/render/utils/get-variant-context.mjs","../../motion-dom/dist/es/render/utils/shallow-compare.mjs","../../motion-dom/dist/es/render/utils/animation-state.mjs","../../motion-dom/dist/es/animation/interfaces/visual-element.mjs","../../motion-dom/dist/es/projection/geometry/copy.mjs","../../motion-dom/dist/es/projection/geometry/delta-calc.mjs","../../motion-dom/dist/es/projection/geometry/delta-remove.mjs","../../motion-dom/dist/es/projection/geometry/utils.mjs","../../motion-dom/dist/es/projection/utils/each-axis.mjs","../../motion-dom/dist/es/projection/animation/mix-values.mjs","../../motion-dom/dist/es/events/add-dom-event.mjs","../../motion-dom/dist/es/projection/utils/compare-by-depth.mjs","../../motion-dom/dist/es/projection/utils/flat-tree.mjs","../../motion-dom/dist/es/value/utils/resolve-motion-value.mjs","../../motion-dom/dist/es/projection/shared/stack.mjs","../../motion-dom/dist/es/projection/node/state.mjs","../../motion-dom/dist/es/projection/node/create-projection-node.mjs","../../motion-dom/dist/es/utils/is-svg-svg-element.mjs","../../motion-dom/dist/es/utils/delay.mjs","../../motion-dom/dist/es/animation/animate/single-value.mjs","../../motion-dom/dist/es/projection/styles/transform.mjs","../../motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs","../../motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs","../lib/context/MotionContext/create.js","../lib/context/MotionContext/utils.js","../lib/render/html/utils/create-render-state.js","../lib/render/html/use-props.js","../lib/render/svg/utils/create-render-state.js","../lib/render/svg/use-props.js","../lib/motion/utils/valid-prop.js","../lib/render/dom/utils/filter-props.js","../lib/render/svg/lowercase-elements.js","../lib/render/dom/utils/is-svg-component.js","../lib/render/dom/use-render.js","../lib/context/PresenceContext.js","../lib/motion/utils/use-visual-state.js","../lib/utils/use-constant.js","../lib/render/html/use-html-visual-state.js","../lib/render/svg/use-svg-visual-state.js","../lib/motion/features/definitions.js","../lib/motion/utils/symbol.js","../lib/motion/utils/use-motion-ref.js","../lib/context/SwitchLayoutGroupContext.js","../lib/utils/is-ref-object.js","../lib/utils/is-browser.js","../lib/utils/use-isomorphic-effect.js","../lib/motion/utils/use-visual-element.js","../lib/motion/index.js","../lib/motion/features/load-features.js","../lib/render/dom/create-visual-element.js","../lib/motion/features/animation/exit.js","../lib/motion/features/animations.js","../lib/motion/features/animation/index.js","../lib/events/event-info.js","../lib/events/add-pointer-event.js","../lib/utils/get-context-window.js","../lib/utils/distance.js","../lib/gestures/pan/PanSession.js","../lib/gestures/drag/utils/constraints.js","../lib/gestures/drag/VisualElementDragControls.js","../../motion-dom/dist/es/gestures/drag/state/set-active.mjs","../lib/gestures/pan/index.js","../lib/motion/features/layout/MeasureLayout.js","../lib/components/AnimatePresence/use-presence.js","../lib/motion/features/drag.js","../lib/gestures/drag/index.js","../lib/gestures/hover.js","../lib/gestures/press.js","../lib/motion/features/viewport/observers.js","../lib/motion/features/viewport/index.js","../lib/motion/features/gestures.js","../lib/render/components/motion/feature-bundle.js","../lib/gestures/focus.js","../lib/motion/features/layout.js","../lib/render/components/motion/create.js","../lib/render/components/motion/elements.js","../lib/render/components/motion/size.js"],"sourcesContent":["function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n//# sourceMappingURL=array.mjs.map\n","const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n//# sourceMappingURL=clamp.mjs.map\n","function formatErrorMessage(message, errorCode) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message;\n}\n\nexport { formatErrorMessage };\n//# sourceMappingURL=format-error-message.mjs.map\n","import { formatErrorMessage } from './format-error-message.mjs';\n\nlet warning = () => { };\nlet invariant = () => { };\nif (typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\") {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode));\n }\n };\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode));\n }\n };\n}\n\nexport { invariant, warning };\n//# sourceMappingURL=errors.mjs.map\n","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n//# sourceMappingURL=global-config.mjs.map\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v);\n\nexport { isNumericalString };\n//# sourceMappingURL=is-numerical-string.mjs.map\n","const isObject = (value) => typeof value === \"object\" && value !== null;\n\nexport { isObject };\n//# sourceMappingURL=is-object.mjs.map\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/u.test(v);\n\nexport { isZeroValueString };\n//# sourceMappingURL=is-zero-value-string.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n//# sourceMappingURL=memo.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n//# sourceMappingURL=noop.mjs.map\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));\n\nexport { pipe };\n//# sourceMappingURL=pipe.mjs.map\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst progress = (from, to, value) => {\n const range = to - from;\n return range ? (value - from) / range : 1;\n};\n\nexport { progress };\n//# sourceMappingURL=progress.mjs.map\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n//# sourceMappingURL=subscription-manager.mjs.map\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n/*#__NO_SIDE_EFFECTS__*/\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\n/*#__NO_SIDE_EFFECTS__*/\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n//# sourceMappingURL=time-conversion.mjs.map\n","/*\n Convert velocity into velocity per second\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0;\n\nexport { velocityPerSecond };\n//# sourceMappingURL=velocity-per-second.mjs.map\n","import { noop } from '../noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticeably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\n/*#__NO_SIDE_EFFECTS__*/\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n//# sourceMappingURL=mirror.mjs.map\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\n/*#__NO_SIDE_EFFECTS__*/\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n//# sourceMappingURL=reverse.mjs.map\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = /*@__PURE__*/ reverseEasing(backOut);\nconst backInOut = /*@__PURE__*/ mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n//# sourceMappingURL=back.mjs.map\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => p >= 1\n ? 1\n : (p *= 2) < 1\n ? 0.5 * backIn(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n//# sourceMappingURL=anticipate.mjs.map\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circIn);\n\nexport { circIn, circInOut, circOut };\n//# sourceMappingURL=circ.mjs.map\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);\nconst easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n//# sourceMappingURL=ease.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n//# sourceMappingURL=is-bezier-definition.mjs.map\n","import { invariant } from '../../errors.mjs';\nimport { noop } from '../../noop.mjs';\nimport { anticipate } from '../anticipate.mjs';\nimport { backOut, backInOut, backIn } from '../back.mjs';\nimport { circOut, circInOut, circIn } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeOut, easeInOut, easeIn } from '../ease.mjs';\nimport { isBezierDefinition } from './is-bezier-definition.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst isValidEasing = (easing) => {\n return typeof easing === \"string\";\n};\nconst easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, \"cubic-bezier-length\");\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (isValidEasing(definition)) {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, \"invalid-easing-type\");\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n//# sourceMappingURL=map.mjs.map\n","\"use client\";\nimport { createContext } from \"react\";\nexport const LayoutGroupContext = createContext({});\n//# sourceMappingURL=LayoutGroupContext.js.map","\"use client\";\nimport { createContext } from \"react\";\nexport const LazyContext = createContext({ strict: false });\n//# sourceMappingURL=LazyContext.js.map","\"use client\";\nimport { createContext } from \"react\";\n/**\n * @public\n */\nexport const MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n//# sourceMappingURL=MotionConfigContext.js.map","\"use client\";\nimport { createContext } from \"react\";\nexport const MotionContext = /* @__PURE__ */ createContext({});\n//# sourceMappingURL=index.js.map","const stepsOrder = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n\nexport { stepsOrder };\n//# sourceMappingURL=order.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming;\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n//# sourceMappingURL=batcher.mjs.map\n","import { statsBuffer } from '../stats/buffer.mjs';\n\nfunction createRenderStep(runNextFrame, stepName) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n let numCalls = 0;\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n numCalls++;\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame;\n thisFrame = nextFrame;\n nextFrame = prevFrame;\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n /**\n * If we're recording stats then\n */\n if (stepName && statsBuffer.value) {\n statsBuffer.value.frameloop[stepName].push(numCalls);\n }\n numCalls = 0;\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n//# sourceMappingURL=render-step.mjs.map\n","import { noop } from 'motion-utils';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\n//# sourceMappingURL=frame.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { frameData } from './frame.mjs';\n\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n\nexport { time };\n//# sourceMappingURL=sync-time.mjs.map\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nfunction containsCSSVariable(value) {\n if (typeof value !== \"string\")\n return false;\n // Strip comments to avoid false positives\n return value.split(\"/*\")[0].includes(\"var(--\");\n}\n\nexport { containsCSSVariable, isCSSVariableName, isCSSVariableToken };\n//# sourceMappingURL=is-css-variable.mjs.map\n","import { clamp } from 'motion-utils';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n//# sourceMappingURL=index.mjs.map\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n//# sourceMappingURL=sanitize.mjs.map\n","const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n//# sourceMappingURL=float-regex.mjs.map\n","const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n//# sourceMappingURL=single-color-regex.mjs.map\n","import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n//# sourceMappingURL=utils.mjs.map\n","function isNullish(v) {\n return v == null;\n}\n\nexport { isNullish };\n//# sourceMappingURL=is-nullish.mjs.map\n","import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n//# sourceMappingURL=rgba.mjs.map\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n//# sourceMappingURL=hex.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n}))();\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n//# sourceMappingURL=units.mjs.map\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n//# sourceMappingURL=hsla.mjs.map\n","import { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n getAnimatableNone: (v) => {\n const parsed = color.parse(v);\n parsed.alpha = 0;\n return color.transform(parsed);\n },\n};\n\nexport { color };\n//# sourceMappingURL=index.mjs.map\n","const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n//# sourceMappingURL=color-regex.mjs.map\n","import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (v.match(floatRegex)?.length || 0) +\n (v.match(colorRegex)?.length || 0) >\n 0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction buildTransformer({ split, types }) {\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nfunction createTransformer(source) {\n return buildTransformer(analyseComplexValue(source));\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (value, splitBefore) => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0;\n }\n return convertNumbersToZero(value);\n};\nfunction getAnimatableNone(v) {\n const info = analyseComplexValue(v);\n const transformer = buildTransformer(info);\n return transformer(info.values.map((value, i) => convertToZero(value, info.split[i])));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n//# sourceMappingURL=index.mjs.map\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n//# sourceMappingURL=hsla-to-rgba.mjs.map\n","function mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n//# sourceMappingURL=immediate.mjs.map\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n//# sourceMappingURL=number.mjs.map\n","import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, \"color-not-animatable\");\n if (!Boolean(type))\n return false;\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n//# sourceMappingURL=color.mjs.map\n","const invisibleValues = new Set([\"none\", \"hidden\"]);\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nfunction mixVisibility(origin, target) {\n if (invisibleValues.has(origin)) {\n return (p) => (p <= 0 ? origin : target);\n }\n else {\n return (p) => (p >= 1 ? target : origin);\n }\n}\n\nexport { invisibleValues, mixVisibility };\n//# sourceMappingURL=visibility.mjs.map\n","import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = origin.values[originIndex] ?? 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, \"complex-values-different\");\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n//# sourceMappingURL=complex.mjs.map\n","import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\nfunction mix(from, to, p) {\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n//# sourceMappingURL=index.mjs.map\n","import { time } from '../../frameloop/sync-time.mjs';\nimport { frameData, cancelFrame, frame } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n//# sourceMappingURL=frame.mjs.map\n","const generateLinearEasing = (easing, duration, // as milliseconds\nresolution = 10 // as milliseconds\n) => {\n let points = \"\";\n const numPoints = Math.max(Math.round(duration / resolution), 2);\n for (let i = 0; i < numPoints; i++) {\n points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + \", \";\n }\n return `linear(${points.substring(0, points.length - 2)})`;\n};\n\nexport { generateLinearEasing };\n//# sourceMappingURL=linear.mjs.map\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n//# sourceMappingURL=calc-duration.mjs.map\n","import { millisecondsToSeconds, clamp, secondsToMilliseconds, warning } from 'motion-utils';\nimport { generateLinearEasing } from '../waapi/utils/linear.mjs';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './utils/calc-duration.mjs';\nimport { createGeneratorEasing } from './utils/create-generator-easing.mjs';\n\nconst springDefaults = {\n // Default spring physics\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n velocity: 0.0,\n // Default duration/bounce-based options\n duration: 800, // in ms\n bounce: 0.3,\n visualDuration: 0.3, // in seconds\n // Rest thresholds\n restSpeed: {\n granular: 0.01,\n default: 2,\n },\n restDelta: {\n granular: 0.005,\n default: 0.5,\n },\n // Limits\n minDuration: 0.01, // in seconds\n maxDuration: 10.0, // in seconds\n minDamping: 0.05,\n maxDamping: 1,\n};\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\", \"spring-duration-limit\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: springDefaults.velocity,\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n mass: springDefaults.mass,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n // Time-defined springs should ignore inherited velocity.\n // Velocity from interrupted animations can cause findSpring()\n // to compute wildly different spring parameters, leading to\n // massive oscillation on small-range animations.\n springOptions.velocity = 0;\n if (options.visualDuration) {\n const visualDuration = options.visualDuration;\n const root = (2 * Math.PI) / (visualDuration * 1.2);\n const stiffness = root * root;\n const damping = 2 *\n clamp(0.05, 1, 1 - (options.bounce || 0)) *\n Math.sqrt(stiffness);\n springOptions = {\n ...springOptions,\n mass: springDefaults.mass,\n stiffness,\n damping,\n };\n }\n else {\n const derived = findSpring({ ...options, velocity: 0 });\n springOptions = {\n ...springOptions,\n ...derived,\n mass: springDefaults.mass,\n };\n springOptions.isResolvedFromDuration = true;\n }\n }\n return springOptions;\n}\nfunction spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {\n const options = typeof optionsOrVisualDuration !== \"object\"\n ? {\n visualDuration: optionsOrVisualDuration,\n keyframes: [0, 1],\n bounce,\n }\n : optionsOrVisualDuration;\n let { restSpeed, restDelta } = options;\n const origin = options.keyframes[0];\n const target = options.keyframes[options.keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n });\n const initialVelocity = velocity || 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default);\n restDelta || (restDelta = isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default);\n let resolveSpring;\n let resolveVelocity;\n // Underdamped coefficients, hoisted for use in the inlined next() hot path\n let angularFreq;\n let A;\n let sinCoeff;\n let cosCoeff;\n if (dampingRatio < 1) {\n angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n A =\n (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq;\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (A * Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n // Analytical derivative of underdamped spring (px/ms)\n sinCoeff =\n dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;\n cosCoeff =\n dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return envelope *\n (sinCoeff * Math.sin(angularFreq * t) +\n cosCoeff * Math.cos(angularFreq * t));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n // Analytical derivative of critically damped spring (px/ms)\n const C = initialVelocity + undampedAngularFreq * initialDelta;\n resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) *\n (undampedAngularFreq * C * t - initialVelocity);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n // Analytical derivative of overdamped spring (px/ms)\n const P = (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n dampedAngularFreq;\n const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;\n const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return envelope *\n (sinhCoeff * Math.sinh(freqForT) +\n coshCoeff * Math.cosh(freqForT));\n };\n }\n const generator = {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),\n next: (t) => {\n /**\n * For underdamped physics springs we need both position and\n * velocity each tick. Compute shared trig values once to avoid\n * duplicate Math.exp/sin/cos calls on the hot path.\n */\n if (!isResolvedFromDuration && dampingRatio < 1) {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const sin = Math.sin(angularFreq * t);\n const cos = Math.cos(angularFreq * t);\n const current = target -\n envelope *\n (A * sin + initialDelta * cos);\n const currentVelocity = secondsToMilliseconds(envelope *\n (sinCoeff * sin + cosCoeff * cos));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n state.value = state.done ? target : current;\n return state;\n }\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = secondsToMilliseconds(resolveVelocity(t));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n toString: () => {\n const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);\n return calculatedDuration + \"ms \" + easing;\n },\n toTransition: () => { },\n };\n return generator;\n}\nspring.applyToOptions = (options) => {\n const generatorOptions = createGeneratorEasing(options, 100, spring);\n options.ease = generatorOptions.ease;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n return options;\n};\n\nexport { spring };\n//# sourceMappingURL=spring.mjs.map\n","import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n//# sourceMappingURL=create-generator-easing.mjs.map\n","import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction getGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { getGeneratorVelocity };\n//# sourceMappingURL=velocity.mjs.map\n","import { spring } from './spring.mjs';\nimport { getGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n//# sourceMappingURL=inertia.mjs.map\n","import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\", \"range-length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n//# sourceMappingURL=interpolate.mjs.map\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n//# sourceMappingURL=default.mjs.map\n","import { progress } from 'motion-utils';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n//# sourceMappingURL=fill.mjs.map\n","import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n//# sourceMappingURL=keyframes.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n//# sourceMappingURL=is-easing-array.mjs.map\n","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n//# sourceMappingURL=time.mjs.map\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe, speed = 1) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const useFirstKeyframe = speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1);\n const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n//# sourceMappingURL=get-final.mjs.map\n","import { inertia } from '../generators/inertia.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { spring } from '../generators/spring.mjs';\n\nconst transitionTypeMap = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\nfunction replaceTransitionType(transition) {\n if (typeof transition.type === \"string\") {\n transition.type = transitionTypeMap[transition.type];\n }\n}\n\nexport { replaceTransitionType };\n//# sourceMappingURL=replace-transition-type.mjs.map\n","class WithPromise {\n constructor() {\n this.updateFinished();\n }\n get finished() {\n return this._finished;\n }\n updateFinished() {\n this._finished = new Promise((resolve) => {\n this.resolve = resolve;\n });\n }\n notifyFinished() {\n this.resolve();\n }\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve, onReject) {\n return this.finished.then(onResolve, onReject);\n }\n}\n\nexport { WithPromise };\n//# sourceMappingURL=WithPromise.mjs.map\n","import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { activeAnimations } from '../stats/animation-count.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/frame.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getGeneratorVelocity } from './generators/utils/velocity.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * Reusable state object for the delay phase to avoid\n * allocating a new object every frame.\n */\n this.delayState = {\n done: false,\n value: undefined,\n };\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n this.options.onStop?.();\n };\n activeAnimations.mainThread++;\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, \"spring-two-frames\");\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n let state;\n if (isInDelayPhase) {\n this.delayState.value = keyframes[0];\n state = this.delayState;\n }\n else {\n state = frameGenerator.next(elapsed);\n }\n if (mixKeyframes && !isInDelayPhase) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n if (this.driver) {\n this.driver.start(false);\n }\n else {\n this.startTime = 0;\n this.state = \"paused\";\n this.holdTime = newTime;\n this.tick(newTime);\n }\n }\n /**\n * Returns the generator's velocity at the current time in units/second.\n * Uses the analytical derivative when available (springs), avoiding\n * the MotionValue's frame-dependent velocity estimation.\n */\n getGeneratorVelocity() {\n const t = this.currentTime;\n if (t <= 0)\n return this.options.velocity || 0;\n if (this.generator.velocity) {\n return this.generator.velocity(t);\n }\n // Fallback: finite difference\n const current = this.generator.next(t).value;\n return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n if (hasChanged && this.driver) {\n this.updateTime(time.now());\n }\n this.playbackSpeed = newSpeed;\n if (hasChanged && this.driver) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n this.options.onPlay?.();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.notifyFinished();\n this.teardown();\n this.state = \"finished\";\n this.options.onComplete?.();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n this.options.onCancel?.();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n activeAnimations.mainThread--;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n this.driver?.stop();\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n//# sourceMappingURL=JSAnimation.mjs.map\n","const radToDeg = (rad) => (rad * 180) / Math.PI;\nconst rotate = (v) => {\n const angle = radToDeg(Math.atan2(v[1], v[0]));\n return rebaseAngle(angle);\n};\nconst matrix2dParsers = {\n x: 4,\n y: 5,\n translateX: 4,\n translateY: 5,\n scaleX: 0,\n scaleY: 3,\n scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n};\nconst rebaseAngle = (angle) => {\n angle = angle % 360;\n if (angle < 0)\n angle += 360;\n return angle;\n};\nconst rotateZ = rotate;\nconst scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]);\nconst scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]);\nconst matrix3dParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n};\nfunction defaultTransformValue(name) {\n return name.includes(\"scale\") ? 1 : 0;\n}\nfunction parseValueFromTransform(transform, name) {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name);\n }\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);\n let parsers;\n let match;\n if (matrix3dMatch) {\n parsers = matrix3dParsers;\n match = matrix3dMatch;\n }\n else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);\n parsers = matrix2dParsers;\n match = matrix2dMatch;\n }\n if (!match) {\n return defaultTransformValue(name);\n }\n const valueParser = parsers[name];\n const values = match[1].split(\",\").map(convertTransformToNumber);\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser];\n}\nconst readTransformValue = (instance, name) => {\n const { transform = \"none\" } = getComputedStyle(instance);\n return parseValueFromTransform(transform, name);\n};\nfunction convertTransformToNumber(value) {\n return parseFloat(value.trim());\n}\n\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue };\n//# sourceMappingURL=parse-transform.mjs.map\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n *\n * `pathRotation` is a transform for routing purposes (skipped from raw\n * style application, wired to the transform composite, flags transform\n * dirty) but is intentionally NOT in `transformPropOrder` — it is\n * composed onto `rotate` at the build sites, not serialized in its own\n * slot, and must stay out of the order-array consumers (parse-transform,\n * unit-conversion, keys-position).\n */\nconst transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, \"pathRotation\"]))();\n\nexport { transformPropOrder, transformProps };\n//# sourceMappingURL=keys-transform.mjs.map\n","import { parseValueFromTransform } from '../../../render/dom/parse-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst isNumOrPxType = (v) => v === number || v === px;\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n return removedTransforms;\n}\nconst positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\", boxSizing }) => {\n const width = x.max - x.min;\n return boxSizing === \"border-box\"\n ? width\n : width - parseFloat(paddingLeft) - parseFloat(paddingRight);\n },\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\", boxSizing }) => {\n const height = y.max - y.min;\n return boxSizing === \"border-box\"\n ? height\n : height - parseFloat(paddingTop) - parseFloat(paddingBottom);\n },\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: (_bbox, { transform }) => parseValueFromTransform(transform, \"x\"),\n y: (_bbox, { transform }) => parseValueFromTransform(transform, \"y\"),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\n\nexport { isNumOrPxType, positionalValues, removeNonTranslationalTransform };\n//# sourceMappingURL=unit-conversion.mjs.map\n","import { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n const transformsToRestore = new Map();\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete(isForced));\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n isForced = true;\n readAllKeyframes();\n measureAllKeyframes();\n isForced = false;\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n this.state = \"pending\";\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.state = \"scheduled\";\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n }\n else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this;\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get();\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n fillWildcards(unresolvedKeyframes);\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete(isForcedComplete = false) {\n this.state = \"complete\";\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n toResolve.delete(this);\n }\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this);\n this.state = \"pending\";\n }\n }\n resume() {\n if (this.state === \"pending\")\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n//# sourceMappingURL=KeyframesResolver.mjs.map\n","function fillWildcards(keyframes) {\n for (let i = 1; i < keyframes.length; i++) {\n keyframes[i] ?? (keyframes[i] = keyframes[i - 1]);\n }\n}\n\nexport { fillWildcards };\n//# sourceMappingURL=fill-wildcards.mjs.map\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction setStyle(element, name, value) {\n isCSSVar(name)\n ? element.style.setProperty(name, value)\n : (element.style[name] = value);\n}\n\nexport { setStyle };\n//# sourceMappingURL=style-set.mjs.map\n","const isCSSVar = (name) => name.startsWith(\"--\");\n\nexport { isCSSVar };\n//# sourceMappingURL=is-css-var.mjs.map\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {};\n\nexport { supportsFlags };\n//# sourceMappingURL=flags.mjs.map\n","import { memo } from 'motion-utils';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => supportsFlags[supportsFlag] ?? memoized();\n}\n\nexport { memoSupports };\n//# sourceMappingURL=memo.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, \"scrollTimeline\");\nconst supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, \"viewTimeline\");\n\nexport { supportsScrollTimeline, supportsViewTimeline };\n//# sourceMappingURL=scroll-timeline.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n}, \"linearEasing\");\n\nexport { supportsLinearEasing };\n//# sourceMappingURL=linear-easing.mjs.map\n","const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { cubicBezierAsString };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","import { cubicBezierAsString } from './cubic-bezier.mjs';\n\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\n\nexport { supportedWaapiEasing };\n//# sourceMappingURL=supported.mjs.map\n","import { isBezierDefinition } from 'motion-utils';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\n\nfunction mapEasingToNativeEasing(easing, duration) {\n if (!easing) {\n return undefined;\n }\n else if (typeof easing === \"function\") {\n return supportsLinearEasing()\n ? generateLinearEasing(easing, duration)\n : \"ease-out\";\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||\n supportedWaapiEasing.easeOut);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { mapEasingToNativeEasing };\n//# sourceMappingURL=map-easing.mjs.map\n","import { activeAnimations } from '../../stats/animation-count.mjs';\nimport { statsBuffer } from '../../stats/buffer.mjs';\nimport { mapEasingToNativeEasing } from './easing/map-easing.mjs';\n\nfunction startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease = \"easeOut\", times, } = {}, pseudoElement = undefined) {\n const keyframeOptions = {\n [valueName]: keyframes,\n };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease, duration);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n if (statsBuffer.value) {\n activeAnimations.waapi++;\n }\n const options = {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n };\n if (pseudoElement)\n options.pseudoElement = pseudoElement;\n const animation = element.animate(keyframeOptions, options);\n if (statsBuffer.value) {\n animation.finished.finally(() => {\n activeAnimations.waapi--;\n });\n }\n return animation;\n}\n\nexport { startWaapiAnimation };\n//# sourceMappingURL=start-waapi-animation.mjs.map\n","function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n//# sourceMappingURL=is-generator.mjs.map\n","import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n this.manualStartTime = null;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `Mini animate() doesn't support \"type\" as a string.`, \"mini-spring\");\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe);\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n }\n play() {\n if (this.isStopped)\n return;\n this.manualStartTime = null;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n const element = this.options?.element;\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n const wasFinished = this.finishedTime !== null;\n this.manualStartTime = null;\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n if (wasFinished) {\n this.animation.pause();\n }\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.manualStartTime = this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n if (rangeStart)\n this.animation.rangeStart = rangeStart;\n if (rangeEnd)\n this.animation.rangeEnd = rangeEnd;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n//# sourceMappingURL=NativeAnimation.mjs.map\n","import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { isGenerator } from '../../generators/utils/is-generator.mjs';\n\nfunction applyGeneratorOptions({ type, ...options }) {\n if (isGenerator(type) && supportsLinearEasing()) {\n return type.applyToOptions(options);\n }\n else {\n options.duration ?? (options.duration = 300);\n options.ease ?? (options.ease = \"easeOut\");\n }\n return options;\n}\n\nexport { applyGeneratorOptions };\n//# sourceMappingURL=apply-generator.mjs.map\n","import { circInOut, backInOut, anticipate } from 'motion-utils';\n\nconst unsupportedEasingFunctions = {\n anticipate,\n backInOut,\n circInOut,\n};\nfunction isUnsupportedEase(key) {\n return key in unsupportedEasingFunctions;\n}\nfunction replaceStringEasing(transition) {\n if (typeof transition.ease === \"string\" &&\n isUnsupportedEase(transition.ease)) {\n transition.ease = unsupportedEasingFunctions[transition.ease];\n }\n}\n\nexport { replaceStringEasing };\n//# sourceMappingURL=unsupported-easing.mjs.map\n","import { clamp } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n constructor(options) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options);\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options);\n super(options);\n /**\n * Only set startTime when the animation should autoplay.\n * Setting startTime on a paused WAAPI animation unpauses it\n * (per the WAAPI spec), which breaks autoplay: false.\n */\n if (options.startTime !== undefined && options.autoplay !== false) {\n this.startTime = options.startTime;\n }\n this.options = options;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read committed styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value) {\n const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n if (!motionValue)\n return;\n if (value !== undefined) {\n motionValue.set(value);\n return;\n }\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n });\n /**\n * Use wall-clock elapsed time for sampling.\n * Under CPU load, WAAPI's currentTime may not reflect actual\n * elapsed time, causing incorrect sampling and visual jumps.\n */\n const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);\n const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);\n const current = sampleAnimation.sample(sampleTime).value;\n /**\n * Write the estimated value to inline style so it persists\n * after cancel(), covering the async gap before the next\n * animation starts.\n */\n const { name } = this.options;\n if (element && name)\n setStyle(element, name, current);\n motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);\n sampleAnimation.stop();\n }\n}\n\nexport { NativeAnimationExtended };\n//# sourceMappingURL=NativeAnimationExtended.mjs.map\n","import { complex } from '../../value/types/complex/index.mjs';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nconst isAnimatable = (value, name) => {\n // If the list of keys that might be non-animatable grows, replace with Set\n if (name === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n//# sourceMappingURL=is-animatable.mjs.map\n","function makeAnimationInstant(options) {\n options.duration = 0;\n options.type = \"keyframes\";\n}\n\nexport { makeAnimationInstant };\n//# sourceMappingURL=make-animation-instant.mjs.map\n","/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved\n // or until we implement support for linear() easing.\n // \"background-color\"\n]);\n\nexport { acceleratedValues };\n//# sourceMappingURL=accelerated-values.mjs.map\n","const browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\\(/;\nfunction hasBrowserOnlyColors(keyframes) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"string\" &&\n browserColorFunctions.test(keyframes[i])) {\n return true;\n }\n }\n return false;\n}\n\nexport { hasBrowserOnlyColors };\n//# sourceMappingURL=is-browser-color.mjs.map\n","import { memo } from 'motion-utils';\nimport { acceleratedValues } from '../utils/accelerated-values.mjs';\nimport { hasBrowserOnlyColors } from '../utils/is-browser-color.mjs';\n\nconst colorProperties = new Set([\n \"color\",\n \"backgroundColor\",\n \"outlineColor\",\n \"fill\",\n \"stroke\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n]);\nconst supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\nfunction supportsBrowserAnimation(options) {\n const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options;\n const subject = motionValue?.owner?.current;\n /**\n * We use this check instead of isHTMLElement() because we explicitly\n * **don't** want elements in different timing contexts (i.e. popups)\n * to be accelerated, as it's not possible to sync these animations\n * properly with those driven from the main window frameloop.\n */\n if (!(subject instanceof HTMLElement)) {\n return false;\n }\n const { onUpdate, transformTemplate } = motionValue.owner.getProps();\n return (supportsWaapi() &&\n name &&\n /**\n * Force WAAPI for color properties with browser-only color formats\n * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n */\n (acceleratedValues.has(name) ||\n (colorProperties.has(name) &&\n hasBrowserOnlyColors(keyframes))) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\");\n}\n\nexport { supportsBrowserAnimation };\n//# sourceMappingURL=waapi.mjs.map\n","import { MotionGlobalConfig, noop } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { makeAnimationInstant } from './utils/make-animation-instant.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass AsyncMotionValueAnimation extends WithPromise {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", keyframes, name, motionValue, element, ...options }) {\n super();\n /**\n * Bound to support return animation.stop pattern\n */\n this.stop = () => {\n if (this._animation) {\n this._animation.stop();\n this.stopTimeline?.();\n }\n this.keyframeResolver?.cancel();\n };\n this.createdAt = time.now();\n const optionsWithDefaults = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n };\n const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n this.keyframeResolver?.scheduleResolve();\n }\n onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n this.keyframeResolver = undefined;\n const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n this.resolvedAt = time.now();\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n let canAnimateValue = true;\n if (!canAnimate(keyframes, name, type, velocity)) {\n canAnimateValue = false;\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n }\n keyframes[0] = keyframes[keyframes.length - 1];\n makeAnimationInstant(options);\n options.repeat = 0;\n }\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first committed frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined;\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n };\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n *\n * Also skip WAAPI when keyframes aren't animatable, as the resolved\n * values may not be valid CSS and would trigger browser warnings.\n */\n const useWaapi = canAnimateValue &&\n !isHandoff &&\n supportsBrowserAnimation(resolvedOptions);\n const element = resolvedOptions.motionValue?.owner?.current;\n let animation;\n if (useWaapi) {\n try {\n animation = new NativeAnimationExtended({\n ...resolvedOptions,\n element,\n });\n }\n catch {\n animation = new JSAnimation(resolvedOptions);\n }\n }\n else {\n animation = new JSAnimation(resolvedOptions);\n }\n animation.finished.then(() => {\n this.notifyFinished();\n }).catch(noop);\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n this.pendingTimeline = undefined;\n }\n this._animation = animation;\n }\n get finished() {\n if (!this._animation) {\n return this._finished;\n }\n else {\n return this.animation.finished;\n }\n }\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n get animation() {\n if (!this._animation) {\n this.keyframeResolver?.resume();\n flushKeyframeResolvers();\n }\n return this._animation;\n }\n get duration() {\n return this.animation.duration;\n }\n get iterationDuration() {\n return this.animation.iterationDuration;\n }\n get time() {\n return this.animation.time;\n }\n set time(newTime) {\n this.animation.time = newTime;\n }\n get speed() {\n return this.animation.speed;\n }\n get state() {\n return this.animation.state;\n }\n set speed(newSpeed) {\n this.animation.speed = newSpeed;\n }\n get startTime() {\n return this.animation.startTime;\n }\n attachTimeline(timeline) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline);\n }\n else {\n this.pendingTimeline = timeline;\n }\n return () => this.stop();\n }\n play() {\n this.animation.play();\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.complete();\n }\n cancel() {\n if (this._animation) {\n this.animation.cancel();\n }\n this.keyframeResolver?.cancel();\n }\n}\n\nexport { AsyncMotionValueAnimation };\n//# sourceMappingURL=AsyncMotionValueAnimation.mjs.map\n","import { warning } from 'motion-utils';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\n\nfunction hasKeyframesChanged(keyframes) {\n const current = keyframes[0];\n if (keyframes.length === 1)\n return true;\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current)\n return true;\n }\n}\nfunction canAnimate(keyframes, name, type, velocity) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n if (originKeyframe === null) {\n return false;\n }\n /**\n * These aren't traditionally animatable but we do support them.\n * In future we could look into making this more generic or replacing\n * this function with mix() === mixImmediate\n */\n if (name === \"display\" || name === \"visibility\")\n return true;\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(originKeyframe, name);\n const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". \"${isOriginAnimatable ? targetKeyframe : originKeyframe}\" is not an animatable value.`, \"value-not-animatable\");\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n return false;\n }\n return (hasKeyframesChanged(keyframes) ||\n ((type === \"spring\" || isGenerator(type)) && velocity));\n}\n\nexport { canAnimate };\n//# sourceMappingURL=can-animate.mjs.map\n","function calcChildStagger(children, child, delayChildren, staggerChildren = 0, staggerDirection = 1) {\n const index = Array.from(children)\n .sort((a, b) => a.sortNodePosition(b))\n .indexOf(child);\n const numChildren = children.size;\n const maxStaggerDuration = (numChildren - 1) * staggerChildren;\n const delayIsFunction = typeof delayChildren === \"function\";\n return delayIsFunction\n ? delayChildren(index, numChildren)\n : staggerDirection === 1\n ? index * staggerChildren\n : maxStaggerDuration - index * staggerChildren;\n}\n\nexport { calcChildStagger };\n//# sourceMappingURL=calc-child-stagger.mjs.map\n","import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init, options = {}) {\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.events.change?.notify(this.current);\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return \n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n dirty() {\n this.events.change?.notify(this.current);\n }\n addDependent(dependent) {\n if (!this.dependents) {\n this.dependents = new Set();\n }\n this.dependents.add(dependent);\n }\n removeDependent(dependent) {\n if (this.dependents) {\n this.dependents.delete(dependent);\n }\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n//# sourceMappingURL=index.mjs.map\n","/**\n * If `transition` has `inherit: true`, shallow-merge it with\n * `parentTransition` (child keys win) and strip the `inherit` key.\n * Otherwise return `transition` unchanged.\n */\nfunction resolveTransition(transition, parentTransition) {\n if (transition?.inherit && parentTransition) {\n const { inherit: _, ...rest } = transition;\n return { ...parentTransition, ...rest };\n }\n return transition;\n}\n\nexport { resolveTransition };\n//# sourceMappingURL=resolve-transition.mjs.map\n","import { resolveTransition } from './resolve-transition.mjs';\n\nfunction getValueTransition(transition, key) {\n const valueTransition = transition?.[key] ??\n transition?.[\"default\"] ??\n transition;\n if (valueTransition !== transition) {\n return resolveTransition(valueTransition, transition);\n }\n return valueTransition;\n}\n\nexport { getValueTransition };\n//# sourceMappingURL=get-value-transition.mjs.map\n","import { transformProps } from '../../render/utils/keys-transform.mjs';\n\nconst underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n});\nconst keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n if (keyframes.length > 2) {\n return keyframesTransition;\n }\n else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring;\n }\n return ease;\n};\n\nexport { getDefaultTransition };\n//# sourceMappingURL=default-transitions.mjs.map\n","const orchestrationKeys = new Set([\n \"when\",\n \"delay\",\n \"delayChildren\",\n \"staggerChildren\",\n \"staggerDirection\",\n \"repeat\",\n \"repeatType\",\n \"repeatDelay\",\n \"from\",\n \"elapsed\",\n]);\n/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined(transition) {\n for (const key in transition) {\n if (!orchestrationKeys.has(key))\n return true;\n }\n return false;\n}\n\nexport { isTransitionDefined };\n//# sourceMappingURL=is-transition-defined.mjs.map\n","import { secondsToMilliseconds, MotionGlobalConfig } from 'motion-utils';\nimport { AsyncMotionValueAnimation } from '../AsyncMotionValueAnimation.mjs';\nimport { JSAnimation } from '../JSAnimation.mjs';\nimport { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { makeAnimationInstant } from '../utils/make-animation-instant.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { getFinalKeyframe } from '../keyframes/get-final.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const options = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unique transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n Object.assign(options, getDefaultTransition(name, options));\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n options.duration && (options.duration = secondsToMilliseconds(options.duration));\n options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));\n /**\n * Support deprecated way to set initial value. Prefer keyframe syntax.\n */\n if (options.from !== undefined) {\n options.keyframes[0] = options.from;\n }\n let shouldSkip = false;\n if (options.type === false ||\n (options.duration === 0 && !options.repeatDelay)) {\n makeAnimationInstant(options);\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (MotionGlobalConfig.instantAnimations ||\n MotionGlobalConfig.skipAnimations ||\n element?.shouldSkipAnimations ||\n valueTransition.skipAnimations) {\n shouldSkip = true;\n makeAnimationInstant(options);\n options.delay = 0;\n }\n /**\n * If the transition type or easing has been explicitly set by the user\n * then we don't want to allow flattening the animation.\n */\n options.allowFlatten = !valueTransition.type && !valueTransition.ease;\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate(finalKeyframe);\n options.onComplete();\n });\n return;\n }\n }\n return valueTransition.isSync\n ? new JSAnimation(options)\n : new AsyncMotionValueAnimation(options);\n};\n\nexport { animateMotionValue };\n//# sourceMappingURL=motion-value.mjs.map\n","import { invariant, isNumericalString } from 'motion-utils';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nconst splitCSSVariableRegex = \n// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token1, token2, fallback] = match;\n return [`--${token1 ?? token2}`, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`, \"max-css-var-depth\");\n const [token, fallback] = parseCSSVariable(current);\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n return isCSSVariableToken(fallback)\n ? getVariableValue(fallback, element, depth + 1)\n : fallback;\n}\n\nexport { getVariableValue, parseCSSVariable };\n//# sourceMappingURL=css-variables-conversion.mjs.map\n","function getValueState(visualElement) {\n const state = [{}, {}];\n visualElement?.values.forEach((value, key) => {\n state[0][key] = value.get();\n state[1][key] = value.getVelocity();\n });\n return state;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n//# sourceMappingURL=resolve-variants.mjs.map\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement);\n}\n\nexport { resolveVariant };\n//# sourceMappingURL=resolve-dynamic-variants.mjs.map\n","import { transformPropOrder } from './keys-transform.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n ...transformPropOrder,\n]);\n\nexport { positionalKeys };\n//# sourceMappingURL=keys-position.mjs.map\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n//# sourceMappingURL=is-keyframes-target.mjs.map\n","import { motionValue } from '../../value/index.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction resolveFinalValueInKeyframes(v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\nexport { setTarget };\n//# sourceMappingURL=setters.mjs.map\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n//# sourceMappingURL=is-motion-value.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { isWillChangeMotionValue } from './is.mjs';\n\nfunction addValueToWillChange(visualElement, key) {\n const willChange = visualElement.getValue(\"willChange\");\n /**\n * It could be that a user has set willChange to a regular MotionValue,\n * in which case we can't add the value to it.\n */\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key);\n }\n else if (!willChange && MotionGlobalConfig.WillChange) {\n const newWillChange = new MotionGlobalConfig.WillChange(\"auto\");\n visualElement.addValue(\"willChange\", newWillChange);\n newWillChange.add(key);\n }\n}\n\nexport { addValueToWillChange };\n//# sourceMappingURL=add-will-change.mjs.map\n","import { isMotionValue } from '../utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n//# sourceMappingURL=is.mjs.map\n","function camelToDash(str) {\n return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);\n}\n\nexport { camelToDash };\n//# sourceMappingURL=camel-to-dash.mjs.map\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n//# sourceMappingURL=data-id.mjs.map\n","import { optimizedAppearDataAttribute } from './data-id.mjs';\n\nfunction getOptimisedAppearId(visualElement) {\n return visualElement.props[optimizedAppearDataAttribute];\n}\n\nexport { getOptimisedAppearId };\n//# sourceMappingURL=get-appear-id.mjs.map\n","import { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { resolveTransition } from '../utils/resolve-transition.mjs';\nimport { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { addValueToWillChange } from '../../value/will-change/add-will-change.mjs';\nimport { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n let { transition, transitionEnd, ...target } = targetAndTransition;\n const defaultTransition = visualElement.getDefaultTransition();\n transition = transition\n ? resolveTransition(transition, defaultTransition)\n : defaultTransition;\n const reduceMotion = transition?.reduceMotion;\n const skipAnimations = transition?.skipAnimations;\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n const path = transition?.path;\n if (path) {\n // path mutates `target` to claim x/y; loop below skips them.\n path.animateVisualElement(visualElement, target, transition, delay, animations);\n }\n for (const key in target) {\n const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);\n const valueTarget = target[key];\n if (valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n };\n if (skipAnimations)\n valueTransition.skipAnimations = true;\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const currentValue = value.get();\n if (currentValue !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity) {\n frame.update(() => value.set(valueTarget));\n continue;\n }\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false;\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement);\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n if (startTime !== null) {\n valueTransition.startTime = startTime;\n isHandoff = true;\n }\n }\n }\n addValueToWillChange(visualElement, key);\n const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;\n value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n animations.push(animation);\n }\n }\n if (transitionEnd) {\n const applyTransitionEnd = () => frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n if (animations.length) {\n Promise.all(animations).then(applyTransitionEnd);\n }\n else {\n applyTransitionEnd();\n }\n }\n return animations;\n}\n\nexport { animateTarget };\n//# sourceMappingURL=visual-element-target.mjs.map\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { calcChildStagger } from '../utils/calc-child-stagger.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, options.type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve();\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n return animateChildren(visualElement, variant, forwardDelay, delayChildren, staggerChildren, staggerDirection, options);\n }\n : () => Promise.resolve();\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation];\n return first().then(() => last());\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delay = 0, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations = [];\n for (const child of visualElement.variantChildren) {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delay +\n (typeof delayChildren === \"function\" ? 0 : delayChildren) +\n calcChildStagger(visualElement.variantChildren, child, delayChildren, staggerChildren, staggerDirection),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n }\n return Promise.all(animations);\n}\n\nexport { animateVariant };\n//# sourceMappingURL=visual-element-variant.mjs.map\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n//# sourceMappingURL=auto.mjs.map\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n//# sourceMappingURL=test.mjs.map\n","import { auto } from './auto.mjs';\nimport { number } from './numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from './numbers/units.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n//# sourceMappingURL=dimensions.mjs.map\n","import { isZeroValueString } from 'motion-utils';\n\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n }\n else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n }\n else {\n return true;\n }\n}\n\nexport { isNone };\n//# sourceMappingURL=is-none.mjs.map\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [name, value] = v.slice(0, -1).split(\"(\");\n if (name === \"drop-shadow\")\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, \"\");\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + \"(\" + defaultValue + unit + \")\";\n}\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu;\nconst filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n//# sourceMappingURL=filter.mjs.map\n","import { complex } from './index.mjs';\n\nconst mask = {\n ...complex,\n getAnimatableNone: (v) => {\n const parsed = complex.parse(v);\n const transformer = complex.createTransformer(v);\n return transformer(parsed.map((v) => typeof v === \"number\" ? 0 : typeof v === \"object\" ? { ...v, alpha: 1 } : v));\n },\n};\n\nexport { mask };\n//# sourceMappingURL=mask.mjs.map\n","import { number } from './numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n//# sourceMappingURL=int.mjs.map\n","import { int } from '../int.mjs';\nimport { alpha } from '../numbers/index.mjs';\nimport { px } from '../numbers/units.mjs';\nimport { transformValueTypes } from './transform.mjs';\n\nconst numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n inset: px,\n insetBlock: px,\n insetBlockStart: px,\n insetBlockEnd: px,\n insetInline: px,\n insetInlineStart: px,\n insetInlineEnd: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n paddingBlock: px,\n paddingBlockStart: px,\n paddingBlockEnd: px,\n paddingInline: px,\n paddingInlineStart: px,\n paddingInlineEnd: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n marginBlock: px,\n marginBlockStart: px,\n marginBlockEnd: px,\n marginInline: px,\n marginInlineStart: px,\n marginInlineEnd: px,\n // Typography\n fontSize: px,\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n ...transformValueTypes,\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n//# sourceMappingURL=number.mjs.map\n","import { alpha, scale } from '../numbers/index.mjs';\nimport { px, progressPercentage, degrees } from '../numbers/units.mjs';\n\nconst transformValueTypes = {\n rotate: degrees,\n /**\n * Internal channel for `transition.path` orientToPath. Composed onto\n * `rotate` at the transform-build sites so the user's `rotate` is\n * never read or overwritten. Not part of `transformPropOrder`.\n */\n pathRotation: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n};\n\nexport { transformValueTypes };\n//# sourceMappingURL=transform.mjs.map\n","import { color } from '../color/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n mask,\n WebkitMask: mask,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n//# sourceMappingURL=defaults.mjs.map\n","import { complex } from '../complex/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { getDefaultValueType } from '../maps/defaults.mjs';\n\nconst customTypes = /*@__PURE__*/ new Set([filter, mask]);\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (!customTypes.has(defaultValueType))\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n//# sourceMappingURL=animatable-none.mjs.map\n","import { analyseComplexValue } from '../../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../../value/types/utils/animatable-none.mjs';\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"]);\nfunction makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {\n let i = 0;\n let animatableTemplate = undefined;\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\" &&\n !invalidTemplates.has(keyframe) &&\n analyseComplexValue(keyframe).values.length) {\n animatableTemplate = unresolvedKeyframes[i];\n }\n i++;\n }\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);\n }\n }\n}\n\nexport { makeNoneKeyframesAnimatable };\n//# sourceMappingURL=make-none-animatable.mjs.map\n","import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { isCSSVariableToken, containsCSSVariable } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { positionalValues, isNumOrPxType } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin);\n const targetHasVar = containsCSSVariable(target);\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true;\n return;\n }\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n const { element, name, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n const value = element.getValue(name);\n value && value.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n//# sourceMappingURL=DOMKeyframesResolver.mjs.map\n","function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector == null) {\n return [];\n }\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector).filter((element) => element != null);\n}\n\nexport { resolveElements };\n//# sourceMappingURL=resolve-elements.mjs.map\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n//# sourceMappingURL=get-as-type.mjs.map\n","import { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: microtask, cancel: cancelMicrotask } = \n/* @__PURE__ */ createRenderBatcher(queueMicrotask, false);\n\nexport { cancelMicrotask, microtask };\n//# sourceMappingURL=microtask.mjs.map\n","const isDragging = {\n x: false,\n y: false,\n};\nfunction isDragActive() {\n return isDragging.x || isDragging.y;\n}\n\nexport { isDragActive, isDragging };\n//# sourceMappingURL=is-active.mjs.map\n","import { resolveElements } from '../../utils/resolve-elements.mjs';\n\nfunction setupGesture(elementOrSelector, options) {\n const elements = resolveElements(elementOrSelector);\n const gestureAbortController = new AbortController();\n const eventOptions = {\n passive: true,\n ...options,\n signal: gestureAbortController.signal,\n };\n const cancel = () => gestureAbortController.abort();\n return [elements, eventOptions, cancel];\n}\n\nexport { setupGesture };\n//# sourceMappingURL=setup.mjs.map\n","import { isDragActive } from './drag/state/is-active.mjs';\nimport { setupGesture } from './utils/setup.mjs';\n\nfunction isValidHover(event) {\n return !(event.pointerType === \"touch\" || isDragActive());\n}\n/**\n * Create a hover gesture. hover() is different to .addEventListener(\"pointerenter\")\n * in that it has an easier syntax, filters out polyfilled touch events, interoperates\n * with drag gestures, and automatically removes the \"pointerennd\" event listener when the hover ends.\n *\n * @public\n */\nfunction hover(elementOrSelector, onHoverStart, options = {}) {\n const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);\n elements.forEach((element) => {\n let isPressed = false;\n let deferredHoverEnd = false;\n let hoverEndCallback;\n const removePointerLeave = () => {\n element.removeEventListener(\"pointerleave\", onPointerLeave);\n };\n const endHover = (event) => {\n if (hoverEndCallback) {\n hoverEndCallback(event);\n hoverEndCallback = undefined;\n }\n removePointerLeave();\n };\n const onPointerUp = (event) => {\n isPressed = false;\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", onPointerUp);\n if (deferredHoverEnd) {\n deferredHoverEnd = false;\n endHover(event);\n }\n };\n const onPointerDown = () => {\n isPressed = true;\n window.addEventListener(\"pointerup\", onPointerUp, eventOptions);\n window.addEventListener(\"pointercancel\", onPointerUp, eventOptions);\n };\n const onPointerLeave = (leaveEvent) => {\n if (leaveEvent.pointerType === \"touch\")\n return;\n if (isPressed) {\n deferredHoverEnd = true;\n return;\n }\n endHover(leaveEvent);\n };\n const onPointerEnter = (enterEvent) => {\n if (!isValidHover(enterEvent))\n return;\n deferredHoverEnd = false;\n const onHoverEnd = onHoverStart(element, enterEvent);\n if (typeof onHoverEnd !== \"function\")\n return;\n hoverEndCallback = onHoverEnd;\n element.addEventListener(\"pointerleave\", onPointerLeave, eventOptions);\n };\n element.addEventListener(\"pointerenter\", onPointerEnter, eventOptions);\n element.addEventListener(\"pointerdown\", onPointerDown, eventOptions);\n });\n return cancel;\n}\n\nexport { hover };\n//# sourceMappingURL=hover.mjs.map\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nconst isNodeOrChild = (parent, child) => {\n if (!child) {\n return false;\n }\n else if (parent === child) {\n return true;\n }\n else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };\n//# sourceMappingURL=is-node-or-child.mjs.map\n","const isPrimaryPointer = (event) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0;\n }\n else {\n /**\n * isPrimary is true for all mice buttons, whereas every touch point\n * is regarded as its own input. So subsequent concurrent touch points\n * will be false.\n *\n * Specifically match against false here as incomplete versions of\n * PointerEvents in very old browser might have it set as undefined.\n */\n return event.isPrimary !== false;\n }\n};\n\nexport { isPrimaryPointer };\n//# sourceMappingURL=is-primary-pointer.mjs.map\n","const keyboardAccessibleElements = new Set([\n \"BUTTON\",\n \"INPUT\",\n \"SELECT\",\n \"TEXTAREA\",\n \"A\",\n]);\n/**\n * Checks if an element is natively keyboard accessible (focusable).\n * Used by the press gesture to determine if we need to add tabIndex.\n */\nfunction isElementKeyboardAccessible(element) {\n return (keyboardAccessibleElements.has(element.tagName) ||\n element.isContentEditable === true);\n}\nconst textInputElements = new Set([\"INPUT\", \"SELECT\", \"TEXTAREA\"]);\n/**\n * Checks if an element has text selection or direct interaction behavior\n * that should block drag gestures from starting.\n *\n * This specifically targets form controls where the user might want to select\n * text or interact with the control (e.g., sliders, dropdowns).\n *\n * Buttons and links are NOT included because they don't have click-and-move\n * actions of their own - they only respond to click events, so dragging\n * should still work when initiated from these elements.\n */\nfunction isElementTextInput(element) {\n return (textInputElements.has(element.tagName) ||\n element.isContentEditable === true);\n}\n\nexport { isElementKeyboardAccessible, isElementTextInput };\n//# sourceMappingURL=is-keyboard-accessible.mjs.map\n","const isPressing = new WeakSet();\n\nexport { isPressing };\n//# sourceMappingURL=state.mjs.map\n","import { isPressing } from './state.mjs';\n\n/**\n * Filter out events that are not \"Enter\" keys.\n */\nfunction filterEvents(callback) {\n return (event) => {\n if (event.key !== \"Enter\")\n return;\n callback(event);\n };\n}\nfunction firePointerEvent(target, type) {\n target.dispatchEvent(new PointerEvent(\"pointer\" + type, { isPrimary: true, bubbles: true }));\n}\nconst enableKeyboardPress = (focusEvent, eventOptions) => {\n const element = focusEvent.currentTarget;\n if (!element)\n return;\n const handleKeydown = filterEvents(() => {\n if (isPressing.has(element))\n return;\n firePointerEvent(element, \"down\");\n const handleKeyup = filterEvents(() => {\n firePointerEvent(element, \"up\");\n });\n const handleBlur = () => firePointerEvent(element, \"cancel\");\n element.addEventListener(\"keyup\", handleKeyup, eventOptions);\n element.addEventListener(\"blur\", handleBlur, eventOptions);\n });\n element.addEventListener(\"keydown\", handleKeydown, eventOptions);\n /**\n * Add an event listener that fires on blur to remove the keydown events.\n */\n element.addEventListener(\"blur\", () => element.removeEventListener(\"keydown\", handleKeydown), eventOptions);\n};\n\nexport { enableKeyboardPress };\n//# sourceMappingURL=keyboard.mjs.map\n","import { isHTMLElement } from '../../utils/is-html-element.mjs';\nimport { isDragActive } from '../drag/state/is-active.mjs';\nimport { isNodeOrChild } from '../utils/is-node-or-child.mjs';\nimport { isPrimaryPointer } from '../utils/is-primary-pointer.mjs';\nimport { setupGesture } from '../utils/setup.mjs';\nimport { isElementKeyboardAccessible } from './utils/is-keyboard-accessible.mjs';\nimport { enableKeyboardPress } from './utils/keyboard.mjs';\nimport { isPressing } from './utils/state.mjs';\n\n/**\n * Filter out events that are not primary pointer events, or are triggering\n * while a Motion gesture is active.\n */\nfunction isValidPressEvent(event) {\n return isPrimaryPointer(event) && !isDragActive();\n}\nconst claimedPointerDownEvents = new WeakSet();\n/**\n * Create a press gesture.\n *\n * Press is different to `\"pointerdown\"`, `\"pointerup\"` in that it\n * automatically filters out secondary pointer events like right\n * click and multitouch.\n *\n * It also adds accessibility support for keyboards, where\n * an element with a press gesture will receive focus and\n * trigger on Enter `\"keydown\"` and `\"keyup\"` events.\n *\n * This is different to a browser's `\"click\"` event, which does\n * respond to keyboards but only for the `\"click\"` itself, rather\n * than the press start and end/cancel. The element also needs\n * to be focusable for this to work, whereas a press gesture will\n * make an element focusable by default.\n *\n * @public\n */\nfunction press(targetOrSelector, onPressStart, options = {}) {\n const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);\n const startPress = (startEvent) => {\n const target = startEvent.currentTarget;\n if (!isValidPressEvent(startEvent))\n return;\n if (claimedPointerDownEvents.has(startEvent))\n return;\n isPressing.add(target);\n if (options.stopPropagation) {\n claimedPointerDownEvents.add(startEvent);\n }\n const onPressEnd = onPressStart(target, startEvent);\n const onPointerEnd = (endEvent, success) => {\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", onPointerCancel);\n if (isPressing.has(target)) {\n isPressing.delete(target);\n }\n if (!isValidPressEvent(endEvent)) {\n return;\n }\n if (typeof onPressEnd === \"function\") {\n onPressEnd(endEvent, { success });\n }\n };\n const onPointerUp = (upEvent) => {\n onPointerEnd(upEvent, target === window ||\n target === document ||\n options.useGlobalTarget ||\n isNodeOrChild(target, upEvent.target));\n };\n const onPointerCancel = (cancelEvent) => {\n onPointerEnd(cancelEvent, false);\n };\n window.addEventListener(\"pointerup\", onPointerUp, eventOptions);\n window.addEventListener(\"pointercancel\", onPointerCancel, eventOptions);\n };\n targets.forEach((target) => {\n const pointerDownTarget = options.useGlobalTarget ? window : target;\n pointerDownTarget.addEventListener(\"pointerdown\", startPress, eventOptions);\n if (isHTMLElement(target)) {\n target.addEventListener(\"focus\", (event) => enableKeyboardPress(event, eventOptions));\n if (!isElementKeyboardAccessible(target) &&\n !target.hasAttribute(\"tabindex\")) {\n target.tabIndex = 0;\n }\n }\n });\n return cancelEvents;\n}\n\nexport { press };\n//# sourceMappingURL=index.mjs.map\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nfunction isHTMLElement(element) {\n return (isObject(element) &&\n \"offsetHeight\" in element &&\n !(\"ownerSVGElement\" in element));\n}\n\nexport { isHTMLElement };\n//# sourceMappingURL=is-html-element.mjs.map\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nfunction isSVGElement(element) {\n return isObject(element) && \"ownerSVGElement\" in element;\n}\n\nexport { isSVGElement };\n//# sourceMappingURL=is-svg-element.mjs.map\n","import { isSVGElement } from '../utils/is-svg-element.mjs';\nimport { resolveElements } from '../utils/resolve-elements.mjs';\n\nconst resizeHandlers = new WeakMap();\nlet observer;\nconst getSize = (borderBoxAxis, svgAxis, htmlAxis) => (target, borderBoxSize) => {\n if (borderBoxSize && borderBoxSize[0]) {\n return borderBoxSize[0][(borderBoxAxis + \"Size\")];\n }\n else if (isSVGElement(target) && \"getBBox\" in target) {\n return target.getBBox()[svgAxis];\n }\n else {\n return target[htmlAxis];\n }\n};\nconst getWidth = /*@__PURE__*/ getSize(\"inline\", \"width\", \"offsetWidth\");\nconst getHeight = /*@__PURE__*/ getSize(\"block\", \"height\", \"offsetHeight\");\nfunction notifyTarget({ target, borderBoxSize }) {\n resizeHandlers.get(target)?.forEach((handler) => {\n handler(target, {\n get width() {\n return getWidth(target, borderBoxSize);\n },\n get height() {\n return getHeight(target, borderBoxSize);\n },\n });\n });\n}\nfunction notifyAll(entries) {\n entries.forEach(notifyTarget);\n}\nfunction createResizeObserver() {\n if (typeof ResizeObserver === \"undefined\")\n return;\n observer = new ResizeObserver(notifyAll);\n}\nfunction resizeElement(target, handler) {\n if (!observer)\n createResizeObserver();\n const elements = resolveElements(target);\n elements.forEach((element) => {\n let elementHandlers = resizeHandlers.get(element);\n if (!elementHandlers) {\n elementHandlers = new Set();\n resizeHandlers.set(element, elementHandlers);\n }\n elementHandlers.add(handler);\n observer?.observe(element);\n });\n return () => {\n elements.forEach((element) => {\n const elementHandlers = resizeHandlers.get(element);\n elementHandlers?.delete(handler);\n if (!elementHandlers?.size) {\n observer?.unobserve(element);\n }\n });\n };\n}\n\nexport { resizeElement };\n//# sourceMappingURL=handle-element.mjs.map\n","const windowCallbacks = new Set();\nlet windowResizeHandler;\nfunction createWindowResizeHandler() {\n windowResizeHandler = () => {\n const info = {\n get width() {\n return window.innerWidth;\n },\n get height() {\n return window.innerHeight;\n },\n };\n windowCallbacks.forEach((callback) => callback(info));\n };\n window.addEventListener(\"resize\", windowResizeHandler);\n}\nfunction resizeWindow(callback) {\n windowCallbacks.add(callback);\n if (!windowResizeHandler)\n createWindowResizeHandler();\n return () => {\n windowCallbacks.delete(callback);\n if (!windowCallbacks.size &&\n typeof windowResizeHandler === \"function\") {\n window.removeEventListener(\"resize\", windowResizeHandler);\n windowResizeHandler = undefined;\n }\n };\n}\n\nexport { resizeWindow };\n//# sourceMappingURL=handle-window.mjs.map\n","import { resizeElement } from './handle-element.mjs';\nimport { resizeWindow } from './handle-window.mjs';\n\nfunction resize(a, b) {\n return typeof a === \"function\" ? resizeWindow(a) : resizeElement(a, b);\n}\n\nexport { resize };\n//# sourceMappingURL=index.mjs.map\n","import { color } from '../color/index.mjs';\nimport { complex } from '../complex/index.mjs';\nimport { dimensionValueTypes } from '../dimensions.mjs';\nimport { testValueType } from '../test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n//# sourceMappingURL=find.mjs.map\n","const createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n});\nconst createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\n x: createAxis(),\n y: createAxis(),\n});\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n//# sourceMappingURL=models.mjs.map\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n//# sourceMappingURL=store.mjs.map\n","function isAnimationControls(v) {\n return (v !== null &&\n typeof v === \"object\" &&\n typeof v.start === \"function\");\n}\n\nexport { isAnimationControls };\n//# sourceMappingURL=is-animation-controls.mjs.map\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n//# sourceMappingURL=is-variant-label.mjs.map\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n//# sourceMappingURL=variant-props.mjs.map\n","import { isAnimationControls } from './is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n//# sourceMappingURL=is-controlling-variants.mjs.map\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n//# sourceMappingURL=state.mjs.map\n","import { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nconst isBrowser = typeof window !== \"undefined\";\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addEventListener(\"change\", setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { hasReducedMotionListener, initPrefersReducedMotion, prefersReducedMotion };\n//# sourceMappingURL=index.mjs.map\n","import { warnOnce, secondsToMilliseconds, isNumericalString, isZeroValueString, SubscriptionManager } from 'motion-utils';\nimport { KeyframeResolver } from '../animation/keyframes/KeyframesResolver.mjs';\nimport { NativeAnimation } from '../animation/NativeAnimation.mjs';\nimport { acceleratedValues } from '../animation/waapi/utils/accelerated-values.mjs';\nimport { microtask } from '../frameloop/microtask.mjs';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { complex } from '../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../value/types/utils/animatable-none.mjs';\nimport { findValueType } from '../value/types/utils/find.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { transformProps } from './utils/keys-transform.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { initPrefersReducedMotion } from './utils/reduced-motion/index.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './utils/reduced-motion/state.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions = {};\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nfunction setFeatureDefinitions(definitions) {\n featureDefinitions = definitions;\n}\n/**\n * Get the current feature definitions\n */\nfunction getFeatureDefinitions() {\n return featureDefinitions;\n}\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * Decides whether animations should be skipped for this VisualElement.\n * Useful for E2E tests and visual regression testing.\n */\n this.shouldSkipAnimations = false;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * Track whether this element has been mounted before, to detect\n * remounts after Suspense unmount/remount cycles.\n */\n this.hasBeenMounted = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0.0;\n this.scheduleRender = () => {\n const now = time.now();\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.skipAnimationsConfig = skipAnimations;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key]);\n }\n }\n }\n mount(instance) {\n /**\n * If this element has been mounted before (e.g. after a Suspense\n * unmount/remount), reset motion values to their initial state\n * so animations replay correctly from initial → animate.\n */\n if (this.hasBeenMounted) {\n for (const key in this.initialValues) {\n this.values.get(key)?.jump(this.initialValues[key]);\n this.latestValues[key] = this.initialValues[key];\n }\n }\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n /**\n * Determine reduced motion preference. Only initialize the matchMedia\n * listener if we actually need the dynamic value (i.e., when config\n * is neither \"never\" nor \"always\").\n */\n if (this.reducedMotionConfig === \"never\") {\n this.shouldReduceMotion = false;\n }\n else if (this.reducedMotionConfig === \"always\") {\n this.shouldReduceMotion = true;\n }\n else {\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion = prefersReducedMotion.current;\n }\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\", \"reduced-motion-disabled\");\n }\n /**\n * Set whether animations should be skipped based on the config.\n */\n this.shouldSkipAnimations = this.skipAnimationsConfig ?? false;\n this.parent?.addChild(this);\n this.update(this.props, this.presenceContext);\n this.hasBeenMounted = true;\n }\n unmount() {\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent?.removeChild(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n addChild(child) {\n this.children.add(child);\n this.enteringChildren ?? (this.enteringChildren = new Set());\n this.enteringChildren.add(child);\n }\n removeChild(child) {\n this.children.delete(child);\n this.enteringChildren && this.enteringChildren.delete(child);\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n if (value.accelerate &&\n acceleratedValues.has(key) &&\n this.current instanceof HTMLElement) {\n const { factory, keyframes, times, ease, duration } = value.accelerate;\n const animation = new NativeAnimation({\n element: this.current,\n name: key,\n keyframes,\n times,\n ease,\n duration: secondsToMilliseconds(duration),\n });\n const cleanup = factory(animation);\n this.valueSubscriptions.set(key, () => {\n cleanup();\n animation.cancel();\n });\n return;\n }\n const valueIsTransform = transformProps.has(key);\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform();\n }\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n this.scheduleRender();\n });\n let removeSyncCheck;\n if (typeof window !== \"undefined\" &&\n window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n if (removeSyncCheck)\n removeSyncCheck();\n // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n // can resubscribe before the animation is cancelled (#3315).\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (!this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n scheduleRenderMicrotask() {\n microtask.render(this.render);\n }\n}\n\nexport { VisualElement, getFeatureDefinitions, setFeatureDefinitions };\n//# sourceMappingURL=VisualElement.mjs.map\n","import { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\n/**\n * Updates motion values from props changes.\n * Uses `any` type for element to avoid circular dependencies with VisualElement.\n */\nfunction updateMotionValuesFromProps(element, next, prev) {\n for (const key in next) {\n const nextValue = next[key];\n const prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }));\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key);\n if (existingValue.liveStyle === true) {\n existingValue.jump(nextValue);\n }\n else if (!existingValue.hasAnimated) {\n existingValue.set(nextValue);\n }\n }\n else {\n const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n//# sourceMappingURL=motion-values.mjs.map\n","import { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { DOMKeyframesResolver } from '../../animation/keyframes/DOMKeyframesResolver.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n const style = props.style;\n return style ? style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`;\n }\n });\n }\n }\n}\n\nexport { DOMVisualElement };\n//# sourceMappingURL=DOMVisualElement.mjs.map\n","/**\n * Feature base class for extending VisualElement functionality.\n * Features are plugins that can be mounted/unmounted to add behavior\n * like gestures, animations, or layout tracking.\n */\nclass Feature {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() { }\n}\n\nexport { Feature };\n//# sourceMappingURL=Feature.mjs.map\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n const topLeft = transformPoint({ x: point.left, y: point.top });\n const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n//# sourceMappingURL=conversion.mjs.map\n","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale({ scale, scaleX, scaleY }) {\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY ||\n values.skewX ||\n values.skewY);\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { has2DTranslate, hasScale, hasTransform };\n//# sourceMappingURL=has-transform.mjs.map\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n const distanceFromOrigin = point - originPoint;\n const scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, { x, y }) {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\nconst TREE_SCALE_SNAP_MIN = 0.999999999999;\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001;\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const { visualElement } = node.options;\n if (visualElement &&\n visualElement.props.style &&\n visualElement.props.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n translateAxis(box.x, -node.scroll.offset.x);\n translateAxis(box.y, -node.scroll.offset.y);\n }\n if (delta) {\n // Incoporate each ancestor's scale into a cumulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues, node.layout?.layoutBox);\n }\n }\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n if (treeScale.x < TREE_SCALE_SNAP_MAX &&\n treeScale.x > TREE_SCALE_SNAP_MIN) {\n treeScale.x = 1.0;\n }\n if (treeScale.y < TREE_SCALE_SNAP_MAX &&\n treeScale.y > TREE_SCALE_SNAP_MIN) {\n treeScale.y = 1.0;\n }\n}\nfunction translateAxis(axis, distance) {\n axis.min += distance;\n axis.max += distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);\n}\nfunction resolveAxisTranslate(value, axis) {\n if (typeof value === \"string\") {\n return (parseFloat(value) / 100) * (axis.max - axis.min);\n }\n return value;\n}\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform, sourceBox) {\n const resolveBox = sourceBox ?? box;\n transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX);\n transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n//# sourceMappingURL=delta-apply.mjs.map\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n//# sourceMappingURL=measure.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(latestValues, transform, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n let transformIsDefault = true;\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n const value = latestValues[key];\n if (value === undefined)\n continue;\n let valueIsDefault = true;\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n }\n else {\n const parsed = parseFloat(value);\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0;\n }\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (!valueIsDefault) {\n transformIsDefault = false;\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${valueAsType}) `;\n }\n if (transformTemplate) {\n transform[key] = valueAsType;\n }\n }\n }\n // `pathRotation` composes onto `rotate` as a separate additive term so\n // the user's `rotate` is never clobbered. Deliberately not a slot in\n // `transformPropOrder`.\n const pathRotation = latestValues.pathRotation;\n if (pathRotation) {\n transformIsDefault = false;\n transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `;\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform };\n//# sourceMappingURL=build-transform.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformProps } from '../../utils/keys-transform.mjs';\nimport { isCSSVariableName } from '../../../animation/utils/is-css-variable.mjs';\nimport { buildTransform } from './build-transform.mjs';\n\nfunction buildHTMLStyles(state, latestValues, transformTemplate) {\n const { style, vars, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept separately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key];\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n continue;\n }\n else if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n else {\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] =\n valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(latestValues, state.transform, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n//# sourceMappingURL=build-styles.mjs.map\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n const elementStyle = element.style;\n let key;\n for (key in style) {\n // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type.\n elementStyle[key] = style[key];\n }\n // Write projection styles directly to element style\n projection?.applyProjectionStyles(elementStyle, styleProp);\n for (key in vars) {\n // Loop over any CSS variables and assign those.\n // They can only be assigned using `setProperty`.\n elementStyle.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n//# sourceMappingURL=render.mjs.map\n","import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n//# sourceMappingURL=scale-border-radius.mjs.map\n","import { complex } from '../../value/types/complex/index.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n//# sourceMappingURL=scale-box-shadow.mjs.map\n","import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { correctBorderRadius } from './scale-border-radius.mjs';\nimport { correctBoxShadow } from './scale-box-shadow.mjs';\n\nconst scaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\nfunction addScaleCorrector(correctors) {\n for (const key in correctors) {\n scaleCorrectors[key] = correctors[key];\n if (isCSSVariableName(key)) {\n scaleCorrectors[key].isCSSVariable = true;\n }\n }\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n//# sourceMappingURL=scale-correction.mjs.map\n","import { transformProps } from './keys-transform.mjs';\nimport { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nexport { addScaleCorrector } from '../../projection/styles/scale-correction.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue, scaleCorrectors };\n//# sourceMappingURL=is-forced-motion-value.mjs.map\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { isForcedMotionValue } from '../../utils/is-forced-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const style = props.style;\n const prevStyle = prevProps?.style;\n const newValues = {};\n if (!style)\n return newValues;\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevStyle && isMotionValue(prevStyle[key])) ||\n isForcedMotionValue(key, props) ||\n visualElement?.getValue(key)?.liveStyle !== undefined) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n","import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { transformProps } from '../utils/keys-transform.mjs';\nimport { defaultTransformValue, readTransformValue } from '../dom/parse-transform.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"html\";\n this.renderInstance = renderHTML;\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n return this.projection?.isProjecting\n ? defaultTransformValue(key)\n : readTransformValue(instance, key);\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, props) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n//# sourceMappingURL=HTMLVisualElement.mjs.map\n","const dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n *\n * Note: We use unitless values for stroke-dasharray and stroke-dashoffset\n * because Safari incorrectly scales px values when the page is zoomed.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset (unitless to avoid Safari zoom bug)\n attrs[keys.offset] = `${-offset}`;\n // Build the dash array (unitless to avoid Safari zoom bug)\n attrs[keys.array] = `${length} ${spacing}`;\n}\n\nexport { buildSVGPath };\n//# sourceMappingURL=path.mjs.map\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * CSS Motion Path properties that should remain as CSS styles on SVG elements.\n */\nconst cssMotionPathProperties = [\n \"offsetDistance\",\n \"offsetPath\",\n \"offsetRotate\",\n \"offsetAnchor\",\n];\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate, styleProp) {\n buildHTMLStyles(state, latest, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style } = state;\n /**\n * However, we apply transforms as CSS transforms.\n * So if we detect a transform, transformOrigin we take it from attrs and copy it into style.\n */\n if (attrs.transform) {\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\";\n delete attrs.transformOrigin;\n }\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = styleProp?.transformBox ?? \"fill-box\";\n delete attrs.transformBox;\n }\n for (const key of cssMotionPathProperties) {\n if (attrs[key] !== undefined) {\n style[key] = attrs[key];\n delete attrs[key];\n }\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n//# sourceMappingURL=build-attrs.mjs.map\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nconst camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n]);\n\nexport { camelCaseAttributes };\n//# sourceMappingURL=camel-case-attrs.mjs.map\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n//# sourceMappingURL=is-svg-tag.mjs.map\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n for (const key in props) {\n if (isMotionValue(props[key]) ||\n isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n","import { transformProps } from '../utils/keys-transform.mjs';\nimport { getDefaultValueType } from '../../value/types/maps/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"svg\";\n this.isSVGTag = false;\n this.measureInstanceViewportBox = createBox;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n build(renderState, latestValues, props) {\n buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n//# sourceMappingURL=SVGVisualElement.mjs.map\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (const key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n//# sourceMappingURL=render.mjs.map\n","import { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nconst numVariantProps = variantProps.length;\n/**\n * Get variant context from a visual element's parent chain.\n * Uses `any` type for visualElement to avoid circular dependencies.\n */\nfunction getVariantContext(visualElement) {\n if (!visualElement)\n return undefined;\n if (!visualElement.isControllingVariants) {\n const context = visualElement.parent\n ? getVariantContext(visualElement.parent) || {}\n : {};\n if (visualElement.props.initial !== undefined) {\n context.initial = visualElement.props.initial;\n }\n return context;\n }\n const context = {};\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i];\n const prop = visualElement.props[name];\n if (isVariantLabel(prop) || prop === false) {\n context[name] = prop;\n }\n }\n return context;\n}\n\nexport { getVariantContext };\n//# sourceMappingURL=get-variant-context.mjs.map\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n const prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n//# sourceMappingURL=shallow-compare.mjs.map\n","import { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\nimport { calcChildStagger } from '../../animation/utils/calc-child-stagger.mjs';\nimport { getVariantContext } from './get-variant-context.mjs';\nimport { isAnimationControls } from './is-animation-controls.mjs';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { shallowCompare } from './shallow-compare.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction createAnimateFunction(visualElement) {\n return (animations) => {\n return Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n };\n}\nfunction createAnimationState(visualElement) {\n let animate = createAnimateFunction(visualElement);\n let state = createState();\n let isInitialRender = true;\n /**\n * Track whether the animation state has been reset (e.g. via StrictMode\n * double-invocation or Suspense unmount/remount). On the first\n * animateChanges() call after a reset we need to behave like the initial\n * render for variant-inheritance checks, even though isInitialRender is\n * already false.\n */\n let wasReset = false;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues = (type) => (acc, definition) => {\n const resolved = resolveVariant(visualElement, definition, type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\n };\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(changedActiveType) {\n const { props } = visualElement;\n const context = getVariantContext(visualElement.parent) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity;\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state[type];\n const prop = props[type] !== undefined\n ? props[type]\n : context[type];\n const propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited = prop === context[type] &&\n prop !== props[type] &&\n propIsVariant;\n if (isInherited &&\n (isInitialRender || wasReset) &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys };\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n continue;\n }\n /**\n * If exit is already active and wasn't just activated, skip\n * re-processing to prevent interrupting running exit animations.\n * Re-resolving exit with a changed custom value can start new\n * value animations that stop the originals, leaving the exit\n * animation promise unresolved and the component stuck in the DOM.\n */\n if (type === \"exit\" && typeState.isActive && activeDelta !== true) {\n if (typeState.prevResolvedValues) {\n encounteredKeys = {\n ...encounteredKeys,\n ...typeState.prevResolvedValues,\n };\n }\n continue;\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n let handledRemovedValues = false;\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n if (removedKeys.has(key)) {\n handledRemovedValues = true;\n removedKeys.delete(key);\n }\n typeState.needsAnimating[key] = true;\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = false;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n let valueHasChanged = false;\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n valueHasChanged =\n !shallowCompare(next, prev) || variantDidChange;\n }\n else {\n valueHasChanged = next !== prev;\n }\n if (valueHasChanged) {\n if (next !== undefined && next !== null) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if ((isInitialRender || wasReset) &&\n visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to skip this animation\n * unless the inherited variants haven't changed on this render.\n */\n const willAnimateViaParent = isInherited && variantDidChange;\n const needsAnimating = !willAnimateViaParent || handledRemovedValues;\n if (shouldAnimateType && needsAnimating) {\n animations.push(...definitionList.map((animation) => {\n const options = { type };\n /**\n * If we're performing the initial animation, but we're not\n * rendering at the same time as the variant-controlling parent,\n * we want to use the parent's transition to calculate the stagger.\n */\n if (typeof animation === \"string\" &&\n (isInitialRender || wasReset) &&\n !willAnimateViaParent &&\n visualElement.manuallyAnimateOnMount &&\n visualElement.parent) {\n const { parent } = visualElement;\n const parentVariant = resolveVariant(parent, animation);\n if (parent.enteringChildren && parentVariant) {\n const { delayChildren } = parentVariant.transition || {};\n options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren);\n }\n }\n return {\n animation: animation,\n options,\n };\n }));\n }\n }\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation = {};\n /**\n * If the initial prop contains a transition we can use that, otherwise\n * allow the animation function to use the visual element's default.\n */\n if (typeof props.initial !== \"boolean\") {\n const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial)\n ? props.initial[0]\n : props.initial);\n if (initialTransition && initialTransition.transition) {\n fallbackAnimation.transition = initialTransition.transition;\n }\n }\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = true;\n // @ts-expect-error - @mattgperry to figure if we should do something here\n fallbackAnimation[key] = fallbackTarget ?? null;\n });\n animations.push({ animation: fallbackAnimation });\n }\n let shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n (props.initial === false || props.initial === props.animate) &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n wasReset = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive) {\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive));\n state[type].isActive = isActive;\n const animations = animateChanges(type);\n for (const key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n reset: () => {\n state = createState();\n wasReset = true;\n },\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n//# sourceMappingURL=animation-state.mjs.map\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n const resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition);\n });\n}\n\nexport { animateVisualElement };\n//# sourceMappingURL=visual-element.mjs.map\n","/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyBoxInto(box, originBox) {\n copyAxisInto(box.x, originBox.x);\n copyAxisInto(box.y, originBox.y);\n}\n/**\n * Reset a delta to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisDeltaInto(delta, originDelta) {\n delta.translate = originDelta.translate;\n delta.scale = originDelta.scale;\n delta.originPoint = originDelta.originPoint;\n delta.origin = originDelta.origin;\n}\n\nexport { copyAxisDeltaInto, copyAxisInto, copyBoxInto };\n//# sourceMappingURL=copy.mjs.map\n","import { mixNumber } from '../../utils/mix/number.mjs';\n\nconst SCALE_PRECISION = 0.0001;\nconst SCALE_MIN = 1 - SCALE_PRECISION;\nconst SCALE_MAX = 1 + SCALE_PRECISION;\nconst TRANSLATE_PRECISION = 0.01;\nconst TRANSLATE_MIN = 0 - TRANSLATE_PRECISION;\nconst TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin = 0.5) {\n delta.origin = origin;\n delta.originPoint = mixNumber(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n delta.translate =\n mixNumber(target.min, target.max, delta.origin) - delta.originPoint;\n if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) ||\n isNaN(delta.scale)) {\n delta.scale = 1.0;\n }\n if ((delta.translate >= TRANSLATE_MIN &&\n delta.translate <= TRANSLATE_MAX) ||\n isNaN(delta.translate)) {\n delta.translate = 0.0;\n }\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);\n}\nfunction calcRelativeAxis(target, relative, parent, anchor = 0) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min;\n target.min = anchorPoint + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent, anchor) {\n calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x);\n calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent, anchor = 0) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min;\n target.min = layout.min - anchorPoint;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent, anchor) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n//# sourceMappingURL=delta-calc.mjs.map\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n//# sourceMappingURL=delta-remove.mjs.map\n","import { calcLength } from './delta-calc.mjs';\n\nfunction isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction axisEquals(a, b) {\n return a.min === b.min && a.max === b.max;\n}\nfunction boxEquals(a, b) {\n return axisEquals(a.x, b.x) && axisEquals(a.y, b.y);\n}\nfunction axisEqualsRounded(a, b) {\n return (Math.round(a.min) === Math.round(b.min) &&\n Math.round(a.max) === Math.round(b.max));\n}\nfunction boxEqualsRounded(a, b) {\n return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y);\n}\nfunction aspectRatio(box) {\n return calcLength(box.x) / calcLength(box.y);\n}\nfunction axisDeltaEquals(a, b) {\n return (a.translate === b.translate &&\n a.scale === b.scale &&\n a.originPoint === b.originPoint);\n}\n\nexport { aspectRatio, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, isDeltaZero };\n//# sourceMappingURL=utils.mjs.map\n","function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n//# sourceMappingURL=each-axis.mjs.map\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent, px } from '../../value/types/numbers/units.mjs';\nimport { progress, circOut, noop } from 'motion-utils';\n\nconst borderLabels = [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n];\nconst numBorders = borderLabels.length;\nconst asNumber = (value) => typeof value === \"string\" ? parseFloat(value) : value;\nconst isPx = (value) => typeof value === \"number\" || px.test(value);\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mixNumber(0, lead.opacity ?? 1, easeCrossfadeIn(progress));\n target.opacityExit = mixNumber(follow.opacity ?? 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mixNumber(follow.opacity ?? 1, lead.opacity ?? 1, progress);\n }\n /**\n * Mix border radius\n */\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = borderLabels[i];\n let followRadius = getRadius(follow, borderLabel);\n let leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n const canMix = followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mixNumber(asNumber(followRadius), asNumber(leadRadius), progress), 0);\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\";\n }\n }\n else {\n target[borderLabel] = leadRadius;\n }\n }\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mixNumber(follow.rotate || 0, lead.rotate || 0, progress);\n }\n}\nfunction getRadius(values, radiusName) {\n return values[radiusName] !== undefined\n ? values[radiusName]\n : values.borderRadius;\n}\nconst easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut);\nconst easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop);\nfunction compress(min, max, easing) {\n return (p) => {\n // Could replace ifs with clamp\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\nexport { mixValues };\n//# sourceMappingURL=mix-values.mjs.map\n","function addDomEvent(target, eventName, handler, options = { passive: true }) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler);\n}\n\nexport { addDomEvent };\n//# sourceMappingURL=add-dom-event.mjs.map\n","const compareByDepth = (a, b) => a.depth - b.depth;\n\nexport { compareByDepth };\n//# sourceMappingURL=compare-by-depth.mjs.map\n","import { addUniqueItem, removeItem } from 'motion-utils';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nclass FlatTree {\n constructor() {\n this.children = [];\n this.isDirty = false;\n }\n add(child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n }\n remove(child) {\n removeItem(this.children, child);\n this.isDirty = true;\n }\n forEach(callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n }\n}\n\nexport { FlatTree };\n//# sourceMappingURL=flat-tree.mjs.map\n","import { isMotionValue } from './is-motion-value.mjs';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n */\nfunction resolveMotionValue(value) {\n return isMotionValue(value) ? value.get() : value;\n}\n\nexport { resolveMotionValue };\n//# sourceMappingURL=resolve-motion-value.mjs.map\n","import { addUniqueItem, removeItem } from 'motion-utils';\n\nclass NodeStack {\n constructor() {\n this.members = [];\n }\n add(node) {\n addUniqueItem(this.members, node);\n for (let i = this.members.length - 1; i >= 0; i--) {\n const member = this.members[i];\n if (member === node || member === this.lead || member === this.prevLead)\n continue;\n const inst = member.instance;\n if ((!inst || inst.isConnected === false) && !member.snapshot) {\n removeItem(this.members, member);\n member.unmount();\n }\n }\n node.scheduleRender();\n }\n remove(node) {\n removeItem(this.members, node);\n if (node === this.prevLead)\n this.prevLead = undefined;\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1];\n if (prevLead)\n this.promote(prevLead);\n }\n }\n relegate(node) {\n for (let i = this.members.indexOf(node) - 1; i >= 0; i--) {\n const member = this.members[i];\n if (member.isPresent !== false && member.instance?.isConnected !== false) {\n this.promote(member);\n return true;\n }\n }\n return false;\n }\n promote(node, preserveFollowOpacity) {\n const prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.updateSnapshot();\n node.scheduleRender();\n const { layoutDependency: prevDep } = prevLead.options;\n const { layoutDependency: nextDep } = node.options;\n if (prevDep === undefined || prevDep !== nextDep) {\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity)\n prevLead.preserveOpacity = true;\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues;\n }\n if (node.root?.isUpdating)\n node.isLayoutDirty = true;\n }\n if (node.options.crossfade === false)\n prevLead.hide();\n }\n }\n exitAnimationComplete() {\n this.members.forEach((member) => {\n member.options.onExitComplete?.();\n member.resumingFrom?.options.onExitComplete?.();\n });\n }\n scheduleRender() {\n this.members.forEach((member) => member.instance && member.scheduleRender(false));\n }\n removeLeadSnapshot() {\n if (this.lead?.snapshot)\n this.lead.snapshot = undefined;\n }\n}\n\nexport { NodeStack };\n//# sourceMappingURL=stack.mjs.map\n","/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nconst globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n};\n\nexport { globalProjectionState };\n//# sourceMappingURL=state.mjs.map\n","import { SubscriptionManager, clamp, noop } from 'motion-utils';\nimport { animateSingleValue } from '../../animation/animate/single-value.mjs';\nimport { getOptimisedAppearId } from '../../animation/optimized-appear/get-appear-id.mjs';\nimport { getValueTransition } from '../../animation/utils/get-value-transition.mjs';\nimport { microtask } from '../../frameloop/microtask.mjs';\nimport { time } from '../../frameloop/sync-time.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { activeAnimations } from '../../stats/animation-count.mjs';\nimport { statsBuffer } from '../../stats/buffer.mjs';\nimport { delay } from '../../utils/delay.mjs';\nimport { isSVGElement } from '../../utils/is-svg-element.mjs';\nimport { isSVGSVGElement } from '../../utils/is-svg-svg-element.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto, copyAxisDeltaInto, copyAxisInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcLength, calcRelativeBox, calcRelativePosition, calcBoxDelta, isNear } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\nimport { boxEqualsRounded, isDeltaZero, axisDeltaEquals, boxEquals, aspectRatio } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { FlatTree } from '../utils/flat-tree.mjs';\nimport { hasTransform, hasScale, has2DTranslate } from '../utils/has-transform.mjs';\nimport { globalProjectionState } from './state.mjs';\nimport { frame, cancelFrame, frameData, frameSteps } from '../../frameloop/frame.mjs';\n\nconst metrics = {\n nodes: 0,\n calculatedTargetDeltas: 0,\n calculatedProjections: 0,\n};\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nconst animationTarget = 1000;\nlet id = 0;\nfunction resetDistortingTransform(key, visualElement, values, sharedAnimationValues) {\n const { latestValues } = visualElement;\n // Record the distorting transform and then temporarily set it to 0\n if (latestValues[key]) {\n values[key] = latestValues[key];\n visualElement.setStaticValue(key, 0);\n if (sharedAnimationValues) {\n sharedAnimationValues[key] = 0;\n }\n }\n}\nfunction cancelTreeOptimisedTransformAnimations(projectionNode) {\n projectionNode.hasCheckedOptimisedAppear = true;\n if (projectionNode.root === projectionNode)\n return;\n const { visualElement } = projectionNode.options;\n if (!visualElement)\n return;\n const appearId = getOptimisedAppearId(visualElement);\n if (window.MotionHasOptimisedAnimation(appearId, \"transform\")) {\n const { layout, layoutId } = projectionNode.options;\n window.MotionCancelOptimisedAnimation(appearId, \"transform\", frame, !(layout || layoutId));\n }\n const { parent } = projectionNode;\n if (parent && !parent.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(parent);\n }\n}\nfunction createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) {\n return class ProjectionNode {\n constructor(latestValues = {}, parent = defaultParent?.()) {\n /**\n * A unique ID generated for every projection node.\n */\n this.id = id++;\n /**\n * An id that represents a unique session instigated by startUpdate.\n */\n this.animationId = 0;\n this.animationCommitId = 0;\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n this.children = new Set();\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n this.options = {};\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n this.isLayoutDirty = false;\n /**\n * Flag to true if we think the projection calculations for this node needs\n * recalculating as a result of an updated transform or layout animation.\n */\n this.isProjectionDirty = false;\n /**\n * Flag to true if the layout *or* transform has changed. This then gets propagated\n * throughout the projection tree, forcing any element below to recalculate on the next frame.\n */\n this.isSharedProjectionDirty = false;\n /**\n * Flag transform dirty. This gets propagated throughout the whole tree but is only\n * respected by shared nodes.\n */\n this.isTransformDirty = false;\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n this.isUpdating = false;\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n this.isSVG = false;\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n this.needsReset = false;\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n this.shouldResetTransform = false;\n /**\n * Store whether this node has been checked for optimised appear animations. As\n * effects fire bottom-up, and we want to look up the tree for appear animations,\n * this makes sure we only check each path once, stopping at nodes that\n * have already been checked.\n */\n this.hasCheckedOptimisedAppear = false;\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to layoutly\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n this.treeScale = { x: 1, y: 1 };\n /**\n *\n */\n this.eventHandlers = new Map();\n this.hasTreeAnimated = false;\n this.layoutVersion = 0;\n // Note: Currently only running on root node\n this.updateScheduled = false;\n this.scheduleUpdate = () => this.update();\n this.projectionUpdateScheduled = false;\n this.checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false;\n this.clearAllSnapshots();\n }\n };\n /**\n * This is a multi-step process as shared nodes might be of different depths. Nodes\n * are sorted by depth order, so we need to resolve the entire tree before moving to\n * the next step.\n */\n this.updateProjection = () => {\n this.projectionUpdateScheduled = false;\n /**\n * Reset debug counts. Manually resetting rather than creating a new\n * object each frame.\n */\n if (statsBuffer.value) {\n metrics.nodes =\n metrics.calculatedTargetDeltas =\n metrics.calculatedProjections =\n 0;\n }\n this.nodes.forEach(propagateDirtyNodes);\n this.nodes.forEach(resolveTargetDelta);\n this.nodes.forEach(calcProjection);\n this.nodes.forEach(cleanDirtyNodes);\n if (statsBuffer.addProjectionMetrics) {\n statsBuffer.addProjectionMetrics(metrics);\n }\n };\n /**\n * Frame calculations\n */\n this.resolvedRelativeTargetAt = 0.0;\n this.linkedParentVersion = 0;\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n /**\n * Shared layout\n */\n // TODO Only running on root node\n this.sharedNodes = new Map();\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? [...parent.path, parent] : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n for (let i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n addEventListener(name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n }\n notifyListeners(name, ...args) {\n const subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager && subscriptionManager.notify(...args);\n }\n hasListeners(name) {\n return this.eventHandlers.has(name);\n }\n /**\n * Lifecycles\n */\n mount(instance) {\n if (this.instance)\n return;\n this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance);\n this.instance = instance;\n const { layoutId, layout, visualElement } = this.options;\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n this.parent && this.parent.children.add(this);\n if (this.root.hasTreeAnimated && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n let cancelDelay;\n let innerWidth = 0;\n const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false);\n // Set initial innerWidth in a frame.read callback to batch the read\n frame.read(() => {\n innerWidth = window.innerWidth;\n });\n attachResizeListener(instance, () => {\n const newInnerWidth = window.innerWidth;\n if (newInnerWidth === innerWidth)\n return;\n innerWidth = newInnerWidth;\n this.root.updateBlockedByResize = true;\n cancelDelay && cancelDelay();\n cancelDelay = delay(resizeUnblockUpdate, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n // Only register the handler if it requires layout animation\n if (this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)) {\n this.addEventListener(\"didUpdate\", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout, }) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = undefined;\n this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n const layoutTransition = this.options.transition ||\n visualElement.getDefaultTransition() ||\n defaultLayoutTransition;\n const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps();\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n const hasTargetChanged = !this.targetLayout ||\n !boxEqualsRounded(this.targetLayout, newLayout);\n /*\n * Note: Disabled to fix relative animations always triggering new\n * layout animations. If this causes further issues, we can try\n * a different approach to detecting relative target changes.\n */\n // || hasRelativeLayoutChanged\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged;\n if (this.options.layoutRoot ||\n this.resumeFrom ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (hasTargetChanged || !this.currentAnimation))) {\n if (this.resumeFrom) {\n this.resumingFrom = this.resumeFrom;\n this.resumingFrom.resumingFrom = undefined;\n }\n const animationOptions = {\n ...getValueTransition(layoutTransition, \"layout\"),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete,\n };\n if (visualElement.shouldReduceMotion ||\n this.options.layoutRoot) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n this.startAnimation(animationOptions);\n /**\n * Set animation origin after starting animation to avoid layout jump\n * caused by stopping previous layout animation\n */\n this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged, animationOptions\n .path);\n }\n else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never committed to screen and look like a jumpy box.\n */\n if (!hasLayoutChanged) {\n finishAnimation(this);\n }\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete();\n }\n }\n this.targetLayout = newLayout;\n });\n }\n }\n unmount() {\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n const stack = this.getStack();\n stack && stack.remove(this);\n this.parent && this.parent.children.delete(this);\n this.instance = undefined;\n this.eventHandlers.clear();\n cancelFrame(this.updateProjection);\n }\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true;\n }\n unblockUpdate() {\n this.updateManuallyBlocked = false;\n }\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n }\n isTreeAnimationBlocked() {\n return (this.isAnimationBlocked ||\n (this.parent && this.parent.isTreeAnimationBlocked()) ||\n false);\n }\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n this.nodes && this.nodes.forEach(resetSkewAndRotation);\n this.animationId++;\n }\n getTransformTemplate() {\n const { visualElement } = this.options;\n return visualElement && visualElement.getProps().transformTemplate;\n }\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true;\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete();\n return;\n }\n /**\n * If we're running optimised appear animations then these must be\n * cancelled before measuring the DOM. This is so we can measure\n * the true layout of the element rather than the WAAPI animation\n * which will be unaffected by the resetSkewAndRotate step.\n *\n * Note: This is a DOM write. Worst case scenario is this is sandwiched\n * between other snapshot reads which will cause unnecessary style recalculations.\n * This has to happen here though, as we don't yet know which nodes will need\n * snapshots in startUpdate(), but we only want to cancel optimised animations\n * if a layout animation measurement is actually going to be affected by them.\n */\n if (window.MotionCancelOptimisedAnimation &&\n !this.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(this);\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.shouldResetTransform = true;\n /**\n * Percentage translates resolve against layoutBox dimensions,\n * so ancestors with them must be re-measured after transform reset.\n */\n if (typeof node.latestValues.x === \"string\" ||\n typeof node.latestValues.y === \"string\") {\n node.isLayoutDirty = true;\n }\n node.updateScroll(\"snapshot\");\n if (node.options.layoutRoot) {\n node.willUpdate(false);\n }\n }\n const { layoutId, layout } = this.options;\n if (layoutId === undefined && !layout)\n return;\n const transformTemplate = this.getTransformTemplate();\n this.prevTransformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n }\n update() {\n this.updateScheduled = false;\n const updateWasBlocked = this.isUpdateBlocked();\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n const wasBlockedByResize = this.updateBlockedByResize;\n this.unblockUpdate();\n this.updateBlockedByResize = false;\n this.clearAllSnapshots();\n /**\n * When blocked by resize, still measure layouts so\n * callbacks like onLayoutMeasure fire (e.g. Reorder).\n * Skip notifyLayoutUpdate to prevent animations.\n */\n if (wasBlockedByResize) {\n this.nodes.forEach(forceLayoutMeasure);\n }\n this.nodes.forEach(clearMeasurements);\n return;\n }\n /**\n * If this is a repeat of didUpdate then ignore the animation.\n */\n if (this.animationId <= this.animationCommitId) {\n this.nodes.forEach(clearIsLayoutDirty);\n return;\n }\n this.animationCommitId = this.animationId;\n if (!this.isUpdating) {\n this.nodes.forEach(clearIsLayoutDirty);\n }\n else {\n this.isUpdating = false;\n /**\n * Ensure animation-blocked nodes (e.g. during drag)\n * get measured even when memoized (willUpdate skipped).\n */\n this.nodes.forEach(ensureDraggedNodesSnapshotted);\n /**\n * Write\n */\n this.nodes.forEach(resetTransformStyle);\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes.forEach(updateLayout);\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes.forEach(notifyLayoutUpdate);\n }\n this.clearAllSnapshots();\n /**\n * Manually flush any pending updates. Ideally\n * we could leave this to the following requestAnimationFrame but this seems\n * to leave a flash of incorrectly styled content.\n */\n const now = time.now();\n frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp);\n frameData.timestamp = now;\n frameData.isProcessing = true;\n frameSteps.update.process(frameData);\n frameSteps.preRender.process(frameData);\n frameSteps.render.process(frameData);\n frameData.isProcessing = false;\n }\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true;\n microtask.read(this.scheduleUpdate);\n }\n }\n clearAllSnapshots() {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n }\n scheduleUpdateProjection() {\n if (!this.projectionUpdateScheduled) {\n this.projectionUpdateScheduled = true;\n frame.preRender(this.updateProjection, false, true);\n }\n }\n scheduleCheckAfterUnmount() {\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate();\n }\n else {\n this.root.checkUpdateFailed();\n }\n });\n }\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance)\n return;\n this.snapshot = this.measure();\n if (this.snapshot &&\n !calcLength(this.snapshot.measuredBox.x) &&\n !calcLength(this.snapshot.measuredBox.y)) {\n this.snapshot = undefined;\n }\n }\n updateLayout() {\n if (!this.instance)\n return;\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty) {\n return;\n }\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.updateScroll();\n }\n }\n const prevLayout = this.layout;\n this.layout = this.measure(false);\n this.layoutVersion++;\n if (!this.layoutCorrected)\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.layoutBox);\n const { visualElement } = this.options;\n visualElement &&\n visualElement.notify(\"LayoutMeasure\", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined);\n }\n updateScroll(phase = \"measure\") {\n let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);\n if (this.scroll &&\n this.scroll.animationId === this.root.animationId &&\n this.scroll.phase === phase) {\n needsMeasurement = false;\n }\n if (needsMeasurement && this.instance) {\n const isRoot = checkIsScrollRoot(this.instance);\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot,\n offset: measureScroll(this.instance),\n wasRoot: this.scroll ? this.scroll.isRoot : isRoot,\n };\n }\n }\n resetTransform() {\n if (!resetTransform)\n return;\n const isResetRequested = this.isLayoutDirty ||\n this.shouldResetTransform ||\n this.options.alwaysMeasureLayout;\n const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n const transformTemplate = this.getTransformTemplate();\n const transformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested &&\n this.instance &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n }\n measure(removeTransform = true) {\n const pageBox = this.measurePageBox();\n let layoutBox = this.removeElementScroll(pageBox);\n /**\n * Measurements taken during the pre-render stage\n * still have transforms applied so we remove them\n * via calculation.\n */\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox);\n }\n roundBox(layoutBox);\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id,\n };\n }\n measurePageBox() {\n const { visualElement } = this.options;\n if (!visualElement)\n return createBox();\n const box = visualElement.measureViewportBox();\n const wasInScrollRoot = this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot);\n if (!wasInScrollRoot) {\n // Remove viewport scroll to give page-relative coordinates\n const { scroll } = this.root;\n if (scroll) {\n translateAxis(box.x, scroll.offset.x);\n translateAxis(box.y, scroll.offset.y);\n }\n }\n return box;\n }\n removeElementScroll(box) {\n const boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n if (this.scroll?.wasRoot) {\n return boxWithoutScroll;\n }\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n const { scroll, options } = node;\n if (node !== this.root && scroll && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (scroll.wasRoot) {\n copyBoxInto(boxWithoutScroll, box);\n }\n translateAxis(boxWithoutScroll.x, scroll.offset.x);\n translateAxis(boxWithoutScroll.y, scroll.offset.y);\n }\n }\n return boxWithoutScroll;\n }\n applyTransform(box, transformOnly = false, output) {\n const withTransforms = output || createBox();\n copyBoxInto(withTransforms, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n translateAxis(withTransforms.x, -node.scroll.offset.x);\n translateAxis(withTransforms.y, -node.scroll.offset.y);\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues, node.layout?.layoutBox);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues, this.layout?.layoutBox);\n }\n return withTransforms;\n }\n removeTransform(box) {\n const boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!hasTransform(node.latestValues))\n continue;\n let sourceBox;\n if (node.instance) {\n hasScale(node.latestValues) && node.updateSnapshot();\n sourceBox = createBox();\n copyBoxInto(sourceBox, node.measurePageBox());\n }\n removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot?.layoutBox, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n }\n setTargetDelta(delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n this.isProjectionDirty = true;\n }\n setOptions(options) {\n this.options = {\n ...this.options,\n ...options,\n crossfade: options.crossfade !== undefined ? options.crossfade : true,\n };\n }\n clearMeasurements() {\n this.scroll = undefined;\n this.layout = undefined;\n this.snapshot = undefined;\n this.prevTransformTemplateValue = undefined;\n this.targetDelta = undefined;\n this.target = undefined;\n this.isLayoutDirty = false;\n }\n forceRelativeParentToResolveTarget() {\n if (!this.relativeParent)\n return;\n /**\n * If the parent target isn't up-to-date, force it to update.\n * This is an unfortunate de-optimisation as it means any updating relative\n * projection will cause all the relative parents to recalculate back\n * up the tree.\n */\n if (this.relativeParent.resolvedRelativeTargetAt !==\n frameData.timestamp) {\n this.relativeParent.resolveTargetDelta(true);\n }\n }\n resolveTargetDelta(forceRecalculation = false) {\n /**\n * Once the dirty status of nodes has been spread through the tree, we also\n * need to check if we have a shared node of a different depth that has itself\n * been dirtied.\n */\n const lead = this.getLead();\n this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);\n this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);\n this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n /**\n * We don't use transform for this step of processing so we don't\n * need to check whether any nodes have changed transform.\n */\n const canSkip = !(forceRecalculation ||\n (isShared && this.isSharedProjectionDirty) ||\n this.isProjectionDirty ||\n this.parent?.isProjectionDirty ||\n this.attemptToResolveRelativeTarget ||\n this.root.updateBlockedByResize);\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId))\n return;\n this.resolvedRelativeTargetAt = frameData.timestamp;\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n this.linkedParentVersion !== relativeParent.layoutVersion &&\n !relativeParent.options.layoutRoot) {\n this.removeRelativeTarget();\n }\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n if (!this.targetDelta && !this.relativeTarget) {\n if (this.options.layoutAnchor !== false &&\n relativeParent &&\n relativeParent.layout) {\n this.createRelativeTarget(relativeParent, this.layout.layoutBox, relativeParent.layout.layoutBox);\n }\n else {\n this.removeRelativeTarget();\n }\n }\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta)\n return;\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.relativeParent &&\n this.relativeParent.target) {\n this.forceRelativeParentToResolveTarget();\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || undefined);\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n }\n else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n this.applyTransform(this.layout.layoutBox, false, this.target);\n }\n else {\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n applyBoxDelta(this.target, this.targetDelta);\n }\n else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n if (this.options.layoutAnchor !== false &&\n relativeParent &&\n Boolean(relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !relativeParent.options.layoutScroll &&\n relativeParent.target &&\n this.animationProgress !== 1) {\n this.createRelativeTarget(relativeParent, this.target, relativeParent.target);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * Increase debug counter for resolved target deltas\n */\n if (statsBuffer.value) {\n metrics.calculatedTargetDeltas++;\n }\n }\n getClosestProjectingParent() {\n if (!this.parent ||\n hasScale(this.parent.latestValues) ||\n has2DTranslate(this.parent.latestValues)) {\n return undefined;\n }\n if (this.parent.isProjecting()) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n }\n isProjecting() {\n return Boolean((this.relativeTarget ||\n this.targetDelta ||\n this.options.layoutRoot) &&\n this.layout);\n }\n createRelativeTarget(relativeParent, layout, parentLayout) {\n this.relativeParent = relativeParent;\n this.linkedParentVersion = relativeParent.layoutVersion;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, layout, parentLayout, this.options.layoutAnchor || undefined);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n removeRelativeTarget() {\n this.relativeParent = this.relativeTarget = undefined;\n }\n calcProjection() {\n const lead = this.getLead();\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n let canSkip = true;\n /**\n * If this is a normal layout animation and neither this node nor its nearest projecting\n * is dirty then we can't skip.\n */\n if (this.isProjectionDirty || this.parent?.isProjectionDirty) {\n canSkip = false;\n }\n /**\n * If this is a shared layout animation and this node's shared projection is dirty then\n * we can't skip.\n */\n if (isShared &&\n (this.isSharedProjectionDirty || this.isTransformDirty)) {\n canSkip = false;\n }\n /**\n * If we have resolved the target this frame we must recalculate the\n * projection to ensure it visually represents the internal calculations.\n */\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false;\n }\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined;\n }\n if (!this.layout || !(layout || layoutId))\n return;\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.layoutBox);\n /**\n * Record previous tree scales before updating.\n */\n const prevTreeScaleX = this.treeScale.x;\n const prevTreeScaleY = this.treeScale.y;\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared);\n /**\n * If this layer needs to perform scale correction but doesn't have a target,\n * use the layout as the target.\n */\n if (lead.layout &&\n !lead.target &&\n (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {\n lead.target = lead.layout.layoutBox;\n lead.targetWithTransforms = createBox();\n }\n const { target } = lead;\n if (!target) {\n /**\n * If we don't have a target to project into, but we were previously\n * projecting, we want to remove the stored transform and schedule\n * a render to ensure the elements reflect the removed transform.\n */\n if (this.prevProjectionDelta) {\n this.createProjectionDeltas();\n this.scheduleRender();\n }\n return;\n }\n if (!this.projectionDelta || !this.prevProjectionDelta) {\n this.createProjectionDeltas();\n }\n else {\n copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x);\n copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y);\n }\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n if (this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY ||\n !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) ||\n !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n /**\n * Increase debug counter for recalculated projections\n */\n if (statsBuffer.value) {\n metrics.calculatedProjections++;\n }\n }\n hide() {\n this.isVisible = false;\n // TODO: Schedule render\n }\n show() {\n this.isVisible = true;\n // TODO: Schedule render\n }\n scheduleRender(notifyAll = true) {\n this.options.visualElement?.scheduleRender();\n if (notifyAll) {\n const stack = this.getStack();\n stack && stack.scheduleRender();\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n }\n createProjectionDeltas() {\n this.prevProjectionDelta = createDelta();\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false, pathFn) {\n const snapshot = this.snapshot;\n const snapshotLatestValues = snapshot ? snapshot.latestValues : {};\n const mixedValues = { ...this.latestValues };\n const targetDelta = createDelta();\n if (!this.relativeParent ||\n !this.relativeParent.options.layoutRoot) {\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n const relativeLayout = createBox();\n const snapshotSource = snapshot ? snapshot.source : undefined;\n const layoutSource = this.layout ? this.layout.source : undefined;\n const isSharedLayoutAnimation = snapshotSource !== layoutSource;\n const stack = this.getStack();\n const isOnlyMember = !stack || stack.members.length <= 1;\n const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n let prevRelativeTarget;\n // The path decides whether the layout shift is worth curving\n // (distance floor) and resolves the interpolator from the delta.\n const interpolate = pathFn?.interpolateProjection(delta);\n this.mixTargetDelta = (latest) => {\n const progress = latest / 1000;\n const point = interpolate?.(progress);\n if (point) {\n targetDelta.x.translate = point.x;\n targetDelta.x.scale = mixNumber(delta.x.scale, 1, progress);\n targetDelta.x.origin = delta.x.origin;\n targetDelta.x.originPoint = delta.x.originPoint;\n targetDelta.y.translate = point.y;\n targetDelta.y.scale = mixNumber(delta.y.scale, 1, progress);\n targetDelta.y.origin = delta.y.origin;\n targetDelta.y.originPoint = delta.y.originPoint;\n }\n else {\n mixAxisDeltaLinear(targetDelta.x, delta.x, progress);\n mixAxisDeltaLinear(targetDelta.y, delta.y, progress);\n }\n this.setTargetDelta(targetDelta);\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.layout &&\n this.relativeParent &&\n this.relativeParent.layout) {\n calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || undefined);\n mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress);\n /**\n * If this is an unchanged relative target we can consider the\n * projection not dirty.\n */\n if (prevRelativeTarget &&\n boxEquals(this.relativeTarget, prevRelativeTarget)) {\n this.isProjectionDirty = false;\n }\n if (!prevRelativeTarget)\n prevRelativeTarget = createBox();\n copyBoxInto(prevRelativeTarget, this.relativeTarget);\n }\n if (isSharedLayoutAnimation) {\n this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n }\n if (point && point.rotate !== undefined) {\n // Dedicated `pathRotation` channel, not `rotate`, so an\n // animating `rotate` is composed with, never clobbered.\n if (!this.animationValues)\n this.animationValues = mixedValues;\n this.animationValues.pathRotation = point.rotate;\n }\n this.root.scheduleUpdateProjection();\n this.scheduleRender();\n this.animationProgress = progress;\n };\n this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0);\n }\n startAnimation(options) {\n this.notifyListeners(\"animationStart\");\n this.currentAnimation?.stop();\n this.resumingFrom?.currentAnimation?.stop();\n if (this.pendingAnimation) {\n cancelFrame(this.pendingAnimation);\n this.pendingAnimation = undefined;\n }\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true;\n activeAnimations.layout++;\n this.motionValue || (this.motionValue = motionValue(0));\n this.motionValue.jump(0, false);\n this.currentAnimation = animateSingleValue(this.motionValue, [0, 1000], {\n ...options,\n velocity: 0,\n isSync: true,\n onUpdate: (latest) => {\n this.mixTargetDelta(latest);\n options.onUpdate && options.onUpdate(latest);\n },\n onStop: () => {\n activeAnimations.layout--;\n },\n onComplete: () => {\n activeAnimations.layout--;\n options.onComplete && options.onComplete();\n this.completeAnimation();\n },\n });\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation;\n }\n this.pendingAnimation = undefined;\n });\n }\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n const stack = this.getStack();\n stack && stack.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n }\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n }\n applyTransformsToTarget() {\n const lead = this.getLead();\n let { targetWithTransforms, target, layout, latestValues } = lead;\n if (!targetWithTransforms || !target || !layout)\n return;\n /**\n * If we're only animating position, and this element isn't the lead element,\n * then instead of projecting into the lead box we instead want to calculate\n * a new target that aligns the two boxes but maintains the layout shape.\n */\n if (this !== lead &&\n this.layout &&\n layout &&\n shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) {\n target = this.target || createBox();\n const xLength = calcLength(this.layout.layoutBox.x);\n target.x.min = lead.target.x.min;\n target.x.max = target.x.min + xLength;\n const yLength = calcLength(this.layout.layoutBox.y);\n target.y.min = lead.target.y.min;\n target.y.max = target.y.min + yLength;\n }\n copyBoxInto(targetWithTransforms, target);\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its layout layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n }\n registerSharedNode(layoutId, node) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n const stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n const config = node.options.initialPromotionConfig;\n node.promote({\n transition: config ? config.transition : undefined,\n preserveFollowOpacity: config && config.shouldPreserveFollowOpacity\n ? config.shouldPreserveFollowOpacity(node)\n : undefined,\n });\n }\n isLead() {\n const stack = this.getStack();\n return stack ? stack.lead === this : true;\n }\n getLead() {\n const { layoutId } = this.options;\n return layoutId ? this.getStack()?.lead || this : this;\n }\n getPrevLead() {\n const { layoutId } = this.options;\n return layoutId ? this.getStack()?.prevLead : undefined;\n }\n getStack() {\n const { layoutId } = this.options;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n }\n promote({ needsReset, transition, preserveFollowOpacity, } = {}) {\n const stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = undefined;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition });\n }\n relegate() {\n const stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n }\n resetSkewAndRotation() {\n const { visualElement } = this.options;\n if (!visualElement)\n return;\n // If there's no detected skew or rotation values, we can early return without a forced render.\n let hasDistortingTransform = false;\n /**\n * An unrolled check for rotation values. Most elements don't have any rotation and\n * skipping the nested loop and new object creation is 50% faster.\n */\n const { latestValues } = visualElement;\n if (latestValues.z ||\n latestValues.rotate ||\n latestValues.rotateX ||\n latestValues.rotateY ||\n latestValues.rotateZ ||\n latestValues.skewX ||\n latestValues.skewY) {\n hasDistortingTransform = true;\n }\n // If there's no distorting values, we don't need to do any more.\n if (!hasDistortingTransform)\n return;\n const resetValues = {};\n if (latestValues.z) {\n resetDistortingTransform(\"z\", visualElement, resetValues, this.animationValues);\n }\n // Check the skew and rotate value of all axes and reset to 0\n for (let i = 0; i < transformAxes.length; i++) {\n resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n }\n // Force a render of this element to apply the transform with all skews and rotations\n // set to 0.\n visualElement.render();\n // Put back all the values we reset\n for (const key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n if (this.animationValues) {\n this.animationValues[key] = resetValues[key];\n }\n }\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender();\n }\n applyProjectionStyles(targetStyle, // CSSStyleDeclaration - doesn't allow numbers to be assigned to properties\n styleProp) {\n if (!this.instance || this.isSVG)\n return;\n if (!this.isVisible) {\n targetStyle.visibility = \"hidden\";\n return;\n }\n const transformTemplate = this.getTransformTemplate();\n if (this.needsReset) {\n this.needsReset = false;\n targetStyle.visibility = \"\";\n targetStyle.opacity = \"\";\n targetStyle.pointerEvents =\n resolveMotionValue(styleProp?.pointerEvents) || \"\";\n targetStyle.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\";\n return;\n }\n const lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n if (this.options.layoutId) {\n targetStyle.opacity =\n this.latestValues.opacity !== undefined\n ? this.latestValues.opacity\n : 1;\n targetStyle.pointerEvents =\n resolveMotionValue(styleProp?.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n targetStyle.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n this.hasProjected = false;\n }\n return;\n }\n targetStyle.visibility = \"\";\n const valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n let transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n transform = transformTemplate(valuesToRender, transform);\n }\n targetStyle.transform = transform;\n const { x, y } = this.projectionDelta;\n targetStyle.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n targetStyle.opacity =\n lead === this\n ? valuesToRender.opacity ??\n this.latestValues.opacity ??\n 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit;\n }\n else {\n /**\n * Or we're not animating at all, set the lead component to its layout\n * opacity and other components to hidden.\n */\n targetStyle.opacity =\n lead === this\n ? valuesToRender.opacity !== undefined\n ? valuesToRender.opacity\n : \"\"\n : valuesToRender.opacityExit !== undefined\n ? valuesToRender.opacityExit\n : 0;\n }\n /**\n * Apply scale correction\n */\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n const { correct, applyTo, isCSSVariable } = scaleCorrectors[key];\n /**\n * Only apply scale correction to the value if we have an\n * active projection transform. Otherwise these values become\n * vulnerable to distortion if the element changes size without\n * a corresponding layout animation.\n */\n const corrected = transform === \"none\"\n ? valuesToRender[key]\n : correct(valuesToRender[key], lead);\n if (applyTo) {\n const num = applyTo.length;\n for (let i = 0; i < num; i++) {\n targetStyle[applyTo[i]] = corrected;\n }\n }\n else {\n // If this is a CSS variable, set it directly on the instance.\n // Replacing this function from creating styles to setting them\n // would be a good place to remove per frame object creation\n if (isCSSVariable) {\n this.options.visualElement.renderState.vars[key] = corrected;\n }\n else {\n targetStyle[key] = corrected;\n }\n }\n }\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n targetStyle.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp?.pointerEvents) || \"\"\n : \"none\";\n }\n }\n clearSnapshot() {\n this.resumeFrom = this.snapshot = undefined;\n }\n // Only run on root\n resetTree() {\n this.root.nodes.forEach((node) => node.currentAnimation?.stop());\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n }\n };\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n const snapshot = node.resumeFrom?.snapshot || node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n const { layoutBox: layout, measuredBox: measuredLayout } = node.layout;\n const { animationType } = node.options;\n const isShared = snapshot.source !== node.layout.source;\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(axisSnapshot);\n axisSnapshot.min = layout[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (animationType === \"x\" || animationType === \"y\") {\n const snapAxis = animationType === \"x\" ? \"y\" : \"x\";\n copyAxisInto(isShared\n ? snapshot.measuredBox[snapAxis]\n : snapshot.layoutBox[snapAxis], layout[snapAxis]);\n }\n else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(layout[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n /**\n * Ensure relative target gets resized and rerendererd\n */\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true;\n node.relativeTarget[axis].max =\n node.relativeTarget[axis].min + length;\n }\n });\n }\n const layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout, snapshot.layoutBox);\n const visualDelta = createDelta();\n if (isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);\n }\n else {\n calcBoxDelta(visualDelta, layout, snapshot.layoutBox);\n }\n const hasLayoutChanged = !isDeltaZero(layoutDelta);\n let hasRelativeLayoutChanged = false;\n if (!node.resumeFrom) {\n const relativeParent = node.getClosestProjectingParent();\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;\n if (parentSnapshot && parentLayout) {\n const anchor = node.options.layoutAnchor || undefined;\n const relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox, anchor);\n const relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox, anchor);\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeLayoutChanged = true;\n }\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout;\n node.relativeTargetOrigin = relativeSnapshot;\n node.relativeParent = relativeParent;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeLayoutChanged,\n });\n }\n else if (node.isLead()) {\n const { onExitComplete } = node.options;\n onExitComplete && onExitComplete();\n }\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined;\n}\nfunction propagateDirtyNodes(node) {\n /**\n * Increase debug counter for nodes encountered this frame\n */\n if (statsBuffer.value) {\n metrics.nodes++;\n }\n if (!node.parent)\n return;\n /**\n * If this node isn't projecting, propagate isProjectionDirty. It will have\n * no performance impact but it will allow the next child that *is* projecting\n * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n * correcting.\n */\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty;\n }\n /**\n * Propagate isSharedProjectionDirty and isTransformDirty\n * throughout the whole tree. A future revision can take another look at\n * this but for safety we still recalcualte shared nodes.\n */\n node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty ||\n node.parent.isProjectionDirty ||\n node.parent.isSharedProjectionDirty));\n node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);\n}\nfunction cleanDirtyNodes(node) {\n node.isProjectionDirty =\n node.isSharedProjectionDirty =\n node.isTransformDirty =\n false;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction forceLayoutMeasure(node) {\n node.isLayoutDirty = true;\n node.updateLayout();\n}\nfunction clearIsLayoutDirty(node) {\n node.isLayoutDirty = false;\n}\n/**\n * When a node is animation-blocked (e.g. during drag) and its component\n * didn't re-render (memoized), willUpdate() is never called so there's\n * no snapshot. Use the previous layout as a snapshot and mark dirty so\n * resetTransform/updateLayout/notifyLayoutUpdate process it normally.\n */\nfunction ensureDraggedNodesSnapshotted(node) {\n if (node.isAnimationBlocked && node.layout && !node.isLayoutDirty) {\n node.snapshot = node.layout;\n node.isLayoutDirty = true;\n }\n}\nfunction resetTransformStyle(node) {\n const { visualElement } = node.options;\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\");\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n node.isProjectionDirty = true;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetSkewAndRotation(node) {\n node.resetSkewAndRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDeltaLinear(output, delta, p) {\n output.translate = mixNumber(delta.translate, 0, p);\n output.scale = mixNumber(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mixNumber(from.min, to.min, p);\n output.max = mixNumber(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nconst defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nconst userAgentContains = (string) => typeof navigator !== \"undefined\" &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().includes(string);\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint = userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n ? Math.round\n : noop;\nfunction roundAxis(axis) {\n // Round to the nearest .5 pixels to support subpixel layouts\n axis.min = roundPoint(axis.min);\n axis.max = roundPoint(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\nfunction shouldAnimatePositionOnly(animationType, snapshot, layout) {\n return (animationType === \"position\" ||\n (animationType === \"preserve-aspect\" &&\n !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2)));\n}\nfunction checkNodeWasScrollRoot(node) {\n return node !== node.root && node.scroll?.wasRoot;\n}\n\nexport { cleanDirtyNodes, createProjectionNode, mixAxis, mixBox, propagateDirtyNodes };\n//# sourceMappingURL=create-projection-node.mjs.map\n","import { isSVGElement } from './is-svg-element.mjs';\n\n/**\n * Checks if an element is specifically an SVGSVGElement (the root SVG element)\n * in a way that works across iframes\n */\nfunction isSVGSVGElement(element) {\n return isSVGElement(element) && element.tagName === \"svg\";\n}\n\nexport { isSVGSVGElement };\n//# sourceMappingURL=is-svg-svg-element.mjs.map\n","import { time } from '../frameloop/sync-time.mjs';\nimport { secondsToMilliseconds } from 'motion-utils';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\n/**\n * Timeout defined in ms\n */\nfunction delay(callback, timeout) {\n const start = time.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.setup(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\nfunction delayInSeconds(callback, timeout) {\n return delay(callback, secondsToMilliseconds(timeout));\n}\n\nexport { delay, delayInSeconds };\n//# sourceMappingURL=delay.mjs.map\n","import { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n//# sourceMappingURL=single-value.mjs.map\n","function buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform = \"\";\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n const zTranslate = latestTransform?.z || 0;\n if (xTranslate || yTranslate || zTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `;\n }\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n if (latestTransform) {\n const { transformPerspective, rotate, pathRotation, rotateX, rotateY, skewX, skewY, } = latestTransform;\n if (transformPerspective)\n transform = `perspective(${transformPerspective}px) ${transform}`;\n if (rotate)\n transform += `rotate(${rotate}deg) `;\n // Additive `rotate()` so user `rotate` isn't clobbered.\n if (pathRotation)\n transform += `rotate(${pathRotation}deg) `;\n if (rotateX)\n transform += `rotateX(${rotateX}deg) `;\n if (rotateY)\n transform += `rotateY(${rotateY}deg) `;\n if (skewX)\n transform += `skewX(${skewX}deg) `;\n if (skewY)\n transform += `skewY(${skewY}deg) `;\n }\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n return transform || \"none\";\n}\n\nexport { buildProjectionTransform };\n//# sourceMappingURL=transform.mjs.map\n","import { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { createProjectionNode } from './create-projection-node.mjs';\n\nconst DocumentProjectionNode = createProjectionNode({\n attachResizeListener: (ref, notify) => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,\n y: document.documentElement.scrollTop || document.body?.scrollTop || 0,\n }),\n checkIsScrollRoot: () => true,\n});\n\nexport { DocumentProjectionNode };\n//# sourceMappingURL=DocumentProjectionNode.mjs.map\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nconst rootProjectionNode = {\n current: undefined,\n};\nconst HTMLProjectionNode = createProjectionNode({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\";\n },\n checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n//# sourceMappingURL=HTMLProjectionNode.mjs.map\n","\"use client\";\nimport { useContext, useMemo } from \"react\";\nimport { MotionContext } from \".\";\nimport { getCurrentTreeVariants } from \"./utils\";\nexport function useCreateMotionContext(props) {\n const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));\n return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n//# sourceMappingURL=create.js.map","import { isControllingVariants, isVariantLabel } from \"motion-dom\";\nexport function getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n//# sourceMappingURL=utils.js.map","export const createHtmlRenderState = () => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {},\n});\n//# sourceMappingURL=create-render-state.js.map","\"use client\";\nimport { buildHTMLStyles, isForcedMotionValue, isMotionValue } from \"motion-dom\";\nimport { useMemo } from \"react\";\nimport { createHtmlRenderState } from \"./utils/create-render-state\";\nexport function copyRawValuesOnly(target, source, props) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState) {\n return useMemo(() => {\n const state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, transformTemplate);\n return Object.assign({}, state.vars, state.style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState) {\n const styleProp = props.style || {};\n const style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState));\n return style;\n}\nexport function useHTMLProps(props, visualState) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps = {};\n const style = useStyle(props, visualState);\n if (props.drag && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n }\n if (props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)) {\n htmlProps.tabIndex = 0;\n }\n htmlProps.style = style;\n return htmlProps;\n}\n//# sourceMappingURL=use-props.js.map","import { createHtmlRenderState } from \"../../html/utils/create-render-state\";\nexport const createSvgRenderState = () => ({\n ...createHtmlRenderState(),\n attrs: {},\n});\n//# sourceMappingURL=create-render-state.js.map","\"use client\";\nimport { buildSVGAttrs, isSVGTag } from \"motion-dom\";\nimport { useMemo } from \"react\";\nimport { copyRawValuesOnly } from \"../html/use-props\";\nimport { createSvgRenderState } from \"./utils/create-render-state\";\nexport function useSVGProps(props, visualState, _isStatic, Component) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState();\n buildSVGAttrs(state, visualState, isSVGTag(Component), props.transformTemplate, props.style);\n return {\n ...state.attrs,\n style: { ...state.style },\n };\n }, [visualState]);\n if (props.style) {\n const rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = { ...rawStyles, ...visualProps.style };\n }\n return visualProps;\n}\n//# sourceMappingURL=use-props.js.map","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"custom\",\n \"inherit\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"globalTapTarget\",\n \"propagate\",\n \"ignoreStrict\",\n \"viewport\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nexport function isValidMotionProp(key) {\n return (key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n key.startsWith(\"onLayout\") ||\n validMotionProps.has(key));\n}\n//# sourceMappingURL=valid-prop.js.map","import { isMotionValue } from \"motion-dom\";\nimport { isValidMotionProp } from \"../../../motion/utils/valid-prop\";\nlet shouldForward = (key) => !isValidMotionProp(key);\nexport function loadExternalIsValidProp(isValidProp) {\n if (typeof isValidProp !== \"function\")\n return;\n // Explicitly filter our events\n shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n *\n * String concatenation prevents bundlers like webpack (e.g. Storybook)\n * from statically resolving this optional dependency at build time.\n */\n const emotionPkg = \"@emotion/is-prop-\" + \"valid\";\n loadExternalIsValidProp(require(emotionPkg).default);\n}\ncatch {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nexport function filterProps(props, isDom, forwardMotionProps) {\n const filteredProps = {};\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\")\n continue;\n if (isMotionValue(props[key]))\n continue;\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] &&\n key.startsWith(\"onDrag\"))) {\n filteredProps[key] =\n props[key];\n }\n }\n return filteredProps;\n}\n//# sourceMappingURL=filter-props.js.map","/**\n * We keep these listed separately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nexport const lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n//# sourceMappingURL=lowercase-elements.js.map","import { lowercaseSVGElements } from \"../../svg/lowercase-elements\";\nexport function isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n }\n else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/u.test(Component)) {\n return true;\n }\n return false;\n}\n//# sourceMappingURL=is-svg-component.js.map","\"use client\";\nimport { isMotionValue } from \"motion-dom\";\nimport { Fragment, createElement, useMemo } from \"react\";\nimport { useHTMLProps } from \"../html/use-props\";\nimport { useSVGProps } from \"../svg/use-props\";\nimport { filterProps } from \"./utils/filter-props\";\nimport { isSVGComponent } from \"./utils/is-svg-component\";\nexport function useRender(Component, props, ref, { latestValues, }, isStatic, forwardMotionProps = false, isSVG) {\n const useVisualProps = (isSVG ?? isSVGComponent(Component)) ? useSVGProps : useHTMLProps;\n const visualProps = useVisualProps(props, latestValues, isStatic, Component);\n const filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n const elementProps = Component !== Fragment ? { ...filteredProps, ...visualProps, ref } : {};\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props;\n const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n });\n}\n//# sourceMappingURL=use-render.js.map","\"use client\";\nimport { createContext } from \"react\";\n/**\n * @public\n */\nexport const PresenceContext = \n/* @__PURE__ */ createContext(null);\n//# sourceMappingURL=PresenceContext.js.map","\"use client\";\nimport { isAnimationControls, isControllingVariants as checkIsControllingVariants, isVariantNode as checkIsVariantNode, resolveVariantFromProps, } from \"motion-dom\";\nimport { useContext } from \"react\";\nimport { MotionContext } from \"../../context/MotionContext\";\nimport { PresenceContext, } from \"../../context/PresenceContext\";\nimport { useConstant } from \"../../utils/use-constant\";\nimport { resolveMotionValue } from \"motion-dom\";\nfunction makeState({ scrapeMotionValuesFromProps, createRenderState, }, props, context, presenceContext) {\n const state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n return state;\n}\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n const values = {};\n const motionValues = scrapeMotionValues(props, {});\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n let { initial, animate } = props;\n const isControllingVariants = checkIsControllingVariants(props);\n const isVariantNode = checkIsVariantNode(props);\n if (context &&\n isVariantNode &&\n !isControllingVariants &&\n props.inherit !== false) {\n if (initial === undefined)\n initial = context.initial;\n if (animate === undefined)\n animate = context.animate;\n }\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false;\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n const variantToSet = isInitialAnimationBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n for (let i = 0; i < list.length; i++) {\n const resolved = resolveVariantFromProps(props, list[i]);\n if (resolved) {\n const { transitionEnd, transition, ...target } = resolved;\n for (const key in target) {\n let valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (const key in transitionEnd) {\n values[key] = transitionEnd[key];\n }\n }\n }\n }\n return values;\n}\nexport const makeUseVisualState = (config) => (props, isStatic) => {\n const context = useContext(MotionContext);\n const presenceContext = useContext(PresenceContext);\n const make = () => makeState(config, props, context, presenceContext);\n return isStatic ? make() : useConstant(make);\n};\n//# sourceMappingURL=use-visual-state.js.map","\"use client\";\nimport { useRef } from \"react\";\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nexport function useConstant(init) {\n const ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n//# sourceMappingURL=use-constant.js.map","\"use client\";\nimport { scrapeHTMLMotionValuesFromProps } from \"motion-dom\";\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\";\nimport { createHtmlRenderState } from \"./utils/create-render-state\";\nexport const useHTMLVisualState = /*@__PURE__*/ makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeHTMLMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n});\n//# sourceMappingURL=use-html-visual-state.js.map","\"use client\";\nimport { scrapeSVGMotionValuesFromProps } from \"motion-dom\";\nimport { makeUseVisualState } from \"../../motion/utils/use-visual-state\";\nimport { createSvgRenderState } from \"./utils/create-render-state\";\nexport const useSVGVisualState = /*@__PURE__*/ makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeSVGMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n});\n//# sourceMappingURL=use-svg-visual-state.js.map","import { getFeatureDefinitions, setFeatureDefinitions } from \"motion-dom\";\nconst featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nlet isInitialized = false;\n/**\n * Initialize feature definitions with isEnabled checks.\n * This must be called before any motion components are rendered.\n */\nexport function initFeatureDefinitions() {\n if (isInitialized)\n return;\n const initialFeatureDefinitions = {};\n for (const key in featureProps) {\n initialFeatureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n }\n setFeatureDefinitions(initialFeatureDefinitions);\n isInitialized = true;\n}\n/**\n * Get the current feature definitions, initializing if needed.\n */\nexport function getInitializedFeatureDefinitions() {\n initFeatureDefinitions();\n return getFeatureDefinitions();\n}\n//# sourceMappingURL=definitions.js.map","export const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n//# sourceMappingURL=symbol.js.map","\"use client\";\nimport { useCallback, useInsertionEffect, useRef } from \"react\";\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nexport function useMotionRef(visualState, visualElement, externalRef) {\n /**\n * Store externalRef in a ref to avoid including it in the useCallback\n * dependency array. Including externalRef in dependencies causes issues\n * with libraries like Radix UI that create new callback refs on each render\n * when using asChild - this would cause the callback to be recreated,\n * triggering element remounts and breaking AnimatePresence exit animations.\n */\n const externalRefContainer = useRef(externalRef);\n useInsertionEffect(() => {\n externalRefContainer.current = externalRef;\n });\n // Store cleanup function returned by callback refs (React 19 feature)\n const refCleanup = useRef(null);\n return useCallback((instance) => {\n if (instance) {\n visualState.onMount?.(instance);\n }\n if (visualElement) {\n instance ? visualElement.mount(instance) : visualElement.unmount();\n }\n const ref = externalRefContainer.current;\n if (typeof ref === \"function\") {\n if (instance) {\n const cleanup = ref(instance);\n if (typeof cleanup === \"function\") {\n refCleanup.current = cleanup;\n }\n }\n else if (refCleanup.current) {\n refCleanup.current();\n refCleanup.current = null;\n }\n else {\n ref(instance);\n }\n }\n else if (ref) {\n ;\n ref.current = instance;\n }\n }, [visualElement]);\n}\n//# sourceMappingURL=use-motion-ref.js.map","\"use client\";\nimport { createContext } from \"react\";\n/**\n * Internal, exported only for usage in Framer\n */\nexport const SwitchLayoutGroupContext = createContext({});\n//# sourceMappingURL=SwitchLayoutGroupContext.js.map","export function isRefObject(ref) {\n return (ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n//# sourceMappingURL=is-ref-object.js.map","export const isBrowser = typeof window !== \"undefined\";\n//# sourceMappingURL=is-browser.js.map","\"use client\";\nimport { useEffect, useLayoutEffect } from \"react\";\nimport { isBrowser } from \"./is-browser\";\nexport const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n//# sourceMappingURL=use-isomorphic-effect.js.map","\"use client\";\nimport { optimizedAppearDataAttribute, } from \"motion-dom\";\nimport { useContext, useEffect, useInsertionEffect, useRef } from \"react\";\nimport { LazyContext } from \"../../context/LazyContext\";\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\";\nimport { MotionContext } from \"../../context/MotionContext\";\nimport { PresenceContext } from \"../../context/PresenceContext\";\nimport { SwitchLayoutGroupContext, } from \"../../context/SwitchLayoutGroupContext\";\nimport { isRefObject } from \"../../utils/is-ref-object\";\nimport { useIsomorphicLayoutEffect } from \"../../utils/use-isomorphic-effect\";\nexport function useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor, isSVG) {\n const { visualElement: parent } = useContext(MotionContext);\n const lazyContext = useContext(LazyContext);\n const presenceContext = useContext(PresenceContext);\n const motionConfig = useContext(MotionConfigContext);\n const reducedMotionConfig = motionConfig.reducedMotion;\n const skipAnimations = motionConfig.skipAnimations;\n const visualElementRef = useRef(null);\n /**\n * Track whether the component has been through React's commit phase.\n * Used to detect when LazyMotion features load after the component has mounted.\n */\n const hasMountedOnce = useRef(false);\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement =\n createVisualElement ||\n lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n skipAnimations,\n isSVG,\n });\n /**\n * If the component has already mounted before features loaded (e.g. via\n * LazyMotion with async feature loading), we need to force the initial\n * animation to run. Otherwise state changes that occurred before features\n * loaded will be lost and the element will snap to its final state.\n */\n if (hasMountedOnce.current && visualElementRef.current) {\n visualElementRef.current.manuallyAnimateOnMount = true;\n }\n }\n const visualElement = visualElementRef.current;\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);\n if (visualElement &&\n !visualElement.projection &&\n ProjectionNodeConstructor &&\n (visualElement.type === \"html\" || visualElement.type === \"svg\")) {\n createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);\n }\n const isMounted = useRef(false);\n useInsertionEffect(() => {\n /**\n * Check the component has already mounted before calling\n * `update` unnecessarily. This ensures we skip the initial update.\n */\n if (visualElement && isMounted.current) {\n visualElement.update(props, presenceContext);\n }\n });\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const optimisedAppearId = props[optimizedAppearDataAttribute];\n const wantsHandoff = useRef(Boolean(optimisedAppearId) &&\n typeof window !== \"undefined\" &&\n !window.MotionHandoffIsComplete?.(optimisedAppearId) &&\n window.MotionHasOptimisedAnimation?.(optimisedAppearId));\n useIsomorphicLayoutEffect(() => {\n /**\n * Track that this component has mounted. This is used to detect when\n * LazyMotion features load after the component has already committed.\n */\n hasMountedOnce.current = true;\n if (!visualElement)\n return;\n isMounted.current = true;\n window.MotionIsMounted = true;\n visualElement.updateFeatures();\n visualElement.scheduleRenderMicrotask();\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n });\n useEffect(() => {\n if (!visualElement)\n return;\n if (!wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n if (wantsHandoff.current) {\n // This ensures all future calls to animateChanges() in this component will run in useEffect\n queueMicrotask(() => {\n window.MotionHandoffMarkAsComplete?.(optimisedAppearId);\n });\n wantsHandoff.current = false;\n }\n /**\n * Now we've finished triggering animations for this element we\n * can wipe the enteringChildren set for the next render.\n */\n visualElement.enteringChildren = undefined;\n });\n return visualElement;\n}\nfunction createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {\n const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutAnchor, layoutCrossfade, } = props;\n visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props[\"data-framer-portal-id\"]\n ? undefined\n : getClosestProjectingNode(visualElement.parent));\n visualElement.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement,\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig,\n crossfade: layoutCrossfade,\n layoutScroll,\n layoutRoot,\n layoutAnchor,\n });\n}\nfunction getClosestProjectingNode(visualElement) {\n if (!visualElement)\n return undefined;\n return visualElement.options.allowProjection !== false\n ? visualElement.projection\n : getClosestProjectingNode(visualElement.parent);\n}\n//# sourceMappingURL=use-visual-element.js.map","\"use client\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { invariant, warning } from \"motion-utils\";\nimport { forwardRef, useContext } from \"react\";\nimport { LayoutGroupContext } from \"../context/LayoutGroupContext\";\nimport { LazyContext } from \"../context/LazyContext\";\nimport { MotionConfigContext } from \"../context/MotionConfigContext\";\nimport { MotionContext } from \"../context/MotionContext\";\nimport { useCreateMotionContext } from \"../context/MotionContext/create\";\nimport { useRender } from \"../render/dom/use-render\";\nimport { isSVGComponent } from \"../render/dom/utils/is-svg-component\";\nimport { useHTMLVisualState } from \"../render/html/use-html-visual-state\";\nimport { useSVGVisualState } from \"../render/svg/use-svg-visual-state\";\nimport { getInitializedFeatureDefinitions } from \"./features/definitions\";\nimport { loadFeatures } from \"./features/load-features\";\nimport { motionComponentSymbol } from \"./utils/symbol\";\nimport { useMotionRef } from \"./utils/use-motion-ref\";\nimport { useVisualElement } from \"./utils/use-visual-element\";\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nexport function createMotionComponent(Component, { forwardMotionProps = false, type } = {}, preloadedFeatures, createVisualElement) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n /**\n * Determine whether to use SVG or HTML rendering based on:\n * 1. Explicit `type` option (highest priority)\n * 2. Auto-detection via `isSVGComponent`\n */\n const isSVG = type ? type === \"svg\" : isSVGComponent(Component);\n const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState;\n function MotionDOMComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && typeof window !== \"undefined\") {\n useStrictMode(configAndProps, preloadedFeatures);\n const layoutProjection = getProjectionFunctionality(configAndProps);\n MeasureLayout = layoutProjection.MeasureLayout;\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode, isSVG);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (_jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (_jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, forwardMotionProps, isSVG)] }));\n }\n MotionDOMComponent.displayName = `motion.${typeof Component === \"string\"\n ? Component\n : `create(${Component.displayName ?? Component.name ?? \"\"})`}`;\n const ForwardRefMotionComponent = forwardRef(MotionDOMComponent);\n ForwardRefMotionComponent[motionComponentSymbol] = Component;\n return ForwardRefMotionComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\nfunction useStrictMode(configAndProps, preloadedFeatures) {\n const isStrict = useContext(LazyContext).strict;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n configAndProps.ignoreStrict\n ? warning(false, strictMessage, \"lazy-strict-mode\")\n : invariant(false, strictMessage, \"lazy-strict-mode\");\n }\n}\nfunction getProjectionFunctionality(props) {\n const featureDefinitions = getInitializedFeatureDefinitions();\n const { drag, layout } = featureDefinitions;\n if (!drag && !layout)\n return {};\n const combined = { ...drag, ...layout };\n return {\n MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props)\n ? combined.MeasureLayout\n : undefined,\n ProjectionNode: combined.ProjectionNode,\n };\n}\n//# sourceMappingURL=index.js.map","import { setFeatureDefinitions } from \"motion-dom\";\nimport { getInitializedFeatureDefinitions } from \"./definitions\";\nexport function loadFeatures(features) {\n const featureDefinitions = getInitializedFeatureDefinitions();\n for (const key in features) {\n featureDefinitions[key] = {\n ...featureDefinitions[key],\n ...features[key],\n };\n }\n setFeatureDefinitions(featureDefinitions);\n}\n//# sourceMappingURL=load-features.js.map","import { HTMLVisualElement, SVGVisualElement } from \"motion-dom\";\nimport { Fragment } from \"react\";\nimport { isSVGComponent } from \"./utils/is-svg-component\";\nexport const createDomVisualElement = (Component, options) => {\n /**\n * Use explicit isSVG override if provided, otherwise auto-detect\n */\n const isSVG = options.isSVG ?? isSVGComponent(Component);\n return isSVG\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options, {\n allowProjection: Component !== Fragment,\n });\n};\n//# sourceMappingURL=create-visual-element.js.map","import { Feature, resolveVariant } from \"motion-dom\";\nlet id = 0;\nexport class ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n this.isExitComplete = false;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n if (isPresent && prevIsPresent === false) {\n /**\n * When re-entering, if the exit animation already completed\n * (element is at rest), reset to initial values so the enter\n * animation replays from the correct position.\n */\n if (this.isExitComplete) {\n const { initial, custom } = this.node.getProps();\n if (typeof initial === \"string\" ||\n (typeof initial === \"object\" &&\n initial !== null &&\n !Array.isArray(initial))) {\n const resolved = resolveVariant(this.node, initial, custom);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n for (const key in target) {\n this.node\n .getValue(key)\n ?.jump(target[key]);\n }\n }\n }\n this.node.animationState.reset();\n this.node.animationState.animateChanges();\n }\n else {\n this.node.animationState.setActive(\"exit\", false);\n }\n this.isExitComplete = false;\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => {\n this.isExitComplete = true;\n onExitComplete(this.id);\n });\n }\n }\n mount() {\n const { register, onExitComplete } = this.node.presenceContext || {};\n if (onExitComplete) {\n onExitComplete(this.id);\n }\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n//# sourceMappingURL=exit.js.map","import { AnimationFeature } from \"./animation\";\nimport { ExitAnimationFeature } from \"./animation/exit\";\nexport const animations = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n};\n//# sourceMappingURL=animations.js.map","import { createAnimationState, Feature, isAnimationControls, } from \"motion-dom\";\nexport class AnimationFeature extends Feature {\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n if (isAnimationControls(animate)) {\n this.unmountControls = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() {\n this.node.animationState.reset();\n this.unmountControls?.();\n }\n}\n//# sourceMappingURL=index.js.map","import { isPrimaryPointer } from \"motion-dom\";\nexport function extractEventInfo(event) {\n return {\n point: {\n x: event.pageX,\n y: event.pageY,\n },\n };\n}\nexport const addPointerInfo = (handler) => (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));\n//# sourceMappingURL=event-info.js.map","import { addDomEvent } from \"motion-dom\";\nimport { addPointerInfo } from \"./event-info\";\nexport function addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options);\n}\n//# sourceMappingURL=add-pointer-event.js.map","// Fixes https://github.com/motiondivision/motion/issues/2270\nexport const getContextWindow = ({ current }) => {\n return current ? current.ownerDocument.defaultView : null;\n};\n//# sourceMappingURL=get-context-window.js.map","export const distance = (a, b) => Math.abs(a - b);\nexport function distance2D(a, b) {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x);\n const yDelta = distance(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n}\n//# sourceMappingURL=distance.js.map","import { cancelFrame, frame, frameData, isPrimaryPointer } from \"motion-dom\";\nimport { millisecondsToSeconds, pipe, secondsToMilliseconds, } from \"motion-utils\";\nimport { addPointerEvent } from \"../../events/add-pointer-event\";\nimport { extractEventInfo } from \"../../events/event-info\";\nimport { distance2D } from \"../../utils/distance\";\nconst overflowStyles = /*#__PURE__*/ new Set([\"auto\", \"scroll\"]);\n/**\n * @internal\n */\nexport class PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow = window, dragSnapToOrigin = false, distanceThreshold = 3, element, } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * Raw (untransformed) event info, re-transformed each frame\n * so transformPagePoint sees the current parent matrix.\n * @internal\n */\n this.lastRawMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n /**\n * Scroll positions of scrollable ancestors and window.\n * @internal\n */\n this.scrollPositions = new Map();\n /**\n * Cleanup function for scroll listeners.\n * @internal\n */\n this.removeScrollListeners = null;\n this.onElementScroll = (event) => {\n this.handleScroll(event.target);\n };\n this.onWindowScroll = () => {\n this.handleScroll(window);\n };\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n // Re-transform raw point through current transformPagePoint so\n // animated parent transforms (e.g. rotation) are picked up each frame\n if (this.lastRawMoveEventInfo) {\n this.lastMoveEventInfo = transformPoint(this.lastRawMoveEventInfo, this.transformPagePoint);\n }\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursor.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastRawMoveEventInfo = info;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked)\n // This ensures constraint animations continue when interrupted by a click\n if (this.dragSnapToOrigin || !this.startEvent) {\n resumeAnimation && resumeAnimation();\n }\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.distanceThreshold = distanceThreshold;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp));\n // Start scroll tracking if element provided\n if (element) {\n this.startScrollTracking(element);\n }\n }\n /**\n * Start tracking scroll on ancestors and window.\n */\n startScrollTracking(element) {\n // Store initial scroll positions for scrollable ancestors\n let current = element.parentElement;\n while (current) {\n const style = getComputedStyle(current);\n if (overflowStyles.has(style.overflowX) ||\n overflowStyles.has(style.overflowY)) {\n this.scrollPositions.set(current, {\n x: current.scrollLeft,\n y: current.scrollTop,\n });\n }\n current = current.parentElement;\n }\n // Track window scroll\n this.scrollPositions.set(window, {\n x: window.scrollX,\n y: window.scrollY,\n });\n // Capture listener catches element scroll events as they bubble\n window.addEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n });\n // Direct window scroll listener (window scroll doesn't bubble)\n window.addEventListener(\"scroll\", this.onWindowScroll);\n this.removeScrollListeners = () => {\n window.removeEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n });\n window.removeEventListener(\"scroll\", this.onWindowScroll);\n };\n }\n /**\n * Handle scroll compensation during drag.\n *\n * For element scroll: adjusts history origin since pageX/pageY doesn't change.\n * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.\n */\n handleScroll(target) {\n const initial = this.scrollPositions.get(target);\n if (!initial)\n return;\n const isWindow = target === window;\n const current = isWindow\n ? { x: window.scrollX, y: window.scrollY }\n : {\n x: target.scrollLeft,\n y: target.scrollTop,\n };\n const delta = { x: current.x - initial.x, y: current.y - initial.y };\n if (delta.x === 0 && delta.y === 0)\n return;\n if (isWindow) {\n // Window scroll: pageX/pageY changes, so update lastMoveEventInfo\n if (this.lastMoveEventInfo) {\n this.lastMoveEventInfo.point.x += delta.x;\n this.lastMoveEventInfo.point.y += delta.y;\n }\n }\n else {\n // Element scroll: pageX/pageY unchanged, so adjust history origin\n if (this.history.length > 0) {\n this.history[0].x -= delta.x;\n this.history[0].y -= delta.y;\n }\n }\n this.scrollPositions.set(target, current);\n frame.update(this.updatePoint, true);\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n this.removeScrollListeners && this.removeScrollListeners();\n this.scrollPositions.clear();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n /**\n * If the selected point is the pointer-down origin (history[0]),\n * there are better movement points available, and the time gap\n * is suspiciously large (>2x timeDelta), use the next point instead.\n * This prevents stale pointer-down points from diluting velocity\n * in hold-then-flick gestures.\n */\n if (timestampedPoint === history[0] &&\n history.length > 2 &&\n lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta) * 2) {\n timestampedPoint = history[1];\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n//# sourceMappingURL=PanSession.js.map","import { calcLength, mixNumber } from \"motion-dom\";\nimport { progress as calcProgress, clamp, } from \"motion-utils\";\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nexport function applyConstraints(point, { min, max }, elastic) {\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(min, point, elastic.min)\n : Math.max(point, min);\n }\n else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(max, point, elastic.max)\n : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculates a min projection point based on a pointer, pointer progress\n * within the drag target, and constraints.\n *\n * For instance if an element was 100px width, we were dragging from 0.25\n * along this axis, the pointer is at 200px, and there were no constraints,\n * we would calculate a min projection point of 175px.\n */\nexport function calcConstrainedMinPoint(point, length, progress, constraints, elastic) {\n // Calculate a min point for this axis and apply it to the current pointer\n const min = point - length * progress;\n return constraints ? applyConstraints(min, constraints, elastic) : min;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nexport function calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nexport function calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nexport function calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n let min = constraintsAxis.min - layoutAxis.min;\n let max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n ;\n [min, max] = [max, min];\n }\n return { min, max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nexport function calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nexport function calcOrigin(source, target) {\n let origin = 0.5;\n const sourceLength = calcLength(source);\n const targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = calcProgress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = calcProgress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Calculate the relative progress of one constraints box relative to another.\n * Imagine a page scroll bar. At the top, this would return 0, at the bottom, 1.\n * Anywhere in-between, a value between 0 and 1.\n *\n * This also handles flipped constraints, for instance a draggable container within\n * a smaller viewport like a scrollable view.\n */\nexport function calcProgressWithinConstraints(layoutBox, constraintsBox) {\n return {\n x: calcOrigin(layoutBox.x, constraintsBox.x),\n y: calcOrigin(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate the an axis position based on two axes and a progress value.\n */\nexport function calcPositionFromProgress(axis, constraints, progress) {\n const axisLength = axis.max - axis.min;\n const min = mixNumber(constraints.min, constraints.max - axisLength, progress);\n return { min, max: min + axisLength };\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nexport function rebaseAxisConstraints(layout, constraints) {\n const relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nexport const defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nexport function resolveDragElastic(dragElastic = defaultElastic) {\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nexport function resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nexport function resolvePointElastic(dragElastic, label) {\n return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label] || 0;\n}\n//# sourceMappingURL=constraints.js.map","import { addValueToWillChange, animateMotionValue, calcLength, convertBoundingBoxToBox, convertBoxToBoundingBox, createBox, eachAxis, frame, isElementTextInput, measurePageBox, mixNumber, percent, resize, setDragLock, } from \"motion-dom\";\nimport { invariant } from \"motion-utils\";\nimport { addDomEvent } from \"motion-dom\";\nimport { addPointerEvent } from \"../../events/add-pointer-event\";\nimport { extractEventInfo } from \"../../events/event-info\";\nimport { getContextWindow } from \"../../utils/get-context-window\";\nimport { isRefObject } from \"../../utils/is-ref-object\";\nimport { PanSession } from \"../pan/PanSession\";\nimport { applyConstraints, calcOrigin, calcRelativeConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveDragElastic, } from \"./utils/constraints\";\nexport const elementDragControls = new WeakMap();\nexport class VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n /**\n * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPointerEvent = null;\n /**\n * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPanInfo = null;\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false, distanceThreshold } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n this.stopAnimation();\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin and pointer offset\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true);\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n if (onDrag) {\n frame.update(() => onDrag(event, info), false, true);\n }\n };\n const onSessionEnd = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.stop(event, info);\n this.latestPointerEvent = null;\n this.latestPanInfo = null;\n };\n const resumeAnimation = () => {\n const { dragSnapToOrigin: snap } = this.getProps();\n if (snap || this.constraints) {\n this.startAnimation({ x: 0, y: 0 });\n }\n };\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n distanceThreshold,\n contextWindow: getContextWindow(this.visualElement),\n element: this.visualElement.current,\n });\n }\n /**\n * @internal\n */\n stop(event, panInfo) {\n const finalEvent = event || this.latestPointerEvent;\n const finalPanInfo = panInfo || this.latestPanInfo;\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging || !finalPanInfo || !finalEvent)\n return;\n const { velocity } = finalPanInfo;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(finalEvent, finalPanInfo));\n }\n }\n /**\n * @internal\n */\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.endPanSession();\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n /**\n * Clean up the pan session without modifying other drag state.\n * This is used during unmount to ensure event listeners are removed\n * without affecting projection animations or drag locks.\n * @internal\n */\n endPanSession() {\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative. This only applies to relative (non-ref)\n * constraints, as ref-based constraints from calcViewportConstraints are already in the\n * correct coordinate space for the motion value transform offset.\n */\n if (prevConstraints !== this.constraints &&\n !isRefObject(dragConstraints) &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\", \"drag-constraints-ref\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n /**\n * Refresh the root scroll offset so the constraint's viewport box\n * translates to correct page coordinates. The scroll captured at\n * drag mount can be stale if the document was scrolled afterwards —\n * e.g. via the browser restoring scroll on refresh, or an ancestor\n * layout effect running after this element's mount (#2829).\n *\n * Clear the cached scroll first so `updateScroll` bypasses its\n * per-animationId cache and re-reads the live value.\n */\n if (projection.root) {\n projection.root.scroll = undefined;\n projection.root.updateScroll();\n }\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin === true ||\n dragSnapToOrigin === axis)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n /**\n * The layout measurement includes the current transform value,\n * so we need to add it back to get the correct snap position.\n * This fixes an issue where elements with initial coordinates\n * would snap to the wrong position on the first drag.\n */\n const current = axisValue.get() || 0;\n axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current);\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n /**\n * Reset constraints so resolveConstraints() will recalculate them\n * with the freshly measured layout rather than returning the cached value.\n */\n this.constraints = false;\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n /**\n * Flush the updated transform to the DOM synchronously to prevent\n * a visual flash at the element's CSS layout position (0,0) when\n * the transform was stripped for measurement.\n */\n this.visualElement.render();\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n const target = event.target;\n /**\n * Only block drag if clicking on a text input child element\n * (input, textarea, select, contenteditable) where users might\n * want to select text or interact with the control.\n *\n * Buttons and links don't block drag since they don't have\n * click-and-move actions of their own.\n */\n const isClickingTextInputChild = target !== element && isElementTextInput(target);\n if (drag && dragListener && !isClickingTextInputChild) {\n this.start(event);\n }\n });\n /**\n * If using ref-based constraints, observe both the draggable element\n * and the constraint container for size changes via ResizeObserver.\n * Setup is deferred because dragConstraints.current is null when\n * addListeners first runs (React hasn't committed the ref yet).\n */\n let stopResizeObservers;\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n if (!stopResizeObservers) {\n stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints());\n }\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n stopResizeObservers && stopResizeObservers();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction skipFirstCall(callback) {\n let isFirst = true;\n return () => {\n if (isFirst) {\n isFirst = false;\n return;\n }\n callback();\n };\n}\nfunction startResizeObservers(element, constraintsElement, onResize) {\n const stopElement = resize(element, skipFirstCall(onResize));\n const stopContainer = resize(constraintsElement, skipFirstCall(onResize));\n return () => {\n stopElement();\n stopContainer();\n };\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\nexport function expectsResolvedDragConstraints({ dragConstraints, onMeasureDragConstraints, }) {\n return isRefObject(dragConstraints) && !!onMeasureDragConstraints;\n}\n//# sourceMappingURL=VisualElementDragControls.js.map","import { isDragging } from './is-active.mjs';\n\nfunction setDragLock(axis) {\n if (axis === \"x\" || axis === \"y\") {\n if (isDragging[axis]) {\n return null;\n }\n else {\n isDragging[axis] = true;\n return () => {\n isDragging[axis] = false;\n };\n }\n }\n else {\n if (isDragging.x || isDragging.y) {\n return null;\n }\n else {\n isDragging.x = isDragging.y = true;\n return () => {\n isDragging.x = isDragging.y = false;\n };\n }\n }\n}\n\nexport { setDragLock };\n//# sourceMappingURL=set-active.mjs.map\n","import { Feature, frame } from \"motion-dom\";\nimport { noop } from \"motion-utils\";\nimport { addPointerEvent } from \"../../events/add-pointer-event\";\nimport { getContextWindow } from \"../../utils/get-context-window\";\nimport { PanSession } from \"./PanSession\";\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info), false, true);\n }\n};\nexport class PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: asyncHandler(onPan),\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n//# sourceMappingURL=index.js.map","\"use client\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { frame, microtask, globalProjectionState } from \"motion-dom\";\nimport { Component, useContext } from \"react\";\nimport { usePresence } from \"../../../components/AnimatePresence/use-presence\";\nimport { LayoutGroupContext, } from \"../../../context/LayoutGroupContext\";\nimport { SwitchLayoutGroupContext } from \"../../../context/SwitchLayoutGroupContext\";\n/**\n * Track whether we've taken any snapshots yet. If not,\n * we can safely skip notification of didUpdate.\n *\n * Difficult to capture in a test but to prevent flickering\n * we must set this to true either on update or unmount.\n * Running `next-env/layout-id` in Safari will show this behaviour if broken.\n */\nlet hasTakenAnySnapshot = false;\nclass MeasureLayoutWithContext extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n if (hasTakenAnySnapshot) {\n projection.root.didUpdate();\n }\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n layoutDependency: this.props.layoutDependency,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const { projection } = visualElement;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (prevProps.layoutDependency !== layoutDependency) {\n projection.setOptions({\n ...projection.options,\n layoutDependency,\n });\n }\n hasTakenAnySnapshot = true;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined ||\n prevProps.isPresent !== isPresent) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { visualElement, layoutAnchor } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.options.layoutAnchor = layoutAnchor;\n projection.root.didUpdate();\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n hasTakenAnySnapshot = true;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nexport function MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (_jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\n//# sourceMappingURL=MeasureLayout.js.map","\"use client\";\nimport { useCallback, useContext, useEffect, useId } from \"react\";\nimport { PresenceContext, } from \"../../context/PresenceContext\";\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return

\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed from the tree,\n * but `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nexport function usePresence(subscribe = true) {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => {\n if (subscribe) {\n return register(id);\n }\n }, [subscribe]);\n const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return
\n * }\n * ```\n *\n * @public\n */\nexport function useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nexport function isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n//# sourceMappingURL=use-presence.js.map","import { DragGesture } from \"../../gestures/drag\";\nimport { PanGesture } from \"../../gestures/pan\";\nimport { HTMLProjectionNode } from \"../../projection\";\nimport { MeasureLayout } from \"./layout/MeasureLayout\";\nexport const drag = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n//# sourceMappingURL=drag.js.map","import { Feature } from \"motion-dom\";\nimport { noop } from \"motion-utils\";\nimport { VisualElementDragControls } from \"./VisualElementDragControls\";\nexport class DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n update() {\n const { dragControls } = this.node.getProps();\n const { dragControls: prevDragControls } = this.node.prevProps || {};\n if (dragControls !== prevDragControls) {\n this.removeGroupControls();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n }\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n /**\n * In React 19, during list reorder reconciliation, components may\n * briefly unmount and remount while the drag is still active. If we're\n * actively dragging, we should NOT end the pan session - it will\n * continue tracking pointer events via its window-level listeners.\n *\n * The pan session will be properly cleaned up when:\n * 1. The drag ends naturally (pointerup/pointercancel)\n * 2. The component is truly removed from the DOM\n */\n if (!this.controls.isDragging) {\n this.controls.endPanSession();\n }\n }\n}\n//# sourceMappingURL=index.js.map","import { Feature, frame, hover } from \"motion-dom\";\nimport { extractEventInfo } from \"../events/event-info\";\nfunction handleHoverEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\");\n }\n const eventName = (\"onHover\" + lifecycle);\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nexport class HoverGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = hover(current, (_element, startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\");\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\");\n });\n }\n unmount() { }\n}\n//# sourceMappingURL=hover.js.map","import { Feature, frame, press } from \"motion-dom\";\nimport { extractEventInfo } from \"../events/event-info\";\nfunction handlePressEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return;\n }\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\");\n }\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle));\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nexport class PressGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n const { globalTapTarget, propagate } = this.node.props;\n this.unmount = press(current, (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"End\" : \"Cancel\");\n }, {\n useGlobalTarget: globalTapTarget,\n stopPropagation: propagate?.tap === false,\n });\n }\n unmount() { }\n}\n//# sourceMappingURL=press.js.map","/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nexport function observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n//# sourceMappingURL=observers.js.map","import { Feature } from \"motion-dom\";\nimport { observeIntersection } from \"./observers\";\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nexport class InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.stopObserver?.();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n this.stopObserver = observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() {\n this.stopObserver?.();\n this.hasEnteredView = false;\n this.isInView = false;\n }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n//# sourceMappingURL=index.js.map","import { HoverGesture } from \"../../gestures/hover\";\nimport { FocusGesture } from \"../../gestures/focus\";\nimport { PressGesture } from \"../../gestures/press\";\nimport { InViewFeature } from \"./viewport\";\nexport const gestureAnimations = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n};\n//# sourceMappingURL=gestures.js.map","import { animations } from \"../../../motion/features/animations\";\nimport { drag } from \"../../../motion/features/drag\";\nimport { gestureAnimations } from \"../../../motion/features/gestures\";\nimport { layout } from \"../../../motion/features/layout\";\nexport const featureBundle = {\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout,\n};\n//# sourceMappingURL=feature-bundle.js.map","import { Feature, addDomEvent } from \"motion-dom\";\nimport { pipe } from \"motion-utils\";\nexport class FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n//# sourceMappingURL=focus.js.map","import { HTMLProjectionNode } from \"motion-dom\";\nimport { MeasureLayout } from \"./layout/MeasureLayout\";\nexport const layout = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n//# sourceMappingURL=layout.js.map","import { createMotionComponent } from \"../../../motion\";\nimport { createDomVisualElement } from \"../../dom/create-visual-element\";\nimport { featureBundle } from \"./feature-bundle\";\nexport function createMotionComponentWithFeatures(Component, options) {\n return createMotionComponent(Component, options, featureBundle, createDomVisualElement);\n}\n//# sourceMappingURL=create.js.map","\"use client\";\nimport { createMotionComponentWithFeatures as createMotionComponent } from \"./create\";\n/**\n * HTML components\n */\nexport const MotionA = /*@__PURE__*/ createMotionComponent(\"a\");\nexport const MotionAbbr = /*@__PURE__*/ createMotionComponent(\"abbr\");\nexport const MotionAddress = /*@__PURE__*/ createMotionComponent(\"address\");\nexport const MotionArea = /*@__PURE__*/ createMotionComponent(\"area\");\nexport const MotionArticle = /*@__PURE__*/ createMotionComponent(\"article\");\nexport const MotionAside = /*@__PURE__*/ createMotionComponent(\"aside\");\nexport const MotionAudio = /*@__PURE__*/ createMotionComponent(\"audio\");\nexport const MotionB = /*@__PURE__*/ createMotionComponent(\"b\");\nexport const MotionBase = /*@__PURE__*/ createMotionComponent(\"base\");\nexport const MotionBdi = /*@__PURE__*/ createMotionComponent(\"bdi\");\nexport const MotionBdo = /*@__PURE__*/ createMotionComponent(\"bdo\");\nexport const MotionBig = /*@__PURE__*/ createMotionComponent(\"big\");\nexport const MotionBlockquote = \n/*@__PURE__*/ createMotionComponent(\"blockquote\");\nexport const MotionBody = /*@__PURE__*/ createMotionComponent(\"body\");\nexport const MotionButton = /*@__PURE__*/ createMotionComponent(\"button\");\nexport const MotionCanvas = /*@__PURE__*/ createMotionComponent(\"canvas\");\nexport const MotionCaption = /*@__PURE__*/ createMotionComponent(\"caption\");\nexport const MotionCite = /*@__PURE__*/ createMotionComponent(\"cite\");\nexport const MotionCode = /*@__PURE__*/ createMotionComponent(\"code\");\nexport const MotionCol = /*@__PURE__*/ createMotionComponent(\"col\");\nexport const MotionColgroup = /*@__PURE__*/ createMotionComponent(\"colgroup\");\nexport const MotionData = /*@__PURE__*/ createMotionComponent(\"data\");\nexport const MotionDatalist = /*@__PURE__*/ createMotionComponent(\"datalist\");\nexport const MotionDd = /*@__PURE__*/ createMotionComponent(\"dd\");\nexport const MotionDel = /*@__PURE__*/ createMotionComponent(\"del\");\nexport const MotionDetails = /*@__PURE__*/ createMotionComponent(\"details\");\nexport const MotionDfn = /*@__PURE__*/ createMotionComponent(\"dfn\");\nexport const MotionDialog = /*@__PURE__*/ createMotionComponent(\"dialog\");\nexport const MotionDiv = /*@__PURE__*/ createMotionComponent(\"div\");\nexport const MotionDl = /*@__PURE__*/ createMotionComponent(\"dl\");\nexport const MotionDt = /*@__PURE__*/ createMotionComponent(\"dt\");\nexport const MotionEm = /*@__PURE__*/ createMotionComponent(\"em\");\nexport const MotionEmbed = /*@__PURE__*/ createMotionComponent(\"embed\");\nexport const MotionFieldset = /*@__PURE__*/ createMotionComponent(\"fieldset\");\nexport const MotionFigcaption = \n/*@__PURE__*/ createMotionComponent(\"figcaption\");\nexport const MotionFigure = /*@__PURE__*/ createMotionComponent(\"figure\");\nexport const MotionFooter = /*@__PURE__*/ createMotionComponent(\"footer\");\nexport const MotionForm = /*@__PURE__*/ createMotionComponent(\"form\");\nexport const MotionH1 = /*@__PURE__*/ createMotionComponent(\"h1\");\nexport const MotionH2 = /*@__PURE__*/ createMotionComponent(\"h2\");\nexport const MotionH3 = /*@__PURE__*/ createMotionComponent(\"h3\");\nexport const MotionH4 = /*@__PURE__*/ createMotionComponent(\"h4\");\nexport const MotionH5 = /*@__PURE__*/ createMotionComponent(\"h5\");\nexport const MotionH6 = /*@__PURE__*/ createMotionComponent(\"h6\");\nexport const MotionHead = /*@__PURE__*/ createMotionComponent(\"head\");\nexport const MotionHeader = /*@__PURE__*/ createMotionComponent(\"header\");\nexport const MotionHgroup = /*@__PURE__*/ createMotionComponent(\"hgroup\");\nexport const MotionHr = /*@__PURE__*/ createMotionComponent(\"hr\");\nexport const MotionHtml = /*@__PURE__*/ createMotionComponent(\"html\");\nexport const MotionI = /*@__PURE__*/ createMotionComponent(\"i\");\nexport const MotionIframe = /*@__PURE__*/ createMotionComponent(\"iframe\");\nexport const MotionImg = /*@__PURE__*/ createMotionComponent(\"img\");\nexport const MotionInput = /*@__PURE__*/ createMotionComponent(\"input\");\nexport const MotionIns = /*@__PURE__*/ createMotionComponent(\"ins\");\nexport const MotionKbd = /*@__PURE__*/ createMotionComponent(\"kbd\");\nexport const MotionKeygen = /*@__PURE__*/ createMotionComponent(\"keygen\");\nexport const MotionLabel = /*@__PURE__*/ createMotionComponent(\"label\");\nexport const MotionLegend = /*@__PURE__*/ createMotionComponent(\"legend\");\nexport const MotionLi = /*@__PURE__*/ createMotionComponent(\"li\");\nexport const MotionLink = /*@__PURE__*/ createMotionComponent(\"link\");\nexport const MotionMain = /*@__PURE__*/ createMotionComponent(\"main\");\nexport const MotionMap = /*@__PURE__*/ createMotionComponent(\"map\");\nexport const MotionMark = /*@__PURE__*/ createMotionComponent(\"mark\");\nexport const MotionMenu = /*@__PURE__*/ createMotionComponent(\"menu\");\nexport const MotionMenuitem = /*@__PURE__*/ createMotionComponent(\"menuitem\");\nexport const MotionMeter = /*@__PURE__*/ createMotionComponent(\"meter\");\nexport const MotionNav = /*@__PURE__*/ createMotionComponent(\"nav\");\nexport const MotionObject = /*@__PURE__*/ createMotionComponent(\"object\");\nexport const MotionOl = /*@__PURE__*/ createMotionComponent(\"ol\");\nexport const MotionOptgroup = /*@__PURE__*/ createMotionComponent(\"optgroup\");\nexport const MotionOption = /*@__PURE__*/ createMotionComponent(\"option\");\nexport const MotionOutput = /*@__PURE__*/ createMotionComponent(\"output\");\nexport const MotionP = /*@__PURE__*/ createMotionComponent(\"p\");\nexport const MotionParam = /*@__PURE__*/ createMotionComponent(\"param\");\nexport const MotionPicture = /*@__PURE__*/ createMotionComponent(\"picture\");\nexport const MotionPre = /*@__PURE__*/ createMotionComponent(\"pre\");\nexport const MotionProgress = /*@__PURE__*/ createMotionComponent(\"progress\");\nexport const MotionQ = /*@__PURE__*/ createMotionComponent(\"q\");\nexport const MotionRp = /*@__PURE__*/ createMotionComponent(\"rp\");\nexport const MotionRt = /*@__PURE__*/ createMotionComponent(\"rt\");\nexport const MotionRuby = /*@__PURE__*/ createMotionComponent(\"ruby\");\nexport const MotionS = /*@__PURE__*/ createMotionComponent(\"s\");\nexport const MotionSamp = /*@__PURE__*/ createMotionComponent(\"samp\");\nexport const MotionScript = /*@__PURE__*/ createMotionComponent(\"script\");\nexport const MotionSection = /*@__PURE__*/ createMotionComponent(\"section\");\nexport const MotionSelect = /*@__PURE__*/ createMotionComponent(\"select\");\nexport const MotionSmall = /*@__PURE__*/ createMotionComponent(\"small\");\nexport const MotionSource = /*@__PURE__*/ createMotionComponent(\"source\");\nexport const MotionSpan = /*@__PURE__*/ createMotionComponent(\"span\");\nexport const MotionStrong = /*@__PURE__*/ createMotionComponent(\"strong\");\nexport const MotionStyle = /*@__PURE__*/ createMotionComponent(\"style\");\nexport const MotionSub = /*@__PURE__*/ createMotionComponent(\"sub\");\nexport const MotionSummary = /*@__PURE__*/ createMotionComponent(\"summary\");\nexport const MotionSup = /*@__PURE__*/ createMotionComponent(\"sup\");\nexport const MotionTable = /*@__PURE__*/ createMotionComponent(\"table\");\nexport const MotionTbody = /*@__PURE__*/ createMotionComponent(\"tbody\");\nexport const MotionTd = /*@__PURE__*/ createMotionComponent(\"td\");\nexport const MotionTextarea = /*@__PURE__*/ createMotionComponent(\"textarea\");\nexport const MotionTfoot = /*@__PURE__*/ createMotionComponent(\"tfoot\");\nexport const MotionTh = /*@__PURE__*/ createMotionComponent(\"th\");\nexport const MotionThead = /*@__PURE__*/ createMotionComponent(\"thead\");\nexport const MotionTime = /*@__PURE__*/ createMotionComponent(\"time\");\nexport const MotionTitle = /*@__PURE__*/ createMotionComponent(\"title\");\nexport const MotionTr = /*@__PURE__*/ createMotionComponent(\"tr\");\nexport const MotionTrack = /*@__PURE__*/ createMotionComponent(\"track\");\nexport const MotionU = /*@__PURE__*/ createMotionComponent(\"u\");\nexport const MotionUl = /*@__PURE__*/ createMotionComponent(\"ul\");\nexport const MotionVideo = /*@__PURE__*/ createMotionComponent(\"video\");\nexport const MotionWbr = /*@__PURE__*/ createMotionComponent(\"wbr\");\nexport const MotionWebview = /*@__PURE__*/ createMotionComponent(\"webview\");\n/**\n * SVG components\n */\nexport const MotionAnimate = /*@__PURE__*/ createMotionComponent(\"animate\");\nexport const MotionCircle = /*@__PURE__*/ createMotionComponent(\"circle\");\nexport const MotionDefs = /*@__PURE__*/ createMotionComponent(\"defs\");\nexport const MotionDesc = /*@__PURE__*/ createMotionComponent(\"desc\");\nexport const MotionEllipse = /*@__PURE__*/ createMotionComponent(\"ellipse\");\nexport const MotionG = /*@__PURE__*/ createMotionComponent(\"g\");\nexport const MotionImage = /*@__PURE__*/ createMotionComponent(\"image\");\nexport const MotionLine = /*@__PURE__*/ createMotionComponent(\"line\");\nexport const MotionFilter = /*@__PURE__*/ createMotionComponent(\"filter\");\nexport const MotionMarker = /*@__PURE__*/ createMotionComponent(\"marker\");\nexport const MotionMask = /*@__PURE__*/ createMotionComponent(\"mask\");\nexport const MotionMetadata = /*@__PURE__*/ createMotionComponent(\"metadata\");\nexport const MotionPath = /*@__PURE__*/ createMotionComponent(\"path\");\nexport const MotionPattern = /*@__PURE__*/ createMotionComponent(\"pattern\");\nexport const MotionPolygon = /*@__PURE__*/ createMotionComponent(\"polygon\");\nexport const MotionPolyline = /*@__PURE__*/ createMotionComponent(\"polyline\");\nexport const MotionRect = /*@__PURE__*/ createMotionComponent(\"rect\");\nexport const MotionStop = /*@__PURE__*/ createMotionComponent(\"stop\");\nexport const MotionSvg = /*@__PURE__*/ createMotionComponent(\"svg\");\nexport const MotionSymbol = /*@__PURE__*/ createMotionComponent(\"symbol\");\nexport const MotionText = /*@__PURE__*/ createMotionComponent(\"text\");\nexport const MotionTspan = /*@__PURE__*/ createMotionComponent(\"tspan\");\nexport const MotionUse = /*@__PURE__*/ createMotionComponent(\"use\");\nexport const MotionView = /*@__PURE__*/ createMotionComponent(\"view\");\nexport const MotionClipPath = /*@__PURE__*/ createMotionComponent(\"clipPath\");\nexport const MotionFeBlend = /*@__PURE__*/ createMotionComponent(\"feBlend\");\nexport const MotionFeColorMatrix = \n/*@__PURE__*/ createMotionComponent(\"feColorMatrix\");\nexport const MotionFeComponentTransfer = /*@__PURE__*/ createMotionComponent(\"feComponentTransfer\");\nexport const MotionFeComposite = \n/*@__PURE__*/ createMotionComponent(\"feComposite\");\nexport const MotionFeConvolveMatrix = \n/*@__PURE__*/ createMotionComponent(\"feConvolveMatrix\");\nexport const MotionFeDiffuseLighting = \n/*@__PURE__*/ createMotionComponent(\"feDiffuseLighting\");\nexport const MotionFeDisplacementMap = \n/*@__PURE__*/ createMotionComponent(\"feDisplacementMap\");\nexport const MotionFeDistantLight = \n/*@__PURE__*/ createMotionComponent(\"feDistantLight\");\nexport const MotionFeDropShadow = \n/*@__PURE__*/ createMotionComponent(\"feDropShadow\");\nexport const MotionFeFlood = /*@__PURE__*/ createMotionComponent(\"feFlood\");\nexport const MotionFeFuncA = /*@__PURE__*/ createMotionComponent(\"feFuncA\");\nexport const MotionFeFuncB = /*@__PURE__*/ createMotionComponent(\"feFuncB\");\nexport const MotionFeFuncG = /*@__PURE__*/ createMotionComponent(\"feFuncG\");\nexport const MotionFeFuncR = /*@__PURE__*/ createMotionComponent(\"feFuncR\");\nexport const MotionFeGaussianBlur = \n/*@__PURE__*/ createMotionComponent(\"feGaussianBlur\");\nexport const MotionFeImage = /*@__PURE__*/ createMotionComponent(\"feImage\");\nexport const MotionFeMerge = /*@__PURE__*/ createMotionComponent(\"feMerge\");\nexport const MotionFeMergeNode = \n/*@__PURE__*/ createMotionComponent(\"feMergeNode\");\nexport const MotionFeMorphology = \n/*@__PURE__*/ createMotionComponent(\"feMorphology\");\nexport const MotionFeOffset = /*@__PURE__*/ createMotionComponent(\"feOffset\");\nexport const MotionFePointLight = \n/*@__PURE__*/ createMotionComponent(\"fePointLight\");\nexport const MotionFeSpecularLighting = \n/*@__PURE__*/ createMotionComponent(\"feSpecularLighting\");\nexport const MotionFeSpotLight = \n/*@__PURE__*/ createMotionComponent(\"feSpotLight\");\nexport const MotionFeTile = /*@__PURE__*/ createMotionComponent(\"feTile\");\nexport const MotionFeTurbulence = \n/*@__PURE__*/ createMotionComponent(\"feTurbulence\");\nexport const MotionForeignObject = \n/*@__PURE__*/ createMotionComponent(\"foreignObject\");\nexport const MotionLinearGradient = \n/*@__PURE__*/ createMotionComponent(\"linearGradient\");\nexport const MotionRadialGradient = \n/*@__PURE__*/ createMotionComponent(\"radialGradient\");\nexport const MotionTextPath = /*@__PURE__*/ createMotionComponent(\"textPath\");\n//# sourceMappingURL=elements.js.map","import { motion } from \"./\";\nexport const MotionDiv = motion.div;\n//# sourceMappingURL=size.js.map"],"names":["addUniqueItem","arr","item","indexOf","push","removeItem","index","splice","clamp","min","max","v","formatErrorMessage","message","errorCode","warning","invariant","process","env","NODE_ENV","check","console","warn","Error","MotionGlobalConfig","isNumericalString","test","isObject","value","isZeroValueString","memo","callback","result","undefined","noop","any","pipe","transformers","reduce","a","b","progress","from","to","range","SubscriptionManager","constructor","this","subscriptions","add","handler","notify","c","numSubscriptions","length","i","getSize","clear","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","velocityPerSecond","velocity","frameDuration","calcBezier","t","a1","a2","cubicBezier","mX1","mY1","mX2","mY2","getTForX","aX","x","lowerBound","upperBound","currentX","currentT","Math","abs","binarySubdivide","mirrorEasing","easing","p","reverseEasing","backOut","backIn","backInOut","anticipate","pow","circIn","sin","acos","circOut","circInOut","easeIn","easeOut","easeInOut","isBezierDefinition","Array","isArray","easingLookup","linear","easingDefinitionToFunction","definition","x1","y1","x2","y2","LayoutGroupContext","createContext","LazyContext","strict","MotionConfigContext","transformPagePoint","isStatic","reducedMotion","MotionContext","stepsOrder","createRenderBatcher","scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","state","delta","timestamp","isProcessing","flagRunNextFrame","steps","acc","key","thisFrame","Set","nextFrame","flushNextFrame","toKeepAlive","WeakSet","latestFrameData","triggerCallback","has","step","schedule","keepAlive","immediate","queue","cancel","delete","frameData","prevFrame","forEach","createRenderStep","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","useManualTiming","performance","now","frame","cancelFrame","frameSteps","requestAnimationFrame","clearTime","time","set","newTime","queueMicrotask","checkStringStartsWith","token","startsWith","isCSSVariableName","startsAsVariableToken","isCSSVariableToken","singleCssVariableRegex","split","trim","containsCSSVariable","includes","number","parse","parseFloat","transform","alpha","scale","default","sanitize","round","floatRegex","singleColorRegex","isColorString","type","testProp","Boolean","isNullish","Object","prototype","hasOwnProperty","call","splitColor","aName","bName","cName","match","rgbUnit","clampRgbUnit","rgba","red","green","blue","alpha$1","hex","r","g","substring","parseInt","createUnitType","unit","endsWith","degrees","percent","px","vh","vw","progressPercentage","hsla","hue","saturation","lightness","color","getAnimatableNone","parsed","colorRegex","NUMBER_TOKEN","COLOR_TOKEN","complexRegex","analyseComplexValue","originalValue","toString","values","indexes","var","types","replace","parsedValue","buildTransformer","numSections","output","convertToZero","splitBefore","complex","isNaN","createTransformer","source","info","transformer","map","hueToRgb","q","mixImmediate","mixNumber","mixLinearColor","fromExpo","expo","sqrt","colorTypes","asRGBA","find","model","hslaToRgba","mixColor","fromRGBA","toRGBA","blended","invisibleValues","mixNumber$1","getMixer","mixComplex","mixArray","mixObject","numValues","blendValue","origin","target","template","originStats","targetStats","mixVisibility","orderedOrigin","pointers","originIndex","originValue","matchOrder","mix","mixer","frameloopDriver","passTimestamp","start","stop","generateLinearEasing","duration","resolution","points","numPoints","maxGeneratorDuration","calcGeneratorDuration","generator","next","done","Infinity","springDefaults","granular","calcAngularFreq","undampedFreq","dampingRatio","safeMin","durationKeys","physicsKeys","isSpringType","options","keys","some","getSpringOptions","springOptions","stiffness","damping","mass","isResolvedFromDuration","visualDuration","root","PI","bounce","derived","envelope","derivative","exponentialDecay","exp","d","e","f","initialGuess","approximateRoot","findSpring","spring","optionsOrVisualDuration","keyframes","restSpeed","restDelta","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","resolveSpring","resolveVelocity","angularFreq","A","sinCoeff","cosCoeff","cos","C","dampedAngularFreq","freqForT","sinh","cosh","P","sinhCoeff","coshCoeff","calculatedDuration","current","currentVelocity","toTransition","applyToOptions","generatorOptions","createGenerator","ease","createGeneratorEasing","getGeneratorVelocity","resolveValue","prevT","inertia","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","nearestBoundary","amplitude","ideal","calcDelta","calcLatest","applyFriction","latest","timeReachedBoundary","spring$1","checkCatchBoundary","hasUpdatedFrame","interpolate","input","isClamp","inputLength","isZeroDeltaRange","reverse","mixers","customMixer","mixerFactory","numMixers","easingFunction","createMixers","interpolator","progressInRange","defaultOffset","offset","remaining","offsetProgress","fillOffset","keyframeValues","times","easingFunctions","isEasingArray","absoluteTimes","o","convertOffsetToTimes","mapTimeToKeyframe","isNotNull","getFinalKeyframe","repeat","repeatType","finalKeyframe","speed","resolvedKeyframes","filter","transitionTypeMap","decay","tween","replaceTransitionType","transition","WithPromise","updateFinished","finished","_finished","Promise","resolve","notifyFinished","then","onResolve","onReject","percentToProgress","JSAnimation","super","startTime","isStopped","currentTime","holdTime","playbackSpeed","delayState","motionValue","updatedAt","tick","teardown","onStop","initAnimation","play","autoplay","pause","repeatDelay","keyframes$1","generatorFactory","mixKeyframes","mirroredGenerator","resolvedDuration","totalDuration","updateTime","animationTime","sample","delay","onUpdate","timeWithoutDelay","isInDelayPhase","elapsed","frameGenerator","currentIteration","floor","iterationProgress","isAnimationFinished","finish","reject","iterationDuration","driver","s","newSpeed","hasChanged","onPlay","complete","onComplete","onCancel","stopDriver","sampleTime","attachTimeline","timeline","allowFlatten","observe","radToDeg","rad","rotate","angle","atan2","rebaseAngle","matrix2dParsers","y","translateX","translateY","scaleX","scaleY","rotateZ","skewX","atan","skewY","skew","matrix3dParsers","z","translateZ","rotateX","rotateY","defaultTransformValue","name","parseValueFromTransform","matrix3dMatch","parsers","matrix2dMatch","valueParser","convertTransformToNumber","transformPropOrder","transformProps","isNumOrPxType","transformKeys","nonTranslationalTransformKeys","positionalValues","width","paddingLeft","paddingRight","boxSizing","height","paddingTop","paddingBottom","top","_bbox","left","bottom","right","toResolve","isScheduled","anyNeedsMeasurement","isForced","measureAllKeyframes","resolversToMeasure","resolver","needsMeasurement","elementsToMeasure","element","transformsToRestore","Map","removedTransforms","visualElement","getValue","get","removeNonTranslationalTransform","measureInitialState","restore","measureEndState","suspendedScrollY","window","scrollTo","readAllKeyframes","readKeyframes","KeyframeResolver","unresolvedKeyframes","isAsync","scheduleResolve","currentValue","valueAsRead","readValue","fillWildcards","setFinalKeyframe","renderEndStyles","isForcedComplete","resume","setStyle","isCSSVar","style","setProperty","supportsFlags","memoSupports","supportsFlag","memoized","supportsScrollTimeline","ScrollTimeline","supportsLinearEasing","document","createElement","animate","opacity","cubicBezierAsString","supportedWaapiEasing","mapEasingToNativeEasing","segmentEasing","startWaapiAnimation","valueName","pseudoElement","keyframeOptions","fill","iterations","direction","isGenerator","NativeAnimation","finishedTime","manualStartTime","isPseudoElement","applyGeneratorOptions","animation","onfinish","keyframe","updateMotionValue","commitStyles","isConnected","effect","getComputedTiming","Number","wasFinished","playbackRate","playState","newStartTime","rangeStart","rangeEnd","updateTiming","unsupportedEasingFunctions","replaceStringEasing","NativeAnimationExtended","sampleAnimation","setWithVelocity","isAnimatable","makeAnimationInstant","acceleratedValues","browserColorFunctions","colorProperties","supportsWaapi","Element","supportsBrowserAnimation","subject","owner","HTMLElement","transformTemplate","getProps","hasBrowserOnlyColors","AsyncMotionValueAnimation","_animation","stopTimeline","keyframeResolver","createdAt","optionsWithDefaults","KeyframeResolver$1","forced","onKeyframesResolved","sync","isHandoff","resolvedAt","canAnimateValue","originKeyframe","targetKeyframe","isOriginAnimatable","isTargetAnimatable","hasKeyframesChanged","canAnimate","instantAnimations","resolvedOptions","useWaapi","catch","pendingTimeline","_onReject","finally","calcChildStagger","children","child","delayChildren","staggerChildren","staggerDirection","sort","sortNodePosition","numChildren","size","maxStaggerDuration","MotionValue","init","canTrackVelocity","events","updateAndNotify","setPrevFrameValue","prev","setCurrent","change","dependents","dependent","dirty","hasAnimated","prevFrameValue","prevUpdatedAt","onChange","subscription","on","eventName","unsubscribe","clearListeners","eventManagers","attach","passiveEffect","stopPassiveEffect","jump","endAnimation","addDependent","removeDependent","getPrevious","getVelocity","startAnimation","animationStart","animationComplete","clearAnimation","animationCancel","isAnimating","destroy","resolveTransition","parentTransition","inherit","_","rest","getValueTransition","valueTransition","underDampedSpring","keyframesTransition","getDefaultTransition","valueKey","orchestrationKeys","animateMotionValue","isTransitionDefined","assign","shouldSkip","skipAnimations","shouldSkipAnimations","isSync","splitCSSVariableRegex","getVariableValue","depth","fallback","exec","token1","token2","parseCSSVariable","resolved","getComputedStyle","getPropertyValue","trimmed","getValueState","resolveVariantFromProps","props","custom","variants","resolveVariant","positionalKeys","isKeyframesTarget","setMotionValue","hasValue","addValue","resolveFinalValueInKeyframes","isMotionValue","addValueToWillChange","willChange","WillChange","newWillChange","camelToDash","str","toLowerCase","optimizedAppearDataAttribute","getOptimisedAppearId","shouldBlockAnimation","protectedKeys","needsAnimating","shouldBlock","animateTarget","targetAndTransition","transitionOverride","transitionEnd","defaultTransition","reduceMotion","animations","animationTypeState","animationState","getState","path","animateVisualElement","latestValues","valueTarget","MotionHandoffAnimation","appearId","shouldReduceMotion","applyTransitionEnd","setTarget","all","animateVariant","variant","presenceContext","getAnimation","getChildAnimations","variantChildren","forwardDelay","animateChildren","when","first","last","testValueType","dimensionValueTypes","findDimensionValueType","isNone","maxDefaults","applyDefaultFilter","slice","defaultValue","functionRegex","functions","join","mask","int","numberValueTypes","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","maxWidth","maxHeight","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY","pathRotation","scaleZ","distance","perspective","transformPerspective","originX","originY","originZ","zIndex","fillOpacity","strokeOpacity","numOctaves","defaultValueTypes","backgroundColor","outlineColor","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","WebkitFilter","WebkitMask","getDefaultValueType","customTypes","defaultValueType","invalidTemplates","DOMKeyframesResolver","resolveNoneKeyframes","originType","targetType","noneKeyframeIndexes","animatableTemplate","noneIndex","makeNoneKeyframesAnimatable","pageYOffset","measuredOrigin","measureViewportBox","measureKeyframe","finalKeyframeIndex","unsetTransformName","unsetTransformValue","resolveElements","elementOrSelector","scope","selectorCache","EventTarget","elements","querySelectorAll","getValueAsType","microtask","isDragging","isDragActive","setupGesture","gestureAbortController","AbortController","passive","signal","abort","hover","onHoverStart","eventOptions","hoverEndCallback","isPressed","deferredHoverEnd","endHover","event","removeEventListener","onPointerLeave","onPointerUp","leaveEvent","pointerType","addEventListener","enterEvent","onHoverEnd","isNodeOrChild","parent","parentElement","isPrimaryPointer","button","isPrimary","keyboardAccessibleElements","textInputElements","isPressing","filterEvents","firePointerEvent","dispatchEvent","PointerEvent","bubbles","isValidPressEvent","claimedPointerDownEvents","press","targetOrSelector","onPressStart","targets","cancelEvents","startPress","startEvent","currentTarget","stopPropagation","onPressEnd","onPointerEnd","endEvent","success","onPointerCancel","upEvent","useGlobalTarget","cancelEvent","focusEvent","handleKeydown","handleKeyup","enableKeyboardPress","tagName","isContentEditable","isElementKeyboardAccessible","hasAttribute","tabIndex","isSVGElement","resizeHandlers","WeakMap","observer","borderBoxAxis","svgAxis","htmlAxis","borderBoxSize","getBBox","getWidth","getHeight","notifyTarget","notifyAll","entries","resizeElement","ResizeObserver","elementHandlers","unobserve","windowCallbacks","windowResizeHandler","resizeWindow","innerWidth","innerHeight","resize","valueTypes","createBox","visualElementStore","isAnimationControls","isVariantLabel","variantPriorityOrder","variantProps","isControllingVariants","isVariantNode","prefersReducedMotion","hasReducedMotionListener","isBrowser","propEventHandlers","featureDefinitions","setFeatureDefinitions","definitions","VisualElement","scrapeMotionValuesFromProps","_props","_prevProps","_visualElement","reducedMotionConfig","blockInitialAnimation","visualState","features","valueSubscriptions","prevMotionValues","hasBeenMounted","propEventSubscriptions","notifyUpdate","triggerBuild","renderInstance","renderState","projection","renderScheduledAt","scheduleRender","baseTarget","initialValues","initial","skipAnimationsConfig","manuallyAnimateOnMount","initialMotionValues","mount","instance","removeFromVariantTree","addVariantChild","bindToMotionValue","matchMedia","motionMediaQuery","setReducedMotionPreferences","matches","initPrefersReducedMotion","addChild","unmount","remove","removeChild","feature","isMounted","enteringChildren","accelerate","factory","cleanup","valueIsTransform","onBindTransform","removeOnChange","latestValue","isTransformDirty","removeSyncCheck","MotionCheckAppearSync","other","sortInstanceNodePosition","updateFeatures","featureDefinition","isEnabled","Feature","FeatureConstructor","build","measureInstanceViewportBox","getStaticValue","setStaticValue","prevProps","prevPresenceContext","listener","nextValue","prevValue","existingValue","liveStyle","removeValue","updateMotionValuesFromProps","handleChildMotionValue","getVariant","getTransformPagePoint","getClosestVariantNode","closestVariantNode","removeValueFromRenderState","getBaseTargetFromProps","readValueFromInstance","setBaseTarget","getBaseTarget","valueFromInitial","args","scheduleRenderMicrotask","DOMVisualElement","arguments","compareDocumentPosition","vars","childSubscription","textContent","node","convertBoundingBoxToBox","isIdentityScale","hasScale","hasTransform","has2DTranslate","is2DTranslate","scalePoint","point","originPoint","applyPointDelta","translate","boxScale","applyAxisDelta","axis","applyBoxDelta","box","TREE_SCALE_SNAP_MIN","TREE_SCALE_SNAP_MAX","translateAxis","transformAxis","axisTranslate","axisScale","axisOrigin","resolveAxisTranslate","transformBox","sourceBox","resolveBox","transformPoint","topLeft","bottomRight","transformBoxPoints","getBoundingClientRect","translateAlias","numTransforms","buildHTMLStyles","transformOrigin","hasTransformOrigin","valueAsType","transformString","transformIsDefault","valueIsDefault","buildTransform","renderHTML","styleProp","elementStyle","applyProjectionStyles","pixelsToPercent","pixels","correctBorderRadius","correct","correctBoxShadow","treeScale","projectionDelta","original","shadow","xScale","yScale","averageScale","scaleCorrectors","applyTo","boxShadow","isForcedMotionValue","layout","layoutId","prevStyle","newValues","HTMLVisualElement","isProjecting","readTransformValue","computedStyle","dashKeys","array","camelKeys","cssMotionPathProperties","buildSVGAttrs","attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset","isSVGTag","viewBox","attrs","spacing","useDashCase","buildSVGPath","camelCaseAttributes","tag","scrapeMotionValuesFromProps$1","charAt","toUpperCase","SVGVisualElement","defaultType","getAttribute","_styleProp","setAttribute","renderSVG","numVariantProps","getVariantContext","context","prop","shallowCompare","prevLength","reversePriorityOrder","numAnimationTypes","createAnimateFunction","resolvedDefinition","createAnimationState","createState","isInitialRender","wasReset","buildResolvedTypeValues","animateChanges","changedActiveType","removedKeys","encounteredKeys","removedVariantIndex","typeState","propIsVariant","activeDelta","isActive","isInherited","prevProp","prevResolvedValues","variantDidChange","checkVariantsDidChange","shouldAnimateType","handledRemovedValues","definitionList","resolvedValues","allKeys","markToAnimate","valueHasChanged","willAnimateViaParent","parentVariant","fallbackAnimation","initialTransition","fallbackTarget","shouldAnimate","setActive","setAnimateFunction","makeAnimator","reset","createTypeState","whileInView","whileHover","whileTap","whileDrag","whileFocus","exit","copyAxisInto","originAxis","copyBoxInto","originBox","copyAxisDeltaInto","originDelta","calcLength","calcAxisDelta","calcBoxDelta","calcRelativeAxis","relative","anchor","anchorPoint","calcRelativeAxisPosition","calcRelativePosition","removePointDelta","removeAxisTransforms","transforms","scaleKey","originKey","sourceAxis","removeAxisDelta","xKeys","yKeys","removeBoxTransforms","isAxisDeltaZero","isDeltaZero","axisEquals","axisEqualsRounded","boxEqualsRounded","aspectRatio","axisDeltaEquals","eachAxis","borderLabels","numBorders","asNumber","isPx","getRadius","radiusName","easeCrossfadeIn","compress","easeCrossfadeOut","addDomEvent","compareByDepth","FlatTree","isDirty","resolveMotionValue","NodeStack","members","member","lead","prevLead","inst","snapshot","promote","relegate","isPresent","preserveFollowOpacity","show","updateSnapshot","layoutDependency","prevDep","nextDep","resumeFrom","preserveOpacity","animationValues","isUpdating","isLayoutDirty","crossfade","hide","exitAnimationComplete","onExitComplete","resumingFrom","removeLeadSnapshot","globalProjectionState","hasAnimatedSinceResize","hasEverUpdated","transformAxes","id","resetDistortingTransform","sharedAnimationValues","cancelTreeOptimisedTransformAnimations","projectionNode","hasCheckedOptimisedAppear","MotionHasOptimisedAnimation","MotionCancelOptimisedAnimation","createProjectionNode","attachResizeListener","defaultParent","measureScroll","checkIsScrollRoot","resetTransform","animationId","animationCommitId","isTreeAnimating","isAnimationBlocked","isProjectionDirty","isSharedProjectionDirty","updateManuallyBlocked","updateBlockedByResize","isSVG","needsReset","shouldResetTransform","eventHandlers","hasTreeAnimated","layoutVersion","updateScheduled","scheduleUpdate","projectionUpdateScheduled","checkUpdateFailed","clearAllSnapshots","updateProjection","nodes","propagateDirtyNodes","resolveTargetDelta","calcProjection","cleanDirtyNodes","resolvedRelativeTargetAt","linkedParentVersion","hasProjected","isVisible","animationProgress","sharedNodes","notifyListeners","subscriptionManager","hasListeners","cancelDelay","resizeUnblockUpdate","newInnerWidth","timeout","checkElapsed","finishAnimation","registerSharedNode","hasLayoutChanged","hasRelativeLayoutChanged","newLayout","isTreeAnimationBlocked","relativeTarget","layoutTransition","defaultLayoutTransition","onLayoutAnimationStart","onLayoutAnimationComplete","hasTargetChanged","targetLayout","hasOnlyRelativeTargetChanged","layoutRoot","currentAnimation","animationOptions","setAnimationOrigin","isLead","willUpdate","stack","getStack","blockUpdate","unblockUpdate","isUpdateBlocked","startUpdate","resetSkewAndRotation","getTransformTemplate","shouldNotifyListeners","updateScroll","prevTransformTemplateValue","wasBlockedByResize","forceLayoutMeasure","clearMeasurements","clearIsLayoutDirty","ensureDraggedNodesSnapshotted","resetTransformStyle","updateLayout","notifyLayoutUpdate","didUpdate","clearSnapshot","removeLeadSnapshots","scheduleUpdateProjection","scheduleCheckAfterUnmount","measure","measuredBox","alwaysMeasureLayout","prevLayout","layoutCorrected","layoutBox","phase","layoutScroll","scroll","isRoot","wasRoot","isResetRequested","hasProjection","transformTemplateValue","transformTemplateHasChanged","removeTransform","pageBox","measurePageBox","removeElementScroll","roundAxis","checkNodeWasScrollRoot","boxWithoutScroll","applyTransform","transformOnly","withTransforms","boxWithoutTransform","setTargetDelta","targetDelta","setOptions","forceRelativeParentToResolveTarget","relativeParent","forceRecalculation","getLead","isShared","attemptToResolveRelativeTarget","getClosestProjectingParent","removeRelativeTarget","layoutAnchor","createRelativeTarget","targetWithTransforms","relativeTargetOrigin","parentLayout","canSkip","pendingAnimation","prevTreeScaleX","prevTreeScaleY","treePath","isSharedTransition","treeLength","display","applyTreeDeltas","prevProjectionDelta","createProjectionDeltas","projectionDeltaWithTransform","pathFn","snapshotLatestValues","mixedValues","relativeLayout","isSharedLayoutAnimation","isOnlyMember","shouldCrossfadeOpacity","hasOpacityCrossfade","prevRelativeTarget","interpolateProjection","mixTargetDelta","mixAxisDeltaLinear","mixAxis","follow","opacityExit","borderLabel","followRadius","leadRadius","mixValues","motionValue$1","animateSingleValue","completeAnimation","applyTransformsToTarget","shouldAnimatePositionOnly","animationType","xLength","yLength","config","initialPromotionConfig","shouldPreserveFollowOpacity","getPrevLead","hasDistortingTransform","resetValues","targetStyle","visibility","pointerEvents","valuesToRender","latestTransform","xTranslate","yTranslate","zTranslate","elementScaleX","elementScaleY","buildProjectionTransform","isCSSVariable","corrected","num","resetTree","measuredLayout","axisSnapshot","snapAxis","layoutDelta","visualDelta","parentSnapshot","relativeSnapshot","onBeforeLayoutMeasure","userAgentContains","string","navigator","userAgent","roundPoint","maxDistance","DocumentProjectionNode","ref","documentElement","scrollLeft","body","scrollTop","rootProjectionNode","HTMLProjectionNode","documentNode","position","useCreateMotionContext","getCurrentTreeVariants","useContext","useMemo","variantLabelsAsDependency","createHtmlRenderState","copyRawValuesOnly","useStyle","useInitialMotionValues","useHTMLProps","htmlProps","drag","dragListener","draggable","userSelect","WebkitUserSelect","WebkitTouchCallout","touchAction","onTap","onTapStart","createSvgRenderState","useSVGProps","_isStatic","Component","visualProps","rawStyles","validMotionProps","isValidMotionProp","shouldForward","isValidProp","require","lowercaseSVGElements","isSVGComponent","useRender","forwardMotionProps","filteredProps","isDom","filterProps","elementProps","Fragment","renderedChildren","PresenceContext","makeLatestValues","scrapeMotionValues","motionValues","checkIsControllingVariants","checkIsVariantNode","isInitialAnimationBlocked","variantToSet","list","makeUseVisualState","make","createRenderState","makeState","useRef","useConstant","useHTMLVisualState","scrapeHTMLMotionValuesFromProps","useSVGVisualState","scrapeSVGMotionValuesFromProps","featureProps","focus","tap","pan","inView","isInitialized","getInitializedFeatureDefinitions","initialFeatureDefinitions","initFeatureDefinitions","motionComponentSymbol","Symbol","for","useMotionRef","externalRef","externalRefContainer","useInsertionEffect","refCleanup","useCallback","onMount","SwitchLayoutGroupContext","isRefObject","useIsomorphicLayoutEffect","useLayoutEffect","useEffect","useVisualElement","createVisualElement","ProjectionNodeConstructor","lazyContext","motionConfig","visualElementRef","hasMountedOnce","renderer","initialLayoutGroupConfig","dragConstraints","layoutCrossfade","getClosestProjectingNode","optimisedAppearId","wantsHandoff","MotionHandoffIsComplete","MotionIsMounted","MotionHandoffMarkAsComplete","allowProjection","createMotionComponent","preloadedFeatures","loadFeatures","useVisualState","MotionDOMComponent","MeasureLayout","configAndProps","useLayoutId","layoutProjection","combined","ProjectionNode","getProjectionFunctionality","_jsxs","Provider","_jsx","displayName","ForwardRefMotionComponent","forwardRef","layoutGroupId","createDomVisualElement","updateAnimationControlsSubscription","unmountControls","subscribe","prevAnimate","isExitComplete","prevIsPresent","exitAnimation","register","extractEventInfo","pageX","pageY","addPointerEvent","addPointerInfo","getContextWindow","ownerDocument","defaultView","overflowStyles","PanSession","handlers","contextWindow","dragSnapToOrigin","distanceThreshold","lastMoveEvent","lastMoveEventInfo","lastRawMoveEventInfo","scrollPositions","removeScrollListeners","onElementScroll","handleScroll","onWindowScroll","updatePoint","getPanInfo","history","isPanStarted","isDistancePastThreshold","xDelta","yDelta","distance2D","onStart","onMove","handlePointerMove","handlePointerUp","end","onEnd","onSessionEnd","resumeAnimation","panInfo","initialInfo","onSessionStart","removeListeners","startScrollTracking","overflowX","overflowY","scrollX","scrollY","capture","isWindow","updateHandlers","subtractPoint","lastDevicePoint","startDevicePoint","timeDelta","timestampedPoint","lastPoint","calcRelativeAxisConstraints","calcViewportAxisConstraints","layoutAxis","constraintsAxis","defaultElastic","resolveAxisElastic","dragElastic","minLabel","maxLabel","resolvePointElastic","label","elementDragControls","VisualElementDragControls","openDragLock","currentDirection","constraints","hasMutatedConstraints","elastic","latestPointerEvent","latestPanInfo","originEvent","snapToCursor","panSession","stopAnimation","dragPropagation","onDragStart","resolveConstraints","getAxisMotionValue","measuredAxis","dragDirectionLock","onDirectionLock","onDrag","lockThreshold","getCurrentDirection","updateAxis","snap","finalEvent","finalPanInfo","onDragEnd","endPanSession","_point","shouldDrag","axisValue","applyConstraints","prevConstraints","resolveRefConstraints","calcRelativeConstraints","resolveDragElastic","relativeConstraints","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","constraintsBox","viewportBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","startAxisValueAnimation","dragKey","externalMotionValue","scalePositionWithinConstraints","boxProgress","sourceLength","targetLength","calcProgress","calcOrigin","addListeners","stopPointerListener","isClickingTextInputChild","isElementTextInput","stopResizeObservers","measureDragConstraints","onResize","stopElement","skipFirstCall","stopContainer","startResizeObservers","stopMeasureLayoutListener","stopResizeListener","stopLayoutUpdateListener","isFirst","asyncHandler","hasTakenAnySnapshot","MeasureLayoutWithContext","componentDidMount","layoutGroup","switchLayoutGroup","group","safeToRemove","getSnapshotBeforeUpdate","componentDidUpdate","componentWillUnmount","promoteContext","deregister","useId","usePresence","removePointerDownListener","onPointerDown","pointerDownEvent","session","createPanHandlers","onPanSessionStart","onPanStart","onPan","onPanEnd","removeGroupControls","controls","dragControls","prevDragControls","handleHoverEvent","lifecycle","handlePressEvent","HTMLButtonElement","disabled","observerCallbacks","observers","fireObserverCallback","entry","fireAllObserverCallbacks","observeIntersection","rootInteresectionObserver","lookupRoot","rootObservers","JSON","stringify","IntersectionObserver","initIntersectionObserver","thresholdNames","featureBundle","hasEnteredView","isInView","startObserver","stopObserver","viewport","rootMargin","amount","once","threshold","isIntersecting","onViewportEnter","onViewportLeave","prevViewport","hasViewportOptionChanged","globalTapTarget","propagate","_element","onFocus","isFocusVisible","onBlur","createMotionComponentWithFeatures","MotionDiv"],"mappings":"yRAAA,SAASA,EAAcC,EAAKC,IACE,IAAtBD,EAAIE,QAAQD,IACZD,EAAIG,KAAKF,EACjB,CACA,SAASG,EAAWJ,EAAKC,GACrB,MAAMI,EAAQL,EAAIE,QAAQD,GACtBI,GAAQ,GACRL,EAAIM,OAAOD,EAAO,EAC1B,CCRA,MAAME,EAAQ,CAACC,EAAKC,EAAKC,IACjBA,EAAID,EACGA,EACPC,EAAIF,EACGA,EACJE,ECLX,SAASC,EAAmBC,EAASC,GACjC,OAAOA,EACD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EACpB,CACA,MAAA8pB,GACSh1D,KAAKkrC,UAAalrC,KAAKwjC,KAAKtU,iBAEjClvB,KAAKwjC,KAAKtU,eAAemd,UAAU,cAAc,GACjDrsC,KAAKkrC,UAAW,EACpB,CACA,KAAA5L,GACIt/B,KAAKigC,QAAU5gC,EAAKqwC,GAAY1vC,KAAKwjC,KAAK/uB,QAAS,QAAS,IAAMzU,KAAK80D,WAAYplB,GAAY1vC,KAAKwjC,KAAK/uB,QAAS,OAAQ,IAAMzU,KAAKg1D,UACzI,CACA,OAAA/0B,GAAY,IFrBZvI,MAAO,CACH4J,QJFD,cAA2BA,GAC9B,KAAAhC,GACI,MAAM7qB,QAAEA,GAAYzU,KAAKwjC,KACpB/uB,IAELzU,KAAKigC,QAAUvI,GAAMjjB,EAAS,CAACogD,EAAU76B,KACrCy4B,GAAiBzyD,KAAKwjC,KAAMxJ,EAAY,SAChCK,GAAao4B,GAAiBzyD,KAAKwjC,KAAMnJ,EAAU,SAEnE,CACA,OAAA4F,GAAY,QKhBTugB,MELe,CAClBjZ,OAAQ,CACJsf,eAAgBnH,GAChB8G,oBCFD,SAASyO,GAAkC7T,EAAW5vC,GACzD,OAAO20C,GAAsB/E,EAAW5vC,EAASoiD,GAAetM,GACpE,CC6BO,MCjCM4N,GDiC0B/O,GAAsB"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-scroll.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-scroll.js deleted file mode 100644 index f9a21689..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-scroll.js +++ /dev/null @@ -1,2 +0,0 @@ -const e=(e,t,n)=>n>t?t:n{},r=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(n=(e,n,r)=>{e||"undefined"==typeof console||console.warn(t(n,r))},r=(e,n,r)=>{if(!e)throw new Error(t(n,r))});const s={},o=e=>"object"==typeof e&&null!==e;const i=e=>e,a=(...e)=>e.reduce((e,t)=>n=>t(e(n))),c=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1},l=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function u(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=l.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,s=!1;const o=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(c.schedule(t),e()),t(i)}const c={schedule:(e,s=!1,i=!1)=>{const a=i&&r?t:n;return s&&o.add(e),a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(i=e,r)return void(s=!0);r=!0;const o=t;t=n,n=o,t.forEach(a),t.clear(),r=!1,s&&(s=!1,c.process(e))}};return c}(i),e),{}),{setup:c,read:u,resolveKeyframes:f,preUpdate:d,update:g,preRender:h,render:p,postRender:m}=a,v=()=>{const i=s.useManualTiming,a=i?o.timestamp:performance.now();n=!1,i||(o.delta=r?1e3/60:Math.max(Math.min(a-o.timestamp,40),1)),o.timestamp=a,o.isProcessing=!0,c.process(o),u.process(o),f.process(o),d.process(o),g.process(o),h.process(o),p.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(v))};return{schedule:l.reduce((t,s)=>{const i=a[s];return t[s]=(t,s=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(v)),i.schedule(t,s,a)),t},{}),cancel:e=>{for(let t=0;tt=>"string"==typeof t&&t.startsWith(e))("var(--"),p=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,m={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},v={...m,transform:t=>e(0,1,t)},y=e=>Math.round(1e5*e)/1e5,w=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const b=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,x=(e,t)=>n=>Boolean("string"==typeof n&&b.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),E=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[s,o,i,a]=r.match(w);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==a?parseFloat(a):1}},W={...m,transform:t=>Math.round((t=>e(0,255,t))(t))},L={test:x("rgb","red"),parse:E("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+W.transform(e)+", "+W.transform(t)+", "+W.transform(n)+", "+y(v.transform(r))+")"};const A={test:x("#"),parse:function(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}},transform:L.transform},S=(e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}))("%"),M={test:x("hsl","hue"),parse:E("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+S.transform(y(t))+", "+S.transform(y(n))+", "+y(v.transform(r))+")"},B={test:e=>L.test(e)||A.test(e)||M.test(e),parse:e=>L.test(e)?L.parse(e):M.test(e)?M.parse(e):A.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?L.transform(e):M.transform(e),getAnimatableNone:e=>{const t=B.parse(e);return t.alpha=0,B.transform(t)}},T=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const $="number",O="color",H=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function z(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const i=t.replace(H,e=>(B.test(e)?(r.color.push(o),s.push(O),n.push(B.parse(e))):e.startsWith("var(")?(r.var.push(o),s.push("var"),n.push(e)):(r.number.push(o),s.push($),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:i,indexes:r,types:s}}function F({split:e,types:t}){const n=e.length;return r=>{let s="";for(let o=0;o{return"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof(n=e)?0:B.test(n)?B.getAnimatableNone(n):n;var n};const k={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(w)?.length||0)+(e.match(T)?.length||0)>0},parse:function(e){return z(e).values},createTransformer:function(e){return F(z(e))},getAnimatableNone:function(e){const t=z(e);return F(t)(t.values.map((e,n)=>N(e,t.split[n])))}};function P(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function R(e,t){return n=>n>0?t:e}const q=(e,t,n)=>e+(t-e)*n,V=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},j=[A,L,M];function U(e){const t=(r=e,j.find(e=>e.test(r)));var r;if(n(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let s=t.parse(e);return t===M&&(s=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let s=0,o=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;s=P(a,r,e+1/3),o=P(a,r,e),i=P(a,r,e-1/3)}else s=o=i=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*i),alpha:r}}(s)),s}const C=(e,t)=>{const n=U(e),r=U(t);if(!n||!r)return R(e,t);const s={...n};return e=>(s.red=V(n.red,r.red,e),s.green=V(n.green,r.green,e),s.blue=V(n.blue,r.blue,e),s.alpha=q(n.alpha,r.alpha,e),L.transform(s))},G=new Set(["none","hidden"]);function I(e,t){return n=>q(e,t,n)}function D(e){return"number"==typeof e?I:"string"==typeof e?h(t=e)&&p.test(t.split("/*")[0].trim())?R:B.test(e)?C:J:Array.isArray(e)?K:"object"==typeof e?B.test(e)?C:_:R;var t}function K(e,t){const n=[...e],r=n.length,s=e.map((e,n)=>D(e)(e,t[n]));return e=>{for(let t=0;t{for(const t in r)n[t]=r[t](e);return n}}const J=(e,t)=>{const r=k.createTransformer(t),s=z(e),o=z(t);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?G.has(e)&&!o.values.length||G.has(t)&&!s.values.length?function(e,t){return G.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):a(K(function(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;sn[0];if(2===f&&n[0]===n[1])return()=>n[1];const d=t[0]===t[1];t[0]>t[f-1]&&(t=[...t].reverse(),n=[...n].reverse());const g=function(e,t,n){const r=[],o=n||s.mix||Q,c=e.length-1;for(let n=0;n{if(d&&e1)for(;rp(e(t[0],t[f-1],n)):p}function Y(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=c(0,t,r);e.push(q(n,1,s))}}(t,e.length-1),t}const Z={};function ee(e,t){const n=function(e){let t;return()=>(void 0===t&&(t=e()),t)}(e);return()=>Z[t]??n()}const te=ee(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),ne=ee(()=>void 0!==window.ViewTimeline,"viewTimeline");function re(e){return o(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const se=new WeakMap;let oe;const ie=(e,t,n)=>(r,s)=>{return s&&s[0]?s[0][e+"Size"]:o(i=r)&&"ownerSVGElement"in i&&"getBBox"in r?r.getBBox()[t]:r[n];var i},ae=ie("inline","width","offsetWidth"),ce=ie("block","height","offsetHeight");function le({target:e,borderBoxSize:t}){se.get(e)?.forEach(n=>{n(e,{get width(){return ae(e,t)},get height(){return ce(e,t)}})})}function ue(e){e.forEach(le)}function fe(e,t){oe||"undefined"!=typeof ResizeObserver&&(oe=new ResizeObserver(ue));const n=function(e){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){const t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e).filter(e=>null!=e)}(e);return n.forEach(e=>{let n=se.get(e);n||(n=new Set,se.set(e,n)),n.add(t),oe?.observe(e)}),()=>{n.forEach(e=>{const n=se.get(e);n?.delete(t),n?.size||oe?.unobserve(e)})}}const de=new Set;let ge;function he(e){return de.add(e),ge||(ge=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};de.forEach(t=>t(e))},window.addEventListener("resize",ge)),()=>{de.delete(e),de.size||"function"!=typeof ge||(window.removeEventListener("resize",ge),ge=void 0)}}function pe(e,t){let n;const r=()=>{const{currentTime:r}=t,s=(null===r?0:r.value)/100;n!==s&&e(s),n=s};return f.preUpdate(r,!0),()=>d(r)}function me(e){return"undefined"!=typeof window&&(e?ne():te())}const ve={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ye(e,t,n,r){const s=n[t],{length:o,position:i}=ve[t],a=s.current,l=n.time;s.current=Math.abs(e[`scroll${i}`]),s.scrollLength=e[`scroll${o}`]-e[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=c(0,s.scrollLength,s.current);const u=r-l;var f,d;s.velocity=u>50?0:(f=s.current-a,(d=u)?f*(1e3/d):0)}const we={start:0,center:.5,end:1};function be(e,t,n=0){let r=0;if(e in we&&(e=we[e]),"string"==typeof e){const t=parseFloat(e);e.endsWith("px")?r=t:e.endsWith("%")?e=t/100:e.endsWith("vw")?r=t/100*document.documentElement.clientWidth:e.endsWith("vh")?r=t/100*document.documentElement.clientHeight:e=t}return"number"==typeof e&&(r=t*e),n+r}const xe=[0,0];function Ee(e,t,n,r){let s=Array.isArray(e)?e:xe,o=0,i=0;return"number"==typeof e?s=[e,e]:"string"==typeof e&&(s=(e=e.trim()).includes(" ")?e.split(" "):[e,we[e]?e:"0"]),o=be(s[0],n,r),i=be(s[1],t),o-i}const We={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Le={x:0,y:0};function Ae(t,n,r){const{offset:s=We.All}=r,{target:o=t,axis:i="y"}=r,a="y"===i?"height":"width",c=o!==t?function(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(re(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if("svg"===r.tagName){const e=r.getBoundingClientRect();r=r.parentElement;const t=r.getBoundingClientRect();n.x+=e.left-t.left,n.y+=e.top-t.top}else{if(!(r instanceof SVGGraphicsElement))break;{const{x:e,y:t}=r.getBBox();n.x+=e,n.y+=t;let s=null,o=r.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=r.parentNode;r=s}}return n}(o,t):Le,l=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(e){return"getBBox"in e&&"svg"!==e.tagName?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}(o),u={width:t.clientWidth,height:t.clientHeight};n[i].offset.length=0;let f=!n[i].interpolate;const d=s.length;for(let e=0;e{!function(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}(e,r.target,n),function(e,t,n){ye(e,"x",t,n),ye(e,"y",t,n),t.time=n}(e,n,t),(r.offset||r.target)&&Ae(e,n,r)},notify:()=>t(n)}}const Me=new WeakMap,Be=new WeakMap,Te=new WeakMap,$e=new WeakMap,Oe=new WeakMap,He=e=>e===document.scrollingElement?window:e;function ze(e,{container:t=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!t)return i;let s=Te.get(t);s||(s=new Set,Te.set(t,s));const o=Se(t,e,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},r);if(s.add(o),!Me.has(t)){const e=()=>{for(const e of s)e.measure(g.timestamp);f.preUpdate(n)},n=()=>{for(const e of s)e.notify()},r=()=>f.read(e);Me.set(t,r);const o=He(t);window.addEventListener("resize",r),t!==document.documentElement&&Be.set(t,(c=r,"function"==typeof(a=t)?he(a):fe(a,c))),o.addEventListener("scroll",r),r()}var a,c;if(n&&!Oe.has(t)){const e=Me.get(t),n={width:t.scrollWidth,height:t.scrollHeight};$e.set(t,n);const r=()=>{const r=t.scrollWidth,s=t.scrollHeight;n.width===r&&n.height===s||(e(),n.width=r,n.height=s)},s=f.read(r,!0);Oe.set(t,s)}const l=Me.get(t);return f.read(l,!1,!0),()=>{d(l);const e=Te.get(t);if(!e)return;if(e.delete(o),e.size)return;const n=Me.get(t);Me.delete(t),n&&(He(t).removeEventListener("scroll",n),Be.get(t)?.(),window.removeEventListener("resize",n));const r=Oe.get(t);r&&(d(r),Oe.delete(t)),$e.delete(t)}}const Fe=[[We.Enter,"entry"],[We.Exit,"exit"],[We.Any,"cover"],[We.All,"contain"]],Ne={start:0,end:1};function ke(e){const t=e.trim().split(/\s+/);if(2!==t.length)return;const n=Ne[t[0]],r=Ne[t[1]];return void 0!==n&&void 0!==r?[n,r]:void 0}function Pe(e,t){const n=function(e){if(2!==e.length)return;const t=[];for(const n of e)if(Array.isArray(n))t.push(n);else{if("string"!=typeof n)return;{const e=ke(n);if(!e)return;t.push(e)}}return t}(e);if(!n)return!1;for(let e=0;e<2;e++){const r=n[e],s=t[e];if(r[0]!==s[0]||r[1]!==s[1])return!1}return!0}function Re(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,n]of Fe)if(Pe(e,t))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const qe=new Map;function Ve(e){const t={value:0},n=ze(n=>{t.value=100*n[e.axis].progress},e);return{currentTime:t,cancel:n}}function je({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);let s=qe.get(t);s||(s=new Map,qe.set(t,s));const o=n.target??"self";let i=s.get(o);i||(i={},s.set(o,i));const a=r+(n.offset??[]).join(",");if(!i[a])if(n.target&&me(n.target)){const e=Re(n.offset);i[a]=e?new ViewTimeline({subject:n.target,axis:r}):Ve({container:t,...n})}else me()?i[a]=new ScrollTimeline({source:t,axis:r}):i[a]=Ve({container:t,...n});return i[a]}function Ue(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return i;const s={axis:t,container:n,...r};return"function"==typeof e?function(e,t){return function(e){return 2===e.length}(e)||function(e){return e&&(e.target||e.offset)}(t)?ze(n=>{e(n[t.axis].progress,n)},t):pe(e,je(t))}(e,s):function(e,t){const n=je(t),r=t.target?Re(t.offset):void 0,s=t.target?me(t.target)&&!!r:me();return e.attachTimeline({timeline:s?n:void 0,...r&&s&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:e=>(e.pause(),pe(t=>{e.time=e.iterationDuration*t},n))})}(e,s)}export{Ue as scroll}; -//# sourceMappingURL=size-rollup-scroll.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-scroll.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-scroll.js.map deleted file mode 100644 index 0fc99bb8..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-scroll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"size-rollup-scroll.js","sources":["../../motion-utils/dist/es/clamp.mjs","../../motion-utils/dist/es/format-error-message.mjs","../../motion-utils/dist/es/errors.mjs","../../motion-utils/dist/es/global-config.mjs","../../motion-utils/dist/es/is-object.mjs","../../motion-utils/dist/es/noop.mjs","../../motion-utils/dist/es/pipe.mjs","../../motion-utils/dist/es/progress.mjs","../../motion-dom/dist/es/frameloop/order.mjs","../../motion-dom/dist/es/frameloop/batcher.mjs","../../motion-dom/dist/es/frameloop/render-step.mjs","../../motion-dom/dist/es/frameloop/frame.mjs","../../motion-dom/dist/es/animation/utils/is-css-variable.mjs","../../motion-dom/dist/es/value/types/numbers/index.mjs","../../motion-dom/dist/es/value/types/utils/sanitize.mjs","../../motion-dom/dist/es/value/types/utils/float-regex.mjs","../../motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../../motion-dom/dist/es/value/types/color/utils.mjs","../../motion-dom/dist/es/value/types/utils/is-nullish.mjs","../../motion-dom/dist/es/value/types/color/rgba.mjs","../../motion-dom/dist/es/value/types/color/hex.mjs","../../motion-dom/dist/es/value/types/numbers/units.mjs","../../motion-dom/dist/es/value/types/color/hsla.mjs","../../motion-dom/dist/es/value/types/color/index.mjs","../../motion-dom/dist/es/value/types/utils/color-regex.mjs","../../motion-dom/dist/es/value/types/complex/index.mjs","../../motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../../motion-dom/dist/es/utils/mix/immediate.mjs","../../motion-dom/dist/es/utils/mix/number.mjs","../../motion-dom/dist/es/utils/mix/color.mjs","../../motion-dom/dist/es/utils/mix/visibility.mjs","../../motion-dom/dist/es/utils/mix/complex.mjs","../../motion-dom/dist/es/utils/mix/index.mjs","../../motion-dom/dist/es/utils/interpolate.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../../motion-dom/dist/es/utils/supports/flags.mjs","../../motion-dom/dist/es/utils/supports/memo.mjs","../../motion-utils/dist/es/memo.mjs","../../motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../../motion-dom/dist/es/utils/is-html-element.mjs","../../motion-dom/dist/es/resize/handle-element.mjs","../../motion-dom/dist/es/utils/is-svg-element.mjs","../../motion-dom/dist/es/utils/resolve-elements.mjs","../../motion-dom/dist/es/resize/handle-window.mjs","../../motion-dom/dist/es/scroll/observe.mjs","../lib/render/dom/scroll/utils/can-use-native-timeline.js","../lib/render/dom/scroll/info.js","../../motion-utils/dist/es/velocity-per-second.mjs","../lib/render/dom/scroll/offsets/edge.js","../lib/render/dom/scroll/offsets/offset.js","../lib/render/dom/scroll/offsets/presets.js","../lib/render/dom/scroll/offsets/index.js","../lib/render/dom/scroll/offsets/inset.js","../lib/render/dom/scroll/on-scroll-handler.js","../lib/render/dom/scroll/track.js","../../motion-dom/dist/es/resize/index.mjs","../lib/render/dom/scroll/utils/offset-to-range.js","../lib/render/dom/scroll/utils/get-timeline.js","../lib/render/dom/scroll/index.js","../lib/render/dom/scroll/attach-function.js","../lib/render/dom/scroll/utils/is-element-tracking.js","../lib/render/dom/scroll/attach-animation.js"],"sourcesContent":["const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n//# sourceMappingURL=clamp.mjs.map\n","function formatErrorMessage(message, errorCode) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message;\n}\n\nexport { formatErrorMessage };\n//# sourceMappingURL=format-error-message.mjs.map\n","import { formatErrorMessage } from './format-error-message.mjs';\n\nlet warning = () => { };\nlet invariant = () => { };\nif (typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\") {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode));\n }\n };\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode));\n }\n };\n}\n\nexport { invariant, warning };\n//# sourceMappingURL=errors.mjs.map\n","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n//# sourceMappingURL=global-config.mjs.map\n","const isObject = (value) => typeof value === \"object\" && value !== null;\n\nexport { isObject };\n//# sourceMappingURL=is-object.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n//# sourceMappingURL=noop.mjs.map\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));\n\nexport { pipe };\n//# sourceMappingURL=pipe.mjs.map\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst progress = (from, to, value) => {\n const range = to - from;\n return range ? (value - from) / range : 1;\n};\n\nexport { progress };\n//# sourceMappingURL=progress.mjs.map\n","const stepsOrder = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n\nexport { stepsOrder };\n//# sourceMappingURL=order.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming;\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n//# sourceMappingURL=batcher.mjs.map\n","import { statsBuffer } from '../stats/buffer.mjs';\n\nfunction createRenderStep(runNextFrame, stepName) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n let numCalls = 0;\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n numCalls++;\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame;\n thisFrame = nextFrame;\n nextFrame = prevFrame;\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n /**\n * If we're recording stats then\n */\n if (stepName && statsBuffer.value) {\n statsBuffer.value.frameloop[stepName].push(numCalls);\n }\n numCalls = 0;\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n//# sourceMappingURL=render-step.mjs.map\n","import { noop } from 'motion-utils';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\n//# sourceMappingURL=frame.mjs.map\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nfunction containsCSSVariable(value) {\n if (typeof value !== \"string\")\n return false;\n // Strip comments to avoid false positives\n return value.split(\"/*\")[0].includes(\"var(--\");\n}\n\nexport { containsCSSVariable, isCSSVariableName, isCSSVariableToken };\n//# sourceMappingURL=is-css-variable.mjs.map\n","import { clamp } from 'motion-utils';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n//# sourceMappingURL=index.mjs.map\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n//# sourceMappingURL=sanitize.mjs.map\n","const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n//# sourceMappingURL=float-regex.mjs.map\n","const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n//# sourceMappingURL=single-color-regex.mjs.map\n","import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n//# sourceMappingURL=utils.mjs.map\n","function isNullish(v) {\n return v == null;\n}\n\nexport { isNullish };\n//# sourceMappingURL=is-nullish.mjs.map\n","import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n//# sourceMappingURL=rgba.mjs.map\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n//# sourceMappingURL=hex.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n}))();\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n//# sourceMappingURL=units.mjs.map\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n//# sourceMappingURL=hsla.mjs.map\n","import { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n getAnimatableNone: (v) => {\n const parsed = color.parse(v);\n parsed.alpha = 0;\n return color.transform(parsed);\n },\n};\n\nexport { color };\n//# sourceMappingURL=index.mjs.map\n","const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n//# sourceMappingURL=color-regex.mjs.map\n","import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (v.match(floatRegex)?.length || 0) +\n (v.match(colorRegex)?.length || 0) >\n 0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction buildTransformer({ split, types }) {\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nfunction createTransformer(source) {\n return buildTransformer(analyseComplexValue(source));\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (value, splitBefore) => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0;\n }\n return convertNumbersToZero(value);\n};\nfunction getAnimatableNone(v) {\n const info = analyseComplexValue(v);\n const transformer = buildTransformer(info);\n return transformer(info.values.map((value, i) => convertToZero(value, info.split[i])));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n//# sourceMappingURL=index.mjs.map\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n//# sourceMappingURL=hsla-to-rgba.mjs.map\n","function mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n//# sourceMappingURL=immediate.mjs.map\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n//# sourceMappingURL=number.mjs.map\n","import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, \"color-not-animatable\");\n if (!Boolean(type))\n return false;\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n//# sourceMappingURL=color.mjs.map\n","const invisibleValues = new Set([\"none\", \"hidden\"]);\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nfunction mixVisibility(origin, target) {\n if (invisibleValues.has(origin)) {\n return (p) => (p <= 0 ? origin : target);\n }\n else {\n return (p) => (p >= 1 ? target : origin);\n }\n}\n\nexport { invisibleValues, mixVisibility };\n//# sourceMappingURL=visibility.mjs.map\n","import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = origin.values[originIndex] ?? 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, \"complex-values-different\");\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n//# sourceMappingURL=complex.mjs.map\n","import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\nfunction mix(from, to, p) {\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n//# sourceMappingURL=index.mjs.map\n","import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\", \"range-length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n//# sourceMappingURL=interpolate.mjs.map\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n//# sourceMappingURL=default.mjs.map\n","import { progress } from 'motion-utils';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n//# sourceMappingURL=fill.mjs.map\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {};\n\nexport { supportsFlags };\n//# sourceMappingURL=flags.mjs.map\n","import { memo } from 'motion-utils';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => supportsFlags[supportsFlag] ?? memoized();\n}\n\nexport { memoSupports };\n//# sourceMappingURL=memo.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n//# sourceMappingURL=memo.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, \"scrollTimeline\");\nconst supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, \"viewTimeline\");\n\nexport { supportsScrollTimeline, supportsViewTimeline };\n//# sourceMappingURL=scroll-timeline.mjs.map\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nfunction isHTMLElement(element) {\n return (isObject(element) &&\n \"offsetHeight\" in element &&\n !(\"ownerSVGElement\" in element));\n}\n\nexport { isHTMLElement };\n//# sourceMappingURL=is-html-element.mjs.map\n","import { isSVGElement } from '../utils/is-svg-element.mjs';\nimport { resolveElements } from '../utils/resolve-elements.mjs';\n\nconst resizeHandlers = new WeakMap();\nlet observer;\nconst getSize = (borderBoxAxis, svgAxis, htmlAxis) => (target, borderBoxSize) => {\n if (borderBoxSize && borderBoxSize[0]) {\n return borderBoxSize[0][(borderBoxAxis + \"Size\")];\n }\n else if (isSVGElement(target) && \"getBBox\" in target) {\n return target.getBBox()[svgAxis];\n }\n else {\n return target[htmlAxis];\n }\n};\nconst getWidth = /*@__PURE__*/ getSize(\"inline\", \"width\", \"offsetWidth\");\nconst getHeight = /*@__PURE__*/ getSize(\"block\", \"height\", \"offsetHeight\");\nfunction notifyTarget({ target, borderBoxSize }) {\n resizeHandlers.get(target)?.forEach((handler) => {\n handler(target, {\n get width() {\n return getWidth(target, borderBoxSize);\n },\n get height() {\n return getHeight(target, borderBoxSize);\n },\n });\n });\n}\nfunction notifyAll(entries) {\n entries.forEach(notifyTarget);\n}\nfunction createResizeObserver() {\n if (typeof ResizeObserver === \"undefined\")\n return;\n observer = new ResizeObserver(notifyAll);\n}\nfunction resizeElement(target, handler) {\n if (!observer)\n createResizeObserver();\n const elements = resolveElements(target);\n elements.forEach((element) => {\n let elementHandlers = resizeHandlers.get(element);\n if (!elementHandlers) {\n elementHandlers = new Set();\n resizeHandlers.set(element, elementHandlers);\n }\n elementHandlers.add(handler);\n observer?.observe(element);\n });\n return () => {\n elements.forEach((element) => {\n const elementHandlers = resizeHandlers.get(element);\n elementHandlers?.delete(handler);\n if (!elementHandlers?.size) {\n observer?.unobserve(element);\n }\n });\n };\n}\n\nexport { resizeElement };\n//# sourceMappingURL=handle-element.mjs.map\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nfunction isSVGElement(element) {\n return isObject(element) && \"ownerSVGElement\" in element;\n}\n\nexport { isSVGElement };\n//# sourceMappingURL=is-svg-element.mjs.map\n","function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector == null) {\n return [];\n }\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector).filter((element) => element != null);\n}\n\nexport { resolveElements };\n//# sourceMappingURL=resolve-elements.mjs.map\n","const windowCallbacks = new Set();\nlet windowResizeHandler;\nfunction createWindowResizeHandler() {\n windowResizeHandler = () => {\n const info = {\n get width() {\n return window.innerWidth;\n },\n get height() {\n return window.innerHeight;\n },\n };\n windowCallbacks.forEach((callback) => callback(info));\n };\n window.addEventListener(\"resize\", windowResizeHandler);\n}\nfunction resizeWindow(callback) {\n windowCallbacks.add(callback);\n if (!windowResizeHandler)\n createWindowResizeHandler();\n return () => {\n windowCallbacks.delete(callback);\n if (!windowCallbacks.size &&\n typeof windowResizeHandler === \"function\") {\n window.removeEventListener(\"resize\", windowResizeHandler);\n windowResizeHandler = undefined;\n }\n };\n}\n\nexport { resizeWindow };\n//# sourceMappingURL=handle-window.mjs.map\n","import { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nfunction observeTimeline(update, timeline) {\n let prevProgress;\n const onFrame = () => {\n const { currentTime } = timeline;\n const percentage = currentTime === null ? 0 : currentTime.value;\n const progress = percentage / 100;\n if (prevProgress !== progress) {\n update(progress);\n }\n prevProgress = progress;\n };\n frame.preUpdate(onFrame, true);\n return () => cancelFrame(onFrame);\n}\n\nexport { observeTimeline };\n//# sourceMappingURL=observe.mjs.map\n","import { supportsScrollTimeline, supportsViewTimeline } from \"motion-dom\";\nexport function canUseNativeTimeline(target) {\n if (typeof window === \"undefined\")\n return false;\n return target ? supportsViewTimeline() : supportsScrollTimeline();\n}\n//# sourceMappingURL=can-use-native-timeline.js.map","import { progress, velocityPerSecond } from \"motion-utils\";\n/**\n * A time in milliseconds, beyond which we consider the scroll velocity to be 0.\n */\nconst maxElapsed = 50;\nconst createAxisInfo = () => ({\n current: 0,\n offset: [],\n progress: 0,\n scrollLength: 0,\n targetOffset: 0,\n targetLength: 0,\n containerLength: 0,\n velocity: 0,\n});\nexport const createScrollInfo = () => ({\n time: 0,\n x: createAxisInfo(),\n y: createAxisInfo(),\n});\nconst keys = {\n x: {\n length: \"Width\",\n position: \"Left\",\n },\n y: {\n length: \"Height\",\n position: \"Top\",\n },\n};\nfunction updateAxisInfo(element, axisName, info, time) {\n const axis = info[axisName];\n const { length, position } = keys[axisName];\n const prev = axis.current;\n const prevTime = info.time;\n axis.current = Math.abs(element[`scroll${position}`]);\n axis.scrollLength = element[`scroll${length}`] - element[`client${length}`];\n axis.offset.length = 0;\n axis.offset[0] = 0;\n axis.offset[1] = axis.scrollLength;\n axis.progress = progress(0, axis.scrollLength, axis.current);\n const elapsed = time - prevTime;\n axis.velocity =\n elapsed > maxElapsed\n ? 0\n : velocityPerSecond(axis.current - prev, elapsed);\n}\nexport function updateScrollInfo(element, info, time) {\n updateAxisInfo(element, \"x\", info, time);\n updateAxisInfo(element, \"y\", info, time);\n info.time = time;\n}\n//# sourceMappingURL=info.js.map","/*\n Convert velocity into velocity per second\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0;\n\nexport { velocityPerSecond };\n//# sourceMappingURL=velocity-per-second.mjs.map\n","export const namedEdges = {\n start: 0,\n center: 0.5,\n end: 1,\n};\nexport function resolveEdge(edge, length, inset = 0) {\n let delta = 0;\n /**\n * If we have this edge defined as a preset, replace the definition\n * with the numerical value.\n */\n if (edge in namedEdges) {\n edge = namedEdges[edge];\n }\n /**\n * Handle unit values\n */\n if (typeof edge === \"string\") {\n const asNumber = parseFloat(edge);\n if (edge.endsWith(\"px\")) {\n delta = asNumber;\n }\n else if (edge.endsWith(\"%\")) {\n edge = asNumber / 100;\n }\n else if (edge.endsWith(\"vw\")) {\n delta = (asNumber / 100) * document.documentElement.clientWidth;\n }\n else if (edge.endsWith(\"vh\")) {\n delta = (asNumber / 100) * document.documentElement.clientHeight;\n }\n else {\n edge = asNumber;\n }\n }\n /**\n * If the edge is defined as a number, handle as a progress value.\n */\n if (typeof edge === \"number\") {\n delta = length * edge;\n }\n return inset + delta;\n}\n//# sourceMappingURL=edge.js.map","import { namedEdges, resolveEdge } from \"./edge\";\nconst defaultOffset = [0, 0];\nexport function resolveOffset(offset, containerLength, targetLength, targetInset) {\n let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset;\n let targetPoint = 0;\n let containerPoint = 0;\n if (typeof offset === \"number\") {\n /**\n * If we're provided offset: [0, 0.5, 1] then each number x should become\n * [x, x], so we default to the behaviour of mapping 0 => 0 of both target\n * and container etc.\n */\n offsetDefinition = [offset, offset];\n }\n else if (typeof offset === \"string\") {\n offset = offset.trim();\n if (offset.includes(\" \")) {\n offsetDefinition = offset.split(\" \");\n }\n else {\n /**\n * If we're provided a definition like \"100px\" then we want to apply\n * that only to the top of the target point, leaving the container at 0.\n * Whereas a named offset like \"end\" should be applied to both.\n */\n offsetDefinition = [offset, namedEdges[offset] ? offset : `0`];\n }\n }\n targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset);\n containerPoint = resolveEdge(offsetDefinition[1], containerLength);\n return targetPoint - containerPoint;\n}\n//# sourceMappingURL=offset.js.map","export const ScrollOffset = {\n Enter: [\n [0, 1],\n [1, 1],\n ],\n Exit: [\n [0, 0],\n [1, 0],\n ],\n Any: [\n [1, 0],\n [0, 1],\n ],\n All: [\n [0, 0],\n [1, 1],\n ],\n};\n//# sourceMappingURL=presets.js.map","import { defaultOffset, interpolate } from \"motion-dom\";\nimport { clamp } from \"motion-utils\";\nimport { calcInset } from \"./inset\";\nimport { resolveOffset } from \"./offset\";\nimport { ScrollOffset } from \"./presets\";\nconst point = { x: 0, y: 0 };\nfunction getTargetSize(target) {\n return \"getBBox\" in target && target.tagName !== \"svg\"\n ? target.getBBox()\n : { width: target.clientWidth, height: target.clientHeight };\n}\nexport function resolveOffsets(container, info, options) {\n const { offset: offsetDefinition = ScrollOffset.All } = options;\n const { target = container, axis = \"y\" } = options;\n const lengthLabel = axis === \"y\" ? \"height\" : \"width\";\n const inset = target !== container ? calcInset(target, container) : point;\n /**\n * Measure the target and container. If they're the same thing then we\n * use the container's scrollWidth/Height as the target, from there\n * all other calculations can remain the same.\n */\n const targetSize = target === container\n ? { width: container.scrollWidth, height: container.scrollHeight }\n : getTargetSize(target);\n const containerSize = {\n width: container.clientWidth,\n height: container.clientHeight,\n };\n /**\n * Reset the length of the resolved offset array rather than creating a new one.\n * TODO: More reusable data structures for targetSize/containerSize would also be good.\n */\n info[axis].offset.length = 0;\n /**\n * Populate the offset array by resolving the user's offset definition into\n * a list of pixel scroll offets.\n */\n let hasChanged = !info[axis].interpolate;\n const numOffsets = offsetDefinition.length;\n for (let i = 0; i < numOffsets; i++) {\n const offset = resolveOffset(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]);\n if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) {\n hasChanged = true;\n }\n info[axis].offset[i] = offset;\n }\n /**\n * If the pixel scroll offsets have changed, create a new interpolator function\n * to map scroll value into a progress.\n */\n if (hasChanged) {\n info[axis].interpolate = interpolate(info[axis].offset, defaultOffset(offsetDefinition), { clamp: false });\n info[axis].interpolatorOffsets = [...info[axis].offset];\n }\n info[axis].progress = clamp(0, 1, info[axis].interpolate(info[axis].current));\n}\n//# sourceMappingURL=index.js.map","import { isHTMLElement } from \"motion-dom\";\nexport function calcInset(element, container) {\n const inset = { x: 0, y: 0 };\n let current = element;\n while (current && current !== container) {\n if (isHTMLElement(current)) {\n inset.x += current.offsetLeft;\n inset.y += current.offsetTop;\n current = current.offsetParent;\n }\n else if (current.tagName === \"svg\") {\n /**\n * This isn't an ideal approach to measuring the offset of tags.\n * It would be preferable, given they behave like HTMLElements in most ways\n * to use offsetLeft/Top. But these don't exist on . Likewise we\n * can't use .getBBox() like most SVG elements as these provide the offset\n * relative to the SVG itself, which for is usually 0x0.\n */\n const svgBoundingBox = current.getBoundingClientRect();\n current = current.parentElement;\n const parentBoundingBox = current.getBoundingClientRect();\n inset.x += svgBoundingBox.left - parentBoundingBox.left;\n inset.y += svgBoundingBox.top - parentBoundingBox.top;\n }\n else if (current instanceof SVGGraphicsElement) {\n const { x, y } = current.getBBox();\n inset.x += x;\n inset.y += y;\n let svg = null;\n let parent = current.parentNode;\n while (!svg) {\n if (parent.tagName === \"svg\") {\n svg = parent;\n }\n parent = current.parentNode;\n }\n current = svg;\n }\n else {\n break;\n }\n }\n return inset;\n}\n//# sourceMappingURL=inset.js.map","import { warnOnce } from \"motion-utils\";\nimport { updateScrollInfo } from \"./info\";\nimport { resolveOffsets } from \"./offsets/index\";\nfunction measure(container, target = container, info) {\n /**\n * Find inset of target within scrollable container\n */\n info.x.targetOffset = 0;\n info.y.targetOffset = 0;\n if (target !== container) {\n let node = target;\n while (node && node !== container) {\n info.x.targetOffset += node.offsetLeft;\n info.y.targetOffset += node.offsetTop;\n node = node.offsetParent;\n }\n }\n info.x.targetLength =\n target === container ? target.scrollWidth : target.clientWidth;\n info.y.targetLength =\n target === container ? target.scrollHeight : target.clientHeight;\n info.x.containerLength = container.clientWidth;\n info.y.containerLength = container.clientHeight;\n /**\n * In development mode ensure scroll containers aren't position: static as this makes\n * it difficult to measure their relative positions. The document scrolling element\n * is exempt: offsetParent measurements naturally resolve relative to the document.\n */\n if (process.env.NODE_ENV !== \"production\") {\n if (container &&\n target &&\n target !== container &&\n container !== document.documentElement &&\n container !== document.scrollingElement &&\n container !== document.body) {\n warnOnce(getComputedStyle(container).position !== \"static\", \"Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.\");\n }\n }\n}\nexport function createOnScrollHandler(element, onScroll, info, options = {}) {\n return {\n measure: (time) => {\n measure(element, options.target, info);\n updateScrollInfo(element, info, time);\n if (options.offset || options.target) {\n resolveOffsets(element, info, options);\n }\n },\n notify: () => onScroll(info),\n };\n}\n//# sourceMappingURL=on-scroll-handler.js.map","import { cancelFrame, frame, frameData, resize } from \"motion-dom\";\nimport { noop } from \"motion-utils\";\nimport { createScrollInfo } from \"./info\";\nimport { createOnScrollHandler } from \"./on-scroll-handler\";\nconst scrollListeners = new WeakMap();\nconst resizeListeners = new WeakMap();\nconst onScrollHandlers = new WeakMap();\nconst scrollSize = new WeakMap();\nconst dimensionCheckProcesses = new WeakMap();\nconst getEventTarget = (element) => element === document.scrollingElement ? window : element;\nexport function scrollInfo(onScroll, { container = document.scrollingElement, trackContentSize = false, ...options } = {}) {\n if (!container)\n return noop;\n let containerHandlers = onScrollHandlers.get(container);\n /**\n * Get the onScroll handlers for this container.\n * If one isn't found, create a new one.\n */\n if (!containerHandlers) {\n containerHandlers = new Set();\n onScrollHandlers.set(container, containerHandlers);\n }\n /**\n * Create a new onScroll handler for the provided callback.\n */\n const info = createScrollInfo();\n const containerHandler = createOnScrollHandler(container, onScroll, info, options);\n containerHandlers.add(containerHandler);\n /**\n * Check if there's a scroll event listener for this container.\n * If not, create one.\n */\n if (!scrollListeners.has(container)) {\n const measureAll = () => {\n for (const handler of containerHandlers) {\n handler.measure(frameData.timestamp);\n }\n frame.preUpdate(notifyAll);\n };\n const notifyAll = () => {\n for (const handler of containerHandlers) {\n handler.notify();\n }\n };\n const listener = () => frame.read(measureAll);\n scrollListeners.set(container, listener);\n const target = getEventTarget(container);\n window.addEventListener(\"resize\", listener);\n if (container !== document.documentElement) {\n resizeListeners.set(container, resize(container, listener));\n }\n target.addEventListener(\"scroll\", listener);\n listener();\n }\n /**\n * Enable content size tracking if requested and not already enabled.\n */\n if (trackContentSize && !dimensionCheckProcesses.has(container)) {\n const listener = scrollListeners.get(container);\n // Store initial scroll dimensions (object is reused to avoid allocation)\n const size = {\n width: container.scrollWidth,\n height: container.scrollHeight,\n };\n scrollSize.set(container, size);\n // Add frame-based scroll dimension checking to detect content changes\n const checkScrollDimensions = () => {\n const newWidth = container.scrollWidth;\n const newHeight = container.scrollHeight;\n if (size.width !== newWidth || size.height !== newHeight) {\n listener();\n size.width = newWidth;\n size.height = newHeight;\n }\n };\n // Schedule with keepAlive=true to run every frame\n const dimensionCheckProcess = frame.read(checkScrollDimensions, true);\n dimensionCheckProcesses.set(container, dimensionCheckProcess);\n }\n const listener = scrollListeners.get(container);\n frame.read(listener, false, true);\n return () => {\n cancelFrame(listener);\n /**\n * Check if we even have any handlers for this container.\n */\n const currentHandlers = onScrollHandlers.get(container);\n if (!currentHandlers)\n return;\n currentHandlers.delete(containerHandler);\n if (currentHandlers.size)\n return;\n /**\n * If no more handlers, remove the scroll listener too.\n */\n const scrollListener = scrollListeners.get(container);\n scrollListeners.delete(container);\n if (scrollListener) {\n getEventTarget(container).removeEventListener(\"scroll\", scrollListener);\n resizeListeners.get(container)?.();\n window.removeEventListener(\"resize\", scrollListener);\n }\n // Clean up scroll dimension checking\n const dimensionCheckProcess = dimensionCheckProcesses.get(container);\n if (dimensionCheckProcess) {\n cancelFrame(dimensionCheckProcess);\n dimensionCheckProcesses.delete(container);\n }\n scrollSize.delete(container);\n };\n}\n//# sourceMappingURL=track.js.map","import { resizeElement } from './handle-element.mjs';\nimport { resizeWindow } from './handle-window.mjs';\n\nfunction resize(a, b) {\n return typeof a === \"function\" ? resizeWindow(a) : resizeElement(a, b);\n}\n\nexport { resize };\n//# sourceMappingURL=index.mjs.map\n","import { ScrollOffset as ScrollOffsetPresets } from \"../offsets/presets\";\n/**\n * Maps from ProgressIntersection pairs used by Motion's preset offsets to\n * ViewTimeline named ranges. Returns undefined for unrecognised patterns,\n * which signals the caller to fall back to JS-based scroll tracking.\n */\nconst presets = [\n [ScrollOffsetPresets.Enter, \"entry\"],\n [ScrollOffsetPresets.Exit, \"exit\"],\n [ScrollOffsetPresets.Any, \"cover\"],\n [ScrollOffsetPresets.All, \"contain\"],\n];\nconst stringToProgress = {\n start: 0,\n end: 1,\n};\nfunction parseStringOffset(s) {\n const parts = s.trim().split(/\\s+/);\n if (parts.length !== 2)\n return undefined;\n const a = stringToProgress[parts[0]];\n const b = stringToProgress[parts[1]];\n if (a === undefined || b === undefined)\n return undefined;\n return [a, b];\n}\nfunction normaliseOffset(offset) {\n if (offset.length !== 2)\n return undefined;\n const result = [];\n for (const item of offset) {\n if (Array.isArray(item)) {\n result.push(item);\n }\n else if (typeof item === \"string\") {\n const parsed = parseStringOffset(item);\n if (!parsed)\n return undefined;\n result.push(parsed);\n }\n else {\n return undefined;\n }\n }\n return result;\n}\nfunction matchesPreset(offset, preset) {\n const normalised = normaliseOffset(offset);\n if (!normalised)\n return false;\n for (let i = 0; i < 2; i++) {\n const o = normalised[i];\n const p = preset[i];\n if (o[0] !== p[0] || o[1] !== p[1])\n return false;\n }\n return true;\n}\nexport function offsetToViewTimelineRange(offset) {\n if (!offset) {\n return { rangeStart: \"contain 0%\", rangeEnd: \"contain 100%\" };\n }\n for (const [preset, name] of presets) {\n if (matchesPreset(offset, preset)) {\n return { rangeStart: `${name} 0%`, rangeEnd: `${name} 100%` };\n }\n }\n return undefined;\n}\n//# sourceMappingURL=offset-to-range.js.map","import { scrollInfo } from \"../track\";\nimport { canUseNativeTimeline } from \"./can-use-native-timeline\";\nimport { offsetToViewTimelineRange } from \"./offset-to-range\";\nconst timelineCache = new Map();\nfunction scrollTimelineFallback(options) {\n const currentTime = { value: 0 };\n const cancel = scrollInfo((info) => {\n currentTime.value = info[options.axis].progress * 100;\n }, options);\n return { currentTime, cancel };\n}\nexport function getTimeline({ source, container, ...options }) {\n const { axis } = options;\n if (source)\n container = source;\n let containerCache = timelineCache.get(container);\n if (!containerCache) {\n containerCache = new Map();\n timelineCache.set(container, containerCache);\n }\n const targetKey = options.target ?? \"self\";\n let targetCache = containerCache.get(targetKey);\n if (!targetCache) {\n targetCache = {};\n containerCache.set(targetKey, targetCache);\n }\n const axisKey = axis + (options.offset ?? []).join(\",\");\n if (!targetCache[axisKey]) {\n if (options.target && canUseNativeTimeline(options.target)) {\n const range = offsetToViewTimelineRange(options.offset);\n if (range) {\n targetCache[axisKey] = new ViewTimeline({\n subject: options.target,\n axis,\n });\n }\n else {\n targetCache[axisKey] = scrollTimelineFallback({\n container,\n ...options,\n });\n }\n }\n else if (canUseNativeTimeline()) {\n targetCache[axisKey] = new ScrollTimeline({\n source: container,\n axis,\n });\n }\n else {\n targetCache[axisKey] = scrollTimelineFallback({\n container,\n ...options,\n });\n }\n }\n return targetCache[axisKey];\n}\n//# sourceMappingURL=get-timeline.js.map","import { noop } from \"motion-utils\";\nimport { attachToAnimation } from \"./attach-animation\";\nimport { attachToFunction } from \"./attach-function\";\nexport function scroll(onScroll, { axis = \"y\", container = document.scrollingElement, ...options } = {}) {\n if (!container)\n return noop;\n const optionsWithDefaults = { axis, container, ...options };\n return typeof onScroll === \"function\"\n ? attachToFunction(onScroll, optionsWithDefaults)\n : attachToAnimation(onScroll, optionsWithDefaults);\n}\n//# sourceMappingURL=index.js.map","import { observeTimeline } from \"motion-dom\";\nimport { scrollInfo } from \"./track\";\nimport { getTimeline } from \"./utils/get-timeline\";\nimport { isElementTracking } from \"./utils/is-element-tracking\";\n/**\n * If the onScroll function has two arguments, it's expecting\n * more specific information about the scroll from scrollInfo.\n */\nfunction isOnScrollWithInfo(onScroll) {\n return onScroll.length === 2;\n}\nexport function attachToFunction(onScroll, options) {\n if (isOnScrollWithInfo(onScroll) || isElementTracking(options)) {\n return scrollInfo((info) => {\n onScroll(info[options.axis].progress, info);\n }, options);\n }\n else {\n return observeTimeline(onScroll, getTimeline(options));\n }\n}\n//# sourceMappingURL=attach-function.js.map","/**\n * Currently, we only support element tracking with `scrollInfo`, though in\n * the future we can also offer ViewTimeline support.\n */\nexport function isElementTracking(options) {\n return options && (options.target || options.offset);\n}\n//# sourceMappingURL=is-element-tracking.js.map","import { observeTimeline } from \"motion-dom\";\nimport { canUseNativeTimeline } from \"./utils/can-use-native-timeline\";\nimport { getTimeline } from \"./utils/get-timeline\";\nimport { offsetToViewTimelineRange } from \"./utils/offset-to-range\";\nexport function attachToAnimation(animation, options) {\n const timeline = getTimeline(options);\n const range = options.target\n ? offsetToViewTimelineRange(options.offset)\n : undefined;\n /**\n * Use native timeline when:\n * - No target: ScrollTimeline (existing behaviour)\n * - Target with mappable offset: ViewTimeline with named range\n * - Target with unmappable offset: fall back to JS observe\n */\n const useNative = options.target\n ? canUseNativeTimeline(options.target) && !!range\n : canUseNativeTimeline();\n return animation.attachTimeline({\n timeline: useNative ? timeline : undefined,\n ...(range &&\n useNative && {\n rangeStart: range.rangeStart,\n rangeEnd: range.rangeEnd,\n }),\n observe: (valueAnimation) => {\n valueAnimation.pause();\n return observeTimeline((progress) => {\n valueAnimation.time =\n valueAnimation.iterationDuration * progress;\n }, timeline);\n },\n });\n}\n//# sourceMappingURL=attach-animation.js.map"],"names":["clamp","min","max","v","formatErrorMessage","message","errorCode","warning","invariant","process","env","NODE_ENV","check","console","warn","Error","MotionGlobalConfig","isObject","value","noop","any","pipe","transformers","reduce","a","b","progress","from","to","range","stepsOrder","createRenderBatcher","scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","state","delta","timestamp","isProcessing","flagRunNextFrame","steps","acc","key","thisFrame","Set","nextFrame","flushNextFrame","toKeepAlive","WeakSet","latestFrameData","triggerCallback","callback","has","step","schedule","keepAlive","immediate","queue","add","cancel","delete","frameData","prevFrame","forEach","clear","createRenderStep","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","useManualTiming","performance","now","Math","i","length","frame","cancelFrame","requestAnimationFrame","startsAsVariableToken","token","startsWith","checkStringStartsWith","singleCssVariableRegex","number","test","parse","parseFloat","transform","alpha","sanitize","round","floatRegex","singleColorRegex","isColorString","type","testProp","Boolean","isNullish","Object","prototype","hasOwnProperty","call","splitColor","aName","bName","cName","c","match","undefined","rgbUnit","clampRgbUnit","rgba","red","green","blue","alpha$1","hex","r","g","substring","parseInt","percent","unit","endsWith","split","createUnitType","hsla","hue","saturation","lightness","color","getAnimatableNone","parsed","colorRegex","NUMBER_TOKEN","COLOR_TOKEN","complexRegex","analyseComplexValue","originalValue","toString","values","indexes","var","types","replace","parsedValue","push","buildTransformer","numSections","output","convertToZero","splitBefore","trim","complex","isNaN","createTransformer","source","info","transformer","map","hueToRgb","p","q","t","mixImmediate","mixNumber","mixLinearColor","fromExpo","expo","sqrt","colorTypes","asRGBA","find","model","hslaToRgba","mixColor","fromRGBA","toRGBA","blended","invisibleValues","mixNumber$1","getMixer","mixComplex","Array","isArray","mixArray","mixObject","numValues","blendValue","origin","target","template","originStats","targetStats","mixVisibility","orderedOrigin","pointers","originIndex","originValue","matchOrder","mix","mixer","interpolate","input","isClamp","ease","inputLength","isZeroDeltaRange","reverse","mixers","customMixer","mixerFactory","numMixers","easingFunction","createMixers","interpolator","progressInRange","defaultOffset","arr","offset","remaining","offsetProgress","fillOffset","supportsFlags","memoSupports","supportsFlag","memoized","result","memo","supportsScrollTimeline","window","ScrollTimeline","supportsViewTimeline","ViewTimeline","isHTMLElement","element","resizeHandlers","WeakMap","observer","getSize","borderBoxAxis","svgAxis","htmlAxis","borderBoxSize","getBBox","getWidth","getHeight","notifyTarget","get","handler","width","height","notifyAll","entries","resizeElement","ResizeObserver","elements","elementOrSelector","EventTarget","document","querySelectorAll","filter","resolveElements","elementHandlers","set","observe","size","unobserve","windowCallbacks","windowResizeHandler","resizeWindow","innerWidth","innerHeight","addEventListener","removeEventListener","observeTimeline","timeline","prevProgress","onFrame","currentTime","canUseNativeTimeline","keys","x","position","y","updateAxisInfo","axisName","time","axis","prev","current","prevTime","abs","scrollLength","elapsed","velocity","frameDuration","namedEdges","start","center","end","resolveEdge","edge","inset","asNumber","documentElement","clientWidth","clientHeight","resolveOffset","containerLength","targetLength","targetInset","offsetDefinition","targetPoint","containerPoint","includes","ScrollOffset","Enter","Exit","Any","All","point","resolveOffsets","container","options","lengthLabel","offsetLeft","offsetTop","offsetParent","tagName","svgBoundingBox","getBoundingClientRect","parentElement","parentBoundingBox","left","top","SVGGraphicsElement","svg","parent","parentNode","calcInset","targetSize","scrollWidth","scrollHeight","getTargetSize","containerSize","hasChanged","numOffsets","interpolatorOffsets","createOnScrollHandler","onScroll","measure","targetOffset","node","updateScrollInfo","notify","scrollListeners","resizeListeners","onScrollHandlers","scrollSize","dimensionCheckProcesses","getEventTarget","scrollingElement","scrollInfo","trackContentSize","containerHandlers","containerHandler","measureAll","listener","checkScrollDimensions","newWidth","newHeight","dimensionCheckProcess","currentHandlers","scrollListener","presets","ScrollOffsetPresets","stringToProgress","parseStringOffset","s","parts","matchesPreset","preset","normalised","item","normaliseOffset","o","offsetToViewTimelineRange","rangeStart","rangeEnd","name","timelineCache","Map","scrollTimelineFallback","getTimeline","containerCache","targetKey","targetCache","axisKey","join","subject","scroll","optionsWithDefaults","isOnScrollWithInfo","isElementTracking","attachToFunction","animation","useNative","attachTimeline","valueAnimation","pause","iterationDuration","attachToAnimation"],"mappings":"AAAA,MAAMA,EAAQ,CAACC,EAAKC,EAAKC,IACjBA,EAAID,EACGA,EACPC,EAAIF,EACGA,EACJE,ECLX,SAASC,EAAmBC,EAASC,GACjC,OAAOA,EACD,GAAGD,2FAAiGC,IACpGD,CACV,CCFA,IAAIE,EAAU,OACVC,EAAY,OACO,oBAAZC,SACmB,eAA1BA,QAAQC,KAAKC,WACbJ,EAAU,CAACK,EAAOP,EAASC,KAClBM,GAA4B,oBAAZC,SACjBA,QAAQC,KAAKV,EAAmBC,EAASC,KAGjDE,EAAY,CAACI,EAAOP,EAASC,KACzB,IAAKM,EACD,MAAM,IAAIG,MAAMX,EAAmBC,EAASC,MCbxD,MAAMU,EAAqB,CAAA,ECArBC,EAAYC,GAA2B,iBAAVA,GAAgC,OAAVA,ECCzD,MAAMC,EAAQC,GAAQA,ECMhBC,EAAO,IAAIC,IAAiBA,EAAaC,OAAO,CAACC,EAAGC,IAAOtB,GAAMsB,EAAED,EAAErB,KCCrEuB,EAAW,CAACC,EAAMC,EAAIV,KACxB,MAAMW,EAAQD,EAAKD,EACnB,OAAO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,IAIf,OAAOyE,EAAYC,EACvB,CCtDO,SAASG,GAAOnD,GAAU9D,KAAEA,EAAO,IAAGmC,UAAEA,EAAYhE,SAASuG,oBAAqBtC,GAAY,IACjG,IAAKD,EACD,OAAOvT,EACX,MAAMsY,EAAsB,CAAElH,OAAMmC,eAAcC,GAClD,MAA2B,mBAAb0B,ECIX,SAA0BA,EAAU1B,GACvC,OAJJ,SAA4B0B,GACxB,OAA2B,IAApBA,EAASpR,MACpB,CAEQyU,CAAmBrD,ICRpB,SAA2B1B,GAC9B,OAAOA,IAAYA,EAAQtI,QAAUsI,EAAQzG,OACjD,CDMwCyL,CAAkBhF,GAC3CuC,GAAY9M,IACfiM,EAASjM,EAAKuK,EAAQpC,MAAM7Q,SAAU0I,IACvCuK,GAGIjD,GAAgB2E,EAAU4C,GAAYtE,GAErD,CDZUiF,CAAiBvD,EAAUoD,GGJ9B,SAA2BI,EAAWlF,GACzC,MAAMhD,EAAWsH,GAAYtE,GACvB9S,EAAQ8S,EAAQtI,OAChBqM,GAA0B/D,EAAQzG,aAClC/G,EAOA2S,EAAYnF,EAAQtI,OACpB0F,GAAqB4C,EAAQtI,WAAaxK,EAC1CkQ,KACN,OAAO8H,EAAUE,eAAe,CAC5BpI,SAAUmI,EAAYnI,OAAWxK,KAC7BtF,GACAiY,GAAa,CACbnB,WAAY9W,EAAM8W,WAClBC,SAAU/W,EAAM+W,UAEpB5H,QAAUgJ,IACNA,EAAeC,QACRvI,GAAiBhQ,IACpBsY,EAAe1H,KACX0H,EAAeE,kBAAoBxY,GACxCiQ,KAGf,CHxBUwI,CAAkB9D,EAAUoD,EACtC"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-waapi-animate.js b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-waapi-animate.js deleted file mode 100644 index d52bdcbf..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-waapi-animate.js +++ /dev/null @@ -1,2 +0,0 @@ -let t=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t=(t,e,n)=>{if(!t)throw new Error(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n))});const e=t=>t,n=t=>1e3*t,i=t=>t/1e3,s=t=>null!==t;class a{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}function o(t){for(let e=1;et.startsWith("--");const l={};function u(t,e){const n=function(t){let e;return()=>(void 0===e&&(e=t()),e)}(t);return()=>l[e]??n()}const h=u(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),d=u(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),m=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,c={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:m([0,.65,.55,1]),circOut:m([.55,0,1,.45]),backIn:m([.31,.01,.66,-.59]),backOut:m([.33,1.53,.69,.99])};function p(t,e){return t?"function"==typeof t?d()?((t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;eArray.isArray(t)&&"number"==typeof t[0])(t)?m(t):Array.isArray(t)?t.map(t=>p(t,e)||c.easeOut):c[t]:void 0}class f extends a{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:a,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:u,onComplete:h}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=l,this.options=e,t("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const m=function({type:t,...e}){return function(t){return"function"==typeof t&&"applyToOptions"in t}(t)&&d()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(e);this.animation=function(t,e,n,{delay:i=0,duration:s=300,repeat:a=0,repeatType:o="loop",ease:r="easeOut",times:l}={},u){const h={[e]:n};l&&(h.offset=l);const d=p(r,s);Array.isArray(d)&&(h.easing=d);const m={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};return u&&(m.pseudoElement=u),t.animate(h,m)}(n,i,a,m,o),!1===m.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=function(t,{repeat:e,repeatType:n="loop"},i,a=1){const o=t.filter(s),r=a<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}(a,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(t),function(t,e,n){r(e)?t.style.setProperty(e,n):t.style[e]=n}(n,i,t),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return i(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+i(t)}get time(){return i(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=n(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&h()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),e):s(this)}}class g{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return y(this.animations,"duration")}get iterationDuration(){return y(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function y(t,e){let n=0;for(let i=0;in&&(n=s)}return n}class T extends g{then(t,e){return this.finished.finally(t).then(()=>{})}}const b=new WeakMap,A=(t,e="")=>`${t}:${e}`;function S(t){let e=b.get(t);return e||(e=new Map,b.set(t,e)),e}function E(t,e){const n=t?.[e]??t?.default??t;return n!==t?function(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}(n,t):n}const k=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function v(t,e){for(let n=0;nnull!=t)}(e,a),l=r.length;t(Boolean(l),"No valid elements provided.","no-valid-elements");const u=[];for(let t=0;te.delete(n)),h.push(s)}return h}const I=t=>function(e,n,i){return new T(B(e,n,i,t))},R=I();export{R as animateMini,I as createScopedWaapiAnimate}; -//# sourceMappingURL=size-rollup-waapi-animate.js.map diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-waapi-animate.js.map b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-waapi-animate.js.map deleted file mode 100644 index 8265dc94..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dist/size-rollup-waapi-animate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"size-rollup-waapi-animate.js","sources":["../../motion-utils/dist/es/errors.mjs","../../motion-utils/dist/es/format-error-message.mjs","../../motion-utils/dist/es/noop.mjs","../../motion-utils/dist/es/time-conversion.mjs","../../motion-dom/dist/es/animation/keyframes/get-final.mjs","../../motion-dom/dist/es/animation/utils/WithPromise.mjs","../../motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","../../motion-dom/dist/es/render/dom/is-css-var.mjs","../../motion-dom/dist/es/utils/supports/flags.mjs","../../motion-dom/dist/es/utils/supports/memo.mjs","../../motion-utils/dist/es/memo.mjs","../../motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../../motion-dom/dist/es/utils/supports/linear-easing.mjs","../../motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","../../motion-dom/dist/es/animation/waapi/easing/supported.mjs","../../motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","../../motion-dom/dist/es/animation/waapi/utils/linear.mjs","../../motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","../../motion-dom/dist/es/animation/NativeAnimation.mjs","../../motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs","../../motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","../../motion-dom/dist/es/render/dom/style-set.mjs","../../motion-dom/dist/es/animation/GroupAnimation.mjs","../../motion-dom/dist/es/animation/GroupAnimationWithThen.mjs","../../motion-dom/dist/es/animation/utils/active-animations.mjs","../../motion-dom/dist/es/animation/utils/get-value-transition.mjs","../../motion-dom/dist/es/animation/utils/resolve-transition.mjs","../../motion-dom/dist/es/animation/waapi/utils/px-values.mjs","../../motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs","../../motion-dom/dist/es/render/dom/style-computed.mjs","../lib/animation/animators/waapi/animate-elements.js","../../motion-dom/dist/es/utils/resolve-elements.mjs","../lib/animation/animators/waapi/animate-style.js"],"sourcesContent":["import { formatErrorMessage } from './format-error-message.mjs';\n\nlet warning = () => { };\nlet invariant = () => { };\nif (typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\") {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode));\n }\n };\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode));\n }\n };\n}\n\nexport { invariant, warning };\n//# sourceMappingURL=errors.mjs.map\n","function formatErrorMessage(message, errorCode) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message;\n}\n\nexport { formatErrorMessage };\n//# sourceMappingURL=format-error-message.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n//# sourceMappingURL=noop.mjs.map\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n/*#__NO_SIDE_EFFECTS__*/\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\n/*#__NO_SIDE_EFFECTS__*/\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n//# sourceMappingURL=time-conversion.mjs.map\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe, speed = 1) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const useFirstKeyframe = speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1);\n const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n//# sourceMappingURL=get-final.mjs.map\n","class WithPromise {\n constructor() {\n this.updateFinished();\n }\n get finished() {\n return this._finished;\n }\n updateFinished() {\n this._finished = new Promise((resolve) => {\n this.resolve = resolve;\n });\n }\n notifyFinished() {\n this.resolve();\n }\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve, onReject) {\n return this.finished.then(onResolve, onReject);\n }\n}\n\nexport { WithPromise };\n//# sourceMappingURL=WithPromise.mjs.map\n","function fillWildcards(keyframes) {\n for (let i = 1; i < keyframes.length; i++) {\n keyframes[i] ?? (keyframes[i] = keyframes[i - 1]);\n }\n}\n\nexport { fillWildcards };\n//# sourceMappingURL=fill-wildcards.mjs.map\n","const isCSSVar = (name) => name.startsWith(\"--\");\n\nexport { isCSSVar };\n//# sourceMappingURL=is-css-var.mjs.map\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {};\n\nexport { supportsFlags };\n//# sourceMappingURL=flags.mjs.map\n","import { memo } from 'motion-utils';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => supportsFlags[supportsFlag] ?? memoized();\n}\n\nexport { memoSupports };\n//# sourceMappingURL=memo.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n//# sourceMappingURL=memo.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, \"scrollTimeline\");\nconst supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, \"viewTimeline\");\n\nexport { supportsScrollTimeline, supportsViewTimeline };\n//# sourceMappingURL=scroll-timeline.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n}, \"linearEasing\");\n\nexport { supportsLinearEasing };\n//# sourceMappingURL=linear-easing.mjs.map\n","const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { cubicBezierAsString };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","import { cubicBezierAsString } from './cubic-bezier.mjs';\n\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\n\nexport { supportedWaapiEasing };\n//# sourceMappingURL=supported.mjs.map\n","import { isBezierDefinition } from 'motion-utils';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\n\nfunction mapEasingToNativeEasing(easing, duration) {\n if (!easing) {\n return undefined;\n }\n else if (typeof easing === \"function\") {\n return supportsLinearEasing()\n ? generateLinearEasing(easing, duration)\n : \"ease-out\";\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||\n supportedWaapiEasing.easeOut);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { mapEasingToNativeEasing };\n//# sourceMappingURL=map-easing.mjs.map\n","const generateLinearEasing = (easing, duration, // as milliseconds\nresolution = 10 // as milliseconds\n) => {\n let points = \"\";\n const numPoints = Math.max(Math.round(duration / resolution), 2);\n for (let i = 0; i < numPoints; i++) {\n points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + \", \";\n }\n return `linear(${points.substring(0, points.length - 2)})`;\n};\n\nexport { generateLinearEasing };\n//# sourceMappingURL=linear.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n//# sourceMappingURL=is-bezier-definition.mjs.map\n","import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n this.manualStartTime = null;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `Mini animate() doesn't support \"type\" as a string.`, \"mini-spring\");\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe);\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n }\n play() {\n if (this.isStopped)\n return;\n this.manualStartTime = null;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n const element = this.options?.element;\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n const wasFinished = this.finishedTime !== null;\n this.manualStartTime = null;\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n if (wasFinished) {\n this.animation.pause();\n }\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.manualStartTime = this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n if (rangeStart)\n this.animation.rangeStart = rangeStart;\n if (rangeEnd)\n this.animation.rangeEnd = rangeEnd;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n//# sourceMappingURL=NativeAnimation.mjs.map\n","import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { isGenerator } from '../../generators/utils/is-generator.mjs';\n\nfunction applyGeneratorOptions({ type, ...options }) {\n if (isGenerator(type) && supportsLinearEasing()) {\n return type.applyToOptions(options);\n }\n else {\n options.duration ?? (options.duration = 300);\n options.ease ?? (options.ease = \"easeOut\");\n }\n return options;\n}\n\nexport { applyGeneratorOptions };\n//# sourceMappingURL=apply-generator.mjs.map\n","function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n//# sourceMappingURL=is-generator.mjs.map\n","import { activeAnimations } from '../../stats/animation-count.mjs';\nimport { statsBuffer } from '../../stats/buffer.mjs';\nimport { mapEasingToNativeEasing } from './easing/map-easing.mjs';\n\nfunction startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease = \"easeOut\", times, } = {}, pseudoElement = undefined) {\n const keyframeOptions = {\n [valueName]: keyframes,\n };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease, duration);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n if (statsBuffer.value) {\n activeAnimations.waapi++;\n }\n const options = {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n };\n if (pseudoElement)\n options.pseudoElement = pseudoElement;\n const animation = element.animate(keyframeOptions, options);\n if (statsBuffer.value) {\n animation.finished.finally(() => {\n activeAnimations.waapi--;\n });\n }\n return animation;\n}\n\nexport { startWaapiAnimation };\n//# sourceMappingURL=start-waapi-animation.mjs.map\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction setStyle(element, name, value) {\n isCSSVar(name)\n ? element.style.setProperty(name, value)\n : (element.style[name] = value);\n}\n\nexport { setStyle };\n//# sourceMappingURL=style-set.mjs.map\n","class GroupAnimation {\n constructor(animations) {\n // Bound to accomadate common `return animation.stop` pattern\n this.stop = () => this.runAll(\"stop\");\n this.animations = animations.filter(Boolean);\n }\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n getAll(propName) {\n return this.animations[0][propName];\n }\n setAll(propName, newValue) {\n for (let i = 0; i < this.animations.length; i++) {\n this.animations[i][propName] = newValue;\n }\n }\n attachTimeline(timeline) {\n const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline));\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel();\n this.animations[i].stop();\n });\n };\n }\n get time() {\n return this.getAll(\"time\");\n }\n set time(time) {\n this.setAll(\"time\", time);\n }\n get speed() {\n return this.getAll(\"speed\");\n }\n set speed(speed) {\n this.setAll(\"speed\", speed);\n }\n get state() {\n return this.getAll(\"state\");\n }\n get startTime() {\n return this.getAll(\"startTime\");\n }\n get duration() {\n return getMax(this.animations, \"duration\");\n }\n get iterationDuration() {\n return getMax(this.animations, \"iterationDuration\");\n }\n runAll(methodName) {\n this.animations.forEach((controls) => controls[methodName]());\n }\n play() {\n this.runAll(\"play\");\n }\n pause() {\n this.runAll(\"pause\");\n }\n cancel() {\n this.runAll(\"cancel\");\n }\n complete() {\n this.runAll(\"complete\");\n }\n}\nfunction getMax(animations, propName) {\n let max = 0;\n for (let i = 0; i < animations.length; i++) {\n const value = animations[i][propName];\n if (value !== null && value > max) {\n max = value;\n }\n }\n return max;\n}\n\nexport { GroupAnimation };\n//# sourceMappingURL=GroupAnimation.mjs.map\n","import { GroupAnimation } from './GroupAnimation.mjs';\n\nclass GroupAnimationWithThen extends GroupAnimation {\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n}\n\nexport { GroupAnimationWithThen };\n//# sourceMappingURL=GroupAnimationWithThen.mjs.map\n","const animationMaps = new WeakMap();\nconst animationMapKey = (name, pseudoElement = \"\") => `${name}:${pseudoElement}`;\nfunction getAnimationMap(element) {\n let map = animationMaps.get(element);\n if (!map) {\n map = new Map();\n animationMaps.set(element, map);\n }\n return map;\n}\n\nexport { animationMapKey, getAnimationMap };\n//# sourceMappingURL=active-animations.mjs.map\n","import { resolveTransition } from './resolve-transition.mjs';\n\nfunction getValueTransition(transition, key) {\n const valueTransition = transition?.[key] ??\n transition?.[\"default\"] ??\n transition;\n if (valueTransition !== transition) {\n return resolveTransition(valueTransition, transition);\n }\n return valueTransition;\n}\n\nexport { getValueTransition };\n//# sourceMappingURL=get-value-transition.mjs.map\n","/**\n * If `transition` has `inherit: true`, shallow-merge it with\n * `parentTransition` (child keys win) and strip the `inherit` key.\n * Otherwise return `transition` unchanged.\n */\nfunction resolveTransition(transition, parentTransition) {\n if (transition?.inherit && parentTransition) {\n const { inherit: _, ...rest } = transition;\n return { ...parentTransition, ...rest };\n }\n return transition;\n}\n\nexport { resolveTransition };\n//# sourceMappingURL=resolve-transition.mjs.map\n","const pxValues = new Set([\n // Border props\n \"borderWidth\",\n \"borderTopWidth\",\n \"borderRightWidth\",\n \"borderBottomWidth\",\n \"borderLeftWidth\",\n \"borderRadius\",\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\",\n \"borderBottomLeftRadius\",\n // Positioning props\n \"width\",\n \"maxWidth\",\n \"height\",\n \"maxHeight\",\n \"top\",\n \"right\",\n \"bottom\",\n \"left\",\n \"inset\",\n \"insetBlock\",\n \"insetBlockStart\",\n \"insetBlockEnd\",\n \"insetInline\",\n \"insetInlineStart\",\n \"insetInlineEnd\",\n // Spacing props\n \"padding\",\n \"paddingTop\",\n \"paddingRight\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"paddingBlock\",\n \"paddingBlockStart\",\n \"paddingBlockEnd\",\n \"paddingInline\",\n \"paddingInlineStart\",\n \"paddingInlineEnd\",\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n \"marginBlock\",\n \"marginBlockStart\",\n \"marginBlockEnd\",\n \"marginInline\",\n \"marginInlineStart\",\n \"marginInlineEnd\",\n // Typography\n \"fontSize\",\n // Misc\n \"backgroundPositionX\",\n \"backgroundPositionY\",\n]);\n\nexport { pxValues };\n//# sourceMappingURL=px-values.mjs.map\n","import { pxValues } from '../../waapi/utils/px-values.mjs';\n\nfunction applyPxDefaults(keyframes, name) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"number\" && pxValues.has(name)) {\n keyframes[i] = keyframes[i] + \"px\";\n }\n }\n}\n\nexport { applyPxDefaults };\n//# sourceMappingURL=apply-px-defaults.mjs.map\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction getComputedStyle(element, name) {\n const computedStyle = window.getComputedStyle(element);\n return isCSSVar(name)\n ? computedStyle.getPropertyValue(name)\n : computedStyle[name];\n}\n\nexport { getComputedStyle };\n//# sourceMappingURL=style-computed.mjs.map\n","import { animationMapKey, applyPxDefaults, fillWildcards, getAnimationMap, getComputedStyle, getValueTransition, NativeAnimation, resolveElements, } from \"motion-dom\";\nimport { invariant, secondsToMilliseconds } from \"motion-utils\";\nexport function animateElements(elementOrSelector, keyframes, options, scope) {\n // Gracefully handle null/undefined elements (e.g., from querySelector returning null)\n if (elementOrSelector == null) {\n return [];\n }\n const elements = resolveElements(elementOrSelector, scope);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid elements provided.\", \"no-valid-elements\");\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions = [];\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n const elementTransition = { ...options };\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements);\n }\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName];\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes];\n }\n const valueOptions = {\n ...getValueTransition(elementTransition, valueName),\n };\n valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration));\n valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay));\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element);\n const key = animationMapKey(valueName, valueOptions.pseudoElement || \"\");\n const currentAnimation = map.get(key);\n currentAnimation && currentAnimation.stop();\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n options: {\n ...valueOptions,\n element,\n name: valueName,\n allowFlatten: !elementTransition.type && !elementTransition.ease,\n },\n });\n }\n }\n /**\n * Step 2: Resolve keyframes (read)\n */\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i];\n const { element, name, pseudoElement } = animationOptions;\n if (!pseudoElement && unresolvedKeyframes[0] === null) {\n unresolvedKeyframes[0] = getComputedStyle(element, name);\n }\n fillWildcards(unresolvedKeyframes);\n applyPxDefaults(unresolvedKeyframes, name);\n /**\n * If we only have one keyframe, explicitly read the initial keyframe\n * from the computed style. This is to ensure consistency with WAAPI behaviour\n * for restarting animations, for instance .play() after finish, when it\n * has one vs two keyframes.\n */\n if (!pseudoElement && unresolvedKeyframes.length < 2) {\n unresolvedKeyframes.unshift(getComputedStyle(element, name));\n }\n animationOptions.keyframes = unresolvedKeyframes;\n }\n /**\n * Step 3: Create new animations (write)\n */\n const animations = [];\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { map, key, options: animationOptions } = animationDefinitions[i];\n const animation = new NativeAnimation(animationOptions);\n map.set(key, animation);\n animation.finished.finally(() => map.delete(key));\n animations.push(animation);\n }\n return animations;\n}\n//# sourceMappingURL=animate-elements.js.map","function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector == null) {\n return [];\n }\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector).filter((element) => element != null);\n}\n\nexport { resolveElements };\n//# sourceMappingURL=resolve-elements.mjs.map\n","import { GroupAnimationWithThen, } from \"motion-dom\";\nimport { animateElements } from \"./animate-elements\";\nexport const createScopedWaapiAnimate = (scope) => {\n function scopedAnimate(elementOrSelector, keyframes, options) {\n return new GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope));\n }\n return scopedAnimate;\n};\nexport const animateMini = /*@__PURE__*/ createScopedWaapiAnimate();\n//# sourceMappingURL=animate-style.js.map"],"names":["invariant","process","env","NODE_ENV","check","message","errorCode","Error","formatErrorMessage","noop","any","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","isNotNull","value","WithPromise","constructor","this","updateFinished","finished","_finished","Promise","resolve","notifyFinished","then","onResolve","onReject","fillWildcards","keyframes","i","length","isCSSVar","name","startsWith","supportsFlags","memoSupports","callback","supportsFlag","memoized","result","undefined","memo","supportsScrollTimeline","window","ScrollTimeline","supportsLinearEasing","document","createElement","animate","opacity","easing","e","cubicBezierAsString","a","b","c","d","supportedWaapiEasing","linear","ease","easeIn","easeOut","easeInOut","circIn","circOut","backIn","backOut","mapEasingToNativeEasing","duration","resolution","points","numPoints","Math","max","round","substring","generateLinearEasing","Array","isArray","isBezierDefinition","map","segmentEasing","NativeAnimation","options","super","finishedTime","isStopped","manualStartTime","element","pseudoElement","allowFlatten","finalKeyframe","onComplete","isPseudoElement","Boolean","type","transition","isGenerator","applyToOptions","applyGeneratorOptions","animation","valueName","delay","repeat","repeatType","times","keyframeOptions","offset","fill","iterations","direction","startWaapiAnimation","autoplay","pause","onfinish","time","keyframe","speed","resolvedKeyframes","filter","index","getFinalKeyframe","updateMotionValue","style","setProperty","setStyle","cancel","play","state","complete","finish","stop","commitStyles","isConnected","effect","getComputedTiming","Number","iterationDuration","currentTime","newTime","wasFinished","playbackRate","newSpeed","playState","startTime","newStartTime","attachTimeline","timeline","rangeStart","rangeEnd","observe","updateTiming","GroupAnimation","animations","runAll","all","getAll","propName","setAll","newValue","subscriptions","forEach","getMax","methodName","controls","GroupAnimationWithThen","_onReject","finally","animationMaps","WeakMap","animationMapKey","getAnimationMap","get","Map","set","getValueTransition","key","valueTransition","parentTransition","inherit","_","rest","resolveTransition","pxValues","Set","applyPxDefaults","has","getComputedStyle","computedStyle","getPropertyValue","animateElements","elementOrSelector","scope","elements","EventTarget","root","current","querySelectorAll","from","resolveElements","numElements","animationDefinitions","elementTransition","valueKeyframes","valueOptions","currentAnimation","push","unresolvedKeyframes","animationOptions","unshift","delete","createScopedWaapiAnimate","animateMini"],"mappings":"AAGA,IAAIA,EAAY,OACO,oBAAZC,SACmB,eAA1BA,QAAQC,KAAKC,WAMbH,EAAY,CAACI,EAAOC,EAASC,KACzB,IAAKF,EACD,MAAM,IAAIG,MCbtB,SAA4BF,EAASC,GACjC,OAAOA,EACD,GAAGD,2FAAiGC,IACpGD,CACV,CDS4BG,CAAmBH,EAASC,MEZxD,MAAMG,EAAQC,GAAQA,ECMhBC,EAAyBC,GAAsB,IAAVA,EAErCC,EAAyBC,GAAiBA,EAAe,ICTzDC,EAAaC,GAAoB,OAAVA,ECA7B,MAAMC,EACF,WAAAC,GACIC,KAAKC,gBACT,CACA,YAAIC,GACA,OAAOF,KAAKG,SAChB,CACA,cAAAF,GACID,KAAKG,UAAY,IAAIC,QAASC,IAC1BL,KAAKK,QAAUA,GAEvB,CACA,cAAAC,GACIN,KAAKK,SACT,CAMA,IAAAE,CAAKC,EAAWC,GACZ,OAAOT,KAAKE,SAASK,KAAKC,EAAWC,EACzC,ECtBJ,SAASC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CAIA,MAAMtD,EAAa,GACnB,IAAK,IAAI5H,EAAI,EAAGA,EAAI4K,EAAqB3K,OAAQD,IAAK,CAClD,MAAMmD,IAAEA,EAAGgG,IAAEA,EAAK7F,QAAS6H,GAAqBP,EAAqB5K,GAC/DuE,EAAY,IAAIlB,EAAgB8H,GACtChI,EAAI8F,IAAIE,EAAK5E,GACbA,EAAUjF,SAASoJ,QAAQ,IAAMvF,EAAIkI,OAAOlC,IAC5CvB,EAAWqD,KAAK1G,EACpB,CACA,OAAOqD,CACX,CEvGY,MAAC0D,EAA4BnB,GACrC,SAAuBD,EAAmBnK,EAAWuD,GACjD,OAAO,IAAIkF,EAAuByB,EAAgBC,EAAmBnK,EAAWuD,EAAS6G,GAC7F,EAGSoB,EAA4BD"} \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dom/README.md b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dom/README.md deleted file mode 100644 index 9f4c437a..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dom/README.md +++ /dev/null @@ -1 +0,0 @@ -This directory is a fallback for `exports["./dom"]` in the root `framer-motion` `package.json`. diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dom/mini/package.json b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dom/mini/package.json deleted file mode 100644 index 6d6ee8d7..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dom/mini/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "types": "../../dist/dom-mini.d.ts", - "main": "../../dist/cjs/dom-mini.js", - "module": "../../dist/es/dom-mini.mjs" -} diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dom/package.json b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dom/package.json deleted file mode 100644 index c08f91cd..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/dom/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "types": "../dist/dom.d.ts", - "main": "../dist/cjs/dom.js", - "module": "../dist/es/dom.mjs" -} diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/m/package.json b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/m/package.json deleted file mode 100644 index 5e76408c..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/m/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "types": "../dist/m.d.ts", - "main": "../dist/cjs/m.js", - "module": "../dist/es/m.mjs" -} diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/mini/package.json b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/mini/package.json deleted file mode 100644 index 1ed44076..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/mini/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "types": "../dist/mini.d.ts", - "main": "../dist/cjs/mini.js", - "module": "../dist/es/mini.mjs" -} diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/package.json b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/package.json deleted file mode 100644 index a7ac8190..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/framer-motion/package.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "name": "framer-motion", - "version": "12.40.0", - "description": "A simple and powerful JavaScript animation library", - "main": "dist/cjs/index.js", - "module": "dist/es/index.mjs", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "require": "./dist/cjs/index.js", - "import": "./dist/es/index.mjs", - "default": "./dist/cjs/index.js" - }, - "./debug": { - "types": "./dist/debug.d.ts", - "require": "./dist/cjs/debug.js", - "import": "./dist/es/debug.mjs", - "default": "./dist/cjs/debug.js" - }, - "./dom/mini": { - "types": "./dist/dom-mini.d.ts", - "require": "./dist/cjs/dom-mini.js", - "import": "./dist/es/dom-mini.mjs", - "default": "./dist/cjs/dom-mini.js" - }, - "./dom": { - "types": "./dist/dom.d.ts", - "require": "./dist/cjs/dom.js", - "import": "./dist/es/dom.mjs", - "default": "./dist/cjs/dom.js" - }, - "./client": { - "types": "./dist/client.d.ts", - "require": "./dist/cjs/client.js", - "import": "./dist/es/client.mjs", - "default": "./dist/cjs/client.js" - }, - "./m": { - "types": "./dist/m.d.ts", - "require": "./dist/cjs/m.js", - "import": "./dist/es/m.mjs", - "default": "./dist/cjs/m.js" - }, - "./mini": { - "types": "./dist/mini.d.ts", - "require": "./dist/cjs/mini.js", - "import": "./dist/es/mini.mjs", - "default": "./dist/cjs/mini.js" - }, - "./projection": { - "types": "./dist/projection.d.ts", - "import": "./dist/es/projection.mjs", - "default": "./dist/es/projection.mjs" - }, - "./package.json": "./package.json" - }, - "types": "dist/index.d.ts", - "author": "Matt Perry", - "license": "MIT", - "repository": "https://github.com/motiondivision/motion/", - "sideEffects": false, - "keywords": [ - "react animation", - "react", - "pose", - "react pose", - "animation", - "gestures", - "drag", - "spring", - "popmotion", - "framer", - "waapi" - ], - "scripts": { - "eslint": "yarn run lint", - "lint": "yarn eslint src/**/*.ts", - "build": "yarn clean && tsc --noEmitOnError -p . && rollup -c && node ./scripts/check-bundle.js", - "dev": "yarn watch", - "clean": "rm -rf types dist lib", - "test": "yarn test-server && yarn test-client", - "test-client": "jest --config jest.config.json --max-workers=2", - "test-server": "jest --config jest.config.ssr.json", - "prettier": "prettier ./src/* --write", - "watch": "concurrently -c blue,red -n tsc --noEmitOnError ,rollup --kill-others \"tsc --noEmitOnError --watch -p . --preserveWatchOutput\" \"rollup --config --watch --no-watch.clearScreen\"", - "prepack": "yarn build && yarn measure", - "postpublish": "git push --tags", - "measure": "rollup -c ./rollup.size.config.mjs" - }, - "dependencies": { - "motion-dom": "^12.40.0", - "motion-utils": "^12.39.0", - "tslib": "^2.4.0" - }, - "devDependencies": { - "@radix-ui/react-dialog": "^1.1.15", - "@thednp/dommatrix": "^2.0.11", - "@types/three": "0.137.0", - "three": "0.137.0" - }, - "peerDependencies": { - "@emotion/is-prop-valid": "*", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/is-prop-valid": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - } - }, - "bundlesize": [ - { - "path": "./dist/size-rollup-motion.js", - "maxSize": "34.9 kB" - }, - { - "path": "./dist/size-rollup-m.js", - "maxSize": "6 kB" - }, - { - "path": "./dist/size-rollup-dom-animation.js", - "maxSize": "17.85 kB" - }, - { - "path": "./dist/size-rollup-dom-max.js", - "maxSize": "29.8 kB" - }, - { - "path": "./dist/size-rollup-animate.js", - "maxSize": "19.1 kB" - }, - { - "path": "./dist/size-rollup-scroll.js", - "maxSize": "5.2 kB" - }, - { - "path": "./dist/size-rollup-waapi-animate.js", - "maxSize": "2.26 kB" - } - ], - "gitHead": "38ebb9480e5b25a51e09e2ec866c101d01d82c60" -} diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/motion-dom b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/motion-dom deleted file mode 120000 index 53343900..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/motion-dom +++ /dev/null @@ -1 +0,0 @@ -../../motion-dom@12.40.0/node_modules/motion-dom \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/motion-utils b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/motion-utils deleted file mode 120000 index 4c7f631d..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/motion-utils +++ /dev/null @@ -1 +0,0 @@ -../../motion-utils@12.39.0/node_modules/motion-utils \ No newline at end of file diff --git a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/tslib b/node_modules/.pnpm/framer-motion@12.40.0/node_modules/tslib deleted file mode 120000 index 4edba0e2..00000000 --- a/node_modules/.pnpm/framer-motion@12.40.0/node_modules/tslib +++ /dev/null @@ -1 +0,0 @@ -../../tslib@2.8.1/node_modules/tslib \ No newline at end of file diff --git a/node_modules/.pnpm/lock.yaml b/node_modules/.pnpm/lock.yaml deleted file mode 100644 index 49e6bc0a..00000000 --- a/node_modules/.pnpm/lock.yaml +++ /dev/null @@ -1,73 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - dependencies: - motion: - specifier: ^12.40.0 - version: 12.40.0 - -packages: - - framer-motion@12.40.0: - resolution: {integrity: sha512-uaBd3qC1v3KQqBEjwTUd183K6PbS+j0yR9w9VmEOLWA/tnUcSn8Xa3uck7t4dgpDoUss8xQTcj8W2L07lrnLFg==} - peerDependencies: - '@emotion/is-prop-valid': '*' - react: ^18.0.0 || ^19.0.0 - react-dom: ^18.0.0 || ^19.0.0 - peerDependenciesMeta: - '@emotion/is-prop-valid': - optional: true - react: - optional: true - react-dom: - optional: true - - motion-dom@12.40.0: - resolution: {integrity: sha512-HxU3ZaBwNPVQUBQf1xxgq+7JrPNZvjLVxgbpEZL7RrWJnsxOf0/OM+yrHG9ogLQ31Do/r57Oz2gQWPK+6q62mg==} - - motion-utils@12.39.0: - resolution: {integrity: sha512-8nadJAJjTtqRkmRF36FoJTrywK9nnFmnPwnSMyxaOCU7GDjN9RTMJIxx9De8ErM+vpPhMccr/6fo5WciyQLnMQ==} - - motion@12.40.0: - resolution: {integrity: sha512-yjrHUrBFW6kQvjJwRsoiPSAhC5tRwRqNGJWmiJ4CrGnbKp0V88AdzkhBmDoqIsIPfarOe0Uddd37Xq43/gIocA==} - peerDependencies: - '@emotion/is-prop-valid': '*' - react: ^18.0.0 || ^19.0.0 - react-dom: ^18.0.0 || ^19.0.0 - peerDependenciesMeta: - '@emotion/is-prop-valid': - optional: true - react: - optional: true - react-dom: - optional: true - - tslib@2.8.1: - resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - -snapshots: - - framer-motion@12.40.0: - dependencies: - motion-dom: 12.40.0 - motion-utils: 12.39.0 - tslib: 2.8.1 - - motion-dom@12.40.0: - dependencies: - motion-utils: 12.39.0 - - motion-utils@12.39.0: {} - - motion@12.40.0: - dependencies: - framer-motion: 12.40.0 - tslib: 2.8.1 - - tslib@2.8.1: {} diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/LICENSE.md b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/LICENSE.md deleted file mode 100644 index 81110442..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2024 [Motion](https://motion.dev) B.V. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/cjs/index.js b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/cjs/index.js deleted file mode 100644 index 2a42135b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/cjs/index.js +++ /dev/null @@ -1,10263 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var motionUtils = require('motion-utils'); - -const stepsOrder = [ - "setup", // Compute - "read", // Read - "resolveKeyframes", // Write/Read/Write/Read - "preUpdate", // Compute - "update", // Compute - "preRender", // Compute - "render", // Write - "postRender", // Compute -]; - -const statsBuffer = { - value: null, - addProjectionMetrics: null, -}; - -function createRenderStep(runNextFrame, stepName) { - /** - * We create and reuse two queues, one to queue jobs for the current frame - * and one for the next. We reuse to avoid triggering GC after x frames. - */ - let thisFrame = new Set(); - let nextFrame = new Set(); - /** - * Track whether we're currently processing jobs in this step. This way - * we can decide whether to schedule new jobs for this frame or next. - */ - let isProcessing = false; - let flushNextFrame = false; - /** - * A set of processes which were marked keepAlive when scheduled. - */ - const toKeepAlive = new WeakSet(); - let latestFrameData = { - delta: 0.0, - timestamp: 0.0, - isProcessing: false, - }; - let numCalls = 0; - function triggerCallback(callback) { - if (toKeepAlive.has(callback)) { - step.schedule(callback); - runNextFrame(); - } - numCalls++; - callback(latestFrameData); - } - const step = { - /** - * Schedule a process to run on the next frame. - */ - schedule: (callback, keepAlive = false, immediate = false) => { - const addToCurrentFrame = immediate && isProcessing; - const queue = addToCurrentFrame ? thisFrame : nextFrame; - if (keepAlive) - toKeepAlive.add(callback); - queue.add(callback); - return callback; - }, - /** - * Cancel the provided callback from running on the next frame. - */ - cancel: (callback) => { - nextFrame.delete(callback); - toKeepAlive.delete(callback); - }, - /** - * Execute all schedule callbacks. - */ - process: (frameData) => { - latestFrameData = frameData; - /** - * If we're already processing we've probably been triggered by a flushSync - * inside an existing process. Instead of executing, mark flushNextFrame - * as true and ensure we flush the following frame at the end of this one. - */ - if (isProcessing) { - flushNextFrame = true; - return; - } - isProcessing = true; - // Swap this frame and the next to avoid GC - const prevFrame = thisFrame; - thisFrame = nextFrame; - nextFrame = prevFrame; - // Execute this frame - thisFrame.forEach(triggerCallback); - /** - * If we're recording stats then - */ - if (stepName && statsBuffer.value) { - statsBuffer.value.frameloop[stepName].push(numCalls); - } - numCalls = 0; - // Clear the frame so no callbacks remain. This is to avoid - // memory leaks should this render step not run for a while. - thisFrame.clear(); - isProcessing = false; - if (flushNextFrame) { - flushNextFrame = false; - step.process(frameData); - } - }, - }; - return step; -} - -const maxElapsed = 40; -function createRenderBatcher(scheduleNextBatch, allowKeepAlive) { - let runNextFrame = false; - let useDefaultElapsed = true; - const state = { - delta: 0.0, - timestamp: 0.0, - isProcessing: false, - }; - const flagRunNextFrame = () => (runNextFrame = true); - const steps = stepsOrder.reduce((acc, key) => { - acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined); - return acc; - }, {}); - const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps; - const processBatch = () => { - const useManualTiming = motionUtils.MotionGlobalConfig.useManualTiming; - const timestamp = useManualTiming - ? state.timestamp - : performance.now(); - runNextFrame = false; - if (!useManualTiming) { - state.delta = useDefaultElapsed - ? 1000 / 60 - : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1); - } - state.timestamp = timestamp; - state.isProcessing = true; - // Unrolled render loop for better per-frame performance - setup.process(state); - read.process(state); - resolveKeyframes.process(state); - preUpdate.process(state); - update.process(state); - preRender.process(state); - render.process(state); - postRender.process(state); - state.isProcessing = false; - if (runNextFrame && allowKeepAlive) { - useDefaultElapsed = false; - scheduleNextBatch(processBatch); - } - }; - const wake = () => { - runNextFrame = true; - useDefaultElapsed = true; - if (!state.isProcessing) { - scheduleNextBatch(processBatch); - } - }; - const schedule = stepsOrder.reduce((acc, key) => { - const step = steps[key]; - acc[key] = (process, keepAlive = false, immediate = false) => { - if (!runNextFrame) - wake(); - return step.schedule(process, keepAlive, immediate); - }; - return acc; - }, {}); - const cancel = (process) => { - for (let i = 0; i < stepsOrder.length; i++) { - steps[stepsOrder[i]].cancel(process); - } - }; - return { schedule, cancel, state, steps }; -} - -const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : motionUtils.noop, true); - -let now; -function clearTime() { - now = undefined; -} -/** - * An eventloop-synchronous alternative to performance.now(). - * - * Ensures that time measurements remain consistent within a synchronous context. - * Usually calling performance.now() twice within the same synchronous context - * will return different values which isn't useful for animations when we're usually - * trying to sync animations to the same frame. - */ -const time = { - now: () => { - if (now === undefined) { - time.set(frameData.isProcessing || motionUtils.MotionGlobalConfig.useManualTiming - ? frameData.timestamp - : performance.now()); - } - return now; - }, - set: (newTime) => { - now = newTime; - queueMicrotask(clearTime); - }, -}; - -const activeAnimations = { - layout: 0, - mainThread: 0, - waapi: 0, -}; - -const checkStringStartsWith = (token) => (key) => typeof key === "string" && key.startsWith(token); -const isCSSVariableName = -/*@__PURE__*/ checkStringStartsWith("--"); -const startsAsVariableToken = -/*@__PURE__*/ checkStringStartsWith("var(--"); -const isCSSVariableToken = (value) => { - const startsWithToken = startsAsVariableToken(value); - if (!startsWithToken) - return false; - // Ensure any comments are stripped from the value as this can harm performance of the regex. - return singleCssVariableRegex.test(value.split("/*")[0].trim()); -}; -const singleCssVariableRegex = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu; -/** - * Check if a value contains a CSS variable anywhere (e.g. inside calc()). - * Unlike isCSSVariableToken which checks if the value IS a var() token, - * this checks if the value CONTAINS var() somewhere in the string. - */ -function containsCSSVariable(value) { - if (typeof value !== "string") - return false; - // Strip comments to avoid false positives - return value.split("/*")[0].includes("var(--"); -} - -const number = { - test: (v) => typeof v === "number", - parse: parseFloat, - transform: (v) => v, -}; -const alpha = { - ...number, - transform: (v) => motionUtils.clamp(0, 1, v), -}; -const scale = { - ...number, - default: 1, -}; - -// If this number is a decimal, make it just five decimal places -// to avoid exponents -const sanitize = (v) => Math.round(v * 100000) / 100000; - -const floatRegex = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu; - -function isNullish(v) { - return v == null; -} - -const singleColorRegex = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu; - -/** - * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000, - * but false if a number or multiple colors - */ -const isColorString = (type, testProp) => (v) => { - return Boolean((typeof v === "string" && - singleColorRegex.test(v) && - v.startsWith(type)) || - (testProp && - !isNullish(v) && - Object.prototype.hasOwnProperty.call(v, testProp))); -}; -const splitColor = (aName, bName, cName) => (v) => { - if (typeof v !== "string") - return v; - const [a, b, c, alpha] = v.match(floatRegex); - return { - [aName]: parseFloat(a), - [bName]: parseFloat(b), - [cName]: parseFloat(c), - alpha: alpha !== undefined ? parseFloat(alpha) : 1, - }; -}; - -const clampRgbUnit = (v) => motionUtils.clamp(0, 255, v); -const rgbUnit = { - ...number, - transform: (v) => Math.round(clampRgbUnit(v)), -}; -const rgba = { - test: /*@__PURE__*/ isColorString("rgb", "red"), - parse: /*@__PURE__*/ splitColor("red", "green", "blue"), - transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" + - rgbUnit.transform(red) + - ", " + - rgbUnit.transform(green) + - ", " + - rgbUnit.transform(blue) + - ", " + - sanitize(alpha.transform(alpha$1)) + - ")", -}; - -function parseHex(v) { - let r = ""; - let g = ""; - let b = ""; - let a = ""; - // If we have 6 characters, ie #FF0000 - if (v.length > 5) { - r = v.substring(1, 3); - g = v.substring(3, 5); - b = v.substring(5, 7); - a = v.substring(7, 9); - // Or we have 3 characters, ie #F00 - } - else { - r = v.substring(1, 2); - g = v.substring(2, 3); - b = v.substring(3, 4); - a = v.substring(4, 5); - r += r; - g += g; - b += b; - a += a; - } - return { - red: parseInt(r, 16), - green: parseInt(g, 16), - blue: parseInt(b, 16), - alpha: a ? parseInt(a, 16) / 255 : 1, - }; -} -const hex = { - test: /*@__PURE__*/ isColorString("#"), - parse: parseHex, - transform: rgba.transform, -}; - -/*#__NO_SIDE_EFFECTS__*/ -const createUnitType = (unit) => ({ - test: (v) => typeof v === "string" && v.endsWith(unit) && v.split(" ").length === 1, - parse: parseFloat, - transform: (v) => `${v}${unit}`, -}); -const degrees = /*@__PURE__*/ createUnitType("deg"); -const percent = /*@__PURE__*/ createUnitType("%"); -const px = /*@__PURE__*/ createUnitType("px"); -const vh = /*@__PURE__*/ createUnitType("vh"); -const vw = /*@__PURE__*/ createUnitType("vw"); -const progressPercentage = /*@__PURE__*/ (() => ({ - ...percent, - parse: (v) => percent.parse(v) / 100, - transform: (v) => percent.transform(v * 100), -}))(); - -const hsla = { - test: /*@__PURE__*/ isColorString("hsl", "hue"), - parse: /*@__PURE__*/ splitColor("hue", "saturation", "lightness"), - transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => { - return ("hsla(" + - Math.round(hue) + - ", " + - percent.transform(sanitize(saturation)) + - ", " + - percent.transform(sanitize(lightness)) + - ", " + - sanitize(alpha.transform(alpha$1)) + - ")"); - }, -}; - -const color = { - test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v), - parse: (v) => { - if (rgba.test(v)) { - return rgba.parse(v); - } - else if (hsla.test(v)) { - return hsla.parse(v); - } - else { - return hex.parse(v); - } - }, - transform: (v) => { - return typeof v === "string" - ? v - : v.hasOwnProperty("red") - ? rgba.transform(v) - : hsla.transform(v); - }, - getAnimatableNone: (v) => { - const parsed = color.parse(v); - parsed.alpha = 0; - return color.transform(parsed); - }, -}; - -const colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu; - -function test(v) { - return (isNaN(v) && - typeof v === "string" && - (v.match(floatRegex)?.length || 0) + - (v.match(colorRegex)?.length || 0) > - 0); -} -const NUMBER_TOKEN = "number"; -const COLOR_TOKEN = "color"; -const VAR_TOKEN = "var"; -const VAR_FUNCTION_TOKEN = "var("; -const SPLIT_TOKEN = "${}"; -// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex` -const complexRegex = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu; -function analyseComplexValue(value) { - const originalValue = value.toString(); - const values = []; - const indexes = { - color: [], - number: [], - var: [], - }; - const types = []; - let i = 0; - const tokenised = originalValue.replace(complexRegex, (parsedValue) => { - if (color.test(parsedValue)) { - indexes.color.push(i); - types.push(COLOR_TOKEN); - values.push(color.parse(parsedValue)); - } - else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) { - indexes.var.push(i); - types.push(VAR_TOKEN); - values.push(parsedValue); - } - else { - indexes.number.push(i); - types.push(NUMBER_TOKEN); - values.push(parseFloat(parsedValue)); - } - ++i; - return SPLIT_TOKEN; - }); - const split = tokenised.split(SPLIT_TOKEN); - return { values, split, indexes, types }; -} -function parseComplexValue(v) { - return analyseComplexValue(v).values; -} -function buildTransformer({ split, types }) { - const numSections = split.length; - return (v) => { - let output = ""; - for (let i = 0; i < numSections; i++) { - output += split[i]; - if (v[i] !== undefined) { - const type = types[i]; - if (type === NUMBER_TOKEN) { - output += sanitize(v[i]); - } - else if (type === COLOR_TOKEN) { - output += color.transform(v[i]); - } - else { - output += v[i]; - } - } - } - return output; - }; -} -function createTransformer(source) { - return buildTransformer(analyseComplexValue(source)); -} -const convertNumbersToZero = (v) => typeof v === "number" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v; -/** - * Convert a parsed value to its zero equivalent, but preserve numbers - * that act as divisors in CSS calc() expressions. - * - * analyseComplexValue extracts numbers from CSS strings and puts the - * surrounding text into a `split` template array. For example: - * "calc(var(--gap) / 5)" → values: [var(--gap), 5] - * split: ["calc(", " / ", ")"] - * - * When building a zero-equivalent for animation, naively zeroing all - * numbers turns the divisor into 0 → "calc(var(--gap) / 0)" → NaN. - * We detect this by checking whether the text preceding a number - * (split[i]) ends with "/" — the CSS calc division operator. - */ -const convertToZero = (value, splitBefore) => { - if (typeof value === "number") { - return splitBefore?.trim().endsWith("/") ? value : 0; - } - return convertNumbersToZero(value); -}; -function getAnimatableNone$1(v) { - const info = analyseComplexValue(v); - const transformer = buildTransformer(info); - return transformer(info.values.map((value, i) => convertToZero(value, info.split[i]))); -} -const complex = { - test, - parse: parseComplexValue, - createTransformer, - getAnimatableNone: getAnimatableNone$1, -}; - -// Adapted from https://gist.github.com/mjackson/5311256 -function hueToRgb(p, q, t) { - if (t < 0) - t += 1; - if (t > 1) - t -= 1; - if (t < 1 / 6) - return p + (q - p) * 6 * t; - if (t < 1 / 2) - return q; - if (t < 2 / 3) - return p + (q - p) * (2 / 3 - t) * 6; - return p; -} -function hslaToRgba({ hue, saturation, lightness, alpha }) { - hue /= 360; - saturation /= 100; - lightness /= 100; - let red = 0; - let green = 0; - let blue = 0; - if (!saturation) { - red = green = blue = lightness; - } - else { - const q = lightness < 0.5 - ? lightness * (1 + saturation) - : lightness + saturation - lightness * saturation; - const p = 2 * lightness - q; - red = hueToRgb(p, q, hue + 1 / 3); - green = hueToRgb(p, q, hue); - blue = hueToRgb(p, q, hue - 1 / 3); - } - return { - red: Math.round(red * 255), - green: Math.round(green * 255), - blue: Math.round(blue * 255), - alpha, - }; -} - -function mixImmediate(a, b) { - return (p) => (p > 0 ? b : a); -} - -/* - Value in range from progress - - Given a lower limit and an upper limit, we return the value within - that range as expressed by progress (usually a number from 0 to 1) - - So progress = 0.5 would change - - from -------- to - - to - - from ---- to - - E.g. from = 10, to = 20, progress = 0.5 => 15 - - @param [number]: Lower limit of range - @param [number]: Upper limit of range - @param [number]: The progress between lower and upper limits expressed 0-1 - @return [number]: Value as calculated from progress within range (not limited within range) -*/ -const mixNumber$1 = (from, to, progress) => { - return from + (to - from) * progress; -}; - -// Linear color space blending -// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw -// Demonstrated http://codepen.io/osublake/pen/xGVVaN -const mixLinearColor = (from, to, v) => { - const fromExpo = from * from; - const expo = v * (to * to - fromExpo) + fromExpo; - return expo < 0 ? 0 : Math.sqrt(expo); -}; -const colorTypes = [hex, rgba, hsla]; -const getColorType = (v) => colorTypes.find((type) => type.test(v)); -function asRGBA(color) { - const type = getColorType(color); - motionUtils.warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"); - if (!Boolean(type)) - return false; - let model = type.parse(color); - if (type === hsla) { - // TODO Remove this cast - needed since Motion's stricter typing - model = hslaToRgba(model); - } - return model; -} -const mixColor = (from, to) => { - const fromRGBA = asRGBA(from); - const toRGBA = asRGBA(to); - if (!fromRGBA || !toRGBA) { - return mixImmediate(from, to); - } - const blended = { ...fromRGBA }; - return (v) => { - blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v); - blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v); - blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v); - blended.alpha = mixNumber$1(fromRGBA.alpha, toRGBA.alpha, v); - return rgba.transform(blended); - }; -}; - -const invisibleValues = new Set(["none", "hidden"]); -/** - * Returns a function that, when provided a progress value between 0 and 1, - * will return the "none" or "hidden" string only when the progress is that of - * the origin or target. - */ -function mixVisibility(origin, target) { - if (invisibleValues.has(origin)) { - return (p) => (p <= 0 ? origin : target); - } - else { - return (p) => (p >= 1 ? target : origin); - } -} - -function mixNumber(a, b) { - return (p) => mixNumber$1(a, b, p); -} -function getMixer(a) { - if (typeof a === "number") { - return mixNumber; - } - else if (typeof a === "string") { - return isCSSVariableToken(a) - ? mixImmediate - : color.test(a) - ? mixColor - : mixComplex; - } - else if (Array.isArray(a)) { - return mixArray; - } - else if (typeof a === "object") { - return color.test(a) ? mixColor : mixObject; - } - return mixImmediate; -} -function mixArray(a, b) { - const output = [...a]; - const numValues = output.length; - const blendValue = a.map((v, i) => getMixer(v)(v, b[i])); - return (p) => { - for (let i = 0; i < numValues; i++) { - output[i] = blendValue[i](p); - } - return output; - }; -} -function mixObject(a, b) { - const output = { ...a, ...b }; - const blendValue = {}; - for (const key in output) { - if (a[key] !== undefined && b[key] !== undefined) { - blendValue[key] = getMixer(a[key])(a[key], b[key]); - } - } - return (v) => { - for (const key in blendValue) { - output[key] = blendValue[key](v); - } - return output; - }; -} -function matchOrder(origin, target) { - const orderedOrigin = []; - const pointers = { color: 0, var: 0, number: 0 }; - for (let i = 0; i < target.values.length; i++) { - const type = target.types[i]; - const originIndex = origin.indexes[type][pointers[type]]; - const originValue = origin.values[originIndex] ?? 0; - orderedOrigin[i] = originValue; - pointers[type]++; - } - return orderedOrigin; -} -const mixComplex = (origin, target) => { - const template = complex.createTransformer(target); - const originStats = analyseComplexValue(origin); - const targetStats = analyseComplexValue(target); - const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length && - originStats.indexes.color.length === targetStats.indexes.color.length && - originStats.indexes.number.length >= targetStats.indexes.number.length; - if (canInterpolate) { - if ((invisibleValues.has(origin) && - !targetStats.values.length) || - (invisibleValues.has(target) && - !originStats.values.length)) { - return mixVisibility(origin, target); - } - return motionUtils.pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template); - } - else { - motionUtils.warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"); - return mixImmediate(origin, target); - } -}; - -function mix(from, to, p) { - if (typeof from === "number" && - typeof to === "number" && - typeof p === "number") { - return mixNumber$1(from, to, p); - } - const mixer = getMixer(from); - return mixer(from, to); -} - -const frameloopDriver = (update) => { - const passTimestamp = ({ timestamp }) => update(timestamp); - return { - start: (keepAlive = true) => frame.update(passTimestamp, keepAlive), - stop: () => cancelFrame(passTimestamp), - /** - * If we're processing this frame we can use the - * framelocked timestamp to keep things in sync. - */ - now: () => (frameData.isProcessing ? frameData.timestamp : time.now()), - }; -}; - -const generateLinearEasing = (easing, duration, // as milliseconds -resolution = 10 // as milliseconds -) => { - let points = ""; - const numPoints = Math.max(Math.round(duration / resolution), 2); - for (let i = 0; i < numPoints; i++) { - points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + ", "; - } - return `linear(${points.substring(0, points.length - 2)})`; -}; - -/** - * Implement a practical max duration for keyframe generation - * to prevent infinite loops - */ -const maxGeneratorDuration = 20000; -function calcGeneratorDuration(generator) { - let duration = 0; - const timeStep = 50; - let state = generator.next(duration); - while (!state.done && duration < maxGeneratorDuration) { - duration += timeStep; - state = generator.next(duration); - } - return duration >= maxGeneratorDuration ? Infinity : duration; -} - -/** - * Create a progress => progress easing function from a generator. - */ -function createGeneratorEasing(options, scale = 100, createGenerator) { - const generator = createGenerator({ ...options, keyframes: [0, scale] }); - const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration); - return { - type: "keyframes", - ease: (progress) => { - return generator.next(duration * progress).value / scale; - }, - duration: motionUtils.millisecondsToSeconds(duration), - }; -} - -const springDefaults = { - // Default spring physics - stiffness: 100, - damping: 10, - mass: 1.0, - velocity: 0.0, - // Default duration/bounce-based options - duration: 800, // in ms - bounce: 0.3, - visualDuration: 0.3, // in seconds - // Rest thresholds - restSpeed: { - granular: 0.01, - default: 2, - }, - restDelta: { - granular: 0.005, - default: 0.5, - }, - // Limits - minDuration: 0.01, // in seconds - maxDuration: 10.0, // in seconds - minDamping: 0.05, - maxDamping: 1, -}; -function calcAngularFreq(undampedFreq, dampingRatio) { - return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio); -} -const rootIterations = 12; -function approximateRoot(envelope, derivative, initialGuess) { - let result = initialGuess; - for (let i = 1; i < rootIterations; i++) { - result = result - envelope(result) / derivative(result); - } - return result; -} -/** - * This is ported from the Framer implementation of duration-based spring resolution. - */ -const safeMin = 0.001; -function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) { - let envelope; - let derivative; - motionUtils.warning(duration <= motionUtils.secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit"); - let dampingRatio = 1 - bounce; - /** - * Restrict dampingRatio and duration to within acceptable ranges. - */ - dampingRatio = motionUtils.clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio); - duration = motionUtils.clamp(springDefaults.minDuration, springDefaults.maxDuration, motionUtils.millisecondsToSeconds(duration)); - if (dampingRatio < 1) { - /** - * Underdamped spring - */ - envelope = (undampedFreq) => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const a = exponentialDecay - velocity; - const b = calcAngularFreq(undampedFreq, dampingRatio); - const c = Math.exp(-delta); - return safeMin - (a / b) * c; - }; - derivative = (undampedFreq) => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const d = delta * velocity + velocity; - const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration; - const f = Math.exp(-delta); - const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio); - const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1; - return (factor * ((d - e) * f)) / g; - }; - } - else { - /** - * Critically-damped spring - */ - envelope = (undampedFreq) => { - const a = Math.exp(-undampedFreq * duration); - const b = (undampedFreq - velocity) * duration + 1; - return -safeMin + a * b; - }; - derivative = (undampedFreq) => { - const a = Math.exp(-undampedFreq * duration); - const b = (velocity - undampedFreq) * (duration * duration); - return a * b; - }; - } - const initialGuess = 5 / duration; - const undampedFreq = approximateRoot(envelope, derivative, initialGuess); - duration = motionUtils.secondsToMilliseconds(duration); - if (isNaN(undampedFreq)) { - return { - stiffness: springDefaults.stiffness, - damping: springDefaults.damping, - duration, - }; - } - else { - const stiffness = Math.pow(undampedFreq, 2) * mass; - return { - stiffness, - damping: dampingRatio * 2 * Math.sqrt(mass * stiffness), - duration, - }; - } -} -const durationKeys = ["duration", "bounce"]; -const physicsKeys = ["stiffness", "damping", "mass"]; -function isSpringType(options, keys) { - return keys.some((key) => options[key] !== undefined); -} -function getSpringOptions(options) { - let springOptions = { - velocity: springDefaults.velocity, - stiffness: springDefaults.stiffness, - damping: springDefaults.damping, - mass: springDefaults.mass, - isResolvedFromDuration: false, - ...options, - }; - // stiffness/damping/mass overrides duration/bounce - if (!isSpringType(options, physicsKeys) && - isSpringType(options, durationKeys)) { - // Time-defined springs should ignore inherited velocity. - // Velocity from interrupted animations can cause findSpring() - // to compute wildly different spring parameters, leading to - // massive oscillation on small-range animations. - springOptions.velocity = 0; - if (options.visualDuration) { - const visualDuration = options.visualDuration; - const root = (2 * Math.PI) / (visualDuration * 1.2); - const stiffness = root * root; - const damping = 2 * - motionUtils.clamp(0.05, 1, 1 - (options.bounce || 0)) * - Math.sqrt(stiffness); - springOptions = { - ...springOptions, - mass: springDefaults.mass, - stiffness, - damping, - }; - } - else { - const derived = findSpring({ ...options, velocity: 0 }); - springOptions = { - ...springOptions, - ...derived, - mass: springDefaults.mass, - }; - springOptions.isResolvedFromDuration = true; - } - } - return springOptions; -} -function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) { - const options = typeof optionsOrVisualDuration !== "object" - ? { - visualDuration: optionsOrVisualDuration, - keyframes: [0, 1], - bounce, - } - : optionsOrVisualDuration; - let { restSpeed, restDelta } = options; - const origin = options.keyframes[0]; - const target = options.keyframes[options.keyframes.length - 1]; - /** - * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator - * to reduce GC during animation. - */ - const state = { done: false, value: origin }; - const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({ - ...options, - velocity: -motionUtils.millisecondsToSeconds(options.velocity || 0), - }); - const initialVelocity = velocity || 0.0; - const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass)); - const initialDelta = target - origin; - const undampedAngularFreq = motionUtils.millisecondsToSeconds(Math.sqrt(stiffness / mass)); - /** - * If we're working on a granular scale, use smaller defaults for determining - * when the spring is finished. - * - * These defaults have been selected emprically based on what strikes a good - * ratio between feeling good and finishing as soon as changes are imperceptible. - */ - const isGranularScale = Math.abs(initialDelta) < 5; - restSpeed || (restSpeed = isGranularScale - ? springDefaults.restSpeed.granular - : springDefaults.restSpeed.default); - restDelta || (restDelta = isGranularScale - ? springDefaults.restDelta.granular - : springDefaults.restDelta.default); - let resolveSpring; - let resolveVelocity; - // Underdamped coefficients, hoisted for use in the inlined next() hot path - let angularFreq; - let A; - let sinCoeff; - let cosCoeff; - if (dampingRatio < 1) { - angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio); - A = - (initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) / - angularFreq; - // Underdamped spring - resolveSpring = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return (target - - envelope * - (A * Math.sin(angularFreq * t) + - initialDelta * Math.cos(angularFreq * t))); - }; - // Analytical derivative of underdamped spring (px/ms) - sinCoeff = - dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq; - cosCoeff = - dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq; - resolveVelocity = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return envelope * - (sinCoeff * Math.sin(angularFreq * t) + - cosCoeff * Math.cos(angularFreq * t)); - }; - } - else if (dampingRatio === 1) { - // Critically damped spring - resolveSpring = (t) => target - - Math.exp(-undampedAngularFreq * t) * - (initialDelta + - (initialVelocity + undampedAngularFreq * initialDelta) * t); - // Analytical derivative of critically damped spring (px/ms) - const C = initialVelocity + undampedAngularFreq * initialDelta; - resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) * - (undampedAngularFreq * C * t - initialVelocity); - } - else { - // Overdamped spring - const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1); - resolveSpring = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - // When performing sinh or cosh values can hit Infinity so we cap them here - const freqForT = Math.min(dampedAngularFreq * t, 300); - return (target - - (envelope * - ((initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) * - Math.sinh(freqForT) + - dampedAngularFreq * - initialDelta * - Math.cosh(freqForT))) / - dampedAngularFreq); - }; - // Analytical derivative of overdamped spring (px/ms) - const P = (initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) / - dampedAngularFreq; - const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq; - const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq; - resolveVelocity = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const freqForT = Math.min(dampedAngularFreq * t, 300); - return envelope * - (sinhCoeff * Math.sinh(freqForT) + - coshCoeff * Math.cosh(freqForT)); - }; - } - const generator = { - calculatedDuration: isResolvedFromDuration ? duration || null : null, - velocity: (t) => motionUtils.secondsToMilliseconds(resolveVelocity(t)), - next: (t) => { - /** - * For underdamped physics springs we need both position and - * velocity each tick. Compute shared trig values once to avoid - * duplicate Math.exp/sin/cos calls on the hot path. - */ - if (!isResolvedFromDuration && dampingRatio < 1) { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const sin = Math.sin(angularFreq * t); - const cos = Math.cos(angularFreq * t); - const current = target - - envelope * - (A * sin + initialDelta * cos); - const currentVelocity = motionUtils.secondsToMilliseconds(envelope * - (sinCoeff * sin + cosCoeff * cos)); - state.done = - Math.abs(currentVelocity) <= restSpeed && - Math.abs(target - current) <= restDelta; - state.value = state.done ? target : current; - return state; - } - const current = resolveSpring(t); - if (!isResolvedFromDuration) { - const currentVelocity = motionUtils.secondsToMilliseconds(resolveVelocity(t)); - state.done = - Math.abs(currentVelocity) <= restSpeed && - Math.abs(target - current) <= restDelta; - } - else { - state.done = t >= duration; - } - state.value = state.done ? target : current; - return state; - }, - toString: () => { - const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration); - const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30); - return calculatedDuration + "ms " + easing; - }, - toTransition: () => { }, - }; - return generator; -} -spring.applyToOptions = (options) => { - const generatorOptions = createGeneratorEasing(options, 100, spring); - options.ease = generatorOptions.ease; - options.duration = motionUtils.secondsToMilliseconds(generatorOptions.duration); - options.type = "keyframes"; - return options; -}; - -const velocitySampleDuration = 5; // ms -function getGeneratorVelocity(resolveValue, t, current) { - const prevT = Math.max(t - velocitySampleDuration, 0); - return motionUtils.velocityPerSecond(current - resolveValue(prevT), t - prevT); -} - -function inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) { - const origin = keyframes[0]; - const state = { - done: false, - value: origin, - }; - const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max); - const nearestBoundary = (v) => { - if (min === undefined) - return max; - if (max === undefined) - return min; - return Math.abs(min - v) < Math.abs(max - v) ? min : max; - }; - let amplitude = power * velocity; - const ideal = origin + amplitude; - const target = modifyTarget === undefined ? ideal : modifyTarget(ideal); - /** - * If the target has changed we need to re-calculate the amplitude, otherwise - * the animation will start from the wrong position. - */ - if (target !== ideal) - amplitude = target - origin; - const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant); - const calcLatest = (t) => target + calcDelta(t); - const applyFriction = (t) => { - const delta = calcDelta(t); - const latest = calcLatest(t); - state.done = Math.abs(delta) <= restDelta; - state.value = state.done ? target : latest; - }; - /** - * Ideally this would resolve for t in a stateless way, we could - * do that by always precalculating the animation but as we know - * this will be done anyway we can assume that spring will - * be discovered during that. - */ - let timeReachedBoundary; - let spring$1; - const checkCatchBoundary = (t) => { - if (!isOutOfBounds(state.value)) - return; - timeReachedBoundary = t; - spring$1 = spring({ - keyframes: [state.value, nearestBoundary(state.value)], - velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000 - damping: bounceDamping, - stiffness: bounceStiffness, - restDelta, - restSpeed, - }); - }; - checkCatchBoundary(0); - return { - calculatedDuration: null, - next: (t) => { - /** - * We need to resolve the friction to figure out if we need a - * spring but we don't want to do this twice per frame. So here - * we flag if we updated for this frame and later if we did - * we can skip doing it again. - */ - let hasUpdatedFrame = false; - if (!spring$1 && timeReachedBoundary === undefined) { - hasUpdatedFrame = true; - applyFriction(t); - checkCatchBoundary(t); - } - /** - * If we have a spring and the provided t is beyond the moment the friction - * animation crossed the min/max boundary, use the spring. - */ - if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) { - return spring$1.next(t - timeReachedBoundary); - } - else { - !hasUpdatedFrame && applyFriction(t); - return state; - } - }, - }; -} - -function createMixers(output, ease, customMixer) { - const mixers = []; - const mixerFactory = customMixer || motionUtils.MotionGlobalConfig.mix || mix; - const numMixers = output.length - 1; - for (let i = 0; i < numMixers; i++) { - let mixer = mixerFactory(output[i], output[i + 1]); - if (ease) { - const easingFunction = Array.isArray(ease) ? ease[i] || motionUtils.noop : ease; - mixer = motionUtils.pipe(easingFunction, mixer); - } - mixers.push(mixer); - } - return mixers; -} -/** - * Create a function that maps from a numerical input array to a generic output array. - * - * Accepts: - * - Numbers - * - Colors (hex, hsl, hsla, rgb, rgba) - * - Complex (combinations of one or more numbers or strings) - * - * ```jsx - * const mixColor = interpolate([0, 1], ['#fff', '#000']) - * - * mixColor(0.5) // 'rgba(128, 128, 128, 1)' - * ``` - * - * TODO Revisit this approach once we've moved to data models for values, - * probably not needed to pregenerate mixer functions. - * - * @public - */ -function interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) { - const inputLength = input.length; - motionUtils.invariant(inputLength === output.length, "Both input and output ranges must be the same length", "range-length"); - /** - * If we're only provided a single input, we can just make a function - * that returns the output. - */ - if (inputLength === 1) - return () => output[0]; - if (inputLength === 2 && output[0] === output[1]) - return () => output[1]; - const isZeroDeltaRange = input[0] === input[1]; - // If input runs highest -> lowest, reverse both arrays - if (input[0] > input[inputLength - 1]) { - input = [...input].reverse(); - output = [...output].reverse(); - } - const mixers = createMixers(output, ease, mixer); - const numMixers = mixers.length; - const interpolator = (v) => { - if (isZeroDeltaRange && v < input[0]) - return output[0]; - let i = 0; - if (numMixers > 1) { - for (; i < input.length - 2; i++) { - if (v < input[i + 1]) - break; - } - } - const progressInRange = motionUtils.progress(input[i], input[i + 1], v); - return mixers[i](progressInRange); - }; - return isClamp - ? (v) => interpolator(motionUtils.clamp(input[0], input[inputLength - 1], v)) - : interpolator; -} - -function fillOffset(offset, remaining) { - const min = offset[offset.length - 1]; - for (let i = 1; i <= remaining; i++) { - const offsetProgress = motionUtils.progress(0, remaining, i); - offset.push(mixNumber$1(min, 1, offsetProgress)); - } -} - -function defaultOffset(arr) { - const offset = [0]; - fillOffset(offset, arr.length - 1); - return offset; -} - -function convertOffsetToTimes(offset, duration) { - return offset.map((o) => o * duration); -} - -function defaultEasing(values, easing) { - return values.map(() => easing || motionUtils.easeInOut).splice(0, values.length - 1); -} -function keyframes({ duration = 300, keyframes: keyframeValues, times, ease = "easeInOut", }) { - /** - * Easing functions can be externally defined as strings. Here we convert them - * into actual functions. - */ - const easingFunctions = motionUtils.isEasingArray(ease) - ? ease.map(motionUtils.easingDefinitionToFunction) - : motionUtils.easingDefinitionToFunction(ease); - /** - * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator - * to reduce GC during animation. - */ - const state = { - done: false, - value: keyframeValues[0], - }; - /** - * Create a times array based on the provided 0-1 offsets - */ - const absoluteTimes = convertOffsetToTimes( - // Only use the provided offsets if they're the correct length - // TODO Maybe we should warn here if there's a length mismatch - times && times.length === keyframeValues.length - ? times - : defaultOffset(keyframeValues), duration); - const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, { - ease: Array.isArray(easingFunctions) - ? easingFunctions - : defaultEasing(keyframeValues, easingFunctions), - }); - return { - calculatedDuration: duration, - next: (t) => { - state.value = mapTimeToKeyframe(t); - state.done = t >= duration; - return state; - }, - }; -} - -const isNotNull = (value) => value !== null; -function getFinalKeyframe(keyframes, { repeat, repeatType = "loop" }, finalKeyframe, speed = 1) { - const resolvedKeyframes = keyframes.filter(isNotNull); - const useFirstKeyframe = speed < 0 || (repeat && repeatType !== "loop" && repeat % 2 === 1); - const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1; - return !index || finalKeyframe === undefined - ? resolvedKeyframes[index] - : finalKeyframe; -} - -const transitionTypeMap = { - decay: inertia, - inertia, - tween: keyframes, - keyframes: keyframes, - spring, -}; -function replaceTransitionType(transition) { - if (typeof transition.type === "string") { - transition.type = transitionTypeMap[transition.type]; - } -} - -class WithPromise { - constructor() { - this.updateFinished(); - } - get finished() { - return this._finished; - } - updateFinished() { - this._finished = new Promise((resolve) => { - this.resolve = resolve; - }); - } - notifyFinished() { - this.resolve(); - } - /** - * Allows the animation to be awaited. - * - * @deprecated Use `finished` instead. - */ - then(onResolve, onReject) { - return this.finished.then(onResolve, onReject); - } -} - -const percentToProgress = (percent) => percent / 100; -class JSAnimation extends WithPromise { - constructor(options) { - super(); - this.state = "idle"; - this.startTime = null; - this.isStopped = false; - /** - * The current time of the animation. - */ - this.currentTime = 0; - /** - * The time at which the animation was paused. - */ - this.holdTime = null; - /** - * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed. - */ - this.playbackSpeed = 1; - /** - * Reusable state object for the delay phase to avoid - * allocating a new object every frame. - */ - this.delayState = { - done: false, - value: undefined, - }; - /** - * This method is bound to the instance to fix a pattern where - * animation.stop is returned as a reference from a useEffect. - */ - this.stop = () => { - const { motionValue } = this.options; - if (motionValue && motionValue.updatedAt !== time.now()) { - this.tick(time.now()); - } - this.isStopped = true; - if (this.state === "idle") - return; - this.teardown(); - this.options.onStop?.(); - }; - activeAnimations.mainThread++; - this.options = options; - this.initAnimation(); - this.play(); - if (options.autoplay === false) - this.pause(); - } - initAnimation() { - const { options } = this; - replaceTransitionType(options); - const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options; - let { keyframes: keyframes$1 } = options; - const generatorFactory = type || keyframes; - if (process.env.NODE_ENV !== "production" && - generatorFactory !== keyframes) { - motionUtils.invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, "spring-two-frames"); - } - if (generatorFactory !== keyframes && - typeof keyframes$1[0] !== "number") { - this.mixKeyframes = motionUtils.pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1])); - keyframes$1 = [0, 100]; - } - const generator = generatorFactory({ ...options, keyframes: keyframes$1 }); - /** - * If we have a mirror repeat type we need to create a second generator that outputs the - * mirrored (not reversed) animation and later ping pong between the two generators. - */ - if (repeatType === "mirror") { - this.mirroredGenerator = generatorFactory({ - ...options, - keyframes: [...keyframes$1].reverse(), - velocity: -velocity, - }); - } - /** - * If duration is undefined and we have repeat options, - * we need to calculate a duration from the generator. - * - * We set it to the generator itself to cache the duration. - * Any timeline resolver will need to have already precalculated - * the duration by this step. - */ - if (generator.calculatedDuration === null) { - generator.calculatedDuration = calcGeneratorDuration(generator); - } - const { calculatedDuration } = generator; - this.calculatedDuration = calculatedDuration; - this.resolvedDuration = calculatedDuration + repeatDelay; - this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay; - this.generator = generator; - } - updateTime(timestamp) { - const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed; - // Update currentTime - if (this.holdTime !== null) { - this.currentTime = this.holdTime; - } - else { - // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 = - // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for - // example. - this.currentTime = animationTime; - } - } - tick(timestamp, sample = false) { - const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this; - if (this.startTime === null) - return generator.next(0); - const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options; - /** - * requestAnimationFrame timestamps can come through as lower than - * the startTime as set by performance.now(). Here we prevent this, - * though in the future it could be possible to make setting startTime - * a pending operation that gets resolved here. - */ - if (this.speed > 0) { - this.startTime = Math.min(this.startTime, timestamp); - } - else if (this.speed < 0) { - this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime); - } - if (sample) { - this.currentTime = timestamp; - } - else { - this.updateTime(timestamp); - } - // Rebase on delay - const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1); - const isInDelayPhase = this.playbackSpeed >= 0 - ? timeWithoutDelay < 0 - : timeWithoutDelay > totalDuration; - this.currentTime = Math.max(timeWithoutDelay, 0); - // If this animation has finished, set the current time to the total duration. - if (this.state === "finished" && this.holdTime === null) { - this.currentTime = totalDuration; - } - let elapsed = this.currentTime; - let frameGenerator = generator; - if (repeat) { - /** - * Get the current progress (0-1) of the animation. If t is > - * than duration we'll get values like 2.5 (midway through the - * third iteration) - */ - const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration; - /** - * Get the current iteration (0 indexed). For instance the floor of - * 2.5 is 2. - */ - let currentIteration = Math.floor(progress); - /** - * Get the current progress of the iteration by taking the remainder - * so 2.5 is 0.5 through iteration 2 - */ - let iterationProgress = progress % 1.0; - /** - * If iteration progress is 1 we count that as the end - * of the previous iteration. - */ - if (!iterationProgress && progress >= 1) { - iterationProgress = 1; - } - iterationProgress === 1 && currentIteration--; - currentIteration = Math.min(currentIteration, repeat + 1); - /** - * Reverse progress if we're not running in "normal" direction - */ - const isOddIteration = Boolean(currentIteration % 2); - if (isOddIteration) { - if (repeatType === "reverse") { - iterationProgress = 1 - iterationProgress; - if (repeatDelay) { - iterationProgress -= repeatDelay / resolvedDuration; - } - } - else if (repeatType === "mirror") { - frameGenerator = mirroredGenerator; - } - } - elapsed = motionUtils.clamp(0, 1, iterationProgress) * resolvedDuration; - } - /** - * If we're in negative time, set state as the initial keyframe. - * This prevents delay: x, duration: 0 animations from finishing - * instantly. - */ - let state; - if (isInDelayPhase) { - this.delayState.value = keyframes[0]; - state = this.delayState; - } - else { - state = frameGenerator.next(elapsed); - } - if (mixKeyframes && !isInDelayPhase) { - state.value = mixKeyframes(state.value); - } - let { done } = state; - if (!isInDelayPhase && calculatedDuration !== null) { - done = - this.playbackSpeed >= 0 - ? this.currentTime >= totalDuration - : this.currentTime <= 0; - } - const isAnimationFinished = this.holdTime === null && - (this.state === "finished" || (this.state === "running" && done)); - // TODO: The exception for inertia could be cleaner here - if (isAnimationFinished && type !== inertia) { - state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed); - } - if (onUpdate) { - onUpdate(state.value); - } - if (isAnimationFinished) { - this.finish(); - } - return state; - } - /** - * Allows the returned animation to be awaited or promise-chained. Currently - * resolves when the animation finishes at all but in a future update could/should - * reject if its cancels. - */ - then(resolve, reject) { - return this.finished.then(resolve, reject); - } - get duration() { - return motionUtils.millisecondsToSeconds(this.calculatedDuration); - } - get iterationDuration() { - const { delay = 0 } = this.options || {}; - return this.duration + motionUtils.millisecondsToSeconds(delay); - } - get time() { - return motionUtils.millisecondsToSeconds(this.currentTime); - } - set time(newTime) { - newTime = motionUtils.secondsToMilliseconds(newTime); - this.currentTime = newTime; - if (this.startTime === null || - this.holdTime !== null || - this.playbackSpeed === 0) { - this.holdTime = newTime; - } - else if (this.driver) { - this.startTime = this.driver.now() - newTime / this.playbackSpeed; - } - if (this.driver) { - this.driver.start(false); - } - else { - this.startTime = 0; - this.state = "paused"; - this.holdTime = newTime; - this.tick(newTime); - } - } - /** - * Returns the generator's velocity at the current time in units/second. - * Uses the analytical derivative when available (springs), avoiding - * the MotionValue's frame-dependent velocity estimation. - */ - getGeneratorVelocity() { - const t = this.currentTime; - if (t <= 0) - return this.options.velocity || 0; - if (this.generator.velocity) { - return this.generator.velocity(t); - } - // Fallback: finite difference - const current = this.generator.next(t).value; - return getGeneratorVelocity((s) => this.generator.next(s).value, t, current); - } - get speed() { - return this.playbackSpeed; - } - set speed(newSpeed) { - const hasChanged = this.playbackSpeed !== newSpeed; - if (hasChanged && this.driver) { - this.updateTime(time.now()); - } - this.playbackSpeed = newSpeed; - if (hasChanged && this.driver) { - this.time = motionUtils.millisecondsToSeconds(this.currentTime); - } - } - play() { - if (this.isStopped) - return; - const { driver = frameloopDriver, startTime } = this.options; - if (!this.driver) { - this.driver = driver((timestamp) => this.tick(timestamp)); - } - this.options.onPlay?.(); - const now = this.driver.now(); - if (this.state === "finished") { - this.updateFinished(); - this.startTime = now; - } - else if (this.holdTime !== null) { - this.startTime = now - this.holdTime; - } - else if (!this.startTime) { - this.startTime = startTime ?? now; - } - if (this.state === "finished" && this.speed < 0) { - this.startTime += this.calculatedDuration; - } - this.holdTime = null; - /** - * Set playState to running only after we've used it in - * the previous logic. - */ - this.state = "running"; - this.driver.start(); - } - pause() { - this.state = "paused"; - this.updateTime(time.now()); - this.holdTime = this.currentTime; - } - complete() { - if (this.state !== "running") { - this.play(); - } - this.state = "finished"; - this.holdTime = null; - } - finish() { - this.notifyFinished(); - this.teardown(); - this.state = "finished"; - this.options.onComplete?.(); - } - cancel() { - this.holdTime = null; - this.startTime = 0; - this.tick(0); - this.teardown(); - this.options.onCancel?.(); - } - teardown() { - this.state = "idle"; - this.stopDriver(); - this.startTime = this.holdTime = null; - activeAnimations.mainThread--; - } - stopDriver() { - if (!this.driver) - return; - this.driver.stop(); - this.driver = undefined; - } - sample(sampleTime) { - this.startTime = 0; - return this.tick(sampleTime, true); - } - attachTimeline(timeline) { - if (this.options.allowFlatten) { - this.options.type = "keyframes"; - this.options.ease = "linear"; - this.initAnimation(); - } - this.driver?.stop(); - return timeline.observe(this); - } -} -// Legacy function support -function animateValue(options) { - return new JSAnimation(options); -} - -function fillWildcards(keyframes) { - for (let i = 1; i < keyframes.length; i++) { - keyframes[i] ?? (keyframes[i] = keyframes[i - 1]); - } -} - -const radToDeg = (rad) => (rad * 180) / Math.PI; -const rotate = (v) => { - const angle = radToDeg(Math.atan2(v[1], v[0])); - return rebaseAngle(angle); -}; -const matrix2dParsers = { - x: 4, - y: 5, - translateX: 4, - translateY: 5, - scaleX: 0, - scaleY: 3, - scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2, - rotate, - rotateZ: rotate, - skewX: (v) => radToDeg(Math.atan(v[1])), - skewY: (v) => radToDeg(Math.atan(v[2])), - skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2, -}; -const rebaseAngle = (angle) => { - angle = angle % 360; - if (angle < 0) - angle += 360; - return angle; -}; -const rotateZ = rotate; -const scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]); -const scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]); -const matrix3dParsers = { - x: 12, - y: 13, - z: 14, - translateX: 12, - translateY: 13, - translateZ: 14, - scaleX, - scaleY, - scale: (v) => (scaleX(v) + scaleY(v)) / 2, - rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))), - rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))), - rotateZ, - rotate: rotateZ, - skewX: (v) => radToDeg(Math.atan(v[4])), - skewY: (v) => radToDeg(Math.atan(v[1])), - skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2, -}; -function defaultTransformValue(name) { - return name.includes("scale") ? 1 : 0; -} -function parseValueFromTransform(transform, name) { - if (!transform || transform === "none") { - return defaultTransformValue(name); - } - const matrix3dMatch = transform.match(/^matrix3d\(([-\d.e\s,]+)\)$/u); - let parsers; - let match; - if (matrix3dMatch) { - parsers = matrix3dParsers; - match = matrix3dMatch; - } - else { - const matrix2dMatch = transform.match(/^matrix\(([-\d.e\s,]+)\)$/u); - parsers = matrix2dParsers; - match = matrix2dMatch; - } - if (!match) { - return defaultTransformValue(name); - } - const valueParser = parsers[name]; - const values = match[1].split(",").map(convertTransformToNumber); - return typeof valueParser === "function" - ? valueParser(values) - : values[valueParser]; -} -const readTransformValue = (instance, name) => { - const { transform = "none" } = getComputedStyle(instance); - return parseValueFromTransform(transform, name); -}; -function convertTransformToNumber(value) { - return parseFloat(value.trim()); -} - -/** - * Generate a list of every possible transform key. - */ -const transformPropOrder = [ - "transformPerspective", - "x", - "y", - "z", - "translateX", - "translateY", - "translateZ", - "scale", - "scaleX", - "scaleY", - "rotate", - "rotateX", - "rotateY", - "rotateZ", - "skew", - "skewX", - "skewY", -]; -/** - * A quick lookup for transform props. - * - * `pathRotation` is a transform for routing purposes (skipped from raw - * style application, wired to the transform composite, flags transform - * dirty) but is intentionally NOT in `transformPropOrder` — it is - * composed onto `rotate` at the build sites, not serialized in its own - * slot, and must stay out of the order-array consumers (parse-transform, - * unit-conversion, keys-position). - */ -const transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, "pathRotation"]))(); - -const isNumOrPxType = (v) => v === number || v === px; -const transformKeys = new Set(["x", "y", "z"]); -const nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key)); -function removeNonTranslationalTransform(visualElement) { - const removedTransforms = []; - nonTranslationalTransformKeys.forEach((key) => { - const value = visualElement.getValue(key); - if (value !== undefined) { - removedTransforms.push([key, value.get()]); - value.set(key.startsWith("scale") ? 1 : 0); - } - }); - return removedTransforms; -} -const positionalValues = { - // Dimensions - width: ({ x }, { paddingLeft = "0", paddingRight = "0", boxSizing }) => { - const width = x.max - x.min; - return boxSizing === "border-box" - ? width - : width - parseFloat(paddingLeft) - parseFloat(paddingRight); - }, - height: ({ y }, { paddingTop = "0", paddingBottom = "0", boxSizing }) => { - const height = y.max - y.min; - return boxSizing === "border-box" - ? height - : height - parseFloat(paddingTop) - parseFloat(paddingBottom); - }, - top: (_bbox, { top }) => parseFloat(top), - left: (_bbox, { left }) => parseFloat(left), - bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min), - right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min), - // Transform - x: (_bbox, { transform }) => parseValueFromTransform(transform, "x"), - y: (_bbox, { transform }) => parseValueFromTransform(transform, "y"), -}; -// Alias translate longform names -positionalValues.translateX = positionalValues.x; -positionalValues.translateY = positionalValues.y; - -const toResolve = new Set(); -let isScheduled = false; -let anyNeedsMeasurement = false; -let isForced = false; -function measureAllKeyframes() { - if (anyNeedsMeasurement) { - const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement); - const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element)); - const transformsToRestore = new Map(); - /** - * Write pass - * If we're measuring elements we want to remove bounding box-changing transforms. - */ - elementsToMeasure.forEach((element) => { - const removedTransforms = removeNonTranslationalTransform(element); - if (!removedTransforms.length) - return; - transformsToRestore.set(element, removedTransforms); - element.render(); - }); - // Read - resolversToMeasure.forEach((resolver) => resolver.measureInitialState()); - // Write - elementsToMeasure.forEach((element) => { - element.render(); - const restore = transformsToRestore.get(element); - if (restore) { - restore.forEach(([key, value]) => { - element.getValue(key)?.set(value); - }); - } - }); - // Read - resolversToMeasure.forEach((resolver) => resolver.measureEndState()); - // Write - resolversToMeasure.forEach((resolver) => { - if (resolver.suspendedScrollY !== undefined) { - window.scrollTo(0, resolver.suspendedScrollY); - } - }); - } - anyNeedsMeasurement = false; - isScheduled = false; - toResolve.forEach((resolver) => resolver.complete(isForced)); - toResolve.clear(); -} -function readAllKeyframes() { - toResolve.forEach((resolver) => { - resolver.readKeyframes(); - if (resolver.needsMeasurement) { - anyNeedsMeasurement = true; - } - }); -} -function flushKeyframeResolvers() { - isForced = true; - readAllKeyframes(); - measureAllKeyframes(); - isForced = false; -} -class KeyframeResolver { - constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) { - this.state = "pending"; - /** - * Track whether this resolver is async. If it is, it'll be added to the - * resolver queue and flushed in the next frame. Resolvers that aren't going - * to trigger read/write thrashing don't need to be async. - */ - this.isAsync = false; - /** - * Track whether this resolver needs to perform a measurement - * to resolve its keyframes. - */ - this.needsMeasurement = false; - this.unresolvedKeyframes = [...unresolvedKeyframes]; - this.onComplete = onComplete; - this.name = name; - this.motionValue = motionValue; - this.element = element; - this.isAsync = isAsync; - } - scheduleResolve() { - this.state = "scheduled"; - if (this.isAsync) { - toResolve.add(this); - if (!isScheduled) { - isScheduled = true; - frame.read(readAllKeyframes); - frame.resolveKeyframes(measureAllKeyframes); - } - } - else { - this.readKeyframes(); - this.complete(); - } - } - readKeyframes() { - const { unresolvedKeyframes, name, element, motionValue } = this; - // If initial keyframe is null we need to read it from the DOM - if (unresolvedKeyframes[0] === null) { - const currentValue = motionValue?.get(); - // TODO: This doesn't work if the final keyframe is a wildcard - const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1]; - if (currentValue !== undefined) { - unresolvedKeyframes[0] = currentValue; - } - else if (element && name) { - const valueAsRead = element.readValue(name, finalKeyframe); - if (valueAsRead !== undefined && valueAsRead !== null) { - unresolvedKeyframes[0] = valueAsRead; - } - } - if (unresolvedKeyframes[0] === undefined) { - unresolvedKeyframes[0] = finalKeyframe; - } - if (motionValue && currentValue === undefined) { - motionValue.set(unresolvedKeyframes[0]); - } - } - fillWildcards(unresolvedKeyframes); - } - setFinalKeyframe() { } - measureInitialState() { } - renderEndStyles() { } - measureEndState() { } - complete(isForcedComplete = false) { - this.state = "complete"; - this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete); - toResolve.delete(this); - } - cancel() { - if (this.state === "scheduled") { - toResolve.delete(this); - this.state = "pending"; - } - } - resume() { - if (this.state === "pending") - this.scheduleResolve(); - } -} - -const isCSSVar = (name) => name.startsWith("--"); - -function setStyle(element, name, value) { - isCSSVar(name) - ? element.style.setProperty(name, value) - : (element.style[name] = value); -} - -/** - * Add the ability for test suites to manually set support flags - * to better test more environments. - */ -const supportsFlags = {}; - -function memoSupports(callback, supportsFlag) { - const memoized = motionUtils.memo(callback); - return () => supportsFlags[supportsFlag] ?? memoized(); -} - -const supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, "scrollTimeline"); -const supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, "viewTimeline"); - -const supportsLinearEasing = /*@__PURE__*/ memoSupports(() => { - try { - document - .createElement("div") - .animate({ opacity: 0 }, { easing: "linear(0, 1)" }); - } - catch (e) { - return false; - } - return true; -}, "linearEasing"); - -const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`; - -const supportedWaapiEasing = { - linear: "linear", - ease: "ease", - easeIn: "ease-in", - easeOut: "ease-out", - easeInOut: "ease-in-out", - circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]), - circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]), - backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]), - backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]), -}; - -function mapEasingToNativeEasing(easing, duration) { - if (!easing) { - return undefined; - } - else if (typeof easing === "function") { - return supportsLinearEasing() - ? generateLinearEasing(easing, duration) - : "ease-out"; - } - else if (motionUtils.isBezierDefinition(easing)) { - return cubicBezierAsString(easing); - } - else if (Array.isArray(easing)) { - return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) || - supportedWaapiEasing.easeOut); - } - else { - return supportedWaapiEasing[easing]; - } -} - -function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = "loop", ease = "easeOut", times, } = {}, pseudoElement = undefined) { - const keyframeOptions = { - [valueName]: keyframes, - }; - if (times) - keyframeOptions.offset = times; - const easing = mapEasingToNativeEasing(ease, duration); - /** - * If this is an easing array, apply to keyframes, not animation as a whole - */ - if (Array.isArray(easing)) - keyframeOptions.easing = easing; - if (statsBuffer.value) { - activeAnimations.waapi++; - } - const options = { - delay, - duration, - easing: !Array.isArray(easing) ? easing : "linear", - fill: "both", - iterations: repeat + 1, - direction: repeatType === "reverse" ? "alternate" : "normal", - }; - if (pseudoElement) - options.pseudoElement = pseudoElement; - const animation = element.animate(keyframeOptions, options); - if (statsBuffer.value) { - animation.finished.finally(() => { - activeAnimations.waapi--; - }); - } - return animation; -} - -function isGenerator(type) { - return typeof type === "function" && "applyToOptions" in type; -} - -function applyGeneratorOptions({ type, ...options }) { - if (isGenerator(type) && supportsLinearEasing()) { - return type.applyToOptions(options); - } - else { - options.duration ?? (options.duration = 300); - options.ease ?? (options.ease = "easeOut"); - } - return options; -} - -/** - * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API. - */ -class NativeAnimation extends WithPromise { - constructor(options) { - super(); - this.finishedTime = null; - this.isStopped = false; - /** - * Tracks a manually-set start time that takes precedence over WAAPI's - * dynamic startTime. This is cleared when play() or time setter is called, - * allowing WAAPI to take over timing. - */ - this.manualStartTime = null; - if (!options) - return; - const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options; - this.isPseudoElement = Boolean(pseudoElement); - this.allowFlatten = allowFlatten; - this.options = options; - motionUtils.invariant(typeof options.type !== "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring"); - const transition = applyGeneratorOptions(options); - this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement); - if (transition.autoplay === false) { - this.animation.pause(); - } - this.animation.onfinish = () => { - this.finishedTime = this.time; - if (!pseudoElement) { - const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed); - if (this.updateMotionValue) { - this.updateMotionValue(keyframe); - } - /** - * If we can, we want to commit the final style as set by the user, - * rather than the computed keyframe value supplied by the animation. - * We always do this, even when a motion value is present, to prevent - * a visual flash in Firefox where the WAAPI animation's fill is removed - * during cancel() before the scheduled render can apply the correct value. - */ - setStyle(element, name, keyframe); - this.animation.cancel(); - } - onComplete?.(); - this.notifyFinished(); - }; - } - play() { - if (this.isStopped) - return; - this.manualStartTime = null; - this.animation.play(); - if (this.state === "finished") { - this.updateFinished(); - } - } - pause() { - this.animation.pause(); - } - complete() { - this.animation.finish?.(); - } - cancel() { - try { - this.animation.cancel(); - } - catch (e) { } - } - stop() { - if (this.isStopped) - return; - this.isStopped = true; - const { state } = this; - if (state === "idle" || state === "finished") { - return; - } - if (this.updateMotionValue) { - this.updateMotionValue(); - } - else { - this.commitStyles(); - } - if (!this.isPseudoElement) - this.cancel(); - } - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * In this method, we commit styles back to the DOM before cancelling - * the animation. - * - * This is designed to be overridden by NativeAnimationExtended, which - * will create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to also correctly calculate velocity for any subsequent animation - * while deferring the commit until the next animation frame. - */ - commitStyles() { - const element = this.options?.element; - if (!this.isPseudoElement && element?.isConnected) { - this.animation.commitStyles?.(); - } - } - get duration() { - const duration = this.animation.effect?.getComputedTiming?.().duration || 0; - return motionUtils.millisecondsToSeconds(Number(duration)); - } - get iterationDuration() { - const { delay = 0 } = this.options || {}; - return this.duration + motionUtils.millisecondsToSeconds(delay); - } - get time() { - return motionUtils.millisecondsToSeconds(Number(this.animation.currentTime) || 0); - } - set time(newTime) { - const wasFinished = this.finishedTime !== null; - this.manualStartTime = null; - this.finishedTime = null; - this.animation.currentTime = motionUtils.secondsToMilliseconds(newTime); - if (wasFinished) { - this.animation.pause(); - } - } - /** - * The playback speed of the animation. - * 1 = normal speed, 2 = double speed, 0.5 = half speed. - */ - get speed() { - return this.animation.playbackRate; - } - set speed(newSpeed) { - // Allow backwards playback after finishing - if (newSpeed < 0) - this.finishedTime = null; - this.animation.playbackRate = newSpeed; - } - get state() { - return this.finishedTime !== null - ? "finished" - : this.animation.playState; - } - get startTime() { - return this.manualStartTime ?? Number(this.animation.startTime); - } - set startTime(newStartTime) { - this.manualStartTime = this.animation.startTime = newStartTime; - } - /** - * Attaches a timeline to the animation, for instance the `ScrollTimeline`. - */ - attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) { - if (this.allowFlatten) { - this.animation.effect?.updateTiming({ easing: "linear" }); - } - this.animation.onfinish = null; - if (timeline && supportsScrollTimeline()) { - this.animation.timeline = timeline; - if (rangeStart) - this.animation.rangeStart = rangeStart; - if (rangeEnd) - this.animation.rangeEnd = rangeEnd; - return motionUtils.noop; - } - else { - return observe(this); - } - } -} - -const unsupportedEasingFunctions = { - anticipate: motionUtils.anticipate, - backInOut: motionUtils.backInOut, - circInOut: motionUtils.circInOut, -}; -function isUnsupportedEase(key) { - return key in unsupportedEasingFunctions; -} -function replaceStringEasing(transition) { - if (typeof transition.ease === "string" && - isUnsupportedEase(transition.ease)) { - transition.ease = unsupportedEasingFunctions[transition.ease]; - } -} - -/** - * 10ms is chosen here as it strikes a balance between smooth - * results (more than one keyframe per frame at 60fps) and - * keyframe quantity. - */ -const sampleDelta = 10; //ms -class NativeAnimationExtended extends NativeAnimation { - constructor(options) { - /** - * The base NativeAnimation function only supports a subset - * of Motion easings, and WAAPI also only supports some - * easing functions via string/cubic-bezier definitions. - * - * This function replaces those unsupported easing functions - * with a JS easing function. This will later get compiled - * to a linear() easing function. - */ - replaceStringEasing(options); - /** - * Ensure we replace the transition type with a generator function - * before passing to WAAPI. - * - * TODO: Does this have a better home? It could be shared with - * JSAnimation. - */ - replaceTransitionType(options); - super(options); - /** - * Only set startTime when the animation should autoplay. - * Setting startTime on a paused WAAPI animation unpauses it - * (per the WAAPI spec), which breaks autoplay: false. - */ - if (options.startTime !== undefined && options.autoplay !== false) { - this.startTime = options.startTime; - } - this.options = options; - } - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * Rather than read committed styles back out of the DOM, we can - * create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to calculate velocity for any subsequent animation. - */ - updateMotionValue(value) { - const { motionValue, onUpdate, onComplete, element, ...options } = this.options; - if (!motionValue) - return; - if (value !== undefined) { - motionValue.set(value); - return; - } - const sampleAnimation = new JSAnimation({ - ...options, - autoplay: false, - }); - /** - * Use wall-clock elapsed time for sampling. - * Under CPU load, WAAPI's currentTime may not reflect actual - * elapsed time, causing incorrect sampling and visual jumps. - */ - const sampleTime = Math.max(sampleDelta, time.now() - this.startTime); - const delta = motionUtils.clamp(0, sampleDelta, sampleTime - sampleDelta); - const current = sampleAnimation.sample(sampleTime).value; - /** - * Write the estimated value to inline style so it persists - * after cancel(), covering the async gap before the next - * animation starts. - */ - const { name } = this.options; - if (element && name) - setStyle(element, name, current); - motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta); - sampleAnimation.stop(); - } -} - -/** - * Check if a value is animatable. Examples: - * - * ✅: 100, "100px", "#fff" - * ❌: "block", "url(2.jpg)" - * @param value - * - * @internal - */ -const isAnimatable = (value, name) => { - // If the list of keys that might be non-animatable grows, replace with Set - if (name === "zIndex") - return false; - // If it's a number or a keyframes array, we can animate it. We might at some point - // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this, - // but for now lets leave it like this for performance reasons - if (typeof value === "number" || Array.isArray(value)) - return true; - if (typeof value === "string" && // It's animatable if we have a string - (complex.test(value) || value === "0") && // And it contains numbers and/or colors - !value.startsWith("url(") // Unless it starts with "url(" - ) { - return true; - } - return false; -}; - -function hasKeyframesChanged(keyframes) { - const current = keyframes[0]; - if (keyframes.length === 1) - return true; - for (let i = 0; i < keyframes.length; i++) { - if (keyframes[i] !== current) - return true; - } -} -function canAnimate(keyframes, name, type, velocity) { - /** - * Check if we're able to animate between the start and end keyframes, - * and throw a warning if we're attempting to animate between one that's - * animatable and another that isn't. - */ - const originKeyframe = keyframes[0]; - if (originKeyframe === null) { - return false; - } - /** - * These aren't traditionally animatable but we do support them. - * In future we could look into making this more generic or replacing - * this function with mix() === mixImmediate - */ - if (name === "display" || name === "visibility") - return true; - const targetKeyframe = keyframes[keyframes.length - 1]; - const isOriginAnimatable = isAnimatable(originKeyframe, name); - const isTargetAnimatable = isAnimatable(targetKeyframe, name); - motionUtils.warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable"); - // Always skip if any of these are true - if (!isOriginAnimatable || !isTargetAnimatable) { - return false; - } - return (hasKeyframesChanged(keyframes) || - ((type === "spring" || isGenerator(type)) && velocity)); -} - -function makeAnimationInstant(options) { - options.duration = 0; - options.type = "keyframes"; -} - -/** - * A list of values that can be hardware-accelerated. - */ -const acceleratedValues = new Set([ - "opacity", - "clipPath", - "filter", - "transform", - // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved - // or until we implement support for linear() easing. - // "background-color" -]); - -const browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/; -function hasBrowserOnlyColors(keyframes) { - for (let i = 0; i < keyframes.length; i++) { - if (typeof keyframes[i] === "string" && - browserColorFunctions.test(keyframes[i])) { - return true; - } - } - return false; -} - -const colorProperties = new Set([ - "color", - "backgroundColor", - "outlineColor", - "fill", - "stroke", - "borderColor", - "borderTopColor", - "borderRightColor", - "borderBottomColor", - "borderLeftColor", -]); -const supportsWaapi = /*@__PURE__*/ motionUtils.memo(() => Object.hasOwnProperty.call(Element.prototype, "animate")); -function supportsBrowserAnimation(options) { - const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options; - const subject = motionValue?.owner?.current; - /** - * We use this check instead of isHTMLElement() because we explicitly - * **don't** want elements in different timing contexts (i.e. popups) - * to be accelerated, as it's not possible to sync these animations - * properly with those driven from the main window frameloop. - */ - if (!(subject instanceof HTMLElement)) { - return false; - } - const { onUpdate, transformTemplate } = motionValue.owner.getProps(); - return (supportsWaapi() && - name && - /** - * Force WAAPI for color properties with browser-only color formats - * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse. - */ - (acceleratedValues.has(name) || - (colorProperties.has(name) && - hasBrowserOnlyColors(keyframes))) && - (name !== "transform" || !transformTemplate) && - /** - * If we're outputting values to onUpdate then we can't use WAAPI as there's - * no way to read the value from WAAPI every frame. - */ - !onUpdate && - !repeatDelay && - repeatType !== "mirror" && - damping !== 0 && - type !== "inertia"); -} - -/** - * Maximum time allowed between an animation being created and it being - * resolved for us to use the latter as the start time. - * - * This is to ensure that while we prefer to "start" an animation as soon - * as it's triggered, we also want to avoid a visual jump if there's a big delay - * between these two moments. - */ -const MAX_RESOLVE_DELAY = 40; -class AsyncMotionValueAnimation extends WithPromise { - constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", keyframes, name, motionValue, element, ...options }) { - super(); - /** - * Bound to support return animation.stop pattern - */ - this.stop = () => { - if (this._animation) { - this._animation.stop(); - this.stopTimeline?.(); - } - this.keyframeResolver?.cancel(); - }; - this.createdAt = time.now(); - const optionsWithDefaults = { - autoplay, - delay, - type, - repeat, - repeatDelay, - repeatType, - name, - motionValue, - element, - ...options, - }; - const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver; - this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element); - this.keyframeResolver?.scheduleResolve(); - } - onKeyframesResolved(keyframes, finalKeyframe, options, sync) { - this.keyframeResolver = undefined; - const { name, type, velocity, delay, isHandoff, onUpdate } = options; - this.resolvedAt = time.now(); - /** - * If we can't animate this value with the resolved keyframes - * then we should complete it immediately. - */ - let canAnimateValue = true; - if (!canAnimate(keyframes, name, type, velocity)) { - canAnimateValue = false; - if (motionUtils.MotionGlobalConfig.instantAnimations || !delay) { - onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe)); - } - keyframes[0] = keyframes[keyframes.length - 1]; - makeAnimationInstant(options); - options.repeat = 0; - } - /** - * Resolve startTime for the animation. - * - * This method uses the createdAt and resolvedAt to calculate the - * animation startTime. *Ideally*, we would use the createdAt time as t=0 - * as the following frame would then be the first frame of the animation in - * progress, which would feel snappier. - * - * However, if there's a delay (main thread work) between the creation of - * the animation and the first committed frame, we prefer to use resolvedAt - * to avoid a sudden jump into the animation. - */ - const startTime = sync - ? !this.resolvedAt - ? this.createdAt - : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY - ? this.resolvedAt - : this.createdAt - : undefined; - const resolvedOptions = { - startTime, - finalKeyframe, - ...options, - keyframes, - }; - /** - * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via - * WAAPI. Therefore, this animation must be JS to ensure it runs "under" the - * optimised animation. - * - * Also skip WAAPI when keyframes aren't animatable, as the resolved - * values may not be valid CSS and would trigger browser warnings. - */ - const useWaapi = canAnimateValue && - !isHandoff && - supportsBrowserAnimation(resolvedOptions); - const element = resolvedOptions.motionValue?.owner?.current; - let animation; - if (useWaapi) { - try { - animation = new NativeAnimationExtended({ - ...resolvedOptions, - element, - }); - } - catch { - animation = new JSAnimation(resolvedOptions); - } - } - else { - animation = new JSAnimation(resolvedOptions); - } - animation.finished.then(() => { - this.notifyFinished(); - }).catch(motionUtils.noop); - if (this.pendingTimeline) { - this.stopTimeline = animation.attachTimeline(this.pendingTimeline); - this.pendingTimeline = undefined; - } - this._animation = animation; - } - get finished() { - if (!this._animation) { - return this._finished; - } - else { - return this.animation.finished; - } - } - then(onResolve, _onReject) { - return this.finished.finally(onResolve).then(() => { }); - } - get animation() { - if (!this._animation) { - this.keyframeResolver?.resume(); - flushKeyframeResolvers(); - } - return this._animation; - } - get duration() { - return this.animation.duration; - } - get iterationDuration() { - return this.animation.iterationDuration; - } - get time() { - return this.animation.time; - } - set time(newTime) { - this.animation.time = newTime; - } - get speed() { - return this.animation.speed; - } - get state() { - return this.animation.state; - } - set speed(newSpeed) { - this.animation.speed = newSpeed; - } - get startTime() { - return this.animation.startTime; - } - attachTimeline(timeline) { - if (this._animation) { - this.stopTimeline = this.animation.attachTimeline(timeline); - } - else { - this.pendingTimeline = timeline; - } - return () => this.stop(); - } - play() { - this.animation.play(); - } - pause() { - this.animation.pause(); - } - complete() { - this.animation.complete(); - } - cancel() { - if (this._animation) { - this.animation.cancel(); - } - this.keyframeResolver?.cancel(); - } -} - -class GroupAnimation { - constructor(animations) { - // Bound to accomadate common `return animation.stop` pattern - this.stop = () => this.runAll("stop"); - this.animations = animations.filter(Boolean); - } - get finished() { - return Promise.all(this.animations.map((animation) => animation.finished)); - } - /** - * TODO: Filter out cancelled or stopped animations before returning - */ - getAll(propName) { - return this.animations[0][propName]; - } - setAll(propName, newValue) { - for (let i = 0; i < this.animations.length; i++) { - this.animations[i][propName] = newValue; - } - } - attachTimeline(timeline) { - const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline)); - return () => { - subscriptions.forEach((cancel, i) => { - cancel && cancel(); - this.animations[i].stop(); - }); - }; - } - get time() { - return this.getAll("time"); - } - set time(time) { - this.setAll("time", time); - } - get speed() { - return this.getAll("speed"); - } - set speed(speed) { - this.setAll("speed", speed); - } - get state() { - return this.getAll("state"); - } - get startTime() { - return this.getAll("startTime"); - } - get duration() { - return getMax(this.animations, "duration"); - } - get iterationDuration() { - return getMax(this.animations, "iterationDuration"); - } - runAll(methodName) { - this.animations.forEach((controls) => controls[methodName]()); - } - play() { - this.runAll("play"); - } - pause() { - this.runAll("pause"); - } - cancel() { - this.runAll("cancel"); - } - complete() { - this.runAll("complete"); - } -} -function getMax(animations, propName) { - let max = 0; - for (let i = 0; i < animations.length; i++) { - const value = animations[i][propName]; - if (value !== null && value > max) { - max = value; - } - } - return max; -} - -class GroupAnimationWithThen extends GroupAnimation { - then(onResolve, _onReject) { - return this.finished.finally(onResolve).then(() => { }); - } -} - -class NativeAnimationWrapper extends NativeAnimation { - constructor(animation) { - super(); - this.animation = animation; - animation.onfinish = () => { - this.finishedTime = this.time; - this.notifyFinished(); - }; - } -} - -const animationMaps = new WeakMap(); -const animationMapKey = (name, pseudoElement = "") => `${name}:${pseudoElement}`; -function getAnimationMap(element) { - let map = animationMaps.get(element); - if (!map) { - map = new Map(); - animationMaps.set(element, map); - } - return map; -} - -function calcChildStagger(children, child, delayChildren, staggerChildren = 0, staggerDirection = 1) { - const index = Array.from(children) - .sort((a, b) => a.sortNodePosition(b)) - .indexOf(child); - const numChildren = children.size; - const maxStaggerDuration = (numChildren - 1) * staggerChildren; - const delayIsFunction = typeof delayChildren === "function"; - return delayIsFunction - ? delayChildren(index, numChildren) - : staggerDirection === 1 - ? index * staggerChildren - : maxStaggerDuration - index * staggerChildren; -} - -/** - * Maximum time between the value of two frames, beyond which we - * assume the velocity has since been 0. - */ -const MAX_VELOCITY_DELTA = 30; -const isFloat = (value) => { - return !isNaN(parseFloat(value)); -}; -const collectMotionValues = { - current: undefined, -}; -/** - * `MotionValue` is used to track the state and velocity of motion values. - * - * @public - */ -class MotionValue { - /** - * @param init - The initiating value - * @param config - Optional configuration options - * - * - `transformer`: A function to transform incoming values with. - */ - constructor(init, options = {}) { - /** - * Tracks whether this value can output a velocity. Currently this is only true - * if the value is numerical, but we might be able to widen the scope here and support - * other value types. - * - * @internal - */ - this.canTrackVelocity = null; - /** - * An object containing a SubscriptionManager for each active event. - */ - this.events = {}; - this.updateAndNotify = (v) => { - const currentTime = time.now(); - /** - * If we're updating the value during another frame or eventloop - * than the previous frame, then the we set the previous frame value - * to current. - */ - if (this.updatedAt !== currentTime) { - this.setPrevFrameValue(); - } - this.prev = this.current; - this.setCurrent(v); - // Update update subscribers - if (this.current !== this.prev) { - this.events.change?.notify(this.current); - if (this.dependents) { - for (const dependent of this.dependents) { - dependent.dirty(); - } - } - } - }; - this.hasAnimated = false; - this.setCurrent(init); - this.owner = options.owner; - } - setCurrent(current) { - this.current = current; - this.updatedAt = time.now(); - if (this.canTrackVelocity === null && current !== undefined) { - this.canTrackVelocity = isFloat(this.current); - } - } - setPrevFrameValue(prevFrameValue = this.current) { - this.prevFrameValue = prevFrameValue; - this.prevUpdatedAt = this.updatedAt; - } - /** - * Adds a function that will be notified when the `MotionValue` is updated. - * - * It returns a function that, when called, will cancel the subscription. - * - * When calling `onChange` inside a React component, it should be wrapped with the - * `useEffect` hook. As it returns an unsubscribe function, this should be returned - * from the `useEffect` function to ensure you don't add duplicate subscribers.. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * const y = useMotionValue(0) - * const opacity = useMotionValue(1) - * - * useEffect(() => { - * function updateOpacity() { - * const maxXY = Math.max(x.get(), y.get()) - * const newOpacity = transform(maxXY, [0, 100], [1, 0]) - * opacity.set(newOpacity) - * } - * - * const unsubscribeX = x.on("change", updateOpacity) - * const unsubscribeY = y.on("change", updateOpacity) - * - * return () => { - * unsubscribeX() - * unsubscribeY() - * } - * }, []) - * - * return - * } - * ``` - * - * @param subscriber - A function that receives the latest value. - * @returns A function that, when called, will cancel this subscription. - * - * @deprecated - */ - onChange(subscription) { - if (process.env.NODE_ENV !== "production") { - motionUtils.warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on("change", callback).`); - } - return this.on("change", subscription); - } - on(eventName, callback) { - if (!this.events[eventName]) { - this.events[eventName] = new motionUtils.SubscriptionManager(); - } - const unsubscribe = this.events[eventName].add(callback); - if (eventName === "change") { - return () => { - unsubscribe(); - /** - * If we have no more change listeners by the start - * of the next frame, stop active animations. - */ - frame.read(() => { - if (!this.events.change.getSize()) { - this.stop(); - } - }); - }; - } - return unsubscribe; - } - clearListeners() { - for (const eventManagers in this.events) { - this.events[eventManagers].clear(); - } - } - /** - * Attaches a passive effect to the `MotionValue`. - */ - attach(passiveEffect, stopPassiveEffect) { - this.passiveEffect = passiveEffect; - this.stopPassiveEffect = stopPassiveEffect; - } - /** - * Sets the state of the `MotionValue`. - * - * @remarks - * - * ```jsx - * const x = useMotionValue(0) - * x.set(10) - * ``` - * - * @param latest - Latest value to set. - * @param render - Whether to notify render subscribers. Defaults to `true` - * - * @public - */ - set(v) { - if (!this.passiveEffect) { - this.updateAndNotify(v); - } - else { - this.passiveEffect(v, this.updateAndNotify); - } - } - setWithVelocity(prev, current, delta) { - this.set(current); - this.prev = undefined; - this.prevFrameValue = prev; - this.prevUpdatedAt = this.updatedAt - delta; - } - /** - * Set the state of the `MotionValue`, stopping any active animations, - * effects, and resets velocity to `0`. - */ - jump(v, endAnimation = true) { - this.updateAndNotify(v); - this.prev = v; - this.prevUpdatedAt = this.prevFrameValue = undefined; - endAnimation && this.stop(); - if (this.stopPassiveEffect) - this.stopPassiveEffect(); - } - dirty() { - this.events.change?.notify(this.current); - } - addDependent(dependent) { - if (!this.dependents) { - this.dependents = new Set(); - } - this.dependents.add(dependent); - } - removeDependent(dependent) { - if (this.dependents) { - this.dependents.delete(dependent); - } - } - /** - * Returns the latest state of `MotionValue` - * - * @returns - The latest state of `MotionValue` - * - * @public - */ - get() { - if (collectMotionValues.current) { - collectMotionValues.current.push(this); - } - return this.current; - } - /** - * @public - */ - getPrevious() { - return this.prev; - } - /** - * Returns the latest velocity of `MotionValue` - * - * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical. - * - * @public - */ - getVelocity() { - const currentTime = time.now(); - if (!this.canTrackVelocity || - this.prevFrameValue === undefined || - currentTime - this.updatedAt > MAX_VELOCITY_DELTA) { - return 0; - } - const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA); - // Casts because of parseFloat's poor typing - return motionUtils.velocityPerSecond(parseFloat(this.current) - - parseFloat(this.prevFrameValue), delta); - } - /** - * Registers a new animation to control this `MotionValue`. Only one - * animation can drive a `MotionValue` at one time. - * - * ```jsx - * value.start() - * ``` - * - * @param animation - A function that starts the provided animation - */ - start(startAnimation) { - this.stop(); - return new Promise((resolve) => { - this.hasAnimated = true; - this.animation = startAnimation(resolve); - if (this.events.animationStart) { - this.events.animationStart.notify(); - } - }).then(() => { - if (this.events.animationComplete) { - this.events.animationComplete.notify(); - } - this.clearAnimation(); - }); - } - /** - * Stop the currently active animation. - * - * @public - */ - stop() { - if (this.animation) { - this.animation.stop(); - if (this.events.animationCancel) { - this.events.animationCancel.notify(); - } - } - this.clearAnimation(); - } - /** - * Returns `true` if this value is currently animating. - * - * @public - */ - isAnimating() { - return !!this.animation; - } - clearAnimation() { - delete this.animation; - } - /** - * Destroy and clean up subscribers to this `MotionValue`. - * - * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically - * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually - * created a `MotionValue` via the `motionValue` function. - * - * @public - */ - destroy() { - this.dependents?.clear(); - this.events.destroy?.notify(); - this.clearListeners(); - this.stop(); - if (this.stopPassiveEffect) { - this.stopPassiveEffect(); - } - } -} -function motionValue(init, options) { - return new MotionValue(init, options); -} - -/** - * If `transition` has `inherit: true`, shallow-merge it with - * `parentTransition` (child keys win) and strip the `inherit` key. - * Otherwise return `transition` unchanged. - */ -function resolveTransition(transition, parentTransition) { - if (transition?.inherit && parentTransition) { - const { inherit: _, ...rest } = transition; - return { ...parentTransition, ...rest }; - } - return transition; -} - -function getValueTransition(transition, key) { - const valueTransition = transition?.[key] ?? - transition?.["default"] ?? - transition; - if (valueTransition !== transition) { - return resolveTransition(valueTransition, transition); - } - return valueTransition; -} - -const underDampedSpring = { - type: "spring", - stiffness: 500, - damping: 25, - restSpeed: 10, -}; -const criticallyDampedSpring = (target) => ({ - type: "spring", - stiffness: 550, - damping: target === 0 ? 2 * Math.sqrt(550) : 30, - restSpeed: 10, -}); -const keyframesTransition = { - type: "keyframes", - duration: 0.8, -}; -/** - * Default easing curve is a slightly shallower version of - * the default browser easing curve. - */ -const ease = { - type: "keyframes", - ease: [0.25, 0.1, 0.35, 1], - duration: 0.3, -}; -const getDefaultTransition = (valueKey, { keyframes }) => { - if (keyframes.length > 2) { - return keyframesTransition; - } - else if (transformProps.has(valueKey)) { - return valueKey.startsWith("scale") - ? criticallyDampedSpring(keyframes[1]) - : underDampedSpring; - } - return ease; -}; - -const orchestrationKeys = new Set([ - "when", - "delay", - "delayChildren", - "staggerChildren", - "staggerDirection", - "repeat", - "repeatType", - "repeatDelay", - "from", - "elapsed", -]); -/** - * Decide whether a transition is defined on a given Transition. - * This filters out orchestration options and returns true - * if any options are left. - */ -function isTransitionDefined(transition) { - for (const key in transition) { - if (!orchestrationKeys.has(key)) - return true; - } - return false; -} - -const animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => { - const valueTransition = getValueTransition(transition, name) || {}; - /** - * Most transition values are currently completely overwritten by value-specific - * transitions. In the future it'd be nicer to blend these transitions. But for now - * delay actually does inherit from the root transition if not value-specific. - */ - const delay = valueTransition.delay || transition.delay || 0; - /** - * Elapsed isn't a public transition option but can be passed through from - * optimized appear effects in milliseconds. - */ - let { elapsed = 0 } = transition; - elapsed = elapsed - motionUtils.secondsToMilliseconds(delay); - const options = { - keyframes: Array.isArray(target) ? target : [null, target], - ease: "easeOut", - velocity: value.getVelocity(), - ...valueTransition, - delay: -elapsed, - onUpdate: (v) => { - value.set(v); - valueTransition.onUpdate && valueTransition.onUpdate(v); - }, - onComplete: () => { - onComplete(); - valueTransition.onComplete && valueTransition.onComplete(); - }, - name, - motionValue: value, - element: isHandoff ? undefined : element, - }; - /** - * If there's no transition defined for this value, we can generate - * unique transition settings for this value. - */ - if (!isTransitionDefined(valueTransition)) { - Object.assign(options, getDefaultTransition(name, options)); - } - /** - * Both WAAPI and our internal animation functions use durations - * as defined by milliseconds, while our external API defines them - * as seconds. - */ - options.duration && (options.duration = motionUtils.secondsToMilliseconds(options.duration)); - options.repeatDelay && (options.repeatDelay = motionUtils.secondsToMilliseconds(options.repeatDelay)); - /** - * Support deprecated way to set initial value. Prefer keyframe syntax. - */ - if (options.from !== undefined) { - options.keyframes[0] = options.from; - } - let shouldSkip = false; - if (options.type === false || - (options.duration === 0 && !options.repeatDelay)) { - makeAnimationInstant(options); - if (options.delay === 0) { - shouldSkip = true; - } - } - if (motionUtils.MotionGlobalConfig.instantAnimations || - motionUtils.MotionGlobalConfig.skipAnimations || - element?.shouldSkipAnimations || - valueTransition.skipAnimations) { - shouldSkip = true; - makeAnimationInstant(options); - options.delay = 0; - } - /** - * If the transition type or easing has been explicitly set by the user - * then we don't want to allow flattening the animation. - */ - options.allowFlatten = !valueTransition.type && !valueTransition.ease; - /** - * If we can or must skip creating the animation, and apply only - * the final keyframe, do so. We also check once keyframes are resolved but - * this early check prevents the need to create an animation at all. - */ - if (shouldSkip && !isHandoff && value.get() !== undefined) { - const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition); - if (finalKeyframe !== undefined) { - frame.update(() => { - options.onUpdate(finalKeyframe); - options.onComplete(); - }); - return; - } - } - return valueTransition.isSync - ? new JSAnimation(options) - : new AsyncMotionValueAnimation(options); -}; - -const MIN_LAYOUT_DISTANCE = 20; -function bezierPoint(t, origin, control, target) { - const inv = 1 - t; - return inv * inv * origin + 2 * inv * t * control + t * t * target; -} -function bezierTangentAngle(t, originX, controlX, targetX, originY, controlY, targetY) { - const dx = 2 * (1 - t) * (controlX - originX) + 2 * t * (targetX - controlX); - const dy = 2 * (1 - t) * (controlY - originY) + 2 * t * (targetY - controlY); - return Math.atan2(dy, dx) * (180 / Math.PI); -} -function computeArcControlPoint(fromX, fromY, toX, toY, strength, peak) { - const deltaX = toX - fromX; - const deltaY = toY - fromY; - const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); - if (distance > 0) { - const normalPerpX = -deltaY / distance; - const normalPerpY = deltaX / distance; - const desiredHeight = strength * distance; - return { - x: fromX + deltaX * peak + normalPerpX * desiredHeight, - y: fromY + deltaY * peak + normalPerpY * desiredHeight, - }; - } - return { x: fromX, y: fromY }; -} -/** - * The pure sampling factory: `(from, to) => (t) => point`. Internal — - * used by {@link arc} and the unit tests. Not part of the public surface. - */ -function createArcPath({ strength = 0.5, peak = 0.5, direction, rotate = false, } = {}) { - const rotationScale = rotate === true ? 1 : typeof rotate === "number" ? rotate : 0; - // Auto-direction only: persists across calls to flip the bulge back - // onto the same screen side when the dominant axis changes between - // calls. Reuse the factory (module scope / useMemo) to keep this alive. - let prevBulgeSign; - const createInterpolator = (from, to) => { - const dx = to.x - from.x; - const dy = to.y - from.y; - let signed; - if (direction === "cw") { - signed = -strength; - } - else if (direction === "ccw") { - signed = strength; - } - else { - const dom = Math.abs(dx) >= Math.abs(dy) ? dx : dy; - signed = dom < 0 ? -strength : strength; - } - let control = computeArcControlPoint(from.x, from.y, to.x, to.y, signed, peak); - if (direction === undefined) { - const isVertical = Math.abs(dx) < Math.abs(dy); - const midX = from.x + dx * peak; - const midY = from.y + dy * peak; - const bulgeSign = isVertical - ? Math.sign(control.x - midX) - : Math.sign(control.y - midY); - if (prevBulgeSign !== undefined && - bulgeSign !== 0 && - bulgeSign !== prevBulgeSign) { - signed = -signed; - control = computeArcControlPoint(from.x, from.y, to.x, to.y, signed, peak); - } - else if (bulgeSign !== 0) { - prevBulgeSign = bulgeSign; - } - } - const tangent0 = rotationScale - ? bezierTangentAngle(0, from.x, control.x, to.x, from.y, control.y, to.y) - : 0; - const tangent1 = rotationScale - ? bezierTangentAngle(1, from.x, control.x, to.x, from.y, control.y, to.y) - : 0; - const tangentDelta = rotationScale - ? motionUtils.wrap(-180, 180, tangent1 - tangent0) - : 0; - return (t) => { - const out = { - x: bezierPoint(t, from.x, control.x, to.x), - y: bezierPoint(t, from.y, control.y, to.y), - }; - if (rotationScale) { - const raw = bezierTangentAngle(t, from.x, control.x, to.x, from.y, control.y, to.y); - const baseline = tangent0 + tangentDelta * t; - out.rotate = motionUtils.wrap(-180, 180, raw - baseline) * rotationScale; - } - return out; - }; - }; - return createInterpolator; -} -/** - * Creates a curved path for `transition.path`: - * - * ```ts - * - * ``` - * - * Reuse the returned value (module scope / useMemo / useRef) so its - * continuity closure survives re-renders — a fresh `arc()` has no memory. - */ -function arc(options = {}) { - const sample = createArcPath(options); - const path = { - interpolateProjection(delta) { - // `from` is the current translate offset (carries any in-flight - // displacement when interrupted); `to` is the new layout origin. - // The distance floor avoids visible wobble on tiny shifts. - const tx = delta.x.translate; - const ty = delta.y.translate; - if (Math.sqrt(tx * tx + ty * ty) < MIN_LAYOUT_DISTANCE) { - return undefined; - } - return sample({ x: tx, y: ty }, { x: 0, y: 0 }); - }, - animateVisualElement(visualElement, target, transition, delay, animations) { - if (!("x" in target || "y" in target)) - return; - const xValue = visualElement.getValue("x", visualElement.latestValues["x"] ?? 0); - const yValue = visualElement.getValue("y", visualElement.latestValues["y"] ?? 0); - const xRaw = target.x; - const yRaw = target.y; - const xFrom = (Array.isArray(xRaw) && xRaw[0] != null - ? xRaw[0] - : xValue?.get()) ?? 0; - const yFrom = (Array.isArray(yRaw) && yRaw[0] != null - ? yRaw[0] - : yValue?.get()) ?? 0; - const xTo = (Array.isArray(xRaw) - ? xRaw[xRaw.length - 1] - : xRaw ?? xFrom); - const yTo = (Array.isArray(yRaw) - ? yRaw[yRaw.length - 1] - : yRaw ?? yFrom); - // Interruption needs no flag: x/y already hold the displaced - // mid-arc position, so xFrom/yFrom carry the continuity geometry. - const interpolate = sample({ x: xFrom, y: yFrom }, { x: xTo, y: yTo }); - // Drive a dedicated `pathRotation` value (composed onto `rotate` - // at the build sites) rather than `rotate` itself, so a - // concurrent rotate animation composes and nothing accumulates - // on interrupt. - const pathRotationValue = interpolate(0).rotate !== undefined - ? visualElement.getValue("pathRotation", 0) - : undefined; - const pathTransition = { - delay, - ...getValueTransition(transition || {}, "x"), - }; - delete pathTransition.path; - const progress = motionValue(0); - progress.start(animateMotionValue("", progress, [0, 1000], { - ...pathTransition, - isSync: true, - velocity: 0, - onUpdate: (latest) => { - const point = interpolate(latest / 1000); - xValue?.set(point.x); - yValue?.set(point.y); - if (pathRotationValue && point.rotate !== undefined) { - pathRotationValue.set(point.rotate); - } - }, - onComplete: () => { - xValue?.set(xTo); - yValue?.set(yTo); - pathRotationValue?.set(0); - }, - // Interrupt/cancel must clear our additive contribution - // so it can't linger on top of the user's `rotate`. - onStop: () => pathRotationValue?.set(0), - onCancel: () => pathRotationValue?.set(0), - })); - if (progress.animation) - animations.push(progress.animation); - delete target.x; - delete target.y; - }, - }; - return path; -} - -/** - * Parse Framer's special CSS variable format into a CSS token and a fallback. - * - * ``` - * `var(--foo, #fff)` => [`--foo`, '#fff'] - * ``` - * - * @param current - */ -const splitCSSVariableRegex = -// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words -/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u; -function parseCSSVariable(current) { - const match = splitCSSVariableRegex.exec(current); - if (!match) - return [,]; - const [, token1, token2, fallback] = match; - return [`--${token1 ?? token2}`, fallback]; -} -const maxDepth = 4; -function getVariableValue(current, element, depth = 1) { - motionUtils.invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth"); - const [token, fallback] = parseCSSVariable(current); - // No CSS variable detected - if (!token) - return; - // Attempt to read this CSS variable off the element - const resolved = window.getComputedStyle(element).getPropertyValue(token); - if (resolved) { - const trimmed = resolved.trim(); - return motionUtils.isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed; - } - return isCSSVariableToken(fallback) - ? getVariableValue(fallback, element, depth + 1) - : fallback; -} - -function getValueState(visualElement) { - const state = [{}, {}]; - visualElement?.values.forEach((value, key) => { - state[0][key] = value.get(); - state[1][key] = value.getVelocity(); - }); - return state; -} -function resolveVariantFromProps(props, definition, custom, visualElement) { - /** - * If the variant definition is a function, resolve. - */ - if (typeof definition === "function") { - const [current, velocity] = getValueState(visualElement); - definition = definition(custom !== undefined ? custom : props.custom, current, velocity); - } - /** - * If the variant definition is a variant label, or - * the function returned a variant label, resolve. - */ - if (typeof definition === "string") { - definition = props.variants && props.variants[definition]; - } - /** - * At this point we've resolved both functions and variant labels, - * but the resolved variant label might itself have been a function. - * If so, resolve. This can only have returned a valid target object. - */ - if (typeof definition === "function") { - const [current, velocity] = getValueState(visualElement); - definition = definition(custom !== undefined ? custom : props.custom, current, velocity); - } - return definition; -} - -function resolveVariant(visualElement, definition, custom) { - const props = visualElement.getProps(); - return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement); -} - -const positionalKeys = new Set([ - "width", - "height", - "top", - "left", - "right", - "bottom", - ...transformPropOrder, -]); - -const isKeyframesTarget = (v) => { - return Array.isArray(v); -}; - -/** - * Set VisualElement's MotionValue, creating a new MotionValue for it if - * it doesn't exist. - */ -function setMotionValue(visualElement, key, value) { - if (visualElement.hasValue(key)) { - visualElement.getValue(key).set(value); - } - else { - visualElement.addValue(key, motionValue(value)); - } -} -function resolveFinalValueInKeyframes(v) { - // TODO maybe throw if v.length - 1 is placeholder token? - return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v; -} -function setTarget(visualElement, definition) { - const resolved = resolveVariant(visualElement, definition); - let { transitionEnd = {}, transition = {}, ...target } = resolved || {}; - target = { ...target, ...transitionEnd }; - for (const key in target) { - const value = resolveFinalValueInKeyframes(target[key]); - setMotionValue(visualElement, key, value); - } -} - -const isMotionValue = (value) => Boolean(value && value.getVelocity); - -function isWillChangeMotionValue(value) { - return Boolean(isMotionValue(value) && value.add); -} - -function addValueToWillChange(visualElement, key) { - const willChange = visualElement.getValue("willChange"); - /** - * It could be that a user has set willChange to a regular MotionValue, - * in which case we can't add the value to it. - */ - if (isWillChangeMotionValue(willChange)) { - return willChange.add(key); - } - else if (!willChange && motionUtils.MotionGlobalConfig.WillChange) { - const newWillChange = new motionUtils.MotionGlobalConfig.WillChange("auto"); - visualElement.addValue("willChange", newWillChange); - newWillChange.add(key); - } -} - -function camelToDash(str) { - return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`); -} - -const optimizedAppearDataId = "framerAppearId"; -const optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId); - -function getOptimisedAppearId(visualElement) { - return visualElement.props[optimizedAppearDataAttribute]; -} - -/** - * Decide whether we should block this animation. Previously, we achieved this - * just by checking whether the key was listed in protectedKeys, but this - * posed problems if an animation was triggered by afterChildren and protectedKeys - * had been set to true in the meantime. - */ -function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) { - const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true; - needsAnimating[key] = false; - return shouldBlock; -} -function animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) { - let { transition, transitionEnd, ...target } = targetAndTransition; - const defaultTransition = visualElement.getDefaultTransition(); - transition = transition - ? resolveTransition(transition, defaultTransition) - : defaultTransition; - const reduceMotion = transition?.reduceMotion; - const skipAnimations = transition?.skipAnimations; - if (transitionOverride) - transition = transitionOverride; - const animations = []; - const animationTypeState = type && - visualElement.animationState && - visualElement.animationState.getState()[type]; - const path = transition?.path; - if (path) { - // path mutates `target` to claim x/y; loop below skips them. - path.animateVisualElement(visualElement, target, transition, delay, animations); - } - for (const key in target) { - const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null); - const valueTarget = target[key]; - if (valueTarget === undefined || - (animationTypeState && - shouldBlockAnimation(animationTypeState, key))) { - continue; - } - const valueTransition = { - delay, - ...getValueTransition(transition || {}, key), - }; - if (skipAnimations) - valueTransition.skipAnimations = true; - /** - * If the value is already at the defined target, skip the animation. - * We still re-assert the value via frame.update to take precedence - * over any stale transitionEnd callbacks from previous animations. - */ - const currentValue = value.get(); - if (currentValue !== undefined && - !value.isAnimating() && - !Array.isArray(valueTarget) && - valueTarget === currentValue && - !valueTransition.velocity) { - frame.update(() => value.set(valueTarget)); - continue; - } - /** - * If this is the first time a value is being animated, check - * to see if we're handling off from an existing animation. - */ - let isHandoff = false; - if (window.MotionHandoffAnimation) { - const appearId = getOptimisedAppearId(visualElement); - if (appearId) { - const startTime = window.MotionHandoffAnimation(appearId, key, frame); - if (startTime !== null) { - valueTransition.startTime = startTime; - isHandoff = true; - } - } - } - addValueToWillChange(visualElement, key); - const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion; - value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key) - ? { type: false } - : valueTransition, visualElement, isHandoff)); - const animation = value.animation; - if (animation) { - animations.push(animation); - } - } - if (transitionEnd) { - const applyTransitionEnd = () => frame.update(() => { - transitionEnd && setTarget(visualElement, transitionEnd); - }); - if (animations.length) { - Promise.all(animations).then(applyTransitionEnd); - } - else { - applyTransitionEnd(); - } - } - return animations; -} - -function animateVariant(visualElement, variant, options = {}) { - const resolved = resolveVariant(visualElement, variant, options.type === "exit" - ? visualElement.presenceContext?.custom - : undefined); - let { transition = visualElement.getDefaultTransition() || {} } = resolved || {}; - if (options.transitionOverride) { - transition = options.transitionOverride; - } - /** - * If we have a variant, create a callback that runs it as an animation. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - const getAnimation = resolved - ? () => Promise.all(animateTarget(visualElement, resolved, options)) - : () => Promise.resolve(); - /** - * If we have children, create a callback that runs all their animations. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size - ? (forwardDelay = 0) => { - const { delayChildren = 0, staggerChildren, staggerDirection, } = transition; - return animateChildren(visualElement, variant, forwardDelay, delayChildren, staggerChildren, staggerDirection, options); - } - : () => Promise.resolve(); - /** - * If the transition explicitly defines a "when" option, we need to resolve either - * this animation or all children animations before playing the other. - */ - const { when } = transition; - if (when) { - const [first, last] = when === "beforeChildren" - ? [getAnimation, getChildAnimations] - : [getChildAnimations, getAnimation]; - return first().then(() => last()); - } - else { - return Promise.all([getAnimation(), getChildAnimations(options.delay)]); - } -} -function animateChildren(visualElement, variant, delay = 0, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) { - const animations = []; - for (const child of visualElement.variantChildren) { - child.notify("AnimationStart", variant); - animations.push(animateVariant(child, variant, { - ...options, - delay: delay + - (typeof delayChildren === "function" ? 0 : delayChildren) + - calcChildStagger(visualElement.variantChildren, child, delayChildren, staggerChildren, staggerDirection), - }).then(() => child.notify("AnimationComplete", variant))); - } - return Promise.all(animations); -} - -function animateVisualElement(visualElement, definition, options = {}) { - visualElement.notify("AnimationStart", definition); - let animation; - if (Array.isArray(definition)) { - const animations = definition.map((variant) => animateVariant(visualElement, variant, options)); - animation = Promise.all(animations); - } - else if (typeof definition === "string") { - animation = animateVariant(visualElement, definition, options); - } - else { - const resolvedDefinition = typeof definition === "function" - ? resolveVariant(visualElement, definition, options.custom) - : definition; - animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options)); - } - return animation.then(() => { - visualElement.notify("AnimationComplete", definition); - }); -} - -/** - * ValueType for "auto" - */ -const auto = { - test: (v) => v === "auto", - parse: (v) => v, -}; - -/** - * Tests a provided value against a ValueType - */ -const testValueType = (v) => (type) => type.test(v); - -/** - * A list of value types commonly used for dimensions - */ -const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto]; -/** - * Tests a dimensional value against the list of dimension ValueTypes - */ -const findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v)); - -function isNone(value) { - if (typeof value === "number") { - return value === 0; - } - else if (value !== null) { - return value === "none" || value === "0" || motionUtils.isZeroValueString(value); - } - else { - return true; - } -} - -/** - * Properties that should default to 1 or 100% - */ -const maxDefaults = new Set(["brightness", "contrast", "saturate", "opacity"]); -function applyDefaultFilter(v) { - const [name, value] = v.slice(0, -1).split("("); - if (name === "drop-shadow") - return v; - const [number] = value.match(floatRegex) || []; - if (!number) - return v; - const unit = value.replace(number, ""); - let defaultValue = maxDefaults.has(name) ? 1 : 0; - if (number !== value) - defaultValue *= 100; - return name + "(" + defaultValue + unit + ")"; -} -const functionRegex = /\b([a-z-]*)\(.*?\)/gu; -const filter = { - ...complex, - getAnimatableNone: (v) => { - const functions = v.match(functionRegex); - return functions ? functions.map(applyDefaultFilter).join(" ") : v; - }, -}; - -const mask = { - ...complex, - getAnimatableNone: (v) => { - const parsed = complex.parse(v); - const transformer = complex.createTransformer(v); - return transformer(parsed.map((v) => typeof v === "number" ? 0 : typeof v === "object" ? { ...v, alpha: 1 } : v)); - }, -}; - -const int = { - ...number, - transform: Math.round, -}; - -const transformValueTypes = { - rotate: degrees, - /** - * Internal channel for `transition.path` orientToPath. Composed onto - * `rotate` at the transform-build sites so the user's `rotate` is - * never read or overwritten. Not part of `transformPropOrder`. - */ - pathRotation: degrees, - rotateX: degrees, - rotateY: degrees, - rotateZ: degrees, - scale, - scaleX: scale, - scaleY: scale, - scaleZ: scale, - skew: degrees, - skewX: degrees, - skewY: degrees, - distance: px, - translateX: px, - translateY: px, - translateZ: px, - x: px, - y: px, - z: px, - perspective: px, - transformPerspective: px, - opacity: alpha, - originX: progressPercentage, - originY: progressPercentage, - originZ: px, -}; - -const numberValueTypes = { - // Border props - borderWidth: px, - borderTopWidth: px, - borderRightWidth: px, - borderBottomWidth: px, - borderLeftWidth: px, - borderRadius: px, - borderTopLeftRadius: px, - borderTopRightRadius: px, - borderBottomRightRadius: px, - borderBottomLeftRadius: px, - // Positioning props - width: px, - maxWidth: px, - height: px, - maxHeight: px, - top: px, - right: px, - bottom: px, - left: px, - inset: px, - insetBlock: px, - insetBlockStart: px, - insetBlockEnd: px, - insetInline: px, - insetInlineStart: px, - insetInlineEnd: px, - // Spacing props - padding: px, - paddingTop: px, - paddingRight: px, - paddingBottom: px, - paddingLeft: px, - paddingBlock: px, - paddingBlockStart: px, - paddingBlockEnd: px, - paddingInline: px, - paddingInlineStart: px, - paddingInlineEnd: px, - margin: px, - marginTop: px, - marginRight: px, - marginBottom: px, - marginLeft: px, - marginBlock: px, - marginBlockStart: px, - marginBlockEnd: px, - marginInline: px, - marginInlineStart: px, - marginInlineEnd: px, - // Typography - fontSize: px, - // Misc - backgroundPositionX: px, - backgroundPositionY: px, - ...transformValueTypes, - zIndex: int, - // SVG - fillOpacity: alpha, - strokeOpacity: alpha, - numOctaves: int, -}; - -/** - * A map of default value types for common values - */ -const defaultValueTypes = { - ...numberValueTypes, - // Color props - color, - backgroundColor: color, - outlineColor: color, - fill: color, - stroke: color, - // Border props - borderColor: color, - borderTopColor: color, - borderRightColor: color, - borderBottomColor: color, - borderLeftColor: color, - filter, - WebkitFilter: filter, - mask, - WebkitMask: mask, -}; -/** - * Gets the default ValueType for the provided value key - */ -const getDefaultValueType = (key) => defaultValueTypes[key]; - -const customTypes = /*@__PURE__*/ new Set([filter, mask]); -function getAnimatableNone(key, value) { - let defaultValueType = getDefaultValueType(key); - if (!customTypes.has(defaultValueType)) - defaultValueType = complex; - // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target - return defaultValueType.getAnimatableNone - ? defaultValueType.getAnimatableNone(value) - : undefined; -} - -/** - * If we encounter keyframes like "none" or "0" and we also have keyframes like - * "#fff" or "200px 200px" we want to find a keyframe to serve as a template for - * the "none" keyframes. In this case "#fff" or "200px 200px" - then these get turned into - * zero equivalents, i.e. "#fff0" or "0px 0px". - */ -const invalidTemplates = new Set(["auto", "none", "0"]); -function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) { - let i = 0; - let animatableTemplate = undefined; - while (i < unresolvedKeyframes.length && !animatableTemplate) { - const keyframe = unresolvedKeyframes[i]; - if (typeof keyframe === "string" && - !invalidTemplates.has(keyframe) && - analyseComplexValue(keyframe).values.length) { - animatableTemplate = unresolvedKeyframes[i]; - } - i++; - } - if (animatableTemplate && name) { - for (const noneIndex of noneKeyframeIndexes) { - unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate); - } - } -} - -class DOMKeyframesResolver extends KeyframeResolver { - constructor(unresolvedKeyframes, onComplete, name, motionValue, element) { - super(unresolvedKeyframes, onComplete, name, motionValue, element, true); - } - readKeyframes() { - const { unresolvedKeyframes, element, name } = this; - if (!element || !element.current) - return; - super.readKeyframes(); - /** - * If any keyframe is a CSS variable, we need to find its value by sampling the element - */ - for (let i = 0; i < unresolvedKeyframes.length; i++) { - let keyframe = unresolvedKeyframes[i]; - if (typeof keyframe === "string") { - keyframe = keyframe.trim(); - if (isCSSVariableToken(keyframe)) { - const resolved = getVariableValue(keyframe, element.current); - if (resolved !== undefined) { - unresolvedKeyframes[i] = resolved; - } - if (i === unresolvedKeyframes.length - 1) { - this.finalKeyframe = keyframe; - } - } - } - } - /** - * Resolve "none" values. We do this potentially twice - once before and once after measuring keyframes. - * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which - * have a far bigger performance impact. - */ - this.resolveNoneKeyframes(); - /** - * Check to see if unit type has changed. If so schedule jobs that will - * temporarily set styles to the destination keyframes. - * Skip if we have more than two keyframes or this isn't a positional value. - * TODO: We can throw if there are multiple keyframes and the value type changes. - */ - if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) { - return; - } - const [origin, target] = unresolvedKeyframes; - const originType = findDimensionValueType(origin); - const targetType = findDimensionValueType(target); - /** - * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other - * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410. - */ - const originHasVar = containsCSSVariable(origin); - const targetHasVar = containsCSSVariable(target); - if (originHasVar !== targetHasVar && positionalValues[name]) { - this.needsMeasurement = true; - return; - } - /** - * Either we don't recognise these value types or we can animate between them. - */ - if (originType === targetType) - return; - /** - * If both values are numbers or pixels, we can animate between them by - * converting them to numbers. - */ - if (isNumOrPxType(originType) && isNumOrPxType(targetType)) { - for (let i = 0; i < unresolvedKeyframes.length; i++) { - const value = unresolvedKeyframes[i]; - if (typeof value === "string") { - unresolvedKeyframes[i] = parseFloat(value); - } - } - } - else if (positionalValues[name]) { - /** - * Else, the only way to resolve this is by measuring the element. - */ - this.needsMeasurement = true; - } - } - resolveNoneKeyframes() { - const { unresolvedKeyframes, name } = this; - const noneKeyframeIndexes = []; - for (let i = 0; i < unresolvedKeyframes.length; i++) { - if (unresolvedKeyframes[i] === null || - isNone(unresolvedKeyframes[i])) { - noneKeyframeIndexes.push(i); - } - } - if (noneKeyframeIndexes.length) { - makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name); - } - } - measureInitialState() { - const { element, unresolvedKeyframes, name } = this; - if (!element || !element.current) - return; - if (name === "height") { - this.suspendedScrollY = window.pageYOffset; - } - this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current)); - unresolvedKeyframes[0] = this.measuredOrigin; - // Set final key frame to measure after next render - const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1]; - if (measureKeyframe !== undefined) { - element.getValue(name, measureKeyframe).jump(measureKeyframe, false); - } - } - measureEndState() { - const { element, name, unresolvedKeyframes } = this; - if (!element || !element.current) - return; - const value = element.getValue(name); - value && value.jump(this.measuredOrigin, false); - const finalKeyframeIndex = unresolvedKeyframes.length - 1; - const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex]; - unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current)); - if (finalKeyframe !== null && this.finalKeyframe === undefined) { - this.finalKeyframe = finalKeyframe; - } - // If we removed transform values, reapply them before the next render - if (this.removedTransforms?.length) { - this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => { - element - .getValue(unsetTransformName) - .set(unsetTransformValue); - }); - } - this.resolveNoneKeyframes(); - } -} - -const pxValues = new Set([ - // Border props - "borderWidth", - "borderTopWidth", - "borderRightWidth", - "borderBottomWidth", - "borderLeftWidth", - "borderRadius", - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomRightRadius", - "borderBottomLeftRadius", - // Positioning props - "width", - "maxWidth", - "height", - "maxHeight", - "top", - "right", - "bottom", - "left", - "inset", - "insetBlock", - "insetBlockStart", - "insetBlockEnd", - "insetInline", - "insetInlineStart", - "insetInlineEnd", - // Spacing props - "padding", - "paddingTop", - "paddingRight", - "paddingBottom", - "paddingLeft", - "paddingBlock", - "paddingBlockStart", - "paddingBlockEnd", - "paddingInline", - "paddingInlineStart", - "paddingInlineEnd", - "margin", - "marginTop", - "marginRight", - "marginBottom", - "marginLeft", - "marginBlock", - "marginBlockStart", - "marginBlockEnd", - "marginInline", - "marginInlineStart", - "marginInlineEnd", - // Typography - "fontSize", - // Misc - "backgroundPositionX", - "backgroundPositionY", -]); - -function applyPxDefaults(keyframes, name) { - for (let i = 0; i < keyframes.length; i++) { - if (typeof keyframes[i] === "number" && pxValues.has(name)) { - keyframes[i] = keyframes[i] + "px"; - } - } -} - -function isWaapiSupportedEasing(easing) { - return Boolean((typeof easing === "function" && supportsLinearEasing()) || - !easing || - (typeof easing === "string" && - (easing in supportedWaapiEasing || supportsLinearEasing())) || - motionUtils.isBezierDefinition(easing) || - (Array.isArray(easing) && easing.every(isWaapiSupportedEasing))); -} - -const supportsPartialKeyframes = /*@__PURE__*/ motionUtils.memo(() => { - try { - document.createElement("div").animate({ opacity: [1] }); - } - catch (e) { - return false; - } - return true; -}); - -function resolveElements(elementOrSelector, scope, selectorCache) { - if (elementOrSelector == null) { - return []; - } - if (elementOrSelector instanceof EventTarget) { - return [elementOrSelector]; - } - else if (typeof elementOrSelector === "string") { - let root = document; - if (scope) { - root = scope.current; - } - const elements = selectorCache?.[elementOrSelector] ?? - root.querySelectorAll(elementOrSelector); - return elements ? Array.from(elements) : []; - } - return Array.from(elementOrSelector).filter((element) => element != null); -} - -function createSelectorEffect(subjectEffect) { - return (subject, values) => { - const elements = resolveElements(subject); - const subscriptions = []; - for (const element of elements) { - const remove = subjectEffect(element, values); - subscriptions.push(remove); - } - return () => { - for (const remove of subscriptions) - remove(); - }; - }; -} - -/** - * Provided a value and a ValueType, returns the value as that value type. - */ -const getValueAsType = (value, type) => { - return type && typeof value === "number" - ? type.transform(value) - : value; -}; - -class MotionValueState { - constructor() { - this.latest = {}; - this.values = new Map(); - } - set(name, value, render, computed, useDefaultValueType = true) { - const existingValue = this.values.get(name); - if (existingValue) { - existingValue.onRemove(); - } - const onChange = () => { - const v = value.get(); - if (useDefaultValueType) { - this.latest[name] = getValueAsType(v, numberValueTypes[name]); - } - else { - this.latest[name] = v; - } - render && frame.render(render); - }; - onChange(); - const cancelOnChange = value.on("change", onChange); - computed && value.addDependent(computed); - const remove = () => { - cancelOnChange(); - render && cancelFrame(render); - this.values.delete(name); - computed && value.removeDependent(computed); - }; - this.values.set(name, { value, onRemove: remove }); - return remove; - } - get(name) { - return this.values.get(name)?.value; - } -} - -function createEffect(addValue) { - const stateCache = new WeakMap(); - return (subject, values) => { - const state = stateCache.get(subject) ?? new MotionValueState(); - stateCache.set(subject, state); - const subscriptions = []; - for (const key in values) { - const value = values[key]; - const remove = addValue(subject, state, key, value); - subscriptions.push(remove); - } - return () => { - for (const cancel of subscriptions) - cancel(); - }; - }; -} - -function canSetAsProperty(element, name) { - if (!(name in element)) - return false; - const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) || - Object.getOwnPropertyDescriptor(element, name); - // Check if it has a setter - return descriptor && typeof descriptor.set === "function"; -} -const addAttrValue = (element, state, key, value) => { - const isProp = canSetAsProperty(element, key); - const name = isProp - ? key - : key.startsWith("data") || key.startsWith("aria") - ? camelToDash(key) - : key; - /** - * Set attribute directly via property if available - */ - const render = isProp - ? () => { - element[name] = state.latest[key]; - } - : () => { - const v = state.latest[key]; - if (v === null || v === undefined) { - element.removeAttribute(name); - } - else { - element.setAttribute(name, String(v)); - } - }; - return state.set(key, value, render); -}; -const attrEffect = /*@__PURE__*/ createSelectorEffect( -/*@__PURE__*/ createEffect(addAttrValue)); - -const propEffect = /*@__PURE__*/ createEffect((subject, state, key, value) => { - return state.set(key, value, () => { - subject[key] = state.latest[key]; - }, undefined, false); -}); - -/** - * Checks if an element is an HTML element in a way - * that works across iframes - */ -function isHTMLElement(element) { - return (motionUtils.isObject(element) && - "offsetHeight" in element && - !("ownerSVGElement" in element)); -} - -const translateAlias$1 = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective", -}; -function buildTransform$1(state) { - let transform = ""; - let transformIsDefault = true; - /** - * Loop over all possible transforms in order, adding the ones that - * are present to the transform string. - */ - for (let i = 0; i < transformPropOrder.length; i++) { - const key = transformPropOrder[i]; - const value = state.latest[key]; - if (value === undefined) - continue; - let valueIsDefault = true; - if (typeof value === "number") { - valueIsDefault = value === (key.startsWith("scale") ? 1 : 0); - } - else { - const parsed = parseFloat(value); - valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0; - } - if (!valueIsDefault) { - transformIsDefault = false; - const transformName = translateAlias$1[key] || key; - transform += `${transformName}(${value}) `; - } - } - // See build-transform.ts: additive `rotate()` so user `rotate` isn't - // clobbered. Not a `transformPropOrder` slot. - const pathRotation = state.latest.pathRotation; - if (pathRotation) { - transformIsDefault = false; - transform += `rotate(${typeof pathRotation === "number" - ? `${pathRotation}deg` - : pathRotation}) `; - } - return transformIsDefault ? "none" : transform.trim(); -} - -const originProps = new Set(["originX", "originY", "originZ"]); -const addStyleValue = (element, state, key, value) => { - let render = undefined; - let computed = undefined; - if (transformProps.has(key)) { - if (!state.get("transform")) { - // If this is an HTML element, we need to set the transform-box to fill-box - // to normalise the transform relative to the element's bounding box - if (!isHTMLElement(element) && !state.get("transformBox")) { - addStyleValue(element, state, "transformBox", new MotionValue("fill-box")); - } - state.set("transform", new MotionValue("none"), () => { - element.style.transform = buildTransform$1(state); - }); - } - computed = state.get("transform"); - } - else if (originProps.has(key)) { - if (!state.get("transformOrigin")) { - state.set("transformOrigin", new MotionValue(""), () => { - const originX = state.latest.originX ?? "50%"; - const originY = state.latest.originY ?? "50%"; - const originZ = state.latest.originZ ?? 0; - element.style.transformOrigin = `${originX} ${originY} ${originZ}`; - }); - } - computed = state.get("transformOrigin"); - } - else if (isCSSVar(key)) { - render = () => { - element.style.setProperty(key, state.latest[key]); - }; - } - else { - render = () => { - element.style[key] = state.latest[key]; - }; - } - return state.set(key, value, render, computed); -}; -const styleEffect = /*@__PURE__*/ createSelectorEffect( -/*@__PURE__*/ createEffect(addStyleValue)); - -function addSVGPathValue(element, state, key, value) { - frame.render(() => element.setAttribute("pathLength", "1")); - if (key === "pathOffset") { - return state.set(key, value, () => { - // Use unitless value to avoid Safari zoom bug - const offset = state.latest[key]; - element.setAttribute("stroke-dashoffset", `${-offset}`); - }); - } - else { - if (!state.get("stroke-dasharray")) { - state.set("stroke-dasharray", new MotionValue("1 1"), () => { - const { pathLength = 1, pathSpacing } = state.latest; - // Use unitless values to avoid Safari zoom bug - element.setAttribute("stroke-dasharray", `${pathLength} ${pathSpacing ?? 1 - Number(pathLength)}`); - }); - } - return state.set(key, value, undefined, state.get("stroke-dasharray")); - } -} -const addSVGValue = (element, state, key, value) => { - if (key.startsWith("path")) { - return addSVGPathValue(element, state, key, value); - } - else if (key.startsWith("attr")) { - return addAttrValue(element, state, convertAttrKey(key), value); - } - const handler = key in element.style ? addStyleValue : addAttrValue; - return handler(element, state, key, value); -}; -const svgEffect = /*@__PURE__*/ createSelectorEffect( -/*@__PURE__*/ createEffect(addSVGValue)); -function convertAttrKey(key) { - return key.replace(/^attr([A-Z])/, (_, firstChar) => firstChar.toLowerCase()); -} - -const { schedule: microtask, cancel: cancelMicrotask } = -/* @__PURE__ */ createRenderBatcher(queueMicrotask, false); - -const isDragging = { - x: false, - y: false, -}; -function isDragActive() { - return isDragging.x || isDragging.y; -} - -function setDragLock(axis) { - if (axis === "x" || axis === "y") { - if (isDragging[axis]) { - return null; - } - else { - isDragging[axis] = true; - return () => { - isDragging[axis] = false; - }; - } - } - else { - if (isDragging.x || isDragging.y) { - return null; - } - else { - isDragging.x = isDragging.y = true; - return () => { - isDragging.x = isDragging.y = false; - }; - } - } -} - -function setupGesture(elementOrSelector, options) { - const elements = resolveElements(elementOrSelector); - const gestureAbortController = new AbortController(); - const eventOptions = { - passive: true, - ...options, - signal: gestureAbortController.signal, - }; - const cancel = () => gestureAbortController.abort(); - return [elements, eventOptions, cancel]; -} - -function isValidHover(event) { - return !(event.pointerType === "touch" || isDragActive()); -} -/** - * Create a hover gesture. hover() is different to .addEventListener("pointerenter") - * in that it has an easier syntax, filters out polyfilled touch events, interoperates - * with drag gestures, and automatically removes the "pointerennd" event listener when the hover ends. - * - * @public - */ -function hover(elementOrSelector, onHoverStart, options = {}) { - const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options); - elements.forEach((element) => { - let isPressed = false; - let deferredHoverEnd = false; - let hoverEndCallback; - const removePointerLeave = () => { - element.removeEventListener("pointerleave", onPointerLeave); - }; - const endHover = (event) => { - if (hoverEndCallback) { - hoverEndCallback(event); - hoverEndCallback = undefined; - } - removePointerLeave(); - }; - const onPointerUp = (event) => { - isPressed = false; - window.removeEventListener("pointerup", onPointerUp); - window.removeEventListener("pointercancel", onPointerUp); - if (deferredHoverEnd) { - deferredHoverEnd = false; - endHover(event); - } - }; - const onPointerDown = () => { - isPressed = true; - window.addEventListener("pointerup", onPointerUp, eventOptions); - window.addEventListener("pointercancel", onPointerUp, eventOptions); - }; - const onPointerLeave = (leaveEvent) => { - if (leaveEvent.pointerType === "touch") - return; - if (isPressed) { - deferredHoverEnd = true; - return; - } - endHover(leaveEvent); - }; - const onPointerEnter = (enterEvent) => { - if (!isValidHover(enterEvent)) - return; - deferredHoverEnd = false; - const onHoverEnd = onHoverStart(element, enterEvent); - if (typeof onHoverEnd !== "function") - return; - hoverEndCallback = onHoverEnd; - element.addEventListener("pointerleave", onPointerLeave, eventOptions); - }; - element.addEventListener("pointerenter", onPointerEnter, eventOptions); - element.addEventListener("pointerdown", onPointerDown, eventOptions); - }); - return cancel; -} - -/** - * Recursively traverse up the tree to check whether the provided child node - * is the parent or a descendant of it. - * - * @param parent - Element to find - * @param child - Element to test against parent - */ -const isNodeOrChild = (parent, child) => { - if (!child) { - return false; - } - else if (parent === child) { - return true; - } - else { - return isNodeOrChild(parent, child.parentElement); - } -}; - -const isPrimaryPointer = (event) => { - if (event.pointerType === "mouse") { - return typeof event.button !== "number" || event.button <= 0; - } - else { - /** - * isPrimary is true for all mice buttons, whereas every touch point - * is regarded as its own input. So subsequent concurrent touch points - * will be false. - * - * Specifically match against false here as incomplete versions of - * PointerEvents in very old browser might have it set as undefined. - */ - return event.isPrimary !== false; - } -}; - -const keyboardAccessibleElements = new Set([ - "BUTTON", - "INPUT", - "SELECT", - "TEXTAREA", - "A", -]); -/** - * Checks if an element is natively keyboard accessible (focusable). - * Used by the press gesture to determine if we need to add tabIndex. - */ -function isElementKeyboardAccessible(element) { - return (keyboardAccessibleElements.has(element.tagName) || - element.isContentEditable === true); -} -const textInputElements = new Set(["INPUT", "SELECT", "TEXTAREA"]); -/** - * Checks if an element has text selection or direct interaction behavior - * that should block drag gestures from starting. - * - * This specifically targets form controls where the user might want to select - * text or interact with the control (e.g., sliders, dropdowns). - * - * Buttons and links are NOT included because they don't have click-and-move - * actions of their own - they only respond to click events, so dragging - * should still work when initiated from these elements. - */ -function isElementTextInput(element) { - return (textInputElements.has(element.tagName) || - element.isContentEditable === true); -} - -const isPressing = new WeakSet(); - -/** - * Filter out events that are not "Enter" keys. - */ -function filterEvents(callback) { - return (event) => { - if (event.key !== "Enter") - return; - callback(event); - }; -} -function firePointerEvent(target, type) { - target.dispatchEvent(new PointerEvent("pointer" + type, { isPrimary: true, bubbles: true })); -} -const enableKeyboardPress = (focusEvent, eventOptions) => { - const element = focusEvent.currentTarget; - if (!element) - return; - const handleKeydown = filterEvents(() => { - if (isPressing.has(element)) - return; - firePointerEvent(element, "down"); - const handleKeyup = filterEvents(() => { - firePointerEvent(element, "up"); - }); - const handleBlur = () => firePointerEvent(element, "cancel"); - element.addEventListener("keyup", handleKeyup, eventOptions); - element.addEventListener("blur", handleBlur, eventOptions); - }); - element.addEventListener("keydown", handleKeydown, eventOptions); - /** - * Add an event listener that fires on blur to remove the keydown events. - */ - element.addEventListener("blur", () => element.removeEventListener("keydown", handleKeydown), eventOptions); -}; - -/** - * Filter out events that are not primary pointer events, or are triggering - * while a Motion gesture is active. - */ -function isValidPressEvent(event) { - return isPrimaryPointer(event) && !isDragActive(); -} -const claimedPointerDownEvents = new WeakSet(); -/** - * Create a press gesture. - * - * Press is different to `"pointerdown"`, `"pointerup"` in that it - * automatically filters out secondary pointer events like right - * click and multitouch. - * - * It also adds accessibility support for keyboards, where - * an element with a press gesture will receive focus and - * trigger on Enter `"keydown"` and `"keyup"` events. - * - * This is different to a browser's `"click"` event, which does - * respond to keyboards but only for the `"click"` itself, rather - * than the press start and end/cancel. The element also needs - * to be focusable for this to work, whereas a press gesture will - * make an element focusable by default. - * - * @public - */ -function press(targetOrSelector, onPressStart, options = {}) { - const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options); - const startPress = (startEvent) => { - const target = startEvent.currentTarget; - if (!isValidPressEvent(startEvent)) - return; - if (claimedPointerDownEvents.has(startEvent)) - return; - isPressing.add(target); - if (options.stopPropagation) { - claimedPointerDownEvents.add(startEvent); - } - const onPressEnd = onPressStart(target, startEvent); - const onPointerEnd = (endEvent, success) => { - window.removeEventListener("pointerup", onPointerUp); - window.removeEventListener("pointercancel", onPointerCancel); - if (isPressing.has(target)) { - isPressing.delete(target); - } - if (!isValidPressEvent(endEvent)) { - return; - } - if (typeof onPressEnd === "function") { - onPressEnd(endEvent, { success }); - } - }; - const onPointerUp = (upEvent) => { - onPointerEnd(upEvent, target === window || - target === document || - options.useGlobalTarget || - isNodeOrChild(target, upEvent.target)); - }; - const onPointerCancel = (cancelEvent) => { - onPointerEnd(cancelEvent, false); - }; - window.addEventListener("pointerup", onPointerUp, eventOptions); - window.addEventListener("pointercancel", onPointerCancel, eventOptions); - }; - targets.forEach((target) => { - const pointerDownTarget = options.useGlobalTarget ? window : target; - pointerDownTarget.addEventListener("pointerdown", startPress, eventOptions); - if (isHTMLElement(target)) { - target.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions)); - if (!isElementKeyboardAccessible(target) && - !target.hasAttribute("tabindex")) { - target.tabIndex = 0; - } - } - }); - return cancelEvents; -} - -function getComputedStyle$2(element, name) { - const computedStyle = window.getComputedStyle(element); - return isCSSVar(name) - ? computedStyle.getPropertyValue(name) - : computedStyle[name]; -} - -/** - * Checks if an element is an SVG element in a way - * that works across iframes - */ -function isSVGElement(element) { - return motionUtils.isObject(element) && "ownerSVGElement" in element; -} - -const resizeHandlers = new WeakMap(); -let observer; -const getSize = (borderBoxAxis, svgAxis, htmlAxis) => (target, borderBoxSize) => { - if (borderBoxSize && borderBoxSize[0]) { - return borderBoxSize[0][(borderBoxAxis + "Size")]; - } - else if (isSVGElement(target) && "getBBox" in target) { - return target.getBBox()[svgAxis]; - } - else { - return target[htmlAxis]; - } -}; -const getWidth = /*@__PURE__*/ getSize("inline", "width", "offsetWidth"); -const getHeight = /*@__PURE__*/ getSize("block", "height", "offsetHeight"); -function notifyTarget({ target, borderBoxSize }) { - resizeHandlers.get(target)?.forEach((handler) => { - handler(target, { - get width() { - return getWidth(target, borderBoxSize); - }, - get height() { - return getHeight(target, borderBoxSize); - }, - }); - }); -} -function notifyAll(entries) { - entries.forEach(notifyTarget); -} -function createResizeObserver() { - if (typeof ResizeObserver === "undefined") - return; - observer = new ResizeObserver(notifyAll); -} -function resizeElement(target, handler) { - if (!observer) - createResizeObserver(); - const elements = resolveElements(target); - elements.forEach((element) => { - let elementHandlers = resizeHandlers.get(element); - if (!elementHandlers) { - elementHandlers = new Set(); - resizeHandlers.set(element, elementHandlers); - } - elementHandlers.add(handler); - observer?.observe(element); - }); - return () => { - elements.forEach((element) => { - const elementHandlers = resizeHandlers.get(element); - elementHandlers?.delete(handler); - if (!elementHandlers?.size) { - observer?.unobserve(element); - } - }); - }; -} - -const windowCallbacks = new Set(); -let windowResizeHandler; -function createWindowResizeHandler() { - windowResizeHandler = () => { - const info = { - get width() { - return window.innerWidth; - }, - get height() { - return window.innerHeight; - }, - }; - windowCallbacks.forEach((callback) => callback(info)); - }; - window.addEventListener("resize", windowResizeHandler); -} -function resizeWindow(callback) { - windowCallbacks.add(callback); - if (!windowResizeHandler) - createWindowResizeHandler(); - return () => { - windowCallbacks.delete(callback); - if (!windowCallbacks.size && - typeof windowResizeHandler === "function") { - window.removeEventListener("resize", windowResizeHandler); - windowResizeHandler = undefined; - } - }; -} - -function resize(a, b) { - return typeof a === "function" ? resizeWindow(a) : resizeElement(a, b); -} - -function observeTimeline(update, timeline) { - let prevProgress; - const onFrame = () => { - const { currentTime } = timeline; - const percentage = currentTime === null ? 0 : currentTime.value; - const progress = percentage / 100; - if (prevProgress !== progress) { - update(progress); - } - prevProgress = progress; - }; - frame.preUpdate(onFrame, true); - return () => cancelFrame(onFrame); -} - -function record() { - const { value } = statsBuffer; - if (value === null) { - cancelFrame(record); - return; - } - value.frameloop.rate.push(frameData.delta); - value.animations.mainThread.push(activeAnimations.mainThread); - value.animations.waapi.push(activeAnimations.waapi); - value.animations.layout.push(activeAnimations.layout); -} -function mean(values) { - return values.reduce((acc, value) => acc + value, 0) / values.length; -} -function summarise(values, calcAverage = mean) { - if (values.length === 0) { - return { - min: 0, - max: 0, - avg: 0, - }; - } - return { - min: Math.min(...values), - max: Math.max(...values), - avg: calcAverage(values), - }; -} -const msToFps = (ms) => Math.round(1000 / ms); -function clearStatsBuffer() { - statsBuffer.value = null; - statsBuffer.addProjectionMetrics = null; -} -function reportStats() { - const { value } = statsBuffer; - if (!value) { - throw new Error("Stats are not being measured"); - } - clearStatsBuffer(); - cancelFrame(record); - const summary = { - frameloop: { - setup: summarise(value.frameloop.setup), - rate: summarise(value.frameloop.rate), - read: summarise(value.frameloop.read), - resolveKeyframes: summarise(value.frameloop.resolveKeyframes), - preUpdate: summarise(value.frameloop.preUpdate), - update: summarise(value.frameloop.update), - preRender: summarise(value.frameloop.preRender), - render: summarise(value.frameloop.render), - postRender: summarise(value.frameloop.postRender), - }, - animations: { - mainThread: summarise(value.animations.mainThread), - waapi: summarise(value.animations.waapi), - layout: summarise(value.animations.layout), - }, - layoutProjection: { - nodes: summarise(value.layoutProjection.nodes), - calculatedTargetDeltas: summarise(value.layoutProjection.calculatedTargetDeltas), - calculatedProjections: summarise(value.layoutProjection.calculatedProjections), - }, - }; - /** - * Convert the rate to FPS - */ - const { rate } = summary.frameloop; - rate.min = msToFps(rate.min); - rate.max = msToFps(rate.max); - rate.avg = msToFps(rate.avg); - [rate.min, rate.max] = [rate.max, rate.min]; - return summary; -} -function recordStats() { - if (statsBuffer.value) { - clearStatsBuffer(); - throw new Error("Stats are already being measured"); - } - const newStatsBuffer = statsBuffer; - newStatsBuffer.value = { - frameloop: { - setup: [], - rate: [], - read: [], - resolveKeyframes: [], - preUpdate: [], - update: [], - preRender: [], - render: [], - postRender: [], - }, - animations: { - mainThread: [], - waapi: [], - layout: [], - }, - layoutProjection: { - nodes: [], - calculatedTargetDeltas: [], - calculatedProjections: [], - }, - }; - newStatsBuffer.addProjectionMetrics = (metrics) => { - const { layoutProjection } = newStatsBuffer.value; - layoutProjection.nodes.push(metrics.nodes); - layoutProjection.calculatedTargetDeltas.push(metrics.calculatedTargetDeltas); - layoutProjection.calculatedProjections.push(metrics.calculatedProjections); - }; - frame.postRender(record, true); - return reportStats; -} - -/** - * Checks if an element is specifically an SVGSVGElement (the root SVG element) - * in a way that works across iframes - */ -function isSVGSVGElement(element) { - return isSVGElement(element) && element.tagName === "svg"; -} - -function getOriginIndex(from, total) { - if (from === "first") { - return 0; - } - else { - const lastIndex = total - 1; - return from === "last" ? lastIndex : lastIndex / 2; - } -} -function stagger(duration = 0.1, { startDelay = 0, from = 0, ease } = {}) { - return (i, total) => { - const fromIndex = typeof from === "number" ? from : getOriginIndex(from, total); - const distance = Math.abs(fromIndex - i); - let delay = duration * distance; - if (ease) { - const maxDelay = total * duration; - const easingFunction = motionUtils.easingDefinitionToFunction(ease); - delay = easingFunction(delay / maxDelay) * maxDelay; - } - return startDelay + delay; - }; -} - -function transform(...args) { - const useImmediate = !Array.isArray(args[0]); - const argOffset = useImmediate ? 0 : -1; - const inputValue = args[0 + argOffset]; - const inputRange = args[1 + argOffset]; - const outputRange = args[2 + argOffset]; - const options = args[3 + argOffset]; - const interpolator = interpolate(inputRange, outputRange, options); - return useImmediate ? interpolator(inputValue) : interpolator; -} - -/** - * Create a `MotionValue` that animates to its latest value using any transition type. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = followValue(x, { type: "spring", stiffness: 300 }) - * // or with tween - * const z = followValue(x, { type: "tween", duration: 0.5, ease: "easeOut" }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns `MotionValue` - * - * @public - */ -function followValue(source, options) { - const initialValue = isMotionValue(source) ? source.get() : source; - const value = motionValue(initialValue); - attachFollow(value, source, options); - return value; -} -/** - * Attach an animation to a MotionValue that will animate whenever the value changes. - * Similar to attachSpring but supports any transition type (spring, tween, inertia, etc.) - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns Cleanup function - * - * @public - */ -function attachFollow(value, source, options = {}) { - const initialValue = value.get(); - let activeAnimation = null; - let latestValue = initialValue; - let latestSetter; - const unit = typeof initialValue === "string" - ? initialValue.replace(/[\d.-]/g, "") - : undefined; - const stopAnimation = () => { - if (activeAnimation) { - activeAnimation.stop(); - activeAnimation = null; - } - value.animation = undefined; - }; - const startAnimation = () => { - const currentValue = asNumber$1(value.get()); - const targetValue = asNumber$1(latestValue); - // Don't animate if we're already at the target - if (currentValue === targetValue) { - stopAnimation(); - return; - } - // Use the running animation's analytical velocity for accuracy, - // falling back to the MotionValue's velocity for the initial animation. - // This prevents systematic velocity loss at high frame rates (240hz+). - const velocity = activeAnimation - ? activeAnimation.getGeneratorVelocity() - : value.getVelocity(); - stopAnimation(); - activeAnimation = new JSAnimation({ - keyframes: [currentValue, targetValue], - velocity, - // Default to spring if no type specified (matches useSpring behavior) - type: "spring", - restDelta: 0.001, - restSpeed: 0.01, - ...options, - onUpdate: latestSetter, - }); - }; - // Use a stable function reference so the frame loop Set deduplicates - // multiple calls within the same frame (e.g. rapid mouse events) - const scheduleAnimation = () => { - startAnimation(); - value.animation = activeAnimation ?? undefined; - value["events"].animationStart?.notify(); - activeAnimation?.then(() => { - value.animation = undefined; - value["events"].animationComplete?.notify(); - }); - }; - value.attach((v, set) => { - latestValue = v; - latestSetter = (latest) => set(parseValue(latest, unit)); - frame.postRender(scheduleAnimation); - }, stopAnimation); - if (isMotionValue(source)) { - let skipNextAnimation = options.skipInitialAnimation === true; - const removeSourceOnChange = source.on("change", (v) => { - if (skipNextAnimation) { - skipNextAnimation = false; - value.jump(parseValue(v, unit), false); - } - else { - value.set(parseValue(v, unit)); - } - }); - const removeValueOnDestroy = value.on("destroy", removeSourceOnChange); - return () => { - removeSourceOnChange(); - removeValueOnDestroy(); - }; - } - return stopAnimation; -} -function parseValue(v, unit) { - return unit ? v + unit : v; -} -function asNumber$1(v) { - return typeof v === "number" ? v : parseFloat(v); -} - -function subscribeValue(inputValues, outputValue, getLatest) { - const update = () => outputValue.set(getLatest()); - const scheduleUpdate = () => frame.preRender(update, false, true); - const subscriptions = inputValues.map((v) => v.on("change", scheduleUpdate)); - outputValue.on("destroy", () => { - subscriptions.forEach((unsubscribe) => unsubscribe()); - cancelFrame(update); - }); -} - -/** - * Create a `MotionValue` that transforms the output of other `MotionValue`s by - * passing their latest values through a transform function. - * - * Whenever a `MotionValue` referred to in the provided function is updated, - * it will be re-evaluated. - * - * ```jsx - * const x = motionValue(0) - * const y = transformValue(() => x.get() * 2) // double x - * ``` - * - * @param transformer - A transform function. This function must be pure with no side-effects or conditional statements. - * @returns `MotionValue` - * - * @public - */ -function transformValue(transform) { - const collectedValues = []; - /** - * Open session of collectMotionValues. Any MotionValue that calls get() - * inside transform will be saved into this array. - */ - collectMotionValues.current = collectedValues; - const initialValue = transform(); - collectMotionValues.current = undefined; - const value = motionValue(initialValue); - subscribeValue(collectedValues, value, transform); - return value; -} - -/** - * Create a `MotionValue` that maps the output of another `MotionValue` by - * mapping it from one range of values into another. - * - * @remarks - * - * Given an input range of `[-200, -100, 100, 200]` and an output range of - * `[0, 1, 1, 0]`, the returned `MotionValue` will: - * - * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`. - * - When provided a value between `-100` and `100`, will return `1`. - * - When provided a value between `100` and `200`, will return a value between `1` and `0` - * - * The input range must be a linear series of numbers. The output range - * can be any value type supported by Motion: numbers, colors, shadows, etc. - * - * Every value in the output range must be of the same type and in the same format. - * - * ```jsx - * const x = motionValue(0) - * const xRange = [-200, -100, 100, 200] - * const opacityRange = [0, 1, 1, 0] - * const opacity = mapValue(x, xRange, opacityRange) - * ``` - * - * @param inputValue - `MotionValue` - * @param inputRange - A linear series of numbers (either all increasing or decreasing) - * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`. - * @param options - - * - * - clamp: boolean. Clamp values to within the given range. Defaults to `true` - * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each. - * - * @returns `MotionValue` - * - * @public - */ -function mapValue(inputValue, inputRange, outputRange, options) { - const map = transform(inputRange, outputRange, options); - return transformValue(() => map(inputValue.get())); -} - -/** - * Create a `MotionValue` that animates to its latest value using a spring. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = springValue(x, { stiffness: 300 }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns `MotionValue` - * - * @public - */ -function springValue(source, options) { - return followValue(source, { type: "spring", ...options }); -} -/** - * Attach a spring animation to a MotionValue that will animate whenever the value changes. - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns Cleanup function - * - * @public - */ -function attachSpring(value, source, options) { - return attachFollow(value, source, { type: "spring", ...options }); -} - -/** - * A list of all ValueTypes - */ -const valueTypes = [...dimensionValueTypes, color, complex]; -/** - * Tests a value against the list of ValueTypes - */ -const findValueType = (v) => valueTypes.find(testValueType(v)); - -function chooseLayerType(valueName) { - if (valueName === "layout") - return "group"; - if (valueName === "enter" || valueName === "new") - return "new"; - if (valueName === "exit" || valueName === "old") - return "old"; - return "group"; -} - -let pendingRules = {}; -let style = null; -const css = { - set: (selector, values) => { - pendingRules[selector] = values; - }, - commit: () => { - if (!style) { - style = document.createElement("style"); - style.id = "motion-view"; - } - let cssText = ""; - for (const selector in pendingRules) { - const rule = pendingRules[selector]; - cssText += `${selector} {\n`; - for (const [property, value] of Object.entries(rule)) { - cssText += ` ${property}: ${value};\n`; - } - cssText += "}\n"; - } - style.textContent = cssText; - document.head.appendChild(style); - pendingRules = {}; - }, - remove: () => { - if (style && style.parentElement) { - style.parentElement.removeChild(style); - } - }, -}; - -function getViewAnimationLayerInfo(pseudoElement) { - const match = pseudoElement.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/); - if (!match) - return null; - return { layer: match[2], type: match[1] }; -} - -function filterViewAnimations(animation) { - const { effect } = animation; - if (!effect) - return false; - return (effect.target === document.documentElement && - effect.pseudoElement?.startsWith("::view-transition")); -} -function getViewAnimations() { - return document.getAnimations().filter(filterViewAnimations); -} - -function hasTarget(target, targets) { - return targets.has(target) && Object.keys(targets.get(target)).length > 0; -} - -const definitionNames = ["layout", "enter", "exit", "new", "old"]; -function startViewAnimation(builder) { - const { update, targets, options: defaultOptions } = builder; - if (!document.startViewTransition) { - return new Promise(async (resolve) => { - await update(); - resolve(new GroupAnimation([])); - }); - } - // TODO: Go over existing targets and ensure they all have ids - /** - * If we don't have any animations defined for the root target, - * remove it from being captured. - */ - if (!hasTarget("root", targets)) { - css.set(":root", { - "view-transition-name": "none", - }); - } - /** - * Set the timing curve to linear for all view transition layers. - * This gets baked into the keyframes, which can't be changed - * without breaking the generated animation. - * - * This allows us to set easing via updateTiming - which can be changed. - */ - css.set("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)", { "animation-timing-function": "linear !important" }); - css.commit(); // Write - const transition = document.startViewTransition(async () => { - await update(); - // TODO: Go over new targets and ensure they all have ids - }); - transition.finished.finally(() => { - css.remove(); // Write - }); - return new Promise((resolve) => { - transition.ready.then(() => { - const generatedViewAnimations = getViewAnimations(); - const animations = []; - /** - * Create animations for each of our explicitly-defined subjects. - */ - targets.forEach((definition, target) => { - // TODO: If target is not "root", resolve elements - // and iterate over each - for (const key of definitionNames) { - if (!definition[key]) - continue; - const { keyframes, options } = definition[key]; - for (let [valueName, valueKeyframes] of Object.entries(keyframes)) { - if (!valueKeyframes) - continue; - const valueOptions = { - ...getValueTransition(defaultOptions, valueName), - ...getValueTransition(options, valueName), - }; - const type = chooseLayerType(key); - /** - * If this is an opacity animation, and keyframes are not an array, - * we need to convert them into an array and set an initial value. - */ - if (valueName === "opacity" && - !Array.isArray(valueKeyframes)) { - const initialValue = type === "new" ? 0 : 1; - valueKeyframes = [initialValue, valueKeyframes]; - } - /** - * Resolve stagger function if provided. - */ - if (typeof valueOptions.delay === "function") { - valueOptions.delay = valueOptions.delay(0, 1); - } - valueOptions.duration && (valueOptions.duration = motionUtils.secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = motionUtils.secondsToMilliseconds(valueOptions.delay)); - const animation = new NativeAnimation({ - ...valueOptions, - element: document.documentElement, - name: valueName, - pseudoElement: `::view-transition-${type}(${target})`, - keyframes: valueKeyframes, - }); - animations.push(animation); - } - } - }); - /** - * Handle browser generated animations - */ - for (const animation of generatedViewAnimations) { - if (animation.playState === "finished") - continue; - const { effect } = animation; - if (!effect || !(effect instanceof KeyframeEffect)) - continue; - const { pseudoElement } = effect; - if (!pseudoElement) - continue; - const name = getViewAnimationLayerInfo(pseudoElement); - if (!name) - continue; - const targetDefinition = targets.get(name.layer); - if (!targetDefinition) { - /** - * If transition name is group then update the timing of the animation - * whereas if it's old or new then we could possibly replace it using - * the above method. - */ - const transitionName = name.type === "group" ? "layout" : ""; - let animationTransition = { - ...getValueTransition(defaultOptions, transitionName), - }; - animationTransition.duration && (animationTransition.duration = motionUtils.secondsToMilliseconds(animationTransition.duration)); - animationTransition = - applyGeneratorOptions(animationTransition); - const easing = mapEasingToNativeEasing(animationTransition.ease, animationTransition.duration); - effect.updateTiming({ - delay: motionUtils.secondsToMilliseconds(animationTransition.delay ?? 0), - duration: animationTransition.duration, - easing, - }); - animations.push(new NativeAnimationWrapper(animation)); - } - else if (hasOpacity(targetDefinition, "enter") && - hasOpacity(targetDefinition, "exit") && - effect - .getKeyframes() - .some((keyframe) => keyframe.mixBlendMode)) { - animations.push(new NativeAnimationWrapper(animation)); - } - else { - animation.cancel(); - } - } - resolve(new GroupAnimation(animations)); - }); - }); -} -function hasOpacity(target, key) { - return target?.[key]?.keyframes.opacity; -} - -let builders = []; -let current = null; -function next() { - current = null; - const [nextBuilder] = builders; - if (nextBuilder) - start(nextBuilder); -} -function start(builder) { - motionUtils.removeItem(builders, builder); - current = builder; - startViewAnimation(builder).then((animation) => { - builder.notifyReady(animation); - animation.finished.finally(next); - }); -} -function processQueue() { - /** - * Iterate backwards over the builders array. We can ignore the - * "wait" animations. If we have an interrupting animation in the - * queue then we need to batch all preceeding animations into it. - * Currently this only batches the update functions but will also - * need to batch the targets. - */ - for (let i = builders.length - 1; i >= 0; i--) { - const builder = builders[i]; - const { interrupt } = builder.options; - if (interrupt === "immediate") { - const batchedUpdates = builders.slice(0, i + 1).map((b) => b.update); - const remaining = builders.slice(i + 1); - builder.update = () => { - batchedUpdates.forEach((update) => update()); - }; - // Put the current builder at the front, followed by any "wait" builders - builders = [builder, ...remaining]; - break; - } - } - if (!current || builders[0]?.options.interrupt === "immediate") { - next(); - } -} -function addToQueue(builder) { - builders.push(builder); - microtask.render(processQueue); -} - -class ViewTransitionBuilder { - constructor(update, options = {}) { - this.currentSubject = "root"; - this.targets = new Map(); - this.notifyReady = motionUtils.noop; - this.readyPromise = new Promise((resolve) => { - this.notifyReady = resolve; - }); - this.update = update; - this.options = { - interrupt: "wait", - ...options, - }; - addToQueue(this); - } - get(subject) { - this.currentSubject = subject; - return this; - } - layout(keyframes, options) { - this.updateTarget("layout", keyframes, options); - return this; - } - new(keyframes, options) { - this.updateTarget("new", keyframes, options); - return this; - } - old(keyframes, options) { - this.updateTarget("old", keyframes, options); - return this; - } - enter(keyframes, options) { - this.updateTarget("enter", keyframes, options); - return this; - } - exit(keyframes, options) { - this.updateTarget("exit", keyframes, options); - return this; - } - crossfade(options) { - this.updateTarget("enter", { opacity: 1 }, options); - this.updateTarget("exit", { opacity: 0 }, options); - return this; - } - updateTarget(target, keyframes, options = {}) { - const { currentSubject, targets } = this; - if (!targets.has(currentSubject)) { - targets.set(currentSubject, {}); - } - const targetData = targets.get(currentSubject); - targetData[target] = { keyframes, options }; - } - then(resolve, reject) { - return this.readyPromise.then(resolve, reject); - } -} -function animateView(update, defaultOptions = {}) { - return new ViewTransitionBuilder(update, defaultOptions); -} - -const createAxisDelta = () => ({ - translate: 0, - scale: 1, - origin: 0, - originPoint: 0, -}); -const createDelta = () => ({ - x: createAxisDelta(), - y: createAxisDelta(), -}); -const createAxis = () => ({ min: 0, max: 0 }); -const createBox = () => ({ - x: createAxis(), - y: createAxis(), -}); - -const visualElementStore = new WeakMap(); - -function isAnimationControls(v) { - return (v !== null && - typeof v === "object" && - typeof v.start === "function"); -} - -/** - * Decides if the supplied variable is variant label - */ -function isVariantLabel(v) { - return typeof v === "string" || Array.isArray(v); -} - -const variantPriorityOrder = [ - "animate", - "whileInView", - "whileFocus", - "whileHover", - "whileTap", - "whileDrag", - "exit", -]; -const variantProps = ["initial", ...variantPriorityOrder]; - -function isControllingVariants(props) { - return (isAnimationControls(props.animate) || - variantProps.some((name) => isVariantLabel(props[name]))); -} -function isVariantNode(props) { - return Boolean(isControllingVariants(props) || props.variants); -} - -/** - * Updates motion values from props changes. - * Uses `any` type for element to avoid circular dependencies with VisualElement. - */ -function updateMotionValuesFromProps(element, next, prev) { - for (const key in next) { - const nextValue = next[key]; - const prevValue = prev[key]; - if (isMotionValue(nextValue)) { - /** - * If this is a motion value found in props or style, we want to add it - * to our visual element's motion value map. - */ - element.addValue(key, nextValue); - } - else if (isMotionValue(prevValue)) { - /** - * If we're swapping from a motion value to a static value, - * create a new motion value from that - */ - element.addValue(key, motionValue(nextValue, { owner: element })); - } - else if (prevValue !== nextValue) { - /** - * If this is a flat value that has changed, update the motion value - * or create one if it doesn't exist. We only want to do this if we're - * not handling the value with our animation state. - */ - if (element.hasValue(key)) { - const existingValue = element.getValue(key); - if (existingValue.liveStyle === true) { - existingValue.jump(nextValue); - } - else if (!existingValue.hasAnimated) { - existingValue.set(nextValue); - } - } - else { - const latestValue = element.getStaticValue(key); - element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element })); - } - } - } - // Handle removed values - for (const key in prev) { - if (next[key] === undefined) - element.removeValue(key); - } - return next; -} - -// Does this device prefer reduced motion? Returns `null` server-side. -const prefersReducedMotion = { current: null }; -const hasReducedMotionListener = { current: false }; - -const isBrowser = typeof window !== "undefined"; -function initPrefersReducedMotion() { - hasReducedMotionListener.current = true; - if (!isBrowser) - return; - if (window.matchMedia) { - const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)"); - const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches); - motionMediaQuery.addEventListener("change", setReducedMotionPreferences); - setReducedMotionPreferences(); - } - else { - prefersReducedMotion.current = false; - } -} - -const propEventHandlers = [ - "AnimationStart", - "AnimationComplete", - "Update", - "BeforeLayoutMeasure", - "LayoutMeasure", - "LayoutAnimationStart", - "LayoutAnimationComplete", -]; -/** - * Static feature definitions - can be injected by framework layer - */ -let featureDefinitions = {}; -/** - * Set feature definitions for all VisualElements. - * This should be called by the framework layer (e.g., framer-motion) during initialization. - */ -function setFeatureDefinitions(definitions) { - featureDefinitions = definitions; -} -/** - * Get the current feature definitions - */ -function getFeatureDefinitions() { - return featureDefinitions; -} -/** - * A VisualElement is an imperative abstraction around UI elements such as - * HTMLElement, SVGElement, Three.Object3D etc. - */ -class VisualElement { - /** - * This method takes React props and returns found MotionValues. For example, HTML - * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays. - * - * This isn't an abstract method as it needs calling in the constructor, but it is - * intended to be one. - */ - scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) { - return {}; - } - constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) { - /** - * A reference to the current underlying Instance, e.g. a HTMLElement - * or Three.Mesh etc. - */ - this.current = null; - /** - * A set containing references to this VisualElement's children. - */ - this.children = new Set(); - /** - * Determine what role this visual element should take in the variant tree. - */ - this.isVariantNode = false; - this.isControllingVariants = false; - /** - * Decides whether this VisualElement should animate in reduced motion - * mode. - * - * TODO: This is currently set on every individual VisualElement but feels - * like it could be set globally. - */ - this.shouldReduceMotion = null; - /** - * Decides whether animations should be skipped for this VisualElement. - * Useful for E2E tests and visual regression testing. - */ - this.shouldSkipAnimations = false; - /** - * A map of all motion values attached to this visual element. Motion - * values are source of truth for any given animated value. A motion - * value might be provided externally by the component via props. - */ - this.values = new Map(); - this.KeyframeResolver = KeyframeResolver; - /** - * Cleanup functions for active features (hover/tap/exit etc) - */ - this.features = {}; - /** - * A map of every subscription that binds the provided or generated - * motion values onChange listeners to this visual element. - */ - this.valueSubscriptions = new Map(); - /** - * A reference to the previously-provided motion values as returned - * from scrapeMotionValuesFromProps. We use the keys in here to determine - * if any motion values need to be removed after props are updated. - */ - this.prevMotionValues = {}; - /** - * Track whether this element has been mounted before, to detect - * remounts after Suspense unmount/remount cycles. - */ - this.hasBeenMounted = false; - /** - * An object containing a SubscriptionManager for each active event. - */ - this.events = {}; - /** - * An object containing an unsubscribe function for each prop event subscription. - * For example, every "Update" event can have multiple subscribers via - * VisualElement.on(), but only one of those can be defined via the onUpdate prop. - */ - this.propEventSubscriptions = {}; - this.notifyUpdate = () => this.notify("Update", this.latestValues); - this.render = () => { - if (!this.current) - return; - this.triggerBuild(); - this.renderInstance(this.current, this.renderState, this.props.style, this.projection); - }; - this.renderScheduledAt = 0.0; - this.scheduleRender = () => { - const now = time.now(); - if (this.renderScheduledAt < now) { - this.renderScheduledAt = now; - frame.render(this.render, false, true); - } - }; - const { latestValues, renderState } = visualState; - this.latestValues = latestValues; - this.baseTarget = { ...latestValues }; - this.initialValues = props.initial ? { ...latestValues } : {}; - this.renderState = renderState; - this.parent = parent; - this.props = props; - this.presenceContext = presenceContext; - this.depth = parent ? parent.depth + 1 : 0; - this.reducedMotionConfig = reducedMotionConfig; - this.skipAnimationsConfig = skipAnimations; - this.options = options; - this.blockInitialAnimation = Boolean(blockInitialAnimation); - this.isControllingVariants = isControllingVariants(props); - this.isVariantNode = isVariantNode(props); - if (this.isVariantNode) { - this.variantChildren = new Set(); - } - this.manuallyAnimateOnMount = Boolean(parent && parent.current); - /** - * Any motion values that are provided to the element when created - * aren't yet bound to the element, as this would technically be impure. - * However, we iterate through the motion values and set them to the - * initial values for this component. - * - * TODO: This is impure and we should look at changing this to run on mount. - * Doing so will break some tests but this isn't necessarily a breaking change, - * more a reflection of the test. - */ - const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this); - for (const key in initialMotionValues) { - const value = initialMotionValues[key]; - if (latestValues[key] !== undefined && isMotionValue(value)) { - value.set(latestValues[key]); - } - } - } - mount(instance) { - /** - * If this element has been mounted before (e.g. after a Suspense - * unmount/remount), reset motion values to their initial state - * so animations replay correctly from initial → animate. - */ - if (this.hasBeenMounted) { - for (const key in this.initialValues) { - this.values.get(key)?.jump(this.initialValues[key]); - this.latestValues[key] = this.initialValues[key]; - } - } - this.current = instance; - visualElementStore.set(instance, this); - if (this.projection && !this.projection.instance) { - this.projection.mount(instance); - } - if (this.parent && this.isVariantNode && !this.isControllingVariants) { - this.removeFromVariantTree = this.parent.addVariantChild(this); - } - this.values.forEach((value, key) => this.bindToMotionValue(key, value)); - /** - * Determine reduced motion preference. Only initialize the matchMedia - * listener if we actually need the dynamic value (i.e., when config - * is neither "never" nor "always"). - */ - if (this.reducedMotionConfig === "never") { - this.shouldReduceMotion = false; - } - else if (this.reducedMotionConfig === "always") { - this.shouldReduceMotion = true; - } - else { - if (!hasReducedMotionListener.current) { - initPrefersReducedMotion(); - } - this.shouldReduceMotion = prefersReducedMotion.current; - } - if (process.env.NODE_ENV !== "production") { - motionUtils.warnOnce(this.shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"); - } - /** - * Set whether animations should be skipped based on the config. - */ - this.shouldSkipAnimations = this.skipAnimationsConfig ?? false; - this.parent?.addChild(this); - this.update(this.props, this.presenceContext); - this.hasBeenMounted = true; - } - unmount() { - this.projection && this.projection.unmount(); - cancelFrame(this.notifyUpdate); - cancelFrame(this.render); - this.valueSubscriptions.forEach((remove) => remove()); - this.valueSubscriptions.clear(); - this.removeFromVariantTree && this.removeFromVariantTree(); - this.parent?.removeChild(this); - for (const key in this.events) { - this.events[key].clear(); - } - for (const key in this.features) { - const feature = this.features[key]; - if (feature) { - feature.unmount(); - feature.isMounted = false; - } - } - this.current = null; - } - addChild(child) { - this.children.add(child); - this.enteringChildren ?? (this.enteringChildren = new Set()); - this.enteringChildren.add(child); - } - removeChild(child) { - this.children.delete(child); - this.enteringChildren && this.enteringChildren.delete(child); - } - bindToMotionValue(key, value) { - if (this.valueSubscriptions.has(key)) { - this.valueSubscriptions.get(key)(); - } - if (value.accelerate && - acceleratedValues.has(key) && - this.current instanceof HTMLElement) { - const { factory, keyframes, times, ease, duration } = value.accelerate; - const animation = new NativeAnimation({ - element: this.current, - name: key, - keyframes, - times, - ease, - duration: motionUtils.secondsToMilliseconds(duration), - }); - const cleanup = factory(animation); - this.valueSubscriptions.set(key, () => { - cleanup(); - animation.cancel(); - }); - return; - } - const valueIsTransform = transformProps.has(key); - if (valueIsTransform && this.onBindTransform) { - this.onBindTransform(); - } - const removeOnChange = value.on("change", (latestValue) => { - this.latestValues[key] = latestValue; - this.props.onUpdate && frame.preRender(this.notifyUpdate); - if (valueIsTransform && this.projection) { - this.projection.isTransformDirty = true; - } - this.scheduleRender(); - }); - let removeSyncCheck; - if (typeof window !== "undefined" && - window.MotionCheckAppearSync) { - removeSyncCheck = window.MotionCheckAppearSync(this, key, value); - } - this.valueSubscriptions.set(key, () => { - removeOnChange(); - if (removeSyncCheck) - removeSyncCheck(); - // Defer to MotionValue.on("change") auto-stop so React 19 remounts - // can resubscribe before the animation is cancelled (#3315). - }); - } - sortNodePosition(other) { - /** - * If these nodes aren't even of the same type we can't compare their depth. - */ - if (!this.current || - !this.sortInstanceNodePosition || - this.type !== other.type) { - return 0; - } - return this.sortInstanceNodePosition(this.current, other.current); - } - updateFeatures() { - let key = "animation"; - for (key in featureDefinitions) { - const featureDefinition = featureDefinitions[key]; - if (!featureDefinition) - continue; - const { isEnabled, Feature: FeatureConstructor } = featureDefinition; - /** - * If this feature is enabled but not active, make a new instance. - */ - if (!this.features[key] && - FeatureConstructor && - isEnabled(this.props)) { - this.features[key] = new FeatureConstructor(this); - } - /** - * If we have a feature, mount or update it. - */ - if (this.features[key]) { - const feature = this.features[key]; - if (feature.isMounted) { - feature.update(); - } - else { - feature.mount(); - feature.isMounted = true; - } - } - } - } - triggerBuild() { - this.build(this.renderState, this.latestValues, this.props); - } - /** - * Measure the current viewport box with or without transforms. - * Only measures axis-aligned boxes, rotate and skew must be manually - * removed with a re-render to work. - */ - measureViewportBox() { - return this.current - ? this.measureInstanceViewportBox(this.current, this.props) - : createBox(); - } - getStaticValue(key) { - return this.latestValues[key]; - } - setStaticValue(key, value) { - this.latestValues[key] = value; - } - /** - * Update the provided props. Ensure any newly-added motion values are - * added to our map, old ones removed, and listeners updated. - */ - update(props, presenceContext) { - if (props.transformTemplate || this.props.transformTemplate) { - this.scheduleRender(); - } - this.prevProps = this.props; - this.props = props; - this.prevPresenceContext = this.presenceContext; - this.presenceContext = presenceContext; - /** - * Update prop event handlers ie onAnimationStart, onAnimationComplete - */ - for (let i = 0; i < propEventHandlers.length; i++) { - const key = propEventHandlers[i]; - if (this.propEventSubscriptions[key]) { - this.propEventSubscriptions[key](); - delete this.propEventSubscriptions[key]; - } - const listenerName = ("on" + key); - const listener = props[listenerName]; - if (listener) { - this.propEventSubscriptions[key] = this.on(key, listener); - } - } - this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues); - if (this.handleChildMotionValue) { - this.handleChildMotionValue(); - } - } - getProps() { - return this.props; - } - /** - * Returns the variant definition with a given name. - */ - getVariant(name) { - return this.props.variants ? this.props.variants[name] : undefined; - } - /** - * Returns the defined default transition on this component. - */ - getDefaultTransition() { - return this.props.transition; - } - getTransformPagePoint() { - return this.props.transformPagePoint; - } - getClosestVariantNode() { - return this.isVariantNode - ? this - : this.parent - ? this.parent.getClosestVariantNode() - : undefined; - } - /** - * Add a child visual element to our set of children. - */ - addVariantChild(child) { - const closestVariantNode = this.getClosestVariantNode(); - if (closestVariantNode) { - closestVariantNode.variantChildren && - closestVariantNode.variantChildren.add(child); - return () => closestVariantNode.variantChildren.delete(child); - } - } - /** - * Add a motion value and bind it to this visual element. - */ - addValue(key, value) { - // Remove existing value if it exists - const existingValue = this.values.get(key); - if (value !== existingValue) { - if (existingValue) - this.removeValue(key); - this.bindToMotionValue(key, value); - this.values.set(key, value); - this.latestValues[key] = value.get(); - } - } - /** - * Remove a motion value and unbind any active subscriptions. - */ - removeValue(key) { - this.values.delete(key); - const unsubscribe = this.valueSubscriptions.get(key); - if (unsubscribe) { - unsubscribe(); - this.valueSubscriptions.delete(key); - } - delete this.latestValues[key]; - this.removeValueFromRenderState(key, this.renderState); - } - /** - * Check whether we have a motion value for this key - */ - hasValue(key) { - return this.values.has(key); - } - getValue(key, defaultValue) { - if (this.props.values && this.props.values[key]) { - return this.props.values[key]; - } - let value = this.values.get(key); - if (value === undefined && defaultValue !== undefined) { - value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this }); - this.addValue(key, value); - } - return value; - } - /** - * If we're trying to animate to a previously unencountered value, - * we need to check for it in our state and as a last resort read it - * directly from the instance (which might have performance implications). - */ - readValue(key, target) { - let value = this.latestValues[key] !== undefined || !this.current - ? this.latestValues[key] - : this.getBaseTargetFromProps(this.props, key) ?? - this.readValueFromInstance(this.current, key, this.options); - if (value !== undefined && value !== null) { - if (typeof value === "string" && - (motionUtils.isNumericalString(value) || motionUtils.isZeroValueString(value))) { - // If this is a number read as a string, ie "0" or "200", convert it to a number - value = parseFloat(value); - } - else if (!findValueType(value) && complex.test(target)) { - value = getAnimatableNone(key, target); - } - this.setBaseTarget(key, isMotionValue(value) ? value.get() : value); - } - return isMotionValue(value) ? value.get() : value; - } - /** - * Set the base target to later animate back to. This is currently - * only hydrated on creation and when we first read a value. - */ - setBaseTarget(key, value) { - this.baseTarget[key] = value; - } - /** - * Find the base target for a value thats been removed from all animation - * props. - */ - getBaseTarget(key) { - const { initial } = this.props; - let valueFromInitial; - if (typeof initial === "string" || typeof initial === "object") { - const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom); - if (variant) { - valueFromInitial = variant[key]; - } - } - /** - * If this value still exists in the current initial variant, read that. - */ - if (initial && valueFromInitial !== undefined) { - return valueFromInitial; - } - /** - * Alternatively, if this VisualElement config has defined a getBaseTarget - * so we can read the value from an alternative source, try that. - */ - const target = this.getBaseTargetFromProps(this.props, key); - if (target !== undefined && !isMotionValue(target)) - return target; - /** - * If the value was initially defined on initial, but it doesn't any more, - * return undefined. Otherwise return the value as initially read from the DOM. - */ - return this.initialValues[key] !== undefined && - valueFromInitial === undefined - ? undefined - : this.baseTarget[key]; - } - on(eventName, callback) { - if (!this.events[eventName]) { - this.events[eventName] = new motionUtils.SubscriptionManager(); - } - return this.events[eventName].add(callback); - } - notify(eventName, ...args) { - if (this.events[eventName]) { - this.events[eventName].notify(...args); - } - } - scheduleRenderMicrotask() { - microtask.render(this.render); - } -} - -class DOMVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.KeyframeResolver = DOMKeyframesResolver; - } - sortInstanceNodePosition(a, b) { - /** - * compareDocumentPosition returns a bitmask, by using the bitwise & - * we're returning true if 2 in that bitmask is set to true. 2 is set - * to true if b preceeds a. - */ - return a.compareDocumentPosition(b) & 2 ? 1 : -1; - } - getBaseTargetFromProps(props, key) { - const style = props.style; - return style ? style[key] : undefined; - } - removeValueFromRenderState(key, { vars, style }) { - delete vars[key]; - delete style[key]; - } - handleChildMotionValue() { - if (this.childSubscription) { - this.childSubscription(); - delete this.childSubscription; - } - const { children } = this.props; - if (isMotionValue(children)) { - this.childSubscription = children.on("change", (latest) => { - if (this.current) { - this.current.textContent = `${latest}`; - } - }); - } - } -} - -/** - * Feature base class for extending VisualElement functionality. - * Features are plugins that can be mounted/unmounted to add behavior - * like gestures, animations, or layout tracking. - */ -class Feature { - constructor(node) { - this.isMounted = false; - this.node = node; - } - update() { } -} - -/** - * Bounding boxes tend to be defined as top, left, right, bottom. For various operations - * it's easier to consider each axis individually. This function returns a bounding box - * as a map of single-axis min/max values. - */ -function convertBoundingBoxToBox({ top, left, right, bottom, }) { - return { - x: { min: left, max: right }, - y: { min: top, max: bottom }, - }; -} -function convertBoxToBoundingBox({ x, y }) { - return { top: y.min, right: x.max, bottom: y.max, left: x.min }; -} -/** - * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function - * provided by Framer to allow measured points to be corrected for device scaling. This is used - * when measuring DOM elements and DOM event points. - */ -function transformBoxPoints(point, transformPoint) { - if (!transformPoint) - return point; - const topLeft = transformPoint({ x: point.left, y: point.top }); - const bottomRight = transformPoint({ x: point.right, y: point.bottom }); - return { - top: topLeft.y, - left: topLeft.x, - bottom: bottomRight.y, - right: bottomRight.x, - }; -} - -function isIdentityScale(scale) { - return scale === undefined || scale === 1; -} -function hasScale({ scale, scaleX, scaleY }) { - return (!isIdentityScale(scale) || - !isIdentityScale(scaleX) || - !isIdentityScale(scaleY)); -} -function hasTransform(values) { - return (hasScale(values) || - has2DTranslate(values) || - values.z || - values.rotate || - values.rotateX || - values.rotateY || - values.skewX || - values.skewY); -} -function has2DTranslate(values) { - return is2DTranslate(values.x) || is2DTranslate(values.y); -} -function is2DTranslate(value) { - return value && value !== "0%"; -} - -/** - * Scales a point based on a factor and an originPoint - */ -function scalePoint(point, scale, originPoint) { - const distanceFromOrigin = point - originPoint; - const scaled = scale * distanceFromOrigin; - return originPoint + scaled; -} -/** - * Applies a translate/scale delta to a point - */ -function applyPointDelta(point, translate, scale, originPoint, boxScale) { - if (boxScale !== undefined) { - point = scalePoint(point, boxScale, originPoint); - } - return scalePoint(point, scale, originPoint) + translate; -} -/** - * Applies a translate/scale delta to an axis - */ -function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) { - axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale); - axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale); -} -/** - * Applies a translate/scale delta to a box - */ -function applyBoxDelta(box, { x, y }) { - applyAxisDelta(box.x, x.translate, x.scale, x.originPoint); - applyAxisDelta(box.y, y.translate, y.scale, y.originPoint); -} -const TREE_SCALE_SNAP_MIN = 0.999999999999; -const TREE_SCALE_SNAP_MAX = 1.0000000000001; -/** - * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms - * in a tree upon our box before then calculating how to project it into our desired viewport-relative box - * - * This is the final nested loop within updateLayoutDelta for future refactoring - */ -function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) { - const treeLength = treePath.length; - if (!treeLength) - return; - // Reset the treeScale - treeScale.x = treeScale.y = 1; - let node; - let delta; - for (let i = 0; i < treeLength; i++) { - node = treePath[i]; - delta = node.projectionDelta; - /** - * TODO: Prefer to remove this, but currently we have motion components with - * display: contents in Framer. - */ - const { visualElement } = node.options; - if (visualElement && - visualElement.props.style && - visualElement.props.style.display === "contents") { - continue; - } - if (isSharedTransition && - node.options.layoutScroll && - node.scroll && - node !== node.root) { - translateAxis(box.x, -node.scroll.offset.x); - translateAxis(box.y, -node.scroll.offset.y); - } - if (delta) { - // Incoporate each ancestor's scale into a cumulative treeScale for this component - treeScale.x *= delta.x.scale; - treeScale.y *= delta.y.scale; - // Apply each ancestor's calculated delta into this component's recorded layout box - applyBoxDelta(box, delta); - } - if (isSharedTransition && hasTransform(node.latestValues)) { - transformBox(box, node.latestValues, node.layout?.layoutBox); - } - } - /** - * Snap tree scale back to 1 if it's within a non-perceivable threshold. - * This will help reduce useless scales getting rendered. - */ - if (treeScale.x < TREE_SCALE_SNAP_MAX && - treeScale.x > TREE_SCALE_SNAP_MIN) { - treeScale.x = 1.0; - } - if (treeScale.y < TREE_SCALE_SNAP_MAX && - treeScale.y > TREE_SCALE_SNAP_MIN) { - treeScale.y = 1.0; - } -} -function translateAxis(axis, distance) { - axis.min += distance; - axis.max += distance; -} -/** - * Apply a transform to an axis from the latest resolved motion values. - * This function basically acts as a bridge between a flat motion value map - * and applyAxisDelta - */ -function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) { - const originPoint = mixNumber$1(axis.min, axis.max, axisOrigin); - // Apply the axis delta to the final axis - applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale); -} -function resolveAxisTranslate(value, axis) { - if (typeof value === "string") { - return (parseFloat(value) / 100) * (axis.max - axis.min); - } - return value; -} -/** - * Apply a transform to a box from the latest resolved motion values. - */ -function transformBox(box, transform, sourceBox) { - const resolveBox = sourceBox ?? box; - transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX); - transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY); -} - -function measureViewportBox(instance, transformPoint) { - return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint)); -} -function measurePageBox(element, rootProjectionNode, transformPagePoint) { - const viewportBox = measureViewportBox(element, transformPagePoint); - const { scroll } = rootProjectionNode; - if (scroll) { - translateAxis(viewportBox.x, scroll.offset.x); - translateAxis(viewportBox.y, scroll.offset.y); - } - return viewportBox; -} - -const translateAlias = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective", -}; -const numTransforms = transformPropOrder.length; -/** - * Build a CSS transform style from individual x/y/scale etc properties. - * - * This outputs with a default order of transforms/scales/rotations, this can be customised by - * providing a transformTemplate function. - */ -function buildTransform(latestValues, transform, transformTemplate) { - // The transform string we're going to build into. - let transformString = ""; - let transformIsDefault = true; - /** - * Loop over all possible transforms in order, adding the ones that - * are present to the transform string. - */ - for (let i = 0; i < numTransforms; i++) { - const key = transformPropOrder[i]; - const value = latestValues[key]; - if (value === undefined) - continue; - let valueIsDefault = true; - if (typeof value === "number") { - valueIsDefault = value === (key.startsWith("scale") ? 1 : 0); - } - else { - const parsed = parseFloat(value); - valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0; - } - if (!valueIsDefault || transformTemplate) { - const valueAsType = getValueAsType(value, numberValueTypes[key]); - if (!valueIsDefault) { - transformIsDefault = false; - const transformName = translateAlias[key] || key; - transformString += `${transformName}(${valueAsType}) `; - } - if (transformTemplate) { - transform[key] = valueAsType; - } - } - } - // `pathRotation` composes onto `rotate` as a separate additive term so - // the user's `rotate` is never clobbered. Deliberately not a slot in - // `transformPropOrder`. - const pathRotation = latestValues.pathRotation; - if (pathRotation) { - transformIsDefault = false; - transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `; - } - transformString = transformString.trim(); - // If we have a custom `transform` template, pass our transform values and - // generated transformString to that before returning - if (transformTemplate) { - transformString = transformTemplate(transform, transformIsDefault ? "" : transformString); - } - else if (transformIsDefault) { - transformString = "none"; - } - return transformString; -} - -function buildHTMLStyles(state, latestValues, transformTemplate) { - const { style, vars, transformOrigin } = state; - // Track whether we encounter any transform or transformOrigin values. - let hasTransform = false; - let hasTransformOrigin = false; - /** - * Loop over all our latest animated values and decide whether to handle them - * as a style or CSS variable. - * - * Transforms and transform origins are kept separately for further processing. - */ - for (const key in latestValues) { - const value = latestValues[key]; - if (transformProps.has(key)) { - // If this is a transform, flag to enable further transform processing - hasTransform = true; - continue; - } - else if (isCSSVariableName(key)) { - vars[key] = value; - continue; - } - else { - // Convert the value to its default value type, ie 0 -> "0px" - const valueAsType = getValueAsType(value, numberValueTypes[key]); - if (key.startsWith("origin")) { - // If this is a transform origin, flag and enable further transform-origin processing - hasTransformOrigin = true; - transformOrigin[key] = - valueAsType; - } - else { - style[key] = valueAsType; - } - } - } - if (!latestValues.transform) { - if (hasTransform || transformTemplate) { - style.transform = buildTransform(latestValues, state.transform, transformTemplate); - } - else if (style.transform) { - /** - * If we have previously created a transform but currently don't have any, - * reset transform style to none. - */ - style.transform = "none"; - } - } - /** - * Build a transformOrigin style. Uses the same defaults as the browser for - * undefined origins. - */ - if (hasTransformOrigin) { - const { originX = "50%", originY = "50%", originZ = 0, } = transformOrigin; - style.transformOrigin = `${originX} ${originY} ${originZ}`; - } -} - -function renderHTML(element, { style, vars }, styleProp, projection) { - const elementStyle = element.style; - let key; - for (key in style) { - // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type. - elementStyle[key] = style[key]; - } - // Write projection styles directly to element style - projection?.applyProjectionStyles(elementStyle, styleProp); - for (key in vars) { - // Loop over any CSS variables and assign those. - // They can only be assigned using `setProperty`. - elementStyle.setProperty(key, vars[key]); - } -} - -function pixelsToPercent(pixels, axis) { - if (axis.max === axis.min) - return 0; - return (pixels / (axis.max - axis.min)) * 100; -} -/** - * We always correct borderRadius as a percentage rather than pixels to reduce paints. - * For example, if you are projecting a box that is 100px wide with a 10px borderRadius - * into a box that is 200px wide with a 20px borderRadius, that is actually a 10% - * borderRadius in both states. If we animate between the two in pixels that will trigger - * a paint each time. If we animate between the two in percentage we'll avoid a paint. - */ -const correctBorderRadius = { - correct: (latest, node) => { - if (!node.target) - return latest; - /** - * If latest is a string, if it's a percentage we can return immediately as it's - * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number. - */ - if (typeof latest === "string") { - if (px.test(latest)) { - latest = parseFloat(latest); - } - else { - return latest; - } - } - /** - * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that - * pixel value as a percentage of each axis - */ - const x = pixelsToPercent(latest, node.target.x); - const y = pixelsToPercent(latest, node.target.y); - return `${x}% ${y}%`; - }, -}; - -const correctBoxShadow = { - correct: (latest, { treeScale, projectionDelta }) => { - const original = latest; - const shadow = complex.parse(latest); - // TODO: Doesn't support multiple shadows - if (shadow.length > 5) - return original; - const template = complex.createTransformer(latest); - const offset = typeof shadow[0] !== "number" ? 1 : 0; - // Calculate the overall context scale - const xScale = projectionDelta.x.scale * treeScale.x; - const yScale = projectionDelta.y.scale * treeScale.y; - shadow[0 + offset] /= xScale; - shadow[1 + offset] /= yScale; - /** - * Ideally we'd correct x and y scales individually, but because blur and - * spread apply to both we have to take a scale average and apply that instead. - * We could potentially improve the outcome of this by incorporating the ratio between - * the two scales. - */ - const averageScale = mixNumber$1(xScale, yScale, 0.5); - // Blur - if (typeof shadow[2 + offset] === "number") - shadow[2 + offset] /= averageScale; - // Spread - if (typeof shadow[3 + offset] === "number") - shadow[3 + offset] /= averageScale; - return template(shadow); - }, -}; - -const scaleCorrectors = { - borderRadius: { - ...correctBorderRadius, - applyTo: [ - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomLeftRadius", - "borderBottomRightRadius", - ], - }, - borderTopLeftRadius: correctBorderRadius, - borderTopRightRadius: correctBorderRadius, - borderBottomLeftRadius: correctBorderRadius, - borderBottomRightRadius: correctBorderRadius, - boxShadow: correctBoxShadow, -}; -function addScaleCorrector(correctors) { - for (const key in correctors) { - scaleCorrectors[key] = correctors[key]; - if (isCSSVariableName(key)) { - scaleCorrectors[key].isCSSVariable = true; - } - } -} - -function isForcedMotionValue(key, { layout, layoutId }) { - return (transformProps.has(key) || - key.startsWith("origin") || - ((layout || layoutId !== undefined) && - (!!scaleCorrectors[key] || key === "opacity"))); -} - -function scrapeMotionValuesFromProps$1(props, prevProps, visualElement) { - const style = props.style; - const prevStyle = prevProps?.style; - const newValues = {}; - if (!style) - return newValues; - for (const key in style) { - if (isMotionValue(style[key]) || - (prevStyle && isMotionValue(prevStyle[key])) || - isForcedMotionValue(key, props) || - visualElement?.getValue(key)?.liveStyle !== undefined) { - newValues[key] = style[key]; - } - } - return newValues; -} - -function getComputedStyle$1(element) { - return window.getComputedStyle(element); -} -class HTMLVisualElement extends DOMVisualElement { - constructor() { - super(...arguments); - this.type = "html"; - this.renderInstance = renderHTML; - } - readValueFromInstance(instance, key) { - if (transformProps.has(key)) { - return this.projection?.isProjecting - ? defaultTransformValue(key) - : readTransformValue(instance, key); - } - else { - const computedStyle = getComputedStyle$1(instance); - const value = (isCSSVariableName(key) - ? computedStyle.getPropertyValue(key) - : computedStyle[key]) || 0; - return typeof value === "string" ? value.trim() : value; - } - } - measureInstanceViewportBox(instance, { transformPagePoint }) { - return measureViewportBox(instance, transformPagePoint); - } - build(renderState, latestValues, props) { - buildHTMLStyles(renderState, latestValues, props.transformTemplate); - } - scrapeMotionValuesFromProps(props, prevProps, visualElement) { - return scrapeMotionValuesFromProps$1(props, prevProps, visualElement); - } -} - -function isObjectKey(key, object) { - return key in object; -} -class ObjectVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.type = "object"; - } - readValueFromInstance(instance, key) { - if (isObjectKey(key, instance)) { - const value = instance[key]; - if (typeof value === "string" || typeof value === "number") { - return value; - } - } - return undefined; - } - getBaseTargetFromProps() { - return undefined; - } - removeValueFromRenderState(key, renderState) { - delete renderState.output[key]; - } - measureInstanceViewportBox() { - return createBox(); - } - build(renderState, latestValues) { - Object.assign(renderState.output, latestValues); - } - renderInstance(instance, { output }) { - Object.assign(instance, output); - } - sortInstanceNodePosition() { - return 0; - } -} - -const dashKeys = { - offset: "stroke-dashoffset", - array: "stroke-dasharray", -}; -const camelKeys = { - offset: "strokeDashoffset", - array: "strokeDasharray", -}; -/** - * Build SVG path properties. Uses the path's measured length to convert - * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset - * and stroke-dasharray attributes. - * - * This function is mutative to reduce per-frame GC. - * - * Note: We use unitless values for stroke-dasharray and stroke-dashoffset - * because Safari incorrectly scales px values when the page is zoomed. - */ -function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) { - // Normalise path length by setting SVG attribute pathLength to 1 - attrs.pathLength = 1; - // We use dash case when setting attributes directly to the DOM node and camel case - // when defining props on a React component. - const keys = useDashCase ? dashKeys : camelKeys; - // Build the dash offset (unitless to avoid Safari zoom bug) - attrs[keys.offset] = `${-offset}`; - // Build the dash array (unitless to avoid Safari zoom bug) - attrs[keys.array] = `${length} ${spacing}`; -} - -/** - * CSS Motion Path properties that should remain as CSS styles on SVG elements. - */ -const cssMotionPathProperties = [ - "offsetDistance", - "offsetPath", - "offsetRotate", - "offsetAnchor", -]; -/** - * Build SVG visual attributes, like cx and style.transform - */ -function buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, -// This is object creation, which we try to avoid per-frame. -...latest }, isSVGTag, transformTemplate, styleProp) { - buildHTMLStyles(state, latest, transformTemplate); - /** - * For svg tags we just want to make sure viewBox is animatable and treat all the styles - * as normal HTML tags. - */ - if (isSVGTag) { - if (state.style.viewBox) { - state.attrs.viewBox = state.style.viewBox; - } - return; - } - state.attrs = state.style; - state.style = {}; - const { attrs, style } = state; - /** - * However, we apply transforms as CSS transforms. - * So if we detect a transform, transformOrigin we take it from attrs and copy it into style. - */ - if (attrs.transform) { - style.transform = attrs.transform; - delete attrs.transform; - } - if (style.transform || attrs.transformOrigin) { - style.transformOrigin = attrs.transformOrigin ?? "50% 50%"; - delete attrs.transformOrigin; - } - if (style.transform) { - /** - * SVG's element transform-origin uses its own median as a reference. - * Therefore, transformBox becomes a fill-box - */ - style.transformBox = styleProp?.transformBox ?? "fill-box"; - delete attrs.transformBox; - } - for (const key of cssMotionPathProperties) { - if (attrs[key] !== undefined) { - style[key] = attrs[key]; - delete attrs[key]; - } - } - // Render attrX/attrY/attrScale as attributes - if (attrX !== undefined) - attrs.x = attrX; - if (attrY !== undefined) - attrs.y = attrY; - if (attrScale !== undefined) - attrs.scale = attrScale; - // Build SVG path if one has been defined - if (pathLength !== undefined) { - buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false); - } -} - -/** - * A set of attribute names that are always read/written as camel case. - */ -const camelCaseAttributes = new Set([ - "baseFrequency", - "diffuseConstant", - "kernelMatrix", - "kernelUnitLength", - "keySplines", - "keyTimes", - "limitingConeAngle", - "markerHeight", - "markerWidth", - "numOctaves", - "targetX", - "targetY", - "surfaceScale", - "specularConstant", - "specularExponent", - "stdDeviation", - "tableValues", - "viewBox", - "gradientTransform", - "pathLength", - "startOffset", - "textLength", - "lengthAdjust", -]); - -const isSVGTag = (tag) => typeof tag === "string" && tag.toLowerCase() === "svg"; - -function renderSVG(element, renderState, _styleProp, projection) { - renderHTML(element, renderState, undefined, projection); - for (const key in renderState.attrs) { - element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]); - } -} - -function scrapeMotionValuesFromProps(props, prevProps, visualElement) { - const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement); - for (const key in props) { - if (isMotionValue(props[key]) || - isMotionValue(prevProps[key])) { - const targetKey = transformPropOrder.indexOf(key) !== -1 - ? "attr" + key.charAt(0).toUpperCase() + key.substring(1) - : key; - newValues[targetKey] = props[key]; - } - } - return newValues; -} - -class SVGVisualElement extends DOMVisualElement { - constructor() { - super(...arguments); - this.type = "svg"; - this.isSVGTag = false; - this.measureInstanceViewportBox = createBox; - } - getBaseTargetFromProps(props, key) { - return props[key]; - } - readValueFromInstance(instance, key) { - if (transformProps.has(key)) { - const defaultType = getDefaultValueType(key); - return defaultType ? defaultType.default || 0 : 0; - } - key = !camelCaseAttributes.has(key) ? camelToDash(key) : key; - return instance.getAttribute(key); - } - scrapeMotionValuesFromProps(props, prevProps, visualElement) { - return scrapeMotionValuesFromProps(props, prevProps, visualElement); - } - build(renderState, latestValues, props) { - buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style); - } - renderInstance(instance, renderState, styleProp, projection) { - renderSVG(instance, renderState, styleProp, projection); - } - mount(instance) { - this.isSVGTag = isSVGTag(instance.tagName); - super.mount(instance); - } -} - -const numVariantProps = variantProps.length; -/** - * Get variant context from a visual element's parent chain. - * Uses `any` type for visualElement to avoid circular dependencies. - */ -function getVariantContext(visualElement) { - if (!visualElement) - return undefined; - if (!visualElement.isControllingVariants) { - const context = visualElement.parent - ? getVariantContext(visualElement.parent) || {} - : {}; - if (visualElement.props.initial !== undefined) { - context.initial = visualElement.props.initial; - } - return context; - } - const context = {}; - for (let i = 0; i < numVariantProps; i++) { - const name = variantProps[i]; - const prop = visualElement.props[name]; - if (isVariantLabel(prop) || prop === false) { - context[name] = prop; - } - } - return context; -} - -function shallowCompare(next, prev) { - if (!Array.isArray(prev)) - return false; - const prevLength = prev.length; - if (prevLength !== next.length) - return false; - for (let i = 0; i < prevLength; i++) { - if (prev[i] !== next[i]) - return false; - } - return true; -} - -const reversePriorityOrder = [...variantPriorityOrder].reverse(); -const numAnimationTypes = variantPriorityOrder.length; -function createAnimateFunction(visualElement) { - return (animations) => { - return Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options))); - }; -} -function createAnimationState(visualElement) { - let animate = createAnimateFunction(visualElement); - let state = createState(); - let isInitialRender = true; - /** - * Track whether the animation state has been reset (e.g. via StrictMode - * double-invocation or Suspense unmount/remount). On the first - * animateChanges() call after a reset we need to behave like the initial - * render for variant-inheritance checks, even though isInitialRender is - * already false. - */ - let wasReset = false; - /** - * This function will be used to reduce the animation definitions for - * each active animation type into an object of resolved values for it. - */ - const buildResolvedTypeValues = (type) => (acc, definition) => { - const resolved = resolveVariant(visualElement, definition, type === "exit" - ? visualElement.presenceContext?.custom - : undefined); - if (resolved) { - const { transition, transitionEnd, ...target } = resolved; - acc = { ...acc, ...target, ...transitionEnd }; - } - return acc; - }; - /** - * This just allows us to inject mocked animation functions - * @internal - */ - function setAnimateFunction(makeAnimator) { - animate = makeAnimator(visualElement); - } - /** - * When we receive new props, we need to: - * 1. Create a list of protected keys for each type. This is a directory of - * value keys that are currently being "handled" by types of a higher priority - * so that whenever an animation is played of a given type, these values are - * protected from being animated. - * 2. Determine if an animation type needs animating. - * 3. Determine if any values have been removed from a type and figure out - * what to animate those to. - */ - function animateChanges(changedActiveType) { - const { props } = visualElement; - const context = getVariantContext(visualElement.parent) || {}; - /** - * A list of animations that we'll build into as we iterate through the animation - * types. This will get executed at the end of the function. - */ - const animations = []; - /** - * Keep track of which values have been removed. Then, as we hit lower priority - * animation types, we can check if they contain removed values and animate to that. - */ - const removedKeys = new Set(); - /** - * A dictionary of all encountered keys. This is an object to let us build into and - * copy it without iteration. Each time we hit an animation type we set its protected - * keys - the keys its not allowed to animate - to the latest version of this object. - */ - let encounteredKeys = {}; - /** - * If a variant has been removed at a given index, and this component is controlling - * variant animations, we want to ensure lower-priority variants are forced to animate. - */ - let removedVariantIndex = Infinity; - /** - * Iterate through all animation types in reverse priority order. For each, we want to - * detect which values it's handling and whether or not they've changed (and therefore - * need to be animated). If any values have been removed, we want to detect those in - * lower priority props and flag for animation. - */ - for (let i = 0; i < numAnimationTypes; i++) { - const type = reversePriorityOrder[i]; - const typeState = state[type]; - const prop = props[type] !== undefined - ? props[type] - : context[type]; - const propIsVariant = isVariantLabel(prop); - /** - * If this type has *just* changed isActive status, set activeDelta - * to that status. Otherwise set to null. - */ - const activeDelta = type === changedActiveType ? typeState.isActive : null; - if (activeDelta === false) - removedVariantIndex = i; - /** - * If this prop is an inherited variant, rather than been set directly on the - * component itself, we want to make sure we allow the parent to trigger animations. - * - * TODO: Can probably change this to a !isControllingVariants check - */ - let isInherited = prop === context[type] && - prop !== props[type] && - propIsVariant; - if (isInherited && - (isInitialRender || wasReset) && - visualElement.manuallyAnimateOnMount) { - isInherited = false; - } - /** - * Set all encountered keys so far as the protected keys for this type. This will - * be any key that has been animated or otherwise handled by active, higher-priortiy types. - */ - typeState.protectedKeys = { ...encounteredKeys }; - // Check if we can skip analysing this prop early - if ( - // If it isn't active and hasn't *just* been set as inactive - (!typeState.isActive && activeDelta === null) || - // If we didn't and don't have any defined prop for this animation type - (!prop && !typeState.prevProp) || - // Or if the prop doesn't define an animation - isAnimationControls(prop) || - typeof prop === "boolean") { - continue; - } - /** - * If exit is already active and wasn't just activated, skip - * re-processing to prevent interrupting running exit animations. - * Re-resolving exit with a changed custom value can start new - * value animations that stop the originals, leaving the exit - * animation promise unresolved and the component stuck in the DOM. - */ - if (type === "exit" && typeState.isActive && activeDelta !== true) { - if (typeState.prevResolvedValues) { - encounteredKeys = { - ...encounteredKeys, - ...typeState.prevResolvedValues, - }; - } - continue; - } - /** - * As we go look through the values defined on this type, if we detect - * a changed value or a value that was removed in a higher priority, we set - * this to true and add this prop to the animation list. - */ - const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop); - let shouldAnimateType = variantDidChange || - // If we're making this variant active, we want to always make it active - (type === changedActiveType && - typeState.isActive && - !isInherited && - propIsVariant) || - // If we removed a higher-priority variant (i is in reverse order) - (i > removedVariantIndex && propIsVariant); - let handledRemovedValues = false; - /** - * As animations can be set as variant lists, variants or target objects, we - * coerce everything to an array if it isn't one already - */ - const definitionList = Array.isArray(prop) ? prop : [prop]; - /** - * Build an object of all the resolved values. We'll use this in the subsequent - * animateChanges calls to determine whether a value has changed. - */ - let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {}); - if (activeDelta === false) - resolvedValues = {}; - /** - * Now we need to loop through all the keys in the prev prop and this prop, - * and decide: - * 1. If the value has changed, and needs animating - * 2. If it has been removed, and needs adding to the removedKeys set - * 3. If it has been removed in a higher priority type and needs animating - * 4. If it hasn't been removed in a higher priority but hasn't changed, and - * needs adding to the type's protectedKeys list. - */ - const { prevResolvedValues = {} } = typeState; - const allKeys = { - ...prevResolvedValues, - ...resolvedValues, - }; - const markToAnimate = (key) => { - shouldAnimateType = true; - if (removedKeys.has(key)) { - handledRemovedValues = true; - removedKeys.delete(key); - } - typeState.needsAnimating[key] = true; - const motionValue = visualElement.getValue(key); - if (motionValue) - motionValue.liveStyle = false; - }; - for (const key in allKeys) { - const next = resolvedValues[key]; - const prev = prevResolvedValues[key]; - // If we've already handled this we can just skip ahead - if (encounteredKeys.hasOwnProperty(key)) - continue; - /** - * If the value has changed, we probably want to animate it. - */ - let valueHasChanged = false; - if (isKeyframesTarget(next) && isKeyframesTarget(prev)) { - valueHasChanged = - !shallowCompare(next, prev) || variantDidChange; - } - else { - valueHasChanged = next !== prev; - } - if (valueHasChanged) { - if (next !== undefined && next !== null) { - // If next is defined and doesn't equal prev, it needs animating - markToAnimate(key); - } - else { - // If it's undefined, it's been removed. - removedKeys.add(key); - } - } - else if (next !== undefined && removedKeys.has(key)) { - /** - * If next hasn't changed and it isn't undefined, we want to check if it's - * been removed by a higher priority - */ - markToAnimate(key); - } - else { - /** - * If it hasn't changed, we add it to the list of protected values - * to ensure it doesn't get animated. - */ - typeState.protectedKeys[key] = true; - } - } - /** - * Update the typeState so next time animateChanges is called we can compare the - * latest prop and resolvedValues to these. - */ - typeState.prevProp = prop; - typeState.prevResolvedValues = resolvedValues; - if (typeState.isActive) { - encounteredKeys = { ...encounteredKeys, ...resolvedValues }; - } - if ((isInitialRender || wasReset) && - visualElement.blockInitialAnimation) { - shouldAnimateType = false; - } - /** - * If this is an inherited prop we want to skip this animation - * unless the inherited variants haven't changed on this render. - */ - const willAnimateViaParent = isInherited && variantDidChange; - const needsAnimating = !willAnimateViaParent || handledRemovedValues; - if (shouldAnimateType && needsAnimating) { - animations.push(...definitionList.map((animation) => { - const options = { type }; - /** - * If we're performing the initial animation, but we're not - * rendering at the same time as the variant-controlling parent, - * we want to use the parent's transition to calculate the stagger. - */ - if (typeof animation === "string" && - (isInitialRender || wasReset) && - !willAnimateViaParent && - visualElement.manuallyAnimateOnMount && - visualElement.parent) { - const { parent } = visualElement; - const parentVariant = resolveVariant(parent, animation); - if (parent.enteringChildren && parentVariant) { - const { delayChildren } = parentVariant.transition || {}; - options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren); - } - } - return { - animation: animation, - options, - }; - })); - } - } - /** - * If there are some removed value that haven't been dealt with, - * we need to create a new animation that falls back either to the value - * defined in the style prop, or the last read value. - */ - if (removedKeys.size) { - const fallbackAnimation = {}; - /** - * If the initial prop contains a transition we can use that, otherwise - * allow the animation function to use the visual element's default. - */ - if (typeof props.initial !== "boolean") { - const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial) - ? props.initial[0] - : props.initial); - if (initialTransition && initialTransition.transition) { - fallbackAnimation.transition = initialTransition.transition; - } - } - removedKeys.forEach((key) => { - const fallbackTarget = visualElement.getBaseTarget(key); - const motionValue = visualElement.getValue(key); - if (motionValue) - motionValue.liveStyle = true; - // @ts-expect-error - @mattgperry to figure if we should do something here - fallbackAnimation[key] = fallbackTarget ?? null; - }); - animations.push({ animation: fallbackAnimation }); - } - let shouldAnimate = Boolean(animations.length); - if (isInitialRender && - (props.initial === false || props.initial === props.animate) && - !visualElement.manuallyAnimateOnMount) { - shouldAnimate = false; - } - isInitialRender = false; - wasReset = false; - return shouldAnimate ? animate(animations) : Promise.resolve(); - } - /** - * Change whether a certain animation type is active. - */ - function setActive(type, isActive) { - // If the active state hasn't changed, we can safely do nothing here - if (state[type].isActive === isActive) - return Promise.resolve(); - // Propagate active change to children - visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive)); - state[type].isActive = isActive; - const animations = animateChanges(type); - for (const key in state) { - state[key].protectedKeys = {}; - } - return animations; - } - return { - animateChanges, - setActive, - setAnimateFunction, - getState: () => state, - reset: () => { - state = createState(); - wasReset = true; - }, - }; -} -function checkVariantsDidChange(prev, next) { - if (typeof next === "string") { - return next !== prev; - } - else if (Array.isArray(next)) { - return !shallowCompare(next, prev); - } - return false; -} -function createTypeState(isActive = false) { - return { - isActive, - protectedKeys: {}, - needsAnimating: {}, - prevResolvedValues: {}, - }; -} -function createState() { - return { - animate: createTypeState(true), - whileInView: createTypeState(), - whileHover: createTypeState(), - whileTap: createTypeState(), - whileDrag: createTypeState(), - whileFocus: createTypeState(), - exit: createTypeState(), - }; -} - -/** - * Reset an axis to the provided origin box. - * - * This is a mutative operation. - */ -function copyAxisInto(axis, originAxis) { - axis.min = originAxis.min; - axis.max = originAxis.max; -} -/** - * Reset a box to the provided origin box. - * - * This is a mutative operation. - */ -function copyBoxInto(box, originBox) { - copyAxisInto(box.x, originBox.x); - copyAxisInto(box.y, originBox.y); -} -/** - * Reset a delta to the provided origin box. - * - * This is a mutative operation. - */ -function copyAxisDeltaInto(delta, originDelta) { - delta.translate = originDelta.translate; - delta.scale = originDelta.scale; - delta.originPoint = originDelta.originPoint; - delta.origin = originDelta.origin; -} - -const SCALE_PRECISION = 0.0001; -const SCALE_MIN = 1 - SCALE_PRECISION; -const SCALE_MAX = 1 + SCALE_PRECISION; -const TRANSLATE_PRECISION = 0.01; -const TRANSLATE_MIN = 0 - TRANSLATE_PRECISION; -const TRANSLATE_MAX = 0 + TRANSLATE_PRECISION; -function calcLength(axis) { - return axis.max - axis.min; -} -function isNear(value, target, maxDistance) { - return Math.abs(value - target) <= maxDistance; -} -function calcAxisDelta(delta, source, target, origin = 0.5) { - delta.origin = origin; - delta.originPoint = mixNumber$1(source.min, source.max, delta.origin); - delta.scale = calcLength(target) / calcLength(source); - delta.translate = - mixNumber$1(target.min, target.max, delta.origin) - delta.originPoint; - if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) || - isNaN(delta.scale)) { - delta.scale = 1.0; - } - if ((delta.translate >= TRANSLATE_MIN && - delta.translate <= TRANSLATE_MAX) || - isNaN(delta.translate)) { - delta.translate = 0.0; - } -} -function calcBoxDelta(delta, source, target, origin) { - calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined); - calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined); -} -function calcRelativeAxis(target, relative, parent, anchor = 0) { - const anchorPoint = anchor - ? mixNumber$1(parent.min, parent.max, anchor) - : parent.min; - target.min = anchorPoint + relative.min; - target.max = target.min + calcLength(relative); -} -function calcRelativeBox(target, relative, parent, anchor) { - calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x); - calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y); -} -function calcRelativeAxisPosition(target, layout, parent, anchor = 0) { - const anchorPoint = anchor - ? mixNumber$1(parent.min, parent.max, anchor) - : parent.min; - target.min = layout.min - anchorPoint; - target.max = target.min + calcLength(layout); -} -function calcRelativePosition(target, layout, parent, anchor) { - calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x); - calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y); -} - -/** - * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse - */ -function removePointDelta(point, translate, scale, originPoint, boxScale) { - point -= translate; - point = scalePoint(point, 1 / scale, originPoint); - if (boxScale !== undefined) { - point = scalePoint(point, 1 / boxScale, originPoint); - } - return point; -} -/** - * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse - */ -function removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) { - if (percent.test(translate)) { - translate = parseFloat(translate); - const relativeProgress = mixNumber$1(sourceAxis.min, sourceAxis.max, translate / 100); - translate = relativeProgress - sourceAxis.min; - } - if (typeof translate !== "number") - return; - let originPoint = mixNumber$1(originAxis.min, originAxis.max, origin); - if (axis === originAxis) - originPoint -= translate; - axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale); - axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale); -} -/** - * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ -function removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) { - removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis); -} -/** - * The names of the motion values we want to apply as translation, scale and origin. - */ -const xKeys = ["x", "scaleX", "originX"]; -const yKeys = ["y", "scaleY", "originY"]; -/** - * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ -function removeBoxTransforms(box, transforms, originBox, sourceBox) { - removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined); - removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined); -} - -function isAxisDeltaZero(delta) { - return delta.translate === 0 && delta.scale === 1; -} -function isDeltaZero(delta) { - return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y); -} -function axisEquals(a, b) { - return a.min === b.min && a.max === b.max; -} -function boxEquals(a, b) { - return axisEquals(a.x, b.x) && axisEquals(a.y, b.y); -} -function axisEqualsRounded(a, b) { - return (Math.round(a.min) === Math.round(b.min) && - Math.round(a.max) === Math.round(b.max)); -} -function boxEqualsRounded(a, b) { - return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y); -} -function aspectRatio(box) { - return calcLength(box.x) / calcLength(box.y); -} -function axisDeltaEquals(a, b) { - return (a.translate === b.translate && - a.scale === b.scale && - a.originPoint === b.originPoint); -} - -function eachAxis(callback) { - return [callback("x"), callback("y")]; -} - -function buildProjectionTransform(delta, treeScale, latestTransform) { - let transform = ""; - /** - * The translations we use to calculate are always relative to the viewport coordinate space. - * But when we apply scales, we also scale the coordinate space of an element and its children. - * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need - * to move an element 100 pixels, we actually need to move it 200 in within that scaled space. - */ - const xTranslate = delta.x.translate / treeScale.x; - const yTranslate = delta.y.translate / treeScale.y; - const zTranslate = latestTransform?.z || 0; - if (xTranslate || yTranslate || zTranslate) { - transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `; - } - /** - * Apply scale correction for the tree transform. - * This will apply scale to the screen-orientated axes. - */ - if (treeScale.x !== 1 || treeScale.y !== 1) { - transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `; - } - if (latestTransform) { - const { transformPerspective, rotate, pathRotation, rotateX, rotateY, skewX, skewY, } = latestTransform; - if (transformPerspective) - transform = `perspective(${transformPerspective}px) ${transform}`; - if (rotate) - transform += `rotate(${rotate}deg) `; - // Additive `rotate()` so user `rotate` isn't clobbered. - if (pathRotation) - transform += `rotate(${pathRotation}deg) `; - if (rotateX) - transform += `rotateX(${rotateX}deg) `; - if (rotateY) - transform += `rotateY(${rotateY}deg) `; - if (skewX) - transform += `skewX(${skewX}deg) `; - if (skewY) - transform += `skewY(${skewY}deg) `; - } - /** - * Apply scale to match the size of the element to the size we want it. - * This will apply scale to the element-orientated axes. - */ - const elementScaleX = delta.x.scale * treeScale.x; - const elementScaleY = delta.y.scale * treeScale.y; - if (elementScaleX !== 1 || elementScaleY !== 1) { - transform += `scale(${elementScaleX}, ${elementScaleY})`; - } - return transform || "none"; -} - -const borderLabels = [ - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomLeftRadius", - "borderBottomRightRadius", -]; -const numBorders = borderLabels.length; -const asNumber = (value) => typeof value === "string" ? parseFloat(value) : value; -const isPx = (value) => typeof value === "number" || px.test(value); -function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) { - if (shouldCrossfadeOpacity) { - target.opacity = mixNumber$1(0, lead.opacity ?? 1, easeCrossfadeIn(progress)); - target.opacityExit = mixNumber$1(follow.opacity ?? 1, 0, easeCrossfadeOut(progress)); - } - else if (isOnlyMember) { - target.opacity = mixNumber$1(follow.opacity ?? 1, lead.opacity ?? 1, progress); - } - /** - * Mix border radius - */ - for (let i = 0; i < numBorders; i++) { - const borderLabel = borderLabels[i]; - let followRadius = getRadius(follow, borderLabel); - let leadRadius = getRadius(lead, borderLabel); - if (followRadius === undefined && leadRadius === undefined) - continue; - followRadius || (followRadius = 0); - leadRadius || (leadRadius = 0); - const canMix = followRadius === 0 || - leadRadius === 0 || - isPx(followRadius) === isPx(leadRadius); - if (canMix) { - target[borderLabel] = Math.max(mixNumber$1(asNumber(followRadius), asNumber(leadRadius), progress), 0); - if (percent.test(leadRadius) || percent.test(followRadius)) { - target[borderLabel] += "%"; - } - } - else { - target[borderLabel] = leadRadius; - } - } - /** - * Mix rotation - */ - if (follow.rotate || lead.rotate) { - target.rotate = mixNumber$1(follow.rotate || 0, lead.rotate || 0, progress); - } -} -function getRadius(values, radiusName) { - return values[radiusName] !== undefined - ? values[radiusName] - : values.borderRadius; -} -const easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, motionUtils.circOut); -const easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, motionUtils.noop); -function compress(min, max, easing) { - return (p) => { - // Could replace ifs with clamp - if (p < min) - return 0; - if (p > max) - return 1; - return easing(motionUtils.progress(min, max, p)); - }; -} - -function animateSingleValue(value, keyframes, options) { - const motionValue$1 = isMotionValue(value) ? value : motionValue(value); - motionValue$1.start(animateMotionValue("", motionValue$1, keyframes, options)); - return motionValue$1.animation; -} - -function addDomEvent(target, eventName, handler, options = { passive: true }) { - target.addEventListener(eventName, handler, options); - return () => target.removeEventListener(eventName, handler); -} - -const compareByDepth = (a, b) => a.depth - b.depth; - -class FlatTree { - constructor() { - this.children = []; - this.isDirty = false; - } - add(child) { - motionUtils.addUniqueItem(this.children, child); - this.isDirty = true; - } - remove(child) { - motionUtils.removeItem(this.children, child); - this.isDirty = true; - } - forEach(callback) { - this.isDirty && this.children.sort(compareByDepth); - this.isDirty = false; - this.children.forEach(callback); - } -} - -/** - * Timeout defined in ms - */ -function delay(callback, timeout) { - const start = time.now(); - const checkElapsed = ({ timestamp }) => { - const elapsed = timestamp - start; - if (elapsed >= timeout) { - cancelFrame(checkElapsed); - callback(elapsed - timeout); - } - }; - frame.setup(checkElapsed, true); - return () => cancelFrame(checkElapsed); -} -function delayInSeconds(callback, timeout) { - return delay(callback, motionUtils.secondsToMilliseconds(timeout)); -} - -/** - * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself - */ -function resolveMotionValue(value) { - return isMotionValue(value) ? value.get() : value; -} - -class NodeStack { - constructor() { - this.members = []; - } - add(node) { - motionUtils.addUniqueItem(this.members, node); - for (let i = this.members.length - 1; i >= 0; i--) { - const member = this.members[i]; - if (member === node || member === this.lead || member === this.prevLead) - continue; - const inst = member.instance; - if ((!inst || inst.isConnected === false) && !member.snapshot) { - motionUtils.removeItem(this.members, member); - member.unmount(); - } - } - node.scheduleRender(); - } - remove(node) { - motionUtils.removeItem(this.members, node); - if (node === this.prevLead) - this.prevLead = undefined; - if (node === this.lead) { - const prevLead = this.members[this.members.length - 1]; - if (prevLead) - this.promote(prevLead); - } - } - relegate(node) { - for (let i = this.members.indexOf(node) - 1; i >= 0; i--) { - const member = this.members[i]; - if (member.isPresent !== false && member.instance?.isConnected !== false) { - this.promote(member); - return true; - } - } - return false; - } - promote(node, preserveFollowOpacity) { - const prevLead = this.lead; - if (node === prevLead) - return; - this.prevLead = prevLead; - this.lead = node; - node.show(); - if (prevLead) { - prevLead.updateSnapshot(); - node.scheduleRender(); - const { layoutDependency: prevDep } = prevLead.options; - const { layoutDependency: nextDep } = node.options; - if (prevDep === undefined || prevDep !== nextDep) { - node.resumeFrom = prevLead; - if (preserveFollowOpacity) - prevLead.preserveOpacity = true; - if (prevLead.snapshot) { - node.snapshot = prevLead.snapshot; - node.snapshot.latestValues = - prevLead.animationValues || prevLead.latestValues; - } - if (node.root?.isUpdating) - node.isLayoutDirty = true; - } - if (node.options.crossfade === false) - prevLead.hide(); - } - } - exitAnimationComplete() { - this.members.forEach((member) => { - member.options.onExitComplete?.(); - member.resumingFrom?.options.onExitComplete?.(); - }); - } - scheduleRender() { - this.members.forEach((member) => member.instance && member.scheduleRender(false)); - } - removeLeadSnapshot() { - if (this.lead?.snapshot) - this.lead.snapshot = undefined; - } -} - -/** - * This should only ever be modified on the client otherwise it'll - * persist through server requests. If we need instanced states we - * could lazy-init via root. - */ -const globalProjectionState = { - /** - * Global flag as to whether the tree has animated since the last time - * we resized the window - */ - hasAnimatedSinceResize: true, - /** - * We set this to true once, on the first update. Any nodes added to the tree beyond that - * update will be given a `data-projection-id` attribute. - */ - hasEverUpdated: false, -}; - -const metrics = { - nodes: 0, - calculatedTargetDeltas: 0, - calculatedProjections: 0, -}; -const transformAxes = ["", "X", "Y", "Z"]; -/** - * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1 - * which has a noticeable difference in spring animations - */ -const animationTarget = 1000; -let id = 0; -function resetDistortingTransform(key, visualElement, values, sharedAnimationValues) { - const { latestValues } = visualElement; - // Record the distorting transform and then temporarily set it to 0 - if (latestValues[key]) { - values[key] = latestValues[key]; - visualElement.setStaticValue(key, 0); - if (sharedAnimationValues) { - sharedAnimationValues[key] = 0; - } - } -} -function cancelTreeOptimisedTransformAnimations(projectionNode) { - projectionNode.hasCheckedOptimisedAppear = true; - if (projectionNode.root === projectionNode) - return; - const { visualElement } = projectionNode.options; - if (!visualElement) - return; - const appearId = getOptimisedAppearId(visualElement); - if (window.MotionHasOptimisedAnimation(appearId, "transform")) { - const { layout, layoutId } = projectionNode.options; - window.MotionCancelOptimisedAnimation(appearId, "transform", frame, !(layout || layoutId)); - } - const { parent } = projectionNode; - if (parent && !parent.hasCheckedOptimisedAppear) { - cancelTreeOptimisedTransformAnimations(parent); - } -} -function createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) { - return class ProjectionNode { - constructor(latestValues = {}, parent = defaultParent?.()) { - /** - * A unique ID generated for every projection node. - */ - this.id = id++; - /** - * An id that represents a unique session instigated by startUpdate. - */ - this.animationId = 0; - this.animationCommitId = 0; - /** - * A Set containing all this component's children. This is used to iterate - * through the children. - * - * TODO: This could be faster to iterate as a flat array stored on the root node. - */ - this.children = new Set(); - /** - * Options for the node. We use this to configure what kind of layout animations - * we should perform (if any). - */ - this.options = {}; - /** - * We use this to detect when its safe to shut down part of a projection tree. - * We have to keep projecting children for scale correction and relative projection - * until all their parents stop performing layout animations. - */ - this.isTreeAnimating = false; - this.isAnimationBlocked = false; - /** - * Flag to true if we think this layout has been changed. We can't always know this, - * currently we set it to true every time a component renders, or if it has a layoutDependency - * if that has changed between renders. Additionally, components can be grouped by LayoutGroup - * and if one node is dirtied, they all are. - */ - this.isLayoutDirty = false; - /** - * Flag to true if we think the projection calculations for this node needs - * recalculating as a result of an updated transform or layout animation. - */ - this.isProjectionDirty = false; - /** - * Flag to true if the layout *or* transform has changed. This then gets propagated - * throughout the projection tree, forcing any element below to recalculate on the next frame. - */ - this.isSharedProjectionDirty = false; - /** - * Flag transform dirty. This gets propagated throughout the whole tree but is only - * respected by shared nodes. - */ - this.isTransformDirty = false; - /** - * Block layout updates for instant layout transitions throughout the tree. - */ - this.updateManuallyBlocked = false; - this.updateBlockedByResize = false; - /** - * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate` - * call. - */ - this.isUpdating = false; - /** - * If this is an SVG element we currently disable projection transforms - */ - this.isSVG = false; - /** - * Flag to true (during promotion) if a node doing an instant layout transition needs to reset - * its projection styles. - */ - this.needsReset = false; - /** - * Flags whether this node should have its transform reset prior to measuring. - */ - this.shouldResetTransform = false; - /** - * Store whether this node has been checked for optimised appear animations. As - * effects fire bottom-up, and we want to look up the tree for appear animations, - * this makes sure we only check each path once, stopping at nodes that - * have already been checked. - */ - this.hasCheckedOptimisedAppear = false; - /** - * An object representing the calculated contextual/accumulated/tree scale. - * This will be used to scale calculcated projection transforms, as these are - * calculated in screen-space but need to be scaled for elements to layoutly - * make it to their calculated destinations. - * - * TODO: Lazy-init - */ - this.treeScale = { x: 1, y: 1 }; - /** - * - */ - this.eventHandlers = new Map(); - this.hasTreeAnimated = false; - this.layoutVersion = 0; - // Note: Currently only running on root node - this.updateScheduled = false; - this.scheduleUpdate = () => this.update(); - this.projectionUpdateScheduled = false; - this.checkUpdateFailed = () => { - if (this.isUpdating) { - this.isUpdating = false; - this.clearAllSnapshots(); - } - }; - /** - * This is a multi-step process as shared nodes might be of different depths. Nodes - * are sorted by depth order, so we need to resolve the entire tree before moving to - * the next step. - */ - this.updateProjection = () => { - this.projectionUpdateScheduled = false; - /** - * Reset debug counts. Manually resetting rather than creating a new - * object each frame. - */ - if (statsBuffer.value) { - metrics.nodes = - metrics.calculatedTargetDeltas = - metrics.calculatedProjections = - 0; - } - this.nodes.forEach(propagateDirtyNodes); - this.nodes.forEach(resolveTargetDelta); - this.nodes.forEach(calcProjection); - this.nodes.forEach(cleanDirtyNodes); - if (statsBuffer.addProjectionMetrics) { - statsBuffer.addProjectionMetrics(metrics); - } - }; - /** - * Frame calculations - */ - this.resolvedRelativeTargetAt = 0.0; - this.linkedParentVersion = 0; - this.hasProjected = false; - this.isVisible = true; - this.animationProgress = 0; - /** - * Shared layout - */ - // TODO Only running on root node - this.sharedNodes = new Map(); - this.latestValues = latestValues; - this.root = parent ? parent.root || parent : this; - this.path = parent ? [...parent.path, parent] : []; - this.parent = parent; - this.depth = parent ? parent.depth + 1 : 0; - for (let i = 0; i < this.path.length; i++) { - this.path[i].shouldResetTransform = true; - } - if (this.root === this) - this.nodes = new FlatTree(); - } - addEventListener(name, handler) { - if (!this.eventHandlers.has(name)) { - this.eventHandlers.set(name, new motionUtils.SubscriptionManager()); - } - return this.eventHandlers.get(name).add(handler); - } - notifyListeners(name, ...args) { - const subscriptionManager = this.eventHandlers.get(name); - subscriptionManager && subscriptionManager.notify(...args); - } - hasListeners(name) { - return this.eventHandlers.has(name); - } - /** - * Lifecycles - */ - mount(instance) { - if (this.instance) - return; - this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance); - this.instance = instance; - const { layoutId, layout, visualElement } = this.options; - if (visualElement && !visualElement.current) { - visualElement.mount(instance); - } - this.root.nodes.add(this); - this.parent && this.parent.children.add(this); - if (this.root.hasTreeAnimated && (layout || layoutId)) { - this.isLayoutDirty = true; - } - if (attachResizeListener) { - let cancelDelay; - let innerWidth = 0; - const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false); - // Set initial innerWidth in a frame.read callback to batch the read - frame.read(() => { - innerWidth = window.innerWidth; - }); - attachResizeListener(instance, () => { - const newInnerWidth = window.innerWidth; - if (newInnerWidth === innerWidth) - return; - innerWidth = newInnerWidth; - this.root.updateBlockedByResize = true; - cancelDelay && cancelDelay(); - cancelDelay = delay(resizeUnblockUpdate, 250); - if (globalProjectionState.hasAnimatedSinceResize) { - globalProjectionState.hasAnimatedSinceResize = false; - this.nodes.forEach(finishAnimation); - } - }); - } - if (layoutId) { - this.root.registerSharedNode(layoutId, this); - } - // Only register the handler if it requires layout animation - if (this.options.animate !== false && - visualElement && - (layoutId || layout)) { - this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout, }) => { - if (this.isTreeAnimationBlocked()) { - this.target = undefined; - this.relativeTarget = undefined; - return; - } - // TODO: Check here if an animation exists - const layoutTransition = this.options.transition || - visualElement.getDefaultTransition() || - defaultLayoutTransition; - const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps(); - /** - * The target layout of the element might stay the same, - * but its position relative to its parent has changed. - */ - const hasTargetChanged = !this.targetLayout || - !boxEqualsRounded(this.targetLayout, newLayout); - /* - * Note: Disabled to fix relative animations always triggering new - * layout animations. If this causes further issues, we can try - * a different approach to detecting relative target changes. - */ - // || hasRelativeLayoutChanged - /** - * If the layout hasn't seemed to have changed, it might be that the - * element is visually in the same place in the document but its position - * relative to its parent has indeed changed. So here we check for that. - */ - const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged; - if (this.options.layoutRoot || - this.resumeFrom || - hasOnlyRelativeTargetChanged || - (hasLayoutChanged && - (hasTargetChanged || !this.currentAnimation))) { - if (this.resumeFrom) { - this.resumingFrom = this.resumeFrom; - this.resumingFrom.resumingFrom = undefined; - } - const animationOptions = { - ...getValueTransition(layoutTransition, "layout"), - onPlay: onLayoutAnimationStart, - onComplete: onLayoutAnimationComplete, - }; - if (visualElement.shouldReduceMotion || - this.options.layoutRoot) { - animationOptions.delay = 0; - animationOptions.type = false; - } - this.startAnimation(animationOptions); - /** - * Set animation origin after starting animation to avoid layout jump - * caused by stopping previous layout animation - */ - this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged, animationOptions - .path); - } - else { - /** - * If the layout hasn't changed and we have an animation that hasn't started yet, - * finish it immediately. Otherwise it will be animating from a location - * that was probably never committed to screen and look like a jumpy box. - */ - if (!hasLayoutChanged) { - finishAnimation(this); - } - if (this.isLead() && this.options.onExitComplete) { - this.options.onExitComplete(); - } - } - this.targetLayout = newLayout; - }); - } - } - unmount() { - this.options.layoutId && this.willUpdate(); - this.root.nodes.remove(this); - const stack = this.getStack(); - stack && stack.remove(this); - this.parent && this.parent.children.delete(this); - this.instance = undefined; - this.eventHandlers.clear(); - cancelFrame(this.updateProjection); - } - // only on the root - blockUpdate() { - this.updateManuallyBlocked = true; - } - unblockUpdate() { - this.updateManuallyBlocked = false; - } - isUpdateBlocked() { - return this.updateManuallyBlocked || this.updateBlockedByResize; - } - isTreeAnimationBlocked() { - return (this.isAnimationBlocked || - (this.parent && this.parent.isTreeAnimationBlocked()) || - false); - } - // Note: currently only running on root node - startUpdate() { - if (this.isUpdateBlocked()) - return; - this.isUpdating = true; - this.nodes && this.nodes.forEach(resetSkewAndRotation); - this.animationId++; - } - getTransformTemplate() { - const { visualElement } = this.options; - return visualElement && visualElement.getProps().transformTemplate; - } - willUpdate(shouldNotifyListeners = true) { - this.root.hasTreeAnimated = true; - if (this.root.isUpdateBlocked()) { - this.options.onExitComplete && this.options.onExitComplete(); - return; - } - /** - * If we're running optimised appear animations then these must be - * cancelled before measuring the DOM. This is so we can measure - * the true layout of the element rather than the WAAPI animation - * which will be unaffected by the resetSkewAndRotate step. - * - * Note: This is a DOM write. Worst case scenario is this is sandwiched - * between other snapshot reads which will cause unnecessary style recalculations. - * This has to happen here though, as we don't yet know which nodes will need - * snapshots in startUpdate(), but we only want to cancel optimised animations - * if a layout animation measurement is actually going to be affected by them. - */ - if (window.MotionCancelOptimisedAnimation && - !this.hasCheckedOptimisedAppear) { - cancelTreeOptimisedTransformAnimations(this); - } - !this.root.isUpdating && this.root.startUpdate(); - if (this.isLayoutDirty) - return; - this.isLayoutDirty = true; - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - node.shouldResetTransform = true; - /** - * Percentage translates resolve against layoutBox dimensions, - * so ancestors with them must be re-measured after transform reset. - */ - if (typeof node.latestValues.x === "string" || - typeof node.latestValues.y === "string") { - node.isLayoutDirty = true; - } - node.updateScroll("snapshot"); - if (node.options.layoutRoot) { - node.willUpdate(false); - } - } - const { layoutId, layout } = this.options; - if (layoutId === undefined && !layout) - return; - const transformTemplate = this.getTransformTemplate(); - this.prevTransformTemplateValue = transformTemplate - ? transformTemplate(this.latestValues, "") - : undefined; - this.updateSnapshot(); - shouldNotifyListeners && this.notifyListeners("willUpdate"); - } - update() { - this.updateScheduled = false; - const updateWasBlocked = this.isUpdateBlocked(); - // When doing an instant transition, we skip the layout update, - // but should still clean up the measurements so that the next - // snapshot could be taken correctly. - if (updateWasBlocked) { - const wasBlockedByResize = this.updateBlockedByResize; - this.unblockUpdate(); - this.updateBlockedByResize = false; - this.clearAllSnapshots(); - /** - * When blocked by resize, still measure layouts so - * callbacks like onLayoutMeasure fire (e.g. Reorder). - * Skip notifyLayoutUpdate to prevent animations. - */ - if (wasBlockedByResize) { - this.nodes.forEach(forceLayoutMeasure); - } - this.nodes.forEach(clearMeasurements); - return; - } - /** - * If this is a repeat of didUpdate then ignore the animation. - */ - if (this.animationId <= this.animationCommitId) { - this.nodes.forEach(clearIsLayoutDirty); - return; - } - this.animationCommitId = this.animationId; - if (!this.isUpdating) { - this.nodes.forEach(clearIsLayoutDirty); - } - else { - this.isUpdating = false; - /** - * Ensure animation-blocked nodes (e.g. during drag) - * get measured even when memoized (willUpdate skipped). - */ - this.nodes.forEach(ensureDraggedNodesSnapshotted); - /** - * Write - */ - this.nodes.forEach(resetTransformStyle); - /** - * Read ================== - */ - // Update layout measurements of updated children - this.nodes.forEach(updateLayout); - /** - * Write - */ - // Notify listeners that the layout is updated - this.nodes.forEach(notifyLayoutUpdate); - } - this.clearAllSnapshots(); - /** - * Manually flush any pending updates. Ideally - * we could leave this to the following requestAnimationFrame but this seems - * to leave a flash of incorrectly styled content. - */ - const now = time.now(); - frameData.delta = motionUtils.clamp(0, 1000 / 60, now - frameData.timestamp); - frameData.timestamp = now; - frameData.isProcessing = true; - frameSteps.update.process(frameData); - frameSteps.preRender.process(frameData); - frameSteps.render.process(frameData); - frameData.isProcessing = false; - } - didUpdate() { - if (!this.updateScheduled) { - this.updateScheduled = true; - microtask.read(this.scheduleUpdate); - } - } - clearAllSnapshots() { - this.nodes.forEach(clearSnapshot); - this.sharedNodes.forEach(removeLeadSnapshots); - } - scheduleUpdateProjection() { - if (!this.projectionUpdateScheduled) { - this.projectionUpdateScheduled = true; - frame.preRender(this.updateProjection, false, true); - } - } - scheduleCheckAfterUnmount() { - /** - * If the unmounting node is in a layoutGroup and did trigger a willUpdate, - * we manually call didUpdate to give a chance to the siblings to animate. - * Otherwise, cleanup all snapshots to prevents future nodes from reusing them. - */ - frame.postRender(() => { - if (this.isLayoutDirty) { - this.root.didUpdate(); - } - else { - this.root.checkUpdateFailed(); - } - }); - } - /** - * Update measurements - */ - updateSnapshot() { - if (this.snapshot || !this.instance) - return; - this.snapshot = this.measure(); - if (this.snapshot && - !calcLength(this.snapshot.measuredBox.x) && - !calcLength(this.snapshot.measuredBox.y)) { - this.snapshot = undefined; - } - } - updateLayout() { - if (!this.instance) - return; - this.updateScroll(); - if (!(this.options.alwaysMeasureLayout && this.isLead()) && - !this.isLayoutDirty) { - return; - } - /** - * When a node is mounted, it simply resumes from the prevLead's - * snapshot instead of taking a new one, but the ancestors scroll - * might have updated while the prevLead is unmounted. We need to - * update the scroll again to make sure the layout we measure is - * up to date. - */ - if (this.resumeFrom && !this.resumeFrom.instance) { - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - node.updateScroll(); - } - } - const prevLayout = this.layout; - this.layout = this.measure(false); - this.layoutVersion++; - if (!this.layoutCorrected) - this.layoutCorrected = createBox(); - this.isLayoutDirty = false; - this.projectionDelta = undefined; - this.notifyListeners("measure", this.layout.layoutBox); - const { visualElement } = this.options; - visualElement && - visualElement.notify("LayoutMeasure", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined); - } - updateScroll(phase = "measure") { - let needsMeasurement = Boolean(this.options.layoutScroll && this.instance); - if (this.scroll && - this.scroll.animationId === this.root.animationId && - this.scroll.phase === phase) { - needsMeasurement = false; - } - if (needsMeasurement && this.instance) { - const isRoot = checkIsScrollRoot(this.instance); - this.scroll = { - animationId: this.root.animationId, - phase, - isRoot, - offset: measureScroll(this.instance), - wasRoot: this.scroll ? this.scroll.isRoot : isRoot, - }; - } - } - resetTransform() { - if (!resetTransform) - return; - const isResetRequested = this.isLayoutDirty || - this.shouldResetTransform || - this.options.alwaysMeasureLayout; - const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta); - const transformTemplate = this.getTransformTemplate(); - const transformTemplateValue = transformTemplate - ? transformTemplate(this.latestValues, "") - : undefined; - const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue; - if (isResetRequested && - this.instance && - (hasProjection || - hasTransform(this.latestValues) || - transformTemplateHasChanged)) { - resetTransform(this.instance, transformTemplateValue); - this.shouldResetTransform = false; - this.scheduleRender(); - } - } - measure(removeTransform = true) { - const pageBox = this.measurePageBox(); - let layoutBox = this.removeElementScroll(pageBox); - /** - * Measurements taken during the pre-render stage - * still have transforms applied so we remove them - * via calculation. - */ - if (removeTransform) { - layoutBox = this.removeTransform(layoutBox); - } - roundBox(layoutBox); - return { - animationId: this.root.animationId, - measuredBox: pageBox, - layoutBox, - latestValues: {}, - source: this.id, - }; - } - measurePageBox() { - const { visualElement } = this.options; - if (!visualElement) - return createBox(); - const box = visualElement.measureViewportBox(); - const wasInScrollRoot = this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot); - if (!wasInScrollRoot) { - // Remove viewport scroll to give page-relative coordinates - const { scroll } = this.root; - if (scroll) { - translateAxis(box.x, scroll.offset.x); - translateAxis(box.y, scroll.offset.y); - } - } - return box; - } - removeElementScroll(box) { - const boxWithoutScroll = createBox(); - copyBoxInto(boxWithoutScroll, box); - if (this.scroll?.wasRoot) { - return boxWithoutScroll; - } - /** - * Performance TODO: Keep a cumulative scroll offset down the tree - * rather than loop back up the path. - */ - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - const { scroll, options } = node; - if (node !== this.root && scroll && options.layoutScroll) { - /** - * If this is a new scroll root, we want to remove all previous scrolls - * from the viewport box. - */ - if (scroll.wasRoot) { - copyBoxInto(boxWithoutScroll, box); - } - translateAxis(boxWithoutScroll.x, scroll.offset.x); - translateAxis(boxWithoutScroll.y, scroll.offset.y); - } - } - return boxWithoutScroll; - } - applyTransform(box, transformOnly = false, output) { - const withTransforms = output || createBox(); - copyBoxInto(withTransforms, box); - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - if (!transformOnly && - node.options.layoutScroll && - node.scroll && - node !== node.root) { - translateAxis(withTransforms.x, -node.scroll.offset.x); - translateAxis(withTransforms.y, -node.scroll.offset.y); - } - if (!hasTransform(node.latestValues)) - continue; - transformBox(withTransforms, node.latestValues, node.layout?.layoutBox); - } - if (hasTransform(this.latestValues)) { - transformBox(withTransforms, this.latestValues, this.layout?.layoutBox); - } - return withTransforms; - } - removeTransform(box) { - const boxWithoutTransform = createBox(); - copyBoxInto(boxWithoutTransform, box); - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - if (!hasTransform(node.latestValues)) - continue; - let sourceBox; - if (node.instance) { - hasScale(node.latestValues) && node.updateSnapshot(); - sourceBox = createBox(); - copyBoxInto(sourceBox, node.measurePageBox()); - } - removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot?.layoutBox, sourceBox); - } - if (hasTransform(this.latestValues)) { - removeBoxTransforms(boxWithoutTransform, this.latestValues); - } - return boxWithoutTransform; - } - setTargetDelta(delta) { - this.targetDelta = delta; - this.root.scheduleUpdateProjection(); - this.isProjectionDirty = true; - } - setOptions(options) { - this.options = { - ...this.options, - ...options, - crossfade: options.crossfade !== undefined ? options.crossfade : true, - }; - } - clearMeasurements() { - this.scroll = undefined; - this.layout = undefined; - this.snapshot = undefined; - this.prevTransformTemplateValue = undefined; - this.targetDelta = undefined; - this.target = undefined; - this.isLayoutDirty = false; - } - forceRelativeParentToResolveTarget() { - if (!this.relativeParent) - return; - /** - * If the parent target isn't up-to-date, force it to update. - * This is an unfortunate de-optimisation as it means any updating relative - * projection will cause all the relative parents to recalculate back - * up the tree. - */ - if (this.relativeParent.resolvedRelativeTargetAt !== - frameData.timestamp) { - this.relativeParent.resolveTargetDelta(true); - } - } - resolveTargetDelta(forceRecalculation = false) { - /** - * Once the dirty status of nodes has been spread through the tree, we also - * need to check if we have a shared node of a different depth that has itself - * been dirtied. - */ - const lead = this.getLead(); - this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty); - this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty); - this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty); - const isShared = Boolean(this.resumingFrom) || this !== lead; - /** - * We don't use transform for this step of processing so we don't - * need to check whether any nodes have changed transform. - */ - const canSkip = !(forceRecalculation || - (isShared && this.isSharedProjectionDirty) || - this.isProjectionDirty || - this.parent?.isProjectionDirty || - this.attemptToResolveRelativeTarget || - this.root.updateBlockedByResize); - if (canSkip) - return; - const { layout, layoutId } = this.options; - /** - * If we have no layout, we can't perform projection, so early return - */ - if (!this.layout || !(layout || layoutId)) - return; - this.resolvedRelativeTargetAt = frameData.timestamp; - const relativeParent = this.getClosestProjectingParent(); - if (relativeParent && - this.linkedParentVersion !== relativeParent.layoutVersion && - !relativeParent.options.layoutRoot) { - this.removeRelativeTarget(); - } - /** - * If we don't have a targetDelta but do have a layout, we can attempt to resolve - * a relativeParent. This will allow a component to perform scale correction - * even if no animation has started. - */ - if (!this.targetDelta && !this.relativeTarget) { - if (this.options.layoutAnchor !== false && - relativeParent && - relativeParent.layout) { - this.createRelativeTarget(relativeParent, this.layout.layoutBox, relativeParent.layout.layoutBox); - } - else { - this.removeRelativeTarget(); - } - } - /** - * If we have no relative target or no target delta our target isn't valid - * for this frame. - */ - if (!this.relativeTarget && !this.targetDelta) - return; - /** - * Lazy-init target data structure - */ - if (!this.target) { - this.target = createBox(); - this.targetWithTransforms = createBox(); - } - /** - * If we've got a relative box for this component, resolve it into a target relative to the parent. - */ - if (this.relativeTarget && - this.relativeTargetOrigin && - this.relativeParent && - this.relativeParent.target) { - this.forceRelativeParentToResolveTarget(); - calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || undefined); - /** - * If we've only got a targetDelta, resolve it into a target - */ - } - else if (this.targetDelta) { - if (Boolean(this.resumingFrom)) { - this.applyTransform(this.layout.layoutBox, false, this.target); - } - else { - copyBoxInto(this.target, this.layout.layoutBox); - } - applyBoxDelta(this.target, this.targetDelta); - } - else { - /** - * If no target, use own layout as target - */ - copyBoxInto(this.target, this.layout.layoutBox); - } - /** - * If we've been told to attempt to resolve a relative target, do so. - */ - if (this.attemptToResolveRelativeTarget) { - this.attemptToResolveRelativeTarget = false; - if (this.options.layoutAnchor !== false && - relativeParent && - Boolean(relativeParent.resumingFrom) === - Boolean(this.resumingFrom) && - !relativeParent.options.layoutScroll && - relativeParent.target && - this.animationProgress !== 1) { - this.createRelativeTarget(relativeParent, this.target, relativeParent.target); - } - else { - this.relativeParent = this.relativeTarget = undefined; - } - } - /** - * Increase debug counter for resolved target deltas - */ - if (statsBuffer.value) { - metrics.calculatedTargetDeltas++; - } - } - getClosestProjectingParent() { - if (!this.parent || - hasScale(this.parent.latestValues) || - has2DTranslate(this.parent.latestValues)) { - return undefined; - } - if (this.parent.isProjecting()) { - return this.parent; - } - else { - return this.parent.getClosestProjectingParent(); - } - } - isProjecting() { - return Boolean((this.relativeTarget || - this.targetDelta || - this.options.layoutRoot) && - this.layout); - } - createRelativeTarget(relativeParent, layout, parentLayout) { - this.relativeParent = relativeParent; - this.linkedParentVersion = relativeParent.layoutVersion; - this.forceRelativeParentToResolveTarget(); - this.relativeTarget = createBox(); - this.relativeTargetOrigin = createBox(); - calcRelativePosition(this.relativeTargetOrigin, layout, parentLayout, this.options.layoutAnchor || undefined); - copyBoxInto(this.relativeTarget, this.relativeTargetOrigin); - } - removeRelativeTarget() { - this.relativeParent = this.relativeTarget = undefined; - } - calcProjection() { - const lead = this.getLead(); - const isShared = Boolean(this.resumingFrom) || this !== lead; - let canSkip = true; - /** - * If this is a normal layout animation and neither this node nor its nearest projecting - * is dirty then we can't skip. - */ - if (this.isProjectionDirty || this.parent?.isProjectionDirty) { - canSkip = false; - } - /** - * If this is a shared layout animation and this node's shared projection is dirty then - * we can't skip. - */ - if (isShared && - (this.isSharedProjectionDirty || this.isTransformDirty)) { - canSkip = false; - } - /** - * If we have resolved the target this frame we must recalculate the - * projection to ensure it visually represents the internal calculations. - */ - if (this.resolvedRelativeTargetAt === frameData.timestamp) { - canSkip = false; - } - if (canSkip) - return; - const { layout, layoutId } = this.options; - /** - * If this section of the tree isn't animating we can - * delete our target sources for the following frame. - */ - this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) || - this.currentAnimation || - this.pendingAnimation); - if (!this.isTreeAnimating) { - this.targetDelta = this.relativeTarget = undefined; - } - if (!this.layout || !(layout || layoutId)) - return; - /** - * Reset the corrected box with the latest values from box, as we're then going - * to perform mutative operations on it. - */ - copyBoxInto(this.layoutCorrected, this.layout.layoutBox); - /** - * Record previous tree scales before updating. - */ - const prevTreeScaleX = this.treeScale.x; - const prevTreeScaleY = this.treeScale.y; - /** - * Apply all the parent deltas to this box to produce the corrected box. This - * is the layout box, as it will appear on screen as a result of the transforms of its parents. - */ - applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared); - /** - * If this layer needs to perform scale correction but doesn't have a target, - * use the layout as the target. - */ - if (lead.layout && - !lead.target && - (this.treeScale.x !== 1 || this.treeScale.y !== 1)) { - lead.target = lead.layout.layoutBox; - lead.targetWithTransforms = createBox(); - } - const { target } = lead; - if (!target) { - /** - * If we don't have a target to project into, but we were previously - * projecting, we want to remove the stored transform and schedule - * a render to ensure the elements reflect the removed transform. - */ - if (this.prevProjectionDelta) { - this.createProjectionDeltas(); - this.scheduleRender(); - } - return; - } - if (!this.projectionDelta || !this.prevProjectionDelta) { - this.createProjectionDeltas(); - } - else { - copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x); - copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y); - } - /** - * Update the delta between the corrected box and the target box before user-set transforms were applied. - * This will allow us to calculate the corrected borderRadius and boxShadow to compensate - * for our layout reprojection, but still allow them to be scaled correctly by the user. - * It might be that to simplify this we may want to accept that user-set scale is also corrected - * and we wouldn't have to keep and calc both deltas, OR we could support a user setting - * to allow people to choose whether these styles are corrected based on just the - * layout reprojection or the final bounding box. - */ - calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues); - if (this.treeScale.x !== prevTreeScaleX || - this.treeScale.y !== prevTreeScaleY || - !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) || - !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) { - this.hasProjected = true; - this.scheduleRender(); - this.notifyListeners("projectionUpdate", target); - } - /** - * Increase debug counter for recalculated projections - */ - if (statsBuffer.value) { - metrics.calculatedProjections++; - } - } - hide() { - this.isVisible = false; - // TODO: Schedule render - } - show() { - this.isVisible = true; - // TODO: Schedule render - } - scheduleRender(notifyAll = true) { - this.options.visualElement?.scheduleRender(); - if (notifyAll) { - const stack = this.getStack(); - stack && stack.scheduleRender(); - } - if (this.resumingFrom && !this.resumingFrom.instance) { - this.resumingFrom = undefined; - } - } - createProjectionDeltas() { - this.prevProjectionDelta = createDelta(); - this.projectionDelta = createDelta(); - this.projectionDeltaWithTransform = createDelta(); - } - setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false, pathFn) { - const snapshot = this.snapshot; - const snapshotLatestValues = snapshot ? snapshot.latestValues : {}; - const mixedValues = { ...this.latestValues }; - const targetDelta = createDelta(); - if (!this.relativeParent || - !this.relativeParent.options.layoutRoot) { - this.relativeTarget = this.relativeTargetOrigin = undefined; - } - this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged; - const relativeLayout = createBox(); - const snapshotSource = snapshot ? snapshot.source : undefined; - const layoutSource = this.layout ? this.layout.source : undefined; - const isSharedLayoutAnimation = snapshotSource !== layoutSource; - const stack = this.getStack(); - const isOnlyMember = !stack || stack.members.length <= 1; - const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && - !isOnlyMember && - this.options.crossfade === true && - !this.path.some(hasOpacityCrossfade)); - this.animationProgress = 0; - let prevRelativeTarget; - // The path decides whether the layout shift is worth curving - // (distance floor) and resolves the interpolator from the delta. - const interpolate = pathFn?.interpolateProjection(delta); - this.mixTargetDelta = (latest) => { - const progress = latest / 1000; - const point = interpolate?.(progress); - if (point) { - targetDelta.x.translate = point.x; - targetDelta.x.scale = mixNumber$1(delta.x.scale, 1, progress); - targetDelta.x.origin = delta.x.origin; - targetDelta.x.originPoint = delta.x.originPoint; - targetDelta.y.translate = point.y; - targetDelta.y.scale = mixNumber$1(delta.y.scale, 1, progress); - targetDelta.y.origin = delta.y.origin; - targetDelta.y.originPoint = delta.y.originPoint; - } - else { - mixAxisDeltaLinear(targetDelta.x, delta.x, progress); - mixAxisDeltaLinear(targetDelta.y, delta.y, progress); - } - this.setTargetDelta(targetDelta); - if (this.relativeTarget && - this.relativeTargetOrigin && - this.layout && - this.relativeParent && - this.relativeParent.layout) { - calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || undefined); - mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress); - /** - * If this is an unchanged relative target we can consider the - * projection not dirty. - */ - if (prevRelativeTarget && - boxEquals(this.relativeTarget, prevRelativeTarget)) { - this.isProjectionDirty = false; - } - if (!prevRelativeTarget) - prevRelativeTarget = createBox(); - copyBoxInto(prevRelativeTarget, this.relativeTarget); - } - if (isSharedLayoutAnimation) { - this.animationValues = mixedValues; - mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember); - } - if (point && point.rotate !== undefined) { - // Dedicated `pathRotation` channel, not `rotate`, so an - // animating `rotate` is composed with, never clobbered. - if (!this.animationValues) - this.animationValues = mixedValues; - this.animationValues.pathRotation = point.rotate; - } - this.root.scheduleUpdateProjection(); - this.scheduleRender(); - this.animationProgress = progress; - }; - this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0); - } - startAnimation(options) { - this.notifyListeners("animationStart"); - this.currentAnimation?.stop(); - this.resumingFrom?.currentAnimation?.stop(); - if (this.pendingAnimation) { - cancelFrame(this.pendingAnimation); - this.pendingAnimation = undefined; - } - /** - * Start the animation in the next frame to have a frame with progress 0, - * where the target is the same as when the animation started, so we can - * calculate the relative positions correctly for instant transitions. - */ - this.pendingAnimation = frame.update(() => { - globalProjectionState.hasAnimatedSinceResize = true; - activeAnimations.layout++; - this.motionValue || (this.motionValue = motionValue(0)); - this.motionValue.jump(0, false); - this.currentAnimation = animateSingleValue(this.motionValue, [0, 1000], { - ...options, - velocity: 0, - isSync: true, - onUpdate: (latest) => { - this.mixTargetDelta(latest); - options.onUpdate && options.onUpdate(latest); - }, - onStop: () => { - activeAnimations.layout--; - }, - onComplete: () => { - activeAnimations.layout--; - options.onComplete && options.onComplete(); - this.completeAnimation(); - }, - }); - if (this.resumingFrom) { - this.resumingFrom.currentAnimation = this.currentAnimation; - } - this.pendingAnimation = undefined; - }); - } - completeAnimation() { - if (this.resumingFrom) { - this.resumingFrom.currentAnimation = undefined; - this.resumingFrom.preserveOpacity = undefined; - } - const stack = this.getStack(); - stack && stack.exitAnimationComplete(); - this.resumingFrom = - this.currentAnimation = - this.animationValues = - undefined; - this.notifyListeners("animationComplete"); - } - finishAnimation() { - if (this.currentAnimation) { - this.mixTargetDelta && this.mixTargetDelta(animationTarget); - this.currentAnimation.stop(); - } - this.completeAnimation(); - } - applyTransformsToTarget() { - const lead = this.getLead(); - let { targetWithTransforms, target, layout, latestValues } = lead; - if (!targetWithTransforms || !target || !layout) - return; - /** - * If we're only animating position, and this element isn't the lead element, - * then instead of projecting into the lead box we instead want to calculate - * a new target that aligns the two boxes but maintains the layout shape. - */ - if (this !== lead && - this.layout && - layout && - shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) { - target = this.target || createBox(); - const xLength = calcLength(this.layout.layoutBox.x); - target.x.min = lead.target.x.min; - target.x.max = target.x.min + xLength; - const yLength = calcLength(this.layout.layoutBox.y); - target.y.min = lead.target.y.min; - target.y.max = target.y.min + yLength; - } - copyBoxInto(targetWithTransforms, target); - /** - * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal. - * This is the final box that we will then project into by calculating a transform delta and - * applying it to the corrected box. - */ - transformBox(targetWithTransforms, latestValues); - /** - * Update the delta between the corrected box and the final target box, after - * user-set transforms are applied to it. This will be used by the renderer to - * create a transform style that will reproject the element from its layout layout - * into the desired bounding box. - */ - calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues); - } - registerSharedNode(layoutId, node) { - if (!this.sharedNodes.has(layoutId)) { - this.sharedNodes.set(layoutId, new NodeStack()); - } - const stack = this.sharedNodes.get(layoutId); - stack.add(node); - const config = node.options.initialPromotionConfig; - node.promote({ - transition: config ? config.transition : undefined, - preserveFollowOpacity: config && config.shouldPreserveFollowOpacity - ? config.shouldPreserveFollowOpacity(node) - : undefined, - }); - } - isLead() { - const stack = this.getStack(); - return stack ? stack.lead === this : true; - } - getLead() { - const { layoutId } = this.options; - return layoutId ? this.getStack()?.lead || this : this; - } - getPrevLead() { - const { layoutId } = this.options; - return layoutId ? this.getStack()?.prevLead : undefined; - } - getStack() { - const { layoutId } = this.options; - if (layoutId) - return this.root.sharedNodes.get(layoutId); - } - promote({ needsReset, transition, preserveFollowOpacity, } = {}) { - const stack = this.getStack(); - if (stack) - stack.promote(this, preserveFollowOpacity); - if (needsReset) { - this.projectionDelta = undefined; - this.needsReset = true; - } - if (transition) - this.setOptions({ transition }); - } - relegate() { - const stack = this.getStack(); - if (stack) { - return stack.relegate(this); - } - else { - return false; - } - } - resetSkewAndRotation() { - const { visualElement } = this.options; - if (!visualElement) - return; - // If there's no detected skew or rotation values, we can early return without a forced render. - let hasDistortingTransform = false; - /** - * An unrolled check for rotation values. Most elements don't have any rotation and - * skipping the nested loop and new object creation is 50% faster. - */ - const { latestValues } = visualElement; - if (latestValues.z || - latestValues.rotate || - latestValues.rotateX || - latestValues.rotateY || - latestValues.rotateZ || - latestValues.skewX || - latestValues.skewY) { - hasDistortingTransform = true; - } - // If there's no distorting values, we don't need to do any more. - if (!hasDistortingTransform) - return; - const resetValues = {}; - if (latestValues.z) { - resetDistortingTransform("z", visualElement, resetValues, this.animationValues); - } - // Check the skew and rotate value of all axes and reset to 0 - for (let i = 0; i < transformAxes.length; i++) { - resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues); - resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues); - } - // Force a render of this element to apply the transform with all skews and rotations - // set to 0. - visualElement.render(); - // Put back all the values we reset - for (const key in resetValues) { - visualElement.setStaticValue(key, resetValues[key]); - if (this.animationValues) { - this.animationValues[key] = resetValues[key]; - } - } - // Schedule a render for the next frame. This ensures we won't visually - // see the element with the reset rotate value applied. - visualElement.scheduleRender(); - } - applyProjectionStyles(targetStyle, // CSSStyleDeclaration - doesn't allow numbers to be assigned to properties - styleProp) { - if (!this.instance || this.isSVG) - return; - if (!this.isVisible) { - targetStyle.visibility = "hidden"; - return; - } - const transformTemplate = this.getTransformTemplate(); - if (this.needsReset) { - this.needsReset = false; - targetStyle.visibility = ""; - targetStyle.opacity = ""; - targetStyle.pointerEvents = - resolveMotionValue(styleProp?.pointerEvents) || ""; - targetStyle.transform = transformTemplate - ? transformTemplate(this.latestValues, "") - : "none"; - return; - } - const lead = this.getLead(); - if (!this.projectionDelta || !this.layout || !lead.target) { - if (this.options.layoutId) { - targetStyle.opacity = - this.latestValues.opacity !== undefined - ? this.latestValues.opacity - : 1; - targetStyle.pointerEvents = - resolveMotionValue(styleProp?.pointerEvents) || ""; - } - if (this.hasProjected && !hasTransform(this.latestValues)) { - targetStyle.transform = transformTemplate - ? transformTemplate({}, "") - : "none"; - this.hasProjected = false; - } - return; - } - targetStyle.visibility = ""; - const valuesToRender = lead.animationValues || lead.latestValues; - this.applyTransformsToTarget(); - let transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender); - if (transformTemplate) { - transform = transformTemplate(valuesToRender, transform); - } - targetStyle.transform = transform; - const { x, y } = this.projectionDelta; - targetStyle.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`; - if (lead.animationValues) { - /** - * If the lead component is animating, assign this either the entering/leaving - * opacity - */ - targetStyle.opacity = - lead === this - ? valuesToRender.opacity ?? - this.latestValues.opacity ?? - 1 - : this.preserveOpacity - ? this.latestValues.opacity - : valuesToRender.opacityExit; - } - else { - /** - * Or we're not animating at all, set the lead component to its layout - * opacity and other components to hidden. - */ - targetStyle.opacity = - lead === this - ? valuesToRender.opacity !== undefined - ? valuesToRender.opacity - : "" - : valuesToRender.opacityExit !== undefined - ? valuesToRender.opacityExit - : 0; - } - /** - * Apply scale correction - */ - for (const key in scaleCorrectors) { - if (valuesToRender[key] === undefined) - continue; - const { correct, applyTo, isCSSVariable } = scaleCorrectors[key]; - /** - * Only apply scale correction to the value if we have an - * active projection transform. Otherwise these values become - * vulnerable to distortion if the element changes size without - * a corresponding layout animation. - */ - const corrected = transform === "none" - ? valuesToRender[key] - : correct(valuesToRender[key], lead); - if (applyTo) { - const num = applyTo.length; - for (let i = 0; i < num; i++) { - targetStyle[applyTo[i]] = corrected; - } - } - else { - // If this is a CSS variable, set it directly on the instance. - // Replacing this function from creating styles to setting them - // would be a good place to remove per frame object creation - if (isCSSVariable) { - this.options.visualElement.renderState.vars[key] = corrected; - } - else { - targetStyle[key] = corrected; - } - } - } - /** - * Disable pointer events on follow components. This is to ensure - * that if a follow component covers a lead component it doesn't block - * pointer events on the lead. - */ - if (this.options.layoutId) { - targetStyle.pointerEvents = - lead === this - ? resolveMotionValue(styleProp?.pointerEvents) || "" - : "none"; - } - } - clearSnapshot() { - this.resumeFrom = this.snapshot = undefined; - } - // Only run on root - resetTree() { - this.root.nodes.forEach((node) => node.currentAnimation?.stop()); - this.root.nodes.forEach(clearMeasurements); - this.root.sharedNodes.clear(); - } - }; -} -function updateLayout(node) { - node.updateLayout(); -} -function notifyLayoutUpdate(node) { - const snapshot = node.resumeFrom?.snapshot || node.snapshot; - if (node.isLead() && - node.layout && - snapshot && - node.hasListeners("didUpdate")) { - const { layoutBox: layout, measuredBox: measuredLayout } = node.layout; - const { animationType } = node.options; - const isShared = snapshot.source !== node.layout.source; - // TODO Maybe we want to also resize the layout snapshot so we don't trigger - // animations for instance if layout="size" and an element has only changed position - if (animationType === "size") { - eachAxis((axis) => { - const axisSnapshot = isShared - ? snapshot.measuredBox[axis] - : snapshot.layoutBox[axis]; - const length = calcLength(axisSnapshot); - axisSnapshot.min = layout[axis].min; - axisSnapshot.max = axisSnapshot.min + length; - }); - } - else if (animationType === "x" || animationType === "y") { - const snapAxis = animationType === "x" ? "y" : "x"; - copyAxisInto(isShared - ? snapshot.measuredBox[snapAxis] - : snapshot.layoutBox[snapAxis], layout[snapAxis]); - } - else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) { - eachAxis((axis) => { - const axisSnapshot = isShared - ? snapshot.measuredBox[axis] - : snapshot.layoutBox[axis]; - const length = calcLength(layout[axis]); - axisSnapshot.max = axisSnapshot.min + length; - /** - * Ensure relative target gets resized and rerendererd - */ - if (node.relativeTarget && !node.currentAnimation) { - node.isProjectionDirty = true; - node.relativeTarget[axis].max = - node.relativeTarget[axis].min + length; - } - }); - } - const layoutDelta = createDelta(); - calcBoxDelta(layoutDelta, layout, snapshot.layoutBox); - const visualDelta = createDelta(); - if (isShared) { - calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox); - } - else { - calcBoxDelta(visualDelta, layout, snapshot.layoutBox); - } - const hasLayoutChanged = !isDeltaZero(layoutDelta); - let hasRelativeLayoutChanged = false; - if (!node.resumeFrom) { - const relativeParent = node.getClosestProjectingParent(); - /** - * If the relativeParent is itself resuming from a different element then - * the relative snapshot is not relavent - */ - if (relativeParent && !relativeParent.resumeFrom) { - const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent; - if (parentSnapshot && parentLayout) { - const anchor = node.options.layoutAnchor || undefined; - const relativeSnapshot = createBox(); - calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox, anchor); - const relativeLayout = createBox(); - calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox, anchor); - if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) { - hasRelativeLayoutChanged = true; - } - if (relativeParent.options.layoutRoot) { - node.relativeTarget = relativeLayout; - node.relativeTargetOrigin = relativeSnapshot; - node.relativeParent = relativeParent; - } - } - } - } - node.notifyListeners("didUpdate", { - layout, - snapshot, - delta: visualDelta, - layoutDelta, - hasLayoutChanged, - hasRelativeLayoutChanged, - }); - } - else if (node.isLead()) { - const { onExitComplete } = node.options; - onExitComplete && onExitComplete(); - } - /** - * Clearing transition - * TODO: Investigate why this transition is being passed in as {type: false } from Framer - * and why we need it at all - */ - node.options.transition = undefined; -} -function propagateDirtyNodes(node) { - /** - * Increase debug counter for nodes encountered this frame - */ - if (statsBuffer.value) { - metrics.nodes++; - } - if (!node.parent) - return; - /** - * If this node isn't projecting, propagate isProjectionDirty. It will have - * no performance impact but it will allow the next child that *is* projecting - * but *isn't* dirty to just check its parent to see if *any* ancestor needs - * correcting. - */ - if (!node.isProjecting()) { - node.isProjectionDirty = node.parent.isProjectionDirty; - } - /** - * Propagate isSharedProjectionDirty and isTransformDirty - * throughout the whole tree. A future revision can take another look at - * this but for safety we still recalcualte shared nodes. - */ - node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty || - node.parent.isProjectionDirty || - node.parent.isSharedProjectionDirty)); - node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty); -} -function cleanDirtyNodes(node) { - node.isProjectionDirty = - node.isSharedProjectionDirty = - node.isTransformDirty = - false; -} -function clearSnapshot(node) { - node.clearSnapshot(); -} -function clearMeasurements(node) { - node.clearMeasurements(); -} -function forceLayoutMeasure(node) { - node.isLayoutDirty = true; - node.updateLayout(); -} -function clearIsLayoutDirty(node) { - node.isLayoutDirty = false; -} -/** - * When a node is animation-blocked (e.g. during drag) and its component - * didn't re-render (memoized), willUpdate() is never called so there's - * no snapshot. Use the previous layout as a snapshot and mark dirty so - * resetTransform/updateLayout/notifyLayoutUpdate process it normally. - */ -function ensureDraggedNodesSnapshotted(node) { - if (node.isAnimationBlocked && node.layout && !node.isLayoutDirty) { - node.snapshot = node.layout; - node.isLayoutDirty = true; - } -} -function resetTransformStyle(node) { - const { visualElement } = node.options; - if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) { - visualElement.notify("BeforeLayoutMeasure"); - } - node.resetTransform(); -} -function finishAnimation(node) { - node.finishAnimation(); - node.targetDelta = node.relativeTarget = node.target = undefined; - node.isProjectionDirty = true; -} -function resolveTargetDelta(node) { - node.resolveTargetDelta(); -} -function calcProjection(node) { - node.calcProjection(); -} -function resetSkewAndRotation(node) { - node.resetSkewAndRotation(); -} -function removeLeadSnapshots(stack) { - stack.removeLeadSnapshot(); -} -function mixAxisDeltaLinear(output, delta, p) { - output.translate = mixNumber$1(delta.translate, 0, p); - output.scale = mixNumber$1(delta.scale, 1, p); - output.origin = delta.origin; - output.originPoint = delta.originPoint; -} -function mixAxis(output, from, to, p) { - output.min = mixNumber$1(from.min, to.min, p); - output.max = mixNumber$1(from.max, to.max, p); -} -function mixBox(output, from, to, p) { - mixAxis(output.x, from.x, to.x, p); - mixAxis(output.y, from.y, to.y, p); -} -function hasOpacityCrossfade(node) { - return (node.animationValues && node.animationValues.opacityExit !== undefined); -} -const defaultLayoutTransition = { - duration: 0.45, - ease: [0.4, 0, 0.1, 1], -}; -const userAgentContains = (string) => typeof navigator !== "undefined" && - navigator.userAgent && - navigator.userAgent.toLowerCase().includes(string); -/** - * Measured bounding boxes must be rounded in Safari and - * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements - * can appear to jump. - */ -const roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/") - ? Math.round - : motionUtils.noop; -function roundAxis(axis) { - // Round to the nearest .5 pixels to support subpixel layouts - axis.min = roundPoint(axis.min); - axis.max = roundPoint(axis.max); -} -function roundBox(box) { - roundAxis(box.x); - roundAxis(box.y); -} -function shouldAnimatePositionOnly(animationType, snapshot, layout) { - return (animationType === "position" || - (animationType === "preserve-aspect" && - !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2))); -} -function checkNodeWasScrollRoot(node) { - return node !== node.root && node.scroll?.wasRoot; -} - -const DocumentProjectionNode = createProjectionNode({ - attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify), - measureScroll: () => ({ - x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0, - y: document.documentElement.scrollTop || document.body?.scrollTop || 0, - }), - checkIsScrollRoot: () => true, -}); - -const notify = (node) => !node.isLayoutDirty && node.willUpdate(false); -function nodeGroup() { - const nodes = new Set(); - const subscriptions = new WeakMap(); - const dirtyAll = () => nodes.forEach(notify); - return { - add: (node) => { - nodes.add(node); - subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll)); - }, - remove: (node) => { - nodes.delete(node); - const unsubscribe = subscriptions.get(node); - if (unsubscribe) { - unsubscribe(); - subscriptions.delete(node); - } - dirtyAll(); - }, - dirty: dirtyAll, - }; -} - -const rootProjectionNode = { - current: undefined, -}; -const HTMLProjectionNode = createProjectionNode({ - measureScroll: (instance) => ({ - x: instance.scrollLeft, - y: instance.scrollTop, - }), - defaultParent: () => { - if (!rootProjectionNode.current) { - const documentNode = new DocumentProjectionNode({}); - documentNode.mount(window); - documentNode.setOptions({ layoutScroll: true }); - rootProjectionNode.current = documentNode; - } - return rootProjectionNode.current; - }, - resetTransform: (instance, value) => { - instance.style.transform = value !== undefined ? value : "none"; - }, - checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed"), -}); - -const layoutSelector = "[data-layout], [data-layout-id]"; -const noop = () => { }; -function snapshotFromTarget(projection) { - const target = projection.targetWithTransforms || projection.target; - if (!target) - return undefined; - const measuredBox = createBox(); - const layoutBox = createBox(); - copyBoxInto(measuredBox, target); - copyBoxInto(layoutBox, target); - return { - animationId: projection.root?.animationId ?? 0, - measuredBox, - layoutBox, - latestValues: projection.animationValues || projection.latestValues || {}, - source: projection.id, - }; -} -class LayoutAnimationBuilder { - constructor(scope, updateDom, defaultOptions) { - this.sharedTransitions = new Map(); - this.notifyReady = noop; - this.rejectReady = noop; - this.scope = scope; - this.updateDom = updateDom; - this.defaultOptions = defaultOptions; - this.readyPromise = new Promise((resolve, reject) => { - this.notifyReady = resolve; - this.rejectReady = reject; - }); - frame.postRender(() => { - this.start().then(this.notifyReady).catch(this.rejectReady); - }); - } - shared(id, transition) { - this.sharedTransitions.set(id, transition); - return this; - } - then(resolve, reject) { - return this.readyPromise.then(resolve, reject); - } - async start() { - const beforeElements = collectLayoutElements(this.scope); - const beforeRecords = this.buildRecords(beforeElements); - beforeRecords.forEach(({ projection }) => { - const hasCurrentAnimation = Boolean(projection.currentAnimation); - const isSharedLayout = Boolean(projection.options.layoutId); - if (hasCurrentAnimation && isSharedLayout) { - const snapshot = snapshotFromTarget(projection); - if (snapshot) { - projection.snapshot = snapshot; - } - else if (projection.snapshot) { - projection.snapshot = undefined; - } - } - else if (projection.snapshot && - (projection.currentAnimation || projection.isProjecting())) { - projection.snapshot = undefined; - } - projection.isPresent = true; - projection.willUpdate(); - }); - await this.updateDom(); - const afterElements = collectLayoutElements(this.scope); - const afterRecords = this.buildRecords(afterElements); - this.handleExitingElements(beforeRecords, afterRecords); - afterRecords.forEach(({ projection }) => { - const instance = projection.instance; - const resumeFromInstance = projection.resumeFrom - ?.instance; - if (!instance || !resumeFromInstance) - return; - if (!("style" in instance)) - return; - const currentTransform = instance.style.transform; - const resumeFromTransform = resumeFromInstance.style.transform; - if (currentTransform && - resumeFromTransform && - currentTransform === resumeFromTransform) { - instance.style.transform = ""; - instance.style.transformOrigin = ""; - } - }); - afterRecords.forEach(({ projection }) => { - projection.isPresent = true; - }); - const root = getProjectionRoot(afterRecords, beforeRecords); - root?.didUpdate(); - await new Promise((resolve) => { - frame.postRender(() => resolve()); - }); - const animations = collectAnimations(afterRecords); - const animation = new GroupAnimation(animations); - return animation; - } - buildRecords(elements) { - const records = []; - const recordMap = new Map(); - for (const element of elements) { - const parentRecord = findParentRecord(element, recordMap, this.scope); - const { layout, layoutId } = readLayoutAttributes(element); - const override = layoutId - ? this.sharedTransitions.get(layoutId) - : undefined; - const transition = override || this.defaultOptions; - const record = getOrCreateRecord(element, parentRecord?.projection, { - layout, - layoutId, - animationType: typeof layout === "string" ? layout : "both", - transition: transition, - }); - recordMap.set(element, record); - records.push(record); - } - return records; - } - handleExitingElements(beforeRecords, afterRecords) { - const afterElementsSet = new Set(afterRecords.map((record) => record.element)); - beforeRecords.forEach((record) => { - if (afterElementsSet.has(record.element)) - return; - // For shared layout elements, relegate to set up resumeFrom - // so the remaining element animates from this position - if (record.projection.options.layoutId) { - record.projection.isPresent = false; - record.projection.relegate(); - } - record.visualElement.unmount(); - visualElementStore.delete(record.element); - }); - // Clear resumeFrom on EXISTING nodes that point to unmounted projections - // This prevents crossfade animation when the source element was removed entirely - // But preserve resumeFrom for NEW nodes so they can animate from the old position - // Also preserve resumeFrom for lead nodes that were just promoted via relegate - const beforeElementsSet = new Set(beforeRecords.map((record) => record.element)); - afterRecords.forEach(({ element, projection }) => { - if (beforeElementsSet.has(element) && - projection.resumeFrom && - !projection.resumeFrom.instance && - !projection.isLead()) { - projection.resumeFrom = undefined; - projection.snapshot = undefined; - } - }); - } -} -function parseAnimateLayoutArgs(scopeOrUpdateDom, updateDomOrOptions, options) { - // animateLayout(updateDom) - if (typeof scopeOrUpdateDom === "function") { - return { - scope: document, - updateDom: scopeOrUpdateDom, - defaultOptions: updateDomOrOptions, - }; - } - // animateLayout(scope, updateDom, options?) - const elements = resolveElements(scopeOrUpdateDom); - const scope = elements[0] || document; - return { - scope, - updateDom: updateDomOrOptions, - defaultOptions: options, - }; -} -function collectLayoutElements(scope) { - const elements = Array.from(scope.querySelectorAll(layoutSelector)); - if (scope instanceof Element && scope.matches(layoutSelector)) { - if (!elements.includes(scope)) { - elements.unshift(scope); - } - } - return elements; -} -function readLayoutAttributes(element) { - const layoutId = element.getAttribute("data-layout-id") || undefined; - const rawLayout = element.getAttribute("data-layout"); - let layout; - if (rawLayout === "" || rawLayout === "true") { - layout = true; - } - else if (rawLayout) { - layout = rawLayout; - } - return { - layout, - layoutId, - }; -} -function createVisualState() { - return { - latestValues: {}, - renderState: { - transform: {}, - transformOrigin: {}, - style: {}, - vars: {}, - }, - }; -} -function getOrCreateRecord(element, parentProjection, projectionOptions) { - const existing = visualElementStore.get(element); - const visualElement = existing ?? - new HTMLVisualElement({ - props: {}, - presenceContext: null, - visualState: createVisualState(), - }, { allowProjection: true }); - if (!existing || !visualElement.projection) { - visualElement.projection = new HTMLProjectionNode(visualElement.latestValues, parentProjection); - } - visualElement.projection.setOptions({ - ...projectionOptions, - visualElement, - }); - if (!visualElement.current) { - visualElement.mount(element); - } - else if (!visualElement.projection.instance) { - // Mount projection if VisualElement is already mounted but projection isn't - // This happens when animate() was called before animateLayout() - visualElement.projection.mount(element); - } - if (!existing) { - visualElementStore.set(element, visualElement); - } - return { - element, - visualElement, - projection: visualElement.projection, - }; -} -function findParentRecord(element, recordMap, scope) { - let parent = element.parentElement; - while (parent) { - const record = recordMap.get(parent); - if (record) - return record; - if (parent === scope) - break; - parent = parent.parentElement; - } - return undefined; -} -function getProjectionRoot(afterRecords, beforeRecords) { - const record = afterRecords[0] || beforeRecords[0]; - return record?.projection.root; -} -function collectAnimations(afterRecords) { - const animations = new Set(); - afterRecords.forEach((record) => { - const animation = record.projection.currentAnimation; - if (animation) - animations.add(animation); - }); - return Array.from(animations); -} - -/** - * @deprecated - * - * Import as `frame` instead. - */ -const sync = frame; -/** - * @deprecated - * - * Use cancelFrame(callback) instead. - */ -const cancelSync = stepsOrder.reduce((acc, key) => { - acc[key] = (process) => cancelFrame(process); - return acc; -}, {}); - -exports.AsyncMotionValueAnimation = AsyncMotionValueAnimation; -exports.DOMKeyframesResolver = DOMKeyframesResolver; -exports.DOMVisualElement = DOMVisualElement; -exports.DocumentProjectionNode = DocumentProjectionNode; -exports.Feature = Feature; -exports.FlatTree = FlatTree; -exports.GroupAnimation = GroupAnimation; -exports.GroupAnimationWithThen = GroupAnimationWithThen; -exports.HTMLProjectionNode = HTMLProjectionNode; -exports.HTMLVisualElement = HTMLVisualElement; -exports.JSAnimation = JSAnimation; -exports.KeyframeResolver = KeyframeResolver; -exports.LayoutAnimationBuilder = LayoutAnimationBuilder; -exports.MotionValue = MotionValue; -exports.NativeAnimation = NativeAnimation; -exports.NativeAnimationExtended = NativeAnimationExtended; -exports.NativeAnimationWrapper = NativeAnimationWrapper; -exports.NodeStack = NodeStack; -exports.ObjectVisualElement = ObjectVisualElement; -exports.SVGVisualElement = SVGVisualElement; -exports.ViewTransitionBuilder = ViewTransitionBuilder; -exports.VisualElement = VisualElement; -exports.acceleratedValues = acceleratedValues; -exports.activeAnimations = activeAnimations; -exports.addAttrValue = addAttrValue; -exports.addDomEvent = addDomEvent; -exports.addScaleCorrector = addScaleCorrector; -exports.addStyleValue = addStyleValue; -exports.addValueToWillChange = addValueToWillChange; -exports.alpha = alpha; -exports.analyseComplexValue = analyseComplexValue; -exports.animateMotionValue = animateMotionValue; -exports.animateSingleValue = animateSingleValue; -exports.animateTarget = animateTarget; -exports.animateValue = animateValue; -exports.animateVariant = animateVariant; -exports.animateView = animateView; -exports.animateVisualElement = animateVisualElement; -exports.animationMapKey = animationMapKey; -exports.applyAxisDelta = applyAxisDelta; -exports.applyBoxDelta = applyBoxDelta; -exports.applyGeneratorOptions = applyGeneratorOptions; -exports.applyPointDelta = applyPointDelta; -exports.applyPxDefaults = applyPxDefaults; -exports.applyTreeDeltas = applyTreeDeltas; -exports.arc = arc; -exports.aspectRatio = aspectRatio; -exports.attachFollow = attachFollow; -exports.attachSpring = attachSpring; -exports.attrEffect = attrEffect; -exports.axisDeltaEquals = axisDeltaEquals; -exports.axisEquals = axisEquals; -exports.axisEqualsRounded = axisEqualsRounded; -exports.boxEquals = boxEquals; -exports.boxEqualsRounded = boxEqualsRounded; -exports.buildHTMLStyles = buildHTMLStyles; -exports.buildProjectionTransform = buildProjectionTransform; -exports.buildSVGAttrs = buildSVGAttrs; -exports.buildSVGPath = buildSVGPath; -exports.buildTransform = buildTransform; -exports.calcAxisDelta = calcAxisDelta; -exports.calcBoxDelta = calcBoxDelta; -exports.calcChildStagger = calcChildStagger; -exports.calcGeneratorDuration = calcGeneratorDuration; -exports.calcLength = calcLength; -exports.calcRelativeAxis = calcRelativeAxis; -exports.calcRelativeAxisPosition = calcRelativeAxisPosition; -exports.calcRelativeBox = calcRelativeBox; -exports.calcRelativePosition = calcRelativePosition; -exports.camelCaseAttributes = camelCaseAttributes; -exports.camelToDash = camelToDash; -exports.cancelFrame = cancelFrame; -exports.cancelMicrotask = cancelMicrotask; -exports.cancelSync = cancelSync; -exports.checkVariantsDidChange = checkVariantsDidChange; -exports.cleanDirtyNodes = cleanDirtyNodes; -exports.collectMotionValues = collectMotionValues; -exports.color = color; -exports.compareByDepth = compareByDepth; -exports.complex = complex; -exports.containsCSSVariable = containsCSSVariable; -exports.convertBoundingBoxToBox = convertBoundingBoxToBox; -exports.convertBoxToBoundingBox = convertBoxToBoundingBox; -exports.convertOffsetToTimes = convertOffsetToTimes; -exports.copyAxisDeltaInto = copyAxisDeltaInto; -exports.copyAxisInto = copyAxisInto; -exports.copyBoxInto = copyBoxInto; -exports.correctBorderRadius = correctBorderRadius; -exports.correctBoxShadow = correctBoxShadow; -exports.createAnimationState = createAnimationState; -exports.createAxis = createAxis; -exports.createAxisDelta = createAxisDelta; -exports.createBox = createBox; -exports.createDelta = createDelta; -exports.createGeneratorEasing = createGeneratorEasing; -exports.createProjectionNode = createProjectionNode; -exports.createRenderBatcher = createRenderBatcher; -exports.cubicBezierAsString = cubicBezierAsString; -exports.defaultEasing = defaultEasing; -exports.defaultOffset = defaultOffset; -exports.defaultTransformValue = defaultTransformValue; -exports.defaultValueTypes = defaultValueTypes; -exports.degrees = degrees; -exports.delay = delay; -exports.delayInSeconds = delayInSeconds; -exports.dimensionValueTypes = dimensionValueTypes; -exports.eachAxis = eachAxis; -exports.fillOffset = fillOffset; -exports.fillWildcards = fillWildcards; -exports.findDimensionValueType = findDimensionValueType; -exports.findValueType = findValueType; -exports.flushKeyframeResolvers = flushKeyframeResolvers; -exports.followValue = followValue; -exports.frame = frame; -exports.frameData = frameData; -exports.frameSteps = frameSteps; -exports.generateLinearEasing = generateLinearEasing; -exports.getAnimatableNone = getAnimatableNone; -exports.getAnimationMap = getAnimationMap; -exports.getComputedStyle = getComputedStyle$2; -exports.getDefaultTransition = getDefaultTransition; -exports.getDefaultValueType = getDefaultValueType; -exports.getFeatureDefinitions = getFeatureDefinitions; -exports.getFinalKeyframe = getFinalKeyframe; -exports.getMixer = getMixer; -exports.getOptimisedAppearId = getOptimisedAppearId; -exports.getOriginIndex = getOriginIndex; -exports.getValueAsType = getValueAsType; -exports.getValueTransition = getValueTransition; -exports.getVariableValue = getVariableValue; -exports.getVariantContext = getVariantContext; -exports.getViewAnimationLayerInfo = getViewAnimationLayerInfo; -exports.getViewAnimations = getViewAnimations; -exports.globalProjectionState = globalProjectionState; -exports.has2DTranslate = has2DTranslate; -exports.hasReducedMotionListener = hasReducedMotionListener; -exports.hasScale = hasScale; -exports.hasTransform = hasTransform; -exports.hex = hex; -exports.hover = hover; -exports.hsla = hsla; -exports.hslaToRgba = hslaToRgba; -exports.inertia = inertia; -exports.initPrefersReducedMotion = initPrefersReducedMotion; -exports.interpolate = interpolate; -exports.invisibleValues = invisibleValues; -exports.isAnimationControls = isAnimationControls; -exports.isCSSVariableName = isCSSVariableName; -exports.isCSSVariableToken = isCSSVariableToken; -exports.isControllingVariants = isControllingVariants; -exports.isDeltaZero = isDeltaZero; -exports.isDragActive = isDragActive; -exports.isDragging = isDragging; -exports.isElementKeyboardAccessible = isElementKeyboardAccessible; -exports.isElementTextInput = isElementTextInput; -exports.isForcedMotionValue = isForcedMotionValue; -exports.isGenerator = isGenerator; -exports.isHTMLElement = isHTMLElement; -exports.isKeyframesTarget = isKeyframesTarget; -exports.isMotionValue = isMotionValue; -exports.isNear = isNear; -exports.isNodeOrChild = isNodeOrChild; -exports.isPrimaryPointer = isPrimaryPointer; -exports.isSVGElement = isSVGElement; -exports.isSVGSVGElement = isSVGSVGElement; -exports.isSVGTag = isSVGTag; -exports.isTransitionDefined = isTransitionDefined; -exports.isVariantLabel = isVariantLabel; -exports.isVariantNode = isVariantNode; -exports.isWaapiSupportedEasing = isWaapiSupportedEasing; -exports.isWillChangeMotionValue = isWillChangeMotionValue; -exports.keyframes = keyframes; -exports.makeAnimationInstant = makeAnimationInstant; -exports.mapEasingToNativeEasing = mapEasingToNativeEasing; -exports.mapValue = mapValue; -exports.maxGeneratorDuration = maxGeneratorDuration; -exports.measurePageBox = measurePageBox; -exports.measureViewportBox = measureViewportBox; -exports.microtask = microtask; -exports.mix = mix; -exports.mixArray = mixArray; -exports.mixColor = mixColor; -exports.mixComplex = mixComplex; -exports.mixImmediate = mixImmediate; -exports.mixLinearColor = mixLinearColor; -exports.mixNumber = mixNumber$1; -exports.mixObject = mixObject; -exports.mixValues = mixValues; -exports.mixVisibility = mixVisibility; -exports.motionValue = motionValue; -exports.nodeGroup = nodeGroup; -exports.number = number; -exports.numberValueTypes = numberValueTypes; -exports.observeTimeline = observeTimeline; -exports.optimizedAppearDataAttribute = optimizedAppearDataAttribute; -exports.optimizedAppearDataId = optimizedAppearDataId; -exports.parseAnimateLayoutArgs = parseAnimateLayoutArgs; -exports.parseCSSVariable = parseCSSVariable; -exports.parseValueFromTransform = parseValueFromTransform; -exports.percent = percent; -exports.pixelsToPercent = pixelsToPercent; -exports.positionalKeys = positionalKeys; -exports.prefersReducedMotion = prefersReducedMotion; -exports.press = press; -exports.progressPercentage = progressPercentage; -exports.propEffect = propEffect; -exports.propagateDirtyNodes = propagateDirtyNodes; -exports.px = px; -exports.readTransformValue = readTransformValue; -exports.recordStats = recordStats; -exports.removeAxisDelta = removeAxisDelta; -exports.removeAxisTransforms = removeAxisTransforms; -exports.removeBoxTransforms = removeBoxTransforms; -exports.removePointDelta = removePointDelta; -exports.renderHTML = renderHTML; -exports.renderSVG = renderSVG; -exports.resize = resize; -exports.resolveElements = resolveElements; -exports.resolveMotionValue = resolveMotionValue; -exports.resolveTransition = resolveTransition; -exports.resolveVariant = resolveVariant; -exports.resolveVariantFromProps = resolveVariantFromProps; -exports.rgbUnit = rgbUnit; -exports.rgba = rgba; -exports.rootProjectionNode = rootProjectionNode; -exports.scale = scale; -exports.scaleCorrectors = scaleCorrectors; -exports.scalePoint = scalePoint; -exports.scrapeHTMLMotionValuesFromProps = scrapeMotionValuesFromProps$1; -exports.scrapeSVGMotionValuesFromProps = scrapeMotionValuesFromProps; -exports.setDragLock = setDragLock; -exports.setFeatureDefinitions = setFeatureDefinitions; -exports.setStyle = setStyle; -exports.setTarget = setTarget; -exports.spring = spring; -exports.springValue = springValue; -exports.stagger = stagger; -exports.startWaapiAnimation = startWaapiAnimation; -exports.statsBuffer = statsBuffer; -exports.styleEffect = styleEffect; -exports.supportedWaapiEasing = supportedWaapiEasing; -exports.supportsBrowserAnimation = supportsBrowserAnimation; -exports.supportsFlags = supportsFlags; -exports.supportsLinearEasing = supportsLinearEasing; -exports.supportsPartialKeyframes = supportsPartialKeyframes; -exports.supportsScrollTimeline = supportsScrollTimeline; -exports.supportsViewTimeline = supportsViewTimeline; -exports.svgEffect = svgEffect; -exports.sync = sync; -exports.testValueType = testValueType; -exports.time = time; -exports.transform = transform; -exports.transformAxis = transformAxis; -exports.transformBox = transformBox; -exports.transformBoxPoints = transformBoxPoints; -exports.transformPropOrder = transformPropOrder; -exports.transformProps = transformProps; -exports.transformValue = transformValue; -exports.transformValueTypes = transformValueTypes; -exports.translateAxis = translateAxis; -exports.updateMotionValuesFromProps = updateMotionValuesFromProps; -exports.variantPriorityOrder = variantPriorityOrder; -exports.variantProps = variantProps; -exports.vh = vh; -exports.visualElementStore = visualElementStore; -exports.vw = vw; -//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/cjs/index.js.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/cjs/index.js.map deleted file mode 100644 index 406cf550..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/cjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../../src/frameloop/order.ts","../../src/stats/buffer.ts","../../src/frameloop/render-step.ts","../../src/frameloop/batcher.ts","../../src/frameloop/frame.ts","../../src/frameloop/sync-time.ts","../../src/stats/animation-count.ts","../../src/animation/utils/is-css-variable.ts","../../src/value/types/numbers/index.ts","../../src/value/types/utils/sanitize.ts","../../src/value/types/utils/float-regex.ts","../../src/value/types/utils/is-nullish.ts","../../src/value/types/utils/single-color-regex.ts","../../src/value/types/color/utils.ts","../../src/value/types/color/rgba.ts","../../src/value/types/color/hex.ts","../../src/value/types/numbers/units.ts","../../src/value/types/color/hsla.ts","../../src/value/types/color/index.ts","../../src/value/types/utils/color-regex.ts","../../src/value/types/complex/index.ts","../../src/value/types/color/hsla-to-rgba.ts","../../src/utils/mix/immediate.ts","../../src/utils/mix/number.ts","../../src/utils/mix/color.ts","../../src/utils/mix/visibility.ts","../../src/utils/mix/complex.ts","../../src/utils/mix/index.ts","../../src/animation/drivers/frame.ts","../../src/animation/waapi/utils/linear.ts","../../src/animation/generators/utils/calc-duration.ts","../../src/animation/generators/utils/create-generator-easing.ts","../../src/animation/generators/spring.ts","../../src/animation/generators/utils/velocity.ts","../../src/animation/generators/inertia.ts","../../src/utils/interpolate.ts","../../src/animation/keyframes/offsets/fill.ts","../../src/animation/keyframes/offsets/default.ts","../../src/animation/keyframes/offsets/time.ts","../../src/animation/generators/keyframes.ts","../../src/animation/keyframes/get-final.ts","../../src/animation/utils/replace-transition-type.ts","../../src/animation/utils/WithPromise.ts","../../src/animation/JSAnimation.ts","../../src/animation/keyframes/utils/fill-wildcards.ts","../../src/render/dom/parse-transform.ts","../../src/render/utils/keys-transform.ts","../../src/animation/keyframes/utils/unit-conversion.ts","../../src/animation/keyframes/KeyframesResolver.ts","../../src/render/dom/is-css-var.ts","../../src/render/dom/style-set.ts","../../src/utils/supports/flags.ts","../../src/utils/supports/memo.ts","../../src/utils/supports/scroll-timeline.ts","../../src/utils/supports/linear-easing.ts","../../src/animation/waapi/easing/cubic-bezier.ts","../../src/animation/waapi/easing/supported.ts","../../src/animation/waapi/easing/map-easing.ts","../../src/animation/waapi/start-waapi-animation.ts","../../src/animation/generators/utils/is-generator.ts","../../src/animation/waapi/utils/apply-generator.ts","../../src/animation/NativeAnimation.ts","../../src/animation/waapi/utils/unsupported-easing.ts","../../src/animation/NativeAnimationExtended.ts","../../src/animation/utils/is-animatable.ts","../../src/animation/utils/can-animate.ts","../../src/animation/utils/make-animation-instant.ts","../../src/animation/waapi/utils/accelerated-values.ts","../../src/animation/waapi/utils/is-browser-color.ts","../../src/animation/waapi/supports/waapi.ts","../../src/animation/AsyncMotionValueAnimation.ts","../../src/animation/GroupAnimation.ts","../../src/animation/GroupAnimationWithThen.ts","../../src/animation/NativeAnimationWrapper.ts","../../src/animation/utils/active-animations.ts","../../src/animation/utils/calc-child-stagger.ts","../../src/value/index.ts","../../src/animation/utils/resolve-transition.ts","../../src/animation/utils/get-value-transition.ts","../../src/animation/utils/default-transitions.ts","../../src/animation/utils/is-transition-defined.ts","../../src/animation/interfaces/motion-value.ts","../../src/animation/utils/arc.ts","../../src/animation/utils/css-variables-conversion.ts","../../src/render/utils/resolve-variants.ts","../../src/render/utils/resolve-dynamic-variants.ts","../../src/render/utils/keys-position.ts","../../src/render/utils/is-keyframes-target.ts","../../src/render/utils/setters.ts","../../src/value/utils/is-motion-value.ts","../../src/value/will-change/is.ts","../../src/value/will-change/add-will-change.ts","../../src/render/dom/utils/camel-to-dash.ts","../../src/animation/optimized-appear/data-id.ts","../../src/animation/optimized-appear/get-appear-id.ts","../../src/animation/interfaces/visual-element-target.ts","../../src/animation/interfaces/visual-element-variant.ts","../../src/animation/interfaces/visual-element.ts","../../src/value/types/auto.ts","../../src/value/types/test.ts","../../src/value/types/dimensions.ts","../../src/animation/keyframes/utils/is-none.ts","../../src/value/types/complex/filter.ts","../../src/value/types/complex/mask.ts","../../src/value/types/int.ts","../../src/value/types/maps/transform.ts","../../src/value/types/maps/number.ts","../../src/value/types/maps/defaults.ts","../../src/value/types/utils/animatable-none.ts","../../src/animation/keyframes/utils/make-none-animatable.ts","../../src/animation/keyframes/DOMKeyframesResolver.ts","../../src/animation/waapi/utils/px-values.ts","../../src/animation/keyframes/utils/apply-px-defaults.ts","../../src/animation/waapi/easing/is-supported.ts","../../src/animation/waapi/supports/partial-keyframes.ts","../../src/utils/resolve-elements.ts","../../src/effects/utils/create-dom-effect.ts","../../src/value/types/utils/get-as-type.ts","../../src/effects/MotionValueState.ts","../../src/effects/utils/create-effect.ts","../../src/effects/attr/index.ts","../../src/effects/prop/index.ts","../../src/utils/is-html-element.ts","../../src/effects/style/transform.ts","../../src/effects/style/index.ts","../../src/effects/svg/index.ts","../../src/frameloop/microtask.ts","../../src/gestures/drag/state/is-active.ts","../../src/gestures/drag/state/set-active.ts","../../src/gestures/utils/setup.ts","../../src/gestures/hover.ts","../../src/gestures/utils/is-node-or-child.ts","../../src/gestures/utils/is-primary-pointer.ts","../../src/gestures/press/utils/is-keyboard-accessible.ts","../../src/gestures/press/utils/state.ts","../../src/gestures/press/utils/keyboard.ts","../../src/gestures/press/index.ts","../../src/render/dom/style-computed.ts","../../src/utils/is-svg-element.ts","../../src/resize/handle-element.ts","../../src/resize/handle-window.ts","../../src/resize/index.ts","../../src/scroll/observe.ts","../../src/stats/index.ts","../../src/utils/is-svg-svg-element.ts","../../src/utils/stagger.ts","../../src/utils/transform.ts","../../src/value/follow-value.ts","../../src/value/subscribe-value.ts","../../src/value/transform-value.ts","../../src/value/map-value.ts","../../src/value/spring-value.ts","../../src/value/types/utils/find.ts","../../src/view/utils/choose-layer-type.ts","../../src/view/utils/css.ts","../../src/view/utils/get-layer-info.ts","../../src/view/utils/get-view-animations.ts","../../src/view/utils/has-target.ts","../../src/view/start.ts","../../src/view/queue.ts","../../src/view/index.ts","../../src/projection/geometry/models.ts","../../src/render/store.ts","../../src/render/utils/is-animation-controls.ts","../../src/render/utils/is-variant-label.ts","../../src/render/utils/variant-props.ts","../../src/render/utils/is-controlling-variants.ts","../../src/render/utils/motion-values.ts","../../src/render/utils/reduced-motion/state.ts","../../src/render/utils/reduced-motion/index.ts","../../src/render/VisualElement.ts","../../src/render/dom/DOMVisualElement.ts","../../src/render/Feature.ts","../../src/projection/geometry/conversion.ts","../../src/projection/utils/has-transform.ts","../../src/projection/geometry/delta-apply.ts","../../src/projection/utils/measure.ts","../../src/render/html/utils/build-transform.ts","../../src/render/html/utils/build-styles.ts","../../src/render/html/utils/render.ts","../../src/projection/styles/scale-border-radius.ts","../../src/projection/styles/scale-box-shadow.ts","../../src/projection/styles/scale-correction.ts","../../src/render/utils/is-forced-motion-value.ts","../../src/render/html/utils/scrape-motion-values.ts","../../src/render/html/HTMLVisualElement.ts","../../src/render/object/ObjectVisualElement.ts","../../src/render/svg/utils/path.ts","../../src/render/svg/utils/build-attrs.ts","../../src/render/svg/utils/camel-case-attrs.ts","../../src/render/svg/utils/is-svg-tag.ts","../../src/render/svg/utils/render.ts","../../src/render/svg/utils/scrape-motion-values.ts","../../src/render/svg/SVGVisualElement.ts","../../src/render/utils/get-variant-context.ts","../../src/render/utils/shallow-compare.ts","../../src/render/utils/animation-state.ts","../../src/projection/geometry/copy.ts","../../src/projection/geometry/delta-calc.ts","../../src/projection/geometry/delta-remove.ts","../../src/projection/geometry/utils.ts","../../src/projection/utils/each-axis.ts","../../src/projection/styles/transform.ts","../../src/projection/animation/mix-values.ts","../../src/animation/animate/single-value.ts","../../src/events/add-dom-event.ts","../../src/projection/utils/compare-by-depth.ts","../../src/projection/utils/flat-tree.ts","../../src/utils/delay.ts","../../src/value/utils/resolve-motion-value.ts","../../src/projection/shared/stack.ts","../../src/projection/node/state.ts","../../src/projection/node/create-projection-node.ts","../../src/projection/node/DocumentProjectionNode.ts","../../src/projection/node/group.ts","../../src/projection/node/HTMLProjectionNode.ts","../../src/layout/LayoutAnimationBuilder.ts","../../src/frameloop/index-legacy.ts"],"sourcesContent":["import { StepId } from \"./types\"\n\nexport const stepsOrder: StepId[] = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n] as const\n\nexport type StepNames = (typeof stepsOrder)[number]\n","import type { StatsRecording } from \"./types\"\n\nexport type InactiveStatsBuffer = {\n value: null\n addProjectionMetrics: null\n}\n\nexport type ActiveStatsBuffer = {\n value: StatsRecording\n addProjectionMetrics: (metrics: {\n nodes: number\n calculatedTargetDeltas: number\n calculatedProjections: number\n }) => void\n}\n\nexport const statsBuffer: InactiveStatsBuffer | ActiveStatsBuffer = {\n value: null,\n addProjectionMetrics: null,\n}\n","import { statsBuffer } from \"../stats/buffer\"\nimport { StepNames } from \"./order\"\nimport { FrameData, Process, Step } from \"./types\"\n\nexport function createRenderStep(\n runNextFrame: () => void,\n stepName?: StepNames\n): Step {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set()\n let nextFrame = new Set()\n\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false\n\n let flushNextFrame = false\n\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet()\n\n let latestFrameData: FrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n }\n\n let numCalls = 0\n\n function triggerCallback(callback: Process) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback)\n runNextFrame()\n }\n\n numCalls++\n callback(latestFrameData)\n }\n\n const step: Step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing\n const queue = addToCurrentFrame ? thisFrame : nextFrame\n\n if (keepAlive) toKeepAlive.add(callback)\n\n queue.add(callback)\n\n return callback\n },\n\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback)\n toKeepAlive.delete(callback)\n },\n\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData\n\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true\n return\n }\n\n isProcessing = true\n\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame\n thisFrame = nextFrame\n nextFrame = prevFrame\n\n // Execute this frame\n thisFrame.forEach(triggerCallback)\n\n /**\n * If we're recording stats then\n */\n if (stepName && statsBuffer.value) {\n statsBuffer.value.frameloop[stepName].push(numCalls)\n }\n numCalls = 0\n\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear()\n\n isProcessing = false\n\n if (flushNextFrame) {\n flushNextFrame = false\n step.process(frameData)\n }\n },\n }\n\n return step\n}\n","import { MotionGlobalConfig } from \"motion-utils\"\nimport { stepsOrder } from \"./order\"\nimport { createRenderStep } from \"./render-step\"\nimport { Batcher, FrameData, Process, Steps } from \"./types\"\n\nconst maxElapsed = 40\n\nexport function createRenderBatcher(\n scheduleNextBatch: (callback: Function) => void,\n allowKeepAlive: boolean\n) {\n let runNextFrame = false\n let useDefaultElapsed = true\n\n const state: FrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n }\n\n const flagRunNextFrame = () => (runNextFrame = true)\n\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(\n flagRunNextFrame,\n allowKeepAlive ? key : undefined\n )\n return acc\n }, {} as Steps)\n\n const {\n setup,\n read,\n resolveKeyframes,\n preUpdate,\n update,\n preRender,\n render,\n postRender,\n } = steps\n\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now()\n runNextFrame = false\n\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1)\n }\n\n state.timestamp = timestamp\n state.isProcessing = true\n\n // Unrolled render loop for better per-frame performance\n setup.process(state)\n read.process(state)\n resolveKeyframes.process(state)\n preUpdate.process(state)\n update.process(state)\n preRender.process(state)\n render.process(state)\n postRender.process(state)\n\n state.isProcessing = false\n\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false\n scheduleNextBatch(processBatch)\n }\n }\n\n const wake = () => {\n runNextFrame = true\n useDefaultElapsed = true\n\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch)\n }\n }\n\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key]\n acc[key] = (process: Process, keepAlive = false, immediate = false) => {\n if (!runNextFrame) wake()\n\n return step.schedule(process, keepAlive, immediate)\n }\n return acc\n }, {} as Batcher)\n\n const cancel = (process: Process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process)\n }\n }\n\n return { schedule, cancel, state, steps }\n}\n","import { noop } from \"motion-utils\"\nimport { createRenderBatcher } from \"./batcher\"\n\nexport const {\n schedule: frame,\n cancel: cancelFrame,\n state: frameData,\n steps: frameSteps,\n} = /* @__PURE__ */ createRenderBatcher(\n typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop,\n true\n)\n","import { MotionGlobalConfig } from \"motion-utils\"\nimport { frameData } from \"./frame\"\n\nlet now: number | undefined\n\nfunction clearTime() {\n now = undefined\n}\n\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nexport const time = {\n now: (): number => {\n if (now === undefined) {\n time.set(\n frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now()\n )\n }\n\n return now!\n },\n set: (newTime: number) => {\n now = newTime\n queueMicrotask(clearTime)\n },\n}\n","export const activeAnimations = {\n layout: 0,\n mainThread: 0,\n waapi: 0,\n}\n","import { AnyResolvedKeyframe } from \"../types\"\n\nexport type CSSVariableName = `--${string}`\n\nexport type CSSVariableToken = `var(${CSSVariableName})`\n\nconst checkStringStartsWith =\n (token: string) =>\n (key?: AnyResolvedKeyframe | null): key is T =>\n typeof key === \"string\" && key.startsWith(token)\n\nexport const isCSSVariableName =\n /*@__PURE__*/ checkStringStartsWith(\"--\")\n\nconst startsAsVariableToken =\n /*@__PURE__*/ checkStringStartsWith(\"var(--\")\nexport const isCSSVariableToken = (\n value?: string\n): value is CSSVariableToken => {\n const startsWithToken = startsAsVariableToken(value)\n\n if (!startsWithToken) return false\n\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim())\n}\n\nconst singleCssVariableRegex =\n /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu\n\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nexport function containsCSSVariable(\n value?: AnyResolvedKeyframe | null\n): boolean {\n if (typeof value !== \"string\") return false\n // Strip comments to avoid false positives\n return value.split(\"/*\")[0].includes(\"var(--\")\n}\n","import { clamp } from \"motion-utils\"\n\nexport const number = {\n test: (v: number) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v: number) => v,\n}\n\nexport const alpha = {\n ...number,\n transform: (v: number) => clamp(0, 1, v),\n}\n\nexport const scale = {\n ...number,\n default: 1,\n}\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nexport const sanitize = (v: number) => Math.round(v * 100000) / 100000\n","export const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu\n","export function isNullish(v: any): v is null | undefined {\n return v == null\n}\n","export const singleColorRegex =\n /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu\n","import { Color, HSLA, RGBA } from \"../types\"\nimport { floatRegex } from \"../utils/float-regex\"\nimport { isNullish } from \"../utils/is-nullish\"\nimport { singleColorRegex } from \"../utils/single-color-regex\"\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nexport const isColorString = (type: string, testProp?: string) => (v: any) => {\n return Boolean(\n (typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp))\n )\n}\n\nexport const splitColor =\n (aName: string, bName: string, cName: string) =>\n (v: string | Color): V => {\n if (typeof v !== \"string\") return v as any\n\n const [a, b, c, alpha] = v.match(floatRegex) as any\n\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n } as V\n }\n","import { clamp } from \"motion-utils\"\nimport { alpha as alphaType, number } from \"../numbers\"\nimport { RGBA } from \"../types\"\nimport { sanitize } from \"../utils/sanitize\"\nimport { isColorString, splitColor } from \"./utils\"\n\nconst clampRgbUnit = (v: number) => clamp(0, 255, v)\nexport const rgbUnit = {\n ...number,\n transform: (v: number) => Math.round(clampRgbUnit(v)),\n}\n\nexport const rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha = 1 }: RGBA) =>\n \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alphaType.transform(alpha)) +\n \")\",\n}\n","import { RGBA } from \"../types\"\nimport { rgba } from \"./rgba\"\nimport { isColorString } from \"./utils\"\n\nfunction parseHex(v: string): RGBA {\n let r = \"\"\n let g = \"\"\n let b = \"\"\n let a = \"\"\n\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3)\n g = v.substring(3, 5)\n b = v.substring(5, 7)\n a = v.substring(7, 9)\n\n // Or we have 3 characters, ie #F00\n } else {\n r = v.substring(1, 2)\n g = v.substring(2, 3)\n b = v.substring(3, 4)\n a = v.substring(4, 5)\n r += r\n g += g\n b += b\n a += a\n }\n\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n }\n}\n\nexport const hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n}\n","import { AnyResolvedKeyframe } from \"../../../animation/types\"\n\n/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit: string) => ({\n test: (v: AnyResolvedKeyframe) =>\n typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v: number | string) => `${v}${unit}`,\n})\n\nexport const degrees = /*@__PURE__*/ createUnitType(\"deg\")\nexport const percent = /*@__PURE__*/ createUnitType(\"%\")\nexport const px = /*@__PURE__*/ createUnitType(\"px\")\nexport const vh = /*@__PURE__*/ createUnitType(\"vh\")\nexport const vw = /*@__PURE__*/ createUnitType(\"vw\")\n\nexport const progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v: string) => percent.parse(v) / 100,\n transform: (v: number) => percent.transform(v * 100),\n}))()\n","import { alpha as alphaType } from \"../numbers\"\nimport { percent } from \"../numbers/units\"\nimport { HSLA } from \"../types\"\nimport { sanitize } from \"../utils/sanitize\"\nimport { isColorString, splitColor } from \"./utils\"\n\nexport const hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha = 1 }: HSLA) => {\n return (\n \"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alphaType.transform(alpha)) +\n \")\"\n )\n },\n}\n","import { HSLA, RGBA } from \"../types\"\nimport { hex } from \"./hex\"\nimport { hsla } from \"./hsla\"\nimport { rgba } from \"./rgba\"\n\nexport const color = {\n test: (v: any) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v: any): RGBA | HSLA => {\n if (rgba.test(v)) {\n return rgba.parse(v)\n } else if (hsla.test(v)) {\n return hsla.parse(v)\n } else {\n return hex.parse(v)\n }\n },\n transform: (v: HSLA | RGBA | string) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v as RGBA)\n : hsla.transform(v as HSLA)\n },\n getAnimatableNone: (v: string) => {\n const parsed = color.parse(v)\n parsed.alpha = 0\n return color.transform(parsed)\n },\n}\n","export const colorRegex =\n /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu\n","import { AnyResolvedKeyframe } from \"../../../animation/types\"\nimport { CSSVariableToken } from \"../../../animation/utils/is-css-variable\"\nimport { color } from \"../color\"\nimport { Color } from \"../types\"\nimport { colorRegex } from \"../utils/color-regex\"\nimport { floatRegex } from \"../utils/float-regex\"\nimport { sanitize } from \"../utils/sanitize\"\n\nfunction test(v: any) {\n return (\n isNaN(v) &&\n typeof v === \"string\" &&\n (v.match(floatRegex)?.length || 0) +\n (v.match(colorRegex)?.length || 0) >\n 0\n )\n}\n\nconst NUMBER_TOKEN = \"number\"\nconst COLOR_TOKEN = \"color\"\nconst VAR_TOKEN = \"var\"\nconst VAR_FUNCTION_TOKEN = \"var(\"\nconst SPLIT_TOKEN = \"${}\"\n\nexport type ComplexValues = Array<\n CSSVariableToken | AnyResolvedKeyframe | Color\n>\n\nexport interface ValueIndexes {\n color: number[]\n number: number[]\n var: number[]\n}\n\nexport interface ComplexValueInfo {\n values: ComplexValues\n split: string[]\n indexes: ValueIndexes\n types: Array\n}\n\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex =\n /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu\n\nexport function analyseComplexValue(\n value: AnyResolvedKeyframe\n): ComplexValueInfo {\n const originalValue = value.toString()\n\n const values: ComplexValues = []\n const indexes: ValueIndexes = {\n color: [],\n number: [],\n var: [],\n }\n const types: Array = []\n\n let i = 0\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i)\n types.push(COLOR_TOKEN)\n values.push(color.parse(parsedValue))\n } else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i)\n types.push(VAR_TOKEN)\n values.push(parsedValue)\n } else {\n indexes.number.push(i)\n types.push(NUMBER_TOKEN)\n values.push(parseFloat(parsedValue))\n }\n ++i\n return SPLIT_TOKEN\n })\n const split = tokenised.split(SPLIT_TOKEN)\n\n return { values, split, indexes, types }\n}\n\nfunction parseComplexValue(v: AnyResolvedKeyframe) {\n return analyseComplexValue(v).values\n}\n\nfunction buildTransformer({ split, types }: ComplexValueInfo) {\n const numSections = split.length\n return (v: Array) => {\n let output = \"\"\n for (let i = 0; i < numSections; i++) {\n output += split[i]\n if (v[i] !== undefined) {\n const type = types[i]\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i] as number)\n } else if (type === COLOR_TOKEN) {\n output += color.transform(v[i] as Color)\n } else {\n output += v[i]\n }\n }\n }\n\n return output\n }\n}\n\nfunction createTransformer(source: AnyResolvedKeyframe) {\n return buildTransformer(analyseComplexValue(source))\n}\n\nconst convertNumbersToZero = (v: number | string) =>\n typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v\n\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (\n value: ComplexValues[number],\n splitBefore: string\n): ComplexValues[number] => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0\n }\n return convertNumbersToZero(value as string)\n}\n\nfunction getAnimatableNone(v: AnyResolvedKeyframe) {\n const info = analyseComplexValue(v)\n const transformer = buildTransformer(info)\n return transformer(\n info.values.map((value, i) => convertToZero(value, info.split[i]))\n )\n}\n\nexport const complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n}\n","import { HSLA, RGBA } from \"../types\"\n\n// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p: number, q: number, t: number) {\n if (t < 0) t += 1\n if (t > 1) t -= 1\n if (t < 1 / 6) return p + (q - p) * 6 * t\n if (t < 1 / 2) return q\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6\n return p\n}\n\nexport function hslaToRgba({ hue, saturation, lightness, alpha }: HSLA): RGBA {\n hue /= 360\n saturation /= 100\n lightness /= 100\n\n let red = 0\n let green = 0\n let blue = 0\n\n if (!saturation) {\n red = green = blue = lightness\n } else {\n const q =\n lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation\n const p = 2 * lightness - q\n\n red = hueToRgb(p, q, hue + 1 / 3)\n green = hueToRgb(p, q, hue)\n blue = hueToRgb(p, q, hue - 1 / 3)\n }\n\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n }\n}\n","export function mixImmediate(a: T, b: T) {\n return (p: number) => (p > 0 ? b : a)\n}\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nexport const mixNumber = (from: number, to: number, progress: number) => {\n return from + (to - from) * progress\n}\n","import { warning } from \"motion-utils\"\nimport { hex } from \"../../value/types/color/hex\"\nimport { hsla } from \"../../value/types/color/hsla\"\nimport { hslaToRgba } from \"../../value/types/color/hsla-to-rgba\"\nimport { rgba } from \"../../value/types/color/rgba\"\nimport { Color, HSLA, RGBA } from \"../../value/types/types\"\nimport { mixImmediate } from \"./immediate\"\nimport { mixNumber } from \"./number\"\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nexport const mixLinearColor = (from: number, to: number, v: number) => {\n const fromExpo = from * from\n const expo = v * (to * to - fromExpo) + fromExpo\n return expo < 0 ? 0 : Math.sqrt(expo)\n}\n\nconst colorTypes = [hex, rgba, hsla]\nconst getColorType = (v: Color | string) =>\n colorTypes.find((type) => type.test(v))\n\nfunction asRGBA(color: Color | string) {\n const type = getColorType(color)\n\n warning(\n Boolean(type),\n `'${color}' is not an animatable color. Use the equivalent color code instead.`,\n \"color-not-animatable\"\n )\n\n if (!Boolean(type)) return false\n\n let model = type!.parse(color)\n\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model as HSLA)\n }\n\n return model as RGBA\n}\n\nexport const mixColor = (from: Color | string, to: Color | string) => {\n const fromRGBA = asRGBA(from)\n const toRGBA = asRGBA(to)\n\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to)\n }\n\n const blended = { ...fromRGBA }\n\n return (v: number) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v)\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v)\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v)\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v)\n return rgba.transform!(blended)\n }\n}\n","export const invisibleValues = new Set([\"none\", \"hidden\"])\n\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nexport function mixVisibility(origin: string, target: string) {\n if (invisibleValues.has(origin)) {\n return (p: number) => (p <= 0 ? origin : target)\n } else {\n return (p: number) => (p >= 1 ? target : origin)\n }\n}\n","import { pipe, warning } from \"motion-utils\"\nimport { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isCSSVariableToken } from \"../../animation/utils/is-css-variable\"\nimport { color } from \"../../value/types/color\"\nimport {\n analyseComplexValue,\n complex,\n ComplexValueInfo,\n ComplexValues,\n} from \"../../value/types/complex\"\nimport { HSLA, RGBA } from \"../../value/types/types\"\nimport { mixColor } from \"./color\"\nimport { mixImmediate } from \"./immediate\"\nimport { mixNumber as mixNumberImmediate } from \"./number\"\nimport { invisibleValues, mixVisibility } from \"./visibility\"\n\ntype MixableArray = Array\ninterface MixableObject {\n [key: string]: AnyResolvedKeyframe | RGBA | HSLA\n}\n\nfunction mixNumber(a: number, b: number) {\n return (p: number) => mixNumberImmediate(a, b, p)\n}\n\nexport function getMixer(a: T) {\n if (typeof a === \"number\") {\n return mixNumber\n } else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex\n } else if (Array.isArray(a)) {\n return mixArray\n } else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject\n }\n\n return mixImmediate\n}\n\nexport function mixArray(a: MixableArray, b: MixableArray) {\n const output = [...a]\n const numValues = output.length\n\n const blendValue = a.map((v, i) => getMixer(v)(v as any, b[i] as any))\n\n return (p: number) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p) as any\n }\n return output\n }\n}\n\nexport function mixObject(a: MixableObject, b: MixableObject) {\n const output = { ...a, ...b }\n const blendValue: { [key: string]: (v: number) => any } = {}\n\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(\n a[key] as any,\n b[key] as any\n ) as any\n }\n }\n\n return (v: number) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v)\n }\n return output\n }\n}\n\nfunction matchOrder(\n origin: ComplexValueInfo,\n target: ComplexValueInfo\n): ComplexValues {\n const orderedOrigin: ComplexValues = []\n\n const pointers = { color: 0, var: 0, number: 0 }\n\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i]\n const originIndex = origin.indexes[type][pointers[type]]\n const originValue = origin.values[originIndex] ?? 0\n\n orderedOrigin[i] = originValue\n\n pointers[type]++\n }\n\n return orderedOrigin\n}\n\nexport const mixComplex = (\n origin: AnyResolvedKeyframe,\n target: AnyResolvedKeyframe\n) => {\n const template = complex.createTransformer(target)\n const originStats = analyseComplexValue(origin)\n const targetStats = analyseComplexValue(target)\n const canInterpolate =\n originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length\n\n if (canInterpolate) {\n if (\n (invisibleValues.has(origin as string) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target as string) &&\n !originStats.values.length)\n ) {\n return mixVisibility(origin as string, target as string)\n }\n\n return pipe(\n mixArray(matchOrder(originStats, targetStats), targetStats.values),\n template\n )\n } else {\n warning(\n true,\n `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,\n \"complex-values-different\"\n )\n\n return mixImmediate(origin, target)\n }\n}\n","import { getMixer } from \"./complex\"\nimport { mixNumber as mixNumberImmediate } from \"./number\"\nimport { Mixer } from \"./types\"\n\nexport function mix(from: T, to: T): Mixer\nexport function mix(from: number, to: number, p: number): number\nexport function mix(from: T, to: T, p?: T): Mixer | number {\n if (\n typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\"\n ) {\n return mixNumberImmediate(from, to, p)\n }\n\n const mixer = getMixer(from)\n return mixer(from as any, to as any) as Mixer\n}\n","import { cancelFrame, frame, frameData } from \"../../frameloop\"\nimport { time } from \"../../frameloop/sync-time\"\nimport { FrameData } from \"../../frameloop/types\"\nimport { Driver } from \"./types\"\n\nexport const frameloopDriver: Driver = (update) => {\n const passTimestamp = ({ timestamp }: FrameData) => update(timestamp)\n\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n }\n}\n","import { EasingFunction } from \"motion-utils\"\n\nexport const generateLinearEasing = (\n easing: EasingFunction,\n duration: number, // as milliseconds\n resolution: number = 10 // as milliseconds\n): string => {\n let points = \"\"\n const numPoints = Math.max(Math.round(duration / resolution), 2)\n\n for (let i = 0; i < numPoints; i++) {\n points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + \", \"\n }\n\n return `linear(${points.substring(0, points.length - 2)})`\n}\n","import { KeyframeGenerator } from \"../../types\"\n\n/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nexport const maxGeneratorDuration = 20_000\nexport function calcGeneratorDuration(\n generator: KeyframeGenerator\n): number {\n let duration = 0\n const timeStep = 50\n let state = generator.next(duration)\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep\n state = generator.next(duration)\n }\n\n return duration >= maxGeneratorDuration ? Infinity : duration\n}\n","import { millisecondsToSeconds } from \"motion-utils\"\nimport { GeneratorFactory, Transition } from \"../../types\"\nimport { calcGeneratorDuration, maxGeneratorDuration } from \"./calc-duration\"\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nexport function createGeneratorEasing(\n options: Transition,\n scale = 100,\n createGenerator: GeneratorFactory\n) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] })\n const duration = Math.min(\n calcGeneratorDuration(generator),\n maxGeneratorDuration\n )\n\n return {\n type: \"keyframes\",\n ease: (progress: number) => {\n return generator.next(duration * progress).value / scale\n },\n duration: millisecondsToSeconds(duration),\n }\n}\n","import {\n clamp,\n millisecondsToSeconds,\n secondsToMilliseconds,\n warning,\n} from \"motion-utils\"\nimport {\n AnimationState,\n KeyframeGenerator,\n SpringOptions,\n Transition,\n ValueAnimationOptions,\n} from \"../types\"\nimport { generateLinearEasing } from \"../waapi/utils/linear\"\nimport {\n calcGeneratorDuration,\n maxGeneratorDuration,\n} from \"./utils/calc-duration\"\nimport { createGeneratorEasing } from \"./utils/create-generator-easing\"\n\nconst springDefaults = {\n // Default spring physics\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n velocity: 0.0,\n\n // Default duration/bounce-based options\n duration: 800, // in ms\n bounce: 0.3,\n visualDuration: 0.3, // in seconds\n\n // Rest thresholds\n restSpeed: {\n granular: 0.01,\n default: 2,\n },\n restDelta: {\n granular: 0.005,\n default: 0.5,\n },\n\n // Limits\n minDuration: 0.01, // in seconds\n maxDuration: 10.0, // in seconds\n minDamping: 0.05,\n maxDamping: 1,\n}\n\nfunction calcAngularFreq(undampedFreq: number, dampingRatio: number) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio)\n}\n\nconst rootIterations = 12\nfunction approximateRoot(\n envelope: (num: number) => number,\n derivative: (num: number) => number,\n initialGuess: number\n): number {\n let result = initialGuess\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result)\n }\n return result\n}\n\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\nconst safeMin = 0.001\n\nfunction findSpring({\n duration = springDefaults.duration,\n bounce = springDefaults.bounce,\n velocity = springDefaults.velocity,\n mass = springDefaults.mass,\n}: SpringOptions) {\n let envelope: (num: number) => number\n let derivative: (num: number) => number\n\n warning(\n duration <= secondsToMilliseconds(springDefaults.maxDuration),\n \"Spring duration must be 10 seconds or less\",\n \"spring-duration-limit\"\n )\n\n let dampingRatio = 1 - bounce\n\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(\n springDefaults.minDamping,\n springDefaults.maxDamping,\n dampingRatio\n )\n duration = clamp(\n springDefaults.minDuration,\n springDefaults.maxDuration,\n millisecondsToSeconds(duration)\n )\n\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio\n const delta = exponentialDecay * duration\n const a = exponentialDecay - velocity\n const b = calcAngularFreq(undampedFreq, dampingRatio)\n const c = Math.exp(-delta)\n return safeMin - (a / b) * c\n }\n\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio\n const delta = exponentialDecay * duration\n const d = delta * velocity + velocity\n const e =\n Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration\n const f = Math.exp(-delta)\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio)\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1\n return (factor * ((d - e) * f)) / g\n }\n } else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration)\n const b = (undampedFreq - velocity) * duration + 1\n return -safeMin + a * b\n }\n\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration)\n const b = (velocity - undampedFreq) * (duration * duration)\n return a * b\n }\n }\n\n const initialGuess = 5 / duration\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess)\n\n duration = secondsToMilliseconds(duration)\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n }\n } else {\n const stiffness = Math.pow(undampedFreq, 2) * mass\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n }\n }\n}\n\nconst durationKeys = [\"duration\", \"bounce\"]\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"]\n\nfunction isSpringType(options: SpringOptions, keys: string[]) {\n return keys.some((key) => (options as any)[key] !== undefined)\n}\n\nfunction getSpringOptions(options: SpringOptions) {\n let springOptions = {\n velocity: springDefaults.velocity,\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n mass: springDefaults.mass,\n isResolvedFromDuration: false,\n ...options,\n }\n // stiffness/damping/mass overrides duration/bounce\n if (\n !isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)\n ) {\n // Time-defined springs should ignore inherited velocity.\n // Velocity from interrupted animations can cause findSpring()\n // to compute wildly different spring parameters, leading to\n // massive oscillation on small-range animations.\n springOptions.velocity = 0\n\n if (options.visualDuration) {\n const visualDuration = options.visualDuration\n const root = (2 * Math.PI) / (visualDuration * 1.2)\n const stiffness = root * root\n const damping =\n 2 *\n clamp(0.05, 1, 1 - (options.bounce || 0)) *\n Math.sqrt(stiffness)\n\n springOptions = {\n ...springOptions,\n mass: springDefaults.mass,\n stiffness,\n damping,\n }\n } else {\n const derived = findSpring({ ...options, velocity: 0 })\n\n springOptions = {\n ...springOptions,\n ...derived,\n mass: springDefaults.mass,\n }\n springOptions.isResolvedFromDuration = true\n }\n }\n\n return springOptions\n}\n\nfunction spring(\n optionsOrVisualDuration:\n | ValueAnimationOptions\n | number = springDefaults.visualDuration,\n bounce = springDefaults.bounce\n): KeyframeGenerator {\n const options =\n typeof optionsOrVisualDuration !== \"object\"\n ? ({\n visualDuration: optionsOrVisualDuration,\n keyframes: [0, 1],\n bounce,\n } as ValueAnimationOptions)\n : optionsOrVisualDuration\n\n let { restSpeed, restDelta } = options\n\n const origin = options.keyframes[0]\n const target = options.keyframes[options.keyframes.length - 1]\n\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state: AnimationState = { done: false, value: origin }\n\n const {\n stiffness,\n damping,\n mass,\n duration,\n velocity,\n isResolvedFromDuration,\n } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n })\n\n const initialVelocity = velocity || 0.0\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass))\n\n const initialDelta = target - origin\n const undampedAngularFreq = millisecondsToSeconds(\n Math.sqrt(stiffness / mass)\n )\n\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5\n restSpeed ||= isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default\n restDelta ||= isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default\n\n let resolveSpring: (v: number) => number\n let resolveVelocity: (t: number) => number\n\n // Underdamped coefficients, hoisted for use in the inlined next() hot path\n let angularFreq: number\n let A: number\n let sinCoeff: number\n let cosCoeff: number\n\n if (dampingRatio < 1) {\n angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio)\n\n A =\n (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq\n\n // Underdamped spring\n resolveSpring = (t: number) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n\n return (\n target -\n envelope *\n (A * Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t))\n )\n }\n\n // Analytical derivative of underdamped spring (px/ms)\n sinCoeff =\n dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq\n cosCoeff =\n dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq\n resolveVelocity = (t: number) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n return envelope *\n (sinCoeff * Math.sin(angularFreq * t) +\n cosCoeff * Math.cos(angularFreq * t))\n }\n } else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t: number) =>\n target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t)\n\n // Analytical derivative of critically damped spring (px/ms)\n const C = initialVelocity + undampedAngularFreq * initialDelta\n resolveVelocity = (t: number) =>\n Math.exp(-undampedAngularFreq * t) *\n (undampedAngularFreq * C * t - initialVelocity)\n } else {\n // Overdamped spring\n const dampedAngularFreq =\n undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1)\n\n resolveSpring = (t: number) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300)\n\n return (\n target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq\n )\n }\n\n // Analytical derivative of overdamped spring (px/ms)\n const P =\n (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n dampedAngularFreq\n const sinhCoeff =\n dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq\n const coshCoeff =\n dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq\n resolveVelocity = (t: number) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n const freqForT = Math.min(dampedAngularFreq * t, 300)\n return envelope *\n (sinhCoeff * Math.sinh(freqForT) +\n coshCoeff * Math.cosh(freqForT))\n }\n }\n\n const generator = {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n velocity: (t: number) => secondsToMilliseconds(resolveVelocity(t)),\n next: (t: number) => {\n /**\n * For underdamped physics springs we need both position and\n * velocity each tick. Compute shared trig values once to avoid\n * duplicate Math.exp/sin/cos calls on the hot path.\n */\n if (!isResolvedFromDuration && dampingRatio < 1) {\n const envelope = Math.exp(\n -dampingRatio * undampedAngularFreq * t\n )\n const sin = Math.sin(angularFreq * t)\n const cos = Math.cos(angularFreq * t)\n\n const current =\n target -\n envelope *\n (A * sin + initialDelta * cos)\n const currentVelocity = secondsToMilliseconds(\n envelope *\n (sinCoeff * sin + cosCoeff * cos)\n )\n\n state.done =\n Math.abs(currentVelocity) <= restSpeed! &&\n Math.abs(target - current) <= restDelta!\n state.value = state.done ? target : current\n\n return state\n }\n\n const current = resolveSpring(t)\n\n if (!isResolvedFromDuration) {\n const currentVelocity = secondsToMilliseconds(\n resolveVelocity(t)\n )\n state.done =\n Math.abs(currentVelocity) <= restSpeed! &&\n Math.abs(target - current) <= restDelta!\n } else {\n state.done = t >= duration!\n }\n\n state.value = state.done ? target : current\n\n return state\n },\n toString: () => {\n const calculatedDuration = Math.min(\n calcGeneratorDuration(generator),\n maxGeneratorDuration\n )\n\n const easing = generateLinearEasing(\n (progress: number) =>\n generator.next(calculatedDuration * progress).value,\n calculatedDuration,\n 30\n )\n\n return calculatedDuration + \"ms \" + easing\n },\n toTransition: () => {},\n }\n\n return generator\n}\n\nspring.applyToOptions = (options: Transition) => {\n const generatorOptions = createGeneratorEasing(options as any, 100, spring)\n\n options.ease = generatorOptions.ease\n options.duration = secondsToMilliseconds(generatorOptions.duration)\n options.type = \"keyframes\"\n return options\n}\n\nexport { spring }\n","import { velocityPerSecond } from \"motion-utils\"\n\nconst velocitySampleDuration = 5 // ms\n\nexport function getGeneratorVelocity(\n resolveValue: (v: number) => number,\n t: number,\n current: number\n) {\n const prevT = Math.max(t - velocitySampleDuration, 0)\n return velocityPerSecond(current - resolveValue(prevT), t - prevT)\n}\n","import {\n AnimationState,\n KeyframeGenerator,\n ValueAnimationOptions,\n} from \"../types\"\nimport { spring as createSpring } from \"./spring\"\nimport { getGeneratorVelocity } from \"./utils/velocity\"\n\nexport function inertia({\n keyframes,\n velocity = 0.0,\n power = 0.8,\n timeConstant = 325,\n bounceDamping = 10,\n bounceStiffness = 500,\n modifyTarget,\n min,\n max,\n restDelta = 0.5,\n restSpeed,\n}: ValueAnimationOptions): KeyframeGenerator {\n const origin = keyframes[0]\n\n const state: AnimationState = {\n done: false,\n value: origin,\n }\n\n const isOutOfBounds = (v: number) =>\n (min !== undefined && v < min) || (max !== undefined && v > max)\n\n const nearestBoundary = (v: number) => {\n if (min === undefined) return max\n if (max === undefined) return min\n\n return Math.abs(min - v) < Math.abs(max - v) ? min : max\n }\n\n let amplitude = power * velocity\n const ideal = origin + amplitude\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal)\n\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal) amplitude = target - origin\n\n const calcDelta = (t: number) => -amplitude * Math.exp(-t / timeConstant)\n\n const calcLatest = (t: number) => target + calcDelta(t)\n\n const applyFriction = (t: number) => {\n const delta = calcDelta(t)\n const latest = calcLatest(t)\n state.done = Math.abs(delta) <= restDelta\n state.value = state.done ? target : latest\n }\n\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary: number | undefined\n let spring: KeyframeGenerator | undefined\n\n const checkCatchBoundary = (t: number) => {\n if (!isOutOfBounds(state.value)) return\n\n timeReachedBoundary = t\n\n spring = createSpring({\n keyframes: [state.value, nearestBoundary(state.value)!],\n velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n })\n }\n\n checkCatchBoundary(0)\n\n return {\n calculatedDuration: null,\n next: (t: number) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false\n if (!spring && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true\n applyFriction(t)\n checkCatchBoundary(t)\n }\n\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring!.next(t - timeReachedBoundary)\n } else {\n !hasUpdatedFrame && applyFriction(t)\n return state\n }\n },\n }\n}\n","import {\n clamp,\n EasingFunction,\n invariant,\n MotionGlobalConfig,\n noop,\n pipe,\n progress,\n} from \"motion-utils\"\nimport { mix } from \"./mix\"\nimport { Mixer, MixerFactory } from \"./mix/types\"\n\nexport interface InterpolateOptions {\n clamp?: boolean\n ease?: EasingFunction | EasingFunction[]\n mixer?: MixerFactory\n}\n\nfunction createMixers(\n output: T[],\n ease?: EasingFunction | EasingFunction[],\n customMixer?: MixerFactory\n) {\n const mixers: Array> = []\n const mixerFactory: MixerFactory =\n customMixer || MotionGlobalConfig.mix || mix\n const numMixers = output.length - 1\n\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1])\n\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease\n mixer = pipe(easingFunction, mixer) as Mixer\n }\n\n mixers.push(mixer)\n }\n\n return mixers\n}\n\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nexport function interpolate(\n input: number[],\n output: T[],\n { clamp: isClamp = true, ease, mixer }: InterpolateOptions = {}\n): (v: number) => T {\n const inputLength = input.length\n\n invariant(\n inputLength === output.length,\n \"Both input and output ranges must be the same length\",\n \"range-length\"\n )\n\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1) return () => output[0]\n if (inputLength === 2 && output[0] === output[1]) return () => output[1]\n\n const isZeroDeltaRange = input[0] === input[1]\n\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse()\n output = [...output].reverse()\n }\n\n const mixers = createMixers(output, ease, mixer)\n const numMixers = mixers.length\n\n const interpolator = (v: number): T => {\n if (isZeroDeltaRange && v < input[0]) return output[0]\n\n let i = 0\n\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1]) break\n }\n }\n\n const progressInRange = progress(input[i], input[i + 1], v)\n\n return mixers[i](progressInRange)\n }\n\n return isClamp\n ? (v: number) =>\n interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator\n}\n","import { progress } from \"motion-utils\"\nimport { mixNumber } from \"../../../utils/mix/number\"\n\nexport function fillOffset(offset: number[], remaining: number): void {\n const min = offset[offset.length - 1]\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i)\n offset.push(mixNumber(min, 1, offsetProgress))\n }\n}\n","import { fillOffset } from \"./fill\"\n\nexport function defaultOffset(arr: any[]): number[] {\n const offset = [0]\n fillOffset(offset, arr.length - 1)\n return offset\n}\n","export function convertOffsetToTimes(offset: number[], duration: number) {\n return offset.map((o) => o * duration)\n}\n","import {\n easeInOut,\n easingDefinitionToFunction,\n EasingFunction,\n isEasingArray,\n} from \"motion-utils\"\nimport { interpolate } from \"../../utils/interpolate\"\nimport { defaultOffset } from \"../keyframes/offsets/default\"\nimport { convertOffsetToTimes } from \"../keyframes/offsets/time\"\nimport {\n AnimationState,\n AnyResolvedKeyframe,\n KeyframeGenerator,\n ValueAnimationOptions,\n} from \"../types\"\n\nexport function defaultEasing(\n values: any[],\n easing?: EasingFunction\n): EasingFunction[] {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1)\n}\n\nexport function keyframes({\n duration = 300,\n keyframes: keyframeValues,\n times,\n ease = \"easeInOut\",\n}: ValueAnimationOptions): KeyframeGenerator {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease)\n\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state: AnimationState = {\n done: false,\n value: keyframeValues[0],\n }\n\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues),\n duration\n )\n\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n })\n\n return {\n calculatedDuration: duration,\n next: (t: number) => {\n state.value = mapTimeToKeyframe(t)\n state.done = t >= duration\n return state\n },\n }\n}\n","import { AnimationPlaybackOptions } from \"../types\"\n\nconst isNotNull = (value: unknown) => value !== null\n\nexport function getFinalKeyframe(\n keyframes: T[],\n { repeat, repeatType = \"loop\" }: AnimationPlaybackOptions,\n finalKeyframe?: T,\n speed: number = 1\n): T {\n const resolvedKeyframes = keyframes.filter(isNotNull)\n const useFirstKeyframe =\n speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1)\n const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1\n\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe\n}\n","import { inertia } from \"../generators/inertia\"\nimport { keyframes } from \"../generators/keyframes\"\nimport { spring } from \"../generators/spring\"\nimport { GeneratorFactory, ValueAnimationTransition } from \"../types\"\n\nconst transitionTypeMap: { [key: string]: GeneratorFactory } = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n}\n\nexport function replaceTransitionType(transition: ValueAnimationTransition) {\n if (typeof transition.type === \"string\") {\n transition.type = transitionTypeMap[transition.type]\n }\n}\n","export class WithPromise {\n protected _finished: Promise\n\n resolve: VoidFunction\n\n constructor() {\n this.updateFinished()\n }\n\n get finished() {\n return this._finished\n }\n\n protected updateFinished() {\n this._finished = new Promise((resolve) => {\n this.resolve = resolve\n })\n }\n\n protected notifyFinished() {\n this.resolve()\n }\n\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve: VoidFunction, onReject?: VoidFunction) {\n return this.finished.then(onResolve, onReject)\n }\n}\n","import {\n clamp,\n invariant,\n millisecondsToSeconds,\n pipe,\n secondsToMilliseconds,\n} from \"motion-utils\"\nimport { time } from \"../frameloop/sync-time\"\nimport { activeAnimations } from \"../stats/animation-count\"\nimport { mix } from \"../utils/mix\"\nimport { Mixer } from \"../utils/mix/types\"\nimport { frameloopDriver } from \"./drivers/frame\"\nimport { DriverControls } from \"./drivers/types\"\nimport { inertia } from \"./generators/inertia\"\nimport { keyframes as keyframesGenerator } from \"./generators/keyframes\"\nimport { calcGeneratorDuration } from \"./generators/utils/calc-duration\"\nimport { getGeneratorVelocity } from \"./generators/utils/velocity\"\nimport { getFinalKeyframe } from \"./keyframes/get-final\"\nimport {\n AnimationPlaybackControlsWithThen,\n AnimationState,\n GeneratorFactory,\n KeyframeGenerator,\n TimelineWithFallback,\n ValueAnimationOptions,\n} from \"./types\"\nimport { replaceTransitionType } from \"./utils/replace-transition-type\"\nimport { WithPromise } from \"./utils/WithPromise\"\n\nconst percentToProgress = (percent: number) => percent / 100\n\nexport class JSAnimation\n extends WithPromise\n implements AnimationPlaybackControlsWithThen\n{\n state: AnimationPlayState = \"idle\"\n\n startTime: number | null = null\n\n /**\n * The driver that's controlling the animation loop. Normally this is a requestAnimationFrame loop\n * but in tests we can pass in a synchronous loop.\n */\n private driver?: DriverControls\n\n private isStopped = false\n\n private generator: KeyframeGenerator\n\n private calculatedDuration: number\n\n private resolvedDuration: number\n\n private totalDuration: number\n\n private options: ValueAnimationOptions\n\n /**\n * The current time of the animation.\n */\n private currentTime: number = 0\n\n /**\n * The time at which the animation was paused.\n */\n private holdTime: number | null = null\n\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n private playbackSpeed = 1\n\n /*\n * If our generator doesn't support mixing numbers, we need to replace keyframes with\n * [0, 100] and then make a function that maps that to the actual keyframes.\n *\n * 100 is chosen instead of 1 as it works nicer with spring animations.\n */\n private mixKeyframes: Mixer | undefined\n\n private mirroredGenerator: KeyframeGenerator | undefined\n\n /**\n * Reusable state object for the delay phase to avoid\n * allocating a new object every frame.\n */\n private delayState: AnimationState = {\n done: false,\n value: undefined as unknown as T,\n }\n\n constructor(options: ValueAnimationOptions) {\n super()\n activeAnimations.mainThread++\n\n this.options = options\n this.initAnimation()\n this.play()\n\n if (options.autoplay === false) this.pause()\n }\n\n initAnimation() {\n const { options } = this\n\n replaceTransitionType(options)\n\n const {\n type = keyframesGenerator,\n repeat = 0,\n repeatDelay = 0,\n repeatType,\n velocity = 0,\n } = options\n let { keyframes } = options\n\n const generatorFactory =\n (type as GeneratorFactory) || keyframesGenerator\n\n if (\n process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframesGenerator\n ) {\n invariant(\n keyframes.length <= 2,\n `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes}`,\n \"spring-two-frames\"\n )\n }\n\n if (\n generatorFactory !== keyframesGenerator &&\n typeof keyframes[0] !== \"number\"\n ) {\n this.mixKeyframes = pipe(\n percentToProgress,\n mix(keyframes[0], keyframes[1])\n ) as (t: number) => T\n\n keyframes = [0 as T, 100 as T]\n }\n\n const generator = generatorFactory({ ...options, keyframes })\n\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes].reverse(),\n velocity: -velocity,\n })\n }\n\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator)\n }\n\n const { calculatedDuration } = generator\n this.calculatedDuration = calculatedDuration\n this.resolvedDuration = calculatedDuration + repeatDelay\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay\n this.generator = generator\n }\n\n updateTime(timestamp: number) {\n const animationTime =\n Math.round(timestamp - this.startTime!) * this.playbackSpeed\n\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime\n } else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime\n }\n }\n\n tick(timestamp: number, sample = false) {\n const {\n generator,\n totalDuration,\n mixKeyframes,\n mirroredGenerator,\n resolvedDuration,\n calculatedDuration,\n } = this\n\n if (this.startTime === null) return generator.next(0)\n\n const {\n delay = 0,\n keyframes,\n repeat,\n repeatType,\n repeatDelay,\n type,\n onUpdate,\n finalKeyframe,\n } = this.options\n\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp)\n } else if (this.speed < 0) {\n this.startTime = Math.min(\n timestamp - totalDuration / this.speed,\n this.startTime\n )\n }\n\n if (sample) {\n this.currentTime = timestamp\n } else {\n this.updateTime(timestamp)\n }\n\n // Rebase on delay\n const timeWithoutDelay =\n this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1)\n const isInDelayPhase =\n this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration\n this.currentTime = Math.max(timeWithoutDelay, 0)\n\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration\n }\n\n let elapsed = this.currentTime\n let frameGenerator = generator\n\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress =\n Math.min(this.currentTime, totalDuration) / resolvedDuration\n\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress)\n\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0\n\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1\n }\n\n iterationProgress === 1 && currentIteration--\n\n currentIteration = Math.min(currentIteration, repeat + 1)\n\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n\n const isOddIteration = Boolean(currentIteration % 2)\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration\n }\n } else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator!\n }\n }\n\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration\n }\n\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n let state: AnimationState\n if (isInDelayPhase) {\n this.delayState.value = keyframes[0]\n state = this.delayState\n } else {\n state = frameGenerator.next(elapsed)\n }\n\n if (mixKeyframes && !isInDelayPhase) {\n state.value = mixKeyframes(state.value as number)\n }\n\n let { done } = state\n\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0\n }\n\n const isAnimationFinished =\n this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done))\n\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(\n keyframes,\n this.options,\n finalKeyframe,\n this.speed\n )\n }\n\n if (onUpdate) {\n onUpdate(state.value)\n }\n\n if (isAnimationFinished) {\n this.finish()\n }\n\n return state\n }\n\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve: VoidFunction, reject?: VoidFunction) {\n return this.finished.then(resolve, reject)\n }\n\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration)\n }\n\n get iterationDuration() {\n const { delay = 0 } = this.options || {}\n return this.duration + millisecondsToSeconds(delay)\n }\n\n get time() {\n return millisecondsToSeconds(this.currentTime)\n }\n\n set time(newTime: number) {\n newTime = secondsToMilliseconds(newTime)\n this.currentTime = newTime\n\n if (\n this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0\n ) {\n this.holdTime = newTime\n } else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed\n }\n\n if (this.driver) {\n this.driver.start(false)\n } else {\n this.startTime = 0\n this.state = \"paused\"\n this.holdTime = newTime\n this.tick(newTime)\n }\n }\n\n /**\n * Returns the generator's velocity at the current time in units/second.\n * Uses the analytical derivative when available (springs), avoiding\n * the MotionValue's frame-dependent velocity estimation.\n */\n getGeneratorVelocity(): number {\n const t = this.currentTime\n if (t <= 0) return this.options.velocity || 0\n\n if (this.generator.velocity) {\n return this.generator.velocity(t)\n }\n\n // Fallback: finite difference\n const current = this.generator.next(t).value as number\n return getGeneratorVelocity(\n (s) => this.generator.next(s).value as number,\n t,\n current\n )\n }\n\n get speed() {\n return this.playbackSpeed\n }\n\n set speed(newSpeed: number) {\n const hasChanged = this.playbackSpeed !== newSpeed\n\n if (hasChanged && this.driver) {\n this.updateTime(time.now())\n }\n\n this.playbackSpeed = newSpeed\n\n if (hasChanged && this.driver) {\n this.time = millisecondsToSeconds(this.currentTime)\n }\n }\n\n play() {\n if (this.isStopped) return\n\n const { driver = frameloopDriver, startTime } = this.options\n\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp))\n }\n\n this.options.onPlay?.()\n\n const now = this.driver.now()\n\n if (this.state === \"finished\") {\n this.updateFinished()\n this.startTime = now\n } else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime\n } else if (!this.startTime) {\n this.startTime = startTime ?? now\n }\n\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration\n }\n\n this.holdTime = null\n\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\"\n\n this.driver.start()\n }\n\n pause() {\n this.state = \"paused\"\n this.updateTime(time.now())\n this.holdTime = this.currentTime\n }\n\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n stop = () => {\n const { motionValue } = this.options\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now())\n }\n\n this.isStopped = true\n if (this.state === \"idle\") return\n this.teardown()\n this.options.onStop?.()\n }\n\n complete() {\n if (this.state !== \"running\") {\n this.play()\n }\n\n this.state = \"finished\"\n this.holdTime = null\n }\n\n finish() {\n this.notifyFinished()\n this.teardown()\n this.state = \"finished\"\n\n this.options.onComplete?.()\n }\n\n cancel() {\n this.holdTime = null\n this.startTime = 0\n this.tick(0)\n this.teardown()\n this.options.onCancel?.()\n }\n\n private teardown() {\n this.state = \"idle\"\n this.stopDriver()\n this.startTime = this.holdTime = null\n activeAnimations.mainThread--\n }\n\n private stopDriver() {\n if (!this.driver) return\n this.driver.stop()\n this.driver = undefined\n }\n\n sample(sampleTime: number): AnimationState {\n this.startTime = 0\n return this.tick(sampleTime, true)\n }\n\n attachTimeline(timeline: TimelineWithFallback): VoidFunction {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\"\n this.options.ease = \"linear\"\n this.initAnimation()\n }\n\n this.driver?.stop()\n return timeline.observe(this)\n }\n}\n\n// Legacy function support\nexport function animateValue(\n options: ValueAnimationOptions\n) {\n return new JSAnimation(options)\n}\n","import { UnresolvedValueKeyframe, ValueKeyframe } from \"../../types\"\n\nexport function fillWildcards(\n keyframes: ValueKeyframe[] | UnresolvedValueKeyframe[]\n) {\n for (let i = 1; i < keyframes.length; i++) {\n keyframes[i] ??= keyframes[i - 1]\n }\n}\n","import { transformPropOrder } from \"../utils/keys-transform\"\n\nconst radToDeg = (rad: number) => (rad * 180) / Math.PI\n\ntype MatrixParser = (values: number[]) => number\n\ntype MatrixParsers = Record<\n (typeof transformPropOrder)[number],\n number | MatrixParser\n>\n\nconst rotate = (v: number[]) => {\n const angle = radToDeg(Math.atan2(v[1], v[0]))\n return rebaseAngle(angle)\n}\n\nconst matrix2dParsers: MatrixParsers = {\n x: 4,\n y: 5,\n translateX: 4,\n translateY: 5,\n scaleX: 0,\n scaleY: 3,\n scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n} as const\n\nconst rebaseAngle = (angle: number) => {\n angle = angle % 360\n if (angle < 0) angle += 360\n return angle\n}\n\nconst rotateZ = rotate\n\nconst scaleX = (v: number[]) => Math.sqrt(v[0] * v[0] + v[1] * v[1])\nconst scaleY = (v: number[]) => Math.sqrt(v[4] * v[4] + v[5] * v[5])\n\nconst matrix3dParsers: MatrixParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n} as const\n\nexport function defaultTransformValue(name: string): number {\n return name.includes(\"scale\") ? 1 : 0\n}\n\nexport function parseValueFromTransform(\n transform: string | undefined,\n name: string\n): number {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name)\n }\n\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u)\n\n let parsers: MatrixParsers\n let match: RegExpMatchArray | null\n\n if (matrix3dMatch) {\n parsers = matrix3dParsers\n match = matrix3dMatch\n } else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u)\n\n parsers = matrix2dParsers\n match = matrix2dMatch\n }\n\n if (!match) {\n return defaultTransformValue(name)\n }\n\n const valueParser = parsers[name]\n const values = match[1].split(\",\").map(convertTransformToNumber)\n\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser]\n}\n\nexport const readTransformValue = (instance: HTMLElement, name: string) => {\n const { transform = \"none\" } = getComputedStyle(instance)\n return parseValueFromTransform(transform, name)\n}\n\nfunction convertTransformToNumber(value: string): number {\n return parseFloat(value.trim())\n}\n","/**\n * Generate a list of every possible transform key.\n */\nexport const transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n]\n\n/**\n * A quick lookup for transform props.\n *\n * `pathRotation` is a transform for routing purposes (skipped from raw\n * style application, wired to the transform composite, flags transform\n * dirty) but is intentionally NOT in `transformPropOrder` — it is\n * composed onto `rotate` at the build sites, not serialized in its own\n * slot, and must stay out of the order-array consumers (parse-transform,\n * unit-conversion, keys-position).\n */\nexport const transformProps = /*@__PURE__*/ (() =>\n new Set([...transformPropOrder, \"pathRotation\"]))()\n","import type { Box } from \"motion-utils\"\nimport { parseValueFromTransform } from \"../../../render/dom/parse-transform\"\nimport { transformPropOrder } from \"../../../render/utils/keys-transform\"\nimport { MotionValue } from \"../../../value\"\nimport { number } from \"../../../value/types/numbers\"\nimport { px } from \"../../../value/types/numbers/units\"\nimport { ValueType } from \"../../../value/types/types\"\nimport { AnyResolvedKeyframe } from \"../../types\"\nimport { WithRender } from \"../types\"\n\nexport const isNumOrPxType = (v?: ValueType): v is ValueType =>\n v === number || v === px\n\ntype GetActualMeasurementInPixels = (\n bbox: Box,\n computedStyle: Partial\n) => number\n\nconst transformKeys = new Set([\"x\", \"y\", \"z\"])\nconst nonTranslationalTransformKeys = transformPropOrder.filter(\n (key) => !transformKeys.has(key)\n)\n\ntype RemovedTransforms = [string, AnyResolvedKeyframe][]\nexport function removeNonTranslationalTransform(visualElement: WithRender) {\n const removedTransforms: RemovedTransforms = []\n\n nonTranslationalTransformKeys.forEach((key) => {\n const value: MotionValue | undefined =\n visualElement.getValue(key)\n if (value !== undefined) {\n removedTransforms.push([key, value.get()])\n value.set(key.startsWith(\"scale\") ? 1 : 0)\n }\n })\n\n return removedTransforms\n}\n\nexport const positionalValues: { [key: string]: GetActualMeasurementInPixels } =\n {\n // Dimensions\n width: (\n { x },\n { paddingLeft = \"0\", paddingRight = \"0\", boxSizing }\n ) => {\n const width = x.max - x.min\n return boxSizing === \"border-box\"\n ? width\n : width - parseFloat(paddingLeft) - parseFloat(paddingRight)\n },\n height: (\n { y },\n { paddingTop = \"0\", paddingBottom = \"0\", boxSizing }\n ) => {\n const height = y.max - y.min\n return boxSizing === \"border-box\"\n ? height\n : height - parseFloat(paddingTop) - parseFloat(paddingBottom)\n },\n\n top: (_bbox, { top }) => parseFloat(top as string),\n left: (_bbox, { left }) => parseFloat(left as string),\n bottom: ({ y }, { top }) => parseFloat(top as string) + (y.max - y.min),\n right: ({ x }, { left }) =>\n parseFloat(left as string) + (x.max - x.min),\n\n // Transform\n x: (_bbox, { transform }) => parseValueFromTransform(transform, \"x\"),\n y: (_bbox, { transform }) => parseValueFromTransform(transform, \"y\"),\n }\n\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x\npositionalValues.translateY = positionalValues.y\n","import { frame } from \"../../frameloop\"\nimport { MotionValue } from \"../../value\"\nimport { AnyResolvedKeyframe } from \"../types\"\nimport { WithRender } from \"./types\"\nimport { fillWildcards } from \"./utils/fill-wildcards\"\nimport { removeNonTranslationalTransform } from \"./utils/unit-conversion\"\n\nexport type UnresolvedKeyframes = Array\n\nexport type ResolvedKeyframes = Array\n\nconst toResolve = new Set()\nlet isScheduled = false\nlet anyNeedsMeasurement = false\nlet isForced = false\n\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter(\n (resolver: KeyframeResolver) => resolver.needsMeasurement\n )\n const elementsToMeasure = new Set(\n resolversToMeasure.map((resolver) => resolver.element)\n )\n const transformsToRestore = new Map<\n WithRender,\n [string, AnyResolvedKeyframe][]\n >()\n\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach((element: WithRender) => {\n const removedTransforms = removeNonTranslationalTransform(\n element as any\n )\n\n if (!removedTransforms.length) return\n\n transformsToRestore.set(element, removedTransforms)\n\n element.render()\n })\n\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState())\n\n // Write\n elementsToMeasure.forEach((element: WithRender) => {\n element.render()\n\n const restore = transformsToRestore.get(element)\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value)\n })\n }\n })\n\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState())\n\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY)\n }\n })\n }\n\n anyNeedsMeasurement = false\n isScheduled = false\n\n toResolve.forEach((resolver) => resolver.complete(isForced))\n toResolve.clear()\n}\n\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes()\n\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true\n }\n })\n}\n\nexport function flushKeyframeResolvers() {\n isForced = true\n readAllKeyframes()\n measureAllKeyframes()\n isForced = false\n}\n\nexport type OnKeyframesResolved = (\n resolvedKeyframes: ResolvedKeyframes,\n finalKeyframe: T,\n forced: boolean\n) => void\n\nexport class KeyframeResolver {\n name?: string\n element?: WithRender\n finalKeyframe?: T\n suspendedScrollY?: number\n\n protected unresolvedKeyframes: UnresolvedKeyframes\n\n private motionValue?: MotionValue\n private onComplete: OnKeyframesResolved\n\n state: \"pending\" | \"scheduled\" | \"complete\" = \"pending\"\n\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n private isAsync = false\n\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n needsMeasurement = false\n\n constructor(\n unresolvedKeyframes: UnresolvedKeyframes,\n onComplete: OnKeyframesResolved,\n name?: string,\n motionValue?: MotionValue,\n element?: WithRender,\n isAsync = false\n ) {\n this.unresolvedKeyframes = [...unresolvedKeyframes]\n this.onComplete = onComplete\n this.name = name\n this.motionValue = motionValue\n this.element = element\n this.isAsync = isAsync\n }\n\n scheduleResolve() {\n this.state = \"scheduled\"\n\n if (this.isAsync) {\n toResolve.add(this)\n\n if (!isScheduled) {\n isScheduled = true\n frame.read(readAllKeyframes)\n frame.resolveKeyframes(measureAllKeyframes)\n }\n } else {\n this.readKeyframes()\n this.complete()\n }\n }\n\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this\n\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get()\n\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe =\n unresolvedKeyframes[unresolvedKeyframes.length - 1]\n\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue\n } else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe)\n\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead\n }\n }\n\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe\n }\n\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0] as T)\n }\n }\n\n fillWildcards(unresolvedKeyframes)\n }\n\n setFinalKeyframe() {}\n measureInitialState() {}\n renderEndStyles() {}\n measureEndState() {}\n\n complete(isForcedComplete = false) {\n this.state = \"complete\"\n\n this.onComplete(\n this.unresolvedKeyframes as ResolvedKeyframes,\n this.finalKeyframe as T,\n isForcedComplete\n )\n\n toResolve.delete(this)\n }\n\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this)\n this.state = \"pending\"\n }\n }\n\n resume() {\n if (this.state === \"pending\") this.scheduleResolve()\n }\n}\n","export const isCSSVar = (name: string) => name.startsWith(\"--\")\n","import { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isCSSVar } from \"./is-css-var\"\n\nexport function setStyle(\n element: HTMLElement | SVGElement,\n name: string,\n value: AnyResolvedKeyframe\n) {\n isCSSVar(name)\n ? element.style.setProperty(name, value as string)\n : (element.style[name as any] = value as string)\n}\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nexport const supportsFlags: Record = {}\n","import { memo } from \"motion-utils\"\nimport { supportsFlags } from \"./flags\"\n\nexport function memoSupports(\n callback: () => T,\n supportsFlag: keyof typeof supportsFlags\n) {\n const memoized = memo(callback)\n return () => supportsFlags[supportsFlag] ?? memoized()\n}\n","import { ProgressTimeline } from \"../..\"\nimport { memoSupports } from \"./memo\"\n\ndeclare global {\n interface Window {\n ScrollTimeline: ScrollTimeline\n ViewTimeline: ViewTimeline\n }\n}\n\ndeclare class ScrollTimeline implements ProgressTimeline {\n constructor(options: ScrollOptions)\n\n currentTime: null | { value: number }\n\n cancel?: VoidFunction\n}\n\ndeclare class ViewTimeline implements ProgressTimeline {\n constructor(options: { subject: Element; axis?: string })\n\n currentTime: null | { value: number }\n\n cancel?: VoidFunction\n}\n\nexport const supportsScrollTimeline = /* @__PURE__ */ memoSupports(\n () => window.ScrollTimeline !== undefined,\n \"scrollTimeline\"\n)\n\nexport const supportsViewTimeline = /* @__PURE__ */ memoSupports(\n () => window.ViewTimeline !== undefined,\n \"viewTimeline\"\n)\n","import { memoSupports } from \"./memo\"\n\nexport const supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" })\n } catch (e) {\n return false\n }\n return true\n}, \"linearEasing\")\n","import { BezierDefinition } from \"motion-utils\"\n\nexport const cubicBezierAsString = ([a, b, c, d]: BezierDefinition) =>\n `cubic-bezier(${a}, ${b}, ${c}, ${d})`\n","import { cubicBezierAsString } from \"./cubic-bezier\"\n\nexport const supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n}\n","import { Easing, isBezierDefinition } from \"motion-utils\"\nimport { supportsLinearEasing } from \"../../../utils/supports/linear-easing\"\nimport { generateLinearEasing } from \"../utils/linear\"\nimport { cubicBezierAsString } from \"./cubic-bezier\"\nimport { supportedWaapiEasing } from \"./supported\"\n\nexport function mapEasingToNativeEasing(\n easing: Easing | Easing[] | undefined,\n duration: number\n): undefined | string | string[] {\n if (!easing) {\n return undefined\n } else if (typeof easing === \"function\") {\n return supportsLinearEasing()\n ? generateLinearEasing(easing, duration)\n : \"ease-out\"\n } else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing)\n } else if (Array.isArray(easing)) {\n return easing.map(\n (segmentEasing) =>\n (mapEasingToNativeEasing(segmentEasing, duration) as string) ||\n supportedWaapiEasing.easeOut\n )\n } else {\n return supportedWaapiEasing[easing as keyof typeof supportedWaapiEasing]\n }\n}\n","import { activeAnimations } from \"../../stats/animation-count\"\nimport { statsBuffer } from \"../../stats/buffer\"\nimport { ValueKeyframesDefinition, ValueTransition } from \"../types\"\nimport { mapEasingToNativeEasing } from \"./easing/map-easing\"\n\nexport function startWaapiAnimation(\n element: Element,\n valueName: string,\n keyframes: ValueKeyframesDefinition,\n {\n delay = 0,\n duration = 300,\n repeat = 0,\n repeatType = \"loop\",\n ease = \"easeOut\",\n times,\n }: ValueTransition = {},\n pseudoElement: string | undefined = undefined\n) {\n const keyframeOptions: PropertyIndexedKeyframes = {\n [valueName]: keyframes as string[],\n }\n if (times) keyframeOptions.offset = times\n\n const easing = mapEasingToNativeEasing(ease, duration)\n\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing)) keyframeOptions.easing = easing\n\n if (statsBuffer.value) {\n activeAnimations.waapi++\n }\n\n const options: KeyframeAnimationOptions = {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n }\n\n if (pseudoElement) options.pseudoElement = pseudoElement\n\n const animation = element.animate(keyframeOptions, options)\n\n if (statsBuffer.value) {\n animation.finished.finally(() => {\n activeAnimations.waapi--\n })\n }\n\n return animation\n}\n","import { AnimationGeneratorType, GeneratorFactory } from \"../../types\"\n\nexport function isGenerator(\n type?: AnimationGeneratorType\n): type is GeneratorFactory {\n return typeof type === \"function\" && \"applyToOptions\" in type\n}\n","import { ValueTransition } from \"../../../animation/types\"\nimport { supportsLinearEasing } from \"../../../utils/supports/linear-easing\"\nimport { isGenerator } from \"../../generators/utils/is-generator\"\n\nexport function applyGeneratorOptions({\n type,\n ...options\n}: ValueTransition): ValueTransition {\n if (isGenerator(type) && supportsLinearEasing()) {\n return type.applyToOptions!(options)\n } else {\n options.duration ??= 300\n options.ease ??= \"easeOut\"\n }\n\n return options\n}\n","import {\n invariant,\n millisecondsToSeconds,\n noop,\n secondsToMilliseconds,\n} from \"motion-utils\"\nimport { setStyle } from \"../render/dom/style-set\"\nimport { supportsScrollTimeline } from \"../utils/supports/scroll-timeline\"\nimport { getFinalKeyframe } from \"./keyframes/get-final\"\nimport {\n AnimationPlaybackControlsWithThen,\n AnyResolvedKeyframe,\n DOMValueAnimationOptions,\n TimelineWithFallback,\n} from \"./types\"\nimport { WithPromise } from \"./utils/WithPromise\"\nimport { startWaapiAnimation } from \"./waapi/start-waapi-animation\"\nimport { applyGeneratorOptions } from \"./waapi/utils/apply-generator\"\n\nexport interface NativeAnimationOptions\n extends DOMValueAnimationOptions {\n pseudoElement?: string\n startTime?: number\n}\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nexport class NativeAnimation\n extends WithPromise\n implements AnimationPlaybackControlsWithThen\n{\n /**\n * The interfaced Web Animation API animation\n */\n protected animation: Animation\n\n protected finishedTime: number | null = null\n\n protected options: NativeAnimationOptions\n\n private allowFlatten: boolean\n\n private isStopped = false\n\n private isPseudoElement: boolean\n\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n protected manualStartTime: number | null = null\n\n constructor(options?: NativeAnimationOptions) {\n super()\n\n if (!options) return\n\n const {\n element,\n name,\n keyframes,\n pseudoElement,\n allowFlatten = false,\n finalKeyframe,\n onComplete,\n } = options as any\n\n this.isPseudoElement = Boolean(pseudoElement)\n\n this.allowFlatten = allowFlatten\n this.options = options\n\n invariant(\n typeof options.type !== \"string\",\n `Mini animate() doesn't support \"type\" as a string.`,\n \"mini-spring\"\n )\n\n const transition = applyGeneratorOptions(options)\n\n this.animation = startWaapiAnimation(\n element,\n name,\n keyframes,\n transition,\n pseudoElement\n )\n\n if (transition.autoplay === false) {\n this.animation.pause()\n }\n\n this.animation.onfinish = () => {\n this.finishedTime = this.time\n\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(\n keyframes as any,\n this.options as any,\n finalKeyframe,\n this.speed\n )\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe)\n }\n\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe)\n\n this.animation.cancel()\n }\n\n onComplete?.()\n this.notifyFinished()\n }\n }\n\n updateMotionValue?(value?: T): void\n\n play() {\n if (this.isStopped) return\n\n this.manualStartTime = null\n this.animation.play()\n\n if (this.state === \"finished\") {\n this.updateFinished()\n }\n }\n\n pause() {\n this.animation.pause()\n }\n\n complete() {\n this.animation.finish?.()\n }\n\n cancel() {\n try {\n this.animation.cancel()\n } catch (e) {}\n }\n\n stop() {\n if (this.isStopped) return\n this.isStopped = true\n const { state } = this\n\n if (state === \"idle\" || state === \"finished\") {\n return\n }\n\n if (this.updateMotionValue) {\n this.updateMotionValue()\n } else {\n this.commitStyles()\n }\n\n if (!this.isPseudoElement) this.cancel()\n }\n\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n protected commitStyles() {\n const element = this.options?.element\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.()\n }\n }\n\n get duration() {\n const duration =\n this.animation.effect?.getComputedTiming?.().duration || 0\n\n return millisecondsToSeconds(Number(duration))\n }\n\n get iterationDuration() {\n const { delay = 0 } = this.options || {}\n return this.duration + millisecondsToSeconds(delay)\n }\n\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0)\n }\n\n set time(newTime: number) {\n const wasFinished = this.finishedTime !== null\n this.manualStartTime = null\n this.finishedTime = null\n this.animation.currentTime = secondsToMilliseconds(newTime)\n\n if (wasFinished) {\n this.animation.pause()\n }\n }\n\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate\n }\n\n set speed(newSpeed: number) {\n // Allow backwards playback after finishing\n if (newSpeed < 0) this.finishedTime = null\n\n this.animation.playbackRate = newSpeed\n }\n\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState\n }\n\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime)\n }\n\n set startTime(newStartTime: number) {\n this.manualStartTime = this.animation.startTime = newStartTime\n }\n\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({\n timeline,\n rangeStart,\n rangeEnd,\n observe,\n }: TimelineWithFallback): VoidFunction {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" })\n }\n\n this.animation.onfinish = null\n\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline as any\n\n if (rangeStart) (this.animation as any).rangeStart = rangeStart\n if (rangeEnd) (this.animation as any).rangeEnd = rangeEnd\n\n return noop\n } else {\n return observe(this)\n }\n }\n}\n","import { anticipate, backInOut, circInOut } from \"motion-utils\"\nimport { ValueAnimationTransition } from \"../../types\"\n\nconst unsupportedEasingFunctions = {\n anticipate,\n backInOut,\n circInOut,\n}\n\nfunction isUnsupportedEase(\n key: string\n): key is keyof typeof unsupportedEasingFunctions {\n return key in unsupportedEasingFunctions\n}\n\nexport function replaceStringEasing(transition: ValueAnimationTransition) {\n if (\n typeof transition.ease === \"string\" &&\n isUnsupportedEase(transition.ease)\n ) {\n transition.ease = unsupportedEasingFunctions[transition.ease]\n }\n}\n","import { clamp } from \"motion-utils\"\nimport { time } from \"../frameloop/sync-time\"\nimport { setStyle } from \"../render/dom/style-set\"\nimport { JSAnimation } from \"./JSAnimation\"\nimport { NativeAnimation, NativeAnimationOptions } from \"./NativeAnimation\"\nimport { AnyResolvedKeyframe, ValueAnimationOptions } from \"./types\"\nimport { replaceTransitionType } from \"./utils/replace-transition-type\"\nimport { replaceStringEasing } from \"./waapi/utils/unsupported-easing\"\n\nexport type NativeAnimationOptionsExtended =\n NativeAnimationOptions & ValueAnimationOptions & NativeAnimationOptions\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10 //ms\n\nexport class NativeAnimationExtended<\n T extends AnyResolvedKeyframe\n> extends NativeAnimation {\n options: NativeAnimationOptionsExtended\n\n constructor(options: NativeAnimationOptionsExtended) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options)\n\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options)\n\n super(options)\n\n /**\n * Only set startTime when the animation should autoplay.\n * Setting startTime on a paused WAAPI animation unpauses it\n * (per the WAAPI spec), which breaks autoplay: false.\n */\n if (options.startTime !== undefined && options.autoplay !== false) {\n this.startTime = options.startTime\n }\n\n this.options = options\n }\n\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read committed styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value?: T) {\n const { motionValue, onUpdate, onComplete, element, ...options } =\n this.options\n\n if (!motionValue) return\n\n if (value !== undefined) {\n motionValue.set(value)\n return\n }\n\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n })\n\n /**\n * Use wall-clock elapsed time for sampling.\n * Under CPU load, WAAPI's currentTime may not reflect actual\n * elapsed time, causing incorrect sampling and visual jumps.\n */\n const sampleTime = Math.max(sampleDelta, time.now() - this.startTime)\n const delta = clamp(0, sampleDelta, sampleTime - sampleDelta)\n const current = sampleAnimation.sample(sampleTime).value\n\n /**\n * Write the estimated value to inline style so it persists\n * after cancel(), covering the async gap before the next\n * animation starts.\n */\n const { name } = this.options\n if (element && name) setStyle(element, name, current)\n\n motionValue.setWithVelocity(\n sampleAnimation.sample(Math.max(0, sampleTime - delta)).value,\n current,\n delta\n )\n\n sampleAnimation.stop()\n }\n}\n","import { complex } from \"../../value/types/complex\"\nimport { ValueKeyframesDefinition } from \"../types\"\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nexport const isAnimatable = (\n value: ValueKeyframesDefinition,\n name?: string\n) => {\n // If the list of keys that might be non-animatable grows, replace with Set\n if (name === \"zIndex\") return false\n\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value)) return true\n\n if (\n typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true\n }\n\n return false\n}\n","import { warning } from \"motion-utils\"\nimport { isGenerator } from \"../generators/utils/is-generator\"\nimport { ResolvedKeyframes } from \"../keyframes/KeyframesResolver\"\nimport { AnimationGeneratorType } from \"../types\"\nimport { isAnimatable } from \"./is-animatable\"\n\nfunction hasKeyframesChanged(keyframes: ResolvedKeyframes) {\n const current = keyframes[0]\n if (keyframes.length === 1) return true\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current) return true\n }\n}\n\nexport function canAnimate(\n keyframes: ResolvedKeyframes,\n name?: string,\n type?: AnimationGeneratorType,\n velocity?: number\n) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0]\n if (originKeyframe === null) {\n return false\n }\n\n /**\n * These aren't traditionally animatable but we do support them.\n * In future we could look into making this more generic or replacing\n * this function with mix() === mixImmediate\n */\n if (name === \"display\" || name === \"visibility\") return true\n\n const targetKeyframe = keyframes[keyframes.length - 1]\n const isOriginAnimatable = isAnimatable(originKeyframe, name)\n const isTargetAnimatable = isAnimatable(targetKeyframe, name)\n\n warning(\n isOriginAnimatable === isTargetAnimatable,\n `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". \"${\n isOriginAnimatable ? targetKeyframe : originKeyframe\n }\" is not an animatable value.`,\n \"value-not-animatable\"\n )\n\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n return false\n }\n\n return (\n hasKeyframesChanged(keyframes) ||\n ((type === \"spring\" || isGenerator(type)) && velocity)\n )\n}\n","import { ValueAnimationOptions } from \"../types\"\n\nexport function makeAnimationInstant(\n options: Partial<{\n duration: ValueAnimationOptions[\"duration\"]\n type: ValueAnimationOptions[\"type\"]\n }>\n): void {\n options.duration = 0\n options.type = \"keyframes\"\n}\n","/**\n * A list of values that can be hardware-accelerated.\n */\nexport const acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved\n // or until we implement support for linear() easing.\n // \"background-color\"\n])\n","const browserColorFunctions =\n /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\\(/\n\nexport function hasBrowserOnlyColors(keyframes: any[]): boolean {\n for (let i = 0; i < keyframes.length; i++) {\n if (\n typeof keyframes[i] === \"string\" &&\n browserColorFunctions.test(keyframes[i])\n ) {\n return true\n }\n }\n return false\n}\n","import { memo } from \"motion-utils\"\nimport {\n AnyResolvedKeyframe,\n ValueAnimationOptionsWithRenderContext,\n} from \"../../types\"\nimport { acceleratedValues } from \"../utils/accelerated-values\"\nimport { hasBrowserOnlyColors } from \"../utils/is-browser-color\"\n\nconst colorProperties = new Set([\n \"color\",\n \"backgroundColor\",\n \"outlineColor\",\n \"fill\",\n \"stroke\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n])\n\nconst supportsWaapi = /*@__PURE__*/ memo(() =>\n Object.hasOwnProperty.call(Element.prototype, \"animate\")\n)\n\nexport function supportsBrowserAnimation(\n options: ValueAnimationOptionsWithRenderContext\n) {\n const {\n motionValue,\n name,\n repeatDelay,\n repeatType,\n damping,\n type,\n keyframes,\n } = options\n\n const subject = motionValue?.owner?.current\n\n /**\n * We use this check instead of isHTMLElement() because we explicitly\n * **don't** want elements in different timing contexts (i.e. popups)\n * to be accelerated, as it's not possible to sync these animations\n * properly with those driven from the main window frameloop.\n */\n if (!(subject instanceof HTMLElement)) {\n return false\n }\n\n const { onUpdate, transformTemplate } = motionValue!.owner!.getProps()\n\n return (\n supportsWaapi() &&\n name &&\n /**\n * Force WAAPI for color properties with browser-only color formats\n * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n */\n (acceleratedValues.has(name) ||\n (colorProperties.has(name) &&\n hasBrowserOnlyColors(keyframes))) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\"\n )\n}\n","import { MotionGlobalConfig, noop } from \"motion-utils\"\nimport { time } from \"../frameloop/sync-time\"\nimport { JSAnimation } from \"./JSAnimation\"\nimport { getFinalKeyframe } from \"./keyframes/get-final\"\nimport {\n KeyframeResolver as DefaultKeyframeResolver,\n flushKeyframeResolvers,\n ResolvedKeyframes,\n} from \"./keyframes/KeyframesResolver\"\nimport { NativeAnimationExtended } from \"./NativeAnimationExtended\"\nimport {\n AnimationPlaybackControls,\n AnyResolvedKeyframe,\n TimelineWithFallback,\n ValueAnimationOptions,\n} from \"./types\"\nimport { canAnimate } from \"./utils/can-animate\"\nimport { makeAnimationInstant } from \"./utils/make-animation-instant\"\nimport { WithPromise } from \"./utils/WithPromise\"\nimport { supportsBrowserAnimation } from \"./waapi/supports/waapi\"\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40\n\ntype OptionsWithoutKeyframes = Omit<\n ValueAnimationOptions,\n \"keyframes\"\n>\n\nexport class AsyncMotionValueAnimation\n extends WithPromise\n implements AnimationPlaybackControls\n{\n private createdAt: number\n\n private resolvedAt: number | undefined\n\n private _animation: AnimationPlaybackControls | undefined\n\n private pendingTimeline: TimelineWithFallback | undefined\n\n private keyframeResolver: DefaultKeyframeResolver | undefined\n\n private stopTimeline: VoidFunction | undefined\n\n constructor({\n autoplay = true,\n delay = 0,\n type = \"keyframes\",\n repeat = 0,\n repeatDelay = 0,\n repeatType = \"loop\",\n keyframes,\n name,\n motionValue,\n element,\n ...options\n }: ValueAnimationOptions) {\n super()\n\n this.createdAt = time.now()\n\n const optionsWithDefaults: OptionsWithoutKeyframes = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n }\n\n const KeyframeResolver =\n element?.KeyframeResolver || DefaultKeyframeResolver\n\n this.keyframeResolver = new KeyframeResolver(\n keyframes,\n (\n resolvedKeyframes: ResolvedKeyframes,\n finalKeyframe: T,\n forced: boolean\n ) =>\n this.onKeyframesResolved(\n resolvedKeyframes,\n finalKeyframe,\n optionsWithDefaults,\n !forced\n ),\n name,\n motionValue,\n element\n )\n this.keyframeResolver?.scheduleResolve()\n }\n\n onKeyframesResolved(\n keyframes: ResolvedKeyframes,\n finalKeyframe: T,\n options: OptionsWithoutKeyframes,\n sync: boolean\n ) {\n this.keyframeResolver = undefined\n\n const { name, type, velocity, delay, isHandoff, onUpdate } = options\n this.resolvedAt = time.now()\n\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n let canAnimateValue = true\n if (!canAnimate(keyframes, name, type, velocity)) {\n canAnimateValue = false\n\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe))\n }\n\n keyframes[0] = keyframes[keyframes.length - 1]\n\n makeAnimationInstant(options)\n options.repeat = 0\n }\n\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first committed frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined\n\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n }\n\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n *\n * Also skip WAAPI when keyframes aren't animatable, as the resolved\n * values may not be valid CSS and would trigger browser warnings.\n */\n const useWaapi =\n canAnimateValue &&\n !isHandoff &&\n supportsBrowserAnimation(resolvedOptions)\n const element = resolvedOptions.motionValue?.owner?.current\n\n let animation: AnimationPlaybackControls\n if (useWaapi) {\n try {\n animation = new NativeAnimationExtended({\n ...resolvedOptions,\n element,\n } as any)\n } catch {\n animation = new JSAnimation(resolvedOptions)\n }\n } else {\n animation = new JSAnimation(resolvedOptions)\n }\n\n animation.finished.then(() => {\n this.notifyFinished()\n }).catch(noop)\n\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline)\n this.pendingTimeline = undefined\n }\n\n this._animation = animation\n }\n\n get finished() {\n if (!this._animation) {\n return this._finished\n } else {\n return this.animation.finished\n }\n }\n\n then(onResolve: VoidFunction, _onReject?: VoidFunction) {\n return this.finished.finally(onResolve).then(() => {})\n }\n\n get animation(): AnimationPlaybackControls {\n if (!this._animation) {\n this.keyframeResolver?.resume()\n flushKeyframeResolvers()\n }\n\n return this._animation!\n }\n\n get duration() {\n return this.animation.duration\n }\n\n get iterationDuration() {\n return this.animation.iterationDuration\n }\n\n get time() {\n return this.animation.time\n }\n\n set time(newTime: number) {\n this.animation.time = newTime\n }\n\n get speed() {\n return this.animation.speed\n }\n\n get state() {\n return this.animation.state\n }\n\n set speed(newSpeed: number) {\n this.animation.speed = newSpeed\n }\n\n get startTime() {\n return this.animation.startTime\n }\n\n attachTimeline(timeline: TimelineWithFallback) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline)\n } else {\n this.pendingTimeline = timeline\n }\n\n return () => this.stop()\n }\n\n play() {\n this.animation.play()\n }\n\n pause() {\n this.animation.pause()\n }\n\n complete() {\n this.animation.complete()\n }\n\n cancel() {\n if (this._animation) {\n this.animation.cancel()\n }\n\n this.keyframeResolver?.cancel()\n }\n\n /**\n * Bound to support return animation.stop pattern\n */\n stop = () => {\n if (this._animation) {\n this._animation.stop()\n this.stopTimeline?.()\n }\n\n this.keyframeResolver?.cancel()\n }\n}\n","import { AnimationPlaybackControls, TimelineWithFallback } from \"./types\"\n\ntype PropNames =\n | \"time\"\n | \"speed\"\n | \"duration\"\n | \"attachTimeline\"\n | \"startTime\"\n | \"state\"\n\nexport type AcceptedAnimations = AnimationPlaybackControls\n\nexport type GroupedAnimations = AcceptedAnimations[]\n\nexport class GroupAnimation implements AnimationPlaybackControls {\n animations: GroupedAnimations\n\n constructor(animations: Array) {\n this.animations = animations.filter(Boolean) as GroupedAnimations\n }\n\n get finished() {\n return Promise.all(\n this.animations.map((animation) => animation.finished)\n )\n }\n\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n private getAll(propName: PropNames) {\n return this.animations[0][propName] as any\n }\n\n private setAll(propName: PropNames, newValue: any) {\n for (let i = 0; i < this.animations.length; i++) {\n ;(this.animations[i][propName] as any) = newValue\n }\n }\n\n attachTimeline(timeline: TimelineWithFallback) {\n const subscriptions = this.animations.map((animation) =>\n animation.attachTimeline(timeline)\n )\n\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel()\n this.animations[i].stop()\n })\n }\n }\n\n get time() {\n return this.getAll(\"time\")\n }\n\n set time(time: number) {\n this.setAll(\"time\", time)\n }\n\n get speed() {\n return this.getAll(\"speed\")\n }\n\n set speed(speed: number) {\n this.setAll(\"speed\", speed)\n }\n\n get state() {\n return this.getAll(\"state\")\n }\n\n get startTime() {\n return this.getAll(\"startTime\")\n }\n\n get duration() {\n return getMax(this.animations, \"duration\")\n }\n\n get iterationDuration() {\n return getMax(this.animations, \"iterationDuration\")\n }\n\n private runAll(\n methodName: keyof Omit<\n AnimationPlaybackControls,\n PropNames | \"then\" | \"finished\" | \"iterationDuration\"\n >\n ) {\n this.animations.forEach((controls) => controls[methodName]())\n }\n\n play() {\n this.runAll(\"play\")\n }\n\n pause() {\n this.runAll(\"pause\")\n }\n\n // Bound to accomadate common `return animation.stop` pattern\n stop = () => this.runAll(\"stop\")\n\n cancel() {\n this.runAll(\"cancel\")\n }\n\n complete() {\n this.runAll(\"complete\")\n }\n}\n\nfunction getMax(\n animations: GroupedAnimations,\n propName: \"iterationDuration\" | \"duration\"\n): number {\n let max = 0\n\n for (let i = 0; i < animations.length; i++) {\n const value = animations[i][propName]\n if (value !== null && value > max) {\n max = value\n }\n }\n return max\n}\n","import { GroupAnimation } from \"./GroupAnimation\"\nimport { AnimationPlaybackControlsWithThen } from \"./types\"\n\nexport class GroupAnimationWithThen\n extends GroupAnimation\n implements AnimationPlaybackControlsWithThen\n{\n then(onResolve: VoidFunction, _onReject?: VoidFunction) {\n return this.finished.finally(onResolve).then(() => {})\n }\n}\n","import { NativeAnimation } from \"./NativeAnimation\"\nimport { AnyResolvedKeyframe } from \"./types\"\n\nexport class NativeAnimationWrapper<\n T extends AnyResolvedKeyframe\n> extends NativeAnimation {\n constructor(animation: Animation) {\n super()\n\n this.animation = animation\n animation.onfinish = () => {\n this.finishedTime = this.time\n this.notifyFinished()\n }\n }\n}\n","import { NativeAnimation } from \"../NativeAnimation\"\nimport { AnyResolvedKeyframe } from \"../types\"\n\nconst animationMaps = new WeakMap<\n Element,\n Map>\n>()\nexport const animationMapKey = (name: string, pseudoElement: string = \"\") =>\n `${name}:${pseudoElement}`\n\nexport function getAnimationMap(element: Element) {\n let map = animationMaps.get(element)\n if (!map) {\n map = new Map()\n animationMaps.set(element, map)\n }\n return map\n}\n","import type { DynamicOption } from \"../types\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\nexport function calcChildStagger(\n children: Set,\n child: VisualElement,\n delayChildren?: number | DynamicOption,\n staggerChildren: number = 0,\n staggerDirection: number = 1\n): number {\n const index = Array.from(children)\n .sort((a, b) => a.sortNodePosition(b))\n .indexOf(child)\n const numChildren = children.size\n const maxStaggerDuration = (numChildren - 1) * staggerChildren\n const delayIsFunction = typeof delayChildren === \"function\"\n\n return delayIsFunction\n ? delayChildren(index, numChildren)\n : staggerDirection === 1\n ? index * staggerChildren\n : maxStaggerDuration - index * staggerChildren\n}\n","import {\n EasingFunction,\n SubscriptionManager,\n velocityPerSecond,\n warnOnce,\n} from \"motion-utils\"\nimport {\n AnimationPlaybackControlsWithThen,\n AnyResolvedKeyframe,\n TransformProperties,\n} from \"../animation/types\"\nimport { frame } from \"../frameloop\"\nimport { time } from \"../frameloop/sync-time\"\n\n/**\n * @public\n */\nexport type Subscriber = (v: T) => void\n\n/**\n * @public\n */\nexport type PassiveEffect = (v: T, safeSetter: (v: T) => void) => void\n\nexport type StartAnimation = (\n complete: () => void\n) => AnimationPlaybackControlsWithThen | undefined\n\nexport interface MotionValueEventCallbacks {\n animationStart: () => void\n animationComplete: () => void\n animationCancel: () => void\n change: (latestValue: V) => void\n destroy: () => void\n}\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30\n\nconst isFloat = (value: any): value is string => {\n return !isNaN(parseFloat(value))\n}\n\ninterface ResolvedValues {\n [key: string]: AnyResolvedKeyframe\n}\n\nexport interface Owner {\n current: HTMLElement | unknown\n getProps: () => {\n onUpdate?: (latest: ResolvedValues) => void\n transformTemplate?: (\n transform: TransformProperties,\n generatedTransform: string\n ) => string\n }\n}\n\nexport interface AccelerateConfig {\n factory: (animation: AnimationPlaybackControlsWithThen) => VoidFunction\n times: number[]\n keyframes: any[]\n ease?: EasingFunction | EasingFunction[]\n duration: number\n isTransformed?: boolean\n}\n\nexport interface MotionValueOptions {\n owner?: Owner\n}\n\nexport const collectMotionValues: { current: MotionValue[] | undefined } = {\n current: undefined,\n}\n\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nexport class MotionValue {\n /**\n * If a MotionValue has an owner, it was created internally within Motion\n * and therefore has no external listeners. It is therefore safe to animate via WAAPI.\n */\n owner?: Owner\n\n /**\n * The current state of the `MotionValue`.\n */\n private current: V | undefined\n\n /**\n * The previous state of the `MotionValue`.\n */\n private prev: V | undefined\n\n /**\n * The previous state of the `MotionValue` at the end of the previous frame.\n */\n private prevFrameValue: V | undefined\n\n /**\n * The last time the `MotionValue` was updated.\n */\n updatedAt: number\n\n /**\n * The time `prevFrameValue` was updated.\n */\n prevUpdatedAt: number | undefined\n\n /**\n * Add a passive effect to this `MotionValue`.\n *\n * A passive effect intercepts calls to `set`. For instance, `useSpring` adds\n * a passive effect that attaches a `spring` to the latest\n * set value. Hypothetically there could be a `useSmooth` that attaches an input smoothing effect.\n *\n * @internal\n */\n private passiveEffect?: PassiveEffect\n private stopPassiveEffect?: VoidFunction\n\n /**\n * Whether the passive effect is active.\n */\n isEffectActive?: boolean\n\n /**\n * A reference to the currently-controlling animation.\n */\n animation?: AnimationPlaybackControlsWithThen\n\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n private canTrackVelocity: boolean | null = null\n\n /**\n * A list of MotionValues whose values are computed from this one.\n * This is a rough start to a proper signal-like dirtying system.\n */\n private dependents: Set | undefined\n\n /**\n * Tracks whether this value should be removed\n */\n liveStyle?: boolean\n\n /**\n * Scroll timeline acceleration metadata. When set, VisualElement\n * can create a native WAAPI animation attached to a scroll timeline\n * instead of driving updates through JS.\n */\n accelerate?: AccelerateConfig\n\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init: V, options: MotionValueOptions = {}) {\n this.setCurrent(init)\n this.owner = options.owner\n }\n\n setCurrent(current: V) {\n this.current = current\n this.updatedAt = time.now()\n\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current)\n }\n }\n\n setPrevFrameValue(prevFrameValue: V | undefined = this.current) {\n this.prevFrameValue = prevFrameValue\n this.prevUpdatedAt = this.updatedAt\n }\n\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return \n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription: Subscriber): () => void {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n false,\n `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`\n )\n }\n return this.on(\"change\", subscription)\n }\n\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n private events: {\n [key: string]: SubscriptionManager\n } = {}\n\n on>(\n eventName: EventName,\n callback: MotionValueEventCallbacks[EventName]\n ) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager()\n }\n\n const unsubscribe = this.events[eventName].add(callback)\n\n if (eventName === \"change\") {\n return () => {\n unsubscribe()\n\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop()\n }\n })\n }\n }\n\n return unsubscribe\n }\n\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear()\n }\n }\n\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect: PassiveEffect, stopPassiveEffect: VoidFunction) {\n this.passiveEffect = passiveEffect\n this.stopPassiveEffect = stopPassiveEffect\n }\n\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v: V) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v)\n } else {\n this.passiveEffect(v, this.updateAndNotify)\n }\n }\n\n setWithVelocity(prev: V, current: V, delta: number) {\n this.set(current)\n this.prev = undefined\n this.prevFrameValue = prev\n this.prevUpdatedAt = this.updatedAt - delta\n }\n\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v: V, endAnimation = true) {\n this.updateAndNotify(v)\n this.prev = v\n this.prevUpdatedAt = this.prevFrameValue = undefined\n endAnimation && this.stop()\n if (this.stopPassiveEffect) this.stopPassiveEffect()\n }\n\n dirty() {\n this.events.change?.notify(this.current)\n }\n\n addDependent(dependent: MotionValue) {\n if (!this.dependents) {\n this.dependents = new Set()\n }\n this.dependents.add(dependent)\n }\n\n removeDependent(dependent: MotionValue) {\n if (this.dependents) {\n this.dependents.delete(dependent)\n }\n }\n\n updateAndNotify = (v: V) => {\n const currentTime = time.now()\n\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue()\n }\n\n this.prev = this.current\n\n this.setCurrent(v)\n\n // Update update subscribers\n if (this.current !== this.prev) {\n this.events.change?.notify(this.current)\n\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty()\n }\n }\n }\n }\n\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this)\n }\n\n return this.current!\n }\n\n /**\n * @public\n */\n getPrevious() {\n return this.prev\n }\n\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now()\n\n if (\n !this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA\n ) {\n return 0\n }\n\n const delta = Math.min(\n this.updatedAt - this.prevUpdatedAt!,\n MAX_VELOCITY_DELTA\n )\n\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(\n parseFloat(this.current as any) -\n parseFloat(this.prevFrameValue as any),\n delta\n )\n }\n\n hasAnimated = false\n\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation: StartAnimation) {\n this.stop()\n\n return new Promise((resolve) => {\n this.hasAnimated = true\n this.animation = startAnimation(resolve)\n\n if (this.events.animationStart) {\n this.events.animationStart.notify()\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify()\n }\n this.clearAnimation()\n })\n }\n\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop()\n if (this.events.animationCancel) {\n this.events.animationCancel.notify()\n }\n }\n this.clearAnimation()\n }\n\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation\n }\n\n private clearAnimation() {\n delete this.animation\n }\n\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear()\n this.events.destroy?.notify()\n this.clearListeners()\n this.stop()\n\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect()\n }\n }\n}\n\nexport function motionValue(init: V, options?: MotionValueOptions) {\n return new MotionValue(init, options)\n}\n","/**\n * If `transition` has `inherit: true`, shallow-merge it with\n * `parentTransition` (child keys win) and strip the `inherit` key.\n * Otherwise return `transition` unchanged.\n */\nexport function resolveTransition(\n transition: any,\n parentTransition?: any\n) {\n if (transition?.inherit && parentTransition) {\n const { inherit: _, ...rest } = transition\n return { ...parentTransition, ...rest }\n }\n\n return transition\n}\n","import { resolveTransition } from \"./resolve-transition\"\n\nexport function getValueTransition(transition: any, key: string) {\n const valueTransition =\n transition?.[key as keyof typeof transition] ??\n transition?.[\"default\"] ??\n transition\n\n if (valueTransition !== transition) {\n return resolveTransition(valueTransition, transition)\n }\n\n return valueTransition\n}\n","import { transformProps } from \"../../render/utils/keys-transform\"\nimport type { ValueAnimationOptions } from \"../types\"\n\nconst underDampedSpring: Partial = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n}\n\nconst criticallyDampedSpring = (\n target: unknown\n): Partial => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n})\n\nconst keyframesTransition: Partial = {\n type: \"keyframes\",\n duration: 0.8,\n}\n\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease: Partial = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n}\n\nexport const getDefaultTransition = (\n valueKey: string,\n { keyframes }: ValueAnimationOptions\n): Partial => {\n if (keyframes.length > 2) {\n return keyframesTransition\n } else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring\n }\n\n return ease\n}\n","import type { AnyResolvedKeyframe } from \"../types\"\nimport type { Transition } from \"../types\"\n\nconst orchestrationKeys = new Set([\n \"when\",\n \"delay\",\n \"delayChildren\",\n \"staggerChildren\",\n \"staggerDirection\",\n \"repeat\",\n \"repeatType\",\n \"repeatDelay\",\n \"from\",\n \"elapsed\",\n])\n\n/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nexport function isTransitionDefined(\n transition: Transition & { elapsed?: number; from?: AnyResolvedKeyframe }\n) {\n for (const key in transition) {\n if (!orchestrationKeys.has(key)) return true\n }\n return false\n}\n","import { MotionGlobalConfig, secondsToMilliseconds } from \"motion-utils\"\nimport { AsyncMotionValueAnimation } from \"../AsyncMotionValueAnimation\"\nimport { JSAnimation } from \"../JSAnimation\"\nimport type {\n AnyResolvedKeyframe,\n ValueAnimationOptions,\n ValueTransition,\n} from \"../types\"\nimport type { UnresolvedKeyframes } from \"../keyframes/KeyframesResolver\"\nimport { getValueTransition } from \"../utils/get-value-transition\"\nimport { makeAnimationInstant } from \"../utils/make-animation-instant\"\nimport { getDefaultTransition } from \"../utils/default-transitions\"\nimport { getFinalKeyframe } from \"../keyframes/get-final\"\nimport { isTransitionDefined } from \"../utils/is-transition-defined\"\nimport { frame } from \"../../frameloop\"\nimport type { MotionValue, StartAnimation } from \"../../value\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\nexport const animateMotionValue =\n (\n name: string,\n value: MotionValue,\n target: V | UnresolvedKeyframes,\n transition: ValueTransition & { elapsed?: number } = {},\n element?: VisualElement,\n isHandoff?: boolean\n ): StartAnimation =>\n (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {}\n\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0\n\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition\n elapsed = elapsed - secondsToMilliseconds(delay)\n\n const options: ValueAnimationOptions = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v)\n valueTransition.onUpdate && valueTransition.onUpdate(v)\n },\n onComplete: () => {\n onComplete()\n valueTransition.onComplete && valueTransition.onComplete()\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n }\n\n /**\n * If there's no transition defined for this value, we can generate\n * unique transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n Object.assign(options, getDefaultTransition(name, options))\n }\n\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n options.duration &&= secondsToMilliseconds(options.duration)\n options.repeatDelay &&= secondsToMilliseconds(options.repeatDelay)\n\n /**\n * Support deprecated way to set initial value. Prefer keyframe syntax.\n */\n if (options.from !== undefined) {\n options.keyframes[0] = options.from as any\n }\n\n let shouldSkip = false\n\n if (\n (options as any).type === false ||\n (options.duration === 0 && !options.repeatDelay)\n ) {\n makeAnimationInstant(options)\n\n if (options.delay === 0) {\n shouldSkip = true\n }\n }\n\n if (\n MotionGlobalConfig.instantAnimations ||\n MotionGlobalConfig.skipAnimations ||\n element?.shouldSkipAnimations ||\n valueTransition.skipAnimations\n ) {\n shouldSkip = true\n makeAnimationInstant(options)\n options.delay = 0\n }\n\n /**\n * If the transition type or easing has been explicitly set by the user\n * then we don't want to allow flattening the animation.\n */\n options.allowFlatten = !valueTransition.type && !valueTransition.ease\n\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(\n options.keyframes as V[],\n valueTransition\n )\n\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate!(finalKeyframe)\n options.onComplete!()\n })\n\n return\n }\n }\n\n return valueTransition.isSync\n ? new JSAnimation(options)\n : new AsyncMotionValueAnimation(options)\n }\n","import { wrap } from \"motion-utils\"\nimport { motionValue } from \"../../value\"\nimport { animateMotionValue } from \"../interfaces/motion-value\"\nimport type { MotionPath, PathInterpolator, Point2D } from \"../types\"\nimport { getValueTransition } from \"./get-value-transition\"\n\nexport interface ArcOptions {\n /**\n * How far the arc bulges perpendicular to the straight-line path,\n * as a fraction of the total distance. A value of `1` means the arc\n * peaks at a height equal to the full travel distance. Default `0.5`.\n */\n strength?: number\n /**\n * Where along the path (0–1) the arc reaches its maximum height.\n * Default `0.5` (symmetric).\n */\n peak?: number\n /**\n * Which side the arc bulges toward.\n * - `\"cw\"` / `\"ccw\"` — locked relative to direction of travel\n * - unset — auto-pick a stable screen-space side\n */\n direction?: \"cw\" | \"ccw\"\n /**\n * Rotates the element to follow the tangent of the arc path.\n * - `true` — full tangent following (1.0)\n * - number 0–1 — scale factor\n */\n rotate?: boolean | number\n}\n\nconst MIN_LAYOUT_DISTANCE = 20\n\nfunction bezierPoint(\n t: number,\n origin: number,\n control: number,\n target: number\n): number {\n const inv = 1 - t\n return inv * inv * origin + 2 * inv * t * control + t * t * target\n}\n\nfunction bezierTangentAngle(\n t: number,\n originX: number,\n controlX: number,\n targetX: number,\n originY: number,\n controlY: number,\n targetY: number\n): number {\n const dx =\n 2 * (1 - t) * (controlX - originX) + 2 * t * (targetX - controlX)\n const dy =\n 2 * (1 - t) * (controlY - originY) + 2 * t * (targetY - controlY)\n return Math.atan2(dy, dx) * (180 / Math.PI)\n}\n\nfunction computeArcControlPoint(\n fromX: number,\n fromY: number,\n toX: number,\n toY: number,\n strength: number,\n peak: number\n): { x: number; y: number } {\n const deltaX = toX - fromX\n const deltaY = toY - fromY\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY)\n\n if (distance > 0) {\n const normalPerpX = -deltaY / distance\n const normalPerpY = deltaX / distance\n const desiredHeight = strength * distance\n\n return {\n x: fromX + deltaX * peak + normalPerpX * desiredHeight,\n y: fromY + deltaY * peak + normalPerpY * desiredHeight,\n }\n }\n\n return { x: fromX, y: fromY }\n}\n\n/**\n * The pure sampling factory: `(from, to) => (t) => point`. Internal —\n * used by {@link arc} and the unit tests. Not part of the public surface.\n */\nexport function createArcPath({\n strength = 0.5,\n peak = 0.5,\n direction,\n rotate = false,\n}: ArcOptions = {}): (from: Point2D, to: Point2D) => PathInterpolator {\n const rotationScale =\n rotate === true ? 1 : typeof rotate === \"number\" ? rotate : 0\n\n // Auto-direction only: persists across calls to flip the bulge back\n // onto the same screen side when the dominant axis changes between\n // calls. Reuse the factory (module scope / useMemo) to keep this alive.\n let prevBulgeSign: number | undefined\n\n const createInterpolator = (\n from: Point2D,\n to: Point2D\n ): PathInterpolator => {\n const dx = to.x - from.x\n const dy = to.y - from.y\n\n let signed: number\n if (direction === \"cw\") {\n signed = -strength\n } else if (direction === \"ccw\") {\n signed = strength\n } else {\n const dom = Math.abs(dx) >= Math.abs(dy) ? dx : dy\n signed = dom < 0 ? -strength : strength\n }\n\n let control = computeArcControlPoint(\n from.x,\n from.y,\n to.x,\n to.y,\n signed,\n peak\n )\n\n if (direction === undefined) {\n const isVertical = Math.abs(dx) < Math.abs(dy)\n const midX = from.x + dx * peak\n const midY = from.y + dy * peak\n const bulgeSign = isVertical\n ? Math.sign(control.x - midX)\n : Math.sign(control.y - midY)\n\n if (\n prevBulgeSign !== undefined &&\n bulgeSign !== 0 &&\n bulgeSign !== prevBulgeSign\n ) {\n signed = -signed\n control = computeArcControlPoint(\n from.x,\n from.y,\n to.x,\n to.y,\n signed,\n peak\n )\n } else if (bulgeSign !== 0) {\n prevBulgeSign = bulgeSign\n }\n }\n\n const tangent0 = rotationScale\n ? bezierTangentAngle(\n 0,\n from.x,\n control.x,\n to.x,\n from.y,\n control.y,\n to.y\n )\n : 0\n const tangent1 = rotationScale\n ? bezierTangentAngle(\n 1,\n from.x,\n control.x,\n to.x,\n from.y,\n control.y,\n to.y\n )\n : 0\n const tangentDelta = rotationScale\n ? wrap(-180, 180, tangent1 - tangent0)\n : 0\n\n return (t: number) => {\n const out: { x: number; y: number; rotate?: number } = {\n x: bezierPoint(t, from.x, control.x, to.x),\n y: bezierPoint(t, from.y, control.y, to.y),\n }\n if (rotationScale) {\n const raw = bezierTangentAngle(\n t,\n from.x,\n control.x,\n to.x,\n from.y,\n control.y,\n to.y\n )\n const baseline = tangent0 + tangentDelta * t\n out.rotate = wrap(-180, 180, raw - baseline) * rotationScale\n }\n return out\n }\n }\n\n return createInterpolator\n}\n\n/**\n * Creates a curved path for `transition.path`:\n *\n * ```ts\n * \n * ```\n *\n * Reuse the returned value (module scope / useMemo / useRef) so its\n * continuity closure survives re-renders — a fresh `arc()` has no memory.\n */\nexport function arc(options: ArcOptions = {}): MotionPath {\n const sample = createArcPath(options)\n\n const path: MotionPath = {\n interpolateProjection(delta) {\n // `from` is the current translate offset (carries any in-flight\n // displacement when interrupted); `to` is the new layout origin.\n // The distance floor avoids visible wobble on tiny shifts.\n const tx = delta.x.translate\n const ty = delta.y.translate\n if (Math.sqrt(tx * tx + ty * ty) < MIN_LAYOUT_DISTANCE) {\n return undefined\n }\n return sample({ x: tx, y: ty }, { x: 0, y: 0 })\n },\n\n animateVisualElement(\n visualElement,\n target,\n transition,\n delay,\n animations\n ) {\n if (!(\"x\" in target || \"y\" in target)) return\n\n const xValue = visualElement.getValue(\n \"x\",\n visualElement.latestValues[\"x\"] ?? 0\n )\n const yValue = visualElement.getValue(\n \"y\",\n visualElement.latestValues[\"y\"] ?? 0\n )\n\n const xRaw = target.x as number | number[] | undefined\n const yRaw = target.y as number | number[] | undefined\n\n const xFrom = ((Array.isArray(xRaw) && xRaw[0] != null\n ? xRaw[0]\n : xValue?.get()) as number) ?? 0\n const yFrom = ((Array.isArray(yRaw) && yRaw[0] != null\n ? yRaw[0]\n : yValue?.get()) as number) ?? 0\n const xTo = (Array.isArray(xRaw)\n ? xRaw[xRaw.length - 1]\n : xRaw ?? xFrom) as number\n const yTo = (Array.isArray(yRaw)\n ? yRaw[yRaw.length - 1]\n : yRaw ?? yFrom) as number\n\n // Interruption needs no flag: x/y already hold the displaced\n // mid-arc position, so xFrom/yFrom carry the continuity geometry.\n const interpolate = sample(\n { x: xFrom, y: yFrom },\n { x: xTo, y: yTo }\n )\n\n // Drive a dedicated `pathRotation` value (composed onto `rotate`\n // at the build sites) rather than `rotate` itself, so a\n // concurrent rotate animation composes and nothing accumulates\n // on interrupt.\n const pathRotationValue =\n interpolate(0).rotate !== undefined\n ? visualElement.getValue(\"pathRotation\", 0)\n : undefined\n\n const pathTransition = {\n delay,\n ...getValueTransition(transition || {}, \"x\"),\n }\n delete (pathTransition as { path?: unknown }).path\n\n const progress = motionValue(0)\n progress.start(\n animateMotionValue(\"\", progress, [0, 1000] as any, {\n ...pathTransition,\n isSync: true,\n velocity: 0,\n onUpdate: (latest: number) => {\n const point = interpolate(latest / 1000)\n xValue?.set(point.x)\n yValue?.set(point.y)\n if (pathRotationValue && point.rotate !== undefined) {\n pathRotationValue.set(point.rotate)\n }\n },\n onComplete: () => {\n xValue?.set(xTo)\n yValue?.set(yTo)\n pathRotationValue?.set(0)\n },\n // Interrupt/cancel must clear our additive contribution\n // so it can't linger on top of the user's `rotate`.\n onStop: () => pathRotationValue?.set(0),\n onCancel: () => pathRotationValue?.set(0),\n })\n )\n\n if (progress.animation) animations.push(progress.animation)\n\n delete (target as { x?: unknown }).x\n delete (target as { y?: unknown }).y\n },\n }\n\n return path\n}\n","import { invariant, isNumericalString } from \"motion-utils\"\nimport { AnyResolvedKeyframe } from \"../types\"\nimport { CSSVariableToken, isCSSVariableToken } from \"./is-css-variable\"\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\n\nconst splitCSSVariableRegex =\n // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n /^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u\nexport function parseCSSVariable(current: string) {\n const match = splitCSSVariableRegex.exec(current)\n if (!match) return [,]\n\n const [, token1, token2, fallback] = match\n return [`--${token1 ?? token2}`, fallback]\n}\n\nconst maxDepth = 4\nexport function getVariableValue(\n current: CSSVariableToken,\n element: Element,\n depth = 1\n): AnyResolvedKeyframe | undefined {\n invariant(\n depth <= maxDepth,\n `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`,\n \"max-css-var-depth\"\n )\n\n const [token, fallback] = parseCSSVariable(current)\n\n // No CSS variable detected\n if (!token) return\n\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token)\n\n if (resolved) {\n const trimmed = resolved.trim()\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed\n }\n\n return isCSSVariableToken(fallback)\n ? getVariableValue(fallback, element, depth + 1)\n : fallback\n}\n","import type {\n AnimationDefinition,\n MotionNodeOptions,\n TargetAndTransition,\n TargetResolver,\n} from \"../../node/types\"\nimport type { ResolvedValues } from \"../types\"\n\nfunction getValueState(visualElement?: any): [ResolvedValues, ResolvedValues] {\n const state: [ResolvedValues, ResolvedValues] = [{}, {}]\n\n visualElement?.values.forEach((value: any, key: string) => {\n state[0][key] = value.get()\n state[1][key] = value.getVelocity()\n })\n\n return state\n}\n\nexport function resolveVariantFromProps(\n props: MotionNodeOptions,\n definition: TargetAndTransition | TargetResolver,\n custom?: any,\n visualElement?: any\n): TargetAndTransition\nexport function resolveVariantFromProps(\n props: MotionNodeOptions,\n definition?: AnimationDefinition,\n custom?: any,\n visualElement?: any\n): undefined | TargetAndTransition\nexport function resolveVariantFromProps(\n props: MotionNodeOptions,\n definition?: AnimationDefinition,\n custom?: any,\n visualElement?: any\n) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement)\n definition = definition(\n custom !== undefined ? custom : props.custom,\n current,\n velocity\n )\n }\n\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition]\n }\n\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement)\n definition = definition(\n custom !== undefined ? custom : props.custom,\n current,\n velocity\n )\n }\n\n return definition\n}\n","import type {\n AnimationDefinition,\n TargetAndTransition,\n TargetResolver,\n} from \"../../node/types\"\nimport { resolveVariantFromProps } from \"./resolve-variants\"\n\n/**\n * Resolves a variant if it's a variant resolver.\n * Uses `any` type for visualElement to avoid circular dependencies.\n */\nexport function resolveVariant(\n visualElement: any,\n definition?: TargetAndTransition | TargetResolver,\n custom?: any\n): TargetAndTransition\nexport function resolveVariant(\n visualElement: any,\n definition?: AnimationDefinition,\n custom?: any\n): TargetAndTransition | undefined\nexport function resolveVariant(\n visualElement: any,\n definition?: AnimationDefinition,\n custom?: any\n) {\n const props = visualElement.getProps()\n return resolveVariantFromProps(\n props,\n definition,\n custom !== undefined ? custom : props.custom,\n visualElement\n )\n}\n","import { transformPropOrder } from \"./keys-transform\"\n\nexport const positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n ...transformPropOrder,\n])\n","import type { UnresolvedValueKeyframe, ValueKeyframesDefinition } from \"../../animation/types\"\n\nexport const isKeyframesTarget = (\n v: ValueKeyframesDefinition\n): v is UnresolvedValueKeyframe[] => {\n return Array.isArray(v)\n}\n","import { motionValue } from \"../../value\"\nimport { resolveVariant } from \"./resolve-dynamic-variants\"\nimport { isKeyframesTarget } from \"./is-keyframes-target\"\nimport type { AnimationDefinition } from \"../../node/types\"\nimport type {\n AnyResolvedKeyframe,\n UnresolvedValueKeyframe,\n ValueKeyframesDefinition,\n} from \"../../animation/types\"\nimport type { VisualElement } from \"../VisualElement\"\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(\n visualElement: VisualElement,\n key: string,\n value: AnyResolvedKeyframe\n) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key)!.set(value)\n } else {\n visualElement.addValue(key, motionValue(value))\n }\n}\n\nfunction resolveFinalValueInKeyframes(\n v: ValueKeyframesDefinition\n): UnresolvedValueKeyframe {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v\n}\n\nexport function setTarget(\n visualElement: VisualElement,\n definition: AnimationDefinition\n) {\n const resolved = resolveVariant(visualElement, definition)\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {}\n\n target = { ...target, ...transitionEnd }\n\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(\n target[key as keyof typeof target] as any\n )\n setMotionValue(visualElement, key, value as AnyResolvedKeyframe)\n }\n}\n","import type { MotionValue } from \"..\"\n\nexport const isMotionValue = (value: any): value is MotionValue =>\n Boolean(value && value.getVelocity)\n","import { isMotionValue } from \"../utils/is-motion-value\"\nimport type { WillChange } from \"./types\"\n\nexport function isWillChangeMotionValue(value: any): value is WillChange {\n return Boolean(isMotionValue(value) && (value as WillChange).add)\n}\n","import { MotionGlobalConfig } from \"motion-utils\"\nimport type { VisualElement } from \"../../render/VisualElement\"\nimport { isWillChangeMotionValue } from \"./is\"\n\nexport function addValueToWillChange(\n visualElement: VisualElement,\n key: string\n) {\n const willChange = visualElement.getValue(\"willChange\")\n\n /**\n * It could be that a user has set willChange to a regular MotionValue,\n * in which case we can't add the value to it.\n */\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key)\n } else if (!willChange && MotionGlobalConfig.WillChange) {\n const newWillChange = new MotionGlobalConfig.WillChange(\"auto\")\n\n visualElement.addValue(\"willChange\", newWillChange)\n newWillChange.add(key)\n }\n}\n","export function camelToDash(str: string): string {\n return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`)\n}\n","import { camelToDash } from \"../../render/dom/utils/camel-to-dash\"\n\nexport const optimizedAppearDataId = \"framerAppearId\"\n\nexport const optimizedAppearDataAttribute =\n \"data-\" + camelToDash(optimizedAppearDataId) as \"data-framer-appear-id\"\n","import { optimizedAppearDataAttribute } from \"./data-id\"\nimport type { WithAppearProps } from \"./types\"\n\nexport function getOptimisedAppearId(\n visualElement: WithAppearProps\n): string | undefined {\n return visualElement.props[optimizedAppearDataAttribute]\n}\n","import { frame } from \"../../frameloop\"\nimport { getValueTransition } from \"../utils/get-value-transition\"\nimport { resolveTransition } from \"../utils/resolve-transition\"\nimport { positionalKeys } from \"../../render/utils/keys-position\"\nimport { setTarget } from \"../../render/utils/setters\"\nimport { addValueToWillChange } from \"../../value/will-change/add-will-change\"\nimport { getOptimisedAppearId } from \"../optimized-appear/get-appear-id\"\nimport { animateMotionValue } from \"./motion-value\"\nimport type { MotionPath } from \"../types\"\nimport type { VisualElementAnimationOptions } from \"./types\"\nimport type { AnimationPlaybackControlsWithThen } from \"../types\"\nimport type { TargetAndTransition } from \"../../node/types\"\nimport type { AnimationTypeState } from \"../../render/utils/animation-state\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation(\n { protectedKeys, needsAnimating }: AnimationTypeState,\n key: string\n) {\n const shouldBlock =\n protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true\n\n needsAnimating[key] = false\n return shouldBlock\n}\n\nexport function animateTarget(\n visualElement: VisualElement,\n targetAndTransition: TargetAndTransition,\n { delay = 0, transitionOverride, type }: VisualElementAnimationOptions = {}\n): AnimationPlaybackControlsWithThen[] {\n let {\n transition,\n transitionEnd,\n ...target\n } = targetAndTransition\n\n const defaultTransition = visualElement.getDefaultTransition()\n transition = transition\n ? resolveTransition(transition, defaultTransition)\n : defaultTransition\n\n const reduceMotion = (transition as { reduceMotion?: boolean })?.reduceMotion\n const skipAnimations = transition?.skipAnimations\n\n if (transitionOverride) transition = transitionOverride\n\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n const animationTypeState =\n type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type]\n\n const path = (transition as { path?: MotionPath } | undefined)?.path\n if (path) {\n // path mutates `target` to claim x/y; loop below skips them.\n path.animateVisualElement(\n visualElement,\n target,\n transition,\n delay,\n animations\n )\n }\n\n for (const key in target) {\n const value = visualElement.getValue(\n key,\n visualElement.latestValues[key] ?? null\n )\n const valueTarget = target[key as keyof typeof target]\n\n if (\n valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))\n ) {\n continue\n }\n\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n }\n\n if (skipAnimations) valueTransition.skipAnimations = true\n\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const currentValue = value.get()\n if (\n currentValue !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity\n ) {\n frame.update(() => value.set(valueTarget as any))\n continue\n }\n\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement)\n\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(\n appearId,\n key,\n frame\n )\n\n if (startTime !== null) {\n valueTransition.startTime = startTime\n isHandoff = true\n }\n }\n }\n\n addValueToWillChange(visualElement, key)\n\n const shouldReduceMotion =\n reduceMotion ?? visualElement.shouldReduceMotion\n\n value.start(\n animateMotionValue(\n key,\n value,\n valueTarget,\n shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition,\n visualElement,\n isHandoff\n )\n )\n\n const animation = value.animation\n\n if (animation) {\n animations.push(animation)\n }\n }\n\n if (transitionEnd) {\n const applyTransitionEnd = () =>\n frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd)\n })\n\n if (animations.length) {\n Promise.all(animations).then(applyTransitionEnd)\n } else {\n applyTransitionEnd()\n }\n }\n\n return animations\n}\n","import { resolveVariant } from \"../../render/utils/resolve-dynamic-variants\"\nimport { calcChildStagger } from \"../utils/calc-child-stagger\"\nimport type { VisualElementAnimationOptions } from \"./types\"\nimport { animateTarget } from \"./visual-element-target\"\nimport type { DynamicOption } from \"../types\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\nexport function animateVariant(\n visualElement: VisualElement,\n variant: string,\n options: VisualElementAnimationOptions = {}\n): Promise {\n const resolved = resolveVariant(\n visualElement,\n variant,\n options.type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined\n )\n\n let { transition = visualElement.getDefaultTransition() || {} } =\n resolved || {}\n\n if (options.transitionOverride) {\n transition = options.transitionOverride\n }\n\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation: () => Promise = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve()\n\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations =\n visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const {\n delayChildren = 0,\n staggerChildren,\n staggerDirection,\n } = transition\n\n return animateChildren(\n visualElement,\n variant,\n forwardDelay,\n delayChildren,\n staggerChildren,\n staggerDirection,\n options\n )\n }\n : () => Promise.resolve()\n\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition\n if (when) {\n const [first, last] =\n when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation]\n\n return first().then(() => last())\n } else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)])\n }\n}\n\nfunction animateChildren(\n visualElement: VisualElement,\n variant: string,\n delay: number = 0,\n delayChildren: number | DynamicOption = 0,\n staggerChildren = 0,\n staggerDirection = 1,\n options: VisualElementAnimationOptions\n) {\n const animations: Promise[] = []\n\n for (const child of visualElement.variantChildren!) {\n child.notify(\"AnimationStart\", variant)\n animations.push(\n animateVariant(child, variant, {\n ...options,\n delay:\n delay +\n (typeof delayChildren === \"function\" ? 0 : delayChildren) +\n calcChildStagger(\n visualElement.variantChildren!,\n child,\n delayChildren,\n staggerChildren,\n staggerDirection\n ),\n }).then(() => child.notify(\"AnimationComplete\", variant))\n )\n }\n\n return Promise.all(animations)\n}\n","import { resolveVariant } from \"../../render/utils/resolve-dynamic-variants\"\nimport type { AnimationDefinition } from \"../../node/types\"\nimport type { VisualElement } from \"../../render/VisualElement\"\nimport type { VisualElementAnimationOptions } from \"./types\"\nimport { animateTarget } from \"./visual-element-target\"\nimport { animateVariant } from \"./visual-element-variant\"\n\nexport function animateVisualElement(\n visualElement: VisualElement,\n definition: AnimationDefinition,\n options: VisualElementAnimationOptions = {}\n) {\n visualElement.notify(\"AnimationStart\", definition)\n let animation: Promise\n\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) =>\n animateVariant(visualElement, variant, options)\n )\n animation = Promise.all(animations)\n } else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options)\n } else {\n const resolvedDefinition =\n typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition\n\n animation = Promise.all(\n animateTarget(visualElement, resolvedDefinition, options)\n )\n }\n\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition)\n })\n}\n","import { ValueType } from \"./types\"\n\n/**\n * ValueType for \"auto\"\n */\nexport const auto: ValueType = {\n test: (v: any) => v === \"auto\",\n parse: (v) => v,\n}\n","import { ValueType } from \"./types\"\n\n/**\n * Tests a provided value against a ValueType\n */\nexport const testValueType = (v: any) => (type: ValueType) => type.test(v)\n","import { auto } from \"./auto\"\nimport { number } from \"./numbers\"\nimport { degrees, percent, px, vh, vw } from \"./numbers/units\"\nimport { testValueType } from \"./test\"\n\n/**\n * A list of value types commonly used for dimensions\n */\nexport const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto]\n\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nexport const findDimensionValueType = (v: any) =>\n dimensionValueTypes.find(testValueType(v))\n","import { isZeroValueString } from \"motion-utils\"\nimport { AnyResolvedKeyframe } from \"../../types\"\n\nexport function isNone(value: AnyResolvedKeyframe | null) {\n if (typeof value === \"number\") {\n return value === 0\n } else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value)\n } else {\n return true\n }\n}\n","import { complex } from \".\"\nimport { floatRegex } from \"../utils/float-regex\"\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"])\n\nfunction applyDefaultFilter(v: string) {\n const [name, value] = v.slice(0, -1).split(\"(\")\n\n if (name === \"drop-shadow\") return v\n\n const [number] = value.match(floatRegex) || []\n if (!number) return v\n\n const unit = value.replace(number, \"\")\n let defaultValue = maxDefaults.has(name) ? 1 : 0\n if (number !== value) defaultValue *= 100\n\n return name + \"(\" + defaultValue + unit + \")\"\n}\n\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu\n\nexport const filter = {\n ...complex,\n getAnimatableNone: (v: string) => {\n const functions = v.match(functionRegex)\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v\n },\n}\n","import { complex } from \".\"\nimport { AnyResolvedKeyframe } from \"../../../animation/types\"\n\nexport const mask = {\n ...complex,\n getAnimatableNone: (v: AnyResolvedKeyframe) => {\n const parsed = complex.parse(v)\n const transformer = complex.createTransformer(v)\n return transformer(\n parsed.map((v) =>\n typeof v === \"number\" ? 0 : typeof v === \"object\" ? { ...v, alpha: 1 } : v\n )\n )\n },\n}\n","import { number } from \"./numbers\"\n\nexport const int = {\n ...number,\n transform: Math.round,\n}\n","import { alpha, scale } from \"../numbers\"\nimport { degrees, progressPercentage, px } from \"../numbers/units\"\nimport { ValueTypeMap } from \"./types\"\n\nexport const transformValueTypes: ValueTypeMap = {\n rotate: degrees,\n /**\n * Internal channel for `transition.path` orientToPath. Composed onto\n * `rotate` at the transform-build sites so the user's `rotate` is\n * never read or overwritten. Not part of `transformPropOrder`.\n */\n pathRotation: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n}\n","import { int } from \"../int\"\nimport { alpha } from \"../numbers\"\nimport { px } from \"../numbers/units\"\nimport { transformValueTypes } from \"./transform\"\nimport { ValueTypeMap } from \"./types\"\n\nexport const numberValueTypes: ValueTypeMap = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n inset: px,\n insetBlock: px,\n insetBlockStart: px,\n insetBlockEnd: px,\n insetInline: px,\n insetInlineStart: px,\n insetInlineEnd: px,\n\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n paddingBlock: px,\n paddingBlockStart: px,\n paddingBlockEnd: px,\n paddingInline: px,\n paddingInlineStart: px,\n paddingInlineEnd: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n marginBlock: px,\n marginBlockStart: px,\n marginBlockEnd: px,\n marginInline: px,\n marginInlineStart: px,\n marginInlineEnd: px,\n\n // Typography\n fontSize: px,\n\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n\n ...transformValueTypes,\n zIndex: int,\n\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n}\n","import { color } from \"../color\"\nimport { filter } from \"../complex/filter\"\nimport { mask } from \"../complex/mask\"\nimport { numberValueTypes } from \"./number\"\nimport { ValueTypeMap } from \"./types\"\n\n/**\n * A map of default value types for common values\n */\nexport const defaultValueTypes: ValueTypeMap = {\n ...numberValueTypes,\n\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n mask,\n WebkitMask: mask,\n}\n\n/**\n * Gets the default ValueType for the provided value key\n */\nexport const getDefaultValueType = (key: string) => defaultValueTypes[key]\n","import { complex } from \"../complex\"\nimport { filter } from \"../complex/filter\"\nimport { mask } from \"../complex/mask\"\nimport { getDefaultValueType } from \"../maps/defaults\"\n\nconst customTypes = /*@__PURE__*/ new Set([filter, mask])\n\nexport function getAnimatableNone(key: string, value: string) {\n let defaultValueType = getDefaultValueType(key)\n if (!customTypes.has(defaultValueType as any)) defaultValueType = complex\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined\n}\n","import { analyseComplexValue } from \"../../../value/types/complex\"\nimport { getAnimatableNone } from \"../../../value/types/utils/animatable-none\"\nimport { AnyResolvedKeyframe } from \"../../types\"\nimport { UnresolvedKeyframes } from \"../KeyframesResolver\"\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"])\n\nexport function makeNoneKeyframesAnimatable(\n unresolvedKeyframes: UnresolvedKeyframes,\n noneKeyframeIndexes: number[],\n name?: string\n) {\n let i = 0\n let animatableTemplate: string | undefined = undefined\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i]\n if (\n typeof keyframe === \"string\" &&\n !invalidTemplates.has(keyframe) &&\n analyseComplexValue(keyframe).values.length\n ) {\n animatableTemplate = unresolvedKeyframes[i] as string\n }\n i++\n }\n\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n unresolvedKeyframes[noneIndex] = getAnimatableNone(\n name,\n animatableTemplate\n )\n }\n }\n}\n","import { positionalKeys } from \"../../render/utils/keys-position\"\nimport { MotionValue } from \"../../value\"\nimport { findDimensionValueType } from \"../../value/types/dimensions\"\nimport { AnyResolvedKeyframe } from \"../types\"\nimport { getVariableValue } from \"../utils/css-variables-conversion\"\nimport {\n containsCSSVariable,\n isCSSVariableToken,\n} from \"../utils/is-css-variable\"\nimport {\n KeyframeResolver,\n OnKeyframesResolved,\n UnresolvedKeyframes,\n} from \"./KeyframesResolver\"\nimport { WithRender } from \"./types\"\nimport { isNone } from \"./utils/is-none\"\nimport { makeNoneKeyframesAnimatable } from \"./utils/make-none-animatable\"\nimport { isNumOrPxType, positionalValues } from \"./utils/unit-conversion\"\n\nexport class DOMKeyframesResolver<\n T extends AnyResolvedKeyframe\n> extends KeyframeResolver {\n name: string\n element?: WithRender\n\n private removedTransforms?: [string, AnyResolvedKeyframe][]\n private measuredOrigin?: AnyResolvedKeyframe\n\n constructor(\n unresolvedKeyframes: UnresolvedKeyframes,\n onComplete: OnKeyframesResolved,\n name?: string,\n motionValue?: MotionValue,\n element?: WithRender\n ) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true)\n }\n\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this\n\n if (!element || !element.current) return\n\n super.readKeyframes()\n\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i]\n\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim()\n\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current)\n\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved as T\n }\n\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe as T\n }\n }\n }\n }\n\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes()\n\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return\n }\n\n const [origin, target] = unresolvedKeyframes\n const originType = findDimensionValueType(origin)\n const targetType = findDimensionValueType(target)\n\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin)\n const targetHasVar = containsCSSVariable(target)\n\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true\n return\n }\n\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType) return\n\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i]\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value as string)\n }\n }\n } else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true\n }\n }\n\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this\n\n const noneKeyframeIndexes: number[] = []\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (\n unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])\n ) {\n noneKeyframeIndexes.push(i)\n }\n }\n\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(\n unresolvedKeyframes,\n noneKeyframeIndexes,\n name\n )\n }\n }\n\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this\n\n if (!element || !element.current) return\n\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset\n }\n\n this.measuredOrigin = positionalValues[name](\n element.measureViewportBox(),\n window.getComputedStyle(element.current)\n )\n\n unresolvedKeyframes[0] = this.measuredOrigin\n\n // Set final key frame to measure after next render\n const measureKeyframe =\n unresolvedKeyframes[unresolvedKeyframes.length - 1]\n\n if (measureKeyframe !== undefined) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false)\n }\n }\n\n measureEndState() {\n const { element, name, unresolvedKeyframes } = this\n\n if (!element || !element.current) return\n\n const value = element.getValue(name)\n value && value.jump(this.measuredOrigin, false)\n\n const finalKeyframeIndex = unresolvedKeyframes.length - 1\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex]\n\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](\n element.measureViewportBox(),\n window.getComputedStyle(element.current)\n ) as any\n\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe as T\n }\n\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(\n ([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)!\n .set(unsetTransformValue)\n }\n )\n }\n\n this.resolveNoneKeyframes()\n }\n}\n","export const pxValues = new Set([\n // Border props\n \"borderWidth\",\n \"borderTopWidth\",\n \"borderRightWidth\",\n \"borderBottomWidth\",\n \"borderLeftWidth\",\n \"borderRadius\",\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\",\n \"borderBottomLeftRadius\",\n // Positioning props\n \"width\",\n \"maxWidth\",\n \"height\",\n \"maxHeight\",\n \"top\",\n \"right\",\n \"bottom\",\n \"left\",\n \"inset\",\n \"insetBlock\",\n \"insetBlockStart\",\n \"insetBlockEnd\",\n \"insetInline\",\n \"insetInlineStart\",\n \"insetInlineEnd\",\n // Spacing props\n \"padding\",\n \"paddingTop\",\n \"paddingRight\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"paddingBlock\",\n \"paddingBlockStart\",\n \"paddingBlockEnd\",\n \"paddingInline\",\n \"paddingInlineStart\",\n \"paddingInlineEnd\",\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n \"marginBlock\",\n \"marginBlockStart\",\n \"marginBlockEnd\",\n \"marginInline\",\n \"marginInlineStart\",\n \"marginInlineEnd\",\n // Typography\n \"fontSize\",\n // Misc\n \"backgroundPositionX\",\n \"backgroundPositionY\",\n])\n","import { UnresolvedValueKeyframe, ValueKeyframe } from \"../../types\"\nimport { pxValues } from \"../../waapi/utils/px-values\"\n\nexport function applyPxDefaults(\n keyframes: ValueKeyframe[] | UnresolvedValueKeyframe[],\n name: string\n) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"number\" && pxValues.has(name)) {\n keyframes[i] = keyframes[i] + \"px\"\n }\n }\n}\n","import { Easing, isBezierDefinition } from \"motion-utils\"\nimport { supportsLinearEasing } from \"../../../utils/supports/linear-easing\"\nimport { supportedWaapiEasing } from \"./supported\"\n\nexport function isWaapiSupportedEasing(easing?: Easing | Easing[]): boolean {\n return Boolean(\n (typeof easing === \"function\" && supportsLinearEasing()) ||\n !easing ||\n (typeof easing === \"string\" &&\n (easing in supportedWaapiEasing || supportsLinearEasing())) ||\n isBezierDefinition(easing) ||\n (Array.isArray(easing) && easing.every(isWaapiSupportedEasing))\n )\n}\n","import { memo } from \"motion-utils\"\n\nexport const supportsPartialKeyframes = /*@__PURE__*/ memo(() => {\n try {\n document.createElement(\"div\").animate({ opacity: [1] })\n } catch (e) {\n return false\n }\n return true\n})\n","export type ElementOrSelector =\n | Element\n | Element[]\n | NodeListOf\n | string\n | null\n | undefined\n\nexport interface WithQuerySelectorAll {\n querySelectorAll: Element[\"querySelectorAll\"]\n}\n\nexport interface AnimationScope {\n readonly current: T\n animations: any[] // TODO: Refactor to types package AnimationPlaybackControls[]\n}\n\nexport interface SelectorCache {\n [key: string]: NodeListOf\n}\n\nexport function resolveElements(\n elementOrSelector: ElementOrSelector,\n scope?: AnimationScope,\n selectorCache?: SelectorCache\n): Element[] {\n if (elementOrSelector == null) {\n return []\n }\n\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector]\n } else if (typeof elementOrSelector === \"string\") {\n let root: WithQuerySelectorAll = document\n\n if (scope) {\n root = scope.current\n }\n\n const elements =\n selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector)\n\n return elements ? Array.from(elements) : []\n }\n\n return Array.from(elementOrSelector).filter(\n (element): element is Element => element != null\n )\n}\n","import {\n ElementOrSelector,\n resolveElements,\n} from \"../../utils/resolve-elements\"\nimport { MotionValue } from \"../../value\"\n\nexport function createSelectorEffect(\n subjectEffect: (\n subject: T,\n values: Record\n ) => VoidFunction\n) {\n return (\n subject: ElementOrSelector,\n values: Record\n ) => {\n const elements = resolveElements(subject)\n const subscriptions: VoidFunction[] = []\n\n for (const element of elements) {\n const remove = subjectEffect(element as T, values)\n subscriptions.push(remove)\n }\n\n return () => {\n for (const remove of subscriptions) remove()\n }\n }\n}\n","import { ValueType } from \"../types\"\n\n/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nexport const getValueAsType = (value: any, type?: ValueType) => {\n return type && typeof value === \"number\"\n ? (type as any).transform(value)\n : value\n}\n","import { AnyResolvedKeyframe } from \"../animation/types\"\nimport { cancelFrame, frame } from \"../frameloop/frame\"\nimport { MotionValue } from \"../value\"\nimport { numberValueTypes } from \"../value/types/maps/number\"\nimport { getValueAsType } from \"../value/types/utils/get-as-type\"\n\nexport class MotionValueState {\n latest: { [name: string]: AnyResolvedKeyframe } = {}\n\n private values = new Map<\n string,\n { value: MotionValue; onRemove: VoidFunction }\n >()\n\n set(\n name: string,\n value: MotionValue,\n render?: VoidFunction,\n computed?: MotionValue,\n useDefaultValueType = true\n ) {\n const existingValue = this.values.get(name)\n\n if (existingValue) {\n existingValue.onRemove()\n }\n\n const onChange = () => {\n const v = value.get()\n\n if (useDefaultValueType) {\n this.latest[name] = getValueAsType(v, numberValueTypes[name])\n } else {\n this.latest[name] = v\n }\n\n render && frame.render(render)\n }\n\n onChange()\n\n const cancelOnChange = value.on(\"change\", onChange)\n\n computed && value.addDependent(computed)\n\n const remove = () => {\n cancelOnChange()\n render && cancelFrame(render)\n this.values.delete(name)\n computed && value.removeDependent(computed)\n }\n\n this.values.set(name, { value, onRemove: remove })\n\n return remove\n }\n\n get(name: string): MotionValue | undefined {\n return this.values.get(name)?.value\n }\n}\n","import { MotionValue } from \"../../value\"\nimport { MotionValueState } from \"../MotionValueState\"\n\nexport function createEffect(\n addValue: (\n subject: Subject,\n state: MotionValueState,\n key: string,\n value: MotionValue\n ) => VoidFunction\n) {\n const stateCache = new WeakMap()\n\n return (\n subject: Subject,\n values: Record\n ): VoidFunction => {\n const state = stateCache.get(subject) ?? new MotionValueState()\n\n stateCache.set(subject, state)\n\n const subscriptions: VoidFunction[] = []\n\n for (const key in values) {\n const value = values[key]\n const remove = addValue(subject, state, key, value)\n subscriptions.push(remove)\n }\n\n return () => {\n for (const cancel of subscriptions) cancel()\n }\n }\n}\n","import { camelToDash } from \"../../render/dom/utils/camel-to-dash\"\nimport { MotionValue } from \"../../value\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { createSelectorEffect } from \"../utils/create-dom-effect\"\nimport { createEffect } from \"../utils/create-effect\"\n\nfunction canSetAsProperty(element: HTMLElement | SVGElement, name: string) {\n if (!(name in element)) return false\n\n const descriptor =\n Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) ||\n Object.getOwnPropertyDescriptor(element, name)\n\n // Check if it has a setter\n return descriptor && typeof descriptor.set === \"function\"\n}\n\nexport const addAttrValue = (\n element: HTMLElement | SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) => {\n const isProp = canSetAsProperty(element, key)\n const name = isProp\n ? key\n : key.startsWith(\"data\") || key.startsWith(\"aria\")\n ? camelToDash(key)\n : key\n\n /**\n * Set attribute directly via property if available\n */\n const render = isProp\n ? () => {\n ;(element as any)[name] = state.latest[key]\n }\n : () => {\n const v = state.latest[key]\n if (v === null || v === undefined) {\n element.removeAttribute(name)\n } else {\n element.setAttribute(name, String(v))\n }\n }\n\n return state.set(key, value, render)\n}\n\nexport const attrEffect = /*@__PURE__*/ createSelectorEffect(\n /*@__PURE__*/ createEffect(addAttrValue)\n)\n","import { MotionValue } from \"../../value\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { createEffect } from \"../utils/create-effect\"\n\nexport const propEffect = /*@__PURE__*/ createEffect(\n (\n subject: { [key: string]: any },\n state: MotionValueState,\n key: string,\n value: MotionValue\n ) => {\n return state.set(\n key,\n value,\n () => {\n subject[key] = state.latest[key]\n },\n undefined,\n false\n )\n }\n)\n","import { isObject } from \"motion-utils\"\n\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nexport function isHTMLElement(element: unknown): element is HTMLElement {\n return (\n isObject(element) &&\n \"offsetHeight\" in element &&\n !(\"ownerSVGElement\" in element)\n )\n}\n","import { transformPropOrder } from \"../../render/utils/keys-transform\"\nimport { MotionValueState } from \"../MotionValueState\"\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n}\n\nexport function buildTransform(state: MotionValueState) {\n let transform = \"\"\n let transformIsDefault = true\n\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < transformPropOrder.length; i++) {\n const key = transformPropOrder[i] as keyof typeof translateAlias\n const value = state.latest[key]\n\n if (value === undefined) continue\n\n let valueIsDefault = true\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0)\n } else {\n const parsed = parseFloat(value)\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0\n }\n\n if (!valueIsDefault) {\n transformIsDefault = false\n const transformName = translateAlias[key] || key\n transform += `${transformName}(${value}) `\n }\n }\n\n // See build-transform.ts: additive `rotate()` so user `rotate` isn't\n // clobbered. Not a `transformPropOrder` slot.\n const pathRotation = state.latest.pathRotation\n if (pathRotation) {\n transformIsDefault = false\n transform += `rotate(${\n typeof pathRotation === \"number\"\n ? `${pathRotation}deg`\n : pathRotation\n }) `\n }\n\n return transformIsDefault ? \"none\" : transform.trim()\n}\n","import { isCSSVar } from \"../../render/dom/is-css-var\"\nimport { transformProps } from \"../../render/utils/keys-transform\"\nimport { isHTMLElement } from \"../../utils/is-html-element\"\nimport { MotionValue } from \"../../value\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { createSelectorEffect } from \"../utils/create-dom-effect\"\nimport { createEffect } from \"../utils/create-effect\"\nimport { buildTransform } from \"./transform\"\n\nconst originProps = new Set([\"originX\", \"originY\", \"originZ\"])\n\nexport const addStyleValue = (\n element: HTMLElement | SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) => {\n let render: VoidFunction | undefined = undefined\n let computed: MotionValue | undefined = undefined\n\n if (transformProps.has(key)) {\n if (!state.get(\"transform\")) {\n // If this is an HTML element, we need to set the transform-box to fill-box\n // to normalise the transform relative to the element's bounding box\n if (!isHTMLElement(element) && !state.get(\"transformBox\")) {\n addStyleValue(\n element,\n state,\n \"transformBox\",\n new MotionValue(\"fill-box\")\n )\n }\n\n state.set(\"transform\", new MotionValue(\"none\"), () => {\n element.style.transform = buildTransform(state)\n })\n }\n\n computed = state.get(\"transform\")\n } else if (originProps.has(key)) {\n if (!state.get(\"transformOrigin\")) {\n state.set(\"transformOrigin\", new MotionValue(\"\"), () => {\n const originX = state.latest.originX ?? \"50%\"\n const originY = state.latest.originY ?? \"50%\"\n const originZ = state.latest.originZ ?? 0\n element.style.transformOrigin = `${originX} ${originY} ${originZ}`\n })\n }\n\n computed = state.get(\"transformOrigin\")\n } else if (isCSSVar(key)) {\n render = () => {\n element.style.setProperty(key, state.latest[key] as string)\n }\n } else {\n render = () => {\n element.style[key as any] = state.latest[key] as string\n }\n }\n\n return state.set(key, value, render, computed)\n}\n\nexport const styleEffect = /*@__PURE__*/ createSelectorEffect(\n /*@__PURE__*/ createEffect(addStyleValue)\n)\n","import { frame } from \"../../frameloop\"\nimport { MotionValue } from \"../../value\"\nimport { addAttrValue } from \"../attr\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { addStyleValue } from \"../style\"\nimport { createSelectorEffect } from \"../utils/create-dom-effect\"\nimport { createEffect } from \"../utils/create-effect\"\n\nfunction addSVGPathValue(\n element: SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) {\n frame.render(() => element.setAttribute(\"pathLength\", \"1\"))\n\n if (key === \"pathOffset\") {\n return state.set(key, value, () => {\n // Use unitless value to avoid Safari zoom bug\n const offset = state.latest[key]\n element.setAttribute(\"stroke-dashoffset\", `${-offset}`)\n })\n } else {\n if (!state.get(\"stroke-dasharray\")) {\n state.set(\"stroke-dasharray\", new MotionValue(\"1 1\"), () => {\n const { pathLength = 1, pathSpacing } = state.latest\n\n // Use unitless values to avoid Safari zoom bug\n element.setAttribute(\n \"stroke-dasharray\",\n `${pathLength} ${pathSpacing ?? 1 - Number(pathLength)}`\n )\n })\n }\n\n return state.set(key, value, undefined, state.get(\"stroke-dasharray\"))\n }\n}\n\nconst addSVGValue = (\n element: SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) => {\n if (key.startsWith(\"path\")) {\n return addSVGPathValue(element, state, key, value)\n } else if (key.startsWith(\"attr\")) {\n return addAttrValue(element, state, convertAttrKey(key), value)\n }\n\n const handler = key in element.style ? addStyleValue : addAttrValue\n return handler(element, state, key, value)\n}\n\nexport const svgEffect = /*@__PURE__*/ createSelectorEffect(\n /*@__PURE__*/ createEffect(addSVGValue)\n)\n\nfunction convertAttrKey(key: string) {\n return key.replace(/^attr([A-Z])/, (_, firstChar) =>\n firstChar.toLowerCase()\n )\n}\n","import { createRenderBatcher } from \"./batcher\"\n\nexport const { schedule: microtask, cancel: cancelMicrotask } =\n /* @__PURE__ */ createRenderBatcher(queueMicrotask, false)\n","export const isDragging = {\n x: false,\n y: false,\n}\n\nexport function isDragActive() {\n return isDragging.x || isDragging.y\n}\n","import { isDragging } from \"./is-active\"\n\nexport function setDragLock(axis: boolean | \"x\" | \"y\" | \"lockDirection\") {\n if (axis === \"x\" || axis === \"y\") {\n if (isDragging[axis]) {\n return null\n } else {\n isDragging[axis] = true\n return () => {\n isDragging[axis] = false\n }\n }\n } else {\n if (isDragging.x || isDragging.y) {\n return null\n } else {\n isDragging.x = isDragging.y = true\n return () => {\n isDragging.x = isDragging.y = false\n }\n }\n }\n}\n","import {\n ElementOrSelector,\n resolveElements,\n} from \"../../utils/resolve-elements\"\nimport { EventOptions } from \"../types\"\n\nexport function setupGesture(\n elementOrSelector: ElementOrSelector,\n options: EventOptions\n): [Element[], AddEventListenerOptions, VoidFunction] {\n const elements = resolveElements(elementOrSelector)\n\n const gestureAbortController = new AbortController()\n\n const eventOptions = {\n passive: true,\n ...options,\n signal: gestureAbortController.signal,\n }\n\n const cancel = () => gestureAbortController.abort()\n\n return [elements, eventOptions, cancel]\n}\n","import { ElementOrSelector } from \"../utils/resolve-elements\"\nimport { isDragActive } from \"./drag/state/is-active\"\nimport { EventOptions } from \"./types\"\nimport { setupGesture } from \"./utils/setup\"\n\n/**\n * A function to be called when a hover gesture starts.\n *\n * This function can optionally return a function that will be called\n * when the hover gesture ends.\n *\n * @public\n */\nexport type OnHoverStartEvent = (\n element: Element,\n event: PointerEvent\n) => void | OnHoverEndEvent\n\n/**\n * A function to be called when a hover gesture ends.\n *\n * @public\n */\nexport type OnHoverEndEvent = (event: PointerEvent) => void\n\nfunction isValidHover(event: PointerEvent) {\n return !(event.pointerType === \"touch\" || isDragActive())\n}\n\n/**\n * Create a hover gesture. hover() is different to .addEventListener(\"pointerenter\")\n * in that it has an easier syntax, filters out polyfilled touch events, interoperates\n * with drag gestures, and automatically removes the \"pointerennd\" event listener when the hover ends.\n *\n * @public\n */\nexport function hover(\n elementOrSelector: ElementOrSelector,\n onHoverStart: OnHoverStartEvent,\n options: EventOptions = {}\n): VoidFunction {\n const [elements, eventOptions, cancel] = setupGesture(\n elementOrSelector,\n options\n )\n\n elements.forEach((element) => {\n let isPressed = false\n let deferredHoverEnd = false\n let hoverEndCallback: OnHoverEndEvent | undefined\n\n const removePointerLeave = () => {\n element.removeEventListener(\n \"pointerleave\",\n onPointerLeave as EventListener\n )\n }\n\n const endHover = (event: PointerEvent) => {\n if (hoverEndCallback) {\n hoverEndCallback(event)\n hoverEndCallback = undefined\n }\n removePointerLeave()\n }\n\n const onPointerUp = (event: Event) => {\n isPressed = false\n window.removeEventListener(\n \"pointerup\",\n onPointerUp as EventListener\n )\n window.removeEventListener(\n \"pointercancel\",\n onPointerUp as EventListener\n )\n\n if (deferredHoverEnd) {\n deferredHoverEnd = false\n endHover(event as PointerEvent)\n }\n }\n\n const onPointerDown = () => {\n isPressed = true\n window.addEventListener(\n \"pointerup\",\n onPointerUp as EventListener,\n eventOptions\n )\n window.addEventListener(\n \"pointercancel\",\n onPointerUp as EventListener,\n eventOptions\n )\n }\n\n const onPointerLeave = (leaveEvent: PointerEvent) => {\n if (leaveEvent.pointerType === \"touch\") return\n\n if (isPressed) {\n deferredHoverEnd = true\n return\n }\n\n endHover(leaveEvent)\n }\n\n const onPointerEnter = (enterEvent: PointerEvent) => {\n if (!isValidHover(enterEvent)) return\n\n deferredHoverEnd = false\n\n const onHoverEnd = onHoverStart(\n element as Element,\n enterEvent\n )\n\n if (typeof onHoverEnd !== \"function\") return\n\n hoverEndCallback = onHoverEnd\n\n element.addEventListener(\n \"pointerleave\",\n onPointerLeave as EventListener,\n eventOptions\n )\n }\n\n element.addEventListener(\n \"pointerenter\",\n onPointerEnter as EventListener,\n eventOptions\n )\n element.addEventListener(\n \"pointerdown\",\n onPointerDown as EventListener,\n eventOptions\n )\n })\n\n return cancel\n}\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nexport const isNodeOrChild = (\n parent: Element | null,\n child?: Element | null\n): boolean => {\n if (!child) {\n return false\n } else if (parent === child) {\n return true\n } else {\n return isNodeOrChild(parent, child.parentElement)\n }\n}\n","export const isPrimaryPointer = (event: PointerEvent) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0\n } else {\n /**\n * isPrimary is true for all mice buttons, whereas every touch point\n * is regarded as its own input. So subsequent concurrent touch points\n * will be false.\n *\n * Specifically match against false here as incomplete versions of\n * PointerEvents in very old browser might have it set as undefined.\n */\n return event.isPrimary !== false\n }\n}\n","const keyboardAccessibleElements = new Set([\n \"BUTTON\",\n \"INPUT\",\n \"SELECT\",\n \"TEXTAREA\",\n \"A\",\n])\n\n/**\n * Checks if an element is natively keyboard accessible (focusable).\n * Used by the press gesture to determine if we need to add tabIndex.\n */\nexport function isElementKeyboardAccessible(element: Element) {\n return (\n keyboardAccessibleElements.has(element.tagName) ||\n (element as HTMLElement).isContentEditable === true\n )\n}\n\nconst textInputElements = new Set([\"INPUT\", \"SELECT\", \"TEXTAREA\"])\n\n/**\n * Checks if an element has text selection or direct interaction behavior\n * that should block drag gestures from starting.\n *\n * This specifically targets form controls where the user might want to select\n * text or interact with the control (e.g., sliders, dropdowns).\n *\n * Buttons and links are NOT included because they don't have click-and-move\n * actions of their own - they only respond to click events, so dragging\n * should still work when initiated from these elements.\n */\nexport function isElementTextInput(element: Element) {\n return (\n textInputElements.has(element.tagName) ||\n (element as HTMLElement).isContentEditable === true\n )\n}\n","export const isPressing = new WeakSet()\n","import { isPressing } from \"./state\"\n\n/**\n * Filter out events that are not \"Enter\" keys.\n */\nfunction filterEvents(callback: (event: KeyboardEvent) => void) {\n return (event: KeyboardEvent) => {\n if (event.key !== \"Enter\") return\n callback(event)\n }\n}\n\nfunction firePointerEvent(target: EventTarget, type: \"down\" | \"up\" | \"cancel\") {\n target.dispatchEvent(\n new PointerEvent(\"pointer\" + type, { isPrimary: true, bubbles: true })\n )\n}\n\nexport const enableKeyboardPress = (\n focusEvent: FocusEvent,\n eventOptions: AddEventListenerOptions\n) => {\n const element = focusEvent.currentTarget as HTMLElement\n if (!element) return\n\n const handleKeydown = filterEvents(() => {\n if (isPressing.has(element)) return\n\n firePointerEvent(element, \"down\")\n\n const handleKeyup = filterEvents(() => {\n firePointerEvent(element, \"up\")\n })\n\n const handleBlur = () => firePointerEvent(element, \"cancel\")\n\n element.addEventListener(\"keyup\", handleKeyup, eventOptions)\n element.addEventListener(\"blur\", handleBlur, eventOptions)\n })\n\n element.addEventListener(\"keydown\", handleKeydown, eventOptions)\n\n /**\n * Add an event listener that fires on blur to remove the keydown events.\n */\n element.addEventListener(\n \"blur\",\n () => element.removeEventListener(\"keydown\", handleKeydown),\n eventOptions\n )\n}\n","import { isHTMLElement } from \"../../utils/is-html-element\"\nimport { ElementOrSelector } from \"../../utils/resolve-elements\"\nimport { isDragActive } from \"../drag/state/is-active\"\nimport { EventOptions } from \"../types\"\nimport { isNodeOrChild } from \"../utils/is-node-or-child\"\nimport { isPrimaryPointer } from \"../utils/is-primary-pointer\"\nimport { setupGesture } from \"../utils/setup\"\nimport { OnPressStartEvent } from \"./types\"\nimport { isElementKeyboardAccessible } from \"./utils/is-keyboard-accessible\"\nimport { enableKeyboardPress } from \"./utils/keyboard\"\nimport { isPressing } from \"./utils/state\"\n\n/**\n * Filter out events that are not primary pointer events, or are triggering\n * while a Motion gesture is active.\n */\nfunction isValidPressEvent(event: PointerEvent) {\n return isPrimaryPointer(event) && !isDragActive()\n}\n\nconst claimedPointerDownEvents = new WeakSet()\n\nexport interface PointerEventOptions extends EventOptions {\n useGlobalTarget?: boolean\n stopPropagation?: boolean\n}\n\n/**\n * Create a press gesture.\n *\n * Press is different to `\"pointerdown\"`, `\"pointerup\"` in that it\n * automatically filters out secondary pointer events like right\n * click and multitouch.\n *\n * It also adds accessibility support for keyboards, where\n * an element with a press gesture will receive focus and\n * trigger on Enter `\"keydown\"` and `\"keyup\"` events.\n *\n * This is different to a browser's `\"click\"` event, which does\n * respond to keyboards but only for the `\"click\"` itself, rather\n * than the press start and end/cancel. The element also needs\n * to be focusable for this to work, whereas a press gesture will\n * make an element focusable by default.\n *\n * @public\n */\nexport function press(\n targetOrSelector: ElementOrSelector,\n onPressStart: OnPressStartEvent,\n options: PointerEventOptions = {}\n): VoidFunction {\n const [targets, eventOptions, cancelEvents] = setupGesture(\n targetOrSelector,\n options\n )\n\n const startPress = (startEvent: PointerEvent) => {\n const target = startEvent.currentTarget as Element\n\n if (!isValidPressEvent(startEvent)) return\n if (claimedPointerDownEvents.has(startEvent)) return\n\n isPressing.add(target)\n\n if (options.stopPropagation) {\n claimedPointerDownEvents.add(startEvent)\n }\n\n const onPressEnd = onPressStart(target, startEvent)\n\n const onPointerEnd = (endEvent: PointerEvent, success: boolean) => {\n window.removeEventListener(\"pointerup\", onPointerUp)\n window.removeEventListener(\"pointercancel\", onPointerCancel)\n\n if (isPressing.has(target)) {\n isPressing.delete(target)\n }\n\n if (!isValidPressEvent(endEvent)) {\n return\n }\n\n if (typeof onPressEnd === \"function\") {\n onPressEnd(endEvent, { success })\n }\n }\n\n const onPointerUp = (upEvent: PointerEvent) => {\n onPointerEnd(\n upEvent,\n (target as any) === window ||\n (target as any) === document ||\n options.useGlobalTarget ||\n isNodeOrChild(target, upEvent.target as Element)\n )\n }\n\n const onPointerCancel = (cancelEvent: PointerEvent) => {\n onPointerEnd(cancelEvent, false)\n }\n\n window.addEventListener(\"pointerup\", onPointerUp, eventOptions)\n window.addEventListener(\"pointercancel\", onPointerCancel, eventOptions)\n }\n\n targets.forEach((target: EventTarget) => {\n const pointerDownTarget = options.useGlobalTarget ? window : target\n pointerDownTarget.addEventListener(\n \"pointerdown\",\n startPress as EventListener,\n eventOptions\n )\n\n if (isHTMLElement(target)) {\n target.addEventListener(\"focus\", (event) =>\n enableKeyboardPress(event as FocusEvent, eventOptions)\n )\n\n if (\n !isElementKeyboardAccessible(target) &&\n !target.hasAttribute(\"tabindex\")\n ) {\n target.tabIndex = 0\n }\n }\n })\n\n return cancelEvents\n}\n","import { isCSSVar } from \"./is-css-var\"\n\nexport function getComputedStyle(\n element: HTMLElement | SVGElement,\n name: string\n) {\n const computedStyle = window.getComputedStyle(element)\n return isCSSVar(name)\n ? computedStyle.getPropertyValue(name)\n : computedStyle[name as any]\n}\n","import { isObject } from \"motion-utils\"\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nexport function isSVGElement(element: unknown): element is SVGElement {\n return isObject(element) && \"ownerSVGElement\" in element\n}\n","import { isSVGElement } from \"../utils/is-svg-element\"\nimport { ElementOrSelector, resolveElements } from \"../utils/resolve-elements\"\nimport { ResizeHandler } from \"./types\"\n\nconst resizeHandlers = new WeakMap>>()\n\nlet observer: ResizeObserver | undefined\n\nconst getSize =\n (\n borderBoxAxis: \"inline\" | \"block\",\n svgAxis: \"width\" | \"height\",\n htmlAxis: \"offsetWidth\" | \"offsetHeight\"\n ) =>\n (target: Element, borderBoxSize?: ReadonlyArray) => {\n if (borderBoxSize && borderBoxSize[0]) {\n return borderBoxSize[0][\n (borderBoxAxis + \"Size\") as keyof ResizeObserverSize\n ]\n } else if (isSVGElement(target) && \"getBBox\" in target) {\n return (target as SVGGraphicsElement).getBBox()[svgAxis]\n } else {\n return (target as HTMLElement)[htmlAxis]\n }\n }\n\nconst getWidth = /*@__PURE__*/ getSize(\"inline\", \"width\", \"offsetWidth\")\nconst getHeight = /*@__PURE__*/ getSize(\"block\", \"height\", \"offsetHeight\")\n\nfunction notifyTarget({ target, borderBoxSize }: ResizeObserverEntry) {\n resizeHandlers.get(target)?.forEach((handler) => {\n handler(target, {\n get width() {\n return getWidth(target, borderBoxSize)\n },\n get height() {\n return getHeight(target, borderBoxSize)\n },\n })\n })\n}\n\nfunction notifyAll(entries: ResizeObserverEntry[]) {\n entries.forEach(notifyTarget)\n}\n\nfunction createResizeObserver() {\n if (typeof ResizeObserver === \"undefined\") return\n\n observer = new ResizeObserver(notifyAll)\n}\n\nexport function resizeElement(\n target: ElementOrSelector,\n handler: ResizeHandler\n) {\n if (!observer) createResizeObserver()\n\n const elements = resolveElements(target)\n\n elements.forEach((element) => {\n let elementHandlers = resizeHandlers.get(element)\n\n if (!elementHandlers) {\n elementHandlers = new Set()\n resizeHandlers.set(element, elementHandlers)\n }\n\n elementHandlers.add(handler)\n observer?.observe(element)\n })\n\n return () => {\n elements.forEach((element) => {\n const elementHandlers = resizeHandlers.get(element)\n\n elementHandlers?.delete(handler)\n\n if (!elementHandlers?.size) {\n observer?.unobserve(element)\n }\n })\n }\n}\n","import { WindowResizeHandler } from \"./types\"\n\nconst windowCallbacks = new Set()\n\nlet windowResizeHandler: VoidFunction | undefined\n\nfunction createWindowResizeHandler() {\n windowResizeHandler = () => {\n const info = {\n get width() {\n return window.innerWidth\n },\n get height() {\n return window.innerHeight\n },\n }\n\n windowCallbacks.forEach((callback) => callback(info))\n }\n\n window.addEventListener(\"resize\", windowResizeHandler)\n}\n\nexport function resizeWindow(callback: WindowResizeHandler) {\n windowCallbacks.add(callback)\n\n if (!windowResizeHandler) createWindowResizeHandler()\n\n return () => {\n windowCallbacks.delete(callback)\n\n if (\n !windowCallbacks.size &&\n typeof windowResizeHandler === \"function\"\n ) {\n window.removeEventListener(\"resize\", windowResizeHandler)\n windowResizeHandler = undefined\n }\n }\n}\n","import { ElementOrSelector } from \"../utils/resolve-elements\"\nimport { resizeElement } from \"./handle-element\"\nimport { resizeWindow } from \"./handle-window\"\nimport { ResizeHandler, WindowResizeHandler } from \"./types\"\n\nexport function resize(onResize: WindowResizeHandler): VoidFunction\nexport function resize(\n target: ElementOrSelector,\n onResize: ResizeHandler\n): VoidFunction\nexport function resize(\n a: WindowResizeHandler | ElementOrSelector,\n b?: ResizeHandler\n) {\n return typeof a === \"function\" ? resizeWindow(a) : resizeElement(a, b!)\n}\n","import { ProgressTimeline } from \"../animation/types\"\nimport { cancelFrame, frame } from \"../frameloop\"\n\ntype Update = (progress: number) => void\n\nexport function observeTimeline(update: Update, timeline: ProgressTimeline) {\n let prevProgress: number\n\n const onFrame = () => {\n const { currentTime } = timeline\n const percentage = currentTime === null ? 0 : currentTime.value\n const progress = percentage / 100\n\n if (prevProgress !== progress) {\n update(progress)\n }\n\n prevProgress = progress\n }\n\n frame.preUpdate(onFrame, true)\n\n return () => cancelFrame(onFrame)\n}\n","import { cancelFrame, frame, frameData } from \"../frameloop\"\nimport { activeAnimations } from \"./animation-count\"\nimport { ActiveStatsBuffer, statsBuffer } from \"./buffer\"\nimport { StatsSummary, Summary } from \"./types\"\n\nfunction record() {\n const { value } = statsBuffer\n\n if (value === null) {\n cancelFrame(record)\n return\n }\n\n value.frameloop.rate.push(frameData.delta)\n value.animations.mainThread.push(activeAnimations.mainThread)\n value.animations.waapi.push(activeAnimations.waapi)\n value.animations.layout.push(activeAnimations.layout)\n}\n\nfunction mean(values: number[]) {\n return values.reduce((acc, value) => acc + value, 0) / values.length\n}\n\nfunction summarise(\n values: number[],\n calcAverage: (allValues: number[]) => number = mean\n): Summary {\n if (values.length === 0) {\n return {\n min: 0,\n max: 0,\n avg: 0,\n }\n }\n\n return {\n min: Math.min(...values),\n max: Math.max(...values),\n avg: calcAverage(values),\n }\n}\n\nconst msToFps = (ms: number) => Math.round(1000 / ms)\n\nfunction clearStatsBuffer() {\n statsBuffer.value = null\n statsBuffer.addProjectionMetrics = null\n}\n\nfunction reportStats(): StatsSummary {\n const { value } = statsBuffer\n\n if (!value) {\n throw new Error(\"Stats are not being measured\")\n }\n\n clearStatsBuffer()\n cancelFrame(record)\n\n const summary = {\n frameloop: {\n setup: summarise(value.frameloop.setup),\n rate: summarise(value.frameloop.rate),\n read: summarise(value.frameloop.read),\n resolveKeyframes: summarise(value.frameloop.resolveKeyframes),\n preUpdate: summarise(value.frameloop.preUpdate),\n update: summarise(value.frameloop.update),\n preRender: summarise(value.frameloop.preRender),\n render: summarise(value.frameloop.render),\n postRender: summarise(value.frameloop.postRender),\n },\n animations: {\n mainThread: summarise(value.animations.mainThread),\n waapi: summarise(value.animations.waapi),\n layout: summarise(value.animations.layout),\n },\n layoutProjection: {\n nodes: summarise(value.layoutProjection.nodes),\n calculatedTargetDeltas: summarise(\n value.layoutProjection.calculatedTargetDeltas\n ),\n calculatedProjections: summarise(\n value.layoutProjection.calculatedProjections\n ),\n },\n }\n\n /**\n * Convert the rate to FPS\n */\n const { rate } = summary.frameloop\n rate.min = msToFps(rate.min)\n rate.max = msToFps(rate.max)\n rate.avg = msToFps(rate.avg)\n // Swap these as the min and max are inverted when converted to FPS\n ;[rate.min, rate.max] = [rate.max, rate.min]\n\n return summary\n}\n\nexport function recordStats() {\n if (statsBuffer.value) {\n clearStatsBuffer()\n throw new Error(\"Stats are already being measured\")\n }\n\n const newStatsBuffer = statsBuffer as unknown as ActiveStatsBuffer\n\n newStatsBuffer.value = {\n frameloop: {\n setup: [],\n rate: [],\n read: [],\n resolveKeyframes: [],\n preUpdate: [],\n update: [],\n preRender: [],\n render: [],\n postRender: [],\n },\n animations: {\n mainThread: [],\n waapi: [],\n layout: [],\n },\n layoutProjection: {\n nodes: [],\n calculatedTargetDeltas: [],\n calculatedProjections: [],\n },\n }\n\n newStatsBuffer.addProjectionMetrics = (metrics) => {\n const { layoutProjection } = newStatsBuffer.value\n layoutProjection.nodes.push(metrics.nodes)\n layoutProjection.calculatedTargetDeltas.push(\n metrics.calculatedTargetDeltas\n )\n layoutProjection.calculatedProjections.push(\n metrics.calculatedProjections\n )\n }\n\n frame.postRender(record, true)\n\n return reportStats\n}\n","import { isSVGElement } from \"./is-svg-element\"\n\n/**\n * Checks if an element is specifically an SVGSVGElement (the root SVG element)\n * in a way that works across iframes\n */\nexport function isSVGSVGElement(element: unknown): element is SVGSVGElement {\n return isSVGElement(element) && element.tagName === \"svg\"\n}\n","import { Easing, easingDefinitionToFunction } from \"motion-utils\"\nimport { DynamicOption } from \"../animation/types\"\n\nexport type StaggerOrigin = \"first\" | \"last\" | \"center\" | number\n\nexport type StaggerOptions = {\n startDelay?: number\n from?: StaggerOrigin\n ease?: Easing\n}\n\nexport function getOriginIndex(from: StaggerOrigin, total: number) {\n if (from === \"first\") {\n return 0\n } else {\n const lastIndex = total - 1\n return from === \"last\" ? lastIndex : lastIndex / 2\n }\n}\n\nexport function stagger(\n duration: number = 0.1,\n { startDelay = 0, from = 0, ease }: StaggerOptions = {}\n): DynamicOption {\n return (i: number, total: number) => {\n const fromIndex =\n typeof from === \"number\" ? from : getOriginIndex(from, total)\n const distance = Math.abs(fromIndex - i)\n let delay = duration * distance\n\n if (ease) {\n const maxDelay = total * duration\n const easingFunction = easingDefinitionToFunction(ease)\n delay = easingFunction(delay / maxDelay) * maxDelay\n }\n\n return startDelay + delay\n }\n}\n","import { EasingFunction } from \"motion-utils\"\nimport { interpolate } from \"./interpolate\"\n\n/**\n * @public\n */\nexport interface TransformOptions {\n /**\n * Clamp values to within the given range. Defaults to `true`\n *\n * @public\n */\n clamp?: boolean\n\n /**\n * Easing functions to use on the interpolations between each value in the input and output ranges.\n *\n * If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition **between** each.\n *\n * @public\n */\n ease?: EasingFunction | EasingFunction[]\n\n /**\n * Provide a function that can interpolate between any two values in the provided range.\n *\n * @public\n */\n mixer?: (from: T, to: T) => (v: number) => any\n}\n\n/**\n * Transforms numbers into other values by mapping them from an input range to an output range.\n * Returns the type of the input provided.\n *\n * @remarks\n *\n * Given an input range of `[0, 200]` and an output range of\n * `[0, 1]`, this function will return a value between `0` and `1`.\n * The input range must be a linear series of numbers. The output range\n * can be any supported value type, such as numbers, colors, shadows, arrays, objects and more.\n * Every value in the output range must be of the same type and in the same format.\n *\n * ```jsx\n * export function MyComponent() {\n * const inputRange = [0, 200]\n * const outputRange = [0, 1]\n * const output = transform(100, inputRange, outputRange)\n *\n * // Returns 0.5\n * return
{output}
\n * }\n * ```\n *\n * @param inputValue - A number to transform between the input and output ranges.\n * @param inputRange - A linear series of numbers (either all increasing or decreasing).\n * @param outputRange - A series of numbers, colors, strings, or arrays/objects of those. Must be the same length as `inputRange`.\n * @param options - Clamp: Clamp values to within the given range. Defaults to `true`.\n *\n * @public\n */\nexport function transform(\n inputValue: number,\n inputRange: number[],\n outputRange: T[],\n options?: TransformOptions\n): T\n/**\n *\n * Transforms numbers into other values by mapping them from an input range to an output range.\n *\n * Given an input range of `[0, 200]` and an output range of\n * `[0, 1]`, this function will return a value between `0` and `1`.\n * The input range must be a linear series of numbers. The output range\n * can be any supported value type, such as numbers, colors, shadows, arrays, objects and more.\n * Every value in the output range must be of the same type and in the same format.\n *\n * ```jsx\n * export function MyComponent() {\n * const inputRange = [-200, -100, 100, 200]\n * const outputRange = [0, 1, 1, 0]\n * const convertRange = transform(inputRange, outputRange)\n * const output = convertRange(-150)\n *\n * // Returns 0.5\n * return
{output}
\n * }\n *\n * ```\n *\n * @param inputRange - A linear series of numbers (either all increasing or decreasing).\n * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`.\n * @param options - Clamp: clamp values to within the given range. Defaults to `true`.\n *\n * @public\n */\nexport function transform(\n inputRange: number[],\n outputRange: T[],\n options?: TransformOptions\n): (inputValue: number) => T\nexport function transform(\n ...args:\n | [number, number[], T[], TransformOptions?]\n | [number[], T[], TransformOptions?]\n) {\n const useImmediate = !Array.isArray(args[0])\n const argOffset = useImmediate ? 0 : -1\n const inputValue = args[0 + argOffset] as number\n const inputRange = args[1 + argOffset] as number[]\n const outputRange = args[2 + argOffset] as T[]\n const options = args[3 + argOffset] as TransformOptions\n\n const interpolator = interpolate(inputRange, outputRange, options)\n\n return useImmediate ? interpolator(inputValue) : interpolator\n}\n","import { MotionValue, motionValue } from \".\"\nimport { JSAnimation } from \"../animation/JSAnimation\"\nimport { AnyResolvedKeyframe, ValueAnimationTransition } from \"../animation/types\"\nimport { frame } from \"../frameloop\"\nimport { isMotionValue } from \"./utils/is-motion-value\"\n\n/**\n * Options for useFollowValue hook, extending ValueAnimationTransition\n * but excluding lifecycle callbacks that don't make sense for the hook pattern.\n */\nexport type FollowValueOptions = Omit<\n ValueAnimationTransition,\n \"onUpdate\" | \"onComplete\" | \"onPlay\" | \"onRepeat\" | \"onStop\"\n> & {\n /**\n * When true, the first change from a tracked `MotionValue` source\n * will jump to the new value instead of animating. Subsequent\n * changes animate normally. This prevents unwanted animations\n * on page refresh or back navigation (e.g. `useScroll` + `useSpring`).\n *\n * @default false\n */\n skipInitialAnimation?: boolean\n}\n\n/**\n * Create a `MotionValue` that animates to its latest value using any transition type.\n * Can either be a value or track another `MotionValue`.\n *\n * ```jsx\n * const x = motionValue(0)\n * const y = followValue(x, { type: \"spring\", stiffness: 300 })\n * // or with tween\n * const z = followValue(x, { type: \"tween\", duration: 0.5, ease: \"easeOut\" })\n * ```\n *\n * @param source - Initial value or MotionValue to track\n * @param options - Animation transition options\n * @returns `MotionValue`\n *\n * @public\n */\nexport function followValue(\n source: T | MotionValue,\n options?: FollowValueOptions\n) {\n const initialValue = isMotionValue(source) ? source.get() : source\n const value = motionValue(initialValue)\n\n attachFollow(value, source, options)\n\n return value\n}\n\n/**\n * Attach an animation to a MotionValue that will animate whenever the value changes.\n * Similar to attachSpring but supports any transition type (spring, tween, inertia, etc.)\n *\n * @param value - The MotionValue to animate\n * @param source - Initial value or MotionValue to track\n * @param options - Animation transition options\n * @returns Cleanup function\n *\n * @public\n */\nexport function attachFollow(\n value: MotionValue,\n source: T | MotionValue,\n options: FollowValueOptions = {}\n): VoidFunction {\n const initialValue = value.get()\n\n let activeAnimation: JSAnimation | null = null\n let latestValue = initialValue\n let latestSetter: (v: T) => void\n\n const unit =\n typeof initialValue === \"string\"\n ? initialValue.replace(/[\\d.-]/g, \"\")\n : undefined\n\n const stopAnimation = () => {\n if (activeAnimation) {\n activeAnimation.stop()\n activeAnimation = null\n }\n value.animation = undefined\n }\n\n const startAnimation = () => {\n const currentValue = asNumber(value.get())\n const targetValue = asNumber(latestValue)\n\n // Don't animate if we're already at the target\n if (currentValue === targetValue) {\n stopAnimation()\n return\n }\n\n // Use the running animation's analytical velocity for accuracy,\n // falling back to the MotionValue's velocity for the initial animation.\n // This prevents systematic velocity loss at high frame rates (240hz+).\n const velocity = activeAnimation\n ? activeAnimation.getGeneratorVelocity()\n : value.getVelocity()\n\n stopAnimation()\n\n activeAnimation = new JSAnimation({\n keyframes: [currentValue, targetValue],\n velocity,\n // Default to spring if no type specified (matches useSpring behavior)\n type: \"spring\",\n restDelta: 0.001,\n restSpeed: 0.01,\n ...options,\n onUpdate: latestSetter,\n })\n }\n\n // Use a stable function reference so the frame loop Set deduplicates\n // multiple calls within the same frame (e.g. rapid mouse events)\n const scheduleAnimation = () => {\n startAnimation()\n value.animation = activeAnimation ?? undefined\n value[\"events\"].animationStart?.notify()\n activeAnimation?.then(() => {\n value.animation = undefined\n value[\"events\"].animationComplete?.notify()\n })\n }\n\n value.attach((v, set) => {\n latestValue = v\n latestSetter = (latest) => set(parseValue(latest, unit) as T)\n frame.postRender(scheduleAnimation)\n }, stopAnimation)\n\n if (isMotionValue(source)) {\n let skipNextAnimation = options.skipInitialAnimation === true\n\n const removeSourceOnChange = source.on(\"change\", (v) => {\n if (skipNextAnimation) {\n skipNextAnimation = false\n value.jump(parseValue(v, unit) as T, false)\n } else {\n value.set(parseValue(v, unit) as T)\n }\n })\n\n const removeValueOnDestroy = value.on(\"destroy\", removeSourceOnChange)\n\n return () => {\n removeSourceOnChange()\n removeValueOnDestroy()\n }\n }\n\n return stopAnimation\n}\n\nfunction parseValue(v: AnyResolvedKeyframe, unit?: string) {\n return unit ? v + unit : v\n}\n\nfunction asNumber(v: AnyResolvedKeyframe) {\n return typeof v === \"number\" ? v : parseFloat(v)\n}\n","import { MotionValue } from \".\"\nimport { cancelFrame, frame } from \"../frameloop\"\n\nexport function subscribeValue(\n inputValues: MotionValue[],\n outputValue: MotionValue,\n getLatest: () => O\n) {\n const update = () => outputValue.set(getLatest())\n const scheduleUpdate = () => frame.preRender(update, false, true)\n\n const subscriptions = inputValues.map((v) => v.on(\"change\", scheduleUpdate))\n\n outputValue.on(\"destroy\", () => {\n subscriptions.forEach((unsubscribe) => unsubscribe())\n cancelFrame(update)\n })\n}\n","import { MotionValue, collectMotionValues, motionValue } from \".\"\nimport { subscribeValue } from \"./subscribe-value\"\n\nexport type TransformInputRange = number[]\nexport type SingleTransformer = (input: I) => O\nexport type MultiTransformer = (input: I[]) => O\nexport type ValueTransformer =\n | SingleTransformer\n | MultiTransformer\n\n/**\n * Create a `MotionValue` that transforms the output of other `MotionValue`s by\n * passing their latest values through a transform function.\n *\n * Whenever a `MotionValue` referred to in the provided function is updated,\n * it will be re-evaluated.\n *\n * ```jsx\n * const x = motionValue(0)\n * const y = transformValue(() => x.get() * 2) // double x\n * ```\n *\n * @param transformer - A transform function. This function must be pure with no side-effects or conditional statements.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function transformValue(transform: () => O): MotionValue {\n const collectedValues: MotionValue[] = []\n\n /**\n * Open session of collectMotionValues. Any MotionValue that calls get()\n * inside transform will be saved into this array.\n */\n collectMotionValues.current = collectedValues\n const initialValue = transform()\n collectMotionValues.current = undefined\n\n const value = motionValue(initialValue)\n\n subscribeValue(collectedValues, value, transform)\n\n return value\n}\n","import { MotionValue } from \".\"\nimport { transform, TransformOptions } from \"../utils/transform\"\nimport { transformValue } from \"./transform-value\"\n\nexport type MapInputRange = number[]\n\n/**\n * Create a `MotionValue` that maps the output of another `MotionValue` by\n * mapping it from one range of values into another.\n *\n * @remarks\n *\n * Given an input range of `[-200, -100, 100, 200]` and an output range of\n * `[0, 1, 1, 0]`, the returned `MotionValue` will:\n *\n * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`.\n * - When provided a value between `-100` and `100`, will return `1`.\n * - When provided a value between `100` and `200`, will return a value between `1` and `0`\n *\n * The input range must be a linear series of numbers. The output range\n * can be any value type supported by Motion: numbers, colors, shadows, etc.\n *\n * Every value in the output range must be of the same type and in the same format.\n *\n * ```jsx\n * const x = motionValue(0)\n * const xRange = [-200, -100, 100, 200]\n * const opacityRange = [0, 1, 1, 0]\n * const opacity = mapValue(x, xRange, opacityRange)\n * ```\n *\n * @param inputValue - `MotionValue`\n * @param inputRange - A linear series of numbers (either all increasing or decreasing)\n * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`.\n * @param options -\n *\n * - clamp: boolean. Clamp values to within the given range. Defaults to `true`\n * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each.\n *\n * @returns `MotionValue`\n *\n * @public\n */\nexport function mapValue(\n inputValue: MotionValue,\n inputRange: MapInputRange,\n outputRange: O[],\n options?: TransformOptions\n): MotionValue {\n const map = transform(inputRange, outputRange, options)\n return transformValue(() => map(inputValue.get()))\n}\n","import { MotionValue } from \".\"\nimport { AnyResolvedKeyframe, SpringOptions } from \"../animation/types\"\nimport { attachFollow, followValue } from \"./follow-value\"\n\n/**\n * Create a `MotionValue` that animates to its latest value using a spring.\n * Can either be a value or track another `MotionValue`.\n *\n * ```jsx\n * const x = motionValue(0)\n * const y = springValue(x, { stiffness: 300 })\n * ```\n *\n * @param source - Initial value or MotionValue to track\n * @param options - Spring configuration options\n * @returns `MotionValue`\n *\n * @public\n */\nexport function springValue(\n source: T | MotionValue,\n options?: SpringOptions\n) {\n return followValue(source, { type: \"spring\", ...options })\n}\n\n/**\n * Attach a spring animation to a MotionValue that will animate whenever the value changes.\n *\n * @param value - The MotionValue to animate\n * @param source - Initial value or MotionValue to track\n * @param options - Spring configuration options\n * @returns Cleanup function\n *\n * @public\n */\nexport function attachSpring(\n value: MotionValue,\n source: T | MotionValue,\n options?: SpringOptions\n): VoidFunction {\n return attachFollow(value, source, { type: \"spring\", ...options })\n}\n","import { color } from \"../color\"\nimport { complex } from \"../complex\"\nimport { dimensionValueTypes } from \"../dimensions\"\nimport { testValueType } from \"../test\"\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex]\n\n/**\n * Tests a value against the list of ValueTypes\n */\nexport const findValueType = (v: any) => valueTypes.find(testValueType(v))\n","export function chooseLayerType(\n valueName: \"layout\" | \"enter\" | \"exit\" | \"new\" | \"old\"\n): \"group\" | \"old\" | \"new\" {\n if (valueName === \"layout\") return \"group\"\n if (valueName === \"enter\" || valueName === \"new\") return \"new\"\n if (valueName === \"exit\" || valueName === \"old\") return \"old\"\n\n return \"group\"\n}\n","let pendingRules: Record> = {}\n\nlet style: HTMLStyleElement | null = null\n\nexport const css = {\n set: (selector: string, values: Record) => {\n pendingRules[selector] = values\n },\n\n commit: () => {\n if (!style) {\n style = document.createElement(\"style\")\n style.id = \"motion-view\"\n }\n\n let cssText = \"\"\n\n for (const selector in pendingRules) {\n const rule = pendingRules[selector]\n cssText += `${selector} {\\n`\n for (const [property, value] of Object.entries(rule)) {\n cssText += ` ${property}: ${value};\\n`\n }\n cssText += \"}\\n\"\n }\n\n style.textContent = cssText\n document.head.appendChild(style)\n\n pendingRules = {}\n },\n\n remove: () => {\n if (style && style.parentElement) {\n style.parentElement.removeChild(style)\n }\n },\n}\n","export function getViewAnimationLayerInfo(pseudoElement: string) {\n const match = pseudoElement.match(\n /::view-transition-(old|new|group|image-pair)\\((.*?)\\)/\n )\n if (!match) return null\n\n return { layer: match[2], type: match[1] }\n}\n","function filterViewAnimations(animation: Animation) {\n const { effect } = animation\n if (!effect) return false\n\n return (\n effect.target === document.documentElement &&\n effect.pseudoElement?.startsWith(\"::view-transition\")\n )\n}\n\nexport function getViewAnimations() {\n return document.getAnimations().filter(filterViewAnimations)\n}\n","import { ViewTransitionTarget, ViewTransitionTargetDefinition } from \"../types\"\n\nexport function hasTarget(\n target: ViewTransitionTargetDefinition,\n targets: Map\n) {\n return targets.has(target) && Object.keys(targets.get(target)!).length > 0\n}\n","import { secondsToMilliseconds } from \"motion-utils\"\nimport { GroupAnimation } from \"../animation/GroupAnimation\"\nimport { NativeAnimation } from \"../animation/NativeAnimation\"\nimport { NativeAnimationWrapper } from \"../animation/NativeAnimationWrapper\"\nimport { AnimationPlaybackControls } from \"../animation/types\"\nimport { getValueTransition } from \"../animation/utils/get-value-transition\"\nimport { mapEasingToNativeEasing } from \"../animation/waapi/easing/map-easing\"\nimport { applyGeneratorOptions } from \"../animation/waapi/utils/apply-generator\"\nimport type { ViewTransitionBuilder } from \"./index\"\nimport { ViewTransitionTarget } from \"./types\"\nimport { chooseLayerType } from \"./utils/choose-layer-type\"\nimport { css } from \"./utils/css\"\nimport { getViewAnimationLayerInfo } from \"./utils/get-layer-info\"\nimport { getViewAnimations } from \"./utils/get-view-animations\"\nimport { hasTarget } from \"./utils/has-target\"\n\nconst definitionNames = [\"layout\", \"enter\", \"exit\", \"new\", \"old\"] as const\n\nexport function startViewAnimation(\n builder: ViewTransitionBuilder\n): Promise {\n const { update, targets, options: defaultOptions } = builder\n\n if (!document.startViewTransition) {\n return new Promise(async (resolve) => {\n await update()\n resolve(new GroupAnimation([]))\n })\n }\n\n // TODO: Go over existing targets and ensure they all have ids\n\n /**\n * If we don't have any animations defined for the root target,\n * remove it from being captured.\n */\n if (!hasTarget(\"root\", targets)) {\n css.set(\":root\", {\n \"view-transition-name\": \"none\",\n })\n }\n\n /**\n * Set the timing curve to linear for all view transition layers.\n * This gets baked into the keyframes, which can't be changed\n * without breaking the generated animation.\n *\n * This allows us to set easing via updateTiming - which can be changed.\n */\n css.set(\n \"::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)\",\n { \"animation-timing-function\": \"linear !important\" }\n )\n\n css.commit() // Write\n\n const transition = document.startViewTransition(async () => {\n await update()\n\n // TODO: Go over new targets and ensure they all have ids\n })\n\n transition.finished.finally(() => {\n css.remove() // Write\n })\n\n return new Promise((resolve) => {\n transition.ready.then(() => {\n const generatedViewAnimations = getViewAnimations()\n\n const animations: AnimationPlaybackControls[] = []\n\n /**\n * Create animations for each of our explicitly-defined subjects.\n */\n targets.forEach((definition, target) => {\n // TODO: If target is not \"root\", resolve elements\n // and iterate over each\n for (const key of definitionNames) {\n if (!definition[key]) continue\n const { keyframes, options } =\n definition[key as keyof ViewTransitionTarget]!\n\n for (let [valueName, valueKeyframes] of Object.entries(\n keyframes\n )) {\n if (!valueKeyframes) continue\n\n const valueOptions = {\n ...getValueTransition(\n defaultOptions as any,\n valueName\n ),\n ...getValueTransition(options as any, valueName),\n }\n\n const type = chooseLayerType(\n key as keyof ViewTransitionTarget\n )\n\n /**\n * If this is an opacity animation, and keyframes are not an array,\n * we need to convert them into an array and set an initial value.\n */\n if (\n valueName === \"opacity\" &&\n !Array.isArray(valueKeyframes)\n ) {\n const initialValue = type === \"new\" ? 0 : 1\n valueKeyframes = [initialValue, valueKeyframes]\n }\n\n /**\n * Resolve stagger function if provided.\n */\n if (typeof valueOptions.delay === \"function\") {\n valueOptions.delay = valueOptions.delay(0, 1)\n }\n\n valueOptions.duration &&= secondsToMilliseconds(\n valueOptions.duration\n )\n\n valueOptions.delay &&= secondsToMilliseconds(\n valueOptions.delay\n )\n\n const animation = new NativeAnimation({\n ...valueOptions,\n element: document.documentElement,\n name: valueName,\n pseudoElement: `::view-transition-${type}(${target})`,\n keyframes: valueKeyframes,\n })\n\n animations.push(animation)\n }\n }\n })\n\n /**\n * Handle browser generated animations\n */\n for (const animation of generatedViewAnimations) {\n if (animation.playState === \"finished\") continue\n\n const { effect } = animation\n if (!effect || !(effect instanceof KeyframeEffect)) continue\n\n const { pseudoElement } = effect\n if (!pseudoElement) continue\n\n const name = getViewAnimationLayerInfo(pseudoElement)\n if (!name) continue\n\n const targetDefinition = targets.get(name.layer)\n\n if (!targetDefinition) {\n /**\n * If transition name is group then update the timing of the animation\n * whereas if it's old or new then we could possibly replace it using\n * the above method.\n */\n const transitionName = name.type === \"group\" ? \"layout\" : \"\"\n let animationTransition = {\n ...getValueTransition(defaultOptions, transitionName),\n }\n\n animationTransition.duration &&= secondsToMilliseconds(\n animationTransition.duration\n )\n\n animationTransition =\n applyGeneratorOptions(animationTransition)\n\n const easing = mapEasingToNativeEasing(\n animationTransition.ease,\n animationTransition.duration!\n ) as string\n\n effect.updateTiming({\n delay: secondsToMilliseconds(\n animationTransition.delay ?? 0\n ),\n duration: animationTransition.duration,\n easing,\n })\n\n animations.push(new NativeAnimationWrapper(animation))\n } else if (\n hasOpacity(targetDefinition, \"enter\") &&\n hasOpacity(targetDefinition, \"exit\") &&\n effect\n .getKeyframes()\n .some((keyframe) => keyframe.mixBlendMode)\n ) {\n animations.push(new NativeAnimationWrapper(animation))\n } else {\n animation.cancel()\n }\n }\n\n resolve(new GroupAnimation(animations))\n })\n })\n}\n\nfunction hasOpacity(\n target: ViewTransitionTarget | undefined,\n key: \"enter\" | \"exit\" | \"layout\"\n) {\n return target?.[key]?.keyframes.opacity\n}\n","import { removeItem } from \"motion-utils\"\nimport type { ViewTransitionBuilder } from \".\"\nimport { microtask } from \"../frameloop/microtask\"\nimport { startViewAnimation } from \"./start\"\n\nlet builders: ViewTransitionBuilder[] = []\n\nlet current: ViewTransitionBuilder | null = null\n\nfunction next() {\n current = null\n const [nextBuilder] = builders\n if (nextBuilder) start(nextBuilder)\n}\n\nfunction start(builder: ViewTransitionBuilder) {\n removeItem(builders, builder)\n current = builder\n startViewAnimation(builder).then((animation) => {\n builder.notifyReady(animation)\n animation.finished.finally(next)\n })\n}\n\nfunction processQueue() {\n /**\n * Iterate backwards over the builders array. We can ignore the\n * \"wait\" animations. If we have an interrupting animation in the\n * queue then we need to batch all preceeding animations into it.\n * Currently this only batches the update functions but will also\n * need to batch the targets.\n */\n for (let i = builders.length - 1; i >= 0; i--) {\n const builder = builders[i]\n const { interrupt } = builder.options\n\n if (interrupt === \"immediate\") {\n const batchedUpdates = builders.slice(0, i + 1).map((b) => b.update)\n const remaining = builders.slice(i + 1)\n\n builder.update = () => {\n batchedUpdates.forEach((update) => update())\n }\n\n // Put the current builder at the front, followed by any \"wait\" builders\n builders = [builder, ...remaining]\n\n break\n }\n }\n\n if (!current || builders[0]?.options.interrupt === \"immediate\") {\n next()\n }\n}\n\nexport function addToQueue(builder: ViewTransitionBuilder) {\n builders.push(builder)\n microtask.render(processQueue)\n}\n","import { noop } from \"motion-utils\"\nimport type { GroupAnimation } from \"../animation/GroupAnimation\"\nimport { AnimationOptions, DOMKeyframesDefinition } from \"../animation/types\"\nimport { addToQueue } from \"./queue\"\nimport {\n ViewTransitionOptions,\n ViewTransitionTarget,\n ViewTransitionTargetDefinition,\n} from \"./types\"\nimport \"./types.global\"\n\nexport class ViewTransitionBuilder {\n private currentSubject: ViewTransitionTargetDefinition = \"root\"\n\n targets = new Map()\n\n update: () => void | Promise\n\n options: ViewTransitionOptions\n\n notifyReady: (value: GroupAnimation) => void = noop\n\n private readyPromise = new Promise((resolve) => {\n this.notifyReady = resolve\n })\n\n constructor(\n update: () => void | Promise,\n options: ViewTransitionOptions = {}\n ) {\n this.update = update\n this.options = {\n interrupt: \"wait\",\n ...options,\n }\n addToQueue(this)\n }\n\n get(subject: ViewTransitionTargetDefinition) {\n this.currentSubject = subject\n\n return this\n }\n\n layout(keyframes: DOMKeyframesDefinition, options?: AnimationOptions) {\n this.updateTarget(\"layout\", keyframes, options)\n\n return this\n }\n\n new(keyframes: DOMKeyframesDefinition, options?: AnimationOptions) {\n this.updateTarget(\"new\", keyframes, options)\n\n return this\n }\n\n old(keyframes: DOMKeyframesDefinition, options?: AnimationOptions) {\n this.updateTarget(\"old\", keyframes, options)\n\n return this\n }\n\n enter(keyframes: DOMKeyframesDefinition, options?: AnimationOptions) {\n this.updateTarget(\"enter\", keyframes, options)\n\n return this\n }\n\n exit(keyframes: DOMKeyframesDefinition, options?: AnimationOptions) {\n this.updateTarget(\"exit\", keyframes, options)\n\n return this\n }\n\n crossfade(options?: AnimationOptions) {\n this.updateTarget(\"enter\", { opacity: 1 }, options)\n this.updateTarget(\"exit\", { opacity: 0 }, options)\n\n return this\n }\n\n updateTarget(\n target: \"enter\" | \"exit\" | \"layout\" | \"new\" | \"old\",\n keyframes: DOMKeyframesDefinition,\n options: AnimationOptions = {}\n ) {\n const { currentSubject, targets } = this\n\n if (!targets.has(currentSubject)) {\n targets.set(currentSubject, {})\n }\n\n const targetData = targets.get(currentSubject)!\n\n targetData[target] = { keyframes, options }\n }\n\n then(resolve: () => void, reject?: () => void) {\n return this.readyPromise.then(resolve, reject)\n }\n}\n\nexport function animateView(\n update: () => void | Promise,\n defaultOptions: ViewTransitionOptions = {}\n) {\n return new ViewTransitionBuilder(update, defaultOptions)\n}\n","import { Axis, AxisDelta, Box, Delta } from \"motion-utils\"\n\nexport const createAxisDelta = (): AxisDelta => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n})\n\nexport const createDelta = (): Delta => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n})\n\nexport const createAxis = (): Axis => ({ min: 0, max: 0 })\n\nexport const createBox = (): Box => ({\n x: createAxis(),\n y: createAxis(),\n})\n","import type { VisualElement } from \"./VisualElement\"\n\nexport const visualElementStore = new WeakMap()\n","import type { LegacyAnimationControls } from \"../../node/types\"\n\nexport function isAnimationControls(v?: unknown): v is LegacyAnimationControls {\n return (\n v !== null &&\n typeof v === \"object\" &&\n typeof (v as LegacyAnimationControls).start === \"function\"\n )\n}\n","/**\n * Decides if the supplied variable is variant label\n */\nexport function isVariantLabel(v: unknown): v is string | string[] {\n return typeof v === \"string\" || Array.isArray(v)\n}\n","import type { AnimationType } from \"../types\"\n\nexport const variantPriorityOrder: AnimationType[] = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n]\n\nexport const variantProps = [\"initial\", ...variantPriorityOrder]\n","import type { MotionNodeOptions } from \"../../node/types\"\nimport { isAnimationControls } from \"./is-animation-controls\"\nimport { isVariantLabel } from \"./is-variant-label\"\nimport { variantProps } from \"./variant-props\"\n\nexport function isControllingVariants(props: MotionNodeOptions) {\n return (\n isAnimationControls(props.animate) ||\n variantProps.some((name) =>\n isVariantLabel(props[name as keyof typeof props])\n )\n )\n}\n\nexport function isVariantNode(props: MotionNodeOptions) {\n return Boolean(isControllingVariants(props) || props.variants)\n}\n","import { motionValue } from \"../../value\"\nimport { isMotionValue } from \"../../value/utils/is-motion-value\"\n\ntype MotionStyleLike = Record\n\n/**\n * Updates motion values from props changes.\n * Uses `any` type for element to avoid circular dependencies with VisualElement.\n */\nexport function updateMotionValuesFromProps(\n element: any,\n next: MotionStyleLike,\n prev: MotionStyleLike\n) {\n for (const key in next) {\n const nextValue = next[key]\n const prevValue = prev[key]\n\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue)\n } else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }))\n } else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key)!\n\n if (existingValue.liveStyle === true) {\n existingValue.jump(nextValue)\n } else if (!existingValue.hasAnimated) {\n existingValue.set(nextValue)\n }\n } else {\n const latestValue = element.getStaticValue(key)\n element.addValue(\n key,\n motionValue(\n latestValue !== undefined ? latestValue : nextValue,\n { owner: element }\n )\n )\n }\n }\n }\n\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined) element.removeValue(key)\n }\n\n return next\n}\n","interface ReducedMotionState {\n current: boolean | null\n}\n\n// Does this device prefer reduced motion? Returns `null` server-side.\nexport const prefersReducedMotion: ReducedMotionState = { current: null }\n\nexport const hasReducedMotionListener = { current: false }\n","import { hasReducedMotionListener, prefersReducedMotion } from \"./state\"\n\nconst isBrowser = typeof window !== \"undefined\"\n\nexport function initPrefersReducedMotion() {\n hasReducedMotionListener.current = true\n if (!isBrowser) return\n\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\")\n\n const setReducedMotionPreferences = () =>\n (prefersReducedMotion.current = motionMediaQuery.matches)\n\n motionMediaQuery.addEventListener(\"change\", setReducedMotionPreferences)\n\n setReducedMotionPreferences()\n } else {\n prefersReducedMotion.current = false\n }\n}\n\nexport { prefersReducedMotion, hasReducedMotionListener }\n","import {\n Box,\n isNumericalString,\n isZeroValueString,\n secondsToMilliseconds,\n SubscriptionManager,\n warnOnce,\n} from \"motion-utils\"\nimport { KeyframeResolver } from \"../animation/keyframes/KeyframesResolver\"\nimport { NativeAnimation } from \"../animation/NativeAnimation\"\nimport type { AnyResolvedKeyframe } from \"../animation/types\"\nimport { acceleratedValues } from \"../animation/waapi/utils/accelerated-values\"\nimport { cancelFrame, frame } from \"../frameloop\"\nimport { microtask } from \"../frameloop/microtask\"\nimport { time } from \"../frameloop/sync-time\"\nimport type { MotionNodeOptions } from \"../node/types\"\nimport { createBox } from \"../projection/geometry/models\"\nimport { motionValue, MotionValue } from \"../value\"\nimport { complex } from \"../value/types/complex\"\nimport { getAnimatableNone } from \"../value/types/utils/animatable-none\"\nimport { findValueType } from \"../value/types/utils/find\"\nimport { isMotionValue } from \"../value/utils/is-motion-value\"\nimport { Feature } from \"./Feature\"\nimport { visualElementStore } from \"./store\"\nimport {\n FeatureDefinitions,\n MotionConfigContextProps,\n PresenceContextProps,\n ReducedMotionConfig,\n ResolvedValues,\n VisualElementEventCallbacks,\n VisualElementOptions,\n} from \"./types\"\nimport { AnimationState } from \"./utils/animation-state\"\nimport {\n isControllingVariants as checkIsControllingVariants,\n isVariantNode as checkIsVariantNode,\n} from \"./utils/is-controlling-variants\"\nimport { transformProps } from \"./utils/keys-transform\"\nimport { updateMotionValuesFromProps } from \"./utils/motion-values\"\nimport {\n hasReducedMotionListener,\n initPrefersReducedMotion,\n prefersReducedMotion,\n} from \"./utils/reduced-motion\"\nimport { resolveVariantFromProps } from \"./utils/resolve-variants\"\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n] as const\n\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions: Partial = {}\n\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nexport function setFeatureDefinitions(\n definitions: Partial\n) {\n featureDefinitions = definitions\n}\n\n/**\n * Get the current feature definitions\n */\nexport function getFeatureDefinitions(): Partial {\n return featureDefinitions\n}\n\n/**\n * Motion style type - a subset of CSS properties that can contain motion values\n */\nexport type MotionStyle = {\n [K: string]: AnyResolvedKeyframe | MotionValue | undefined\n}\n\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nexport abstract class VisualElement<\n Instance = unknown,\n RenderState = unknown,\n Options extends {} = {}\n> {\n /**\n * VisualElements are arranged in trees mirroring that of the React tree.\n * Each type of VisualElement has a unique name, to detect when we're crossing\n * type boundaries within that tree.\n */\n abstract type: string\n\n /**\n * An `Array.sort` compatible function that will compare two Instances and\n * compare their respective positions within the tree.\n */\n abstract sortInstanceNodePosition(a: Instance, b: Instance): number\n\n /**\n * Measure the viewport-relative bounding box of the Instance.\n */\n abstract measureInstanceViewportBox(\n instance: Instance,\n props: MotionNodeOptions & Partial\n ): Box\n\n /**\n * When a value has been removed from all animation props we need to\n * pick a target to animate back to. For instance, for HTMLElements\n * we can look in the style prop.\n */\n abstract getBaseTargetFromProps(\n props: MotionNodeOptions,\n key: string\n ): AnyResolvedKeyframe | undefined | MotionValue\n\n /**\n * When we first animate to a value we need to animate it *from* a value.\n * Often this have been specified via the initial prop but it might be\n * that the value needs to be read from the Instance.\n */\n abstract readValueFromInstance(\n instance: Instance,\n key: string,\n options: Options\n ): AnyResolvedKeyframe | null | undefined\n\n /**\n * When a value has been removed from the VisualElement we use this to remove\n * it from the inherting class' unique render state.\n */\n abstract removeValueFromRenderState(\n key: string,\n renderState: RenderState\n ): void\n\n /**\n * Run before a React or VisualElement render, builds the latest motion\n * values into an Instance-specific format. For example, HTMLVisualElement\n * will use this step to build `style` and `var` values.\n */\n abstract build(\n renderState: RenderState,\n latestValues: ResolvedValues,\n props: MotionNodeOptions\n ): void\n\n /**\n * Apply the built values to the Instance. For example, HTMLElements will have\n * styles applied via `setProperty` and the style attribute, whereas SVGElements\n * will have values applied to attributes.\n */\n abstract renderInstance(\n instance: Instance,\n renderState: RenderState,\n styleProp?: MotionStyle,\n projection?: any\n ): void\n\n /**\n * This method is called when a transform property is bound to a motion value.\n * It's currently used to measure SVG elements when a new transform property is bound.\n */\n onBindTransform?(): void\n\n /**\n * If the component child is provided as a motion value, handle subscriptions\n * with the renderer-specific VisualElement.\n */\n handleChildMotionValue?(): void\n\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(\n _props: MotionNodeOptions,\n _prevProps: MotionNodeOptions,\n _visualElement: VisualElement\n ): {\n [key: string]: MotionValue | AnyResolvedKeyframe\n } {\n return {}\n }\n\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n current: Instance | null = null\n\n /**\n * A reference to the parent VisualElement (if exists).\n */\n parent: VisualElement | undefined\n\n /**\n * A set containing references to this VisualElement's children.\n */\n children = new Set()\n\n /**\n * A set containing the latest children of this VisualElement. This is flushed\n * at the start of every commit. We use it to calculate the stagger delay\n * for newly-added children.\n */\n enteringChildren?: Set\n\n /**\n * The depth of this VisualElement within the overall VisualElement tree.\n */\n depth: number\n\n /**\n * The current render state of this VisualElement. Defined by inherting VisualElements.\n */\n renderState: RenderState\n\n /**\n * An object containing the latest static values for each of this VisualElement's\n * MotionValues.\n */\n latestValues: ResolvedValues\n\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n isVariantNode: boolean = false\n isControllingVariants: boolean = false\n\n /**\n * If this component is part of the variant tree, it should track\n * any children that are also part of the tree. This is essentially\n * a shadow tree to simplify logic around how to stagger over children.\n */\n variantChildren?: Set\n\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n shouldReduceMotion: boolean | null = null\n\n /**\n * Decides whether animations should be skipped for this VisualElement.\n * Useful for E2E tests and visual regression testing.\n */\n shouldSkipAnimations: boolean = false\n\n /**\n * Normally, if a component is controlled by a parent's variants, it can\n * rely on that ancestor to trigger animations further down the tree.\n * However, if a component is created after its parent is mounted, the parent\n * won't trigger that mount animation so the child needs to.\n *\n * TODO: This might be better replaced with a method isParentMounted\n */\n manuallyAnimateOnMount: boolean\n\n /**\n * This can be set by AnimatePresence to force components that mount\n * at the same time as it to mount as if they have initial={false} set.\n */\n blockInitialAnimation: boolean\n\n /**\n * A reference to this VisualElement's projection node, used in layout animations.\n */\n projection?: any\n\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n values = new Map()\n\n /**\n * The AnimationState, this is hydrated by the animation Feature.\n */\n animationState?: AnimationState\n\n KeyframeResolver = KeyframeResolver\n\n /**\n * The options used to create this VisualElement. The Options type is defined\n * by the inheriting VisualElement and is passed straight through to the render functions.\n */\n readonly options: Options\n\n /**\n * A reference to the latest props provided to the VisualElement's host React component.\n */\n props: MotionNodeOptions\n prevProps?: MotionNodeOptions\n\n presenceContext: PresenceContextProps | null\n prevPresenceContext?: PresenceContextProps | null\n\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n private features: {\n [K in keyof FeatureDefinitions]?: Feature\n } = {}\n\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n private valueSubscriptions = new Map()\n\n /**\n * A reference to the ReducedMotionConfig passed to the VisualElement's host React component.\n */\n private reducedMotionConfig: ReducedMotionConfig | undefined\n\n /**\n * A reference to the skipAnimations config passed to the VisualElement's host React component.\n */\n private skipAnimationsConfig: boolean | undefined\n\n /**\n * On mount, this will be hydrated with a callback to disconnect\n * this visual element from its parent on unmount.\n */\n private removeFromVariantTree: undefined | VoidFunction\n\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n private prevMotionValues: MotionStyle = {}\n\n /**\n * When values are removed from all animation props we need to search\n * for a fallback value to animate to. These values are tracked in baseTarget.\n */\n private baseTarget: ResolvedValues\n\n /**\n * Create an object of the values we initially animated from (if initial prop present).\n */\n private initialValues: ResolvedValues\n\n /**\n * Track whether this element has been mounted before, to detect\n * remounts after Suspense unmount/remount cycles.\n */\n private hasBeenMounted = false\n\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n private events: {\n [key: string]: SubscriptionManager\n } = {}\n\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n private propEventSubscriptions: {\n [key: string]: VoidFunction\n } = {}\n\n constructor(\n {\n parent,\n props,\n presenceContext,\n reducedMotionConfig,\n skipAnimations,\n blockInitialAnimation,\n visualState,\n }: VisualElementOptions,\n options: Options = {} as any\n ) {\n const { latestValues, renderState } = visualState\n this.latestValues = latestValues\n this.baseTarget = { ...latestValues }\n this.initialValues = props.initial ? { ...latestValues } : {}\n this.renderState = renderState\n this.parent = parent\n this.props = props\n this.presenceContext = presenceContext\n this.depth = parent ? parent.depth + 1 : 0\n this.reducedMotionConfig = reducedMotionConfig\n this.skipAnimationsConfig = skipAnimations\n this.options = options\n this.blockInitialAnimation = Boolean(blockInitialAnimation)\n\n this.isControllingVariants = checkIsControllingVariants(props)\n this.isVariantNode = checkIsVariantNode(props)\n if (this.isVariantNode) {\n this.variantChildren = new Set()\n }\n\n this.manuallyAnimateOnMount = Boolean(parent && parent.current)\n\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } =\n this.scrapeMotionValuesFromProps(props, {}, this)\n\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key]\n\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key])\n }\n }\n }\n\n mount(instance: Instance) {\n /**\n * If this element has been mounted before (e.g. after a Suspense\n * unmount/remount), reset motion values to their initial state\n * so animations replay correctly from initial → animate.\n */\n if (this.hasBeenMounted) {\n for (const key in this.initialValues) {\n this.values.get(key)?.jump(this.initialValues[key])\n this.latestValues[key] = this.initialValues[key]\n }\n }\n\n this.current = instance\n\n visualElementStore.set(instance, this)\n\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance)\n }\n\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this)\n }\n\n this.values.forEach((value, key) => this.bindToMotionValue(key, value))\n\n /**\n * Determine reduced motion preference. Only initialize the matchMedia\n * listener if we actually need the dynamic value (i.e., when config\n * is neither \"never\" nor \"always\").\n */\n if (this.reducedMotionConfig === \"never\") {\n this.shouldReduceMotion = false\n } else if (this.reducedMotionConfig === \"always\") {\n this.shouldReduceMotion = true\n } else {\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion()\n }\n this.shouldReduceMotion = prefersReducedMotion.current\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n this.shouldReduceMotion !== true,\n \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\",\n \"reduced-motion-disabled\"\n )\n }\n\n /**\n * Set whether animations should be skipped based on the config.\n */\n this.shouldSkipAnimations = this.skipAnimationsConfig ?? false\n\n this.parent?.addChild(this)\n\n this.update(this.props, this.presenceContext)\n\n this.hasBeenMounted = true\n }\n\n unmount() {\n this.projection && this.projection.unmount()\n cancelFrame(this.notifyUpdate)\n cancelFrame(this.render)\n this.valueSubscriptions.forEach((remove) => remove())\n this.valueSubscriptions.clear()\n this.removeFromVariantTree && this.removeFromVariantTree()\n this.parent?.removeChild(this)\n\n for (const key in this.events) {\n this.events[key].clear()\n }\n\n for (const key in this.features) {\n const feature = this.features[key as keyof typeof this.features]\n if (feature) {\n feature.unmount()\n feature.isMounted = false\n }\n }\n this.current = null\n }\n\n addChild(child: VisualElement) {\n this.children.add(child)\n this.enteringChildren ??= new Set()\n this.enteringChildren.add(child)\n }\n\n removeChild(child: VisualElement) {\n this.children.delete(child)\n this.enteringChildren && this.enteringChildren.delete(child)\n }\n\n private bindToMotionValue(key: string, value: MotionValue) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)!()\n }\n\n if (\n value.accelerate &&\n acceleratedValues.has(key) &&\n this.current instanceof HTMLElement\n ) {\n const { factory, keyframes, times, ease, duration } =\n value.accelerate\n\n const animation = new NativeAnimation({\n element: this.current,\n name: key,\n keyframes,\n times,\n ease,\n duration: secondsToMilliseconds(duration),\n })\n\n const cleanup = factory(animation)\n\n this.valueSubscriptions.set(key, () => {\n cleanup()\n animation.cancel()\n })\n return\n }\n\n const valueIsTransform = transformProps.has(key)\n\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform()\n }\n\n const removeOnChange = value.on(\n \"change\",\n (latestValue: AnyResolvedKeyframe) => {\n this.latestValues[key] = latestValue\n\n this.props.onUpdate && frame.preRender(this.notifyUpdate)\n\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true\n }\n\n this.scheduleRender()\n }\n )\n\n let removeSyncCheck: VoidFunction | void\n if (\n typeof window !== \"undefined\" &&\n (window as any).MotionCheckAppearSync\n ) {\n removeSyncCheck = (window as any).MotionCheckAppearSync(\n this,\n key,\n value\n )\n }\n\n this.valueSubscriptions.set(key, () => {\n removeOnChange()\n if (removeSyncCheck) removeSyncCheck()\n // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n // can resubscribe before the animation is cancelled (#3315).\n })\n }\n\n sortNodePosition(other: VisualElement) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (\n !this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type\n ) {\n return 0\n }\n\n return this.sortInstanceNodePosition(\n this.current as Instance,\n other.current as Instance\n )\n }\n\n updateFeatures() {\n let key: keyof typeof featureDefinitions = \"animation\"\n\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key]\n\n if (!featureDefinition) continue\n\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition\n\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (\n !this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)\n ) {\n this.features[key] = new FeatureConstructor(this) as any\n }\n\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key]!\n if (feature.isMounted) {\n feature.update()\n } else {\n feature.mount()\n feature.isMounted = true\n }\n }\n }\n }\n\n notifyUpdate = () => this.notify(\"Update\", this.latestValues)\n\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props)\n }\n\n render = () => {\n if (!this.current) return\n this.triggerBuild()\n this.renderInstance(\n this.current,\n this.renderState,\n (this.props as any).style,\n this.projection\n )\n }\n\n private renderScheduledAt = 0.0\n scheduleRender = () => {\n const now = time.now()\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now\n frame.render(this.render, false, true)\n }\n }\n\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox()\n }\n\n getStaticValue(key: string) {\n return this.latestValues[key]\n }\n\n setStaticValue(key: string, value: AnyResolvedKeyframe) {\n this.latestValues[key] = value\n }\n\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(\n props: MotionNodeOptions,\n presenceContext: PresenceContextProps | null\n ) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender()\n }\n\n this.prevProps = this.props\n this.props = props\n\n this.prevPresenceContext = this.presenceContext\n this.presenceContext = presenceContext\n\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i]\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]()\n delete this.propEventSubscriptions[key]\n }\n\n const listenerName = (\"on\" + key) as keyof typeof props\n const listener = props[listenerName]\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key as any, listener)\n }\n }\n\n this.prevMotionValues = updateMotionValuesFromProps(\n this,\n this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this),\n this.prevMotionValues\n )\n\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue()\n }\n }\n\n getProps() {\n return this.props\n }\n\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name: string) {\n return this.props.variants ? this.props.variants[name] : undefined\n }\n\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition\n }\n\n getTransformPagePoint() {\n return (this.props as any).transformPagePoint\n }\n\n getClosestVariantNode(): VisualElement | undefined {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined\n }\n\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child: VisualElement) {\n const closestVariantNode = this.getClosestVariantNode()\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child)\n return () => closestVariantNode.variantChildren!.delete(child)\n }\n }\n\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key: string, value: MotionValue) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key)\n\n if (value !== existingValue) {\n if (existingValue) this.removeValue(key)\n this.bindToMotionValue(key, value)\n this.values.set(key, value)\n this.latestValues[key] = value.get()\n }\n }\n\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key: string) {\n this.values.delete(key)\n const unsubscribe = this.valueSubscriptions.get(key)\n if (unsubscribe) {\n unsubscribe()\n this.valueSubscriptions.delete(key)\n }\n delete this.latestValues[key]\n this.removeValueFromRenderState(key, this.renderState)\n }\n\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key: string) {\n return this.values.has(key)\n }\n\n /**\n * Get a motion value for this key. If called with a default\n * value, we'll create one if none exists.\n */\n getValue(key: string): MotionValue | undefined\n getValue(key: string, defaultValue: AnyResolvedKeyframe | null): MotionValue\n getValue(\n key: string,\n defaultValue?: AnyResolvedKeyframe | null\n ): MotionValue | undefined {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key]\n }\n\n let value = this.values.get(key)\n\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(\n defaultValue === null ? undefined : defaultValue,\n { owner: this }\n )\n this.addValue(key, value)\n }\n\n return value\n }\n\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key: string, target?: AnyResolvedKeyframe | null) {\n let value =\n this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options)\n\n if (value !== undefined && value !== null) {\n if (\n typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))\n ) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value)\n } else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target as string)\n }\n\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value)\n }\n\n return isMotionValue(value) ? value.get() : value\n }\n\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key: string, value: AnyResolvedKeyframe) {\n this.baseTarget[key] = value\n }\n\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key: string): ResolvedValues[string] | undefined | null {\n const { initial } = this.props\n\n let valueFromInitial: ResolvedValues[string] | undefined | null\n\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(\n this.props,\n initial as any,\n this.presenceContext?.custom\n )\n if (variant) {\n valueFromInitial = variant[\n key as keyof typeof variant\n ] as string\n }\n }\n\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial\n }\n\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key)\n if (target !== undefined && !isMotionValue(target)) return target\n\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key]\n }\n\n on(\n eventName: EventName,\n callback: VisualElementEventCallbacks[EventName]\n ) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager()\n }\n\n return this.events[eventName].add(callback)\n }\n\n notify(\n eventName: EventName,\n ...args: any\n ) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args)\n }\n }\n\n scheduleRenderMicrotask() {\n microtask.render(this.render)\n }\n}\n","import { isMotionValue } from \"../../value/utils/is-motion-value\"\nimport type { MotionValue } from \"../../value\"\nimport type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { DOMKeyframesResolver } from \"../../animation/keyframes/DOMKeyframesResolver\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport type { DOMVisualElementOptions } from \"./types\"\nimport type { HTMLRenderState } from \"../html/types\"\nimport { VisualElement, MotionStyle } from \"../VisualElement\"\n\nexport abstract class DOMVisualElement<\n Instance extends HTMLElement | SVGElement = HTMLElement,\n State extends HTMLRenderState = HTMLRenderState,\n Options extends DOMVisualElementOptions = DOMVisualElementOptions\n> extends VisualElement {\n sortInstanceNodePosition(a: Instance, b: Instance): number {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1\n }\n\n getBaseTargetFromProps(\n props: MotionNodeOptions,\n key: string\n ): AnyResolvedKeyframe | MotionValue | undefined {\n const style = (props as MotionNodeOptions & { style?: MotionStyle }).style\n return style ? (style[key] as string) : undefined\n }\n\n removeValueFromRenderState(\n key: string,\n { vars, style }: HTMLRenderState\n ): void {\n delete vars[key]\n delete style[key]\n }\n\n KeyframeResolver = DOMKeyframesResolver\n\n childSubscription?: VoidFunction\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription()\n delete this.childSubscription\n }\n\n const { children } = this.props as MotionNodeOptions & { children?: MotionValue | any }\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`\n }\n })\n }\n }\n}\n","import type { VisualElement } from \"./VisualElement\"\n\n/**\n * Feature base class for extending VisualElement functionality.\n * Features are plugins that can be mounted/unmounted to add behavior\n * like gestures, animations, or layout tracking.\n */\nexport abstract class Feature {\n isMounted = false\n\n node: VisualElement\n\n constructor(node: VisualElement) {\n this.node = node\n }\n\n abstract mount(): void\n\n abstract unmount(): void\n\n update(): void {}\n}\n","import { BoundingBox, Box, TransformPoint } from \"motion-utils\"\n\n/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nexport function convertBoundingBoxToBox({\n top,\n left,\n right,\n bottom,\n}: BoundingBox): Box {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n }\n}\n\nexport function convertBoxToBoundingBox({ x, y }: Box): BoundingBox {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min }\n}\n\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nexport function transformBoxPoints(\n point: BoundingBox,\n transformPoint?: TransformPoint\n) {\n if (!transformPoint) return point\n const topLeft = transformPoint({ x: point.left, y: point.top })\n const bottomRight = transformPoint({ x: point.right, y: point.bottom })\n\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n }\n}\n","import { type AnyResolvedKeyframe } from \"../../animation/types\"\nimport { ResolvedValues } from \"../../render/types\"\n\nfunction isIdentityScale(scale: AnyResolvedKeyframe | undefined) {\n return scale === undefined || scale === 1\n}\n\nexport function hasScale({ scale, scaleX, scaleY }: ResolvedValues) {\n return (\n !isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY)\n )\n}\n\nexport function hasTransform(values: ResolvedValues) {\n return (\n hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY ||\n values.skewX ||\n values.skewY\n )\n}\n\nexport function has2DTranslate(values: ResolvedValues) {\n return is2DTranslate(values.x) || is2DTranslate(values.y)\n}\n\nfunction is2DTranslate(value: AnyResolvedKeyframe | undefined) {\n return value && value !== \"0%\"\n}\n","import { Axis, Box, Delta, Point } from \"motion-utils\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { ResolvedValues } from \"../../render/types\"\nimport { hasTransform } from \"../utils/has-transform\"\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nexport function scalePoint(point: number, scale: number, originPoint: number) {\n const distanceFromOrigin = point - originPoint\n const scaled = scale * distanceFromOrigin\n return originPoint + scaled\n}\n\n/**\n * Applies a translate/scale delta to a point\n */\nexport function applyPointDelta(\n point: number,\n translate: number,\n scale: number,\n originPoint: number,\n boxScale?: number\n): number {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint)\n }\n\n return scalePoint(point, scale, originPoint) + translate\n}\n\n/**\n * Applies a translate/scale delta to an axis\n */\nexport function applyAxisDelta(\n axis: Axis,\n translate: number = 0,\n scale: number = 1,\n originPoint: number,\n boxScale?: number\n): void {\n axis.min = applyPointDelta(\n axis.min,\n translate,\n scale,\n originPoint,\n boxScale\n )\n\n axis.max = applyPointDelta(\n axis.max,\n translate,\n scale,\n originPoint,\n boxScale\n )\n}\n\n/**\n * Applies a translate/scale delta to a box\n */\nexport function applyBoxDelta(box: Box, { x, y }: Delta): void {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint)\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint)\n}\n\nconst TREE_SCALE_SNAP_MIN = 0.999999999999\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001\n\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nexport function applyTreeDeltas(\n box: Box,\n treeScale: Point,\n treePath: any[],\n isSharedTransition: boolean = false\n) {\n const treeLength = treePath.length\n if (!treeLength) return\n\n // Reset the treeScale\n treeScale.x = treeScale.y = 1\n\n let node: any\n let delta: Delta | undefined\n\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i]\n delta = node.projectionDelta\n\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const { visualElement } = node.options\n if (\n visualElement &&\n visualElement.props.style &&\n visualElement.props.style.display === \"contents\"\n ) {\n continue\n }\n\n if (\n isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root\n ) {\n translateAxis(box.x, -node.scroll.offset.x)\n translateAxis(box.y, -node.scroll.offset.y)\n }\n\n if (delta) {\n // Incoporate each ancestor's scale into a cumulative treeScale for this component\n treeScale.x *= delta.x.scale\n treeScale.y *= delta.y.scale\n\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta)\n }\n\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues, node.layout?.layoutBox)\n }\n }\n\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n if (\n treeScale.x < TREE_SCALE_SNAP_MAX &&\n treeScale.x > TREE_SCALE_SNAP_MIN\n ) {\n treeScale.x = 1.0\n }\n if (\n treeScale.y < TREE_SCALE_SNAP_MAX &&\n treeScale.y > TREE_SCALE_SNAP_MIN\n ) {\n treeScale.y = 1.0\n }\n}\n\nexport function translateAxis(axis: Axis, distance: number) {\n axis.min += distance\n axis.max += distance\n}\n\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nexport function transformAxis(\n axis: Axis,\n axisTranslate?: number,\n axisScale?: number,\n boxScale?: number,\n axisOrigin: number = 0.5\n): void {\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin)\n\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale)\n}\n\nfunction resolveAxisTranslate(\n value: number | string | undefined,\n axis: Axis\n): number | undefined {\n if (typeof value === \"string\") {\n return (parseFloat(value) / 100) * (axis.max - axis.min)\n }\n return value as number | undefined\n}\n\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nexport function transformBox(\n box: Box,\n transform: ResolvedValues,\n sourceBox?: Box\n) {\n const resolveBox = sourceBox ?? box\n transformAxis(\n box.x,\n resolveAxisTranslate(transform.x, resolveBox.x),\n transform.scaleX as number,\n transform.scale as number,\n transform.originX as number\n )\n transformAxis(\n box.y,\n resolveAxisTranslate(transform.y, resolveBox.y),\n transform.scaleY as number,\n transform.scale as number,\n transform.originY as number\n )\n}\n","import { TransformPoint } from \"motion-utils\"\nimport {\n convertBoundingBoxToBox,\n transformBoxPoints,\n} from \"../geometry/conversion\"\nimport { translateAxis } from \"../geometry/delta-apply\"\n\nexport function measureViewportBox(\n instance: HTMLElement,\n transformPoint?: TransformPoint\n) {\n return convertBoundingBoxToBox(\n transformBoxPoints(instance.getBoundingClientRect(), transformPoint)\n )\n}\n\nexport function measurePageBox(\n element: HTMLElement,\n rootProjectionNode: any,\n transformPagePoint?: TransformPoint\n) {\n const viewportBox = measureViewportBox(element, transformPagePoint)\n const { scroll } = rootProjectionNode\n\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x)\n translateAxis(viewportBox.y, scroll.offset.y)\n }\n\n return viewportBox\n}\n","import { getValueAsType } from \"../../../value/types/utils/get-as-type\"\nimport { numberValueTypes } from \"../../../value/types/maps/number\"\nimport { transformPropOrder } from \"../../utils/keys-transform\"\nimport { ResolvedValues } from \"../../types\"\nimport { HTMLRenderState } from \"../types\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n}\n\nconst numTransforms = transformPropOrder.length\n\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nexport function buildTransform(\n latestValues: ResolvedValues,\n transform: HTMLRenderState[\"transform\"],\n transformTemplate?: MotionNodeOptions[\"transformTemplate\"]\n) {\n // The transform string we're going to build into.\n let transformString = \"\"\n let transformIsDefault = true\n\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i] as keyof typeof translateAlias\n const value = latestValues[key]\n\n if (value === undefined) continue\n\n let valueIsDefault = true\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0)\n } else {\n const parsed = parseFloat(value)\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0\n }\n\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key])\n\n if (!valueIsDefault) {\n transformIsDefault = false\n const transformName = translateAlias[key] || key\n transformString += `${transformName}(${valueAsType}) `\n }\n\n if (transformTemplate) {\n transform[key] = valueAsType\n }\n }\n }\n\n // `pathRotation` composes onto `rotate` as a separate additive term so\n // the user's `rotate` is never clobbered. Deliberately not a slot in\n // `transformPropOrder`.\n const pathRotation = latestValues.pathRotation\n if (pathRotation) {\n transformIsDefault = false\n transformString += `rotate(${getValueAsType(\n pathRotation,\n numberValueTypes.pathRotation\n )}) `\n }\n\n transformString = transformString.trim()\n\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(\n transform,\n transformIsDefault ? \"\" : transformString\n )\n } else if (transformIsDefault) {\n transformString = \"none\"\n }\n\n return transformString\n}\n","import { getValueAsType } from \"../../../value/types/utils/get-as-type\"\nimport { numberValueTypes } from \"../../../value/types/maps/number\"\nimport { transformProps } from \"../../utils/keys-transform\"\nimport { isCSSVariableName } from \"../../../animation/utils/is-css-variable\"\nimport { ResolvedValues } from \"../../types\"\nimport { HTMLRenderState } from \"../types\"\nimport { buildTransform } from \"./build-transform\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\n\nexport function buildHTMLStyles(\n state: HTMLRenderState,\n latestValues: ResolvedValues,\n transformTemplate?: MotionNodeOptions[\"transformTemplate\"]\n) {\n const { style, vars, transformOrigin } = state\n\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false\n let hasTransformOrigin = false\n\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept separately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key]\n\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true\n continue\n } else if (isCSSVariableName(key)) {\n vars[key] = value\n continue\n } else {\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueAsType = getValueAsType(value, numberValueTypes[key])\n\n if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true\n transformOrigin[key as keyof typeof transformOrigin] =\n valueAsType\n } else {\n style[key] = valueAsType\n }\n }\n }\n\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(\n latestValues,\n state.transform,\n transformTemplate\n )\n } else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\"\n }\n }\n\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const {\n originX = \"50%\",\n originY = \"50%\",\n originZ = 0,\n } = transformOrigin\n style.transformOrigin = `${originX} ${originY} ${originZ}`\n }\n}\n","import type { MotionStyle } from \"../../VisualElement\"\nimport { HTMLRenderState } from \"../types\"\n\nexport function renderHTML(\n element: HTMLElement,\n { style, vars }: HTMLRenderState,\n styleProp?: MotionStyle,\n projection?: any\n) {\n const elementStyle = element.style\n\n let key: string\n for (key in style) {\n // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type.\n elementStyle[key as unknown as number] = style[key] as string\n }\n\n // Write projection styles directly to element style\n projection?.applyProjectionStyles(elementStyle, styleProp)\n\n for (key in vars) {\n // Loop over any CSS variables and assign those.\n // They can only be assigned using `setProperty`.\n elementStyle.setProperty(key, vars[key] as string)\n }\n}\n","import { px } from \"../../value/types/numbers/units\"\nimport type { Axis } from \"motion-utils\"\nimport type { ScaleCorrectorDefinition } from \"./types\"\n\nexport function pixelsToPercent(pixels: number, axis: Axis): number {\n if (axis.max === axis.min) return 0\n return (pixels / (axis.max - axis.min)) * 100\n}\n\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nexport const correctBorderRadius: ScaleCorrectorDefinition = {\n correct: (latest, node) => {\n if (!node.target) return latest\n\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest)\n } else {\n return latest\n }\n }\n\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x)\n const y = pixelsToPercent(latest, node.target.y)\n\n return `${x}% ${y}%`\n },\n}\n","import { complex } from \"../../value/types/complex\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport type { ScaleCorrectorDefinition } from \"./types\"\n\nexport const correctBoxShadow: ScaleCorrectorDefinition = {\n correct: (latest: string, { treeScale, projectionDelta }) => {\n const original = latest\n const shadow = complex.parse(latest)\n\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5) return original\n\n const template = complex.createTransformer(latest)\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0\n\n // Calculate the overall context scale\n const xScale = projectionDelta!.x.scale * treeScale!.x\n const yScale = projectionDelta!.y.scale * treeScale!.y\n\n // Scale x/y\n ;(shadow[0 + offset] as number) /= xScale\n ;(shadow[1 + offset] as number) /= yScale\n\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5)\n\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n (shadow[2 + offset] as number) /= averageScale\n\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n (shadow[3 + offset] as number) /= averageScale\n\n return template(shadow)\n },\n}\n","import { isCSSVariableName } from \"../../animation/utils/is-css-variable\"\nimport { correctBorderRadius } from \"./scale-border-radius\"\nimport { correctBoxShadow } from \"./scale-box-shadow\"\nimport type { ScaleCorrectorMap } from \"./types\"\n\nexport const scaleCorrectors: ScaleCorrectorMap = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n}\n\nexport function addScaleCorrector(correctors: ScaleCorrectorMap) {\n for (const key in correctors) {\n scaleCorrectors[key] = correctors[key]\n if (isCSSVariableName(key)) {\n scaleCorrectors[key].isCSSVariable = true\n }\n }\n}\n","import { transformProps } from \"./keys-transform\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport {\n scaleCorrectors,\n addScaleCorrector,\n} from \"../../projection/styles/scale-correction\"\n\nexport { scaleCorrectors, addScaleCorrector }\n\nexport function isForcedMotionValue(\n key: string,\n { layout, layoutId }: MotionNodeOptions\n) {\n return (\n transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\"))\n )\n}\n","import { isMotionValue } from \"../../../value/utils/is-motion-value\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\nimport { isForcedMotionValue } from \"../../utils/is-forced-motion-value\"\nimport type { VisualElement } from \"../../VisualElement\"\n\nexport function scrapeMotionValuesFromProps(\n props: MotionNodeOptions,\n prevProps: MotionNodeOptions,\n visualElement?: VisualElement\n) {\n const style = (props as any).style\n const prevStyle = (prevProps as any)?.style\n const newValues: { [key: string]: any } = {}\n\n if (!style) return newValues\n\n for (const key in style) {\n if (\n isMotionValue(style[key]) ||\n (prevStyle && isMotionValue(prevStyle[key])) ||\n isForcedMotionValue(key, props) ||\n visualElement?.getValue(key)?.liveStyle !== undefined\n ) {\n newValues[key] = style[key]\n }\n }\n\n return newValues\n}\n","import type { Box } from \"motion-utils\"\nimport type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isCSSVariableName } from \"../../animation/utils/is-css-variable\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport { transformProps } from \"../utils/keys-transform\"\nimport {\n defaultTransformValue,\n readTransformValue,\n} from \"../dom/parse-transform\"\nimport { measureViewportBox } from \"../../projection/utils/measure\"\nimport { DOMVisualElement } from \"../dom/DOMVisualElement\"\nimport type { DOMVisualElementOptions } from \"../dom/types\"\nimport type { ResolvedValues, MotionConfigContextProps } from \"../types\"\nimport type { VisualElement } from \"../VisualElement\"\nimport { HTMLRenderState } from \"./types\"\nimport { buildHTMLStyles } from \"./utils/build-styles\"\nimport { renderHTML } from \"./utils/render\"\nimport { scrapeMotionValuesFromProps } from \"./utils/scrape-motion-values\"\n\nexport function getComputedStyle(element: HTMLElement) {\n return window.getComputedStyle(element)\n}\n\nexport class HTMLVisualElement extends DOMVisualElement<\n HTMLElement,\n HTMLRenderState,\n DOMVisualElementOptions\n> {\n type = \"html\"\n\n readValueFromInstance(\n instance: HTMLElement,\n key: string\n ): AnyResolvedKeyframe | null | undefined {\n if (transformProps.has(key)) {\n return this.projection?.isProjecting\n ? defaultTransformValue(key)\n : readTransformValue(instance, key)\n } else {\n const computedStyle = getComputedStyle(instance)\n const value =\n (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key as keyof typeof computedStyle]) || 0\n\n return typeof value === \"string\" ? value.trim() : (value as number)\n }\n }\n\n measureInstanceViewportBox(\n instance: HTMLElement,\n { transformPagePoint }: MotionNodeOptions & Partial\n ): Box {\n return measureViewportBox(instance, transformPagePoint)\n }\n\n build(\n renderState: HTMLRenderState,\n latestValues: ResolvedValues,\n props: MotionNodeOptions\n ) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate)\n }\n\n scrapeMotionValuesFromProps(\n props: MotionNodeOptions,\n prevProps: MotionNodeOptions,\n visualElement: VisualElement\n ) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement)\n }\n\n renderInstance = renderHTML\n}\n","import { createBox } from \"../../projection/geometry/models\"\nimport { ResolvedValues } from \"../types\"\nimport { VisualElement } from \"../VisualElement\"\n\ninterface ObjectRenderState {\n output: ResolvedValues\n}\n\nfunction isObjectKey(key: string, object: Object): key is keyof Object {\n return key in object\n}\n\nexport class ObjectVisualElement extends VisualElement<\n Object,\n ObjectRenderState\n> {\n type = \"object\"\n\n readValueFromInstance(instance: Object, key: string) {\n if (isObjectKey(key, instance)) {\n const value = instance[key]\n if (typeof value === \"string\" || typeof value === \"number\") {\n return value\n }\n }\n\n return undefined\n }\n\n getBaseTargetFromProps() {\n return undefined\n }\n\n removeValueFromRenderState(\n key: string,\n renderState: ObjectRenderState\n ): void {\n delete renderState.output[key]\n }\n\n measureInstanceViewportBox() {\n return createBox()\n }\n\n build(renderState: ObjectRenderState, latestValues: ResolvedValues) {\n Object.assign(renderState.output, latestValues)\n }\n\n renderInstance(instance: Object, { output }: ObjectRenderState) {\n Object.assign(instance, output)\n }\n\n sortInstanceNodePosition() {\n return 0\n }\n}\n","import { ResolvedValues } from \"../../types\"\n\nconst dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n}\n\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n}\n\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n *\n * Note: We use unitless values for stroke-dasharray and stroke-dashoffset\n * because Safari incorrectly scales px values when the page is zoomed.\n */\nexport function buildSVGPath(\n attrs: ResolvedValues,\n length: number,\n spacing = 1,\n offset = 0,\n useDashCase: boolean = true\n): void {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1\n\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys\n\n // Build the dash offset (unitless to avoid Safari zoom bug)\n attrs[keys.offset] = `${-offset}`\n\n // Build the dash array (unitless to avoid Safari zoom bug)\n attrs[keys.array] = `${length} ${spacing}`\n}\n","import type { MotionNodeOptions } from \"../../../node/types\"\nimport { buildHTMLStyles } from \"../../html/utils/build-styles\"\nimport { ResolvedValues } from \"../../types\"\nimport { SVGRenderState } from \"../types\"\nimport { buildSVGPath } from \"./path\"\n\n/**\n * CSS Motion Path properties that should remain as CSS styles on SVG elements.\n */\nconst cssMotionPathProperties = [\n \"offsetDistance\",\n \"offsetPath\",\n \"offsetRotate\",\n \"offsetAnchor\",\n]\n\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nexport function buildSVGAttrs(\n state: SVGRenderState,\n {\n attrX,\n attrY,\n attrScale,\n pathLength,\n pathSpacing = 1,\n pathOffset = 0,\n // This is object creation, which we try to avoid per-frame.\n ...latest\n }: ResolvedValues,\n isSVGTag: boolean,\n transformTemplate?: MotionNodeOptions[\"transformTemplate\"],\n styleProp?: Record\n) {\n buildHTMLStyles(state, latest, transformTemplate)\n\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox\n }\n return\n }\n\n state.attrs = state.style\n state.style = {}\n const { attrs, style } = state\n\n /**\n * However, we apply transforms as CSS transforms.\n * So if we detect a transform, transformOrigin we take it from attrs and copy it into style.\n */\n if (attrs.transform) {\n style.transform = attrs.transform\n delete attrs.transform\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\"\n delete attrs.transformOrigin\n }\n\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = (styleProp?.transformBox as string) ?? \"fill-box\"\n delete attrs.transformBox\n }\n\n for (const key of cssMotionPathProperties) {\n if (attrs[key] !== undefined) {\n style[key] = attrs[key]\n delete attrs[key]\n }\n }\n\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined) attrs.x = attrX\n if (attrY !== undefined) attrs.y = attrY\n if (attrScale !== undefined) attrs.scale = attrScale\n\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(\n attrs,\n pathLength as number,\n pathSpacing as number,\n pathOffset as number,\n false\n )\n }\n}\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nexport const camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n])\n","export const isSVGTag = (tag: unknown) =>\n typeof tag === \"string\" && tag.toLowerCase() === \"svg\"\n","import type { MotionStyle } from \"../../VisualElement\"\nimport { camelToDash } from \"../../dom/utils/camel-to-dash\"\nimport { renderHTML } from \"../../html/utils/render\"\nimport { SVGRenderState } from \"../types\"\nimport { camelCaseAttributes } from \"./camel-case-attrs\"\n\nexport function renderSVG(\n element: SVGElement,\n renderState: SVGRenderState,\n _styleProp?: MotionStyle,\n projection?: any\n) {\n renderHTML(element as any, renderState, undefined, projection)\n\n for (const key in renderState.attrs) {\n element.setAttribute(\n !camelCaseAttributes.has(key) ? camelToDash(key) : key,\n renderState.attrs[key] as string\n )\n }\n}\n","import { isMotionValue } from \"../../../value/utils/is-motion-value\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\nimport { transformPropOrder } from \"../../utils/keys-transform\"\nimport { scrapeMotionValuesFromProps as scrapeHTMLMotionValuesFromProps } from \"../../html/utils/scrape-motion-values\"\nimport type { VisualElement } from \"../../VisualElement\"\n\nexport function scrapeMotionValuesFromProps(\n props: MotionNodeOptions,\n prevProps: MotionNodeOptions,\n visualElement?: VisualElement\n) {\n const newValues = scrapeHTMLMotionValuesFromProps(\n props,\n prevProps,\n visualElement\n )\n\n for (const key in props) {\n if (\n isMotionValue(props[key as keyof typeof props]) ||\n isMotionValue(prevProps[key as keyof typeof prevProps])\n ) {\n const targetKey =\n transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key\n\n newValues[targetKey] = props[key as keyof typeof props]\n }\n }\n\n return newValues\n}\n","import type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport type { MotionValue } from \"../../value\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport { transformProps } from \"../utils/keys-transform\"\nimport { getDefaultValueType } from \"../../value/types/maps/defaults\"\nimport { createBox } from \"../../projection/geometry/models\"\nimport { DOMVisualElement } from \"../dom/DOMVisualElement\"\nimport type { DOMVisualElementOptions } from \"../dom/types\"\nimport { camelToDash } from \"../dom/utils/camel-to-dash\"\nimport type { ResolvedValues } from \"../types\"\nimport type { VisualElement, MotionStyle } from \"../VisualElement\"\nimport { SVGRenderState } from \"./types\"\nimport { buildSVGAttrs } from \"./utils/build-attrs\"\nimport { camelCaseAttributes } from \"./utils/camel-case-attrs\"\nimport { isSVGTag } from \"./utils/is-svg-tag\"\nimport { renderSVG } from \"./utils/render\"\nimport { scrapeMotionValuesFromProps } from \"./utils/scrape-motion-values\"\nexport class SVGVisualElement extends DOMVisualElement<\n SVGElement,\n SVGRenderState,\n DOMVisualElementOptions\n> {\n type = \"svg\"\n\n isSVGTag = false\n\n getBaseTargetFromProps(\n props: MotionNodeOptions,\n key: string\n ): AnyResolvedKeyframe | MotionValue | undefined {\n return props[key as keyof MotionNodeOptions]\n }\n\n readValueFromInstance(instance: SVGElement, key: string) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key)\n return defaultType ? defaultType.default || 0 : 0\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key\n return instance.getAttribute(key)\n }\n\n measureInstanceViewportBox = createBox\n\n scrapeMotionValuesFromProps(\n props: MotionNodeOptions,\n prevProps: MotionNodeOptions,\n visualElement: VisualElement\n ) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement)\n }\n\n build(\n renderState: SVGRenderState,\n latestValues: ResolvedValues,\n props: MotionNodeOptions\n ) {\n buildSVGAttrs(\n renderState,\n latestValues,\n this.isSVGTag,\n props.transformTemplate,\n (props as any).style\n )\n }\n\n renderInstance(\n instance: SVGElement,\n renderState: SVGRenderState,\n styleProp?: MotionStyle | undefined,\n projection?: any\n ): void {\n renderSVG(instance, renderState, styleProp, projection)\n }\n\n mount(instance: SVGElement) {\n this.isSVGTag = isSVGTag(instance.tagName)\n super.mount(instance)\n }\n}\n","import { isVariantLabel } from \"./is-variant-label\"\nimport { variantProps } from \"./variant-props\"\n\nconst numVariantProps = variantProps.length\n\ntype VariantStateContext = {\n initial?: string | string[]\n animate?: string | string[]\n exit?: string | string[]\n whileHover?: string | string[]\n whileDrag?: string | string[]\n whileFocus?: string | string[]\n whileTap?: string | string[]\n}\n\n/**\n * Get variant context from a visual element's parent chain.\n * Uses `any` type for visualElement to avoid circular dependencies.\n */\nexport function getVariantContext(\n visualElement?: any\n): undefined | VariantStateContext {\n if (!visualElement) return undefined\n\n if (!visualElement.isControllingVariants) {\n const context = visualElement.parent\n ? getVariantContext(visualElement.parent) || {}\n : {}\n if (visualElement.props.initial !== undefined) {\n context.initial = visualElement.props.initial as any\n }\n return context\n }\n\n const context: VariantStateContext = {}\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i] as keyof typeof context\n const prop = visualElement.props[name]\n\n if (isVariantLabel(prop) || prop === false) {\n ;(context as any)[name] = prop\n }\n }\n\n return context\n}\n","export function shallowCompare(next: any[], prev: any[] | null) {\n if (!Array.isArray(prev)) return false\n\n const prevLength = prev.length\n\n if (prevLength !== next.length) return false\n\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i]) return false\n }\n\n return true\n}\n","import type {\n AnimationDefinition,\n TargetAndTransition,\n VariantLabels,\n} from \"../../node/types\"\nimport type { AnimationType } from \"../types\"\nimport type { VisualElementAnimationOptions } from \"../../animation/interfaces/types\"\nimport { animateVisualElement } from \"../../animation/interfaces/visual-element\"\nimport { calcChildStagger } from \"../../animation/utils/calc-child-stagger\"\nimport { getVariantContext } from \"./get-variant-context\"\nimport { isAnimationControls } from \"./is-animation-controls\"\nimport { isKeyframesTarget } from \"./is-keyframes-target\"\nimport { isVariantLabel } from \"./is-variant-label\"\nimport { resolveVariant } from \"./resolve-dynamic-variants\"\nimport { shallowCompare } from \"./shallow-compare\"\nimport { variantPriorityOrder } from \"./variant-props\"\n\nexport type { VisualElementAnimationOptions }\n\nexport interface AnimationState {\n animateChanges: (type?: AnimationType) => Promise\n setActive: (\n type: AnimationType,\n isActive: boolean,\n options?: VisualElementAnimationOptions\n ) => Promise\n setAnimateFunction: (fn: any) => void\n getState: () => { [key: string]: AnimationTypeState }\n reset: () => void\n}\n\ninterface DefinitionAndOptions {\n animation: AnimationDefinition\n options?: VisualElementAnimationOptions\n}\n\nexport type AnimationList = string[] | TargetAndTransition[]\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse()\nconst numAnimationTypes = variantPriorityOrder.length\n\n/**\n * Type for the animate function that can be injected.\n * This allows the animation implementation to be provided by the framework layer.\n */\nexport type AnimateFunction = (animations: DefinitionAndOptions[]) => Promise\n\nfunction createAnimateFunction(visualElement: any): AnimateFunction {\n return (animations: DefinitionAndOptions[]) => {\n return Promise.all(\n animations.map(({ animation, options }) =>\n animateVisualElement(visualElement, animation, options)\n )\n )\n }\n}\n\nexport function createAnimationState(visualElement: any): AnimationState {\n let animate = createAnimateFunction(visualElement)\n let state = createState()\n let isInitialRender = true\n /**\n * Track whether the animation state has been reset (e.g. via StrictMode\n * double-invocation or Suspense unmount/remount). On the first\n * animateChanges() call after a reset we need to behave like the initial\n * render for variant-inheritance checks, even though isInitialRender is\n * already false.\n */\n let wasReset = false\n\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues =\n (type: AnimationType) =>\n (\n acc: { [key: string]: any },\n definition: string | TargetAndTransition | undefined\n ) => {\n const resolved = resolveVariant(\n visualElement,\n definition,\n type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined\n )\n\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved\n acc = { ...acc, ...target, ...transitionEnd }\n }\n\n return acc\n }\n\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(\n makeAnimator: (visualElement: any) => AnimateFunction\n ) {\n animate = makeAnimator(visualElement)\n }\n\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(changedActiveType?: AnimationType) {\n const { props } = visualElement\n const context = getVariantContext(visualElement.parent) || {}\n\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations: DefinitionAndOptions[] = []\n\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set()\n\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys: { [key: string]: any } = {}\n\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity\n\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i]\n const typeState = state[type]\n const prop =\n props[type] !== undefined\n ? props[type]\n : context[type as keyof typeof context]\n const propIsVariant = isVariantLabel(prop)\n\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta =\n type === changedActiveType ? typeState.isActive : null\n\n if (activeDelta === false) removedVariantIndex = i\n\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited =\n prop === context[type as keyof typeof context] &&\n prop !== props[type] &&\n propIsVariant\n\n if (\n isInherited &&\n (isInitialRender || wasReset) &&\n visualElement.manuallyAnimateOnMount\n ) {\n isInherited = false\n }\n\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys }\n\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\"\n ) {\n continue\n }\n\n /**\n * If exit is already active and wasn't just activated, skip\n * re-processing to prevent interrupting running exit animations.\n * Re-resolving exit with a changed custom value can start new\n * value animations that stop the originals, leaving the exit\n * animation promise unresolved and the component stuck in the DOM.\n */\n if (type === \"exit\" && typeState.isActive && activeDelta !== true) {\n if (typeState.prevResolvedValues) {\n encounteredKeys = {\n ...encounteredKeys,\n ...typeState.prevResolvedValues,\n }\n }\n continue\n }\n\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(\n typeState.prevProp,\n prop\n )\n\n let shouldAnimateType =\n variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant)\n\n let handledRemovedValues = false\n\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop]\n\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(\n buildResolvedTypeValues(type),\n {}\n )\n\n if (activeDelta === false) resolvedValues = {}\n\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState\n\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n }\n const markToAnimate = (key: string) => {\n shouldAnimateType = true\n if (removedKeys.has(key)) {\n handledRemovedValues = true\n removedKeys.delete(key)\n }\n typeState.needsAnimating[key] = true\n\n const motionValue = visualElement.getValue(key)\n if (motionValue) motionValue.liveStyle = false\n }\n\n for (const key in allKeys) {\n const next = resolvedValues[key]\n const prev = prevResolvedValues[key]\n\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key)) continue\n\n /**\n * If the value has changed, we probably want to animate it.\n */\n let valueHasChanged = false\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n valueHasChanged =\n !shallowCompare(next, prev) || variantDidChange\n } else {\n valueHasChanged = next !== prev\n }\n\n if (valueHasChanged) {\n if (next !== undefined && next !== null) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key)\n } else {\n // If it's undefined, it's been removed.\n removedKeys.add(key)\n }\n } else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key)\n } else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true\n }\n }\n\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop\n typeState.prevResolvedValues = resolvedValues\n\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues }\n }\n\n if (\n (isInitialRender || wasReset) &&\n visualElement.blockInitialAnimation\n ) {\n shouldAnimateType = false\n }\n\n /**\n * If this is an inherited prop we want to skip this animation\n * unless the inherited variants haven't changed on this render.\n */\n const willAnimateViaParent = isInherited && variantDidChange\n const needsAnimating = !willAnimateViaParent || handledRemovedValues\n if (shouldAnimateType && needsAnimating) {\n animations.push(\n ...definitionList.map((animation) => {\n const options: VisualElementAnimationOptions = { type }\n\n /**\n * If we're performing the initial animation, but we're not\n * rendering at the same time as the variant-controlling parent,\n * we want to use the parent's transition to calculate the stagger.\n */\n if (\n typeof animation === \"string\" &&\n (isInitialRender || wasReset) &&\n !willAnimateViaParent &&\n visualElement.manuallyAnimateOnMount &&\n visualElement.parent\n ) {\n const { parent } = visualElement\n const parentVariant = resolveVariant(\n parent,\n animation\n )\n\n if (parent.enteringChildren && parentVariant) {\n const { delayChildren } =\n parentVariant.transition || {}\n options.delay = calcChildStagger(\n parent.enteringChildren,\n visualElement,\n delayChildren\n )\n }\n }\n\n return {\n animation: animation as AnimationDefinition,\n options,\n }\n })\n )\n }\n }\n\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation: TargetAndTransition = {}\n\n /**\n * If the initial prop contains a transition we can use that, otherwise\n * allow the animation function to use the visual element's default.\n */\n if (typeof props.initial !== \"boolean\") {\n const initialTransition = resolveVariant(\n visualElement,\n Array.isArray(props.initial)\n ? props.initial[0]\n : props.initial\n )\n\n if (initialTransition && initialTransition.transition) {\n fallbackAnimation.transition = initialTransition.transition\n }\n }\n\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key)\n\n const motionValue = visualElement.getValue(key)\n if (motionValue) motionValue.liveStyle = true\n\n // @ts-expect-error - @mattgperry to figure if we should do something here\n fallbackAnimation[key] = fallbackTarget ?? null\n })\n\n animations.push({ animation: fallbackAnimation })\n }\n\n let shouldAnimate = Boolean(animations.length)\n\n if (\n isInitialRender &&\n (props.initial === false || props.initial === props.animate) &&\n !visualElement.manuallyAnimateOnMount\n ) {\n shouldAnimate = false\n }\n\n isInitialRender = false\n wasReset = false\n return shouldAnimate ? animate(animations) : Promise.resolve()\n }\n\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type: AnimationType, isActive: boolean) {\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive) return Promise.resolve()\n\n // Propagate active change to children\n visualElement.variantChildren?.forEach((child: any) =>\n child.animationState?.setActive(type, isActive)\n )\n\n state[type].isActive = isActive\n\n const animations = animateChanges(type)\n\n for (const key in state) {\n state[key as keyof typeof state].protectedKeys = {}\n }\n\n return animations\n }\n\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n reset: () => {\n state = createState()\n wasReset = true\n },\n }\n}\n\nexport function checkVariantsDidChange(prev: any, next: any) {\n if (typeof next === \"string\") {\n return next !== prev\n } else if (Array.isArray(next)) {\n return !shallowCompare(next, prev)\n }\n\n return false\n}\n\nexport interface AnimationTypeState {\n isActive: boolean\n protectedKeys: { [key: string]: true }\n needsAnimating: { [key: string]: boolean }\n prevResolvedValues: { [key: string]: any }\n prevProp?: VariantLabels | TargetAndTransition\n}\n\nfunction createTypeState(isActive = false): AnimationTypeState {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n }\n}\n\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n }\n}\n","import { Axis, AxisDelta, Box } from \"motion-utils\"\n\n/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nexport function copyAxisInto(axis: Axis, originAxis: Axis) {\n axis.min = originAxis.min\n axis.max = originAxis.max\n}\n\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nexport function copyBoxInto(box: Box, originBox: Box) {\n copyAxisInto(box.x, originBox.x)\n copyAxisInto(box.y, originBox.y)\n}\n\n/**\n * Reset a delta to the provided origin box.\n *\n * This is a mutative operation.\n */\nexport function copyAxisDeltaInto(delta: AxisDelta, originDelta: AxisDelta) {\n delta.translate = originDelta.translate\n delta.scale = originDelta.scale\n delta.originPoint = originDelta.originPoint\n delta.origin = originDelta.origin\n}\n","import { Axis, AxisDelta, Box, Delta, Point } from \"motion-utils\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { ResolvedValues } from \"../../render/types\"\n\nconst SCALE_PRECISION = 0.0001\nconst SCALE_MIN = 1 - SCALE_PRECISION\nconst SCALE_MAX = 1 + SCALE_PRECISION\nconst TRANSLATE_PRECISION = 0.01\nconst TRANSLATE_MIN = 0 - TRANSLATE_PRECISION\nconst TRANSLATE_MAX = 0 + TRANSLATE_PRECISION\n\nexport function calcLength(axis: Axis) {\n return axis.max - axis.min\n}\n\nexport function isNear(\n value: number,\n target: number,\n maxDistance: number\n): boolean {\n return Math.abs(value - target) <= maxDistance\n}\n\nexport function calcAxisDelta(\n delta: AxisDelta,\n source: Axis,\n target: Axis,\n origin: number = 0.5\n) {\n delta.origin = origin\n delta.originPoint = mixNumber(source.min, source.max, delta.origin)\n delta.scale = calcLength(target) / calcLength(source)\n delta.translate =\n mixNumber(target.min, target.max, delta.origin) - delta.originPoint\n\n if (\n (delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) ||\n isNaN(delta.scale)\n ) {\n delta.scale = 1.0\n }\n\n if (\n (delta.translate >= TRANSLATE_MIN &&\n delta.translate <= TRANSLATE_MAX) ||\n isNaN(delta.translate)\n ) {\n delta.translate = 0.0\n }\n}\n\nexport function calcBoxDelta(\n delta: Delta,\n source: Box,\n target: Box,\n origin?: ResolvedValues\n): void {\n calcAxisDelta(\n delta.x,\n source.x,\n target.x,\n origin ? (origin.originX as number) : undefined\n )\n calcAxisDelta(\n delta.y,\n source.y,\n target.y,\n origin ? (origin.originY as number) : undefined\n )\n}\n\nexport function calcRelativeAxis(\n target: Axis,\n relative: Axis,\n parent: Axis,\n anchor: number = 0\n) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min\n target.min = anchorPoint + relative.min\n target.max = target.min + calcLength(relative)\n}\n\nexport function calcRelativeBox(\n target: Box,\n relative: Box,\n parent: Box,\n anchor?: Point\n) {\n calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x)\n calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y)\n}\n\nexport function calcRelativeAxisPosition(\n target: Axis,\n layout: Axis,\n parent: Axis,\n anchor: number = 0\n) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min\n target.min = layout.min - anchorPoint\n target.max = target.min + calcLength(layout)\n}\n\nexport function calcRelativePosition(\n target: Box,\n layout: Box,\n parent: Box,\n anchor?: Point\n) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x)\n calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y)\n}\n","import { Axis, Box } from \"motion-utils\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { percent } from \"../../value/types/numbers/units\"\nimport { ResolvedValues } from \"../../render/types\"\nimport { scalePoint } from \"./delta-apply\"\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nexport function removePointDelta(\n point: number,\n translate: number,\n scale: number,\n originPoint: number,\n boxScale?: number\n): number {\n point -= translate\n point = scalePoint(point, 1 / scale, originPoint)\n\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint)\n }\n\n return point\n}\n\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nexport function removeAxisDelta(\n axis: Axis,\n translate: number | string = 0,\n scale: number = 1,\n origin: number = 0.5,\n boxScale?: number,\n originAxis: Axis = axis,\n sourceAxis: Axis = axis\n): void {\n if (percent.test(translate)) {\n translate = parseFloat(translate as string)\n const relativeProgress = mixNumber(\n sourceAxis.min,\n sourceAxis.max,\n translate / 100\n )\n translate = relativeProgress - sourceAxis.min\n }\n\n if (typeof translate !== \"number\") return\n\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin)\n if (axis === originAxis) originPoint -= translate\n\n axis.min = removePointDelta(\n axis.min,\n translate,\n scale,\n originPoint,\n boxScale\n )\n\n axis.max = removePointDelta(\n axis.max,\n translate,\n scale,\n originPoint,\n boxScale\n )\n}\n\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nexport function removeAxisTransforms(\n axis: Axis,\n transforms: ResolvedValues,\n [key, scaleKey, originKey]: string[],\n origin?: Axis,\n sourceAxis?: Axis\n) {\n removeAxisDelta(\n axis,\n transforms[key] as number,\n transforms[scaleKey] as number,\n transforms[originKey] as number,\n transforms.scale as number,\n origin,\n sourceAxis\n )\n}\n\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"]\nconst yKeys = [\"y\", \"scaleY\", \"originY\"]\n\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nexport function removeBoxTransforms(\n box: Box,\n transforms: ResolvedValues,\n originBox?: Box,\n sourceBox?: Box\n): void {\n removeAxisTransforms(\n box.x,\n transforms,\n xKeys,\n originBox ? originBox.x : undefined,\n sourceBox ? sourceBox.x : undefined\n )\n removeAxisTransforms(\n box.y,\n transforms,\n yKeys,\n originBox ? originBox.y : undefined,\n sourceBox ? sourceBox.y : undefined\n )\n}\n","import { Axis, AxisDelta, Box, Delta } from \"motion-utils\"\nimport { calcLength } from \"./delta-calc\"\n\nfunction isAxisDeltaZero(delta: AxisDelta) {\n return delta.translate === 0 && delta.scale === 1\n}\n\nexport function isDeltaZero(delta: Delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y)\n}\n\nexport function axisEquals(a: Axis, b: Axis) {\n return a.min === b.min && a.max === b.max\n}\n\nexport function boxEquals(a: Box, b: Box) {\n return axisEquals(a.x, b.x) && axisEquals(a.y, b.y)\n}\n\nexport function axisEqualsRounded(a: Axis, b: Axis) {\n return (\n Math.round(a.min) === Math.round(b.min) &&\n Math.round(a.max) === Math.round(b.max)\n )\n}\n\nexport function boxEqualsRounded(a: Box, b: Box) {\n return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y)\n}\n\nexport function aspectRatio(box: Box): number {\n return calcLength(box.x) / calcLength(box.y)\n}\n\nexport function axisDeltaEquals(a: AxisDelta, b: AxisDelta) {\n return (\n a.translate === b.translate &&\n a.scale === b.scale &&\n a.originPoint === b.originPoint\n )\n}\n","type Callback = (axis: \"x\" | \"y\") => void\n\nexport function eachAxis(callback: Callback) {\n return [callback(\"x\"), callback(\"y\")]\n}\n","import type { Delta, Point } from \"motion-utils\"\nimport type { ResolvedValues } from \"../../node/types\"\n\nexport function buildProjectionTransform(\n delta: Delta,\n treeScale: Point,\n latestTransform?: ResolvedValues\n): string {\n let transform = \"\"\n\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x\n const yTranslate = delta.y.translate / treeScale.y\n const zTranslate = latestTransform?.z || 0\n if (xTranslate || yTranslate || zTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `\n }\n\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `\n }\n\n if (latestTransform) {\n const {\n transformPerspective,\n rotate,\n pathRotation,\n rotateX,\n rotateY,\n skewX,\n skewY,\n } = latestTransform\n if (transformPerspective)\n transform = `perspective(${transformPerspective}px) ${transform}`\n if (rotate) transform += `rotate(${rotate}deg) `\n // Additive `rotate()` so user `rotate` isn't clobbered.\n if (pathRotation) transform += `rotate(${pathRotation}deg) `\n if (rotateX) transform += `rotateX(${rotateX}deg) `\n if (rotateY) transform += `rotateY(${rotateY}deg) `\n if (skewX) transform += `skewX(${skewX}deg) `\n if (skewY) transform += `skewY(${skewY}deg) `\n }\n\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x\n const elementScaleY = delta.y.scale * treeScale.y\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`\n }\n\n return transform || \"none\"\n}\n","import { mixNumber } from \"../../utils/mix/number\"\nimport { percent, px } from \"../../value/types/numbers/units\"\nimport type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport {\n progress as calcProgress,\n circOut,\n EasingFunction,\n noop,\n} from \"motion-utils\"\nimport type { ResolvedValues } from \"../../node/types\"\n\nconst borderLabels = [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n]\nconst numBorders = borderLabels.length\n\nconst asNumber = (value: AnyResolvedKeyframe) =>\n typeof value === \"string\" ? parseFloat(value) : value\n\nconst isPx = (value: AnyResolvedKeyframe) =>\n typeof value === \"number\" || px.test(value)\n\nexport function mixValues(\n target: ResolvedValues,\n follow: ResolvedValues,\n lead: ResolvedValues,\n progress: number,\n shouldCrossfadeOpacity: boolean,\n isOnlyMember: boolean\n) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mixNumber(\n 0,\n (lead.opacity as number) ?? 1,\n easeCrossfadeIn(progress)\n )\n target.opacityExit = mixNumber(\n (follow.opacity as number) ?? 1,\n 0,\n easeCrossfadeOut(progress)\n )\n } else if (isOnlyMember) {\n target.opacity = mixNumber(\n (follow.opacity as number) ?? 1,\n (lead.opacity as number) ?? 1,\n progress\n )\n }\n\n /**\n * Mix border radius\n */\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = borderLabels[i]\n let followRadius = getRadius(follow, borderLabel)\n let leadRadius = getRadius(lead, borderLabel)\n\n if (followRadius === undefined && leadRadius === undefined) continue\n\n followRadius ||= 0\n leadRadius ||= 0\n\n const canMix =\n followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius)\n\n if (canMix) {\n target[borderLabel] = Math.max(\n mixNumber(\n asNumber(followRadius),\n asNumber(leadRadius),\n progress\n ),\n 0\n )\n\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\"\n }\n } else {\n target[borderLabel] = leadRadius\n }\n }\n\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mixNumber(\n (follow.rotate as number) || 0,\n (lead.rotate as number) || 0,\n progress\n )\n }\n}\n\nfunction getRadius(values: ResolvedValues, radiusName: string) {\n return values[radiusName] !== undefined\n ? values[radiusName]\n : values.borderRadius\n}\n\nconst easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut)\nconst easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop)\n\nfunction compress(\n min: number,\n max: number,\n easing: EasingFunction\n): EasingFunction {\n return (p: number) => {\n // Could replace ifs with clamp\n if (p < min) return 0\n if (p > max) return 1\n return easing(calcProgress(min, max, p))\n }\n}\n","import { animateMotionValue } from \"../interfaces/motion-value\"\nimport type {\n AnimationPlaybackControlsWithThen,\n AnyResolvedKeyframe,\n UnresolvedValueKeyframe,\n ValueAnimationTransition,\n} from \"../types\"\nimport {\n motionValue as createMotionValue,\n MotionValue,\n} from \"../../value\"\nimport { isMotionValue } from \"../../value/utils/is-motion-value\"\n\nexport function animateSingleValue(\n value: MotionValue | V,\n keyframes: V | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n): AnimationPlaybackControlsWithThen {\n const motionValue = isMotionValue(value) ? value : createMotionValue(value)\n\n motionValue.start(animateMotionValue(\"\", motionValue, keyframes, options))\n\n return motionValue.animation!\n}\n","export function addDomEvent(\n target: EventTarget,\n eventName: string,\n handler: EventListener,\n options: AddEventListenerOptions = { passive: true }\n) {\n target.addEventListener(eventName, handler, options)\n\n return () => target.removeEventListener(eventName, handler)\n}\n","import type { VisualElement } from \"../../render/VisualElement\"\n\nexport interface WithDepth {\n depth: number\n}\n\nexport const compareByDepth = (a: VisualElement, b: VisualElement) =>\n a.depth - b.depth\n","import { addUniqueItem, removeItem } from \"motion-utils\"\nimport { compareByDepth, WithDepth } from \"./compare-by-depth\"\n\nexport class FlatTree {\n private children: WithDepth[] = []\n\n private isDirty: boolean = false\n\n add(child: WithDepth) {\n addUniqueItem(this.children, child)\n this.isDirty = true\n }\n\n remove(child: WithDepth) {\n removeItem(this.children, child)\n this.isDirty = true\n }\n\n forEach(callback: (child: WithDepth) => void) {\n this.isDirty && this.children.sort(compareByDepth)\n this.isDirty = false\n this.children.forEach(callback)\n }\n}\n","import { cancelFrame, frame } from \"../frameloop\"\nimport { time } from \"../frameloop/sync-time\"\nimport type { FrameData } from \"../frameloop/types\"\nimport { secondsToMilliseconds } from \"motion-utils\"\n\nexport type DelayedFunction = (overshoot: number) => void\n\n/**\n * Timeout defined in ms\n */\nexport function delay(callback: DelayedFunction, timeout: number) {\n const start = time.now()\n\n const checkElapsed = ({ timestamp }: FrameData) => {\n const elapsed = timestamp - start\n\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed)\n callback(elapsed - timeout)\n }\n }\n\n frame.setup(checkElapsed, true)\n\n return () => cancelFrame(checkElapsed)\n}\n\nexport function delayInSeconds(callback: DelayedFunction, timeout: number) {\n return delay(callback, secondsToMilliseconds(timeout))\n}\n","import type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isMotionValue } from \"./is-motion-value\"\nimport type { MotionValue } from \"../index\"\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n */\nexport function resolveMotionValue(\n value?: AnyResolvedKeyframe | MotionValue\n): AnyResolvedKeyframe {\n return isMotionValue(value) ? value.get() : value\n}\n","import { addUniqueItem, removeItem } from \"motion-utils\"\nimport type { IProjectionNode } from \"../node/types\"\n\nexport class NodeStack {\n lead?: IProjectionNode\n prevLead?: IProjectionNode\n members: IProjectionNode[] = []\n\n add(node: IProjectionNode) {\n addUniqueItem(this.members, node)\n\n for (let i = this.members.length - 1; i >= 0; i--) {\n const member = this.members[i]\n if (member === node || member === this.lead || member === this.prevLead) continue\n const inst = member.instance as HTMLElement | undefined\n if ((!inst || inst.isConnected === false) && !member.snapshot) {\n removeItem(this.members, member)\n member.unmount()\n }\n }\n\n node.scheduleRender()\n }\n\n remove(node: IProjectionNode) {\n removeItem(this.members, node)\n if (node === this.prevLead) this.prevLead = undefined\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1]\n if (prevLead) this.promote(prevLead)\n }\n }\n\n relegate(node: IProjectionNode) {\n for (let i = this.members.indexOf(node) - 1; i >= 0; i--) {\n const member = this.members[i]\n if (member.isPresent !== false && (member.instance as HTMLElement)?.isConnected !== false) {\n this.promote(member)\n return true\n }\n }\n return false\n }\n\n promote(node: IProjectionNode, preserveFollowOpacity?: boolean) {\n const prevLead = this.lead\n if (node === prevLead) return\n\n this.prevLead = prevLead\n this.lead = node\n node.show()\n\n if (prevLead) {\n prevLead.updateSnapshot()\n node.scheduleRender()\n\n const { layoutDependency: prevDep } = prevLead.options\n const { layoutDependency: nextDep } = node.options\n\n if (prevDep === undefined || prevDep !== nextDep) {\n node.resumeFrom = prevLead\n if (preserveFollowOpacity) prevLead.preserveOpacity = true\n\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues\n }\n\n if (node.root?.isUpdating) node.isLayoutDirty = true\n }\n if (node.options.crossfade === false) prevLead.hide()\n }\n }\n\n exitAnimationComplete() {\n this.members.forEach((member) => {\n member.options.onExitComplete?.()\n member.resumingFrom?.options.onExitComplete?.()\n })\n }\n\n scheduleRender() {\n this.members.forEach(\n (member) => member.instance && member.scheduleRender(false)\n )\n }\n\n removeLeadSnapshot() {\n if (this.lead?.snapshot) this.lead.snapshot = undefined\n }\n}\n","/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nexport const globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n}\n","import {\n Axis,\n AxisDelta,\n Box,\n clamp,\n Delta,\n noop,\n Point,\n SubscriptionManager,\n} from \"motion-utils\"\nimport { animateSingleValue } from \"../../animation/animate/single-value\"\nimport { JSAnimation } from \"../../animation/JSAnimation\"\nimport { getOptimisedAppearId } from \"../../animation/optimized-appear/get-appear-id\"\nimport {\n MotionPath,\n PathInterpolator,\n Transition,\n ValueAnimationOptions,\n} from \"../../animation/types\"\nimport { getValueTransition } from \"../../animation/utils/get-value-transition\"\nimport { cancelFrame, frame, frameData, frameSteps } from \"../../frameloop\"\nimport { microtask } from \"../../frameloop/microtask\"\nimport { time } from \"../../frameloop/sync-time\"\nimport type { Process } from \"../../frameloop/types\"\nimport { HTMLVisualElement } from \"../../render/html/HTMLVisualElement\"\nimport type { ResolvedValues } from \"../../render/types\"\nimport { scaleCorrectors } from \"../../render/utils/is-forced-motion-value\"\nimport type { MotionStyle, VisualElement } from \"../../render/VisualElement\"\nimport { activeAnimations } from \"../../stats/animation-count\"\nimport { statsBuffer } from \"../../stats/buffer\"\nimport { delay } from \"../../utils/delay\"\nimport { isSVGElement } from \"../../utils/is-svg-element\"\nimport { isSVGSVGElement } from \"../../utils/is-svg-svg-element\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { MotionValue, motionValue } from \"../../value\"\nimport { resolveMotionValue } from \"../../value/utils/resolve-motion-value\"\nimport { mixValues } from \"../animation/mix-values\"\nimport { copyAxisDeltaInto, copyAxisInto, copyBoxInto } from \"../geometry/copy\"\nimport {\n applyBoxDelta,\n applyTreeDeltas,\n transformBox,\n translateAxis,\n} from \"../geometry/delta-apply\"\nimport {\n calcBoxDelta,\n calcLength,\n calcRelativeBox,\n calcRelativePosition,\n isNear,\n} from \"../geometry/delta-calc\"\nimport { removeBoxTransforms } from \"../geometry/delta-remove\"\nimport { createBox, createDelta } from \"../geometry/models\"\nimport {\n aspectRatio,\n axisDeltaEquals,\n boxEquals,\n boxEqualsRounded,\n isDeltaZero,\n} from \"../geometry/utils\"\nimport { NodeStack } from \"../shared/stack\"\nimport { buildProjectionTransform } from \"../styles/transform\"\nimport { eachAxis } from \"../utils/each-axis\"\nimport { FlatTree } from \"../utils/flat-tree\"\nimport { has2DTranslate, hasScale, hasTransform } from \"../utils/has-transform\"\nimport { globalProjectionState } from \"./state\"\nimport {\n IProjectionNode,\n LayoutEvents,\n LayoutUpdateData,\n Measurements,\n Phase,\n ProjectionNodeConfig,\n ProjectionNodeOptions,\n ScrollMeasurements,\n} from \"./types\"\n\nconst metrics = {\n nodes: 0,\n calculatedTargetDeltas: 0,\n calculatedProjections: 0,\n}\n\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"]\n\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nconst animationTarget = 1000\n\nlet id = 0\n\nfunction resetDistortingTransform(\n key: string,\n visualElement: VisualElement,\n values: ResolvedValues,\n sharedAnimationValues?: ResolvedValues\n) {\n const { latestValues } = visualElement\n\n // Record the distorting transform and then temporarily set it to 0\n if (latestValues[key]) {\n values[key] = latestValues[key]\n visualElement.setStaticValue(key, 0)\n if (sharedAnimationValues) {\n sharedAnimationValues[key] = 0\n }\n }\n}\n\nfunction cancelTreeOptimisedTransformAnimations(\n projectionNode: IProjectionNode\n) {\n projectionNode.hasCheckedOptimisedAppear = true\n if (projectionNode.root === projectionNode) return\n\n const { visualElement } = projectionNode.options\n\n if (!visualElement) return\n\n const appearId = getOptimisedAppearId(visualElement)\n\n if (window.MotionHasOptimisedAnimation!(appearId, \"transform\")) {\n const { layout, layoutId } = projectionNode.options\n window.MotionCancelOptimisedAnimation!(\n appearId,\n \"transform\",\n frame,\n !(layout || layoutId)\n )\n }\n\n const { parent } = projectionNode\n if (parent && !parent.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(parent)\n }\n}\n\nexport function createProjectionNode({\n attachResizeListener,\n defaultParent,\n measureScroll,\n checkIsScrollRoot,\n resetTransform,\n}: ProjectionNodeConfig) {\n return class ProjectionNode implements IProjectionNode {\n /**\n * A unique ID generated for every projection node.\n */\n id: number = id++\n\n /**\n * An id that represents a unique session instigated by startUpdate.\n */\n animationId: number = 0\n\n animationCommitId = 0\n\n /**\n * A reference to the platform-native node (currently this will be a HTMLElement).\n */\n instance: I | undefined\n\n /**\n * A reference to the root projection node. There'll only ever be one tree and one root.\n */\n root: IProjectionNode\n\n /**\n * A reference to this node's parent.\n */\n parent?: IProjectionNode\n\n /**\n * A path from this node to the root node. This provides a fast way to iterate\n * back up the tree.\n */\n path: IProjectionNode[]\n\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n children = new Set()\n\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n options: ProjectionNodeOptions = {}\n\n /**\n * A snapshot of the element's state just before the current update. This is\n * hydrated when this node's `willUpdate` method is called and scrubbed at the\n * end of the tree's `didUpdate` method.\n */\n snapshot: Measurements | undefined\n\n /**\n * A box defining the element's layout relative to the page. This will have been\n * captured with all parent scrolls and projection transforms unset.\n */\n layout: Measurements | undefined\n\n /**\n * The layout used to calculate the previous layout animation. We use this to compare\n * layouts between renders and decide whether we need to trigger a new layout animation\n * or just let the current one play out.\n */\n targetLayout?: Box\n\n /**\n * A mutable data structure we use to apply all parent transforms currently\n * acting on the element's layout. It's from here we can calculate the projectionDelta\n * required to get the element from its layout into its calculated target box.\n */\n layoutCorrected: Box\n\n /**\n * An ideal projection transform we want to apply to the element. This is calculated,\n * usually when an element's layout has changed, and we want the element to look as though\n * its in its previous layout on the next frame. From there, we animated it down to 0\n * to animate the element to its new layout.\n */\n targetDelta?: Delta\n\n /**\n * A mutable structure representing the visual bounding box on the page where we want\n * and element to appear. This can be set directly but is currently derived once a frame\n * from apply targetDelta to layout.\n */\n target?: Box\n\n /**\n * A mutable structure describing a visual bounding box relative to the element's\n * projected parent. If defined, target will be derived from this rather than targetDelta.\n * If not defined, we'll attempt to calculate on the first layout animation frame\n * based on the targets calculated from targetDelta. This will transfer a layout animation\n * from viewport-relative to parent-relative.\n */\n relativeTarget?: Box\n\n relativeTargetOrigin?: Box\n relativeParent?: IProjectionNode\n\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n isTreeAnimating = false\n\n isAnimationBlocked = false\n\n /**\n * If true, attempt to resolve relativeTarget.\n */\n attemptToResolveRelativeTarget?: boolean\n\n /**\n * A mutable structure that represents the target as transformed by the element's\n * latest user-set transforms (ie scale, x)\n */\n targetWithTransforms?: Box\n\n /**\n * The previous projection delta, which we can compare with the newly calculated\n * projection delta to see if we need to render.\n */\n prevProjectionDelta?: Delta\n\n /**\n * A calculated transform that will project an element from its layoutCorrected\n * into the target. This will be used by children to calculate their own layoutCorrect boxes.\n */\n projectionDelta?: Delta\n\n /**\n * A calculated transform that will project an element from its layoutCorrected\n * into the targetWithTransforms.\n */\n projectionDeltaWithTransform?: Delta\n\n /**\n * If we're tracking the scroll of this element, we store it here.\n */\n scroll?: ScrollMeasurements\n\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n isLayoutDirty = false\n\n /**\n * Flag to true if we think the projection calculations for this node needs\n * recalculating as a result of an updated transform or layout animation.\n */\n isProjectionDirty = false\n\n /**\n * Flag to true if the layout *or* transform has changed. This then gets propagated\n * throughout the projection tree, forcing any element below to recalculate on the next frame.\n */\n isSharedProjectionDirty = false\n\n /**\n * Flag transform dirty. This gets propagated throughout the whole tree but is only\n * respected by shared nodes.\n */\n isTransformDirty = false\n\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n updateManuallyBlocked = false\n\n updateBlockedByResize = false\n\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n isUpdating = false\n\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n isSVG = false\n\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n needsReset = false\n\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n shouldResetTransform = false\n\n /**\n * Store whether this node has been checked for optimised appear animations. As\n * effects fire bottom-up, and we want to look up the tree for appear animations,\n * this makes sure we only check each path once, stopping at nodes that\n * have already been checked.\n */\n hasCheckedOptimisedAppear = false\n\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to layoutly\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n treeScale: Point = { x: 1, y: 1 }\n\n /**\n * Is hydrated with a projection node if an element is animating from another.\n */\n resumeFrom?: IProjectionNode\n\n /**\n * Is hydrated with a projection node if an element is animating from another.\n */\n resumingFrom?: IProjectionNode\n\n /**\n * A reference to the element's latest animated values. This is a reference shared\n * between the element's VisualElement and the ProjectionNode.\n */\n latestValues: ResolvedValues\n\n /**\n *\n */\n eventHandlers = new Map>()\n\n nodes?: FlatTree\n\n depth: number\n\n /**\n * If transformTemplate generates a different value before/after the\n * update, we need to reset the transform.\n */\n prevTransformTemplateValue: string | undefined\n\n preserveOpacity?: boolean\n\n hasTreeAnimated = false\n\n layoutVersion: number = 0\n\n constructor(\n latestValues: ResolvedValues = {},\n parent: IProjectionNode | undefined = defaultParent?.()\n ) {\n this.latestValues = latestValues\n this.root = parent ? parent.root || parent : this\n this.path = parent ? [...parent.path, parent] : []\n this.parent = parent\n\n this.depth = parent ? parent.depth + 1 : 0\n\n for (let i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true\n }\n\n if (this.root === this) this.nodes = new FlatTree()\n }\n\n addEventListener(name: LayoutEvents, handler: any) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager())\n }\n\n return this.eventHandlers.get(name)!.add(handler)\n }\n\n notifyListeners(name: LayoutEvents, ...args: any) {\n const subscriptionManager = this.eventHandlers.get(name)\n subscriptionManager && subscriptionManager.notify(...args)\n }\n\n hasListeners(name: LayoutEvents) {\n return this.eventHandlers.has(name)\n }\n\n /**\n * Lifecycles\n */\n mount(instance: I) {\n if (this.instance) return\n\n this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance)\n\n this.instance = instance\n\n const { layoutId, layout, visualElement } = this.options\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance)\n }\n\n this.root.nodes!.add(this)\n this.parent && this.parent.children.add(this)\n\n if (this.root.hasTreeAnimated && (layout || layoutId)) {\n this.isLayoutDirty = true\n }\n\n if (attachResizeListener) {\n let cancelDelay: VoidFunction\n let innerWidth = 0\n\n const resizeUnblockUpdate = () =>\n (this.root.updateBlockedByResize = false)\n\n // Set initial innerWidth in a frame.read callback to batch the read\n frame.read(() => {\n innerWidth = window.innerWidth\n })\n\n attachResizeListener(instance, () => {\n const newInnerWidth = window.innerWidth\n if (newInnerWidth === innerWidth) return\n\n innerWidth = newInnerWidth\n\n this.root.updateBlockedByResize = true\n\n cancelDelay && cancelDelay()\n cancelDelay = delay(resizeUnblockUpdate, 250)\n\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false\n this.nodes!.forEach(finishAnimation)\n }\n })\n }\n\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this)\n }\n\n // Only register the handler if it requires layout animation\n if (\n this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)\n ) {\n this.addEventListener(\n \"didUpdate\",\n ({\n delta,\n hasLayoutChanged,\n hasRelativeLayoutChanged,\n layout: newLayout,\n }: LayoutUpdateData) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = undefined\n this.relativeTarget = undefined\n return\n }\n\n // TODO: Check here if an animation exists\n const layoutTransition =\n this.options.transition ||\n visualElement.getDefaultTransition() ||\n defaultLayoutTransition\n\n const {\n onLayoutAnimationStart,\n onLayoutAnimationComplete,\n } = visualElement.getProps()\n\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n const hasTargetChanged =\n !this.targetLayout ||\n !boxEqualsRounded(this.targetLayout, newLayout)\n /*\n * Note: Disabled to fix relative animations always triggering new\n * layout animations. If this causes further issues, we can try\n * a different approach to detecting relative target changes.\n */\n // || hasRelativeLayoutChanged\n\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n const hasOnlyRelativeTargetChanged =\n !hasLayoutChanged && hasRelativeLayoutChanged\n\n if (\n this.options.layoutRoot ||\n this.resumeFrom ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (hasTargetChanged || !this.currentAnimation))\n ) {\n if (this.resumeFrom) {\n this.resumingFrom = this.resumeFrom\n this.resumingFrom.resumingFrom = undefined\n }\n\n const animationOptions = {\n ...getValueTransition(\n layoutTransition,\n \"layout\"\n ),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete,\n }\n\n if (\n visualElement.shouldReduceMotion ||\n this.options.layoutRoot\n ) {\n animationOptions.delay = 0\n animationOptions.type = false\n }\n\n this.startAnimation(animationOptions)\n /**\n * Set animation origin after starting animation to avoid layout jump\n * caused by stopping previous layout animation\n */\n this.setAnimationOrigin(\n delta,\n hasOnlyRelativeTargetChanged,\n (animationOptions as { path?: MotionPath })\n .path\n )\n } else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never committed to screen and look like a jumpy box.\n */\n\n if (!hasLayoutChanged) {\n finishAnimation(this)\n }\n\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete()\n }\n }\n\n this.targetLayout = newLayout\n }\n )\n }\n }\n\n unmount() {\n this.options.layoutId && this.willUpdate()\n this.root.nodes!.remove(this)\n const stack = this.getStack()\n stack && stack.remove(this)\n this.parent && this.parent.children.delete(this)\n this.instance = undefined\n this.eventHandlers.clear()\n\n cancelFrame(this.updateProjection)\n }\n\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true\n }\n\n unblockUpdate() {\n this.updateManuallyBlocked = false\n }\n\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize\n }\n\n isTreeAnimationBlocked() {\n return (\n this.isAnimationBlocked ||\n (this.parent && this.parent.isTreeAnimationBlocked()) ||\n false\n )\n }\n\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked()) return\n\n this.isUpdating = true\n\n this.nodes && this.nodes.forEach(resetSkewAndRotation)\n this.animationId++\n }\n\n getTransformTemplate() {\n const { visualElement } = this.options\n return visualElement && visualElement.getProps().transformTemplate\n }\n\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true\n\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete()\n return\n }\n\n /**\n * If we're running optimised appear animations then these must be\n * cancelled before measuring the DOM. This is so we can measure\n * the true layout of the element rather than the WAAPI animation\n * which will be unaffected by the resetSkewAndRotate step.\n *\n * Note: This is a DOM write. Worst case scenario is this is sandwiched\n * between other snapshot reads which will cause unnecessary style recalculations.\n * This has to happen here though, as we don't yet know which nodes will need\n * snapshots in startUpdate(), but we only want to cancel optimised animations\n * if a layout animation measurement is actually going to be affected by them.\n */\n if (\n window.MotionCancelOptimisedAnimation &&\n !this.hasCheckedOptimisedAppear\n ) {\n cancelTreeOptimisedTransformAnimations(this)\n }\n\n !this.root.isUpdating && this.root.startUpdate()\n\n if (this.isLayoutDirty) return\n\n this.isLayoutDirty = true\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i]\n node.shouldResetTransform = true\n\n /**\n * Percentage translates resolve against layoutBox dimensions,\n * so ancestors with them must be re-measured after transform reset.\n */\n if (\n typeof node.latestValues.x === \"string\" ||\n typeof node.latestValues.y === \"string\"\n ) {\n node.isLayoutDirty = true\n }\n\n node.updateScroll(\"snapshot\")\n\n if (node.options.layoutRoot) {\n node.willUpdate(false)\n }\n }\n\n const { layoutId, layout } = this.options\n if (layoutId === undefined && !layout) return\n\n const transformTemplate = this.getTransformTemplate()\n this.prevTransformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined\n\n this.updateSnapshot()\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\")\n }\n\n // Note: Currently only running on root node\n updateScheduled = false\n\n update() {\n this.updateScheduled = false\n\n const updateWasBlocked = this.isUpdateBlocked()\n\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n const wasBlockedByResize = this.updateBlockedByResize\n\n this.unblockUpdate()\n this.updateBlockedByResize = false\n this.clearAllSnapshots()\n\n /**\n * When blocked by resize, still measure layouts so\n * callbacks like onLayoutMeasure fire (e.g. Reorder).\n * Skip notifyLayoutUpdate to prevent animations.\n */\n if (wasBlockedByResize) {\n this.nodes!.forEach(forceLayoutMeasure)\n }\n\n this.nodes!.forEach(clearMeasurements)\n return\n }\n\n /**\n * If this is a repeat of didUpdate then ignore the animation.\n */\n if (this.animationId <= this.animationCommitId) {\n this.nodes!.forEach(clearIsLayoutDirty)\n return\n }\n\n this.animationCommitId = this.animationId\n\n if (!this.isUpdating) {\n this.nodes!.forEach(clearIsLayoutDirty)\n } else {\n this.isUpdating = false\n\n /**\n * Ensure animation-blocked nodes (e.g. during drag)\n * get measured even when memoized (willUpdate skipped).\n */\n this.nodes!.forEach(ensureDraggedNodesSnapshotted)\n\n /**\n * Write\n */\n this.nodes!.forEach(resetTransformStyle)\n\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes!.forEach(updateLayout)\n\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes!.forEach(notifyLayoutUpdate)\n }\n\n this.clearAllSnapshots()\n\n /**\n * Manually flush any pending updates. Ideally\n * we could leave this to the following requestAnimationFrame but this seems\n * to leave a flash of incorrectly styled content.\n */\n const now = time.now()\n frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp)\n frameData.timestamp = now\n frameData.isProcessing = true\n frameSteps.update.process(frameData)\n frameSteps.preRender.process(frameData)\n frameSteps.render.process(frameData)\n frameData.isProcessing = false\n }\n\n scheduleUpdate = () => this.update()\n\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true\n microtask.read(this.scheduleUpdate)\n }\n }\n\n clearAllSnapshots() {\n this.nodes!.forEach(clearSnapshot)\n this.sharedNodes.forEach(removeLeadSnapshots)\n }\n\n projectionUpdateScheduled = false\n scheduleUpdateProjection() {\n if (!this.projectionUpdateScheduled) {\n this.projectionUpdateScheduled = true\n frame.preRender(this.updateProjection, false, true)\n }\n }\n\n scheduleCheckAfterUnmount() {\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate()\n } else {\n this.root.checkUpdateFailed()\n }\n })\n }\n\n checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false\n this.clearAllSnapshots()\n }\n }\n\n /**\n * This is a multi-step process as shared nodes might be of different depths. Nodes\n * are sorted by depth order, so we need to resolve the entire tree before moving to\n * the next step.\n */\n updateProjection = () => {\n this.projectionUpdateScheduled = false\n\n /**\n * Reset debug counts. Manually resetting rather than creating a new\n * object each frame.\n */\n if (statsBuffer.value) {\n metrics.nodes =\n metrics.calculatedTargetDeltas =\n metrics.calculatedProjections =\n 0\n }\n\n this.nodes!.forEach(propagateDirtyNodes)\n this.nodes!.forEach(resolveTargetDelta)\n this.nodes!.forEach(calcProjection)\n this.nodes!.forEach(cleanDirtyNodes)\n\n if (statsBuffer.addProjectionMetrics) {\n statsBuffer.addProjectionMetrics(metrics)\n }\n }\n\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance) return\n\n this.snapshot = this.measure()\n\n if (\n this.snapshot &&\n !calcLength(this.snapshot.measuredBox.x) &&\n !calcLength(this.snapshot.measuredBox.y)\n ) {\n this.snapshot = undefined\n }\n }\n\n updateLayout() {\n if (!this.instance) return\n\n this.updateScroll()\n\n if (\n !(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty\n ) {\n return\n }\n\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i]\n node.updateScroll()\n }\n }\n\n const prevLayout = this.layout\n this.layout = this.measure(false)\n this.layoutVersion++\n if (!this.layoutCorrected) this.layoutCorrected = createBox()\n this.isLayoutDirty = false\n this.projectionDelta = undefined\n this.notifyListeners(\"measure\", this.layout.layoutBox)\n\n const { visualElement } = this.options\n visualElement &&\n visualElement.notify(\n \"LayoutMeasure\",\n this.layout.layoutBox,\n prevLayout ? prevLayout.layoutBox : undefined\n )\n }\n\n updateScroll(phase: Phase = \"measure\") {\n let needsMeasurement = Boolean(\n this.options.layoutScroll && this.instance\n )\n\n if (\n this.scroll &&\n this.scroll.animationId === this.root.animationId &&\n this.scroll.phase === phase\n ) {\n needsMeasurement = false\n }\n\n if (needsMeasurement && this.instance) {\n const isRoot = checkIsScrollRoot(this.instance)\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot,\n offset: measureScroll(this.instance),\n wasRoot: this.scroll ? this.scroll.isRoot : isRoot,\n }\n }\n }\n\n resetTransform() {\n if (!resetTransform) return\n\n const isResetRequested =\n this.isLayoutDirty ||\n this.shouldResetTransform ||\n this.options.alwaysMeasureLayout\n\n const hasProjection =\n this.projectionDelta && !isDeltaZero(this.projectionDelta)\n\n const transformTemplate = this.getTransformTemplate()\n const transformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined\n\n const transformTemplateHasChanged =\n transformTemplateValue !== this.prevTransformTemplateValue\n\n if (\n isResetRequested &&\n this.instance &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)\n ) {\n resetTransform(this.instance, transformTemplateValue)\n this.shouldResetTransform = false\n this.scheduleRender()\n }\n }\n\n measure(removeTransform = true) {\n const pageBox = this.measurePageBox()\n\n let layoutBox = this.removeElementScroll(pageBox)\n\n /**\n * Measurements taken during the pre-render stage\n * still have transforms applied so we remove them\n * via calculation.\n */\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox)\n }\n\n roundBox(layoutBox)\n\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id,\n }\n }\n\n measurePageBox() {\n const { visualElement } = this.options\n if (!visualElement) return createBox()\n\n const box = visualElement.measureViewportBox()\n\n const wasInScrollRoot =\n this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot)\n\n if (!wasInScrollRoot) {\n // Remove viewport scroll to give page-relative coordinates\n const { scroll } = this.root\n if (scroll) {\n translateAxis(box.x, scroll.offset.x)\n translateAxis(box.y, scroll.offset.y)\n }\n }\n\n return box\n }\n\n removeElementScroll(box: Box): Box {\n const boxWithoutScroll = createBox()\n copyBoxInto(boxWithoutScroll, box)\n\n if (this.scroll?.wasRoot) {\n return boxWithoutScroll\n }\n\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i]\n const { scroll, options } = node\n\n if (node !== this.root && scroll && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (scroll.wasRoot) {\n copyBoxInto(boxWithoutScroll, box)\n }\n\n translateAxis(boxWithoutScroll.x, scroll.offset.x)\n translateAxis(boxWithoutScroll.y, scroll.offset.y)\n }\n }\n\n return boxWithoutScroll\n }\n\n applyTransform(box: Box, transformOnly = false, output?: Box): Box {\n const withTransforms = output || createBox()\n copyBoxInto(withTransforms, box)\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i]\n\n if (\n !transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root\n ) {\n translateAxis(withTransforms.x, -node.scroll.offset.x)\n translateAxis(withTransforms.y, -node.scroll.offset.y)\n }\n\n if (!hasTransform(node.latestValues)) continue\n transformBox(\n withTransforms,\n node.latestValues,\n node.layout?.layoutBox\n )\n }\n\n if (hasTransform(this.latestValues)) {\n transformBox(\n withTransforms,\n this.latestValues,\n this.layout?.layoutBox\n )\n }\n\n return withTransforms\n }\n\n removeTransform(box: Box): Box {\n const boxWithoutTransform = createBox()\n copyBoxInto(boxWithoutTransform, box)\n\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i]\n if (!hasTransform(node.latestValues)) continue\n\n let sourceBox: Box | undefined\n\n if (node.instance) {\n hasScale(node.latestValues) && node.updateSnapshot()\n sourceBox = createBox()\n copyBoxInto(sourceBox, node.measurePageBox())\n }\n\n removeBoxTransforms(\n boxWithoutTransform,\n node.latestValues,\n node.snapshot?.layoutBox,\n sourceBox\n )\n }\n\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues)\n }\n\n return boxWithoutTransform\n }\n\n setTargetDelta(delta: Delta) {\n this.targetDelta = delta\n this.root.scheduleUpdateProjection()\n this.isProjectionDirty = true\n }\n\n setOptions(options: ProjectionNodeOptions) {\n this.options = {\n ...this.options,\n ...options,\n crossfade:\n options.crossfade !== undefined ? options.crossfade : true,\n }\n }\n\n clearMeasurements() {\n this.scroll = undefined\n this.layout = undefined\n this.snapshot = undefined\n this.prevTransformTemplateValue = undefined\n this.targetDelta = undefined\n this.target = undefined\n this.isLayoutDirty = false\n }\n\n forceRelativeParentToResolveTarget() {\n if (!this.relativeParent) return\n\n /**\n * If the parent target isn't up-to-date, force it to update.\n * This is an unfortunate de-optimisation as it means any updating relative\n * projection will cause all the relative parents to recalculate back\n * up the tree.\n */\n if (\n this.relativeParent.resolvedRelativeTargetAt !==\n frameData.timestamp\n ) {\n this.relativeParent.resolveTargetDelta(true)\n }\n }\n\n /**\n * Frame calculations\n */\n resolvedRelativeTargetAt: number = 0.0\n resolveTargetDelta(forceRecalculation = false) {\n /**\n * Once the dirty status of nodes has been spread through the tree, we also\n * need to check if we have a shared node of a different depth that has itself\n * been dirtied.\n */\n const lead = this.getLead()\n this.isProjectionDirty ||= lead.isProjectionDirty\n this.isTransformDirty ||= lead.isTransformDirty\n this.isSharedProjectionDirty ||= lead.isSharedProjectionDirty\n\n const isShared = Boolean(this.resumingFrom) || this !== lead\n\n /**\n * We don't use transform for this step of processing so we don't\n * need to check whether any nodes have changed transform.\n */\n const canSkip = !(\n forceRecalculation ||\n (isShared && this.isSharedProjectionDirty) ||\n this.isProjectionDirty ||\n this.parent?.isProjectionDirty ||\n this.attemptToResolveRelativeTarget ||\n this.root.updateBlockedByResize\n )\n\n if (canSkip) return\n\n const { layout, layoutId } = this.options\n\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId)) return\n\n this.resolvedRelativeTargetAt = frameData.timestamp\n\n const relativeParent = this.getClosestProjectingParent()\n\n if (\n relativeParent &&\n this.linkedParentVersion !== relativeParent.layoutVersion &&\n !relativeParent.options.layoutRoot\n ) {\n this.removeRelativeTarget()\n }\n\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n if (!this.targetDelta && !this.relativeTarget) {\n if (\n this.options.layoutAnchor !== false &&\n relativeParent &&\n relativeParent.layout\n ) {\n this.createRelativeTarget(\n relativeParent,\n this.layout.layoutBox,\n relativeParent.layout.layoutBox\n )\n } else {\n this.removeRelativeTarget()\n }\n }\n\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta) return\n\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox()\n this.targetWithTransforms = createBox()\n }\n\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (\n this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.relativeParent &&\n this.relativeParent.target\n ) {\n this.forceRelativeParentToResolveTarget()\n\n calcRelativeBox(\n this.target,\n this.relativeTarget,\n this.relativeParent.target,\n this.options.layoutAnchor || undefined\n )\n\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n } else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n this.applyTransform(\n this.layout.layoutBox,\n false,\n this.target\n )\n } else {\n copyBoxInto(this.target, this.layout.layoutBox)\n }\n\n applyBoxDelta(this.target, this.targetDelta)\n } else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.layoutBox)\n }\n\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false\n\n if (\n this.options.layoutAnchor !== false &&\n relativeParent &&\n Boolean(relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !relativeParent.options.layoutScroll &&\n relativeParent.target &&\n this.animationProgress !== 1\n ) {\n this.createRelativeTarget(\n relativeParent,\n this.target,\n relativeParent.target\n )\n } else {\n this.relativeParent = this.relativeTarget = undefined\n }\n }\n\n /**\n * Increase debug counter for resolved target deltas\n */\n if (statsBuffer.value) {\n metrics.calculatedTargetDeltas++\n }\n }\n\n getClosestProjectingParent() {\n if (\n !this.parent ||\n hasScale(this.parent.latestValues) ||\n has2DTranslate(this.parent.latestValues)\n ) {\n return undefined\n }\n\n if (this.parent.isProjecting()) {\n return this.parent\n } else {\n return this.parent.getClosestProjectingParent()\n }\n }\n\n isProjecting() {\n return Boolean(\n (this.relativeTarget ||\n this.targetDelta ||\n this.options.layoutRoot) &&\n this.layout\n )\n }\n\n linkedParentVersion: number = 0\n createRelativeTarget(\n relativeParent: IProjectionNode,\n layout: Box,\n parentLayout: Box\n ) {\n this.relativeParent = relativeParent\n this.linkedParentVersion = relativeParent.layoutVersion\n this.forceRelativeParentToResolveTarget()\n this.relativeTarget = createBox()\n this.relativeTargetOrigin = createBox()\n calcRelativePosition(\n this.relativeTargetOrigin,\n layout,\n parentLayout,\n this.options.layoutAnchor || undefined\n )\n\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin)\n }\n\n removeRelativeTarget() {\n this.relativeParent = this.relativeTarget = undefined\n }\n\n hasProjected: boolean = false\n\n calcProjection() {\n const lead = this.getLead()\n const isShared = Boolean(this.resumingFrom) || this !== lead\n\n let canSkip = true\n\n /**\n * If this is a normal layout animation and neither this node nor its nearest projecting\n * is dirty then we can't skip.\n */\n if (this.isProjectionDirty || this.parent?.isProjectionDirty) {\n canSkip = false\n }\n\n /**\n * If this is a shared layout animation and this node's shared projection is dirty then\n * we can't skip.\n */\n if (\n isShared &&\n (this.isSharedProjectionDirty || this.isTransformDirty)\n ) {\n canSkip = false\n }\n\n /**\n * If we have resolved the target this frame we must recalculate the\n * projection to ensure it visually represents the internal calculations.\n */\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false\n }\n\n if (canSkip) return\n\n const { layout, layoutId } = this.options\n\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean(\n (this.parent && this.parent.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation\n )\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined\n }\n\n if (!this.layout || !(layout || layoutId)) return\n\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.layoutBox)\n\n /**\n * Record previous tree scales before updating.\n */\n const prevTreeScaleX = this.treeScale.x\n const prevTreeScaleY = this.treeScale.y\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(\n this.layoutCorrected,\n this.treeScale,\n this.path,\n isShared\n )\n\n /**\n * If this layer needs to perform scale correction but doesn't have a target,\n * use the layout as the target.\n */\n if (\n lead.layout &&\n !lead.target &&\n (this.treeScale.x !== 1 || this.treeScale.y !== 1)\n ) {\n lead.target = lead.layout.layoutBox\n lead.targetWithTransforms = createBox()\n }\n\n const { target } = lead\n\n if (!target) {\n /**\n * If we don't have a target to project into, but we were previously\n * projecting, we want to remove the stored transform and schedule\n * a render to ensure the elements reflect the removed transform.\n */\n if (this.prevProjectionDelta) {\n this.createProjectionDeltas()\n this.scheduleRender()\n }\n\n return\n }\n\n if (!this.projectionDelta || !this.prevProjectionDelta) {\n this.createProjectionDeltas()\n } else {\n copyAxisDeltaInto(\n this.prevProjectionDelta.x,\n this.projectionDelta.x\n )\n copyAxisDeltaInto(\n this.prevProjectionDelta.y,\n this.projectionDelta.y\n )\n }\n\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(\n this.projectionDelta!,\n this.layoutCorrected,\n target,\n this.latestValues\n )\n\n if (\n this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY ||\n !axisDeltaEquals(\n this.projectionDelta!.x,\n this.prevProjectionDelta!.x\n ) ||\n !axisDeltaEquals(\n this.projectionDelta!.y,\n this.prevProjectionDelta!.y\n )\n ) {\n this.hasProjected = true\n this.scheduleRender()\n this.notifyListeners(\"projectionUpdate\", target)\n }\n\n /**\n * Increase debug counter for recalculated projections\n */\n if (statsBuffer.value) {\n metrics.calculatedProjections++\n }\n }\n\n isVisible = true\n hide() {\n this.isVisible = false\n // TODO: Schedule render\n }\n show() {\n this.isVisible = true\n // TODO: Schedule render\n }\n\n scheduleRender(notifyAll = true) {\n this.options.visualElement?.scheduleRender()\n if (notifyAll) {\n const stack = this.getStack()\n stack && stack.scheduleRender()\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined\n }\n }\n\n createProjectionDeltas() {\n this.prevProjectionDelta = createDelta()\n this.projectionDelta = createDelta()\n this.projectionDeltaWithTransform = createDelta()\n }\n\n /**\n * Animation\n */\n animationValues?: ResolvedValues\n pendingAnimation?: Process\n currentAnimation?: JSAnimation\n mixTargetDelta: (progress: number) => void\n animationProgress = 0\n\n setAnimationOrigin(\n delta: Delta,\n hasOnlyRelativeTargetChanged: boolean = false,\n pathFn?: MotionPath\n ) {\n const snapshot = this.snapshot\n const snapshotLatestValues = snapshot ? snapshot.latestValues : {}\n const mixedValues = { ...this.latestValues }\n\n const targetDelta = createDelta()\n if (\n !this.relativeParent ||\n !this.relativeParent.options.layoutRoot\n ) {\n this.relativeTarget = this.relativeTargetOrigin = undefined\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged\n\n const relativeLayout = createBox()\n\n const snapshotSource = snapshot ? snapshot.source : undefined\n const layoutSource = this.layout ? this.layout.source : undefined\n const isSharedLayoutAnimation = snapshotSource !== layoutSource\n const stack = this.getStack()\n const isOnlyMember = !stack || stack.members.length <= 1\n const shouldCrossfadeOpacity = Boolean(\n isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade)\n )\n\n this.animationProgress = 0\n\n let prevRelativeTarget: Box\n\n // The path decides whether the layout shift is worth curving\n // (distance floor) and resolves the interpolator from the delta.\n const interpolate: PathInterpolator | undefined =\n pathFn?.interpolateProjection(delta)\n\n this.mixTargetDelta = (latest: number) => {\n const progress = latest / 1000\n const point = interpolate?.(progress)\n\n if (point) {\n targetDelta.x.translate = point.x\n targetDelta.x.scale = mixNumber(delta.x.scale, 1, progress)\n targetDelta.x.origin = delta.x.origin\n targetDelta.x.originPoint = delta.x.originPoint\n targetDelta.y.translate = point.y\n targetDelta.y.scale = mixNumber(delta.y.scale, 1, progress)\n targetDelta.y.origin = delta.y.origin\n targetDelta.y.originPoint = delta.y.originPoint\n } else {\n mixAxisDeltaLinear(targetDelta.x, delta.x, progress)\n mixAxisDeltaLinear(targetDelta.y, delta.y, progress)\n }\n\n this.setTargetDelta(targetDelta)\n\n if (\n this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.layout &&\n this.relativeParent &&\n this.relativeParent.layout\n ) {\n calcRelativePosition(\n relativeLayout,\n this.layout.layoutBox,\n this.relativeParent.layout.layoutBox,\n this.options.layoutAnchor || undefined\n )\n mixBox(\n this.relativeTarget,\n this.relativeTargetOrigin,\n relativeLayout,\n progress\n )\n\n /**\n * If this is an unchanged relative target we can consider the\n * projection not dirty.\n */\n if (\n prevRelativeTarget &&\n boxEquals(this.relativeTarget, prevRelativeTarget)\n ) {\n this.isProjectionDirty = false\n }\n\n if (!prevRelativeTarget) prevRelativeTarget = createBox()\n copyBoxInto(prevRelativeTarget, this.relativeTarget)\n }\n\n if (isSharedLayoutAnimation) {\n this.animationValues = mixedValues\n\n mixValues(\n mixedValues,\n snapshotLatestValues,\n this.latestValues,\n progress,\n shouldCrossfadeOpacity,\n isOnlyMember\n )\n }\n\n if (point && point.rotate !== undefined) {\n // Dedicated `pathRotation` channel, not `rotate`, so an\n // animating `rotate` is composed with, never clobbered.\n if (!this.animationValues)\n this.animationValues = mixedValues\n this.animationValues.pathRotation = point.rotate\n }\n\n this.root.scheduleUpdateProjection()\n this.scheduleRender()\n\n this.animationProgress = progress\n }\n\n this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0)\n }\n\n motionValue?: MotionValue\n startAnimation(options: ValueAnimationOptions) {\n this.notifyListeners(\"animationStart\")\n\n this.currentAnimation?.stop()\n this.resumingFrom?.currentAnimation?.stop()\n\n if (this.pendingAnimation) {\n cancelFrame(this.pendingAnimation)\n this.pendingAnimation = undefined\n }\n\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true\n\n activeAnimations.layout++\n this.motionValue ||= motionValue(0)\n this.motionValue.jump(0, false)\n\n this.currentAnimation = animateSingleValue(\n this.motionValue,\n [0, 1000],\n {\n ...(options as any),\n velocity: 0,\n isSync: true,\n onUpdate: (latest: number) => {\n this.mixTargetDelta(latest)\n options.onUpdate && options.onUpdate(latest)\n },\n onStop: () => {\n activeAnimations.layout--\n },\n onComplete: () => {\n activeAnimations.layout--\n options.onComplete && options.onComplete()\n this.completeAnimation()\n },\n }\n ) as JSAnimation\n\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation\n }\n\n this.pendingAnimation = undefined\n })\n }\n\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined\n this.resumingFrom.preserveOpacity = undefined\n }\n\n const stack = this.getStack()\n stack && stack.exitAnimationComplete()\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined\n\n this.notifyListeners(\"animationComplete\")\n }\n\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget)\n this.currentAnimation.stop()\n }\n\n this.completeAnimation()\n }\n\n applyTransformsToTarget() {\n const lead = this.getLead()\n let { targetWithTransforms, target, layout, latestValues } = lead\n\n if (!targetWithTransforms || !target || !layout) return\n\n /**\n * If we're only animating position, and this element isn't the lead element,\n * then instead of projecting into the lead box we instead want to calculate\n * a new target that aligns the two boxes but maintains the layout shape.\n */\n if (\n this !== lead &&\n this.layout &&\n layout &&\n shouldAnimatePositionOnly(\n this.options.animationType,\n this.layout.layoutBox,\n layout.layoutBox\n )\n ) {\n target = this.target || createBox()\n\n const xLength = calcLength(this.layout!.layoutBox.x)\n target!.x.min = lead.target!.x.min\n target!.x.max = target.x.min + xLength\n\n const yLength = calcLength(this.layout!.layoutBox.y)\n target!.y.min = lead.target!.y.min\n target!.y.max = target.y.min + yLength\n }\n\n copyBoxInto(targetWithTransforms, target)\n\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues)\n\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its layout layout\n * into the desired bounding box.\n */\n calcBoxDelta(\n this.projectionDeltaWithTransform!,\n this.layoutCorrected,\n targetWithTransforms!,\n latestValues\n )\n }\n\n /**\n * Shared layout\n */\n // TODO Only running on root node\n sharedNodes: Map = new Map()\n registerSharedNode(layoutId: string, node: IProjectionNode) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack())\n }\n\n const stack = this.sharedNodes.get(layoutId)!\n stack.add(node)\n\n const config = node.options.initialPromotionConfig\n node.promote({\n transition: config ? config.transition : undefined,\n preserveFollowOpacity:\n config && config.shouldPreserveFollowOpacity\n ? config.shouldPreserveFollowOpacity(node)\n : undefined,\n })\n }\n\n isLead(): boolean {\n const stack = this.getStack()\n return stack ? stack.lead === this : true\n }\n\n getLead() {\n const { layoutId } = this.options\n return layoutId ? this.getStack()?.lead || this : this\n }\n\n getPrevLead() {\n const { layoutId } = this.options\n return layoutId ? this.getStack()?.prevLead : undefined\n }\n\n getStack() {\n const { layoutId } = this.options\n if (layoutId) return this.root.sharedNodes.get(layoutId)\n }\n\n promote({\n needsReset,\n transition,\n preserveFollowOpacity,\n }: {\n needsReset?: boolean\n transition?: Transition\n preserveFollowOpacity?: boolean\n } = {}) {\n const stack = this.getStack()\n if (stack) stack.promote(this, preserveFollowOpacity)\n\n if (needsReset) {\n this.projectionDelta = undefined\n this.needsReset = true\n }\n if (transition) this.setOptions({ transition })\n }\n\n relegate(): boolean {\n const stack = this.getStack()\n if (stack) {\n return stack.relegate(this)\n } else {\n return false\n }\n }\n\n resetSkewAndRotation() {\n const { visualElement } = this.options\n\n if (!visualElement) return\n\n // If there's no detected skew or rotation values, we can early return without a forced render.\n let hasDistortingTransform = false\n\n /**\n * An unrolled check for rotation values. Most elements don't have any rotation and\n * skipping the nested loop and new object creation is 50% faster.\n */\n const { latestValues } = visualElement\n if (\n latestValues.z ||\n latestValues.rotate ||\n latestValues.rotateX ||\n latestValues.rotateY ||\n latestValues.rotateZ ||\n latestValues.skewX ||\n latestValues.skewY\n ) {\n hasDistortingTransform = true\n }\n\n // If there's no distorting values, we don't need to do any more.\n if (!hasDistortingTransform) return\n\n const resetValues: ResolvedValues = {}\n\n if (latestValues.z) {\n resetDistortingTransform(\n \"z\",\n visualElement,\n resetValues,\n this.animationValues\n )\n }\n\n // Check the skew and rotate value of all axes and reset to 0\n for (let i = 0; i < transformAxes.length; i++) {\n resetDistortingTransform(\n `rotate${transformAxes[i]}`,\n visualElement,\n resetValues,\n this.animationValues\n )\n resetDistortingTransform(\n `skew${transformAxes[i]}`,\n visualElement,\n resetValues,\n this.animationValues\n )\n }\n\n // Force a render of this element to apply the transform with all skews and rotations\n // set to 0.\n visualElement.render()\n\n // Put back all the values we reset\n for (const key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key])\n if (this.animationValues) {\n this.animationValues[key] = resetValues[key]\n }\n }\n\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender()\n }\n\n applyProjectionStyles(\n targetStyle: any, // CSSStyleDeclaration - doesn't allow numbers to be assigned to properties\n styleProp?: MotionStyle\n ) {\n if (!this.instance || this.isSVG) return\n\n if (!this.isVisible) {\n targetStyle.visibility = \"hidden\"\n return\n }\n\n const transformTemplate = this.getTransformTemplate()\n\n if (this.needsReset) {\n this.needsReset = false\n\n targetStyle.visibility = \"\"\n targetStyle.opacity = \"\"\n targetStyle.pointerEvents =\n resolveMotionValue(styleProp?.pointerEvents) || \"\"\n targetStyle.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\"\n return\n }\n\n const lead = this.getLead()\n if (!this.projectionDelta || !this.layout || !lead.target) {\n if (this.options.layoutId) {\n targetStyle.opacity =\n this.latestValues.opacity !== undefined\n ? this.latestValues.opacity\n : 1\n targetStyle.pointerEvents =\n resolveMotionValue(styleProp?.pointerEvents) || \"\"\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n targetStyle.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\"\n this.hasProjected = false\n }\n\n return\n }\n\n targetStyle.visibility = \"\"\n\n const valuesToRender = lead.animationValues || lead.latestValues\n this.applyTransformsToTarget()\n\n let transform = buildProjectionTransform(\n this.projectionDeltaWithTransform!,\n this.treeScale,\n valuesToRender\n )\n\n if (transformTemplate) {\n transform = transformTemplate(valuesToRender, transform)\n }\n\n targetStyle.transform = transform\n\n const { x, y } = this.projectionDelta\n targetStyle.transformOrigin = `${x.origin * 100}% ${\n y.origin * 100\n }% 0`\n\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n targetStyle.opacity =\n lead === this\n ? valuesToRender.opacity ??\n this.latestValues.opacity ??\n 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit\n } else {\n /**\n * Or we're not animating at all, set the lead component to its layout\n * opacity and other components to hidden.\n */\n targetStyle.opacity =\n lead === this\n ? valuesToRender.opacity !== undefined\n ? valuesToRender.opacity\n : \"\"\n : valuesToRender.opacityExit !== undefined\n ? valuesToRender.opacityExit\n : 0\n }\n\n /**\n * Apply scale correction\n */\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === undefined) continue\n\n const { correct, applyTo, isCSSVariable } = scaleCorrectors[key]\n\n /**\n * Only apply scale correction to the value if we have an\n * active projection transform. Otherwise these values become\n * vulnerable to distortion if the element changes size without\n * a corresponding layout animation.\n */\n const corrected =\n transform === \"none\"\n ? valuesToRender[key]\n : correct(valuesToRender[key], lead)\n\n if (applyTo) {\n const num = applyTo.length\n for (let i = 0; i < num; i++) {\n targetStyle[applyTo[i] as any] = corrected\n }\n } else {\n // If this is a CSS variable, set it directly on the instance.\n // Replacing this function from creating styles to setting them\n // would be a good place to remove per frame object creation\n if (isCSSVariable) {\n ;(\n this.options.visualElement as HTMLVisualElement\n ).renderState.vars[key] = corrected\n } else {\n targetStyle[key as any] = corrected\n }\n }\n }\n\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n targetStyle.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp?.pointerEvents) || \"\"\n : \"none\"\n }\n }\n\n clearSnapshot() {\n this.resumeFrom = this.snapshot = undefined\n }\n\n // Only run on root\n resetTree() {\n this.root.nodes!.forEach((node: IProjectionNode) =>\n node.currentAnimation?.stop()\n )\n this.root.nodes!.forEach(clearMeasurements)\n this.root.sharedNodes.clear()\n }\n }\n}\n\nfunction updateLayout(node: IProjectionNode) {\n node.updateLayout()\n}\n\nfunction notifyLayoutUpdate(node: IProjectionNode) {\n const snapshot = node.resumeFrom?.snapshot || node.snapshot\n\n if (\n node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")\n ) {\n const { layoutBox: layout, measuredBox: measuredLayout } = node.layout\n const { animationType } = node.options\n\n const isShared = snapshot.source !== node.layout.source\n\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis]\n const length = calcLength(axisSnapshot)\n axisSnapshot.min = layout[axis].min\n axisSnapshot.max = axisSnapshot.min + length\n })\n } else if (animationType === \"x\" || animationType === \"y\") {\n const snapAxis = animationType === \"x\" ? \"y\" : \"x\"\n copyAxisInto(\n isShared\n ? snapshot.measuredBox[snapAxis]\n : snapshot.layoutBox[snapAxis],\n layout[snapAxis]\n )\n } else if (\n shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)\n ) {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis]\n const length = calcLength(layout[axis])\n axisSnapshot.max = axisSnapshot.min + length\n\n /**\n * Ensure relative target gets resized and rerendererd\n */\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true\n node.relativeTarget[axis].max =\n node.relativeTarget[axis].min + length\n }\n })\n }\n\n const layoutDelta = createDelta()\n\n calcBoxDelta(layoutDelta, layout, snapshot.layoutBox)\n const visualDelta = createDelta()\n if (isShared) {\n calcBoxDelta(\n visualDelta,\n node.applyTransform(measuredLayout, true),\n snapshot.measuredBox\n )\n } else {\n calcBoxDelta(visualDelta, layout, snapshot.layoutBox)\n }\n\n const hasLayoutChanged = !isDeltaZero(layoutDelta)\n let hasRelativeLayoutChanged = false\n\n if (!node.resumeFrom) {\n const relativeParent = node.getClosestProjectingParent()\n\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } =\n relativeParent\n\n if (parentSnapshot && parentLayout) {\n const anchor =\n node.options.layoutAnchor || undefined\n\n const relativeSnapshot = createBox()\n calcRelativePosition(\n relativeSnapshot,\n snapshot.layoutBox,\n parentSnapshot.layoutBox,\n anchor\n )\n\n const relativeLayout = createBox()\n calcRelativePosition(\n relativeLayout,\n layout,\n parentLayout.layoutBox,\n anchor\n )\n\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeLayoutChanged = true\n }\n\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout\n node.relativeTargetOrigin = relativeSnapshot\n node.relativeParent = relativeParent\n }\n }\n }\n }\n\n node.notifyListeners(\"didUpdate\", {\n layout,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeLayoutChanged,\n })\n } else if (node.isLead()) {\n const { onExitComplete } = node.options\n onExitComplete && onExitComplete()\n }\n\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined\n}\n\nexport function propagateDirtyNodes(node: IProjectionNode) {\n /**\n * Increase debug counter for nodes encountered this frame\n */\n if (statsBuffer.value) {\n metrics.nodes++\n }\n\n if (!node.parent) return\n\n /**\n * If this node isn't projecting, propagate isProjectionDirty. It will have\n * no performance impact but it will allow the next child that *is* projecting\n * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n * correcting.\n */\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty\n }\n\n /**\n * Propagate isSharedProjectionDirty and isTransformDirty\n * throughout the whole tree. A future revision can take another look at\n * this but for safety we still recalcualte shared nodes.\n */\n node.isSharedProjectionDirty ||= Boolean(\n node.isProjectionDirty ||\n node.parent.isProjectionDirty ||\n node.parent.isSharedProjectionDirty\n )\n\n node.isTransformDirty ||= node.parent.isTransformDirty\n}\n\nexport function cleanDirtyNodes(node: IProjectionNode) {\n node.isProjectionDirty =\n node.isSharedProjectionDirty =\n node.isTransformDirty =\n false\n}\n\nfunction clearSnapshot(node: IProjectionNode) {\n node.clearSnapshot()\n}\n\nfunction clearMeasurements(node: IProjectionNode) {\n node.clearMeasurements()\n}\n\nfunction forceLayoutMeasure(node: IProjectionNode) {\n node.isLayoutDirty = true\n node.updateLayout()\n}\n\nfunction clearIsLayoutDirty(node: IProjectionNode) {\n node.isLayoutDirty = false\n}\n\n/**\n * When a node is animation-blocked (e.g. during drag) and its component\n * didn't re-render (memoized), willUpdate() is never called so there's\n * no snapshot. Use the previous layout as a snapshot and mark dirty so\n * resetTransform/updateLayout/notifyLayoutUpdate process it normally.\n */\nfunction ensureDraggedNodesSnapshotted(node: IProjectionNode) {\n if (node.isAnimationBlocked && node.layout && !node.isLayoutDirty) {\n node.snapshot = node.layout\n node.isLayoutDirty = true\n }\n}\n\nfunction resetTransformStyle(node: IProjectionNode) {\n const { visualElement } = node.options\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\")\n }\n\n node.resetTransform()\n}\n\nfunction finishAnimation(node: IProjectionNode) {\n node.finishAnimation()\n node.targetDelta = node.relativeTarget = node.target = undefined\n node.isProjectionDirty = true\n}\n\nfunction resolveTargetDelta(node: IProjectionNode) {\n node.resolveTargetDelta()\n}\n\nfunction calcProjection(node: IProjectionNode) {\n node.calcProjection()\n}\n\nfunction resetSkewAndRotation(node: IProjectionNode) {\n node.resetSkewAndRotation()\n}\n\nfunction removeLeadSnapshots(stack: NodeStack) {\n stack.removeLeadSnapshot()\n}\n\nfunction mixAxisDeltaLinear(output: AxisDelta, delta: AxisDelta, p: number) {\n output.translate = mixNumber(delta.translate, 0, p)\n output.scale = mixNumber(delta.scale, 1, p)\n output.origin = delta.origin\n output.originPoint = delta.originPoint\n}\n\nexport function mixAxis(output: Axis, from: Axis, to: Axis, p: number) {\n output.min = mixNumber(from.min, to.min, p)\n output.max = mixNumber(from.max, to.max, p)\n}\n\nexport function mixBox(output: Box, from: Box, to: Box, p: number) {\n mixAxis(output.x, from.x, to.x, p)\n mixAxis(output.y, from.y, to.y, p)\n}\n\nfunction hasOpacityCrossfade(node: IProjectionNode) {\n return (\n node.animationValues && node.animationValues.opacityExit !== undefined\n )\n}\n\nconst defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n}\n\nconst userAgentContains = (string: string) =>\n typeof navigator !== \"undefined\" &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().includes(string)\n\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint =\n userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n ? Math.round\n : noop\n\nfunction roundAxis(axis: Axis): void {\n // Round to the nearest .5 pixels to support subpixel layouts\n axis.min = roundPoint(axis.min)\n axis.max = roundPoint(axis.max)\n}\n\nfunction roundBox(box: Box): void {\n roundAxis(box.x)\n roundAxis(box.y)\n}\n\nfunction shouldAnimatePositionOnly(\n animationType: string | undefined,\n snapshot: Box,\n layout: Box\n) {\n return (\n animationType === \"position\" ||\n (animationType === \"preserve-aspect\" &&\n !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2))\n )\n}\n\nfunction checkNodeWasScrollRoot(node: IProjectionNode) {\n return node !== node.root && node.scroll?.wasRoot\n}\n","import { addDomEvent } from \"../../events/add-dom-event\"\nimport { createProjectionNode } from \"./create-projection-node\"\n\nexport const DocumentProjectionNode = createProjectionNode({\n attachResizeListener: (\n ref: Window | Element,\n notify: VoidFunction\n ): VoidFunction => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,\n y: document.documentElement.scrollTop || document.body?.scrollTop || 0,\n }),\n checkIsScrollRoot: () => true,\n})\n","import { IProjectionNode } from \"./types\"\n\nconst notify = (node: IProjectionNode) =>\n !node.isLayoutDirty && node.willUpdate(false)\n\nexport interface NodeGroup {\n add: (node: IProjectionNode) => void\n remove: (node: IProjectionNode) => void\n dirty: VoidFunction\n}\n\nexport function nodeGroup(): NodeGroup {\n const nodes = new Set()\n const subscriptions = new WeakMap void>()\n\n const dirtyAll = () => nodes.forEach(notify)\n\n return {\n add: (node) => {\n nodes.add(node)\n subscriptions.set(\n node,\n node.addEventListener(\"willUpdate\", dirtyAll)\n )\n },\n remove: (node) => {\n nodes.delete(node)\n const unsubscribe = subscriptions.get(node)\n if (unsubscribe) {\n unsubscribe()\n subscriptions.delete(node)\n }\n dirtyAll()\n },\n dirty: dirtyAll,\n }\n}\n","import { createProjectionNode } from \"./create-projection-node\"\nimport { DocumentProjectionNode } from \"./DocumentProjectionNode\"\nimport { IProjectionNode } from \"./types\"\n\nexport const rootProjectionNode: { current: IProjectionNode | undefined } = {\n current: undefined,\n}\n\nexport const HTMLProjectionNode = createProjectionNode({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({})\n documentNode.mount(window)\n documentNode.setOptions({ layoutScroll: true })\n rootProjectionNode.current = documentNode\n }\n return rootProjectionNode.current\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\"\n },\n checkIsScrollRoot: (instance) =>\n Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n})\n","import type { Box } from \"motion-utils\"\nimport { GroupAnimation } from \"../animation/GroupAnimation\"\nimport type {\n AnimationOptions,\n AnimationPlaybackControls,\n Transition,\n} from \"../animation/types\"\nimport { frame } from \"../frameloop\"\nimport { copyBoxInto } from \"../projection/geometry/copy\"\nimport { createBox } from \"../projection/geometry/models\"\nimport { HTMLProjectionNode } from \"../projection/node/HTMLProjectionNode\"\nimport type { IProjectionNode } from \"../projection/node/types\"\nimport { HTMLVisualElement } from \"../render/html/HTMLVisualElement\"\nimport { visualElementStore } from \"../render/store\"\nimport type { VisualElement } from \"../render/VisualElement\"\nimport { resolveElements, type ElementOrSelector } from \"../utils/resolve-elements\"\n\ntype LayoutAnimationScope = Element | Document\n\ninterface LayoutElementRecord {\n element: Element\n visualElement: VisualElement\n projection: IProjectionNode\n}\n\ninterface LayoutAttributes {\n layout?: boolean | \"position\" | \"size\" | \"preserve-aspect\" | \"x\" | \"y\"\n layoutId?: string\n}\n\ntype LayoutBuilderResolve = (animation: GroupAnimation) => void\ntype LayoutBuilderReject = (error: unknown) => void\n\ninterface ProjectionOptions {\n layout?: boolean | \"position\" | \"size\" | \"preserve-aspect\" | \"x\" | \"y\"\n layoutId?: string\n animationType?: \"size\" | \"position\" | \"both\" | \"preserve-aspect\" | \"x\" | \"y\"\n transition?: Transition\n crossfade?: boolean\n}\n\nconst layoutSelector = \"[data-layout], [data-layout-id]\"\nconst noop = () => {}\nfunction snapshotFromTarget(projection: IProjectionNode): LayoutElementRecord[\"projection\"][\"snapshot\"] {\n const target = projection.targetWithTransforms || projection.target\n if (!target) return undefined\n\n const measuredBox = createBox()\n const layoutBox = createBox()\n copyBoxInto(measuredBox, target as Box)\n copyBoxInto(layoutBox, target as Box)\n\n return {\n animationId: projection.root?.animationId ?? 0,\n measuredBox,\n layoutBox,\n latestValues: projection.animationValues || projection.latestValues || {},\n source: projection.id,\n }\n}\n\nexport class LayoutAnimationBuilder {\n private scope: LayoutAnimationScope\n private updateDom: () => void | Promise\n private defaultOptions?: AnimationOptions\n private sharedTransitions = new Map()\n private notifyReady: LayoutBuilderResolve = noop\n private rejectReady: LayoutBuilderReject = noop\n private readyPromise: Promise\n\n constructor(\n scope: LayoutAnimationScope,\n updateDom: () => void | Promise,\n defaultOptions?: AnimationOptions\n ) {\n this.scope = scope\n this.updateDom = updateDom\n this.defaultOptions = defaultOptions\n\n this.readyPromise = new Promise((resolve, reject) => {\n this.notifyReady = resolve\n this.rejectReady = reject\n })\n\n frame.postRender(() => {\n this.start().then(this.notifyReady).catch(this.rejectReady)\n })\n }\n\n shared(id: string, transition: AnimationOptions): this {\n this.sharedTransitions.set(id, transition)\n return this\n }\n\n then(\n resolve: LayoutBuilderResolve,\n reject?: LayoutBuilderReject\n ): Promise {\n return this.readyPromise.then(resolve, reject)\n }\n\n private async start(): Promise {\n const beforeElements = collectLayoutElements(this.scope)\n const beforeRecords = this.buildRecords(beforeElements)\n\n beforeRecords.forEach(({ projection }) => {\n const hasCurrentAnimation = Boolean(projection.currentAnimation)\n const isSharedLayout = Boolean(projection.options.layoutId)\n if (hasCurrentAnimation && isSharedLayout) {\n const snapshot = snapshotFromTarget(projection)\n if (snapshot) {\n projection.snapshot = snapshot\n } else if (projection.snapshot) {\n projection.snapshot = undefined\n }\n } else if (\n projection.snapshot &&\n (projection.currentAnimation || projection.isProjecting())\n ) {\n projection.snapshot = undefined\n }\n projection.isPresent = true\n projection.willUpdate()\n })\n\n await this.updateDom()\n\n const afterElements = collectLayoutElements(this.scope)\n const afterRecords = this.buildRecords(afterElements)\n this.handleExitingElements(beforeRecords, afterRecords)\n\n afterRecords.forEach(({ projection }) => {\n const instance = projection.instance as HTMLElement | undefined\n const resumeFromInstance = projection.resumeFrom\n ?.instance as HTMLElement | undefined\n if (!instance || !resumeFromInstance) return\n if (!(\"style\" in instance)) return\n\n const currentTransform = instance.style.transform\n const resumeFromTransform = resumeFromInstance.style.transform\n\n if (\n currentTransform &&\n resumeFromTransform &&\n currentTransform === resumeFromTransform\n ) {\n instance.style.transform = \"\"\n instance.style.transformOrigin = \"\"\n }\n })\n\n afterRecords.forEach(({ projection }) => {\n projection.isPresent = true\n })\n\n const root = getProjectionRoot(afterRecords, beforeRecords)\n root?.didUpdate()\n\n await new Promise((resolve) => {\n frame.postRender(() => resolve())\n })\n\n const animations = collectAnimations(afterRecords)\n const animation = new GroupAnimation(animations)\n\n return animation\n }\n\n private buildRecords(elements: Element[]): LayoutElementRecord[] {\n const records: LayoutElementRecord[] = []\n const recordMap = new Map()\n\n for (const element of elements) {\n const parentRecord = findParentRecord(element, recordMap, this.scope)\n const { layout, layoutId } = readLayoutAttributes(element)\n const override = layoutId\n ? this.sharedTransitions.get(layoutId)\n : undefined\n const transition = override || this.defaultOptions\n const record = getOrCreateRecord(element, parentRecord?.projection, {\n layout,\n layoutId,\n animationType: typeof layout === \"string\" ? layout : \"both\",\n transition: transition as Transition,\n })\n recordMap.set(element, record)\n records.push(record)\n }\n\n return records\n }\n\n private handleExitingElements(\n beforeRecords: LayoutElementRecord[],\n afterRecords: LayoutElementRecord[]\n ): void {\n const afterElementsSet = new Set(afterRecords.map((record) => record.element))\n\n beforeRecords.forEach((record) => {\n if (afterElementsSet.has(record.element)) return\n\n // For shared layout elements, relegate to set up resumeFrom\n // so the remaining element animates from this position\n if (record.projection.options.layoutId) {\n record.projection.isPresent = false\n record.projection.relegate()\n }\n\n record.visualElement.unmount()\n visualElementStore.delete(record.element)\n })\n\n // Clear resumeFrom on EXISTING nodes that point to unmounted projections\n // This prevents crossfade animation when the source element was removed entirely\n // But preserve resumeFrom for NEW nodes so they can animate from the old position\n // Also preserve resumeFrom for lead nodes that were just promoted via relegate\n const beforeElementsSet = new Set(beforeRecords.map((record) => record.element))\n afterRecords.forEach(({ element, projection }) => {\n if (\n beforeElementsSet.has(element) &&\n projection.resumeFrom &&\n !projection.resumeFrom.instance &&\n !projection.isLead()\n ) {\n projection.resumeFrom = undefined\n projection.snapshot = undefined\n }\n })\n }\n}\n\nexport function parseAnimateLayoutArgs(\n scopeOrUpdateDom: ElementOrSelector | (() => void),\n updateDomOrOptions?: (() => void) | AnimationOptions,\n options?: AnimationOptions\n): {\n scope: Element | Document\n updateDom: () => void\n defaultOptions?: AnimationOptions\n} {\n // animateLayout(updateDom)\n if (typeof scopeOrUpdateDom === \"function\") {\n return {\n scope: document,\n updateDom: scopeOrUpdateDom,\n defaultOptions: updateDomOrOptions as AnimationOptions | undefined,\n }\n }\n\n // animateLayout(scope, updateDom, options?)\n const elements = resolveElements(scopeOrUpdateDom)\n const scope = elements[0] || document\n\n return {\n scope,\n updateDom: updateDomOrOptions as () => void,\n defaultOptions: options,\n }\n}\n\nfunction collectLayoutElements(scope: LayoutAnimationScope): Element[] {\n const elements = Array.from(scope.querySelectorAll(layoutSelector))\n\n if (scope instanceof Element && scope.matches(layoutSelector)) {\n if (!elements.includes(scope)) {\n elements.unshift(scope)\n }\n }\n\n return elements\n}\n\nfunction readLayoutAttributes(element: Element): LayoutAttributes {\n const layoutId = element.getAttribute(\"data-layout-id\") || undefined\n const rawLayout = element.getAttribute(\"data-layout\")\n let layout: LayoutAttributes[\"layout\"]\n\n if (rawLayout === \"\" || rawLayout === \"true\") {\n layout = true\n } else if (rawLayout) {\n layout = rawLayout as LayoutAttributes[\"layout\"]\n }\n\n return {\n layout,\n layoutId,\n }\n}\n\nfunction createVisualState() {\n return {\n latestValues: {},\n renderState: {\n transform: {},\n transformOrigin: {},\n style: {},\n vars: {},\n },\n }\n}\n\nfunction getOrCreateRecord(\n element: Element,\n parentProjection?: IProjectionNode,\n projectionOptions?: ProjectionOptions\n): LayoutElementRecord {\n const existing = visualElementStore.get(element) as VisualElement | undefined\n const visualElement =\n existing ??\n new HTMLVisualElement(\n {\n props: {},\n presenceContext: null,\n visualState: createVisualState(),\n },\n { allowProjection: true }\n )\n\n if (!existing || !visualElement.projection) {\n visualElement.projection = new HTMLProjectionNode(\n visualElement.latestValues,\n parentProjection\n )\n }\n\n visualElement.projection.setOptions({\n ...projectionOptions,\n visualElement,\n })\n\n if (!visualElement.current) {\n visualElement.mount(element as HTMLElement)\n } else if (!visualElement.projection.instance) {\n // Mount projection if VisualElement is already mounted but projection isn't\n // This happens when animate() was called before animateLayout()\n visualElement.projection.mount(element as HTMLElement)\n }\n\n if (!existing) {\n visualElementStore.set(element, visualElement)\n }\n\n return {\n element,\n visualElement,\n projection: visualElement.projection as IProjectionNode,\n }\n}\n\nfunction findParentRecord(\n element: Element,\n recordMap: Map,\n scope: LayoutAnimationScope\n) {\n let parent = element.parentElement\n\n while (parent) {\n const record = recordMap.get(parent)\n if (record) return record\n\n if (parent === scope) break\n parent = parent.parentElement\n }\n\n return undefined\n}\n\nfunction getProjectionRoot(\n afterRecords: LayoutElementRecord[],\n beforeRecords: LayoutElementRecord[]\n) {\n const record = afterRecords[0] || beforeRecords[0]\n return record?.projection.root\n}\n\nfunction collectAnimations(afterRecords: LayoutElementRecord[]) {\n const animations = new Set()\n\n afterRecords.forEach((record) => {\n const animation = record.projection.currentAnimation\n if (animation) animations.add(animation)\n })\n\n return Array.from(animations)\n}\n","import { cancelFrame, frame } from \".\"\nimport { stepsOrder } from \"./order\"\nimport { Process } from \"./types\"\n\n/**\n * @deprecated\n *\n * Import as `frame` instead.\n */\nexport const sync = frame\n\n/**\n * @deprecated\n *\n * Use cancelFrame(callback) instead.\n */\nexport const cancelSync = stepsOrder.reduce((acc, key) => {\n acc[key] = (process: Process) => cancelFrame(process)\n return acc\n}, {} as Record void>)\n"],"names":["MotionGlobalConfig","noop","clamp","alpha","alphaType","getAnimatableNone","mixNumber","warning","mixNumberImmediate","pipe","millisecondsToSeconds","secondsToMilliseconds","velocityPerSecond","spring","createSpring","invariant","progress","easeInOut","isEasingArray","easingDefinitionToFunction","keyframesGenerator","keyframes","memo","isBezierDefinition","anticipate","backInOut","circInOut","KeyframeResolver","DefaultKeyframeResolver","warnOnce","SubscriptionManager","wrap","isNumericalString","isZeroValueString","isObject","translateAlias","buildTransform","getComputedStyle","asNumber","removeItem","checkIsControllingVariants","checkIsVariantNode","scrapeMotionValuesFromProps","scrapeHTMLMotionValuesFromProps","circOut","calcProgress","motionValue","createMotionValue","addUniqueItem"],"mappings":";;;;;;AAEO,MAAM,UAAU,GAAa;AAChC,IAAA,OAAO;AACP,IAAA,MAAM;AACN,IAAA,kBAAkB;AAClB,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,YAAY;CACN;;ACKH,MAAM,WAAW,GAA4C;AAChE,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,oBAAoB,EAAE,IAAI;;;ACdxB,SAAU,gBAAgB,CAC5B,YAAwB,EACxB,QAAoB,EAAA;AAEpB;;;AAGG;AACH,IAAA,IAAI,SAAS,GAAG,IAAI,GAAG,EAAW;AAClC,IAAA,IAAI,SAAS,GAAG,IAAI,GAAG,EAAW;AAElC;;;AAGG;IACH,IAAI,YAAY,GAAG,KAAK;IAExB,IAAI,cAAc,GAAG,KAAK;AAE1B;;AAEG;AACH,IAAA,MAAM,WAAW,GAAG,IAAI,OAAO,EAAW;AAE1C,IAAA,IAAI,eAAe,GAAc;AAC7B,QAAA,KAAK,EAAE,GAAG;AACV,QAAA,SAAS,EAAE,GAAG;AACd,QAAA,YAAY,EAAE,KAAK;KACtB;IAED,IAAI,QAAQ,GAAG,CAAC;IAEhB,SAAS,eAAe,CAAC,QAAiB,EAAA;AACtC,QAAA,IAAI,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;AAC3B,YAAA,IAAI,CAAC,QAAQ,CA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CAAC;AAEF,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC;AACjC;;AC5XA;;;;AAIG;AACI,MAAM,IAAI,GAAG;AAEpB;;;;AAIG;AACI,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAI;AACrD,IAAA,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,OAAgB,KAAK,WAAW,CAAC,OAAO,CAAC;AACrD,IAAA,OAAO,GAAG;AACd,CAAC,EAAE,EAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs deleted file mode 100644 index ef664948..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs +++ /dev/null @@ -1,199 +0,0 @@ -import { MotionGlobalConfig, noop } from 'motion-utils'; -import { time } from '../frameloop/sync-time.mjs'; -import { JSAnimation } from './JSAnimation.mjs'; -import { getFinalKeyframe } from './keyframes/get-final.mjs'; -import { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs'; -import { NativeAnimationExtended } from './NativeAnimationExtended.mjs'; -import { canAnimate } from './utils/can-animate.mjs'; -import { makeAnimationInstant } from './utils/make-animation-instant.mjs'; -import { WithPromise } from './utils/WithPromise.mjs'; -import { supportsBrowserAnimation } from './waapi/supports/waapi.mjs'; - -/** - * Maximum time allowed between an animation being created and it being - * resolved for us to use the latter as the start time. - * - * This is to ensure that while we prefer to "start" an animation as soon - * as it's triggered, we also want to avoid a visual jump if there's a big delay - * between these two moments. - */ -const MAX_RESOLVE_DELAY = 40; -class AsyncMotionValueAnimation extends WithPromise { - constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", keyframes, name, motionValue, element, ...options }) { - super(); - /** - * Bound to support return animation.stop pattern - */ - this.stop = () => { - if (this._animation) { - this._animation.stop(); - this.stopTimeline?.(); - } - this.keyframeResolver?.cancel(); - }; - this.createdAt = time.now(); - const optionsWithDefaults = { - autoplay, - delay, - type, - repeat, - repeatDelay, - repeatType, - name, - motionValue, - element, - ...options, - }; - const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver; - this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element); - this.keyframeResolver?.scheduleResolve(); - } - onKeyframesResolved(keyframes, finalKeyframe, options, sync) { - this.keyframeResolver = undefined; - const { name, type, velocity, delay, isHandoff, onUpdate } = options; - this.resolvedAt = time.now(); - /** - * If we can't animate this value with the resolved keyframes - * then we should complete it immediately. - */ - let canAnimateValue = true; - if (!canAnimate(keyframes, name, type, velocity)) { - canAnimateValue = false; - if (MotionGlobalConfig.instantAnimations || !delay) { - onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe)); - } - keyframes[0] = keyframes[keyframes.length - 1]; - makeAnimationInstant(options); - options.repeat = 0; - } - /** - * Resolve startTime for the animation. - * - * This method uses the createdAt and resolvedAt to calculate the - * animation startTime. *Ideally*, we would use the createdAt time as t=0 - * as the following frame would then be the first frame of the animation in - * progress, which would feel snappier. - * - * However, if there's a delay (main thread work) between the creation of - * the animation and the first committed frame, we prefer to use resolvedAt - * to avoid a sudden jump into the animation. - */ - const startTime = sync - ? !this.resolvedAt - ? this.createdAt - : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY - ? this.resolvedAt - : this.createdAt - : undefined; - const resolvedOptions = { - startTime, - finalKeyframe, - ...options, - keyframes, - }; - /** - * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via - * WAAPI. Therefore, this animation must be JS to ensure it runs "under" the - * optimised animation. - * - * Also skip WAAPI when keyframes aren't animatable, as the resolved - * values may not be valid CSS and would trigger browser warnings. - */ - const useWaapi = canAnimateValue && - !isHandoff && - supportsBrowserAnimation(resolvedOptions); - const element = resolvedOptions.motionValue?.owner?.current; - let animation; - if (useWaapi) { - try { - animation = new NativeAnimationExtended({ - ...resolvedOptions, - element, - }); - } - catch { - animation = new JSAnimation(resolvedOptions); - } - } - else { - animation = new JSAnimation(resolvedOptions); - } - animation.finished.then(() => { - this.notifyFinished(); - }).catch(noop); - if (this.pendingTimeline) { - this.stopTimeline = animation.attachTimeline(this.pendingTimeline); - this.pendingTimeline = undefined; - } - this._animation = animation; - } - get finished() { - if (!this._animation) { - return this._finished; - } - else { - return this.animation.finished; - } - } - then(onResolve, _onReject) { - return this.finished.finally(onResolve).then(() => { }); - } - get animation() { - if (!this._animation) { - this.keyframeResolver?.resume(); - flushKeyframeResolvers(); - } - return this._animation; - } - get duration() { - return this.animation.duration; - } - get iterationDuration() { - return this.animation.iterationDuration; - } - get time() { - return this.animation.time; - } - set time(newTime) { - this.animation.time = newTime; - } - get speed() { - return this.animation.speed; - } - get state() { - return this.animation.state; - } - set speed(newSpeed) { - this.animation.speed = newSpeed; - } - get startTime() { - return this.animation.startTime; - } - attachTimeline(timeline) { - if (this._animation) { - this.stopTimeline = this.animation.attachTimeline(timeline); - } - else { - this.pendingTimeline = timeline; - } - return () => this.stop(); - } - play() { - this.animation.play(); - } - pause() { - this.animation.pause(); - } - complete() { - this.animation.complete(); - } - cancel() { - if (this._animation) { - this.animation.cancel(); - } - this.keyframeResolver?.cancel(); - } -} - -export { AsyncMotionValueAnimation }; -//# sourceMappingURL=AsyncMotionValueAnimation.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.map deleted file mode 100644 index 1c6cdf53..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncMotionValueAnimation.mjs","sources":["../../../src/animation/AsyncMotionValueAnimation.ts"],"sourcesContent":["import { MotionGlobalConfig, noop } from \"motion-utils\"\nimport { time } from \"../frameloop/sync-time\"\nimport { JSAnimation } from \"./JSAnimation\"\nimport { getFinalKeyframe } from \"./keyframes/get-final\"\nimport {\n KeyframeResolver as DefaultKeyframeResolver,\n flushKeyframeResolvers,\n ResolvedKeyframes,\n} from \"./keyframes/KeyframesResolver\"\nimport { NativeAnimationExtended } from \"./NativeAnimationExtended\"\nimport {\n AnimationPlaybackControls,\n AnyResolvedKeyframe,\n TimelineWithFallback,\n ValueAnimationOptions,\n} from \"./types\"\nimport { canAnimate } from \"./utils/can-animate\"\nimport { makeAnimationInstant } from \"./utils/make-animation-instant\"\nimport { WithPromise } from \"./utils/WithPromise\"\nimport { supportsBrowserAnimation } from \"./waapi/supports/waapi\"\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40\n\ntype OptionsWithoutKeyframes = Omit<\n ValueAnimationOptions,\n \"keyframes\"\n>\n\nexport class AsyncMotionValueAnimation\n extends WithPromise\n implements AnimationPlaybackControls\n{\n private createdAt: number\n\n private resolvedAt: number | undefined\n\n private _animation: AnimationPlaybackControls | undefined\n\n private pendingTimeline: TimelineWithFallback | undefined\n\n private keyframeResolver: DefaultKeyframeResolver | undefined\n\n private stopTimeline: VoidFunction | undefined\n\n constructor({\n autoplay = true,\n delay = 0,\n type = \"keyframes\",\n repeat = 0,\n repeatDelay = 0,\n repeatType = \"loop\",\n keyframes,\n name,\n motionValue,\n element,\n ...options\n }: ValueAnimationOptions) {\n super()\n\n this.createdAt = time.now()\n\n const optionsWithDefaults: OptionsWithoutKeyframes = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n }\n\n const KeyframeResolver =\n element?.KeyframeResolver || DefaultKeyframeResolver\n\n this.keyframeResolver = new KeyframeResolver(\n keyframes,\n (\n resolvedKeyframes: ResolvedKeyframes,\n finalKeyframe: T,\n forced: boolean\n ) =>\n this.onKeyframesResolved(\n resolvedKeyframes,\n finalKeyframe,\n optionsWithDefaults,\n !forced\n ),\n name,\n motionValue,\n element\n )\n this.keyframeResolver?.scheduleResolve()\n }\n\n onKeyframesResolved(\n keyframes: ResolvedKeyframes,\n finalKeyframe: T,\n options: OptionsWithoutKeyframes,\n sync: boolean\n ) {\n this.keyframeResolver = undefined\n\n const { name, type, velocity, delay, isHandoff, onUpdate } = options\n this.resolvedAt = time.now()\n\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n let canAnimateValue = true\n if (!canAnimate(keyframes, name, type, velocity)) {\n canAnimateValue = false\n\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe))\n }\n\n keyframes[0] = keyframes[keyframes.length - 1]\n\n makeAnimationInstant(options)\n options.repeat = 0\n }\n\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first committed frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined\n\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n }\n\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n *\n * Also skip WAAPI when keyframes aren't animatable, as the resolved\n * values may not be valid CSS and would trigger browser warnings.\n */\n const useWaapi =\n canAnimateValue &&\n !isHandoff &&\n supportsBrowserAnimation(resolvedOptions)\n const element = resolvedOptions.motionValue?.owner?.current\n\n let animation: AnimationPlaybackControls\n if (useWaapi) {\n try {\n animation = new NativeAnimationExtended({\n ...resolvedOptions,\n element,\n } as any)\n } catch {\n animation = new JSAnimation(resolvedOptions)\n }\n } else {\n animation = new JSAnimation(resolvedOptions)\n }\n\n animation.finished.then(() => {\n this.notifyFinished()\n }).catch(noop)\n\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline)\n this.pendingTimeline = undefined\n }\n\n this._animation = animation\n }\n\n get finished() {\n if (!this._animation) {\n return this._finished\n } else {\n return this.animation.finished\n }\n }\n\n then(onResolve: VoidFunction, _onReject?: VoidFunction) {\n return this.finished.finally(onResolve).then(() => {})\n }\n\n get animation(): AnimationPlaybackControls {\n if (!this._animation) {\n this.keyframeResolver?.resume()\n flushKeyframeResolvers()\n }\n\n return this._animation!\n }\n\n get duration() {\n return this.animation.duration\n }\n\n get iterationDuration() {\n return this.animation.iterationDuration\n }\n\n get time() {\n return this.animation.time\n }\n\n set time(newTime: number) {\n this.animation.time = newTime\n }\n\n get speed() {\n return this.animation.speed\n }\n\n get state() {\n return this.animation.state\n }\n\n set speed(newSpeed: number) {\n this.animation.speed = newSpeed\n }\n\n get startTime() {\n return this.animation.startTime\n }\n\n attachTimeline(timeline: TimelineWithFallback) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline)\n } else {\n this.pendingTimeline = timeline\n }\n\n return () => this.stop()\n }\n\n play() {\n this.animation.play()\n }\n\n pause() {\n this.animation.pause()\n }\n\n complete() {\n this.animation.complete()\n }\n\n cancel() {\n if (this._animation) {\n this.animation.cancel()\n }\n\n this.keyframeResolver?.cancel()\n }\n\n /**\n * Bound to support return animation.stop pattern\n */\n stop = () => {\n if (this._animation) {\n this._animation.stop()\n this.stopTimeline?.()\n }\n\n this.keyframeResolver?.cancel()\n }\n}\n"],"names":["KeyframeResolver","DefaultKeyframeResolver"],"mappings":";;;;;;;;;;;AAqBA;;;;;;;AAOG;AACH,MAAM,iBAAiB,GAAG,EAAE;AAOtB,MAAO,yBACT,SAAQ,WAAW,CAAA;AAenB,IAAA,WAAA,CAAY,EACR,QAAQ,GAAG,IAAI,EACf,KAAK,GAAG,CAAC,EACT,IAAI,GAAG,WAAW,EAClB,MAAM,GAAG,CAAC,EACV,WAAW,GAAG,CAAC,EACf,UAAU,GAAG,MAAM,EACnB,SAAS,EACT,IAAI,EACJ,WAAW,EACX,OAAO,EACP,GAAG,OAAO,EACa,EAAA;AACvB,QAAA,KAAK,EAAE;AA2NX;;AAEG;QACH,IAAA,CAAA,IAAI,GAAG,MAAK;AACR,YAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACjB,gBAAA,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;AACtB,gBAAA,IAAI,CAAC,YAAY,IAAI;YACzB;AAEA,YAAA,IAAI,CAAC,gBAAgB,EAAE,MAAM,EAAE;AACnC,QAAA,CAAC;AAnOG,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE;AAE3B,QAAA,MAAM,mBAAmB,GAA+B;YACpD,QAAQ;YACR,KAAK;YACL,IAAI;YACJ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jB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC;QAC/D;aAAO;AACH,YAAA,IAAI,CAAC,eAAe,GAAG,QAAQ;QACnC;AAEA,QAAA,OAAO,MAAM,IAAI,CAAC,IAAI,EAAE;IAC5B;IAEA,IAAI,GAAA;AACA,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;IACzB;IAEA,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;IAC1B;IAEA,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;IAC7B;IAEA,MAAM,GAAA;AACF,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACjB,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;QAC3B;AAEA,QAAA,IAAI,CAAC,gBAAgB,EAAE,MAAM,EAAE;IACnC;AAaH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimation.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimation.mjs deleted file mode 100644 index a959b955..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimation.mjs +++ /dev/null @@ -1,82 +0,0 @@ -class GroupAnimation { - constructor(animations) { - // Bound to accomadate common `return animation.stop` pattern - this.stop = () => this.runAll("stop"); - this.animations = animations.filter(Boolean); - } - get finished() { - return Promise.all(this.animations.map((animation) => animation.finished)); - } - /** - * TODO: Filter out cancelled or stopped animations before returning - */ - getAll(propName) { - return this.animations[0][propName]; - } - setAll(propName, newValue) { - for (let i = 0; i < this.animations.length; i++) { - this.animations[i][propName] = newValue; - } - } - attachTimeline(timeline) { - const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline)); - return () => { - subscriptions.forEach((cancel, i) => { - cancel && cancel(); - this.animations[i].stop(); - }); - }; - } - get time() { - return this.getAll("time"); - } - set time(time) { - this.setAll("time", time); - } - get speed() { - return this.getAll("speed"); - } - set speed(speed) { - this.setAll("speed", speed); - } - get state() { - return this.getAll("state"); - } - get startTime() { - return this.getAll("startTime"); - } - get duration() { - return getMax(this.animations, "duration"); - } - get iterationDuration() { - return getMax(this.animations, "iterationDuration"); - } - runAll(methodName) { - this.animations.forEach((controls) => controls[methodName]()); - } - play() { - this.runAll("play"); - } - pause() { - this.runAll("pause"); - } - cancel() { - this.runAll("cancel"); - } - complete() { - this.runAll("complete"); - } -} -function getMax(animations, propName) { - let max = 0; - for (let i = 0; i < animations.length; i++) { - const value = animations[i][propName]; - if (value !== null && value > max) { - max = value; - } - } - return max; -} - -export { GroupAnimation }; -//# sourceMappingURL=GroupAnimation.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimation.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimation.mjs.map deleted file mode 100644 index d88a38df..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimation.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GroupAnimation.mjs","sources":["../../../src/animation/GroupAnimation.ts"],"sourcesContent":["import { AnimationPlaybackControls, TimelineWithFallback } from \"./types\"\n\ntype PropNames =\n | \"time\"\n | \"speed\"\n | \"duration\"\n | \"attachTimeline\"\n | \"startTime\"\n | \"state\"\n\nexport type AcceptedAnimations = AnimationPlaybackControls\n\nexport type GroupedAnimations = AcceptedAnimations[]\n\nexport class GroupAnimation implements AnimationPlaybackControls {\n animations: GroupedAnimations\n\n constructor(animations: Array) {\n this.animations = animations.filter(Boolean) as GroupedAnimations\n }\n\n get finished() {\n return Promise.all(\n this.animations.map((animation) => animation.finished)\n )\n }\n\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n private getAll(propName: PropNames) {\n return this.animations[0][propName] as any\n }\n\n private setAll(propName: PropNames, newValue: any) {\n for (let i = 0; i < this.animations.length; i++) {\n ;(this.animations[i][propName] as any) = newValue\n }\n }\n\n attachTimeline(timeline: TimelineWithFallback) {\n const subscriptions = this.animations.map((animation) =>\n animation.attachTimeline(timeline)\n )\n\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel()\n this.animations[i].stop()\n })\n }\n }\n\n get time() {\n return this.getAll(\"time\")\n }\n\n set time(time: number) {\n this.setAll(\"time\", time)\n }\n\n get speed() {\n return this.getAll(\"speed\")\n }\n\n set speed(speed: number) {\n this.setAll(\"speed\", speed)\n }\n\n get state() {\n return this.getAll(\"state\")\n }\n\n get startTime() {\n return this.getAll(\"startTime\")\n }\n\n get duration() {\n return getMax(this.animations, \"duration\")\n }\n\n get iterationDuration() {\n return getMax(this.animations, \"iterationDuration\")\n }\n\n private runAll(\n methodName: keyof Omit<\n AnimationPlaybackControls,\n PropNames | \"then\" | \"finished\" | \"iterationDuration\"\n >\n ) {\n this.animations.forEach((controls) => controls[methodName]())\n }\n\n play() {\n this.runAll(\"play\")\n }\n\n pause() {\n this.runAll(\"pause\")\n }\n\n // Bound to accomadate common `return animation.stop` pattern\n stop = () => this.runAll(\"stop\")\n\n cancel() {\n this.runAll(\"cancel\")\n }\n\n complete() {\n this.runAll(\"complete\")\n }\n}\n\nfunction getMax(\n animations: GroupedAnimations,\n propName: \"iterationDuration\" | \"duration\"\n): number {\n let max = 0\n\n for (let i = 0; i < animations.length; i++) {\n const value = animations[i][propName]\n if (value !== null && value > max) {\n max = value\n }\n }\n return max\n}\n"],"names":[],"mappings":"MAca,cAAc,CAAA;AAGvB,IAAA,WAAA,CAAY,UAAiD,EAAA;;QAsF7D,IAAA,CAAA,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QArF5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAsB;IACrE;AA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IAAA,OAAO,GAAG;AACd;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs deleted file mode 100644 index 7d8a536a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { GroupAnimation } from './GroupAnimation.mjs'; - -class GroupAnimationWithThen extends GroupAnimation { - then(onResolve, _onReject) { - return this.finished.finally(onResolve).then(() => { }); - } -} - -export { GroupAnimationWithThen }; -//# sourceMappingURL=GroupAnimationWithThen.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs.map deleted file mode 100644 index 7dc17fa9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GroupAnimationWithThen.mjs","sources":["../../../src/animation/GroupAnimationWithThen.ts"],"sourcesContent":["import { GroupAnimation } from \"./GroupAnimation\"\nimport { AnimationPlaybackControlsWithThen } from \"./types\"\n\nexport class GroupAnimationWithThen\n extends GroupAnimation\n implements AnimationPlaybackControlsWithThen\n{\n then(onResolve: VoidFunction, _onReject?: VoidFunction) {\n return this.finished.finally(onResolve).then(() => {})\n }\n}\n"],"names":[],"mappings":";;AAGM,MAAO,sBACT,SAAQ,cAAc,CAAA;IAGtB,IAAI,CAAC,SAAuB,EAAE,SAAwB,EAAA;AAClD,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,MAAK,EAAE,CAAC,CAAC;IAC1D;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs deleted file mode 100644 index e55d6ac1..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs +++ /dev/null @@ -1,390 +0,0 @@ -import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils'; -import { time } from '../frameloop/sync-time.mjs'; -import { activeAnimations } from '../stats/animation-count.mjs'; -import { mix } from '../utils/mix/index.mjs'; -import { frameloopDriver } from './drivers/frame.mjs'; -import { inertia } from './generators/inertia.mjs'; -import { keyframes } from './generators/keyframes.mjs'; -import { calcGeneratorDuration } from './generators/utils/calc-duration.mjs'; -import { getGeneratorVelocity } from './generators/utils/velocity.mjs'; -import { getFinalKeyframe } from './keyframes/get-final.mjs'; -import { replaceTransitionType } from './utils/replace-transition-type.mjs'; -import { WithPromise } from './utils/WithPromise.mjs'; - -const percentToProgress = (percent) => percent / 100; -class JSAnimation extends WithPromise { - constructor(options) { - super(); - this.state = "idle"; - this.startTime = null; - this.isStopped = false; - /** - * The current time of the animation. - */ - this.currentTime = 0; - /** - * The time at which the animation was paused. - */ - this.holdTime = null; - /** - * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed. - */ - this.playbackSpeed = 1; - /** - * Reusable state object for the delay phase to avoid - * allocating a new object every frame. - */ - this.delayState = { - done: false, - value: undefined, - }; - /** - * This method is bound to the instance to fix a pattern where - * animation.stop is returned as a reference from a useEffect. - */ - this.stop = () => { - const { motionValue } = this.options; - if (motionValue && motionValue.updatedAt !== time.now()) { - this.tick(time.now()); - } - this.isStopped = true; - if (this.state === "idle") - return; - this.teardown(); - this.options.onStop?.(); - }; - activeAnimations.mainThread++; - this.options = options; - this.initAnimation(); - this.play(); - if (options.autoplay === false) - this.pause(); - } - initAnimation() { - const { options } = this; - replaceTransitionType(options); - const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options; - let { keyframes: keyframes$1 } = options; - const generatorFactory = type || keyframes; - if (process.env.NODE_ENV !== "production" && - generatorFactory !== keyframes) { - invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, "spring-two-frames"); - } - if (generatorFactory !== keyframes && - typeof keyframes$1[0] !== "number") { - this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1])); - keyframes$1 = [0, 100]; - } - const generator = generatorFactory({ ...options, keyframes: keyframes$1 }); - /** - * If we have a mirror repeat type we need to create a second generator that outputs the - * mirrored (not reversed) animation and later ping pong between the two generators. - */ - if (repeatType === "mirror") { - this.mirroredGenerator = generatorFactory({ - ...options, - keyframes: [...keyframes$1].reverse(), - velocity: -velocity, - }); - } - /** - * If duration is undefined and we have repeat options, - * we need to calculate a duration from the generator. - * - * We set it to the generator itself to cache the duration. - * Any timeline resolver will need to have already precalculated - * the duration by this step. - */ - if (generator.calculatedDuration === null) { - generator.calculatedDuration = calcGeneratorDuration(generator); - } - const { calculatedDuration } = generator; - this.calculatedDuration = calculatedDuration; - this.resolvedDuration = calculatedDuration + repeatDelay; - this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay; - this.generator = generator; - } - updateTime(timestamp) { - const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed; - // Update currentTime - if (this.holdTime !== null) { - this.currentTime = this.holdTime; - } - else { - // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 = - // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for - // example. - this.currentTime = animationTime; - } - } - tick(timestamp, sample = false) { - const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this; - if (this.startTime === null) - return generator.next(0); - const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options; - /** - * requestAnimationFrame timestamps can come through as lower than - * the startTime as set by performance.now(). Here we prevent this, - * though in the future it could be possible to make setting startTime - * a pending operation that gets resolved here. - */ - if (this.speed > 0) { - this.startTime = Math.min(this.startTime, timestamp); - } - else if (this.speed < 0) { - this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime); - } - if (sample) { - this.currentTime = timestamp; - } - else { - this.updateTime(timestamp); - } - // Rebase on delay - const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1); - const isInDelayPhase = this.playbackSpeed >= 0 - ? timeWithoutDelay < 0 - : timeWithoutDelay > totalDuration; - this.currentTime = Math.max(timeWithoutDelay, 0); - // If this animation has finished, set the current time to the total duration. - if (this.state === "finished" && this.holdTime === null) { - this.currentTime = totalDuration; - } - let elapsed = this.currentTime; - let frameGenerator = generator; - if (repeat) { - /** - * Get the current progress (0-1) of the animation. If t is > - * than duration we'll get values like 2.5 (midway through the - * third iteration) - */ - const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration; - /** - * Get the current iteration (0 indexed). For instance the floor of - * 2.5 is 2. - */ - let currentIteration = Math.floor(progress); - /** - * Get the current progress of the iteration by taking the remainder - * so 2.5 is 0.5 through iteration 2 - */ - let iterationProgress = progress % 1.0; - /** - * If iteration progress is 1 we count that as the end - * of the previous iteration. - */ - if (!iterationProgress && progress >= 1) { - iterationProgress = 1; - } - iterationProgress === 1 && currentIteration--; - currentIteration = Math.min(currentIteration, repeat + 1); - /** - * Reverse progress if we're not running in "normal" direction - */ - const isOddIteration = Boolean(currentIteration % 2); - if (isOddIteration) { - if (repeatType === "reverse") { - iterationProgress = 1 - iterationProgress; - if (repeatDelay) { - iterationProgress -= repeatDelay / resolvedDuration; - } - } - else if (repeatType === "mirror") { - frameGenerator = mirroredGenerator; - } - } - elapsed = clamp(0, 1, iterationProgress) * resolvedDuration; - } - /** - * If we're in negative time, set state as the initial keyframe. - * This prevents delay: x, duration: 0 animations from finishing - * instantly. - */ - let state; - if (isInDelayPhase) { - this.delayState.value = keyframes[0]; - state = this.delayState; - } - else { - state = frameGenerator.next(elapsed); - } - if (mixKeyframes && !isInDelayPhase) { - state.value = mixKeyframes(state.value); - } - let { done } = state; - if (!isInDelayPhase && calculatedDuration !== null) { - done = - this.playbackSpeed >= 0 - ? this.currentTime >= totalDuration - : this.currentTime <= 0; - } - const isAnimationFinished = this.holdTime === null && - (this.state === "finished" || (this.state === "running" && done)); - // TODO: The exception for inertia could be cleaner here - if (isAnimationFinished && type !== inertia) { - state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed); - } - if (onUpdate) { - onUpdate(state.value); - } - if (isAnimationFinished) { - this.finish(); - } - return state; - } - /** - * Allows the returned animation to be awaited or promise-chained. Currently - * resolves when the animation finishes at all but in a future update could/should - * reject if its cancels. - */ - then(resolve, reject) { - return this.finished.then(resolve, reject); - } - get duration() { - return millisecondsToSeconds(this.calculatedDuration); - } - get iterationDuration() { - const { delay = 0 } = this.options || {}; - return this.duration + millisecondsToSeconds(delay); - } - get time() { - return millisecondsToSeconds(this.currentTime); - } - set time(newTime) { - newTime = secondsToMilliseconds(newTime); - this.currentTime = newTime; - if (this.startTime === null || - this.holdTime !== null || - this.playbackSpeed === 0) { - this.holdTime = newTime; - } - else if (this.driver) { - this.startTime = this.driver.now() - newTime / this.playbackSpeed; - } - if (this.driver) { - this.driver.start(false); - } - else { - this.startTime = 0; - this.state = "paused"; - this.holdTime = newTime; - this.tick(newTime); - } - } - /** - * Returns the generator's velocity at the current time in units/second. - * Uses the analytical derivative when available (springs), avoiding - * the MotionValue's frame-dependent velocity estimation. - */ - getGeneratorVelocity() { - const t = this.currentTime; - if (t <= 0) - return this.options.velocity || 0; - if (this.generator.velocity) { - return this.generator.velocity(t); - } - // Fallback: finite difference - const current = this.generator.next(t).value; - return getGeneratorVelocity((s) => this.generator.next(s).value, t, current); - } - get speed() { - return this.playbackSpeed; - } - set speed(newSpeed) { - const hasChanged = this.playbackSpeed !== newSpeed; - if (hasChanged && this.driver) { - this.updateTime(time.now()); - } - this.playbackSpeed = newSpeed; - if (hasChanged && this.driver) { - this.time = millisecondsToSeconds(this.currentTime); - } - } - play() { - if (this.isStopped) - return; - const { driver = frameloopDriver, startTime } = this.options; - if (!this.driver) { - this.driver = driver((timestamp) => this.tick(timestamp)); - } - this.options.onPlay?.(); - const now = this.driver.now(); - if (this.state === "finished") { - this.updateFinished(); - this.startTime = now; - } - else if (this.holdTime !== null) { - this.startTime = now - this.holdTime; - } - else if (!this.startTime) { - this.startTime = startTime ?? now; - } - if (this.state === "finished" && this.speed < 0) { - this.startTime += this.calculatedDuration; - } - this.holdTime = null; - /** - * Set playState to running only after we've used it in - * the previous logic. - */ - this.state = "running"; - this.driver.start(); - } - pause() { - this.state = "paused"; - this.updateTime(time.now()); - this.holdTime = this.currentTime; - } - complete() { - if (this.state !== "running") { - this.play(); - } - this.state = "finished"; - this.holdTime = null; - } - finish() { - this.notifyFinished(); - this.teardown(); - this.state = "finished"; - this.options.onComplete?.(); - } - cancel() { - this.holdTime = null; - this.startTime = 0; - this.tick(0); - this.teardown(); - this.options.onCancel?.(); - } - teardown() { - this.state = "idle"; - this.stopDriver(); - this.startTime = this.holdTime = null; - activeAnimations.mainThread--; - } - stopDriver() { - if (!this.driver) - return; - this.driver.stop(); - this.driver = undefined; - } - sample(sampleTime) { - this.startTime = 0; - return this.tick(sampleTime, true); - } - attachTimeline(timeline) { - if (this.options.allowFlatten) { - this.options.type = "keyframes"; - this.options.ease = "linear"; - this.initAnimation(); - } - this.driver?.stop(); - return timeline.observe(this); - } -} -// Legacy function support -function animateValue(options) { - return new JSAnimation(options); -} - -export { JSAnimation, animateValue }; -//# sourceMappingURL=JSAnimation.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.map deleted file mode 100644 index 3331621f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JSAnimation.mjs","sources":["../../../src/animation/JSAnimation.ts"],"sourcesContent":["import {\n clamp,\n invariant,\n millisecondsToSeconds,\n pipe,\n secondsToMilliseconds,\n} from \"motion-utils\"\nimport { time } from \"../frameloop/sync-time\"\nimport { activeAnimations } from \"../stats/animation-count\"\nimport { mix } from \"../utils/mix\"\nimport { Mixer } from \"../utils/mix/types\"\nimport { frameloopDriver } from \"./drivers/frame\"\nimport { DriverControls } from \"./drivers/types\"\nimport { inertia } from \"./generators/inertia\"\nimport { keyframes as keyframesGenerator } from \"./generators/keyframes\"\nimport { calcGeneratorDuration } from \"./generators/utils/calc-duration\"\nimport { getGeneratorVelocity } from \"./generators/utils/velocity\"\nimport { getFinalKeyframe } from \"./keyframes/get-final\"\nimport {\n AnimationPlaybackControlsWithThen,\n AnimationState,\n GeneratorFactory,\n KeyframeGenerator,\n TimelineWithFallback,\n ValueAnimationOptions,\n} from \"./types\"\nimport { replaceTransitionType } from \"./utils/replace-transition-type\"\nimport { WithPromise } from \"./utils/WithPromise\"\n\nconst percentToProgress = (percent: number) => percent / 100\n\nexport class JSAnimation\n extends WithPromise\n implements AnimationPlaybackControlsWithThen\n{\n state: AnimationPlayState = \"idle\"\n\n startTime: number | null = null\n\n /**\n * The driver that's controlling the animation loop. Normally this is a requestAnimationFrame loop\n * but in tests we can pass in a synchronous loop.\n */\n private driver?: DriverControls\n\n private isStopped = false\n\n private generator: KeyframeGenerator\n\n private calculatedDuration: number\n\n private resolvedDuration: number\n\n private totalDuration: number\n\n private options: ValueAnimationOptions\n\n /**\n * The current time of the animation.\n */\n private currentTime: number = 0\n\n /**\n * The time at which the animation was paused.\n */\n private holdTime: number | null = null\n\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n private playbackSpeed = 1\n\n /*\n * If our generator doesn't support mixing numbers, we need to replace keyframes with\n * [0, 100] and then make a function that maps that to the actual keyframes.\n *\n * 100 is chosen instead of 1 as it works nicer with spring animations.\n */\n private mixKeyframes: Mixer | undefined\n\n private mirroredGenerator: KeyframeGenerator | undefined\n\n /**\n * Reusable state object for the delay phase to avoid\n * allocating a new object every frame.\n */\n private delayState: AnimationState = {\n done: false,\n value: undefined as unknown as T,\n }\n\n constructor(options: ValueAnimationOptions) {\n super()\n activeAnimations.mainThread++\n\n this.options = options\n this.initAnimation()\n this.play()\n\n if (options.autoplay === false) this.pause()\n }\n\n initAnimation() {\n const { options } = this\n\n replaceTransitionType(options)\n\n const {\n type = keyframesGenerator,\n repeat = 0,\n repeatDelay = 0,\n repeatType,\n velocity = 0,\n } = options\n let { keyframes } = options\n\n const generatorFactory =\n (type as GeneratorFactory) || keyframesGenerator\n\n if (\n process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframesGenerator\n ) {\n invariant(\n keyframes.length <= 2,\n `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes}`,\n \"spring-two-frames\"\n )\n }\n\n if (\n generatorFactory !== keyframesGenerator &&\n typeof keyframes[0] !== \"number\"\n ) {\n this.mixKeyframes = pipe(\n percentToProgress,\n mix(keyframes[0], keyframes[1])\n ) as (t: number) => T\n\n keyframes = [0 as T, 100 as T]\n }\n\n const generator = generatorFactory({ ...options, keyframes })\n\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes].reverse(),\n velocity: -velocity,\n })\n }\n\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator)\n }\n\n const { calculatedDuration } = generator\n this.calculatedDuration = calculatedDuration\n this.resolvedDuration = calculatedDuration + repeatDelay\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay\n this.generator = generator\n }\n\n updateTime(timestamp: number) {\n const animationTime =\n Math.round(timestamp - this.startTime!) * this.playbackSpeed\n\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime\n } else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime\n }\n }\n\n tick(timestamp: number, sample = false) {\n const {\n generator,\n totalDuration,\n mixKeyframes,\n mirroredGenerator,\n resolvedDuration,\n calculatedDuration,\n } = this\n\n if (this.startTime === null) return generator.next(0)\n\n const {\n delay = 0,\n keyframes,\n repeat,\n repeatType,\n repeatDelay,\n type,\n onUpdate,\n finalKeyframe,\n } = this.options\n\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp)\n } else if (this.speed < 0) {\n this.startTime = Math.min(\n timestamp - totalDuration / this.speed,\n this.startTime\n )\n }\n\n if (sample) {\n this.currentTime = timestamp\n } else {\n this.updateTime(timestamp)\n }\n\n // Rebase on delay\n const timeWithoutDelay =\n this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1)\n const isInDelayPhase =\n this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration\n this.currentTime = Math.max(timeWithoutDelay, 0)\n\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration\n }\n\n let elapsed = this.currentTime\n let frameGenerator = generator\n\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress =\n Math.min(this.currentTime, totalDuration) / resolvedDuration\n\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress)\n\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0\n\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1\n }\n\n iterationProgress === 1 && currentIteration--\n\n currentIteration = Math.min(currentIteration, repeat + 1)\n\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n\n const isOddIteration = Boolean(currentIteration % 2)\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration\n }\n } else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator!\n }\n }\n\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration\n }\n\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n let state: AnimationState\n if (isInDelayPhase) {\n this.delayState.value = keyframes[0]\n state = this.delayState\n } else {\n state = frameGenerator.next(elapsed)\n }\n\n if (mixKeyframes && !isInDelayPhase) {\n state.value = mixKeyframes(state.value as number)\n }\n\n let { done } = state\n\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0\n }\n\n const isAnimationFinished =\n this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done))\n\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(\n keyframes,\n this.options,\n finalKeyframe,\n this.speed\n )\n }\n\n if (onUpdate) {\n onUpdate(state.value)\n }\n\n if (isAnimationFinished) {\n this.finish()\n }\n\n return state\n }\n\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve: VoidFunction, reject?: VoidFunction) {\n return this.finished.then(resolve, reject)\n }\n\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration)\n }\n\n get iterationDuration() {\n const { delay = 0 } = this.options || {}\n return this.duration + millisecondsToSeconds(delay)\n }\n\n get time() {\n return millisecondsToSeconds(this.currentTime)\n }\n\n set time(newTime: number) {\n newTime = secondsToMilliseconds(newTime)\n this.currentTime = newTime\n\n if (\n this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0\n ) {\n this.holdTime = newTime\n } else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed\n }\n\n if (this.driver) {\n this.driver.start(false)\n } else {\n this.startTime = 0\n this.state = \"paused\"\n this.holdTime = newTime\n this.tick(newTime)\n }\n }\n\n /**\n * Returns the generator's velocity at the current time in units/second.\n * Uses the analytical derivative when available (springs), avoiding\n * the MotionValue's frame-dependent velocity estimation.\n */\n getGeneratorVelocity(): number {\n const t = this.currentTime\n if (t <= 0) return this.options.velocity || 0\n\n if (this.generator.velocity) {\n return this.generator.velocity(t)\n }\n\n // Fallback: finite difference\n const current = this.generator.next(t).value as number\n return getGeneratorVelocity(\n (s) => this.generator.next(s).value as number,\n t,\n current\n )\n }\n\n get speed() {\n return this.playbackSpeed\n }\n\n set speed(newSpeed: number) {\n const hasChanged = this.playbackSpeed !== newSpeed\n\n if (hasChanged && this.driver) {\n this.updateTime(time.now())\n }\n\n this.playbackSpeed = newSpeed\n\n if (hasChanged && this.driver) {\n this.time = millisecondsToSeconds(this.currentTime)\n }\n }\n\n play() {\n if (this.isStopped) return\n\n const { driver = frameloopDriver, startTime } = this.options\n\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp))\n }\n\n this.options.onPlay?.()\n\n const now = this.driver.now()\n\n if (this.state === \"finished\") {\n this.updateFinished()\n this.startTime = now\n } else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime\n } else if (!this.startTime) {\n this.startTime = startTime ?? now\n }\n\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration\n }\n\n this.holdTime = null\n\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\"\n\n this.driver.start()\n }\n\n pause() {\n this.state = \"paused\"\n this.updateTime(time.now())\n this.holdTime = this.currentTime\n }\n\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n stop = () => {\n const { motionValue } = this.options\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now())\n }\n\n this.isStopped = true\n if (this.state === \"idle\") return\n this.teardown()\n this.options.onStop?.()\n }\n\n complete() {\n if (this.state !== \"running\") {\n this.play()\n }\n\n this.state = \"finished\"\n this.holdTime = null\n }\n\n finish() {\n this.notifyFinished()\n this.teardown()\n this.state = \"finished\"\n\n this.options.onComplete?.()\n }\n\n cancel() {\n this.holdTime = null\n this.startTime = 0\n this.tick(0)\n this.teardown()\n this.options.onCancel?.()\n }\n\n private teardown() {\n this.state = \"idle\"\n this.stopDriver()\n this.startTime = this.holdTime = null\n activeAnimations.mainThread--\n }\n\n private stopDriver() {\n if (!this.driver) return\n this.driver.stop()\n this.driver = undefined\n }\n\n sample(sampleTime: number): AnimationState {\n this.startTime = 0\n return this.tick(sampleTime, true)\n }\n\n attachTimeline(timeline: TimelineWithFallback): VoidFunction {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\"\n this.options.ease = \"linear\"\n this.initAnimation()\n }\n\n this.driver?.stop()\n return timeline.observe(this)\n }\n}\n\n// Legacy function support\nexport function animateValue(\n options: ValueAnimationOptions\n) {\n return new JSAnimation(options)\n}\n"],"names":["keyframesGenerator","keyframes"],"mappings":";;;;;;;;;;;;;AA6BA,MAAM,iBAAiB,GAAG,CAAC,OAAe,KAAK,OAAO,GAAG,GAAG;AAEtD,MAAO,WACT,SAAQ,WAAW,CAAA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AAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;AAClB,QAAA,IAAI,CAAC,MAAM,GAAG,SAAS;IAC3B;AAEA,IAAA,MAAM,CAAC,UAAkB,EAAA;AACrB,QAAA,IAAI,CAAC,SAAS,GAAG,CAAC;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC;IACtC;AAEA,IAAA,cAAc,CAAC,QAA8B,EAAA;AACzC,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;AAC3B,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,WAAW;AAC/B,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,QAAQ;YAC5B,IAAI,CAAC,aAAa,EAAE;QACxB;AAEA,QAAA,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE;AACnB,QAAA,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;IACjC;AACH;AAED;AACM,SAAU,YAAY,CACxB,OAAiC,EAAA;AAEjC,IAAA,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC;AACnC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs deleted file mode 100644 index aecdd889..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs +++ /dev/null @@ -1,179 +0,0 @@ -import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils'; -import { setStyle } from '../render/dom/style-set.mjs'; -import { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs'; -import { getFinalKeyframe } from './keyframes/get-final.mjs'; -import { WithPromise } from './utils/WithPromise.mjs'; -import { startWaapiAnimation } from './waapi/start-waapi-animation.mjs'; -import { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs'; - -/** - * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API. - */ -class NativeAnimation extends WithPromise { - constructor(options) { - super(); - this.finishedTime = null; - this.isStopped = false; - /** - * Tracks a manually-set start time that takes precedence over WAAPI's - * dynamic startTime. This is cleared when play() or time setter is called, - * allowing WAAPI to take over timing. - */ - this.manualStartTime = null; - if (!options) - return; - const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options; - this.isPseudoElement = Boolean(pseudoElement); - this.allowFlatten = allowFlatten; - this.options = options; - invariant(typeof options.type !== "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring"); - const transition = applyGeneratorOptions(options); - this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement); - if (transition.autoplay === false) { - this.animation.pause(); - } - this.animation.onfinish = () => { - this.finishedTime = this.time; - if (!pseudoElement) { - const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed); - if (this.updateMotionValue) { - this.updateMotionValue(keyframe); - } - /** - * If we can, we want to commit the final style as set by the user, - * rather than the computed keyframe value supplied by the animation. - * We always do this, even when a motion value is present, to prevent - * a visual flash in Firefox where the WAAPI animation's fill is removed - * during cancel() before the scheduled render can apply the correct value. - */ - setStyle(element, name, keyframe); - this.animation.cancel(); - } - onComplete?.(); - this.notifyFinished(); - }; - } - play() { - if (this.isStopped) - return; - this.manualStartTime = null; - this.animation.play(); - if (this.state === "finished") { - this.updateFinished(); - } - } - pause() { - this.animation.pause(); - } - complete() { - this.animation.finish?.(); - } - cancel() { - try { - this.animation.cancel(); - } - catch (e) { } - } - stop() { - if (this.isStopped) - return; - this.isStopped = true; - const { state } = this; - if (state === "idle" || state === "finished") { - return; - } - if (this.updateMotionValue) { - this.updateMotionValue(); - } - else { - this.commitStyles(); - } - if (!this.isPseudoElement) - this.cancel(); - } - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * In this method, we commit styles back to the DOM before cancelling - * the animation. - * - * This is designed to be overridden by NativeAnimationExtended, which - * will create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to also correctly calculate velocity for any subsequent animation - * while deferring the commit until the next animation frame. - */ - commitStyles() { - const element = this.options?.element; - if (!this.isPseudoElement && element?.isConnected) { - this.animation.commitStyles?.(); - } - } - get duration() { - const duration = this.animation.effect?.getComputedTiming?.().duration || 0; - return millisecondsToSeconds(Number(duration)); - } - get iterationDuration() { - const { delay = 0 } = this.options || {}; - return this.duration + millisecondsToSeconds(delay); - } - get time() { - return millisecondsToSeconds(Number(this.animation.currentTime) || 0); - } - set time(newTime) { - const wasFinished = this.finishedTime !== null; - this.manualStartTime = null; - this.finishedTime = null; - this.animation.currentTime = secondsToMilliseconds(newTime); - if (wasFinished) { - this.animation.pause(); - } - } - /** - * The playback speed of the animation. - * 1 = normal speed, 2 = double speed, 0.5 = half speed. - */ - get speed() { - return this.animation.playbackRate; - } - set speed(newSpeed) { - // Allow backwards playback after finishing - if (newSpeed < 0) - this.finishedTime = null; - this.animation.playbackRate = newSpeed; - } - get state() { - return this.finishedTime !== null - ? "finished" - : this.animation.playState; - } - get startTime() { - return this.manualStartTime ?? Number(this.animation.startTime); - } - set startTime(newStartTime) { - this.manualStartTime = this.animation.startTime = newStartTime; - } - /** - * Attaches a timeline to the animation, for instance the `ScrollTimeline`. - */ - attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) { - if (this.allowFlatten) { - this.animation.effect?.updateTiming({ easing: "linear" }); - } - this.animation.onfinish = null; - if (timeline && supportsScrollTimeline()) { - this.animation.timeline = timeline; - if (rangeStart) - this.animation.rangeStart = rangeStart; - if (rangeEnd) - this.animation.rangeEnd = rangeEnd; - return noop; - } - else { - return observe(this); - } - } -} - -export { NativeAnimation }; -//# sourceMappingURL=NativeAnimation.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.map deleted file mode 100644 index e37651e2..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NativeAnimation.mjs","sources":["../../../src/animation/NativeAnimation.ts"],"sourcesContent":["import {\n invariant,\n millisecondsToSeconds,\n noop,\n secondsToMilliseconds,\n} from \"motion-utils\"\nimport { setStyle } from \"../render/dom/style-set\"\nimport { supportsScrollTimeline } from \"../utils/supports/scroll-timeline\"\nimport { getFinalKeyframe } from \"./keyframes/get-final\"\nimport {\n AnimationPlaybackControlsWithThen,\n AnyResolvedKeyframe,\n DOMValueAnimationOptions,\n TimelineWithFallback,\n} from \"./types\"\nimport { WithPromise } from \"./utils/WithPromise\"\nimport { startWaapiAnimation } from \"./waapi/start-waapi-animation\"\nimport { applyGeneratorOptions } from \"./waapi/utils/apply-generator\"\n\nexport interface NativeAnimationOptions\n extends DOMValueAnimationOptions {\n pseudoElement?: string\n startTime?: number\n}\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nexport class NativeAnimation\n extends WithPromise\n implements AnimationPlaybackControlsWithThen\n{\n /**\n * The interfaced Web Animation API animation\n */\n protected animation: Animation\n\n protected finishedTime: number | null = null\n\n protected options: NativeAnimationOptions\n\n private allowFlatten: boolean\n\n private isStopped = false\n\n private isPseudoElement: boolean\n\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n protected manualStartTime: number | null = null\n\n constructor(options?: NativeAnimationOptions) {\n super()\n\n if (!options) return\n\n const {\n element,\n name,\n keyframes,\n pseudoElement,\n allowFlatten = false,\n finalKeyframe,\n onComplete,\n } = options as any\n\n this.isPseudoElement = Boolean(pseudoElement)\n\n this.allowFlatten = allowFlatten\n this.options = options\n\n invariant(\n typeof options.type !== \"string\",\n `Mini animate() doesn't support \"type\" as a string.`,\n \"mini-spring\"\n )\n\n const transition = applyGeneratorOptions(options)\n\n this.animation = startWaapiAnimation(\n element,\n name,\n keyframes,\n transition,\n pseudoElement\n )\n\n if (transition.autoplay === false) {\n this.animation.pause()\n }\n\n this.animation.onfinish = () => {\n this.finishedTime = this.time\n\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(\n keyframes as any,\n this.options as any,\n finalKeyframe,\n this.speed\n )\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe)\n }\n\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe)\n\n this.animation.cancel()\n }\n\n onComplete?.()\n this.notifyFinished()\n }\n }\n\n updateMotionValue?(value?: T): void\n\n play() {\n if (this.isStopped) return\n\n this.manualStartTime = null\n this.animation.play()\n\n if (this.state === \"finished\") {\n this.updateFinished()\n }\n }\n\n pause() {\n this.animation.pause()\n }\n\n complete() {\n this.animation.finish?.()\n }\n\n cancel() {\n try {\n this.animation.cancel()\n } catch (e) {}\n }\n\n stop() {\n if (this.isStopped) return\n this.isStopped = true\n const { state } = this\n\n if (state === \"idle\" || state === \"finished\") {\n return\n }\n\n if (this.updateMotionValue) {\n this.updateMotionValue()\n } else {\n this.commitStyles()\n }\n\n if (!this.isPseudoElement) this.cancel()\n }\n\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n protected commitStyles() {\n const element = this.options?.element\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.()\n }\n }\n\n get duration() {\n const duration =\n this.animation.effect?.getComputedTiming?.().duration || 0\n\n return millisecondsToSeconds(Number(duration))\n }\n\n get iterationDuration() {\n const { delay = 0 } = this.options || {}\n return this.duration + millisecondsToSeconds(delay)\n }\n\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0)\n }\n\n set time(newTime: number) {\n const wasFinished = this.finishedTime !== null\n this.manualStartTime = null\n this.finishedTime = null\n this.animation.currentTime = secondsToMilliseconds(newTime)\n\n if (wasFinished) {\n this.animation.pause()\n }\n }\n\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate\n }\n\n set speed(newSpeed: number) {\n // Allow backwards playback after finishing\n if (newSpeed < 0) this.finishedTime = null\n\n this.animation.playbackRate = newSpeed\n }\n\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState\n }\n\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime)\n }\n\n set startTime(newStartTime: number) {\n this.manualStartTime = this.animation.startTime = newStartTime\n }\n\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({\n timeline,\n rangeStart,\n rangeEnd,\n observe,\n }: TimelineWithFallback): VoidFunction {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" })\n }\n\n this.animation.onfinish = null\n\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline as any\n\n if (rangeStart) (this.animation as any).rangeStart = rangeStart\n if (rangeEnd) (this.animation as any).rangeEnd = rangeEnd\n\n return noop\n } else {\n return observe(this)\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAyBA;;AAEG;AACG,MAAO,eACT,SAAQ,WAAW,CAAA;AAyBnB,IAAA,WAAA,CAAY,OAAgC,EAAA;AACxC,QAAA,KAAK,EAAE;QAlBD,IAAA,CAAA,YAAY,GAAkB,IAAI;QAMpC,IAAA,CAAA,SAAS,GAAG,KAAK;AAIzB;;;;AAIG;QACO,IAAA,CAAA,e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SAAS;IAClC;AAEA,IAAA,IAAI,SAAS,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;IACnE;IAEA,IAAI,SAAS,CAAC,YAAoB,EAAA;QAC9B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,YAAY;IAClE;AAEA;;AAEG;IACH,cAAc,CAAC,EACX,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,OAAO,GACY,EAAA;AACnB,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;QAC7D;AAEA,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI;AAE9B,QAAA,IAAI,QAAQ,IAAI,sBAAsB,EAAE,EAAE;AACtC,YAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAe;AAEzC,YAAA,IAAI,UAAU;AAAG,gBAAA,IAAI,CAAC,SAAiB,CAAC,UAAU,GAAG,UAAU;AAC/D,YAAA,IAAI,QAAQ;AAAG,gBAAA,IAAI,CAAC,SAAiB,CAAC,QAAQ,GAAG,QAAQ;AAEzD,YAAA,OAAO,IAAU;QACrB;aAAO;AACH,YAAA,OAAO,OAAO,CAAC,IAAI,CAAC;QACxB;IACJ;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs deleted file mode 100644 index 06ece954..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs +++ /dev/null @@ -1,88 +0,0 @@ -import { clamp } from 'motion-utils'; -import { time } from '../frameloop/sync-time.mjs'; -import { setStyle } from '../render/dom/style-set.mjs'; -import { JSAnimation } from './JSAnimation.mjs'; -import { NativeAnimation } from './NativeAnimation.mjs'; -import { replaceTransitionType } from './utils/replace-transition-type.mjs'; -import { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs'; - -/** - * 10ms is chosen here as it strikes a balance between smooth - * results (more than one keyframe per frame at 60fps) and - * keyframe quantity. - */ -const sampleDelta = 10; //ms -class NativeAnimationExtended extends NativeAnimation { - constructor(options) { - /** - * The base NativeAnimation function only supports a subset - * of Motion easings, and WAAPI also only supports some - * easing functions via string/cubic-bezier definitions. - * - * This function replaces those unsupported easing functions - * with a JS easing function. This will later get compiled - * to a linear() easing function. - */ - replaceStringEasing(options); - /** - * Ensure we replace the transition type with a generator function - * before passing to WAAPI. - * - * TODO: Does this have a better home? It could be shared with - * JSAnimation. - */ - replaceTransitionType(options); - super(options); - /** - * Only set startTime when the animation should autoplay. - * Setting startTime on a paused WAAPI animation unpauses it - * (per the WAAPI spec), which breaks autoplay: false. - */ - if (options.startTime !== undefined && options.autoplay !== false) { - this.startTime = options.startTime; - } - this.options = options; - } - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * Rather than read committed styles back out of the DOM, we can - * create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to calculate velocity for any subsequent animation. - */ - updateMotionValue(value) { - const { motionValue, onUpdate, onComplete, element, ...options } = this.options; - if (!motionValue) - return; - if (value !== undefined) { - motionValue.set(value); - return; - } - const sampleAnimation = new JSAnimation({ - ...options, - autoplay: false, - }); - /** - * Use wall-clock elapsed time for sampling. - * Under CPU load, WAAPI's currentTime may not reflect actual - * elapsed time, causing incorrect sampling and visual jumps. - */ - const sampleTime = Math.max(sampleDelta, time.now() - this.startTime); - const delta = clamp(0, sampleDelta, sampleTime - sampleDelta); - const current = sampleAnimation.sample(sampleTime).value; - /** - * Write the estimated value to inline style so it persists - * after cancel(), covering the async gap before the next - * animation starts. - */ - const { name } = this.options; - if (element && name) - setStyle(element, name, current); - motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta); - sampleAnimation.stop(); - } -} - -export { NativeAnimationExtended }; -//# sourceMappingURL=NativeAnimationExtended.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.map deleted file mode 100644 index 9b2fb9c8..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NativeAnimationExtended.mjs","sources":["../../../src/animation/NativeAnimationExtended.ts"],"sourcesContent":["import { clamp } from \"motion-utils\"\nimport { time } from \"../frameloop/sync-time\"\nimport { setStyle } from \"../render/dom/style-set\"\nimport { JSAnimation } from \"./JSAnimation\"\nimport { NativeAnimation, NativeAnimationOptions } from \"./NativeAnimation\"\nimport { AnyResolvedKeyframe, ValueAnimationOptions } from \"./types\"\nimport { replaceTransitionType } from \"./utils/replace-transition-type\"\nimport { replaceStringEasing } from \"./waapi/utils/unsupported-easing\"\n\nexport type NativeAnimationOptionsExtended =\n NativeAnimationOptions & ValueAnimationOptions & NativeAnimationOptions\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10 //ms\n\nexport class NativeAnimationExtended<\n T extends AnyResolvedKeyframe\n> extends NativeAnimation {\n options: NativeAnimationOptionsExtended\n\n constructor(options: NativeAnimationOptionsExtended) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options)\n\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options)\n\n super(options)\n\n /**\n * Only set startTime when the animation should autoplay.\n * Setting startTime on a paused WAAPI animation unpauses it\n * (per the WAAPI spec), which breaks autoplay: false.\n */\n if (options.startTime !== undefined && options.autoplay !== false) {\n this.startTime = options.startTime\n }\n\n this.options = options\n }\n\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read committed styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value?: T) {\n const { motionValue, onUpdate, onComplete, element, ...options } =\n this.options\n\n if (!motionValue) return\n\n if (value !== undefined) {\n motionValue.set(value)\n return\n }\n\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n })\n\n /**\n * Use wall-clock elapsed time for sampling.\n * Under CPU load, WAAPI's currentTime may not reflect actual\n * elapsed time, causing incorrect sampling and visual jumps.\n */\n const sampleTime = Math.max(sampleDelta, time.now() - this.startTime)\n const delta = clamp(0, sampleDelta, sampleTime - sampleDelta)\n const current = sampleAnimation.sample(sampleTime).value\n\n /**\n * Write the estimated value to inline style so it persists\n * after cancel(), covering the async gap before the next\n * animation starts.\n */\n const { name } = this.options\n if (element && name) setStyle(element, name, current)\n\n motionValue.setWithVelocity(\n sampleAnimation.sample(Math.max(0, sampleTime - delta)).value,\n current,\n delta\n )\n\n sampleAnimation.stop()\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAYA;;;;AAIG;AACH,MAAM,WAAW,GAAG,EAAE,CAAA;AAEhB,MAAO,uBAEX,SAAQ,eAAkB,CAAA;AAGxB,IAAA,WAAA,CAAY,OAA0C,EAAA;AAClD;;;;;;;;AAQG;QACH,mBAAmB,CAAC,OAAO,CAAC;AAE5B;;;;;;AAMG;QACH,qBAAqB,CAAC,OAAO,CAAC;QAE9B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AAU,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,EAC7D,OAAO,EACP,KAAK,CACR;QAED,eAAe,CAAC,IAAI,EAAE;IAC1B;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs deleted file mode 100644 index 797a913d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { NativeAnimation } from './NativeAnimation.mjs'; - -class NativeAnimationWrapper extends NativeAnimation { - constructor(animation) { - super(); - this.animation = animation; - animation.onfinish = () => { - this.finishedTime = this.time; - this.notifyFinished(); - }; - } -} - -export { NativeAnimationWrapper }; -//# sourceMappingURL=NativeAnimationWrapper.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs.map deleted file mode 100644 index 7990d58a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NativeAnimationWrapper.mjs","sources":["../../../src/animation/NativeAnimationWrapper.ts"],"sourcesContent":["import { NativeAnimation } from \"./NativeAnimation\"\nimport { AnyResolvedKeyframe } from \"./types\"\n\nexport class NativeAnimationWrapper<\n T extends AnyResolvedKeyframe\n> extends NativeAnimation {\n constructor(animation: Animation) {\n super()\n\n this.animation = animation\n animation.onfinish = () => {\n this.finishedTime = this.time\n this.notifyFinished()\n }\n }\n}\n"],"names":[],"mappings":";;AAGM,MAAO,sBAEX,SAAQ,eAAkB,CAAA;AACxB,IAAA,WAAA,CAAY,SAAoB,EAAA;AAC5B,QAAA,KAAK,EAAE;AAEP,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAC1B,QAAA,SAAS,CAAC,QAAQ,GAAG,MAAK;AACtB,YAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI;YAC7B,IAAI,CAAC,cAAc,EAAE;AACzB,QAAA,CAAC;IACL;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs deleted file mode 100644 index 45767f14..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import { animateMotionValue } from '../interfaces/motion-value.mjs'; -import { motionValue } from '../../value/index.mjs'; -import { isMotionValue } from '../../value/utils/is-motion-value.mjs'; - -function animateSingleValue(value, keyframes, options) { - const motionValue$1 = isMotionValue(value) ? value : motionValue(value); - motionValue$1.start(animateMotionValue("", motionValue$1, keyframes, options)); - return motionValue$1.animation; -} - -export { animateSingleValue }; -//# sourceMappingURL=single-value.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.map deleted file mode 100644 index 64d11eb8..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"single-value.mjs","sources":["../../../../src/animation/animate/single-value.ts"],"sourcesContent":["import { animateMotionValue } from \"../interfaces/motion-value\"\nimport type {\n AnimationPlaybackControlsWithThen,\n AnyResolvedKeyframe,\n UnresolvedValueKeyframe,\n ValueAnimationTransition,\n} from \"../types\"\nimport {\n motionValue as createMotionValue,\n MotionValue,\n} from \"../../value\"\nimport { isMotionValue } from \"../../value/utils/is-motion-value\"\n\nexport function animateSingleValue(\n value: MotionValue | V,\n keyframes: V | UnresolvedValueKeyframe[],\n options?: ValueAnimationTransition\n): AnimationPlaybackControlsWithThen {\n const motionValue = isMotionValue(value) ? value : createMotionValue(value)\n\n motionValue.start(animateMotionValue(\"\", motionValue, keyframes, options))\n\n return motionValue.animation!\n}\n"],"names":["motionValue","createMotionValue"],"mappings":";;;;SAagB,kBAAkB,CAC9B,KAAyB,EACzB,SAA2C,EAC3C,OAAkC,EAAA;AAElC,IAAA,MAAMA,aAAW,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,KAAK,GAAGC,WAAiB,CAAC,KAAK,CAAC;AAE3E,IAAAD,aAAW,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,EAAEA,aAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAE1E,OAAOA,aAAW,CAAC,SAAU;AACjC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs deleted file mode 100644 index 92eecd84..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import { time } from '../../frameloop/sync-time.mjs'; -import { frameData, cancelFrame, frame } from '../../frameloop/frame.mjs'; - -const frameloopDriver = (update) => { - const passTimestamp = ({ timestamp }) => update(timestamp); - return { - start: (keepAlive = true) => frame.update(passTimestamp, keepAlive), - stop: () => cancelFrame(passTimestamp), - /** - * If we're processing this frame we can use the - * framelocked timestamp to keep things in sync. - */ - now: () => (frameData.isProcessing ? frameData.timestamp : time.now()), - }; -}; - -export { frameloopDriver }; -//# sourceMappingURL=frame.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.map deleted file mode 100644 index 99f63156..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"frame.mjs","sources":["../../../../src/animation/drivers/frame.ts"],"sourcesContent":["import { cancelFrame, frame, frameData } from \"../../frameloop\"\nimport { time } from \"../../frameloop/sync-time\"\nimport { FrameData } from \"../../frameloop/types\"\nimport { Driver } from \"./types\"\n\nexport const frameloopDriver: Driver = (update) => {\n const passTimestamp = ({ timestamp }: FrameData) => update(timestamp)\n\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n }\n}\n"],"names":[],"mappings":";;;AAKO,MAAM,eAAe,GAAW,CAAC,MAAM,KAAI;AAC9C,IAAA,MAAM,aAAa,GAAG,CAAC,EAAE,SAAS,EAAa,KAAK,MAAM,CAAC,SAAS,CAAC;IAErE,OAAO;AACH,QAAA,KAAK,EAAE,CAAC,SAAS,GAAG,IAAI,KAAK,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC;AACnE,QAAA,IAAI,EAAE,MAAM,WAAW,CAAC,aAAa,CAAC;AACtC;;;AAGG;QACH,GAAG,EAAE,OAAO,SAAS,CAAC,YAAY,GAAG,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;KACzE;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs deleted file mode 100644 index dc6789ab..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs +++ /dev/null @@ -1,88 +0,0 @@ -import { spring } from './spring.mjs'; -import { getGeneratorVelocity } from './utils/velocity.mjs'; - -function inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) { - const origin = keyframes[0]; - const state = { - done: false, - value: origin, - }; - const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max); - const nearestBoundary = (v) => { - if (min === undefined) - return max; - if (max === undefined) - return min; - return Math.abs(min - v) < Math.abs(max - v) ? min : max; - }; - let amplitude = power * velocity; - const ideal = origin + amplitude; - const target = modifyTarget === undefined ? ideal : modifyTarget(ideal); - /** - * If the target has changed we need to re-calculate the amplitude, otherwise - * the animation will start from the wrong position. - */ - if (target !== ideal) - amplitude = target - origin; - const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant); - const calcLatest = (t) => target + calcDelta(t); - const applyFriction = (t) => { - const delta = calcDelta(t); - const latest = calcLatest(t); - state.done = Math.abs(delta) <= restDelta; - state.value = state.done ? target : latest; - }; - /** - * Ideally this would resolve for t in a stateless way, we could - * do that by always precalculating the animation but as we know - * this will be done anyway we can assume that spring will - * be discovered during that. - */ - let timeReachedBoundary; - let spring$1; - const checkCatchBoundary = (t) => { - if (!isOutOfBounds(state.value)) - return; - timeReachedBoundary = t; - spring$1 = spring({ - keyframes: [state.value, nearestBoundary(state.value)], - velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000 - damping: bounceDamping, - stiffness: bounceStiffness, - restDelta, - restSpeed, - }); - }; - checkCatchBoundary(0); - return { - calculatedDuration: null, - next: (t) => { - /** - * We need to resolve the friction to figure out if we need a - * spring but we don't want to do this twice per frame. So here - * we flag if we updated for this frame and later if we did - * we can skip doing it again. - */ - let hasUpdatedFrame = false; - if (!spring$1 && timeReachedBoundary === undefined) { - hasUpdatedFrame = true; - applyFriction(t); - checkCatchBoundary(t); - } - /** - * If we have a spring and the provided t is beyond the moment the friction - * animation crossed the min/max boundary, use the spring. - */ - if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) { - return spring$1.next(t - timeReachedBoundary); - } - else { - !hasUpdatedFrame && applyFriction(t); - return state; - } - }, - }; -} - -export { inertia }; -//# sourceMappingURL=inertia.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.map deleted file mode 100644 index 11402a70..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inertia.mjs","sources":["../../../../src/animation/generators/inertia.ts"],"sourcesContent":["import {\n AnimationState,\n KeyframeGenerator,\n ValueAnimationOptions,\n} from \"../types\"\nimport { spring as createSpring } from \"./spring\"\nimport { getGeneratorVelocity } from \"./utils/velocity\"\n\nexport function inertia({\n keyframes,\n velocity = 0.0,\n power = 0.8,\n timeConstant = 325,\n bounceDamping = 10,\n bounceStiffness = 500,\n modifyTarget,\n min,\n max,\n restDelta = 0.5,\n restSpeed,\n}: ValueAnimationOptions): KeyframeGenerator {\n const origin = keyframes[0]\n\n const state: AnimationState = {\n done: false,\n value: origin,\n }\n\n const isOutOfBounds = (v: number) =>\n (min !== undefined && v < min) || (max !== undefined && v > max)\n\n const nearestBoundary = (v: number) => {\n if (min === undefined) return max\n if (max === undefined) return min\n\n return Math.abs(min - v) < Math.abs(max - v) ? min : max\n }\n\n let amplitude = power * velocity\n const ideal = origin + amplitude\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal)\n\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal) amplitude = target - origin\n\n const calcDelta = (t: number) => -amplitude * Math.exp(-t / timeConstant)\n\n const calcLatest = (t: number) => target + calcDelta(t)\n\n const applyFriction = (t: number) => {\n const delta = calcDelta(t)\n const latest = calcLatest(t)\n state.done = Math.abs(delta) <= restDelta\n state.value = state.done ? target : latest\n }\n\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary: number | undefined\n let spring: KeyframeGenerator | undefined\n\n const checkCatchBoundary = (t: number) => {\n if (!isOutOfBounds(state.value)) return\n\n timeReachedBoundary = t\n\n spring = createSpring({\n keyframes: [state.value, nearestBoundary(state.value)!],\n velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n })\n }\n\n checkCatchBoundary(0)\n\n return {\n calculatedDuration: null,\n next: (t: number) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false\n if (!spring && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true\n applyFriction(t)\n checkCatchBoundary(t)\n }\n\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring!.next(t - timeReachedBoundary)\n } else {\n !hasUpdatedFrame && applyFriction(t)\n return state\n }\n },\n }\n}\n"],"names":["spring","createSpring"],"mappings":";;;SAQgB,OAAO,CAAC,EACpB,SAAS,EACT,QAAQ,GAAG,GAAG,EACd,KAAK,GAAG,GAAG,EACX,YAAY,GAAG,GAAG,EAClB,aAAa,GAAG,EAAE,EAClB,eAAe,GAAG,GAAG,EACrB,YAAY,EACZ,GAAG,EACH,GAAG,EACH,SAAS,GAAG,GAAG,EACf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AAC;YAChD;iBAAO;AACH,gBAAA,CAAC,eAAe,IAAI,aAAa,CAAC,CAAC,CAAC;AACpC,gBAAA,OAAO,KAAK;YAChB;QACJ,CAAC;KACJ;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs deleted file mode 100644 index aeca9164..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs +++ /dev/null @@ -1,50 +0,0 @@ -import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils'; -import { interpolate } from '../../utils/interpolate.mjs'; -import { defaultOffset } from '../keyframes/offsets/default.mjs'; -import { convertOffsetToTimes } from '../keyframes/offsets/time.mjs'; - -function defaultEasing(values, easing) { - return values.map(() => easing || easeInOut).splice(0, values.length - 1); -} -function keyframes({ duration = 300, keyframes: keyframeValues, times, ease = "easeInOut", }) { - /** - * Easing functions can be externally defined as strings. Here we convert them - * into actual functions. - */ - const easingFunctions = isEasingArray(ease) - ? ease.map(easingDefinitionToFunction) - : easingDefinitionToFunction(ease); - /** - * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator - * to reduce GC during animation. - */ - const state = { - done: false, - value: keyframeValues[0], - }; - /** - * Create a times array based on the provided 0-1 offsets - */ - const absoluteTimes = convertOffsetToTimes( - // Only use the provided offsets if they're the correct length - // TODO Maybe we should warn here if there's a length mismatch - times && times.length === keyframeValues.length - ? times - : defaultOffset(keyframeValues), duration); - const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, { - ease: Array.isArray(easingFunctions) - ? easingFunctions - : defaultEasing(keyframeValues, easingFunctions), - }); - return { - calculatedDuration: duration, - next: (t) => { - state.value = mapTimeToKeyframe(t); - state.done = t >= duration; - return state; - }, - }; -} - -export { defaultEasing, keyframes }; -//# sourceMappingURL=keyframes.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.map deleted file mode 100644 index 0cb3bdcf..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keyframes.mjs","sources":["../../../../src/animation/generators/keyframes.ts"],"sourcesContent":["import {\n easeInOut,\n easingDefinitionToFunction,\n EasingFunction,\n isEasingArray,\n} from \"motion-utils\"\nimport { interpolate } from \"../../utils/interpolate\"\nimport { defaultOffset } from \"../keyframes/offsets/default\"\nimport { convertOffsetToTimes } from \"../keyframes/offsets/time\"\nimport {\n AnimationState,\n AnyResolvedKeyframe,\n KeyframeGenerator,\n ValueAnimationOptions,\n} from \"../types\"\n\nexport function defaultEasing(\n values: any[],\n easing?: EasingFunction\n): EasingFunction[] {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1)\n}\n\nexport function keyframes({\n duration = 300,\n keyframes: keyframeValues,\n times,\n ease = \"easeInOut\",\n}: ValueAnimationOptions): KeyframeGenerator {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease)\n\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state: AnimationState = {\n done: false,\n value: keyframeValues[0],\n }\n\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues),\n duration\n )\n\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n })\n\n return {\n calculatedDuration: duration,\n next: (t: number) => {\n state.value = mapTimeToKeyframe(t)\n state.done = t >= duration\n return state\n },\n }\n}\n"],"names":[],"mappings":";;;;;AAgBM,SAAU,aAAa,CACzB,MAAa,EACb,MAAuB,EAAA;IAEvB,OAAO,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,IAAI,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AAC7E;SAEgB,SAAS,CAAgC,EACrD,QAAQ,GAAG,GAAG,EACd,SAAS,EAAE,cAAc,EACzB,KAAK,EACL,IAAI,GAAG,WAAW,GACK,EAAA;AACvB;;;AAGG;AACH,IAAA,MAAM,eAAe,GAAG,aAAa,CAAC,IAAI;AACtC,UAAE,IAAI,CAAC,GAAG,CAAC,0BAA0B;AACrC,UAAE,0BAA0B,CAAC,IAAI,CAAC;AAEtC;;;AAGG;AACH,IAAA,MAAM,KAAK,GAAsB;AAC7B,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC;KAC3B;AAED;;AAEG;IACH,MAAM,aAAa,GAAG,oBAAoB;;;AAGtC,IAAA,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,cAAc,CAAC;AACrC,UAAE;UACA,aAAa,CAAC,cAAc,CAAC,EACnC,QAAQ,CACX;AAED,IAAA,MAAM,iBAAiB,GAAG,WAAW,CAAI,aAAa,EAAE,cAAc,EAAE;AACpE,QAAA,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,eAAe;AAC/B,cAAE;AACF,cAAE,aAAa,CAAC,cAAc,EAAE,eAAe,CAAC;AACvD,KAAA,CAAC;IAEF,OAAO;AACH,QAAA,kBAAkB,EAAE,QAAQ;AAC5B,QAAA,IAAI,EAAE,CAAC,CAAS,KAAI;AAChB,YAAA,KAAK,CAAC,KAAK,GAAG,iBAAiB,CAAC,CAAC,CAAC;AAClC,YAAA,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,QAAQ;AAC1B,YAAA,OAAO,KAAK;QAChB,CAAC;KACJ;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/spring.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/spring.mjs deleted file mode 100644 index 2615a914..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/spring.mjs +++ /dev/null @@ -1,329 +0,0 @@ -import { millisecondsToSeconds, clamp, secondsToMilliseconds, warning } from 'motion-utils'; -import { generateLinearEasing } from '../waapi/utils/linear.mjs'; -import { calcGeneratorDuration, maxGeneratorDuration } from './utils/calc-duration.mjs'; -import { createGeneratorEasing } from './utils/create-generator-easing.mjs'; - -const springDefaults = { - // Default spring physics - stiffness: 100, - damping: 10, - mass: 1.0, - velocity: 0.0, - // Default duration/bounce-based options - duration: 800, // in ms - bounce: 0.3, - visualDuration: 0.3, // in seconds - // Rest thresholds - restSpeed: { - granular: 0.01, - default: 2, - }, - restDelta: { - granular: 0.005, - default: 0.5, - }, - // Limits - minDuration: 0.01, // in seconds - maxDuration: 10.0, // in seconds - minDamping: 0.05, - maxDamping: 1, -}; -function calcAngularFreq(undampedFreq, dampingRatio) { - return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio); -} -const rootIterations = 12; -function approximateRoot(envelope, derivative, initialGuess) { - let result = initialGuess; - for (let i = 1; i < rootIterations; i++) { - result = result - envelope(result) / derivative(result); - } - return result; -} -/** - * This is ported from the Framer implementation of duration-based spring resolution. - */ -const safeMin = 0.001; -function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) { - let envelope; - let derivative; - warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit"); - let dampingRatio = 1 - bounce; - /** - * Restrict dampingRatio and duration to within acceptable ranges. - */ - dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio); - duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration)); - if (dampingRatio < 1) { - /** - * Underdamped spring - */ - envelope = (undampedFreq) => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const a = exponentialDecay - velocity; - const b = calcAngularFreq(undampedFreq, dampingRatio); - const c = Math.exp(-delta); - return safeMin - (a / b) * c; - }; - derivative = (undampedFreq) => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const d = delta * velocity + velocity; - const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration; - const f = Math.exp(-delta); - const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio); - const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1; - return (factor * ((d - e) * f)) / g; - }; - } - else { - /** - * Critically-damped spring - */ - envelope = (undampedFreq) => { - const a = Math.exp(-undampedFreq * duration); - const b = (undampedFreq - velocity) * duration + 1; - return -safeMin + a * b; - }; - derivative = (undampedFreq) => { - const a = Math.exp(-undampedFreq * duration); - const b = (velocity - undampedFreq) * (duration * duration); - return a * b; - }; - } - const initialGuess = 5 / duration; - const undampedFreq = approximateRoot(envelope, derivative, initialGuess); - duration = secondsToMilliseconds(duration); - if (isNaN(undampedFreq)) { - return { - stiffness: springDefaults.stiffness, - damping: springDefaults.damping, - duration, - }; - } - else { - const stiffness = Math.pow(undampedFreq, 2) * mass; - return { - stiffness, - damping: dampingRatio * 2 * Math.sqrt(mass * stiffness), - duration, - }; - } -} -const durationKeys = ["duration", "bounce"]; -const physicsKeys = ["stiffness", "damping", "mass"]; -function isSpringType(options, keys) { - return keys.some((key) => options[key] !== undefined); -} -function getSpringOptions(options) { - let springOptions = { - velocity: springDefaults.velocity, - stiffness: springDefaults.stiffness, - damping: springDefaults.damping, - mass: springDefaults.mass, - isResolvedFromDuration: false, - ...options, - }; - // stiffness/damping/mass overrides duration/bounce - if (!isSpringType(options, physicsKeys) && - isSpringType(options, durationKeys)) { - // Time-defined springs should ignore inherited velocity. - // Velocity from interrupted animations can cause findSpring() - // to compute wildly different spring parameters, leading to - // massive oscillation on small-range animations. - springOptions.velocity = 0; - if (options.visualDuration) { - const visualDuration = options.visualDuration; - const root = (2 * Math.PI) / (visualDuration * 1.2); - const stiffness = root * root; - const damping = 2 * - clamp(0.05, 1, 1 - (options.bounce || 0)) * - Math.sqrt(stiffness); - springOptions = { - ...springOptions, - mass: springDefaults.mass, - stiffness, - damping, - }; - } - else { - const derived = findSpring({ ...options, velocity: 0 }); - springOptions = { - ...springOptions, - ...derived, - mass: springDefaults.mass, - }; - springOptions.isResolvedFromDuration = true; - } - } - return springOptions; -} -function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) { - const options = typeof optionsOrVisualDuration !== "object" - ? { - visualDuration: optionsOrVisualDuration, - keyframes: [0, 1], - bounce, - } - : optionsOrVisualDuration; - let { restSpeed, restDelta } = options; - const origin = options.keyframes[0]; - const target = options.keyframes[options.keyframes.length - 1]; - /** - * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator - * to reduce GC during animation. - */ - const state = { done: false, value: origin }; - const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({ - ...options, - velocity: -millisecondsToSeconds(options.velocity || 0), - }); - const initialVelocity = velocity || 0.0; - const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass)); - const initialDelta = target - origin; - const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass)); - /** - * If we're working on a granular scale, use smaller defaults for determining - * when the spring is finished. - * - * These defaults have been selected emprically based on what strikes a good - * ratio between feeling good and finishing as soon as changes are imperceptible. - */ - const isGranularScale = Math.abs(initialDelta) < 5; - restSpeed || (restSpeed = isGranularScale - ? springDefaults.restSpeed.granular - : springDefaults.restSpeed.default); - restDelta || (restDelta = isGranularScale - ? springDefaults.restDelta.granular - : springDefaults.restDelta.default); - let resolveSpring; - let resolveVelocity; - // Underdamped coefficients, hoisted for use in the inlined next() hot path - let angularFreq; - let A; - let sinCoeff; - let cosCoeff; - if (dampingRatio < 1) { - angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio); - A = - (initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) / - angularFreq; - // Underdamped spring - resolveSpring = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return (target - - envelope * - (A * Math.sin(angularFreq * t) + - initialDelta * Math.cos(angularFreq * t))); - }; - // Analytical derivative of underdamped spring (px/ms) - sinCoeff = - dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq; - cosCoeff = - dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq; - resolveVelocity = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return envelope * - (sinCoeff * Math.sin(angularFreq * t) + - cosCoeff * Math.cos(angularFreq * t)); - }; - } - else if (dampingRatio === 1) { - // Critically damped spring - resolveSpring = (t) => target - - Math.exp(-undampedAngularFreq * t) * - (initialDelta + - (initialVelocity + undampedAngularFreq * initialDelta) * t); - // Analytical derivative of critically damped spring (px/ms) - const C = initialVelocity + undampedAngularFreq * initialDelta; - resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) * - (undampedAngularFreq * C * t - initialVelocity); - } - else { - // Overdamped spring - const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1); - resolveSpring = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - // When performing sinh or cosh values can hit Infinity so we cap them here - const freqForT = Math.min(dampedAngularFreq * t, 300); - return (target - - (envelope * - ((initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) * - Math.sinh(freqForT) + - dampedAngularFreq * - initialDelta * - Math.cosh(freqForT))) / - dampedAngularFreq); - }; - // Analytical derivative of overdamped spring (px/ms) - const P = (initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) / - dampedAngularFreq; - const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq; - const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq; - resolveVelocity = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const freqForT = Math.min(dampedAngularFreq * t, 300); - return envelope * - (sinhCoeff * Math.sinh(freqForT) + - coshCoeff * Math.cosh(freqForT)); - }; - } - const generator = { - calculatedDuration: isResolvedFromDuration ? duration || null : null, - velocity: (t) => secondsToMilliseconds(resolveVelocity(t)), - next: (t) => { - /** - * For underdamped physics springs we need both position and - * velocity each tick. Compute shared trig values once to avoid - * duplicate Math.exp/sin/cos calls on the hot path. - */ - if (!isResolvedFromDuration && dampingRatio < 1) { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const sin = Math.sin(angularFreq * t); - const cos = Math.cos(angularFreq * t); - const current = target - - envelope * - (A * sin + initialDelta * cos); - const currentVelocity = secondsToMilliseconds(envelope * - (sinCoeff * sin + cosCoeff * cos)); - state.done = - Math.abs(currentVelocity) <= restSpeed && - Math.abs(target - current) <= restDelta; - state.value = state.done ? target : current; - return state; - } - const current = resolveSpring(t); - if (!isResolvedFromDuration) { - const currentVelocity = secondsToMilliseconds(resolveVelocity(t)); - state.done = - Math.abs(currentVelocity) <= restSpeed && - Math.abs(target - current) <= restDelta; - } - else { - state.done = t >= duration; - } - state.value = state.done ? target : current; - return state; - }, - toString: () => { - const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration); - const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30); - return calculatedDuration + "ms " + easing; - }, - toTransition: () => { }, - }; - return generator; -} -spring.applyToOptions = (options) => { - const generatorOptions = createGeneratorEasing(options, 100, spring); - options.ease = generatorOptions.ease; - options.duration = secondsToMilliseconds(generatorOptions.duration); - options.type = "keyframes"; - return options; -}; - -export { spring }; -//# sourceMappingURL=spring.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.map deleted file mode 100644 index 5c18f97e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"spring.mjs","sources":["../../../../src/animation/generators/spring.ts"],"sourcesContent":["import {\n clamp,\n millisecondsToSeconds,\n secondsToMilliseconds,\n warning,\n} from \"motion-utils\"\nimport {\n AnimationState,\n KeyframeGenerator,\n SpringOptions,\n Transition,\n ValueAnimationOptions,\n} from \"../types\"\nimport { generateLinearEasing } from \"../waapi/utils/linear\"\nimport {\n calcGeneratorDuration,\n maxGeneratorDuration,\n} from \"./utils/calc-duration\"\nimport { createGeneratorEasing } from \"./utils/create-generator-easing\"\n\nconst springDefaults = {\n // Default spring physics\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n velocity: 0.0,\n\n // Default duration/bounce-based options\n duration: 800, // in ms\n bounce: 0.3,\n visualDuration: 0.3, // in seconds\n\n // Rest thresholds\n restSpeed: {\n granular: 0.01,\n default: 2,\n },\n restDelta: {\n granular: 0.005,\n default: 0.5,\n },\n\n // Limits\n minDuration: 0.01, // in seconds\n maxDuration: 10.0, // in seconds\n minDamping: 0.05,\n maxDamping: 1,\n}\n\nfunction calcAngularFreq(undampedFreq: number, dampingRatio: number) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio)\n}\n\nconst rootIterations = 12\nfunction approximateRoot(\n envelope: (num: number) => number,\n derivative: (num: number) => number,\n initialGuess: number\n): number {\n let result = initialGuess\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result)\n }\n return result\n}\n\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\nconst safeMin = 0.001\n\nfunction findSpring({\n duration = springDefaults.duration,\n bounce = springDefaults.bounce,\n velocity = springDefaults.velocity,\n mass = springDefaults.mass,\n}: SpringOptions) {\n let envelope: (num: number) => number\n let derivative: (num: number) => number\n\n warning(\n duration <= secondsToMilliseconds(springDefaults.maxDuration),\n \"Spring duration must be 10 seconds or less\",\n \"spring-duration-limit\"\n )\n\n let dampingRatio = 1 - bounce\n\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(\n springDefaults.minDamping,\n springDefaults.maxDamping,\n dampingRatio\n )\n duration = clamp(\n springDefaults.minDuration,\n springDefaults.maxDuration,\n millisecondsToSeconds(duration)\n )\n\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio\n const delta = exponentialDecay * duration\n const a = exponentialDecay - velocity\n const b = calcAngularFreq(undampedFreq, dampingRatio)\n const c = Math.exp(-delta)\n return safeMin - (a / b) * c\n }\n\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio\n const delta = exponentialDecay * duration\n const d = delta * velocity + velocity\n const e =\n Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration\n const f = Math.exp(-delta)\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio)\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1\n return (factor * ((d - e) * f)) / g\n }\n } else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration)\n const b = (undampedFreq - velocity) * duration + 1\n return -safeMin + a * b\n }\n\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration)\n const b = (velocity - undampedFreq) * (duration * duration)\n return a * b\n }\n }\n\n const initialGuess = 5 / duration\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess)\n\n duration = secondsToMilliseconds(duration)\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n }\n } else {\n const stiffness = Math.pow(undampedFreq, 2) * mass\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n }\n }\n}\n\nconst durationKeys = [\"duration\", \"bounce\"]\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"]\n\nfunction isSpringType(options: SpringOptions, keys: string[]) {\n return keys.some((key) => (options as any)[key] !== undefined)\n}\n\nfunction getSpringOptions(options: SpringOptions) {\n let springOptions = {\n velocity: springDefaults.velocity,\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n mass: springDefaults.mass,\n isResolvedFromDuration: false,\n ...options,\n }\n // stiffness/damping/mass overrides duration/bounce\n if (\n !isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)\n ) {\n // Time-defined springs should ignore inherited velocity.\n // Velocity from interrupted animations can cause findSpring()\n // to compute wildly different spring parameters, leading to\n // massive oscillation on small-range animations.\n springOptions.velocity = 0\n\n if (options.visualDuration) {\n const visualDuration = options.visualDuration\n const root = (2 * Math.PI) / (visualDuration * 1.2)\n const stiffness = root * root\n const damping =\n 2 *\n clamp(0.05, 1, 1 - (options.bounce || 0)) *\n Math.sqrt(stiffness)\n\n springOptions = {\n ...springOptions,\n mass: springDefaults.mass,\n stiffness,\n damping,\n }\n } else {\n const derived = findSpring({ ...options, velocity: 0 })\n\n springOptions = {\n ...springOptions,\n ...derived,\n mass: springDefaults.mass,\n }\n springOptions.isResolvedFromDuration = true\n }\n }\n\n return springOptions\n}\n\nfunction spring(\n optionsOrVisualDuration:\n | ValueAnimationOptions\n | number = springDefaults.visualDuration,\n bounce = springDefaults.bounce\n): KeyframeGenerator {\n const options =\n typeof optionsOrVisualDuration !== \"object\"\n ? ({\n visualDuration: optionsOrVisualDuration,\n keyframes: [0, 1],\n bounce,\n } as ValueAnimationOptions)\n : optionsOrVisualDuration\n\n let { restSpeed, restDelta } = options\n\n const origin = options.keyframes[0]\n const target = options.keyframes[options.keyframes.length - 1]\n\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state: AnimationState = { done: false, value: origin }\n\n const {\n stiffness,\n damping,\n mass,\n duration,\n velocity,\n isResolvedFromDuration,\n } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n })\n\n const initialVelocity = velocity || 0.0\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass))\n\n const initialDelta = target - origin\n const undampedAngularFreq = millisecondsToSeconds(\n Math.sqrt(stiffness / mass)\n )\n\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5\n restSpeed ||= isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default\n restDelta ||= isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default\n\n let resolveSpring: (v: number) => number\n let resolveVelocity: (t: number) => number\n\n // Underdamped coefficients, hoisted for use in the inlined next() hot path\n let angularFreq: number\n let A: number\n let sinCoeff: number\n let cosCoeff: number\n\n if (dampingRatio < 1) {\n angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio)\n\n A =\n (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq\n\n // Underdamped spring\n resolveSpring = (t: number) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n\n return (\n target -\n envelope *\n (A * Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t))\n )\n }\n\n // Analytical derivative of underdamped spring (px/ms)\n sinCoeff =\n dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq\n cosCoeff =\n dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq\n resolveVelocity = (t: number) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n return envelope *\n (sinCoeff * Math.sin(angularFreq * t) +\n cosCoeff * Math.cos(angularFreq * t))\n }\n } else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t: number) =>\n target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t)\n\n // Analytical derivative of critically damped spring (px/ms)\n const C = initialVelocity + undampedAngularFreq * initialDelta\n resolveVelocity = (t: number) =>\n Math.exp(-undampedAngularFreq * t) *\n (undampedAngularFreq * C * t - initialVelocity)\n } else {\n // Overdamped spring\n const dampedAngularFreq =\n undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1)\n\n resolveSpring = (t: number) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300)\n\n return (\n target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq\n )\n }\n\n // Analytical derivative of overdamped spring (px/ms)\n const P =\n (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n dampedAngularFreq\n const sinhCoeff =\n dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq\n const coshCoeff =\n dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq\n resolveVelocity = (t: number) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t)\n const freqForT = Math.min(dampedAngularFreq * t, 300)\n return envelope *\n (sinhCoeff * Math.sinh(freqForT) +\n coshCoeff * Math.cosh(freqForT))\n }\n }\n\n const generator = {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n velocity: (t: number) => secondsToMilliseconds(resolveVelocity(t)),\n next: (t: number) => {\n /**\n * For underdamped physics springs we need both position and\n * velocity each tick. Compute shared trig values once to avoid\n * duplicate Math.exp/sin/cos calls on the hot path.\n */\n if (!isResolvedFromDuration && dampingRatio < 1) {\n const envelope = Math.exp(\n -dampingRatio * undampedAngularFreq * t\n )\n const sin = Math.sin(angularFreq * t)\n const cos = Math.cos(angularFreq * t)\n\n const current =\n target -\n envelope *\n (A * sin + initialDelta * cos)\n const currentVelocity = secondsToMilliseconds(\n envelope *\n (sinCoeff * sin + cosCoeff * cos)\n )\n\n state.done =\n Math.abs(currentVelocity) <= restSpeed! &&\n Math.abs(target - current) <= restDelta!\n state.value = state.done ? target : current\n\n return state\n }\n\n const current = resolveSpring(t)\n\n if (!isResolvedFromDuration) {\n const currentVelocity = secondsToMilliseconds(\n resolveVelocity(t)\n )\n state.done =\n Math.abs(currentVelocity) <= restSpeed! &&\n Math.abs(target - current) <= restDelta!\n } else {\n state.done = t >= duration!\n }\n\n state.value = state.done ? target : current\n\n return state\n },\n toString: () => {\n const calculatedDuration = Math.min(\n calcGeneratorDuration(generator),\n maxGeneratorDuration\n )\n\n const easing = generateLinearEasing(\n (progress: number) =>\n generator.next(calculatedDuration * progress).value,\n calculatedDuration,\n 30\n )\n\n return calculatedDuration + \"ms \" + easing\n },\n toTransition: () => {},\n }\n\n return generator\n}\n\nspring.applyToOptions = (options: Transition) => {\n const generatorOptions = createGeneratorEasing(options as any, 100, spring)\n\n options.ease = generatorOptions.ease\n options.duration = secondsToMilliseconds(generatorOptions.duration)\n options.type = \"keyframes\"\n return options\n}\n\nexport { spring }\n"],"names":[],"mappings":";;;;;AAoBA,MAAM,cAAc,GAAG;;AAEnB,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,QAAQ,EAAE,GAAG;;IAGb,QAAQ,EAAE,GAAG;AACb,IAAA,MAAM,EAAE,GAAG;IACX,cAAc,EAAE,GAAG;;AAGnB,IAAA,SAAS,EAAE;AACP,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,OAAO,EAAE,CAAC;AACb,KAAA;AACD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C,IAAI,GAAG,CAAC,IAAI,QAAS;YAC/B;AAEA,YAAA,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,GAAG,MAAM,GAAG,OAAO;AAE3C,YAAA,OAAO,KAAK;QAChB,CAAC;QACD,QAAQ,EAAE,MAAK;AACX,YAAA,MAAM,kBAAkB,GAAG,IAAI,CAAC,GAAG,CAC/B,qBAAqB,CAAC,SAAS,CAAC,EAChC,oBAAoB,CACvB;YAED,MAAM,MAAM,GAAG,oBAAoB,CAC/B,CAAC,QAAgB,KACb,SAAS,CAAC,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC,CAAC,KAAK,EACvD,kBAAkB,EAClB,EAAE,CACL;AAED,YAAA,OAAO,kBAAkB,GAAG,KAAK,GAAG,MAAM;QAC9C,CAAC;AACD,QAAA,YAAY,EAAE,MAAK,EAAE,CAAC;KACzB;AAED,IAAA,OAAO,SAAS;AACpB;AAEA,MAAM,CAAC,cAAc,GAAG,CAAC,OAAmB,KAAI;IAC5C,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,OAAc,EAAE,GAAG,EAAE,MAAM,CAAC;AAE3E,IAAA,OAAO,CAAC,IAAI,GAAG,gBAAgB,CAAC,IAAI;IACpC,OAAO,CAAC,QAAQ,GAAG,qBAAqB,CAAC,gBAAgB,CAAC,QAAQ,CAAC;AACnE,IAAA,OAAO,CAAC,IAAI,GAAG,WAAW;AAC1B,IAAA,OAAO,OAAO;AAClB,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs deleted file mode 100644 index 03d80777..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Implement a practical max duration for keyframe generation - * to prevent infinite loops - */ -const maxGeneratorDuration = 20000; -function calcGeneratorDuration(generator) { - let duration = 0; - const timeStep = 50; - let state = generator.next(duration); - while (!state.done && duration < maxGeneratorDuration) { - duration += timeStep; - state = generator.next(duration); - } - return duration >= maxGeneratorDuration ? Infinity : duration; -} - -export { calcGeneratorDuration, maxGeneratorDuration }; -//# sourceMappingURL=calc-duration.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.map deleted file mode 100644 index b2c3d505..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"calc-duration.mjs","sources":["../../../../../src/animation/generators/utils/calc-duration.ts"],"sourcesContent":["import { KeyframeGenerator } from \"../../types\"\n\n/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nexport const maxGeneratorDuration = 20_000\nexport function calcGeneratorDuration(\n generator: KeyframeGenerator\n): number {\n let duration = 0\n const timeStep = 50\n let state = generator.next(duration)\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep\n state = generator.next(duration)\n }\n\n return duration >= maxGeneratorDuration ? Infinity : duration\n}\n"],"names":[],"mappings":"AAEA;;;AAGG;AACI,MAAM,oBAAoB,GAAG;AAC9B,SAAU,qBAAqB,CACjC,SAAqC,EAAA;IAErC,IAAI,QAAQ,GAAG,CAAC;IAChB,MAAM,QAAQ,GAAG,EAAE;IACnB,IAAI,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;IACpC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,QAAQ,GAAG,oBAAoB,EAAE;QACnD,QAAQ,IAAI,QAAQ;AACpB,QAAA,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;IACpC;IAEA,OAAO,QAAQ,IAAI,oBAAoB,GAAG,QAAQ,GAAG,QAAQ;AACjE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs deleted file mode 100644 index 7609efed..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +++ /dev/null @@ -1,20 +0,0 @@ -import { millisecondsToSeconds } from 'motion-utils'; -import { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs'; - -/** - * Create a progress => progress easing function from a generator. - */ -function createGeneratorEasing(options, scale = 100, createGenerator) { - const generator = createGenerator({ ...options, keyframes: [0, scale] }); - const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration); - return { - type: "keyframes", - ease: (progress) => { - return generator.next(duration * progress).value / scale; - }, - duration: millisecondsToSeconds(duration), - }; -} - -export { createGeneratorEasing }; -//# sourceMappingURL=create-generator-easing.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.map deleted file mode 100644 index 86fbc803..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create-generator-easing.mjs","sources":["../../../../../src/animation/generators/utils/create-generator-easing.ts"],"sourcesContent":["import { millisecondsToSeconds } from \"motion-utils\"\nimport { GeneratorFactory, Transition } from \"../../types\"\nimport { calcGeneratorDuration, maxGeneratorDuration } from \"./calc-duration\"\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nexport function createGeneratorEasing(\n options: Transition,\n scale = 100,\n createGenerator: GeneratorFactory\n) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] })\n const duration = Math.min(\n calcGeneratorDuration(generator),\n maxGeneratorDuration\n )\n\n return {\n type: \"keyframes\",\n ease: (progress: number) => {\n return generator.next(duration * progress).value / scale\n },\n duration: millisecondsToSeconds(duration),\n }\n}\n"],"names":[],"mappings":";;;AAIA;;AAEG;AACG,SAAU,qBAAqB,CACjC,OAAmB,EACnB,KAAK,GAAG,GAAG,EACX,eAAiC,EAAA;AAEjC,IAAA,MAAM,SAAS,GAAG,eAAe,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;AACxE,IAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CACrB,qBAAqB,CAAC,SAAS,CAAC,EAChC,oBAAoB,CACvB;IAED,OAAO;AACH,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,IAAI,EAAE,CAAC,QAAgB,KAAI;AACvB,YAAA,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,KAAK;QAC5D,CAAC;AACD,QAAA,QAAQ,EAAE,qBAAqB,CAAC,QAAQ,CAAC;KAC5C;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs deleted file mode 100644 index e240fd24..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +++ /dev/null @@ -1,6 +0,0 @@ -function isGenerator(type) { - return typeof type === "function" && "applyToOptions" in type; -} - -export { isGenerator }; -//# sourceMappingURL=is-generator.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs.map deleted file mode 100644 index e54cc1cc..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-generator.mjs","sources":["../../../../../src/animation/generators/utils/is-generator.ts"],"sourcesContent":["import { AnimationGeneratorType, GeneratorFactory } from \"../../types\"\n\nexport function isGenerator(\n type?: AnimationGeneratorType\n): type is GeneratorFactory {\n return typeof type === \"function\" && \"applyToOptions\" in type\n}\n"],"names":[],"mappings":"AAEM,SAAU,WAAW,CACvB,IAA6B,EAAA;IAE7B,OAAO,OAAO,IAAI,KAAK,UAAU,IAAI,gBAAgB,IAAI,IAAI;AACjE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs deleted file mode 100644 index d697ac0b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { velocityPerSecond } from 'motion-utils'; - -const velocitySampleDuration = 5; // ms -function getGeneratorVelocity(resolveValue, t, current) { - const prevT = Math.max(t - velocitySampleDuration, 0); - return velocityPerSecond(current - resolveValue(prevT), t - prevT); -} - -export { getGeneratorVelocity }; -//# sourceMappingURL=velocity.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.map deleted file mode 100644 index 2800cf13..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"velocity.mjs","sources":["../../../../../src/animation/generators/utils/velocity.ts"],"sourcesContent":["import { velocityPerSecond } from \"motion-utils\"\n\nconst velocitySampleDuration = 5 // ms\n\nexport function getGeneratorVelocity(\n resolveValue: (v: number) => number,\n t: number,\n current: number\n) {\n const prevT = Math.max(t - velocitySampleDuration, 0)\n return velocityPerSecond(current - resolveValue(prevT), t - prevT)\n}\n"],"names":[],"mappings":";;AAEA,MAAM,sBAAsB,GAAG,CAAC,CAAA;SAEhB,oBAAoB,CAChC,YAAmC,EACnC,CAAS,EACT,OAAe,EAAA;AAEf,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,sBAAsB,EAAE,CAAC,CAAC;AACrD,IAAA,OAAO,iBAAiB,CAAC,OAAO,GAAG,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;AACtE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs deleted file mode 100644 index 36cc86be..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs +++ /dev/null @@ -1,105 +0,0 @@ -import { secondsToMilliseconds, MotionGlobalConfig } from 'motion-utils'; -import { AsyncMotionValueAnimation } from '../AsyncMotionValueAnimation.mjs'; -import { JSAnimation } from '../JSAnimation.mjs'; -import { getValueTransition } from '../utils/get-value-transition.mjs'; -import { makeAnimationInstant } from '../utils/make-animation-instant.mjs'; -import { getDefaultTransition } from '../utils/default-transitions.mjs'; -import { getFinalKeyframe } from '../keyframes/get-final.mjs'; -import { isTransitionDefined } from '../utils/is-transition-defined.mjs'; -import { frame } from '../../frameloop/frame.mjs'; - -const animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => { - const valueTransition = getValueTransition(transition, name) || {}; - /** - * Most transition values are currently completely overwritten by value-specific - * transitions. In the future it'd be nicer to blend these transitions. But for now - * delay actually does inherit from the root transition if not value-specific. - */ - const delay = valueTransition.delay || transition.delay || 0; - /** - * Elapsed isn't a public transition option but can be passed through from - * optimized appear effects in milliseconds. - */ - let { elapsed = 0 } = transition; - elapsed = elapsed - secondsToMilliseconds(delay); - const options = { - keyframes: Array.isArray(target) ? target : [null, target], - ease: "easeOut", - velocity: value.getVelocity(), - ...valueTransition, - delay: -elapsed, - onUpdate: (v) => { - value.set(v); - valueTransition.onUpdate && valueTransition.onUpdate(v); - }, - onComplete: () => { - onComplete(); - valueTransition.onComplete && valueTransition.onComplete(); - }, - name, - motionValue: value, - element: isHandoff ? undefined : element, - }; - /** - * If there's no transition defined for this value, we can generate - * unique transition settings for this value. - */ - if (!isTransitionDefined(valueTransition)) { - Object.assign(options, getDefaultTransition(name, options)); - } - /** - * Both WAAPI and our internal animation functions use durations - * as defined by milliseconds, while our external API defines them - * as seconds. - */ - options.duration && (options.duration = secondsToMilliseconds(options.duration)); - options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay)); - /** - * Support deprecated way to set initial value. Prefer keyframe syntax. - */ - if (options.from !== undefined) { - options.keyframes[0] = options.from; - } - let shouldSkip = false; - if (options.type === false || - (options.duration === 0 && !options.repeatDelay)) { - makeAnimationInstant(options); - if (options.delay === 0) { - shouldSkip = true; - } - } - if (MotionGlobalConfig.instantAnimations || - MotionGlobalConfig.skipAnimations || - element?.shouldSkipAnimations || - valueTransition.skipAnimations) { - shouldSkip = true; - makeAnimationInstant(options); - options.delay = 0; - } - /** - * If the transition type or easing has been explicitly set by the user - * then we don't want to allow flattening the animation. - */ - options.allowFlatten = !valueTransition.type && !valueTransition.ease; - /** - * If we can or must skip creating the animation, and apply only - * the final keyframe, do so. We also check once keyframes are resolved but - * this early check prevents the need to create an animation at all. - */ - if (shouldSkip && !isHandoff && value.get() !== undefined) { - const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition); - if (finalKeyframe !== undefined) { - frame.update(() => { - options.onUpdate(finalKeyframe); - options.onComplete(); - }); - return; - } - } - return valueTransition.isSync - ? new JSAnimation(options) - : new AsyncMotionValueAnimation(options); -}; - -export { animateMotionValue }; -//# sourceMappingURL=motion-value.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.map deleted file mode 100644 index 97a7cacd..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"motion-value.mjs","sources":["../../../../src/animation/interfaces/motion-value.ts"],"sourcesContent":["import { MotionGlobalConfig, secondsToMilliseconds } from \"motion-utils\"\nimport { AsyncMotionValueAnimation } from \"../AsyncMotionValueAnimation\"\nimport { JSAnimation } from \"../JSAnimation\"\nimport type {\n AnyResolvedKeyframe,\n ValueAnimationOptions,\n ValueTransition,\n} from \"../types\"\nimport type { UnresolvedKeyframes } from \"../keyframes/KeyframesResolver\"\nimport { getValueTransition } from \"../utils/get-value-transition\"\nimport { makeAnimationInstant } from \"../utils/make-animation-instant\"\nimport { getDefaultTransition } from \"../utils/default-transitions\"\nimport { getFinalKeyframe } from \"../keyframes/get-final\"\nimport { isTransitionDefined } from \"../utils/is-transition-defined\"\nimport { frame } from \"../../frameloop\"\nimport type { MotionValue, StartAnimation } from \"../../value\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\nexport const animateMotionValue =\n (\n name: string,\n value: MotionValue,\n target: V | UnresolvedKeyframes,\n transition: ValueTransition & { elapsed?: number } = {},\n element?: VisualElement,\n isHandoff?: boolean\n ): StartAnimation =>\n (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {}\n\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0\n\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition\n elapsed = elapsed - secondsToMilliseconds(delay)\n\n const options: ValueAnimationOptions = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v)\n valueTransition.onUpdate && valueTransition.onUpdate(v)\n },\n onComplete: () => {\n onComplete()\n valueTransition.onComplete && valueTransition.onComplete()\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n }\n\n /**\n * If there's no transition defined for this value, we can generate\n * unique transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n Object.assign(options, getDefaultTransition(name, options))\n }\n\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n options.duration &&= secondsToMilliseconds(options.duration)\n options.repeatDelay &&= secondsToMilliseconds(options.repeatDelay)\n\n /**\n * Support deprecated way to set initial value. Prefer keyframe syntax.\n */\n if (options.from !== undefined) {\n options.keyframes[0] = options.from as any\n }\n\n let shouldSkip = false\n\n if (\n (options as any).type === false ||\n (options.duration === 0 && !options.repeatDelay)\n ) {\n makeAnimationInstant(options)\n\n if (options.delay === 0) {\n shouldSkip = true\n }\n }\n\n if (\n MotionGlobalConfig.instantAnimations ||\n MotionGlobalConfig.skipAnimations ||\n element?.shouldSkipAnimations ||\n valueTransition.skipAnimations\n ) {\n shouldSkip = true\n makeAnimationInstant(options)\n options.delay = 0\n }\n\n /**\n * If the transition type or easing has been explicitly set by the user\n * then we don't want to allow flattening the animation.\n */\n options.allowFlatten = !valueTransition.type && !valueTransition.ease\n\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(\n options.keyframes as V[],\n valueTransition\n )\n\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate!(finalKeyframe)\n options.onComplete!()\n })\n\n return\n }\n }\n\n return valueTransition.isSync\n ? new JSAnimation(options)\n : new AsyncMotionValueAnimation(options)\n }\n"],"names":[],"mappings":";;;;;;;;;;MAkBa,kBAAkB,GAC3B,CACI,IAAY,EACZ,KAAqB,EACrB,MAAkC,EAClC,aAAqD,EAAE,EACvD,OAA4B,EAC5B,SAAmB,KAEvB,CAAC,UAAU,KAAI;IACX,MAAM,eAAe,GAAG,kBAAkB,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE;AAElE;;;;AAIG;IACH,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,IAAI,CAAC;AAE5D;;;AAGG;AACH,IAAA,IAAI,EAAE,OAAO,GAAG,CAAC,EAAE,GAAG,UAAU;AAChC,IAAA,OAAO,GAAG,OAAO,GAAG,qBAAqB,CAAC,KAAK,CAAC;AAEhD,IAAA,MAAM,OAAO,GAA0B;AACnC,QAAA,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC;AAC1D,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,QAAQ,EAAE,KAAK,CAAC,WAAW,EAAE;AAC7B,QAAA,GAAG,eAAe;QAClB,KAAK,EAAE,CAAC,OAAO;AACf,QAAA,QAAQ,EAAE,CAAC,CAAC,KAAI;AACZ,YAAA,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;YACZ,eAAe,CAAC,QAAQ,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3D,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C;AAC7B,QAAA,OAAO,CAAC,KAAK,GAAG,CAAC;IACrB;AAEA;;;AAGG;AACH,IAAA,OAAO,CAAC,YAAY,GAAG,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI;AAErE;;;;AAIG;AACH,IAAA,IAAI,UAAU,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,GAAG,EAAE,KAAK,SAAS,EAAE;QACvD,MAAM,aAAa,GAAG,gBAAgB,CAClC,OAAO,CAAC,SAAgB,EACxB,eAAe,CAClB;AAED,QAAA,IAAI,aAAa,KAAK,SAAS,EAAE;AAC7B,YAAA,KAAK,CAAC,MAAM,CAAC,MAAK;AACd,gBAAA,OAAO,CAAC,QAAS,CAAC,aAAa,CAAC;gBAChC,OAAO,CAAC,UAAW,EAAE;AACzB,YAAA,CAAC,CAAC;YAEF;QACJ;IACJ;IAEA,OAAO,eAAe,CAAC;AACnB,UAAE,IAAI,WAAW,CAAC,OAAO;AACzB,UAAE,IAAI,yBAAyB,CAAC,OAAO,CAAC;AAChD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs deleted file mode 100644 index 836bb0ca..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs +++ /dev/null @@ -1,108 +0,0 @@ -import { getValueTransition } from '../utils/get-value-transition.mjs'; -import { resolveTransition } from '../utils/resolve-transition.mjs'; -import { positionalKeys } from '../../render/utils/keys-position.mjs'; -import { setTarget } from '../../render/utils/setters.mjs'; -import { addValueToWillChange } from '../../value/will-change/add-will-change.mjs'; -import { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs'; -import { animateMotionValue } from './motion-value.mjs'; -import { frame } from '../../frameloop/frame.mjs'; - -/** - * Decide whether we should block this animation. Previously, we achieved this - * just by checking whether the key was listed in protectedKeys, but this - * posed problems if an animation was triggered by afterChildren and protectedKeys - * had been set to true in the meantime. - */ -function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) { - const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true; - needsAnimating[key] = false; - return shouldBlock; -} -function animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) { - let { transition, transitionEnd, ...target } = targetAndTransition; - const defaultTransition = visualElement.getDefaultTransition(); - transition = transition - ? resolveTransition(transition, defaultTransition) - : defaultTransition; - const reduceMotion = transition?.reduceMotion; - const skipAnimations = transition?.skipAnimations; - if (transitionOverride) - transition = transitionOverride; - const animations = []; - const animationTypeState = type && - visualElement.animationState && - visualElement.animationState.getState()[type]; - const path = transition?.path; - if (path) { - // path mutates `target` to claim x/y; loop below skips them. - path.animateVisualElement(visualElement, target, transition, delay, animations); - } - for (const key in target) { - const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null); - const valueTarget = target[key]; - if (valueTarget === undefined || - (animationTypeState && - shouldBlockAnimation(animationTypeState, key))) { - continue; - } - const valueTransition = { - delay, - ...getValueTransition(transition || {}, key), - }; - if (skipAnimations) - valueTransition.skipAnimations = true; - /** - * If the value is already at the defined target, skip the animation. - * We still re-assert the value via frame.update to take precedence - * over any stale transitionEnd callbacks from previous animations. - */ - const currentValue = value.get(); - if (currentValue !== undefined && - !value.isAnimating() && - !Array.isArray(valueTarget) && - valueTarget === currentValue && - !valueTransition.velocity) { - frame.update(() => value.set(valueTarget)); - continue; - } - /** - * If this is the first time a value is being animated, check - * to see if we're handling off from an existing animation. - */ - let isHandoff = false; - if (window.MotionHandoffAnimation) { - const appearId = getOptimisedAppearId(visualElement); - if (appearId) { - const startTime = window.MotionHandoffAnimation(appearId, key, frame); - if (startTime !== null) { - valueTransition.startTime = startTime; - isHandoff = true; - } - } - } - addValueToWillChange(visualElement, key); - const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion; - value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key) - ? { type: false } - : valueTransition, visualElement, isHandoff)); - const animation = value.animation; - if (animation) { - animations.push(animation); - } - } - if (transitionEnd) { - const applyTransitionEnd = () => frame.update(() => { - transitionEnd && setTarget(visualElement, transitionEnd); - }); - if (animations.length) { - Promise.all(animations).then(applyTransitionEnd); - } - else { - applyTransitionEnd(); - } - } - return animations; -} - -export { animateTarget }; -//# sourceMappingURL=visual-element-target.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.map deleted file mode 100644 index eb87d599..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"visual-element-target.mjs","sources":["../../../../src/animation/interfaces/visual-element-target.ts"],"sourcesContent":["import { frame } from \"../../frameloop\"\nimport { getValueTransition } from \"../utils/get-value-transition\"\nimport { resolveTransition } from \"../utils/resolve-transition\"\nimport { positionalKeys } from \"../../render/utils/keys-position\"\nimport { setTarget } from \"../../render/utils/setters\"\nimport { addValueToWillChange } from \"../../value/will-change/add-will-change\"\nimport { getOptimisedAppearId } from \"../optimized-appear/get-appear-id\"\nimport { animateMotionValue } from \"./motion-value\"\nimport type { MotionPath } from \"../types\"\nimport type { VisualElementAnimationOptions } from \"./types\"\nimport type { AnimationPlaybackControlsWithThen } from \"../types\"\nimport type { TargetAndTransition } from \"../../node/types\"\nimport type { AnimationTypeState } from \"../../render/utils/animation-state\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation(\n { protectedKeys, needsAnimating }: AnimationTypeState,\n key: string\n) {\n const shouldBlock =\n protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true\n\n needsAnimating[key] = false\n return shouldBlock\n}\n\nexport function animateTarget(\n visualElement: VisualElement,\n targetAndTransition: TargetAndTransition,\n { delay = 0, transitionOverride, type }: VisualElementAnimationOptions = {}\n): AnimationPlaybackControlsWithThen[] {\n let {\n transition,\n transitionEnd,\n ...target\n } = targetAndTransition\n\n const defaultTransition = visualElement.getDefaultTransition()\n transition = transition\n ? resolveTransition(transition, defaultTransition)\n : defaultTransition\n\n const reduceMotion = (transition as { reduceMotion?: boolean })?.reduceMotion\n const skipAnimations = transition?.skipAnimations\n\n if (transitionOverride) transition = transitionOverride\n\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n const animationTypeState =\n type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type]\n\n const path = (transition as { path?: MotionPath } | undefined)?.path\n if (path) {\n // path mutates `target` to claim x/y; loop below skips them.\n path.animateVisualElement(\n visualElement,\n target,\n transition,\n delay,\n animations\n )\n }\n\n for (const key in target) {\n const value = visualElement.getValue(\n key,\n visualElement.latestValues[key] ?? null\n )\n const valueTarget = target[key as keyof typeof target]\n\n if (\n valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))\n ) {\n continue\n }\n\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n }\n\n if (skipAnimations) valueTransition.skipAnimations = true\n\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const currentValue = value.get()\n if (\n currentValue !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity\n ) {\n frame.update(() => value.set(valueTarget as any))\n continue\n }\n\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement)\n\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(\n appearId,\n key,\n frame\n )\n\n if (startTime !== null) {\n valueTransition.startTime = startTime\n isHandoff = true\n }\n }\n }\n\n addValueToWillChange(visualElement, key)\n\n const shouldReduceMotion =\n reduceMotion ?? visualElement.shouldReduceMotion\n\n value.start(\n animateMotionValue(\n key,\n value,\n valueTarget,\n shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition,\n visualElement,\n isHandoff\n )\n )\n\n const animation = value.animation\n\n if (animation) {\n animations.push(animation)\n }\n }\n\n if (transitionEnd) {\n const applyTransitionEnd = () =>\n frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd)\n })\n\n if (animations.length) {\n Promise.all(animations).then(applyTransitionEnd)\n } else {\n applyTransitionEnd()\n }\n }\n\n return animations\n}\n"],"names":[],"mappings":";;;;;;;;;AAeA;;;;;AAKG;AACH,SAAS,oBAAoB,CACzB,EAAE,aAAa,EAAE,cAAc,EAAsB,EACrD,GAAW,EAAA;AAEX,IAAA,MAAM,WAAW,GACb,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,IAAI;AAErE,IAAA,cAAc,CAAC,GAAG,CAAC,GAAG,KAAK;AAC3B,IAAA,OAAO,WAAW;AACtB;SAEgB,aAAa,CACzB,aAA4B,EAC5B,mBAAwC,EACxC,EAAE,KAAK,GAAG,CAAC,EAAE,kBAAkB,EAAE,IAAI,KAAoC,EAAE,EAAA;IAE3E,IAAI,EACA,UAAU,EACV,aAAa,EACb,GAAG,MAAM,EACZ,GAAG,mBAAmB;AAEvB,IAAA,MAAM,iBAAiB,GAAG,aAAa,CAAC,oBAAoB,EAAE;AAC9D,IAAA,UAAU,GAAG;AACT,UAAE,iBAAiB,CAAC,UAAU,EAAE,iBAAiB;UAC/C,iBAAiB;AAEvB,IAAA,MAAM,YAAY,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C,IAAI,CAAC,kBAAkB,CAAC;QACpD;aAAO;AACH,YAAA,kBAAkB,EAAE;QACxB;IACJ;AAEA,IAAA,OAAO,UAAU;AACrB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs deleted file mode 100644 index 65af3724..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs +++ /dev/null @@ -1,60 +0,0 @@ -import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs'; -import { calcChildStagger } from '../utils/calc-child-stagger.mjs'; -import { animateTarget } from './visual-element-target.mjs'; - -function animateVariant(visualElement, variant, options = {}) { - const resolved = resolveVariant(visualElement, variant, options.type === "exit" - ? visualElement.presenceContext?.custom - : undefined); - let { transition = visualElement.getDefaultTransition() || {} } = resolved || {}; - if (options.transitionOverride) { - transition = options.transitionOverride; - } - /** - * If we have a variant, create a callback that runs it as an animation. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - const getAnimation = resolved - ? () => Promise.all(animateTarget(visualElement, resolved, options)) - : () => Promise.resolve(); - /** - * If we have children, create a callback that runs all their animations. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size - ? (forwardDelay = 0) => { - const { delayChildren = 0, staggerChildren, staggerDirection, } = transition; - return animateChildren(visualElement, variant, forwardDelay, delayChildren, staggerChildren, staggerDirection, options); - } - : () => Promise.resolve(); - /** - * If the transition explicitly defines a "when" option, we need to resolve either - * this animation or all children animations before playing the other. - */ - const { when } = transition; - if (when) { - const [first, last] = when === "beforeChildren" - ? [getAnimation, getChildAnimations] - : [getChildAnimations, getAnimation]; - return first().then(() => last()); - } - else { - return Promise.all([getAnimation(), getChildAnimations(options.delay)]); - } -} -function animateChildren(visualElement, variant, delay = 0, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) { - const animations = []; - for (const child of visualElement.variantChildren) { - child.notify("AnimationStart", variant); - animations.push(animateVariant(child, variant, { - ...options, - delay: delay + - (typeof delayChildren === "function" ? 0 : delayChildren) + - calcChildStagger(visualElement.variantChildren, child, delayChildren, staggerChildren, staggerDirection), - }).then(() => child.notify("AnimationComplete", variant))); - } - return Promise.all(animations); -} - -export { animateVariant }; -//# sourceMappingURL=visual-element-variant.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.map deleted file mode 100644 index 76b006ca..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"visual-element-variant.mjs","sources":["../../../../src/animation/interfaces/visual-element-variant.ts"],"sourcesContent":["import { resolveVariant } from \"../../render/utils/resolve-dynamic-variants\"\nimport { calcChildStagger } from \"../utils/calc-child-stagger\"\nimport type { VisualElementAnimationOptions } from \"./types\"\nimport { animateTarget } from \"./visual-element-target\"\nimport type { DynamicOption } from \"../types\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\nexport function animateVariant(\n visualElement: VisualElement,\n variant: string,\n options: VisualElementAnimationOptions = {}\n): Promise {\n const resolved = resolveVariant(\n visualElement,\n variant,\n options.type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined\n )\n\n let { transition = visualElement.getDefaultTransition() || {} } =\n resolved || {}\n\n if (options.transitionOverride) {\n transition = options.transitionOverride\n }\n\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation: () => Promise = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve()\n\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations =\n visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const {\n delayChildren = 0,\n staggerChildren,\n staggerDirection,\n } = transition\n\n return animateChildren(\n visualElement,\n variant,\n forwardDelay,\n delayChildren,\n staggerChildren,\n staggerDirection,\n options\n )\n }\n : () => Promise.resolve()\n\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition\n if (when) {\n const [first, last] =\n when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation]\n\n return first().then(() => last())\n } else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)])\n }\n}\n\nfunction animateChildren(\n visualElement: VisualElement,\n variant: string,\n delay: number = 0,\n delayChildren: number | DynamicOption = 0,\n staggerChildren = 0,\n staggerDirection = 1,\n options: VisualElementAnimationOptions\n) {\n const animations: Promise[] = []\n\n for (const child of visualElement.variantChildren!) {\n child.notify(\"AnimationStart\", variant)\n animations.push(\n animateVariant(child, variant, {\n ...options,\n delay:\n delay +\n (typeof delayChildren === \"function\" ? 0 : delayChildren) +\n calcChildStagger(\n visualElement.variantChildren!,\n child,\n delayChildren,\n staggerChildren,\n staggerDirection\n ),\n }).then(() => child.notify(\"AnimationComplete\", variant))\n )\n }\n\n return Promise.all(animations)\n}\n"],"names":[],"mappings":";;;;AAOM,SAAU,cAAc,CAC1B,aAA4B,EAC5B,OAAe,EACf,UAAyC,EAAE,EAAA;AAE3C,IAAA,MAAM,QAAQ,GAAG,cAAc,CAC3B,aAAa,EACb,OAAO,EACP,OAAO,CAAC,IAAI,KAAK;AACb,UAAE,aAAa,CAAC,eAAe,EAAE;UAC/B,SAAS,CAClB;AAED,IAAA,IAAI,EAAE,UAAU,GAAG,aAAa,CAAC,oBAAoB,EAAE,IAAI,EAAE,EAA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,EACpB,OAAsC,EAAA;IAEtC,MAAM,UAAU,GAAmB,EAAE;AAErC,IAAA,KAAK,MAAM,KAAK,IAAI,aAAa,CAAC,eAAgB,EAAE;AAChD,QAAA,KAAK,CAAC,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC;QACvC,UAAU,CAAC,IAAI,CACX,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE;AAC3B,YAAA,GAAG,OAAO;AACV,YAAA,KAAK,EACD,KAAK;AACL,iBAAC,OAAO,aAAa,KAAK,UAAU,GAAG,CAAC,GAAG,aAAa,CAAC;AACzD,gBAAA,gBAAgB,CACZ,aAAa,CAAC,eAAgB,EAC9B,KAAK,EACL,aAAa,EACb,eAAe,EACf,gBAAgB,CACnB;AACR,SAAA,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,CAC5D;IACL;AAEA,IAAA,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;AAClC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs deleted file mode 100644 index ecf983b4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs +++ /dev/null @@ -1,27 +0,0 @@ -import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs'; -import { animateTarget } from './visual-element-target.mjs'; -import { animateVariant } from './visual-element-variant.mjs'; - -function animateVisualElement(visualElement, definition, options = {}) { - visualElement.notify("AnimationStart", definition); - let animation; - if (Array.isArray(definition)) { - const animations = definition.map((variant) => animateVariant(visualElement, variant, options)); - animation = Promise.all(animations); - } - else if (typeof definition === "string") { - animation = animateVariant(visualElement, definition, options); - } - else { - const resolvedDefinition = typeof definition === "function" - ? resolveVariant(visualElement, definition, options.custom) - : definition; - animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options)); - } - return animation.then(() => { - visualElement.notify("AnimationComplete", definition); - }); -} - -export { animateVisualElement }; -//# sourceMappingURL=visual-element.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.map deleted file mode 100644 index 487dabbb..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"visual-element.mjs","sources":["../../../../src/animation/interfaces/visual-element.ts"],"sourcesContent":["import { resolveVariant } from \"../../render/utils/resolve-dynamic-variants\"\nimport type { AnimationDefinition } from \"../../node/types\"\nimport type { VisualElement } from \"../../render/VisualElement\"\nimport type { VisualElementAnimationOptions } from \"./types\"\nimport { animateTarget } from \"./visual-element-target\"\nimport { animateVariant } from \"./visual-element-variant\"\n\nexport function animateVisualElement(\n visualElement: VisualElement,\n definition: AnimationDefinition,\n options: VisualElementAnimationOptions = {}\n) {\n visualElement.notify(\"AnimationStart\", definition)\n let animation: Promise\n\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) =>\n animateVariant(visualElement, variant, options)\n )\n animation = Promise.all(animations)\n } else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options)\n } else {\n const resolvedDefinition =\n typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition\n\n animation = Promise.all(\n animateTarget(visualElement, resolvedDefinition, options)\n )\n }\n\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition)\n })\n}\n"],"names":[],"mappings":";;;;AAOM,SAAU,oBAAoB,CAChC,aAA4B,EAC5B,UAA+B,EAC/B,UAAyC,EAAE,EAAA;AAE3C,IAAA,aAAa,CAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC;AAClD,IAAA,IAAI,SAAuB;AAE3B,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,OAAO,KACtC,cAAc,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,CAClD;AACD,QAAA,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;IACvC;AAAO,SAAA,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QACvC,SAAS,GAAG,cAAc,CAAC,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC;IAClE;SAAO;AACH,QAAA,MAAM,kBAAkB,GACpB,OAAO,UAAU,KAAK;cAChB,cAAc,CAAC,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC,MAAM;cACxD,UAAU;AAEpB,QAAA,SAAS,GAAG,OAAO,CAAC,GAAG,CACnB,aAAa,CAAC,aAAa,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAC5D;IACL;AAEA,IAAA,OAAO,SAAS,CAAC,IAAI,CAAC,MAAK;AACvB,QAAA,aAAa,CAAC,MAAM,CAAC,mBAAmB,EAAE,UAAU,CAAC;AACzD,IAAA,CAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs deleted file mode 100644 index efd2f776..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs +++ /dev/null @@ -1,142 +0,0 @@ -import { positionalKeys } from '../../render/utils/keys-position.mjs'; -import { findDimensionValueType } from '../../value/types/dimensions.mjs'; -import { getVariableValue } from '../utils/css-variables-conversion.mjs'; -import { isCSSVariableToken, containsCSSVariable } from '../utils/is-css-variable.mjs'; -import { KeyframeResolver } from './KeyframesResolver.mjs'; -import { isNone } from './utils/is-none.mjs'; -import { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs'; -import { positionalValues, isNumOrPxType } from './utils/unit-conversion.mjs'; - -class DOMKeyframesResolver extends KeyframeResolver { - constructor(unresolvedKeyframes, onComplete, name, motionValue, element) { - super(unresolvedKeyframes, onComplete, name, motionValue, element, true); - } - readKeyframes() { - const { unresolvedKeyframes, element, name } = this; - if (!element || !element.current) - return; - super.readKeyframes(); - /** - * If any keyframe is a CSS variable, we need to find its value by sampling the element - */ - for (let i = 0; i < unresolvedKeyframes.length; i++) { - let keyframe = unresolvedKeyframes[i]; - if (typeof keyframe === "string") { - keyframe = keyframe.trim(); - if (isCSSVariableToken(keyframe)) { - const resolved = getVariableValue(keyframe, element.current); - if (resolved !== undefined) { - unresolvedKeyframes[i] = resolved; - } - if (i === unresolvedKeyframes.length - 1) { - this.finalKeyframe = keyframe; - } - } - } - } - /** - * Resolve "none" values. We do this potentially twice - once before and once after measuring keyframes. - * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which - * have a far bigger performance impact. - */ - this.resolveNoneKeyframes(); - /** - * Check to see if unit type has changed. If so schedule jobs that will - * temporarily set styles to the destination keyframes. - * Skip if we have more than two keyframes or this isn't a positional value. - * TODO: We can throw if there are multiple keyframes and the value type changes. - */ - if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) { - return; - } - const [origin, target] = unresolvedKeyframes; - const originType = findDimensionValueType(origin); - const targetType = findDimensionValueType(target); - /** - * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other - * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410. - */ - const originHasVar = containsCSSVariable(origin); - const targetHasVar = containsCSSVariable(target); - if (originHasVar !== targetHasVar && positionalValues[name]) { - this.needsMeasurement = true; - return; - } - /** - * Either we don't recognise these value types or we can animate between them. - */ - if (originType === targetType) - return; - /** - * If both values are numbers or pixels, we can animate between them by - * converting them to numbers. - */ - if (isNumOrPxType(originType) && isNumOrPxType(targetType)) { - for (let i = 0; i < unresolvedKeyframes.length; i++) { - const value = unresolvedKeyframes[i]; - if (typeof value === "string") { - unresolvedKeyframes[i] = parseFloat(value); - } - } - } - else if (positionalValues[name]) { - /** - * Else, the only way to resolve this is by measuring the element. - */ - this.needsMeasurement = true; - } - } - resolveNoneKeyframes() { - const { unresolvedKeyframes, name } = this; - const noneKeyframeIndexes = []; - for (let i = 0; i < unresolvedKeyframes.length; i++) { - if (unresolvedKeyframes[i] === null || - isNone(unresolvedKeyframes[i])) { - noneKeyframeIndexes.push(i); - } - } - if (noneKeyframeIndexes.length) { - makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name); - } - } - measureInitialState() { - const { element, unresolvedKeyframes, name } = this; - if (!element || !element.current) - return; - if (name === "height") { - this.suspendedScrollY = window.pageYOffset; - } - this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current)); - unresolvedKeyframes[0] = this.measuredOrigin; - // Set final key frame to measure after next render - const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1]; - if (measureKeyframe !== undefined) { - element.getValue(name, measureKeyframe).jump(measureKeyframe, false); - } - } - measureEndState() { - const { element, name, unresolvedKeyframes } = this; - if (!element || !element.current) - return; - const value = element.getValue(name); - value && value.jump(this.measuredOrigin, false); - const finalKeyframeIndex = unresolvedKeyframes.length - 1; - const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex]; - unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current)); - if (finalKeyframe !== null && this.finalKeyframe === undefined) { - this.finalKeyframe = finalKeyframe; - } - // If we removed transform values, reapply them before the next render - if (this.removedTransforms?.length) { - this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => { - element - .getValue(unsetTransformName) - .set(unsetTransformValue); - }); - } - this.resolveNoneKeyframes(); - } -} - -export { DOMKeyframesResolver }; -//# sourceMappingURL=DOMKeyframesResolver.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.map deleted file mode 100644 index 4d5ea9ee..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DOMKeyframesResolver.mjs","sources":["../../../../src/animation/keyframes/DOMKeyframesResolver.ts"],"sourcesContent":["import { positionalKeys } from \"../../render/utils/keys-position\"\nimport { MotionValue } from \"../../value\"\nimport { findDimensionValueType } from \"../../value/types/dimensions\"\nimport { AnyResolvedKeyframe } from \"../types\"\nimport { getVariableValue } from \"../utils/css-variables-conversion\"\nimport {\n containsCSSVariable,\n isCSSVariableToken,\n} from \"../utils/is-css-variable\"\nimport {\n KeyframeResolver,\n OnKeyframesResolved,\n UnresolvedKeyframes,\n} from \"./KeyframesResolver\"\nimport { WithRender } from \"./types\"\nimport { isNone } from \"./utils/is-none\"\nimport { makeNoneKeyframesAnimatable } from \"./utils/make-none-animatable\"\nimport { isNumOrPxType, positionalValues } from \"./utils/unit-conversion\"\n\nexport class DOMKeyframesResolver<\n T extends AnyResolvedKeyframe\n> extends KeyframeResolver {\n name: string\n element?: WithRender\n\n private removedTransforms?: [string, AnyResolvedKeyframe][]\n private measuredOrigin?: AnyResolvedKeyframe\n\n constructor(\n unresolvedKeyframes: UnresolvedKeyframes,\n onComplete: OnKeyframesResolved,\n name?: string,\n motionValue?: MotionValue,\n element?: WithRender\n ) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true)\n }\n\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this\n\n if (!element || !element.current) return\n\n super.readKeyframes()\n\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i]\n\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim()\n\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current)\n\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved as T\n }\n\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe as T\n }\n }\n }\n }\n\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes()\n\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return\n }\n\n const [origin, target] = unresolvedKeyframes\n const originType = findDimensionValueType(origin)\n const targetType = findDimensionValueType(target)\n\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin)\n const targetHasVar = containsCSSVariable(target)\n\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true\n return\n }\n\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType) return\n\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i]\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value as string)\n }\n }\n } else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true\n }\n }\n\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this\n\n const noneKeyframeIndexes: number[] = []\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (\n unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])\n ) {\n noneKeyframeIndexes.push(i)\n }\n }\n\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(\n unresolvedKeyframes,\n noneKeyframeIndexes,\n name\n )\n }\n }\n\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this\n\n if (!element || !element.current) return\n\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset\n }\n\n this.measuredOrigin = positionalValues[name](\n element.measureViewportBox(),\n window.getComputedStyle(element.current)\n )\n\n unresolvedKeyframes[0] = this.measuredOrigin\n\n // Set final key frame to measure after next render\n const measureKeyframe =\n unresolvedKeyframes[unresolvedKeyframes.length - 1]\n\n if (measureKeyframe !== undefined) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false)\n }\n }\n\n measureEndState() {\n const { element, name, unresolvedKeyframes } = this\n\n if (!element || !element.current) return\n\n const value = element.getValue(name)\n value && value.jump(this.measuredOrigin, false)\n\n const finalKeyframeIndex = unresolvedKeyframes.length - 1\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex]\n\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](\n element.measureViewportBox(),\n window.getComputedStyle(element.current)\n ) as any\n\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe as T\n }\n\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(\n ([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)!\n .set(unsetTransformValue)\n }\n )\n }\n\n this.resolveNoneKeyframes()\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAmBM,MAAO,oBAEX,SAAQ,gBAAmB,CAAA;IAOzB,WAAA,CACI,mBAA6D,EAC7D,UAAkC,EAClC,IAAa,EACb,WAA4B,E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,mBAAmB,CAAC,MAAM,GAAG,CAAC;AACzD,QAAA,MAAM,aAAa,GAAG,mBAAmB,CAAC,kBAAkB,CAAC;QAE7D,mBAAmB,CAAC,kBAAkB,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAC5D,OAAO,CAAC,kBAAkB,EAAE,EAC5B,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CACpC;QAER,IAAI,aAAa,KAAK,IAAI,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE;AAC5D,YAAA,IAAI,CAAC,aAAa,GAAG,aAAkB;QAC3C;;AAGA,QAAA,IAAI,IAAI,CAAC,iBAAiB,EAAE,MAAM,EAAE;AAChC,YAAA,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAC1B,CAAC,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,KAAI;gBAC1C;qBACK,QAAQ,CAAC,kBAAkB;qBAC3B,GAAG,CAAC,mBAAmB,CAAC;AACjC,YAAA,CAAC,CACJ;QACL;QAEA,IAAI,CAAC,oBAAoB,EAAE;IAC/B;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs deleted file mode 100644 index 262a2f3f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs +++ /dev/null @@ -1,148 +0,0 @@ -import { fillWildcards } from './utils/fill-wildcards.mjs'; -import { removeNonTranslationalTransform } from './utils/unit-conversion.mjs'; -import { frame } from '../../frameloop/frame.mjs'; - -const toResolve = new Set(); -let isScheduled = false; -let anyNeedsMeasurement = false; -let isForced = false; -function measureAllKeyframes() { - if (anyNeedsMeasurement) { - const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement); - const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element)); - const transformsToRestore = new Map(); - /** - * Write pass - * If we're measuring elements we want to remove bounding box-changing transforms. - */ - elementsToMeasure.forEach((element) => { - const removedTransforms = removeNonTranslationalTransform(element); - if (!removedTransforms.length) - return; - transformsToRestore.set(element, removedTransforms); - element.render(); - }); - // Read - resolversToMeasure.forEach((resolver) => resolver.measureInitialState()); - // Write - elementsToMeasure.forEach((element) => { - element.render(); - const restore = transformsToRestore.get(element); - if (restore) { - restore.forEach(([key, value]) => { - element.getValue(key)?.set(value); - }); - } - }); - // Read - resolversToMeasure.forEach((resolver) => resolver.measureEndState()); - // Write - resolversToMeasure.forEach((resolver) => { - if (resolver.suspendedScrollY !== undefined) { - window.scrollTo(0, resolver.suspendedScrollY); - } - }); - } - anyNeedsMeasurement = false; - isScheduled = false; - toResolve.forEach((resolver) => resolver.complete(isForced)); - toResolve.clear(); -} -function readAllKeyframes() { - toResolve.forEach((resolver) => { - resolver.readKeyframes(); - if (resolver.needsMeasurement) { - anyNeedsMeasurement = true; - } - }); -} -function flushKeyframeResolvers() { - isForced = true; - readAllKeyframes(); - measureAllKeyframes(); - isForced = false; -} -class KeyframeResolver { - constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) { - this.state = "pending"; - /** - * Track whether this resolver is async. If it is, it'll be added to the - * resolver queue and flushed in the next frame. Resolvers that aren't going - * to trigger read/write thrashing don't need to be async. - */ - this.isAsync = false; - /** - * Track whether this resolver needs to perform a measurement - * to resolve its keyframes. - */ - this.needsMeasurement = false; - this.unresolvedKeyframes = [...unresolvedKeyframes]; - this.onComplete = onComplete; - this.name = name; - this.motionValue = motionValue; - this.element = element; - this.isAsync = isAsync; - } - scheduleResolve() { - this.state = "scheduled"; - if (this.isAsync) { - toResolve.add(this); - if (!isScheduled) { - isScheduled = true; - frame.read(readAllKeyframes); - frame.resolveKeyframes(measureAllKeyframes); - } - } - else { - this.readKeyframes(); - this.complete(); - } - } - readKeyframes() { - const { unresolvedKeyframes, name, element, motionValue } = this; - // If initial keyframe is null we need to read it from the DOM - if (unresolvedKeyframes[0] === null) { - const currentValue = motionValue?.get(); - // TODO: This doesn't work if the final keyframe is a wildcard - const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1]; - if (currentValue !== undefined) { - unresolvedKeyframes[0] = currentValue; - } - else if (element && name) { - const valueAsRead = element.readValue(name, finalKeyframe); - if (valueAsRead !== undefined && valueAsRead !== null) { - unresolvedKeyframes[0] = valueAsRead; - } - } - if (unresolvedKeyframes[0] === undefined) { - unresolvedKeyframes[0] = finalKeyframe; - } - if (motionValue && currentValue === undefined) { - motionValue.set(unresolvedKeyframes[0]); - } - } - fillWildcards(unresolvedKeyframes); - } - setFinalKeyframe() { } - measureInitialState() { } - renderEndStyles() { } - measureEndState() { } - complete(isForcedComplete = false) { - this.state = "complete"; - this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete); - toResolve.delete(this); - } - cancel() { - if (this.state === "scheduled") { - toResolve.delete(this); - this.state = "pending"; - } - } - resume() { - if (this.state === "pending") - this.scheduleResolve(); - } -} - -export { KeyframeResolver, flushKeyframeResolvers }; -//# sourceMappingURL=KeyframesResolver.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.map deleted file mode 100644 index 32e68e2e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"KeyframesResolver.mjs","sources":["../../../../src/animation/keyframes/KeyframesResolver.ts"],"sourcesContent":["import { frame } from \"../../frameloop\"\nimport { MotionValue } from \"../../value\"\nimport { AnyResolvedKeyframe } from \"../types\"\nimport { WithRender } from \"./types\"\nimport { fillWildcards } from \"./utils/fill-wildcards\"\nimport { removeNonTranslationalTransform } from \"./utils/unit-conversion\"\n\nexport type UnresolvedKeyframes = Array\n\nexport type ResolvedKeyframes = Array\n\nconst toResolve = new Set()\nlet isScheduled = false\nlet anyNeedsMeasurement = false\nlet isForced = false\n\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter(\n (resolver: KeyframeResolver) => resolver.needsMeasurement\n )\n const elementsToMeasure = new Set(\n resolversToMeasure.map((resolver) => resolver.element)\n )\n const transformsToRestore = new Map<\n WithRender,\n [string, AnyResolvedKeyframe][]\n >()\n\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach((element: WithRender) => {\n const removedTransforms = removeNonTranslationalTransform(\n element as any\n )\n\n if (!removedTransforms.length) return\n\n transformsToRestore.set(element, removedTransforms)\n\n element.render()\n })\n\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState())\n\n // Write\n elementsToMeasure.forEach((element: WithRender) => {\n element.render()\n\n const restore = transformsToRestore.get(element)\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value)\n })\n }\n })\n\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState())\n\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY)\n }\n })\n }\n\n anyNeedsMeasurement = false\n isScheduled = false\n\n toResolve.forEach((resolver) => resolver.complete(isForced))\n toResolve.clear()\n}\n\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes()\n\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true\n }\n })\n}\n\nexport function flushKeyframeResolvers() {\n isForced = true\n readAllKeyframes()\n measureAllKeyframes()\n isForced = false\n}\n\nexport type OnKeyframesResolved = (\n resolvedKeyframes: ResolvedKeyframes,\n finalKeyframe: T,\n forced: boolean\n) => void\n\nexport class KeyframeResolver {\n name?: string\n element?: WithRender\n finalKeyframe?: T\n suspendedScrollY?: number\n\n protected unresolvedKeyframes: UnresolvedKeyframes\n\n private motionValue?: MotionValue\n private onComplete: OnKeyframesResolved\n\n state: \"pending\" | \"scheduled\" | \"complete\" = \"pending\"\n\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n private isAsync = false\n\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n needsMeasurement = false\n\n constructor(\n unresolvedKeyframes: UnresolvedKeyframes,\n onComplete: OnKeyframesResolved,\n name?: string,\n motionValue?: MotionValue,\n element?: WithRender,\n isAsync = false\n ) {\n this.unresolvedKeyframes = [...unresolvedKeyframes]\n this.onComplete = onComplete\n this.name = name\n this.motionValue = motionValue\n this.element = element\n this.isAsync = isAsync\n }\n\n scheduleResolve() {\n this.state = \"scheduled\"\n\n if (this.isAsync) {\n toResolve.add(this)\n\n if (!isScheduled) {\n isScheduled = true\n frame.read(readAllKeyframes)\n frame.resolveKeyframes(measureAllKeyframes)\n }\n } else {\n this.readKeyframes()\n this.complete()\n }\n }\n\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this\n\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get()\n\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe =\n unresolvedKeyframes[unresolvedKeyframes.length - 1]\n\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue\n } else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe)\n\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead\n }\n }\n\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe\n }\n\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0] as T)\n }\n }\n\n fillWildcards(unresolvedKeyframes)\n }\n\n setFinalKeyframe() {}\n measureInitialState() {}\n renderEndStyles() {}\n measureEndState() {}\n\n complete(isForcedComplete = false) {\n this.state = \"complete\"\n\n this.onComplete(\n this.unresolvedKeyframes as ResolvedKeyframes,\n this.finalKeyframe as T,\n isForcedComplete\n )\n\n toResolve.delete(this)\n }\n\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this)\n this.state = \"pending\"\n }\n }\n\n resume() {\n if (this.state === \"pending\") this.scheduleResolve()\n }\n}\n"],"names":[],"mappings":";;;;AAWA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAoB;AAC7C,IAAI,WAAW,GAAG,KAAK;AACvB,IAAI,mBAAmB,GAAG,KAAK;AAC/B,IAAI,QAAQ,GAAG,KAAK;AAEpB,SAAS,mBAAmB,GAAA;IACxB,IAAI,mBAAmB,EAAE;QACrB,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CACnD,CAAC,QAA0B,KAAK,QAAQ,CAAC,gBAAgB,CAC5D;AACD,QAAA,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC7B,kBAAkB,CAAC,GAAG,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,OAAO,CAAC,CACzD;AACD,QAAA,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAGhC;AAEH;;;AAGG;AACH,QAAA,iBAAiB,CAAC,OAAO,CAAC,CAAC,OAAmB,KAAI;AAC9C,YAAA,MAAM,iBAAiB,GAAG,+BAA+B,CACrD,OAAc,CACjB;YAED,IAAI,CAAC,iBAAiB,CAAC,MAAM;gBAAE;AAE/B,YAAA,mBAAmB,CAAC,GAAG,CAAC,OAAO,EAAE,iBAAiB,CAAC;YAEnD,OAAO,CAAC,MAAM,EAAE;AACpB,QAAA,CAAC,CAAC;;AAGF,QAAA,kBAAkB,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,mBAAmB,EA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F,QAAA,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,eAAe,EAAE;IACxD;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs deleted file mode 100644 index 4306bd86..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs +++ /dev/null @@ -1,12 +0,0 @@ -const isNotNull = (value) => value !== null; -function getFinalKeyframe(keyframes, { repeat, repeatType = "loop" }, finalKeyframe, speed = 1) { - const resolvedKeyframes = keyframes.filter(isNotNull); - const useFirstKeyframe = speed < 0 || (repeat && repeatType !== "loop" && repeat % 2 === 1); - const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1; - return !index || finalKeyframe === undefined - ? resolvedKeyframes[index] - : finalKeyframe; -} - -export { getFinalKeyframe }; -//# sourceMappingURL=get-final.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.map deleted file mode 100644 index e364cbf7..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get-final.mjs","sources":["../../../../src/animation/keyframes/get-final.ts"],"sourcesContent":["import { AnimationPlaybackOptions } from \"../types\"\n\nconst isNotNull = (value: unknown) => value !== null\n\nexport function getFinalKeyframe(\n keyframes: T[],\n { repeat, repeatType = \"loop\" }: AnimationPlaybackOptions,\n finalKeyframe?: T,\n speed: number = 1\n): T {\n const resolvedKeyframes = keyframes.filter(isNotNull)\n const useFirstKeyframe =\n speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1)\n const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1\n\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe\n}\n"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,CAAC,KAAc,KAAK,KAAK,KAAK,IAAI;SAEpC,gBAAgB,CAC5B,SAAc,EACd,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,EAA4B,EACzD,aAAiB,EACjB,QAAgB,CAAC,EAAA;IAEjB,MAAM,iBAAiB,GAAG,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC;AACrD,IAAA,MAAM,gBAAgB,GAClB,KAAK,GAAG,CAAC,KAAK,MAAM,IAAI,UAAU,KAAK,MAAM,IAAI,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC;AACtE,IAAA,MAAM,KAAK,GAAG,gBAAgB,GAAG,CAAC,GAAG,iBAAiB,CAAC,MAAM,GAAG,CAAC;AAEjE,IAAA,OAAO,CAAC,KAAK,IAAI,aAAa,KAAK;AAC/B,UAAE,iBAAiB,CAAC,KAAK;UACvB,aAAa;AACvB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs deleted file mode 100644 index c2735fe9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { fillOffset } from './fill.mjs'; - -function defaultOffset(arr) { - const offset = [0]; - fillOffset(offset, arr.length - 1); - return offset; -} - -export { defaultOffset }; -//# sourceMappingURL=default.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs.map deleted file mode 100644 index 108037c1..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"default.mjs","sources":["../../../../../src/animation/keyframes/offsets/default.ts"],"sourcesContent":["import { fillOffset } from \"./fill\"\n\nexport function defaultOffset(arr: any[]): number[] {\n const offset = [0]\n fillOffset(offset, arr.length - 1)\n return offset\n}\n"],"names":[],"mappings":";;AAEM,SAAU,aAAa,CAAC,GAAU,EAAA;AACpC,IAAA,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC;IAClB,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AAClC,IAAA,OAAO,MAAM;AACjB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs deleted file mode 100644 index 9f1f783d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs +++ /dev/null @@ -1,13 +0,0 @@ -import { progress } from 'motion-utils'; -import { mixNumber } from '../../../utils/mix/number.mjs'; - -function fillOffset(offset, remaining) { - const min = offset[offset.length - 1]; - for (let i = 1; i <= remaining; i++) { - const offsetProgress = progress(0, remaining, i); - offset.push(mixNumber(min, 1, offsetProgress)); - } -} - -export { fillOffset }; -//# sourceMappingURL=fill.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs.map deleted file mode 100644 index 6c2896a7..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fill.mjs","sources":["../../../../../src/animation/keyframes/offsets/fill.ts"],"sourcesContent":["import { progress } from \"motion-utils\"\nimport { mixNumber } from \"../../../utils/mix/number\"\n\nexport function fillOffset(offset: number[], remaining: number): void {\n const min = offset[offset.length - 1]\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i)\n offset.push(mixNumber(min, 1, offsetProgress))\n }\n}\n"],"names":[],"mappings":";;;AAGM,SAAU,UAAU,CAAC,MAAgB,EAAE,SAAiB,EAAA;IAC1D,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AACrC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC,EAAE,EAAE;QACjC,MAAM,cAAc,GAAG,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AAChD,QAAA,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;IAClD;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs deleted file mode 100644 index 9c2a8cfd..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs +++ /dev/null @@ -1,6 +0,0 @@ -function convertOffsetToTimes(offset, duration) { - return offset.map((o) => o * duration); -} - -export { convertOffsetToTimes }; -//# sourceMappingURL=time.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs.map deleted file mode 100644 index f79b799e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"time.mjs","sources":["../../../../../src/animation/keyframes/offsets/time.ts"],"sourcesContent":["export function convertOffsetToTimes(offset: number[], duration: number) {\n return offset.map((o) => o * duration)\n}\n"],"names":[],"mappings":"AAAM,SAAU,oBAAoB,CAAC,MAAgB,EAAE,QAAgB,EAAA;AACnE,IAAA,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;AAC1C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs deleted file mode 100644 index 1f370359..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import { pxValues } from '../../waapi/utils/px-values.mjs'; - -function applyPxDefaults(keyframes, name) { - for (let i = 0; i < keyframes.length; i++) { - if (typeof keyframes[i] === "number" && pxValues.has(name)) { - keyframes[i] = keyframes[i] + "px"; - } - } -} - -export { applyPxDefaults }; -//# sourceMappingURL=apply-px-defaults.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs.map deleted file mode 100644 index b5894c20..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply-px-defaults.mjs","sources":["../../../../../src/animation/keyframes/utils/apply-px-defaults.ts"],"sourcesContent":["import { UnresolvedValueKeyframe, ValueKeyframe } from \"../../types\"\nimport { pxValues } from \"../../waapi/utils/px-values\"\n\nexport function applyPxDefaults(\n keyframes: ValueKeyframe[] | UnresolvedValueKeyframe[],\n name: string\n) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"number\" && pxValues.has(name)) {\n keyframes[i] = keyframes[i] + \"px\"\n }\n }\n}\n"],"names":[],"mappings":";;AAGM,SAAU,eAAe,CAC3B,SAAsD,EACtD,IAAY,EAAA;AAEZ,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACvC,QAAA,IAAI,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACxD,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI;QACtC;IACJ;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs deleted file mode 100644 index 38758530..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs +++ /dev/null @@ -1,8 +0,0 @@ -function fillWildcards(keyframes) { - for (let i = 1; i < keyframes.length; i++) { - keyframes[i] ?? (keyframes[i] = keyframes[i - 1]); - } -} - -export { fillWildcards }; -//# sourceMappingURL=fill-wildcards.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs.map deleted file mode 100644 index 9dd7452f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fill-wildcards.mjs","sources":["../../../../../src/animation/keyframes/utils/fill-wildcards.ts"],"sourcesContent":["import { UnresolvedValueKeyframe, ValueKeyframe } from \"../../types\"\n\nexport function fillWildcards(\n keyframes: ValueKeyframe[] | UnresolvedValueKeyframe[]\n) {\n for (let i = 1; i < keyframes.length; i++) {\n keyframes[i] ??= keyframes[i - 1]\n }\n}\n"],"names":[],"mappings":"AAEM,SAAU,aAAa,CACzB,SAAsD,EAAA;AAEtD,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACvC,QAAA,SAAS,CAAC,CAAC,CAAA,KAAX,SAAS,CAAC,CAAC,CAAA,GAAM,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IACrC;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs deleted file mode 100644 index 70b75395..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import { isZeroValueString } from 'motion-utils'; - -function isNone(value) { - if (typeof value === "number") { - return value === 0; - } - else if (value !== null) { - return value === "none" || value === "0" || isZeroValueString(value); - } - else { - return true; - } -} - -export { isNone }; -//# sourceMappingURL=is-none.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs.map deleted file mode 100644 index bcb4eacf..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-none.mjs","sources":["../../../../../src/animation/keyframes/utils/is-none.ts"],"sourcesContent":["import { isZeroValueString } from \"motion-utils\"\nimport { AnyResolvedKeyframe } from \"../../types\"\n\nexport function isNone(value: AnyResolvedKeyframe | null) {\n if (typeof value === \"number\") {\n return value === 0\n } else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value)\n } else {\n return true\n }\n}\n"],"names":[],"mappings":";;AAGM,SAAU,MAAM,CAAC,KAAiC,EAAA;AACpD,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,OAAO,KAAK,KAAK,CAAC;IACtB;AAAO,SAAA,IAAI,KAAK,KAAK,IAAI,EAAE;AACvB,QAAA,OAAO,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,GAAG,IAAI,iBAAiB,CAAC,KAAK,CAAC;IACxE;SAAO;AACH,QAAA,OAAO,IAAI;IACf;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs deleted file mode 100644 index 878d19f6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs +++ /dev/null @@ -1,31 +0,0 @@ -import { analyseComplexValue } from '../../../value/types/complex/index.mjs'; -import { getAnimatableNone } from '../../../value/types/utils/animatable-none.mjs'; - -/** - * If we encounter keyframes like "none" or "0" and we also have keyframes like - * "#fff" or "200px 200px" we want to find a keyframe to serve as a template for - * the "none" keyframes. In this case "#fff" or "200px 200px" - then these get turned into - * zero equivalents, i.e. "#fff0" or "0px 0px". - */ -const invalidTemplates = new Set(["auto", "none", "0"]); -function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) { - let i = 0; - let animatableTemplate = undefined; - while (i < unresolvedKeyframes.length && !animatableTemplate) { - const keyframe = unresolvedKeyframes[i]; - if (typeof keyframe === "string" && - !invalidTemplates.has(keyframe) && - analyseComplexValue(keyframe).values.length) { - animatableTemplate = unresolvedKeyframes[i]; - } - i++; - } - if (animatableTemplate && name) { - for (const noneIndex of noneKeyframeIndexes) { - unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate); - } - } -} - -export { makeNoneKeyframesAnimatable }; -//# sourceMappingURL=make-none-animatable.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.map deleted file mode 100644 index 44ce2ff6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"make-none-animatable.mjs","sources":["../../../../../src/animation/keyframes/utils/make-none-animatable.ts"],"sourcesContent":["import { analyseComplexValue } from \"../../../value/types/complex\"\nimport { getAnimatableNone } from \"../../../value/types/utils/animatable-none\"\nimport { AnyResolvedKeyframe } from \"../../types\"\nimport { UnresolvedKeyframes } from \"../KeyframesResolver\"\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"])\n\nexport function makeNoneKeyframesAnimatable(\n unresolvedKeyframes: UnresolvedKeyframes,\n noneKeyframeIndexes: number[],\n name?: string\n) {\n let i = 0\n let animatableTemplate: string | undefined = undefined\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i]\n if (\n typeof keyframe === \"string\" &&\n !invalidTemplates.has(keyframe) &&\n analyseComplexValue(keyframe).values.length\n ) {\n animatableTemplate = unresolvedKeyframes[i] as string\n }\n i++\n }\n\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n unresolvedKeyframes[noneIndex] = getAnimatableNone(\n name,\n animatableTemplate\n )\n }\n }\n}\n"],"names":[],"mappings":";;;AAKA;;;;;AAKG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;SAEvC,2BAA2B,CACvC,mBAA6D,EAC7D,mBAA6B,EAC7B,IAAa,EAAA;IAEb,IAAI,CAAC,GAAG,CAAC;IACT,IAAI,kBAAkB,GAAuB,SAAS;IACtD,OAAO,CAAC,GAAG,mBAAmB,CAAC,MAAM,IAAI,CAAC,kBAAkB,EAAE;AAC1D,QAAA,MAAM,QAAQ,GAAG,mBAAmB,CAAC,CAAC,CAAC;QACvC,IACI,OAAO,QAAQ,KAAK,QAAQ;AAC5B,YAAA,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC;YAC/B,mBAAmB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,EAC7C;AACE,YAAA,kBAAkB,GAAG,mBAAmB,CAAC,CAAC,CAAW;QACzD;AACA,QAAA,CAAC,EAAE;IACP;AAEA,IAAA,IAAI,kBAAkB,IAAI,IAAI,EAAE;AAC5B,QAAA,KAAK,MAAM,SAAS,IAAI,mBAAmB,EAAE;YACzC,mBAAmB,CAAC,SAAS,CAAC,GAAG,iBAAiB,CAC9C,IAAI,EACJ,kBAAkB,CACrB;QACL;IACJ;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs deleted file mode 100644 index b76cfc34..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs +++ /dev/null @@ -1,47 +0,0 @@ -import { parseValueFromTransform } from '../../../render/dom/parse-transform.mjs'; -import { transformPropOrder } from '../../../render/utils/keys-transform.mjs'; -import { number } from '../../../value/types/numbers/index.mjs'; -import { px } from '../../../value/types/numbers/units.mjs'; - -const isNumOrPxType = (v) => v === number || v === px; -const transformKeys = new Set(["x", "y", "z"]); -const nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key)); -function removeNonTranslationalTransform(visualElement) { - const removedTransforms = []; - nonTranslationalTransformKeys.forEach((key) => { - const value = visualElement.getValue(key); - if (value !== undefined) { - removedTransforms.push([key, value.get()]); - value.set(key.startsWith("scale") ? 1 : 0); - } - }); - return removedTransforms; -} -const positionalValues = { - // Dimensions - width: ({ x }, { paddingLeft = "0", paddingRight = "0", boxSizing }) => { - const width = x.max - x.min; - return boxSizing === "border-box" - ? width - : width - parseFloat(paddingLeft) - parseFloat(paddingRight); - }, - height: ({ y }, { paddingTop = "0", paddingBottom = "0", boxSizing }) => { - const height = y.max - y.min; - return boxSizing === "border-box" - ? height - : height - parseFloat(paddingTop) - parseFloat(paddingBottom); - }, - top: (_bbox, { top }) => parseFloat(top), - left: (_bbox, { left }) => parseFloat(left), - bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min), - right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min), - // Transform - x: (_bbox, { transform }) => parseValueFromTransform(transform, "x"), - y: (_bbox, { transform }) => parseValueFromTransform(transform, "y"), -}; -// Alias translate longform names -positionalValues.translateX = positionalValues.x; -positionalValues.translateY = positionalValues.y; - -export { isNumOrPxType, positionalValues, removeNonTranslationalTransform }; -//# sourceMappingURL=unit-conversion.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.map deleted file mode 100644 index 361ab898..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"unit-conversion.mjs","sources":["../../../../../src/animation/keyframes/utils/unit-conversion.ts"],"sourcesContent":["import type { Box } from \"motion-utils\"\nimport { parseValueFromTransform } from \"../../../render/dom/parse-transform\"\nimport { transformPropOrder } from \"../../../render/utils/keys-transform\"\nimport { MotionValue } from \"../../../value\"\nimport { number } from \"../../../value/types/numbers\"\nimport { px } from \"../../../value/types/numbers/units\"\nimport { ValueType } from \"../../../value/types/types\"\nimport { AnyResolvedKeyframe } from \"../../types\"\nimport { WithRender } from \"../types\"\n\nexport const isNumOrPxType = (v?: ValueType): v is ValueType =>\n v === number || v === px\n\ntype GetActualMeasurementInPixels = (\n bbox: Box,\n computedStyle: Partial\n) => number\n\nconst transformKeys = new Set([\"x\", \"y\", \"z\"])\nconst nonTranslationalTransformKeys = transformPropOrder.filter(\n (key) => !transformKeys.has(key)\n)\n\ntype RemovedTransforms = [string, AnyResolvedKeyframe][]\nexport function removeNonTranslationalTransform(visualElement: WithRender) {\n const removedTransforms: RemovedTransforms = []\n\n nonTranslationalTransformKeys.forEach((key) => {\n const value: MotionValue | undefined =\n visualElement.getValue(key)\n if (value !== undefined) {\n removedTransforms.push([key, value.get()])\n value.set(key.startsWith(\"scale\") ? 1 : 0)\n }\n })\n\n return removedTransforms\n}\n\nexport const positionalValues: { [key: string]: GetActualMeasurementInPixels } =\n {\n // Dimensions\n width: (\n { x },\n { paddingLeft = \"0\", paddingRight = \"0\", boxSizing }\n ) => {\n const width = x.max - x.min\n return boxSizing === \"border-box\"\n ? width\n : width - parseFloat(paddingLeft) - parseFloat(paddingRight)\n },\n height: (\n { y },\n { paddingTop = \"0\", paddingBottom = \"0\", boxSizing }\n ) => {\n const height = y.max - y.min\n return boxSizing === \"border-box\"\n ? height\n : height - parseFloat(paddingTop) - parseFloat(paddingBottom)\n },\n\n top: (_bbox, { top }) => parseFloat(top as string),\n left: (_bbox, { left }) => parseFloat(left as string),\n bottom: ({ y }, { top }) => parseFloat(top as string) + (y.max - y.min),\n right: ({ x }, { left }) =>\n parseFloat(left as string) + (x.max - x.min),\n\n // Transform\n x: (_bbox, { transform }) => parseValueFromTransform(transform, \"x\"),\n y: (_bbox, { transform }) => parseValueFromTransform(transform, \"y\"),\n }\n\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x\npositionalValues.translateY = positionalValues.y\n"],"names":[],"mappings":";;;;;AAUO,MAAM,aAAa,GAAG,CAAC,CAAa,KACvC,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK;AAO1B,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC9C,MAAM,6BAA6B,GAAG,kBAAkB,CAAC,MAAM,CAC3D,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,CACnC;AAGK,SAAU,+BAA+B,CAAC,aAAyB,EAAA;IACrE,MAAM,iBAAiB,GAAsB,EAAE;AAE/C,IAAA,6BAA6B,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;QAC1C,MAAM,KAAK,GACP,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC;AAC/B,QAAA,IAAI,KAAK,KAAK,SAAS,EAAE;AACrB,YAAA,iBAAiB,CAAC,IAAI,CAAC,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C,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KACnB,UAAU,CAAC,IAAc,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC;;AAGhD,IAAA,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,uBAAuB,CAAC,SAAS,EAAE,GAAG,CAAC;AACpE,IAAA,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,uBAAuB,CAAC,SAAS,EAAE,GAAG,CAAC;;AAG5E;AACA,gBAAgB,CAAC,UAAU,GAAG,gBAAgB,CAAC,CAAC;AAChD,gBAAgB,CAAC,UAAU,GAAG,gBAAgB,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs deleted file mode 100644 index a15a5112..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs +++ /dev/null @@ -1,7 +0,0 @@ -import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs'; - -const optimizedAppearDataId = "framerAppearId"; -const optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId); - -export { optimizedAppearDataAttribute, optimizedAppearDataId }; -//# sourceMappingURL=data-id.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.map deleted file mode 100644 index 387ed164..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"data-id.mjs","sources":["../../../../src/animation/optimized-appear/data-id.ts"],"sourcesContent":["import { camelToDash } from \"../../render/dom/utils/camel-to-dash\"\n\nexport const optimizedAppearDataId = \"framerAppearId\"\n\nexport const optimizedAppearDataAttribute =\n \"data-\" + camelToDash(optimizedAppearDataId) as \"data-framer-appear-id\"\n"],"names":[],"mappings":";;AAEO,MAAM,qBAAqB,GAAG;AAE9B,MAAM,4BAA4B,GACrC,OAAO,GAAG,WAAW,CAAC,qBAAqB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs deleted file mode 100644 index 7026149e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import { optimizedAppearDataAttribute } from './data-id.mjs'; - -function getOptimisedAppearId(visualElement) { - return visualElement.props[optimizedAppearDataAttribute]; -} - -export { getOptimisedAppearId }; -//# sourceMappingURL=get-appear-id.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs.map deleted file mode 100644 index 1b18bdf6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get-appear-id.mjs","sources":["../../../../src/animation/optimized-appear/get-appear-id.ts"],"sourcesContent":["import { optimizedAppearDataAttribute } from \"./data-id\"\nimport type { WithAppearProps } from \"./types\"\n\nexport function getOptimisedAppearId(\n visualElement: WithAppearProps\n): string | undefined {\n return visualElement.props[optimizedAppearDataAttribute]\n}\n"],"names":[],"mappings":";;AAGM,SAAU,oBAAoB,CAChC,aAA8B,EAAA;AAE9B,IAAA,OAAO,aAAa,CAAC,KAAK,CAAC,4BAA4B,CAAC;AAC5D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs deleted file mode 100644 index 54a42a1e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs +++ /dev/null @@ -1,27 +0,0 @@ -class WithPromise { - constructor() { - this.updateFinished(); - } - get finished() { - return this._finished; - } - updateFinished() { - this._finished = new Promise((resolve) => { - this.resolve = resolve; - }); - } - notifyFinished() { - this.resolve(); - } - /** - * Allows the animation to be awaited. - * - * @deprecated Use `finished` instead. - */ - then(onResolve, onReject) { - return this.finished.then(onResolve, onReject); - } -} - -export { WithPromise }; -//# sourceMappingURL=WithPromise.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.map deleted file mode 100644 index 7a80df3d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WithPromise.mjs","sources":["../../../../src/animation/utils/WithPromise.ts"],"sourcesContent":["export class WithPromise {\n protected _finished: Promise\n\n resolve: VoidFunction\n\n constructor() {\n this.updateFinished()\n }\n\n get finished() {\n return this._finished\n }\n\n protected updateFinished() {\n this._finished = new Promise((resolve) => {\n this.resolve = resolve\n })\n }\n\n protected notifyFinished() {\n this.resolve()\n }\n\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve: VoidFunction, onReject?: VoidFunction) {\n return this.finished.then(onResolve, onReject)\n }\n}\n"],"names":[],"mappings":"MAAa,WAAW,CAAA;AAKpB,IAAA,WAAA,GAAA;QACI,IAAI,CAAC,cAAc,EAAE;IACzB;AAEA,IAAA,IAAI,QAAQ,GAAA;QACR,OAAO,IAAI,CAAC,SAAS;IACzB;IAEU,cAAc,GAAA;QACpB,IAAI,CAAC,SAAS,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,KAAI;AAC3C,YAAA,IAAI,CAAC,OAAO,GAAG,OAAO;AAC1B,QAAA,CAAC,CAAC;IACN;IAEU,cAAc,GAAA;QACpB,IAAI,CAAC,OAAO,EAAE;IAClB;AAEA;;;;AAIG;IACH,IAAI,CAAC,SAAuB,EAAE,QAAuB,EAAA;QACjD,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC;IAClD;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/active-animations.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/active-animations.mjs deleted file mode 100644 index e5489940..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/active-animations.mjs +++ /dev/null @@ -1,13 +0,0 @@ -const animationMaps = new WeakMap(); -const animationMapKey = (name, pseudoElement = "") => `${name}:${pseudoElement}`; -function getAnimationMap(element) { - let map = animationMaps.get(element); - if (!map) { - map = new Map(); - animationMaps.set(element, map); - } - return map; -} - -export { animationMapKey, getAnimationMap }; -//# sourceMappingURL=active-animations.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/active-animations.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/active-animations.mjs.map deleted file mode 100644 index 7fb83262..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/active-animations.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"active-animations.mjs","sources":["../../../../src/animation/utils/active-animations.ts"],"sourcesContent":["import { NativeAnimation } from \"../NativeAnimation\"\nimport { AnyResolvedKeyframe } from \"../types\"\n\nconst animationMaps = new WeakMap<\n Element,\n Map>\n>()\nexport const animationMapKey = (name: string, pseudoElement: string = \"\") =>\n `${name}:${pseudoElement}`\n\nexport function getAnimationMap(element: Element) {\n let map = animationMaps.get(element)\n if (!map) {\n map = new Map()\n animationMaps.set(element, map)\n }\n return map\n}\n"],"names":[],"mappings":"AAGA,MAAM,aAAa,GAAG,IAAI,OAAO,EAG9B;AACI,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,aAAA,GAAwB,EAAE,KACpE,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,aAAa;AAEtB,SAAU,eAAe,CAAC,OAAgB,EAAA;IAC5C,IAAI,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC;IACpC,IAAI,CAAC,GAAG,EAAE;AACN,QAAA,GAAG,GAAG,IAAI,GAAG,EAAE;AACf,QAAA,aAAa,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC;IACnC;AACA,IAAA,OAAO,GAAG;AACd;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/arc.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/arc.mjs deleted file mode 100644 index df082052..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/arc.mjs +++ /dev/null @@ -1,188 +0,0 @@ -import { wrap } from 'motion-utils'; -import { motionValue } from '../../value/index.mjs'; -import { animateMotionValue } from '../interfaces/motion-value.mjs'; -import { getValueTransition } from './get-value-transition.mjs'; - -const MIN_LAYOUT_DISTANCE = 20; -function bezierPoint(t, origin, control, target) { - const inv = 1 - t; - return inv * inv * origin + 2 * inv * t * control + t * t * target; -} -function bezierTangentAngle(t, originX, controlX, targetX, originY, controlY, targetY) { - const dx = 2 * (1 - t) * (controlX - originX) + 2 * t * (targetX - controlX); - const dy = 2 * (1 - t) * (controlY - originY) + 2 * t * (targetY - controlY); - return Math.atan2(dy, dx) * (180 / Math.PI); -} -function computeArcControlPoint(fromX, fromY, toX, toY, strength, peak) { - const deltaX = toX - fromX; - const deltaY = toY - fromY; - const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); - if (distance > 0) { - const normalPerpX = -deltaY / distance; - const normalPerpY = deltaX / distance; - const desiredHeight = strength * distance; - return { - x: fromX + deltaX * peak + normalPerpX * desiredHeight, - y: fromY + deltaY * peak + normalPerpY * desiredHeight, - }; - } - return { x: fromX, y: fromY }; -} -/** - * The pure sampling factory: `(from, to) => (t) => point`. Internal — - * used by {@link arc} and the unit tests. Not part of the public surface. - */ -function createArcPath({ strength = 0.5, peak = 0.5, direction, rotate = false, } = {}) { - const rotationScale = rotate === true ? 1 : typeof rotate === "number" ? rotate : 0; - // Auto-direction only: persists across calls to flip the bulge back - // onto the same screen side when the dominant axis changes between - // calls. Reuse the factory (module scope / useMemo) to keep this alive. - let prevBulgeSign; - const createInterpolator = (from, to) => { - const dx = to.x - from.x; - const dy = to.y - from.y; - let signed; - if (direction === "cw") { - signed = -strength; - } - else if (direction === "ccw") { - signed = strength; - } - else { - const dom = Math.abs(dx) >= Math.abs(dy) ? dx : dy; - signed = dom < 0 ? -strength : strength; - } - let control = computeArcControlPoint(from.x, from.y, to.x, to.y, signed, peak); - if (direction === undefined) { - const isVertical = Math.abs(dx) < Math.abs(dy); - const midX = from.x + dx * peak; - const midY = from.y + dy * peak; - const bulgeSign = isVertical - ? Math.sign(control.x - midX) - : Math.sign(control.y - midY); - if (prevBulgeSign !== undefined && - bulgeSign !== 0 && - bulgeSign !== prevBulgeSign) { - signed = -signed; - control = computeArcControlPoint(from.x, from.y, to.x, to.y, signed, peak); - } - else if (bulgeSign !== 0) { - prevBulgeSign = bulgeSign; - } - } - const tangent0 = rotationScale - ? bezierTangentAngle(0, from.x, control.x, to.x, from.y, control.y, to.y) - : 0; - const tangent1 = rotationScale - ? bezierTangentAngle(1, from.x, control.x, to.x, from.y, control.y, to.y) - : 0; - const tangentDelta = rotationScale - ? wrap(-180, 180, tangent1 - tangent0) - : 0; - return (t) => { - const out = { - x: bezierPoint(t, from.x, control.x, to.x), - y: bezierPoint(t, from.y, control.y, to.y), - }; - if (rotationScale) { - const raw = bezierTangentAngle(t, from.x, control.x, to.x, from.y, control.y, to.y); - const baseline = tangent0 + tangentDelta * t; - out.rotate = wrap(-180, 180, raw - baseline) * rotationScale; - } - return out; - }; - }; - return createInterpolator; -} -/** - * Creates a curved path for `transition.path`: - * - * ```ts - * - * ``` - * - * Reuse the returned value (module scope / useMemo / useRef) so its - * continuity closure survives re-renders — a fresh `arc()` has no memory. - */ -function arc(options = {}) { - const sample = createArcPath(options); - const path = { - interpolateProjection(delta) { - // `from` is the current translate offset (carries any in-flight - // displacement when interrupted); `to` is the new layout origin. - // The distance floor avoids visible wobble on tiny shifts. - const tx = delta.x.translate; - const ty = delta.y.translate; - if (Math.sqrt(tx * tx + ty * ty) < MIN_LAYOUT_DISTANCE) { - return undefined; - } - return sample({ x: tx, y: ty }, { x: 0, y: 0 }); - }, - animateVisualElement(visualElement, target, transition, delay, animations) { - if (!("x" in target || "y" in target)) - return; - const xValue = visualElement.getValue("x", visualElement.latestValues["x"] ?? 0); - const yValue = visualElement.getValue("y", visualElement.latestValues["y"] ?? 0); - const xRaw = target.x; - const yRaw = target.y; - const xFrom = (Array.isArray(xRaw) && xRaw[0] != null - ? xRaw[0] - : xValue?.get()) ?? 0; - const yFrom = (Array.isArray(yRaw) && yRaw[0] != null - ? yRaw[0] - : yValue?.get()) ?? 0; - const xTo = (Array.isArray(xRaw) - ? xRaw[xRaw.length - 1] - : xRaw ?? xFrom); - const yTo = (Array.isArray(yRaw) - ? yRaw[yRaw.length - 1] - : yRaw ?? yFrom); - // Interruption needs no flag: x/y already hold the displaced - // mid-arc position, so xFrom/yFrom carry the continuity geometry. - const interpolate = sample({ x: xFrom, y: yFrom }, { x: xTo, y: yTo }); - // Drive a dedicated `pathRotation` value (composed onto `rotate` - // at the build sites) rather than `rotate` itself, so a - // concurrent rotate animation composes and nothing accumulates - // on interrupt. - const pathRotationValue = interpolate(0).rotate !== undefined - ? visualElement.getValue("pathRotation", 0) - : undefined; - const pathTransition = { - delay, - ...getValueTransition(transition || {}, "x"), - }; - delete pathTransition.path; - const progress = motionValue(0); - progress.start(animateMotionValue("", progress, [0, 1000], { - ...pathTransition, - isSync: true, - velocity: 0, - onUpdate: (latest) => { - const point = interpolate(latest / 1000); - xValue?.set(point.x); - yValue?.set(point.y); - if (pathRotationValue && point.rotate !== undefined) { - pathRotationValue.set(point.rotate); - } - }, - onComplete: () => { - xValue?.set(xTo); - yValue?.set(yTo); - pathRotationValue?.set(0); - }, - // Interrupt/cancel must clear our additive contribution - // so it can't linger on top of the user's `rotate`. - onStop: () => pathRotationValue?.set(0), - onCancel: () => pathRotationValue?.set(0), - })); - if (progress.animation) - animations.push(progress.animation); - delete target.x; - delete target.y; - }, - }; - return path; -} - -export { arc, createArcPath }; -//# sourceMappingURL=arc.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/arc.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/arc.mjs.map deleted file mode 100644 index ef5bfddb..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/arc.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"arc.mjs","sources":["../../../../src/animation/utils/arc.ts"],"sourcesContent":["import { wrap } from \"motion-utils\"\nimport { motionValue } from \"../../value\"\nimport { animateMotionValue } from \"../interfaces/motion-value\"\nimport type { MotionPath, PathInterpolator, Point2D } from \"../types\"\nimport { getValueTransition } from \"./get-value-transition\"\n\nexport interface ArcOptions {\n /**\n * How far the arc bulges perpendicular to the straight-line path,\n * as a fraction of the total distance. A value of `1` means the arc\n * peaks at a height equal to the full travel distance. Default `0.5`.\n */\n strength?: number\n /**\n * Where along the path (0–1) the arc reaches its maximum height.\n * Default `0.5` (symmetric).\n */\n peak?: number\n /**\n * Which side the arc bulges toward.\n * - `\"cw\"` / `\"ccw\"` — locked relative to direction of travel\n * - unset — auto-pick a stable screen-space side\n */\n direction?: \"cw\" | \"ccw\"\n /**\n * Rotates the element to follow the tangent of the arc path.\n * - `true` — full tangent following (1.0)\n * - number 0–1 — scale factor\n */\n rotate?: boolean | number\n}\n\nconst MIN_LAYOUT_DISTANCE = 20\n\nfunction bezierPoint(\n t: number,\n origin: number,\n control: number,\n target: number\n): number {\n const inv = 1 - t\n return inv * inv * origin + 2 * inv * t * control + t * t * target\n}\n\nfunction bezierTangentAngle(\n t: number,\n originX: number,\n controlX: number,\n targetX: number,\n originY: number,\n controlY: number,\n targetY: number\n): number {\n const dx =\n 2 * (1 - t) * (controlX - originX) + 2 * t * (targetX - controlX)\n const dy =\n 2 * (1 - t) * (controlY - originY) + 2 * t * (targetY - controlY)\n return Math.atan2(dy, dx) * (180 / Math.PI)\n}\n\nfunction computeArcControlPoint(\n fromX: number,\n fromY: number,\n toX: number,\n toY: number,\n strength: number,\n peak: number\n): { x: number; y: number } {\n const deltaX = toX - fromX\n const deltaY = toY - fromY\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY)\n\n if (distance > 0) {\n const normalPerpX = -deltaY / distance\n const normalPerpY = deltaX / distance\n const desiredHeight = strength * distance\n\n return {\n x: fromX + deltaX * peak + normalPerpX * desiredHeight,\n y: fromY + deltaY * peak + normalPerpY * desiredHeight,\n }\n }\n\n return { x: fromX, y: fromY }\n}\n\n/**\n * The pure sampling factory: `(from, to) => (t) => point`. Internal —\n * used by {@link arc} and the unit tests. Not part of the public surface.\n */\nexport function createArcPath({\n strength = 0.5,\n peak = 0.5,\n direction,\n rotate = false,\n}: ArcOptions = {}): (from: Point2D, to: Point2D) => PathInterpolator {\n const rotationScale =\n rotate === true ? 1 : typeof rotate === \"number\" ? rotate : 0\n\n // Auto-direction only: persists across calls to flip the bulge back\n // onto the same screen side when the dominant axis changes between\n // calls. Reuse the factory (module scope / useMemo) to keep this alive.\n let prevBulgeSign: number | undefined\n\n const createInterpolator = (\n from: Point2D,\n to: Point2D\n ): PathInterpolator => {\n const dx = to.x - from.x\n const dy = to.y - from.y\n\n let signed: number\n if (direction === \"cw\") {\n signed = -strength\n } else if (direction === \"ccw\") {\n signed = strength\n } else {\n const dom = Math.abs(dx) >= Math.abs(dy) ? dx : dy\n signed = dom < 0 ? -strength : strength\n }\n\n let control = computeArcControlPoint(\n from.x,\n from.y,\n to.x,\n to.y,\n signed,\n peak\n )\n\n if (direction === undefined) {\n const isVertical = Math.abs(dx) < Math.abs(dy)\n const midX = from.x + dx * peak\n const midY = from.y + dy * peak\n const bulgeSign = isVertical\n ? Math.sign(control.x - midX)\n : Math.sign(control.y - midY)\n\n if (\n prevBulgeSign !== undefined &&\n bulgeSign !== 0 &&\n bulgeSign !== prevBulgeSign\n ) {\n signed = -signed\n control = computeArcControlPoint(\n from.x,\n from.y,\n to.x,\n to.y,\n signed,\n peak\n )\n } else if (bulgeSign !== 0) {\n prevBulgeSign = bulgeSign\n }\n }\n\n const tangent0 = rotationScale\n ? bezierTangentAngle(\n 0,\n from.x,\n control.x,\n to.x,\n from.y,\n control.y,\n to.y\n )\n : 0\n const tangent1 = rotationScale\n ? bezierTangentAngle(\n 1,\n from.x,\n control.x,\n to.x,\n from.y,\n control.y,\n to.y\n )\n : 0\n const tangentDelta = rotationScale\n ? wrap(-180, 180, tangent1 - tangent0)\n : 0\n\n return (t: number) => {\n const out: { x: number; y: number; rotate?: number } = {\n x: bezierPoint(t, from.x, control.x, to.x),\n y: bezierPoint(t, from.y, control.y, to.y),\n }\n if (rotationScale) {\n const raw = bezierTangentAngle(\n t,\n from.x,\n control.x,\n to.x,\n from.y,\n control.y,\n to.y\n )\n const baseline = tangent0 + tangentDelta * t\n out.rotate = wrap(-180, 180, raw - baseline) * rotationScale\n }\n return out\n }\n }\n\n return createInterpolator\n}\n\n/**\n * Creates a curved path for `transition.path`:\n *\n * ```ts\n * \n * ```\n *\n * Reuse the returned value (module scope / useMemo / useRef) so its\n * continuity closure survives re-renders — a fresh `arc()` has no memory.\n */\nexport function arc(options: ArcOptions = {}): MotionPath {\n const sample = createArcPath(options)\n\n const path: MotionPath = {\n interpolateProjection(delta) {\n // `from` is the current translate offset (carries any in-flight\n // displacement when interrupted); `to` is the new layout origin.\n // The distance floor avoids visible wobble on tiny shifts.\n const tx = delta.x.translate\n const ty = delta.y.translate\n if (Math.sqrt(tx * tx + ty * ty) < MIN_LAYOUT_DISTANCE) {\n return undefined\n }\n return sample({ x: tx, y: ty }, { x: 0, y: 0 })\n },\n\n animateVisualElement(\n visualElement,\n target,\n transition,\n delay,\n animations\n ) {\n if (!(\"x\" in target || \"y\" in target)) return\n\n const xValue = visualElement.getValue(\n \"x\",\n visualElement.latestValues[\"x\"] ?? 0\n )\n const yValue = visualElement.getValue(\n \"y\",\n visualElement.latestValues[\"y\"] ?? 0\n )\n\n const xRaw = target.x as number | number[] | undefined\n const yRaw = target.y as number | number[] | undefined\n\n const xFrom = ((Array.isArray(xRaw) && xRaw[0] != null\n ? xRaw[0]\n : xValue?.get()) as number) ?? 0\n const yFrom = ((Array.isArray(yRaw) && yRaw[0] != null\n ? yRaw[0]\n : yValue?.get()) as number) ?? 0\n const xTo = (Array.isArray(xRaw)\n ? xRaw[xRaw.length - 1]\n : xRaw ?? xFrom) as number\n const yTo = (Array.isArray(yRaw)\n ? yRaw[yRaw.length - 1]\n : yRaw ?? yFrom) as number\n\n // Interruption needs no flag: x/y already hold the displaced\n // mid-arc position, so xFrom/yFrom carry the continuity geometry.\n const interpolate = sample(\n { x: xFrom, y: yFrom },\n { x: xTo, y: yTo }\n )\n\n // Drive a dedicated `pathRotation` value (composed onto `rotate`\n // at the build sites) rather than `rotate` itself, so a\n // concurrent rotate animation composes and nothing accumulates\n // on interrupt.\n const pathRotationValue =\n interpolate(0).rotate !== undefined\n ? visualElement.getValue(\"pathRotation\", 0)\n : undefined\n\n const pathTransition = {\n delay,\n ...getValueTransition(transition || {}, \"x\"),\n }\n delete (pathTransition as { path?: unknown }).path\n\n const progress = motionValue(0)\n progress.start(\n animateMotionValue(\"\", progress, [0, 1000] as any, {\n ...pathTransition,\n isSync: true,\n velocity: 0,\n onUpdate: (latest: number) => {\n const point = interpolate(latest / 1000)\n xValue?.set(point.x)\n yValue?.set(point.y)\n if (pathRotationValue && point.rotate !== undefined) {\n pathRotationValue.set(point.rotate)\n }\n },\n onComplete: () => {\n xValue?.set(xTo)\n yValue?.set(yTo)\n pathRotationValue?.set(0)\n },\n // Interrupt/cancel must clear our additive contribution\n // so it can't linger on top of the user's `rotate`.\n onStop: () => pathRotationValue?.set(0),\n onCancel: () => pathRotationValue?.set(0),\n })\n )\n\n if (progress.animation) animations.push(progress.animation)\n\n delete (target as { x?: unknown }).x\n delete (target as { y?: unknown }).y\n },\n }\n\n return path\n}\n"],"names":[],"mappings":";;;;;AAgCA,MAAM,mBAAmB,GAAG,EAAE;AAE9B,SAAS,WAAW,CAChB,CAAS,EACT,MAAc,EACd,OAAe,EACf,MAAc,EAAA;AAEd,IAAA,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC;AACjB,IAAA,OAAO,GAAG,GAAG,GAAG,GAAG,MAAM,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM;AACtE;AAEA,SAAS,kBAAkB,CACvB,CAAS,EACT,OAAe,EACf,QAAgB,EAChB,OAAe,EACf,OAAe,EACf,QAAgB,EAChB,OAAe,EAAA;IAEf,MAAM,EAAE,GACJ,CAAC,IAAI,CAAC,GAAG,CAAC,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I,QAAQ,CAAC,SAAS;AAAE,gBAAA,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;YAE3D,OAAQ,MAA0B,CAAC,CAAC;YACpC,OAAQ,MAA0B,CAAC,CAAC;QACxC,CAAC;KACJ;AAED,IAAA,OAAO,IAAI;AACf;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs deleted file mode 100644 index 4ddf789d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs +++ /dev/null @@ -1,16 +0,0 @@ -function calcChildStagger(children, child, delayChildren, staggerChildren = 0, staggerDirection = 1) { - const index = Array.from(children) - .sort((a, b) => a.sortNodePosition(b)) - .indexOf(child); - const numChildren = children.size; - const maxStaggerDuration = (numChildren - 1) * staggerChildren; - const delayIsFunction = typeof delayChildren === "function"; - return delayIsFunction - ? delayChildren(index, numChildren) - : staggerDirection === 1 - ? index * staggerChildren - : maxStaggerDuration - index * staggerChildren; -} - -export { calcChildStagger }; -//# sourceMappingURL=calc-child-stagger.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.map deleted file mode 100644 index 0a44c644..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"calc-child-stagger.mjs","sources":["../../../../src/animation/utils/calc-child-stagger.ts"],"sourcesContent":["import type { DynamicOption } from \"../types\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\nexport function calcChildStagger(\n children: Set,\n child: VisualElement,\n delayChildren?: number | DynamicOption,\n staggerChildren: number = 0,\n staggerDirection: number = 1\n): number {\n const index = Array.from(children)\n .sort((a, b) => a.sortNodePosition(b))\n .indexOf(child)\n const numChildren = children.size\n const maxStaggerDuration = (numChildren - 1) * staggerChildren\n const delayIsFunction = typeof delayChildren === \"function\"\n\n return delayIsFunction\n ? delayChildren(index, numChildren)\n : staggerDirection === 1\n ? index * staggerChildren\n : maxStaggerDuration - index * staggerChildren\n}\n"],"names":[],"mappings":"AAGM,SAAU,gBAAgB,CAC5B,QAA4B,EAC5B,KAAoB,EACpB,aAA8C,EAC9C,eAAA,GAA0B,CAAC,EAC3B,mBAA2B,CAAC,EAAA;AAE5B,IAAA,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ;AAC5B,SAAA,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;SACpC,OAAO,CAAC,KAAK,CAAC;AACnB,IAAA,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI;IACjC,MAAM,kBAAkB,GAAG,CAAC,WAAW,GAAG,CAAC,IAAI,eAAe;AAC9D,IAAA,MAAM,eAAe,GAAG,OAAO,aAAa,KAAK,UAAU;AAE3D,IAAA,OAAO;AACH,UAAE,aAAa,CAAC,KAAK,EAAE,WAAW;UAChC,gBAAgB,KAAK;cACrB,KAAK,GAAG;AACV,cAAE,kBAAkB,GAAG,KAAK,GAAG,eAAe;AACtD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs deleted file mode 100644 index 0df41720..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs +++ /dev/null @@ -1,44 +0,0 @@ -import { warning } from 'motion-utils'; -import { isGenerator } from '../generators/utils/is-generator.mjs'; -import { isAnimatable } from './is-animatable.mjs'; - -function hasKeyframesChanged(keyframes) { - const current = keyframes[0]; - if (keyframes.length === 1) - return true; - for (let i = 0; i < keyframes.length; i++) { - if (keyframes[i] !== current) - return true; - } -} -function canAnimate(keyframes, name, type, velocity) { - /** - * Check if we're able to animate between the start and end keyframes, - * and throw a warning if we're attempting to animate between one that's - * animatable and another that isn't. - */ - const originKeyframe = keyframes[0]; - if (originKeyframe === null) { - return false; - } - /** - * These aren't traditionally animatable but we do support them. - * In future we could look into making this more generic or replacing - * this function with mix() === mixImmediate - */ - if (name === "display" || name === "visibility") - return true; - const targetKeyframe = keyframes[keyframes.length - 1]; - const isOriginAnimatable = isAnimatable(originKeyframe, name); - const isTargetAnimatable = isAnimatable(targetKeyframe, name); - warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable"); - // Always skip if any of these are true - if (!isOriginAnimatable || !isTargetAnimatable) { - return false; - } - return (hasKeyframesChanged(keyframes) || - ((type === "spring" || isGenerator(type)) && velocity)); -} - -export { canAnimate }; -//# sourceMappingURL=can-animate.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.map deleted file mode 100644 index 09c1c48a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"can-animate.mjs","sources":["../../../../src/animation/utils/can-animate.ts"],"sourcesContent":["import { warning } from \"motion-utils\"\nimport { isGenerator } from \"../generators/utils/is-generator\"\nimport { ResolvedKeyframes } from \"../keyframes/KeyframesResolver\"\nimport { AnimationGeneratorType } from \"../types\"\nimport { isAnimatable } from \"./is-animatable\"\n\nfunction hasKeyframesChanged(keyframes: ResolvedKeyframes) {\n const current = keyframes[0]\n if (keyframes.length === 1) return true\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current) return true\n }\n}\n\nexport function canAnimate(\n keyframes: ResolvedKeyframes,\n name?: string,\n type?: AnimationGeneratorType,\n velocity?: number\n) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0]\n if (originKeyframe === null) {\n return false\n }\n\n /**\n * These aren't traditionally animatable but we do support them.\n * In future we could look into making this more generic or replacing\n * this function with mix() === mixImmediate\n */\n if (name === \"display\" || name === \"visibility\") return true\n\n const targetKeyframe = keyframes[keyframes.length - 1]\n const isOriginAnimatable = isAnimatable(originKeyframe, name)\n const isTargetAnimatable = isAnimatable(targetKeyframe, name)\n\n warning(\n isOriginAnimatable === isTargetAnimatable,\n `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". \"${\n isOriginAnimatable ? targetKeyframe : originKeyframe\n }\" is not an animatable value.`,\n \"value-not-animatable\"\n )\n\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n return false\n }\n\n return (\n hasKeyframesChanged(keyframes) ||\n ((type === \"spring\" || isGenerator(type)) && velocity)\n )\n}\n"],"names":[],"mappings":";;;;AAMA,SAAS,mBAAmB,CAAC,SAAiC,EAAA;AAC1D,IAAA,MAAM,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;AAC5B,IAAA,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACvC,QAAA,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO;AAAE,YAAA,OAAO,IAAI;IAC7C;AACJ;AAEM,SAAU,UAAU,CACtB,SAAiC,EACjC,IAAa,EACb,IAA6B,EAC7B,QAAiB,EAAA;AAEjB;;;;AAIG;AACH,IAAA,MAAM,cAAc,GAAG,SAAS,CAAC,CAAC,CAAC;AACnC,IAAA,IAAI,cAAc,KAAK,IAAI,EAAE;AACzB,QAAA,OAAO,KAAK;IAChB;AAEA;;;;AAIG;AACH,IAAA,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,YAAY;AAAE,QAAA,OAAO,IAAI;IAE5D,MAAM,cAAc,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;IACtD,MAAM,kBAAkB,GAAG,YAAY,CAAC,cAAc,EAAE,IAAI,CAAC;IAC7D,MAAM,kBAAkB,GAAG,YAAY,CAAC,cAAc,EAAE,IAAI,CAAC;IAE7D,OAAO,CACH,kBAAkB,KAAK,kBAAkB,EACzC,6BAA6B,IAAI,CAAA,OAAA,EAAU,cAAc,CAAA,MAAA,EAAS,cAAc,CAAA,IAAA,EAC5E,kBAAkB,GAAG,cAAc,GAAG,cAC1C,CAAA,6BAAA,CAA+B,EAC/B,sBAAsB,CACzB;;AAGD,IAAA,IAAI,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,EAAE;AAC5C,QAAA,OAAO,KAAK;IAChB;AAEA,IAAA,QACI,mBAAmB,CAAC,SAAS,CAAC;AAC9B,SAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC;AAE9D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs deleted file mode 100644 index 78c8b404..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs +++ /dev/null @@ -1,42 +0,0 @@ -import { invariant, isNumericalString } from 'motion-utils'; -import { isCSSVariableToken } from './is-css-variable.mjs'; - -/** - * Parse Framer's special CSS variable format into a CSS token and a fallback. - * - * ``` - * `var(--foo, #fff)` => [`--foo`, '#fff'] - * ``` - * - * @param current - */ -const splitCSSVariableRegex = -// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words -/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u; -function parseCSSVariable(current) { - const match = splitCSSVariableRegex.exec(current); - if (!match) - return [,]; - const [, token1, token2, fallback] = match; - return [`--${token1 ?? token2}`, fallback]; -} -const maxDepth = 4; -function getVariableValue(current, element, depth = 1) { - invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth"); - const [token, fallback] = parseCSSVariable(current); - // No CSS variable detected - if (!token) - return; - // Attempt to read this CSS variable off the element - const resolved = window.getComputedStyle(element).getPropertyValue(token); - if (resolved) { - const trimmed = resolved.trim(); - return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed; - } - return isCSSVariableToken(fallback) - ? getVariableValue(fallback, element, depth + 1) - : fallback; -} - -export { getVariableValue, parseCSSVariable }; -//# sourceMappingURL=css-variables-conversion.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.map deleted file mode 100644 index 6b174978..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"css-variables-conversion.mjs","sources":["../../../../src/animation/utils/css-variables-conversion.ts"],"sourcesContent":["import { invariant, isNumericalString } from \"motion-utils\"\nimport { AnyResolvedKeyframe } from \"../types\"\nimport { CSSVariableToken, isCSSVariableToken } from \"./is-css-variable\"\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\n\nconst splitCSSVariableRegex =\n // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n /^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u\nexport function parseCSSVariable(current: string) {\n const match = splitCSSVariableRegex.exec(current)\n if (!match) return [,]\n\n const [, token1, token2, fallback] = match\n return [`--${token1 ?? token2}`, fallback]\n}\n\nconst maxDepth = 4\nexport function getVariableValue(\n current: CSSVariableToken,\n element: Element,\n depth = 1\n): AnyResolvedKeyframe | undefined {\n invariant(\n depth <= maxDepth,\n `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`,\n \"max-css-var-depth\"\n )\n\n const [token, fallback] = parseCSSVariable(current)\n\n // No CSS variable detected\n if (!token) return\n\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token)\n\n if (resolved) {\n const trimmed = resolved.trim()\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed\n }\n\n return isCSSVariableToken(fallback)\n ? getVariableValue(fallback, element, depth + 1)\n : fallback\n}\n"],"names":[],"mappings":";;;AAIA;;;;;;;;AAQG;AAEH,MAAM,qBAAqB;AACvB;AACA,0DAA0D;AACxD,SAAU,gBAAgB,CAAC,OAAe,EAAA;IAC5C,MAAM,KAAK,GAAG,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC;AACjD,IAAA,IAAI,CAAC,KAAK;QAAE,OAAO,GAAG;IAEtB,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG,KAAK;IAC1C,OAAO,CAAC,KAAK,MAAM,IAAI,MAAM,CAAA,CAAE,EAAE,QAAQ,CAAC;AAC9C;AAEA,MAAM,QAAQ,GAAG,CAAC;AACZ,SAAU,gBAAgB,CAC5B,OAAyB,EACzB,OAAgB,EAChB,KAAK,GAAG,CAAC,EAAA;IAET,SAAS,CACL,KAAK,IAAI,QAAQ,EACjB,CAAA,sDAAA,EAAyD,OAAO,CAAA,oDAAA,CAAsD,EACtH,mBAAmB,CACtB;IAED,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC;;AAGnD,IAAA,IAAI,CAAC,KAAK;QAAE;;AAGZ,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC;IAEzE,IAAI,QAAQ,EAAE;AACV,QAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE;AAC/B,QAAA,OAAO,iBAAiB,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,OAAO;IACrE;IAEA,OAAO,kBAAkB,CAAC,QAAQ;UAC5B,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,GAAG,CAAC;UAC7C,QAAQ;AAClB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs deleted file mode 100644 index 00ca169c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs +++ /dev/null @@ -1,41 +0,0 @@ -import { transformProps } from '../../render/utils/keys-transform.mjs'; - -const underDampedSpring = { - type: "spring", - stiffness: 500, - damping: 25, - restSpeed: 10, -}; -const criticallyDampedSpring = (target) => ({ - type: "spring", - stiffness: 550, - damping: target === 0 ? 2 * Math.sqrt(550) : 30, - restSpeed: 10, -}); -const keyframesTransition = { - type: "keyframes", - duration: 0.8, -}; -/** - * Default easing curve is a slightly shallower version of - * the default browser easing curve. - */ -const ease = { - type: "keyframes", - ease: [0.25, 0.1, 0.35, 1], - duration: 0.3, -}; -const getDefaultTransition = (valueKey, { keyframes }) => { - if (keyframes.length > 2) { - return keyframesTransition; - } - else if (transformProps.has(valueKey)) { - return valueKey.startsWith("scale") - ? criticallyDampedSpring(keyframes[1]) - : underDampedSpring; - } - return ease; -}; - -export { getDefaultTransition }; -//# sourceMappingURL=default-transitions.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.map deleted file mode 100644 index f7ef1ae0..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"default-transitions.mjs","sources":["../../../../src/animation/utils/default-transitions.ts"],"sourcesContent":["import { transformProps } from \"../../render/utils/keys-transform\"\nimport type { ValueAnimationOptions } from \"../types\"\n\nconst underDampedSpring: Partial = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n}\n\nconst criticallyDampedSpring = (\n target: unknown\n): Partial => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n})\n\nconst keyframesTransition: Partial = {\n type: \"keyframes\",\n duration: 0.8,\n}\n\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease: Partial = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n}\n\nexport const getDefaultTransition = (\n valueKey: string,\n { keyframes }: ValueAnimationOptions\n): Partial => {\n if (keyframes.length > 2) {\n return keyframesTransition\n } else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring\n }\n\n return ease\n}\n"],"names":[],"mappings":";;AAGA,MAAM,iBAAiB,GAAmC;AACtD,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,SAAS,EAAE,EAAE;CAChB;AAED,MAAM,sBAAsB,GAAG,CAC3B,MAAe,MACmB;AAClC,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,OAAO,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;AAC/C,IAAA,SAAS,EAAE,EAAE;AAChB,CAAA,CAAC;AAEF,MAAM,mBAAmB,GAAmC;AACxD,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,QAAQ,EAAE,GAAG;CAChB;AAED;;;AAGG;AACH,MAAM,IAAI,GAAmC;AACzC,IAAA,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1B,IAAA,QAAQ,EAAE,GAAG;CAChB;AAEM,MAAM,oBAAoB,GAAG,CAChC,QAAgB,EAChB,EAAE,SAAS,EAAyB,KACJ;AAChC,IAAA,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;AACtB,QAAA,OAAO,mBAAmB;IAC9B;AAAO,SAAA,IAAI,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;AACrC,QAAA,OAAO,QAAQ,CAAC,UAAU,CAAC,OAAO;AAC9B,cAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC,CAAC;cACnC,iBAAiB;IAC3B;AAEA,IAAA,OAAO,IAAI;AACf;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs deleted file mode 100644 index d616d23c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { resolveTransition } from './resolve-transition.mjs'; - -function getValueTransition(transition, key) { - const valueTransition = transition?.[key] ?? - transition?.["default"] ?? - transition; - if (valueTransition !== transition) { - return resolveTransition(valueTransition, transition); - } - return valueTransition; -} - -export { getValueTransition }; -//# sourceMappingURL=get-value-transition.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs.map deleted file mode 100644 index 4e9313c3..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get-value-transition.mjs","sources":["../../../../src/animation/utils/get-value-transition.ts"],"sourcesContent":["import { resolveTransition } from \"./resolve-transition\"\n\nexport function getValueTransition(transition: any, key: string) {\n const valueTransition =\n transition?.[key as keyof typeof transition] ??\n transition?.[\"default\"] ??\n transition\n\n if (valueTransition !== transition) {\n return resolveTransition(valueTransition, transition)\n }\n\n return valueTransition\n}\n"],"names":[],"mappings":";;AAEM,SAAU,kBAAkB,CAAC,UAAe,EAAE,GAAW,EAAA;AAC3D,IAAA,MAAM,eAAe,GACjB,UAAU,GAAG,GAA8B,CAAC;QAC5C,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,UAAU;AAEd,IAAA,IAAI,eAAe,KAAK,UAAU,EAAE;AAChC,QAAA,OAAO,iBAAiB,CAAC,eAAe,EAAE,UAAU,CAAC;IACzD;AAEA,IAAA,OAAO,eAAe;AAC1B;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs deleted file mode 100644 index b1ca0dae..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs +++ /dev/null @@ -1,31 +0,0 @@ -import { complex } from '../../value/types/complex/index.mjs'; - -/** - * Check if a value is animatable. Examples: - * - * ✅: 100, "100px", "#fff" - * ❌: "block", "url(2.jpg)" - * @param value - * - * @internal - */ -const isAnimatable = (value, name) => { - // If the list of keys that might be non-animatable grows, replace with Set - if (name === "zIndex") - return false; - // If it's a number or a keyframes array, we can animate it. We might at some point - // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this, - // but for now lets leave it like this for performance reasons - if (typeof value === "number" || Array.isArray(value)) - return true; - if (typeof value === "string" && // It's animatable if we have a string - (complex.test(value) || value === "0") && // And it contains numbers and/or colors - !value.startsWith("url(") // Unless it starts with "url(" - ) { - return true; - } - return false; -}; - -export { isAnimatable }; -//# sourceMappingURL=is-animatable.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs.map deleted file mode 100644 index 6e0d9555..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-animatable.mjs","sources":["../../../../src/animation/utils/is-animatable.ts"],"sourcesContent":["import { complex } from \"../../value/types/complex\"\nimport { ValueKeyframesDefinition } from \"../types\"\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nexport const isAnimatable = (\n value: ValueKeyframesDefinition,\n name?: string\n) => {\n // If the list of keys that might be non-animatable grows, replace with Set\n if (name === \"zIndex\") return false\n\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value)) return true\n\n if (\n typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true\n }\n\n return false\n}\n"],"names":[],"mappings":";;AAGA;;;;;;;;AAQG;MACU,YAAY,GAAG,CACxB,KAA+B,EAC/B,IAAa,KACb;;IAEA,IAAI,IAAI,KAAK,QAAQ;AAAE,QAAA,OAAO,KAAK;;;;IAKnC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI;AAElE,IAAA,IACI,OAAO,KAAK,KAAK,QAAQ;AACzB,SAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,GAAG,CAAC;AACtC,QAAA,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC;MAC3B;AACE,QAAA,OAAO,IAAI;IACf;AAEA,IAAA,OAAO,KAAK;AAChB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs deleted file mode 100644 index f0d36187..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs +++ /dev/null @@ -1,27 +0,0 @@ -const checkStringStartsWith = (token) => (key) => typeof key === "string" && key.startsWith(token); -const isCSSVariableName = -/*@__PURE__*/ checkStringStartsWith("--"); -const startsAsVariableToken = -/*@__PURE__*/ checkStringStartsWith("var(--"); -const isCSSVariableToken = (value) => { - const startsWithToken = startsAsVariableToken(value); - if (!startsWithToken) - return false; - // Ensure any comments are stripped from the value as this can harm performance of the regex. - return singleCssVariableRegex.test(value.split("/*")[0].trim()); -}; -const singleCssVariableRegex = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu; -/** - * Check if a value contains a CSS variable anywhere (e.g. inside calc()). - * Unlike isCSSVariableToken which checks if the value IS a var() token, - * this checks if the value CONTAINS var() somewhere in the string. - */ -function containsCSSVariable(value) { - if (typeof value !== "string") - return false; - // Strip comments to avoid false positives - return value.split("/*")[0].includes("var(--"); -} - -export { containsCSSVariable, isCSSVariableName, isCSSVariableToken }; -//# sourceMappingURL=is-css-variable.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs.map deleted file mode 100644 index 24aaa22c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-css-variable.mjs","sources":["../../../../src/animation/utils/is-css-variable.ts"],"sourcesContent":["import { AnyResolvedKeyframe } from \"../types\"\n\nexport type CSSVariableName = `--${string}`\n\nexport type CSSVariableToken = `var(${CSSVariableName})`\n\nconst checkStringStartsWith =\n (token: string) =>\n (key?: AnyResolvedKeyframe | null): key is T =>\n typeof key === \"string\" && key.startsWith(token)\n\nexport const isCSSVariableName =\n /*@__PURE__*/ checkStringStartsWith(\"--\")\n\nconst startsAsVariableToken =\n /*@__PURE__*/ checkStringStartsWith(\"var(--\")\nexport const isCSSVariableToken = (\n value?: string\n): value is CSSVariableToken => {\n const startsWithToken = startsAsVariableToken(value)\n\n if (!startsWithToken) return false\n\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim())\n}\n\nconst singleCssVariableRegex =\n /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu\n\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nexport function containsCSSVariable(\n value?: AnyResolvedKeyframe | null\n): boolean {\n if (typeof value !== \"string\") return false\n // Strip comments to avoid false positives\n return value.split(\"/*\")[0].includes(\"var(--\")\n}\n"],"names":[],"mappings":"AAMA,MAAM,qBAAqB,GACvB,CAAmB,KAAa,KAChC,CAAC,GAAgC,KAC7B,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC;MAE3C,iBAAiB;AAC1B,cAAc,qBAAqB,CAAkB,IAAI;AAE7D,MAAM,qBAAqB;AACvB,cAAc,qBAAqB,CAAmB,QAAQ,CAAC;AAC5D,MAAM,kBAAkB,GAAG,CAC9B,KAAc,KACa;AAC3B,IAAA,MAAM,eAAe,GAAG,qBAAqB,CAAC,KAAK,CAAC;AAEpD,IAAA,IAAI,CAAC,eAAe;AAAE,QAAA,OAAO,KAAK;;AAGlC,IAAA,OAAO,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACnE;AAEA,MAAM,sBAAsB,GACxB,qFAAqF;AAEzF;;;;AAIG;AACG,SAAU,mBAAmB,CAC/B,KAAkC,EAAA;IAElC,IAAI,OAAO,KAAK,KAAK,QAAQ;AAAE,QAAA,OAAO,KAAK;;AAE3C,IAAA,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAClD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs deleted file mode 100644 index 394fca40..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs +++ /dev/null @@ -1,27 +0,0 @@ -const orchestrationKeys = new Set([ - "when", - "delay", - "delayChildren", - "staggerChildren", - "staggerDirection", - "repeat", - "repeatType", - "repeatDelay", - "from", - "elapsed", -]); -/** - * Decide whether a transition is defined on a given Transition. - * This filters out orchestration options and returns true - * if any options are left. - */ -function isTransitionDefined(transition) { - for (const key in transition) { - if (!orchestrationKeys.has(key)) - return true; - } - return false; -} - -export { isTransitionDefined }; -//# sourceMappingURL=is-transition-defined.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.map deleted file mode 100644 index 619fccef..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-transition-defined.mjs","sources":["../../../../src/animation/utils/is-transition-defined.ts"],"sourcesContent":["import type { AnyResolvedKeyframe } from \"../types\"\nimport type { Transition } from \"../types\"\n\nconst orchestrationKeys = new Set([\n \"when\",\n \"delay\",\n \"delayChildren\",\n \"staggerChildren\",\n \"staggerDirection\",\n \"repeat\",\n \"repeatType\",\n \"repeatDelay\",\n \"from\",\n \"elapsed\",\n])\n\n/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nexport function isTransitionDefined(\n transition: Transition & { elapsed?: number; from?: AnyResolvedKeyframe }\n) {\n for (const key in transition) {\n if (!orchestrationKeys.has(key)) return true\n }\n return false\n}\n"],"names":[],"mappings":"AAGA,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAC9B,MAAM;IACN,OAAO;IACP,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,QAAQ;IACR,YAAY;IACZ,aAAa;IACb,MAAM;IACN,SAAS;AACZ,CAAA,CAAC;AAEF;;;;AAIG;AACG,SAAU,mBAAmB,CAC/B,UAAyE,EAAA;AAEzE,IAAA,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;AAC1B,QAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC;AAAE,YAAA,OAAO,IAAI;IAChD;AACA,IAAA,OAAO,KAAK;AAChB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs deleted file mode 100644 index 2c666153..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs +++ /dev/null @@ -1,7 +0,0 @@ -function makeAnimationInstant(options) { - options.duration = 0; - options.type = "keyframes"; -} - -export { makeAnimationInstant }; -//# sourceMappingURL=make-animation-instant.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs.map deleted file mode 100644 index 38fa574e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"make-animation-instant.mjs","sources":["../../../../src/animation/utils/make-animation-instant.ts"],"sourcesContent":["import { ValueAnimationOptions } from \"../types\"\n\nexport function makeAnimationInstant(\n options: Partial<{\n duration: ValueAnimationOptions[\"duration\"]\n type: ValueAnimationOptions[\"type\"]\n }>\n): void {\n options.duration = 0\n options.type = \"keyframes\"\n}\n"],"names":[],"mappings":"AAEM,SAAU,oBAAoB,CAChC,OAGE,EAAA;AAEF,IAAA,OAAO,CAAC,QAAQ,GAAG,CAAC;AACpB,IAAA,OAAO,CAAC,IAAI,GAAG,WAAW;AAC9B;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs deleted file mode 100644 index 5d06ecbd..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs +++ /dev/null @@ -1,19 +0,0 @@ -import { inertia } from '../generators/inertia.mjs'; -import { keyframes } from '../generators/keyframes.mjs'; -import { spring } from '../generators/spring.mjs'; - -const transitionTypeMap = { - decay: inertia, - inertia, - tween: keyframes, - keyframes: keyframes, - spring, -}; -function replaceTransitionType(transition) { - if (typeof transition.type === "string") { - transition.type = transitionTypeMap[transition.type]; - } -} - -export { replaceTransitionType }; -//# sourceMappingURL=replace-transition-type.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs.map deleted file mode 100644 index f196392d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"replace-transition-type.mjs","sources":["../../../../src/animation/utils/replace-transition-type.ts"],"sourcesContent":["import { inertia } from \"../generators/inertia\"\nimport { keyframes } from \"../generators/keyframes\"\nimport { spring } from \"../generators/spring\"\nimport { GeneratorFactory, ValueAnimationTransition } from \"../types\"\n\nconst transitionTypeMap: { [key: string]: GeneratorFactory } = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n}\n\nexport function replaceTransitionType(transition: ValueAnimationTransition) {\n if (typeof transition.type === \"string\") {\n transition.type = transitionTypeMap[transition.type]\n }\n}\n"],"names":[],"mappings":";;;;AAKA,MAAM,iBAAiB,GAAwC;AAC3D,IAAA,KAAK,EAAE,OAAO;IACd,OAAO;AACP,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,SAAS,EAAE,SAAS;IACpB,MAAM;CACT;AAEK,SAAU,qBAAqB,CAAC,UAAoC,EAAA;AACtE,IAAA,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ,EAAE;QACrC,UAAU,CAAC,IAAI,GAAG,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC;IACxD;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs deleted file mode 100644 index c49df0be..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs +++ /dev/null @@ -1,15 +0,0 @@ -/** - * If `transition` has `inherit: true`, shallow-merge it with - * `parentTransition` (child keys win) and strip the `inherit` key. - * Otherwise return `transition` unchanged. - */ -function resolveTransition(transition, parentTransition) { - if (transition?.inherit && parentTransition) { - const { inherit: _, ...rest } = transition; - return { ...parentTransition, ...rest }; - } - return transition; -} - -export { resolveTransition }; -//# sourceMappingURL=resolve-transition.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs.map deleted file mode 100644 index 1e54351a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-transition.mjs","sources":["../../../../src/animation/utils/resolve-transition.ts"],"sourcesContent":["/**\n * If `transition` has `inherit: true`, shallow-merge it with\n * `parentTransition` (child keys win) and strip the `inherit` key.\n * Otherwise return `transition` unchanged.\n */\nexport function resolveTransition(\n transition: any,\n parentTransition?: any\n) {\n if (transition?.inherit && parentTransition) {\n const { inherit: _, ...rest } = transition\n return { ...parentTransition, ...rest }\n }\n\n return transition\n}\n"],"names":[],"mappings":"AAAA;;;;AAIG;AACG,SAAU,iBAAiB,CAC7B,UAAe,EACf,gBAAsB,EAAA;AAEtB,IAAA,IAAI,UAAU,EAAE,OAAO,IAAI,gBAAgB,EAAE;QACzC,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU;AAC1C,QAAA,OAAO,EAAE,GAAG,gBAAgB,EAAE,GAAG,IAAI,EAAE;IAC3C;AAEA,IAAA,OAAO,UAAU;AACrB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs deleted file mode 100644 index 3b9c6869..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`; - -export { cubicBezierAsString }; -//# sourceMappingURL=cubic-bezier.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.map deleted file mode 100644 index dc2f3e44..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cubic-bezier.mjs","sources":["../../../../../src/animation/waapi/easing/cubic-bezier.ts"],"sourcesContent":["import { BezierDefinition } from \"motion-utils\"\n\nexport const cubicBezierAsString = ([a, b, c, d]: BezierDefinition) =>\n `cubic-bezier(${a}, ${b}, ${c}, ${d})`\n"],"names":[],"mappings":"AAEO,MAAM,mBAAmB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAmB,KAC9D,CAAA,aAAA,EAAgB,CAAC,CAAA,EAAA,EAAK,CAAC,CAAA,EAAA,EAAK,CAAC,CAAA,EAAA,EAAK,CAAC,CAAA,CAAA;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs deleted file mode 100644 index 73ec4167..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { isBezierDefinition } from 'motion-utils'; -import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs'; -import { supportedWaapiEasing } from './supported.mjs'; - -function isWaapiSupportedEasing(easing) { - return Boolean((typeof easing === "function" && supportsLinearEasing()) || - !easing || - (typeof easing === "string" && - (easing in supportedWaapiEasing || supportsLinearEasing())) || - isBezierDefinition(easing) || - (Array.isArray(easing) && easing.every(isWaapiSupportedEasing))); -} - -export { isWaapiSupportedEasing }; -//# sourceMappingURL=is-supported.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs.map deleted file mode 100644 index 67bd9938..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-supported.mjs","sources":["../../../../../src/animation/waapi/easing/is-supported.ts"],"sourcesContent":["import { Easing, isBezierDefinition } from \"motion-utils\"\nimport { supportsLinearEasing } from \"../../../utils/supports/linear-easing\"\nimport { supportedWaapiEasing } from \"./supported\"\n\nexport function isWaapiSupportedEasing(easing?: Easing | Easing[]): boolean {\n return Boolean(\n (typeof easing === \"function\" && supportsLinearEasing()) ||\n !easing ||\n (typeof easing === \"string\" &&\n (easing in supportedWaapiEasing || supportsLinearEasing())) ||\n isBezierDefinition(easing) ||\n (Array.isArray(easing) && easing.every(isWaapiSupportedEasing))\n )\n}\n"],"names":[],"mappings":";;;;AAIM,SAAU,sBAAsB,CAAC,MAA0B,EAAA;IAC7D,OAAO,OAAO,CACV,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,oBAAoB,EAAE;AACnD,QAAA,CAAC,MAAM;SACN,OAAO,MAAM,KAAK,QAAQ;AACvB,aAAC,MAAM,IAAI,oBAAoB,IAAI,oBAAoB,EAAE,CAAC,CAAC;QAC/D,kBAAkB,CAAC,MAAM,CAAC;AAC1B,SAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,CACtE;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs deleted file mode 100644 index 49286887..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs +++ /dev/null @@ -1,29 +0,0 @@ -import { isBezierDefinition } from 'motion-utils'; -import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs'; -import { generateLinearEasing } from '../utils/linear.mjs'; -import { cubicBezierAsString } from './cubic-bezier.mjs'; -import { supportedWaapiEasing } from './supported.mjs'; - -function mapEasingToNativeEasing(easing, duration) { - if (!easing) { - return undefined; - } - else if (typeof easing === "function") { - return supportsLinearEasing() - ? generateLinearEasing(easing, duration) - : "ease-out"; - } - else if (isBezierDefinition(easing)) { - return cubicBezierAsString(easing); - } - else if (Array.isArray(easing)) { - return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) || - supportedWaapiEasing.easeOut); - } - else { - return supportedWaapiEasing[easing]; - } -} - -export { mapEasingToNativeEasing }; -//# sourceMappingURL=map-easing.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs.map deleted file mode 100644 index 8a0e028d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map-easing.mjs","sources":["../../../../../src/animation/waapi/easing/map-easing.ts"],"sourcesContent":["import { Easing, isBezierDefinition } from \"motion-utils\"\nimport { supportsLinearEasing } from \"../../../utils/supports/linear-easing\"\nimport { generateLinearEasing } from \"../utils/linear\"\nimport { cubicBezierAsString } from \"./cubic-bezier\"\nimport { supportedWaapiEasing } from \"./supported\"\n\nexport function mapEasingToNativeEasing(\n easing: Easing | Easing[] | undefined,\n duration: number\n): undefined | string | string[] {\n if (!easing) {\n return undefined\n } else if (typeof easing === \"function\") {\n return supportsLinearEasing()\n ? generateLinearEasing(easing, duration)\n : \"ease-out\"\n } else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing)\n } else if (Array.isArray(easing)) {\n return easing.map(\n (segmentEasing) =>\n (mapEasingToNativeEasing(segmentEasing, duration) as string) ||\n supportedWaapiEasing.easeOut\n )\n } else {\n return supportedWaapiEasing[easing as keyof typeof supportedWaapiEasing]\n }\n}\n"],"names":[],"mappings":";;;;;;AAMM,SAAU,uBAAuB,CACnC,MAAqC,EACrC,QAAgB,EAAA;IAEhB,IAAI,CAAC,MAAM,EAAE;AACT,QAAA,OAAO,SAAS;IACpB;AAAO,SAAA,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;AACrC,QAAA,OAAO,oBAAoB;AACvB,cAAE,oBAAoB,CAAC,MAAM,EAAE,QAAQ;cACrC,UAAU;IACpB;AAAO,SAAA,IAAI,kBAAkB,CAAC,MAAM,CAAC,EAAE;AACnC,QAAA,OAAO,mBAAmB,CAAC,MAAM,CAAC;IACtC;AAAO,SAAA,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;AAC9B,QAAA,OAAO,MAAM,CAAC,GAAG,CACb,CAAC,aAAa,KACT,uBAAuB,CAAC,aAAa,EAAE,QAAQ,CAAY;YAC5D,oBAAoB,CAAC,OAAO,CACnC;IACL;SAAO;AACH,QAAA,OAAO,oBAAoB,CAAC,MAA2C,CAAC;IAC5E;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs deleted file mode 100644 index ae315b0c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import { cubicBezierAsString } from './cubic-bezier.mjs'; - -const supportedWaapiEasing = { - linear: "linear", - ease: "ease", - easeIn: "ease-in", - easeOut: "ease-out", - easeInOut: "ease-in-out", - circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]), - circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]), - backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]), - backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]), -}; - -export { supportedWaapiEasing }; -//# sourceMappingURL=supported.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs.map deleted file mode 100644 index 686bcd7b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"supported.mjs","sources":["../../../../../src/animation/waapi/easing/supported.ts"],"sourcesContent":["import { cubicBezierAsString } from \"./cubic-bezier\"\n\nexport const supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n}\n"],"names":[],"mappings":";;AAEO,MAAM,oBAAoB,GAAG;AAChC,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,SAAS,EAAE,aAAa;AACxB,IAAA,MAAM,gBAAgB,mBAAmB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC7D,IAAA,OAAO,gBAAgB,mBAAmB,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;AAC9D,IAAA,MAAM,gBAAgB,mBAAmB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACpE,IAAA,OAAO,gBAAgB,mBAAmB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs deleted file mode 100644 index f6448316..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs +++ /dev/null @@ -1,40 +0,0 @@ -import { activeAnimations } from '../../stats/animation-count.mjs'; -import { statsBuffer } from '../../stats/buffer.mjs'; -import { mapEasingToNativeEasing } from './easing/map-easing.mjs'; - -function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = "loop", ease = "easeOut", times, } = {}, pseudoElement = undefined) { - const keyframeOptions = { - [valueName]: keyframes, - }; - if (times) - keyframeOptions.offset = times; - const easing = mapEasingToNativeEasing(ease, duration); - /** - * If this is an easing array, apply to keyframes, not animation as a whole - */ - if (Array.isArray(easing)) - keyframeOptions.easing = easing; - if (statsBuffer.value) { - activeAnimations.waapi++; - } - const options = { - delay, - duration, - easing: !Array.isArray(easing) ? easing : "linear", - fill: "both", - iterations: repeat + 1, - direction: repeatType === "reverse" ? "alternate" : "normal", - }; - if (pseudoElement) - options.pseudoElement = pseudoElement; - const animation = element.animate(keyframeOptions, options); - if (statsBuffer.value) { - animation.finished.finally(() => { - activeAnimations.waapi--; - }); - } - return animation; -} - -export { startWaapiAnimation }; -//# sourceMappingURL=start-waapi-animation.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.map deleted file mode 100644 index f012d6db..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"start-waapi-animation.mjs","sources":["../../../../src/animation/waapi/start-waapi-animation.ts"],"sourcesContent":["import { activeAnimations } from \"../../stats/animation-count\"\nimport { statsBuffer } from \"../../stats/buffer\"\nimport { ValueKeyframesDefinition, ValueTransition } from \"../types\"\nimport { mapEasingToNativeEasing } from \"./easing/map-easing\"\n\nexport function startWaapiAnimation(\n element: Element,\n valueName: string,\n keyframes: ValueKeyframesDefinition,\n {\n delay = 0,\n duration = 300,\n repeat = 0,\n repeatType = \"loop\",\n ease = \"easeOut\",\n times,\n }: ValueTransition = {},\n pseudoElement: string | undefined = undefined\n) {\n const keyframeOptions: PropertyIndexedKeyframes = {\n [valueName]: keyframes as string[],\n }\n if (times) keyframeOptions.offset = times\n\n const easing = mapEasingToNativeEasing(ease, duration)\n\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing)) keyframeOptions.easing = easing\n\n if (statsBuffer.value) {\n activeAnimations.waapi++\n }\n\n const options: KeyframeAnimationOptions = {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n }\n\n if (pseudoElement) options.pseudoElement = pseudoElement\n\n const animation = element.animate(keyframeOptions, options)\n\n if (statsBuffer.value) {\n animation.finished.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C,KAAK,EAAE;AAC5B,QAAA,CAAC,CAAC;IACN;AAEA,IAAA,OAAO,SAAS;AACpB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs deleted file mode 100644 index 8250ebb3..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { memo } from 'motion-utils'; - -const supportsPartialKeyframes = /*@__PURE__*/ memo(() => { - try { - document.createElement("div").animate({ opacity: [1] }); - } - catch (e) { - return false; - } - return true; -}); - -export { supportsPartialKeyframes }; -//# sourceMappingURL=partial-keyframes.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs.map deleted file mode 100644 index f345259c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partial-keyframes.mjs","sources":["../../../../../src/animation/waapi/supports/partial-keyframes.ts"],"sourcesContent":["import { memo } from \"motion-utils\"\n\nexport const supportsPartialKeyframes = /*@__PURE__*/ memo(() => {\n try {\n document.createElement(\"div\").animate({ opacity: [1] })\n } catch (e) {\n return false\n }\n return true\n})\n"],"names":[],"mappings":";;MAEa,wBAAwB,iBAAiB,IAAI,CAAC,MAAK;AAC5D,IAAA,IAAI;AACA,QAAA,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D;IAAE,OAAO,CAAC,EAAE;AACR,QAAA,OAAO,KAAK;IAChB;AACA,IAAA,OAAO,IAAI;AACf,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs deleted file mode 100644 index fdd80c49..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs +++ /dev/null @@ -1,53 +0,0 @@ -import { memo } from 'motion-utils'; -import { acceleratedValues } from '../utils/accelerated-values.mjs'; -import { hasBrowserOnlyColors } from '../utils/is-browser-color.mjs'; - -const colorProperties = new Set([ - "color", - "backgroundColor", - "outlineColor", - "fill", - "stroke", - "borderColor", - "borderTopColor", - "borderRightColor", - "borderBottomColor", - "borderLeftColor", -]); -const supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate")); -function supportsBrowserAnimation(options) { - const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options; - const subject = motionValue?.owner?.current; - /** - * We use this check instead of isHTMLElement() because we explicitly - * **don't** want elements in different timing contexts (i.e. popups) - * to be accelerated, as it's not possible to sync these animations - * properly with those driven from the main window frameloop. - */ - if (!(subject instanceof HTMLElement)) { - return false; - } - const { onUpdate, transformTemplate } = motionValue.owner.getProps(); - return (supportsWaapi() && - name && - /** - * Force WAAPI for color properties with browser-only color formats - * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse. - */ - (acceleratedValues.has(name) || - (colorProperties.has(name) && - hasBrowserOnlyColors(keyframes))) && - (name !== "transform" || !transformTemplate) && - /** - * If we're outputting values to onUpdate then we can't use WAAPI as there's - * no way to read the value from WAAPI every frame. - */ - !onUpdate && - !repeatDelay && - repeatType !== "mirror" && - damping !== 0 && - type !== "inertia"); -} - -export { supportsBrowserAnimation }; -//# sourceMappingURL=waapi.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.map deleted file mode 100644 index 13cf64b9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"waapi.mjs","sources":["../../../../../src/animation/waapi/supports/waapi.ts"],"sourcesContent":["import { memo } from \"motion-utils\"\nimport {\n AnyResolvedKeyframe,\n ValueAnimationOptionsWithRenderContext,\n} from \"../../types\"\nimport { acceleratedValues } from \"../utils/accelerated-values\"\nimport { hasBrowserOnlyColors } from \"../utils/is-browser-color\"\n\nconst colorProperties = new Set([\n \"color\",\n \"backgroundColor\",\n \"outlineColor\",\n \"fill\",\n \"stroke\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n])\n\nconst supportsWaapi = /*@__PURE__*/ memo(() =>\n Object.hasOwnProperty.call(Element.prototype, \"animate\")\n)\n\nexport function supportsBrowserAnimation(\n options: ValueAnimationOptionsWithRenderContext\n) {\n const {\n motionValue,\n name,\n repeatDelay,\n repeatType,\n damping,\n type,\n keyframes,\n } = options\n\n const subject = motionValue?.owner?.current\n\n /**\n * We use this check instead of isHTMLElement() because we explicitly\n * **don't** want elements in different timing contexts (i.e. popups)\n * to be accelerated, as it's not possible to sync these animations\n * properly with those driven from the main window frameloop.\n */\n if (!(subject instanceof HTMLElement)) {\n return false\n }\n\n const { onUpdate, transformTemplate } = motionValue!.owner!.getProps()\n\n return (\n supportsWaapi() &&\n name &&\n /**\n * Force WAAPI for color properties with browser-only color formats\n * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n */\n (acceleratedValues.has(name) ||\n (colorProperties.has(name) &&\n hasBrowserOnlyColors(keyframes))) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\"\n )\n}\n"],"names":[],"mappings":";;;;AAQA,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC5B,OAAO;IACP,iBAAiB;IACjB,cAAc;IACd,MAAM;IACN,QAAQ;IACR,aAAa;IACb,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;AACpB,CAAA,CAAC;AAEF,MAAM,aAAa,iBAAiB,IAAI,CAAC,MACrC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAC3D;AAEK,SAAU,wBAAwB,CACpC,OAAkD,EAAA;AAElD,IAAA,MAAM,EACF,WAAW,EACX,IAAI,EACJ,WAAW,EACX,UAAU,EACV,OAAO,EACP,IAAI,EACJ,SAAS,GACZ,GAAG,OAAO;AAEX,IAAA,MAAM,OAAO,GAAG,WAAW,EAAE,KAAK,EAAE,OAAO;AAE3C;;;;;AAKG;AACH,IAAA,IAAI,EAAE,OAAO,YAAY,WAAW,CAAC,EAAE;AACnC,QAAA,OAAO,KAAK;IAChB;AAEA,IAAA,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,WAAY,CAAC,KAAM,CAAC,QAAQ,EAAE;IAEtE,QACI,aAAa,EAAE;QACf,IAAI;AACJ;;;AAGG;AACH,SAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC;AACxB,aAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC;AACtB,gBAAA,oBAAoB,CAAC,SAAS,CAAC,CAAC,CAAC;AACzC,SAAC,IAAI,KAAK,WAAW,IAAI,CAAC,iBAAiB,CAAC;AAC5C;;;AAGG;AACH,QAAA,CAAC,QAAQ;AACT,QAAA,CAAC,WAAW;AACZ,QAAA,UAAU,KAAK,QAAQ;AACvB,QAAA,OAAO,KAAK,CAAC;QACb,IAAI,KAAK,SAAS;AAE1B;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs deleted file mode 100644 index c61bf0e7..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs +++ /dev/null @@ -1,15 +0,0 @@ -/** - * A list of values that can be hardware-accelerated. - */ -const acceleratedValues = new Set([ - "opacity", - "clipPath", - "filter", - "transform", - // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved - // or until we implement support for linear() easing. - // "background-color" -]); - -export { acceleratedValues }; -//# sourceMappingURL=accelerated-values.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.map deleted file mode 100644 index b18c13a1..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"accelerated-values.mjs","sources":["../../../../../src/animation/waapi/utils/accelerated-values.ts"],"sourcesContent":["/**\n * A list of values that can be hardware-accelerated.\n */\nexport const acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved\n // or until we implement support for linear() easing.\n // \"background-color\"\n])\n"],"names":[],"mappings":"AAAA;;AAEG;AACI,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAS;IAC7C,SAAS;IACT,UAAU;IACV,QAAQ;IACR,WAAW;;;;AAId,CAAA;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs deleted file mode 100644 index 6a828d7e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs'; -import { isGenerator } from '../../generators/utils/is-generator.mjs'; - -function applyGeneratorOptions({ type, ...options }) { - if (isGenerator(type) && supportsLinearEasing()) { - return type.applyToOptions(options); - } - else { - options.duration ?? (options.duration = 300); - options.ease ?? (options.ease = "easeOut"); - } - return options; -} - -export { applyGeneratorOptions }; -//# sourceMappingURL=apply-generator.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.map deleted file mode 100644 index 27221eda..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"apply-generator.mjs","sources":["../../../../../src/animation/waapi/utils/apply-generator.ts"],"sourcesContent":["import { ValueTransition } from \"../../../animation/types\"\nimport { supportsLinearEasing } from \"../../../utils/supports/linear-easing\"\nimport { isGenerator } from \"../../generators/utils/is-generator\"\n\nexport function applyGeneratorOptions({\n type,\n ...options\n}: ValueTransition): ValueTransition {\n if (isGenerator(type) && supportsLinearEasing()) {\n return type.applyToOptions!(options)\n } else {\n options.duration ??= 300\n options.ease ??= \"easeOut\"\n }\n\n return options\n}\n"],"names":[],"mappings":";;;AAIM,SAAU,qBAAqB,CAAC,EAClC,IAAI,EACJ,GAAG,OAAO,EACI,EAAA;IACd,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,oBAAoB,EAAE,EAAE;AAC7C,QAAA,OAAO,IAAI,CAAC,cAAe,CAAC,OAAO,CAAC;IACxC;SAAO;QACH,OAAO,CAAC,QAAQ,KAAhB,OAAO,CAAC,QAAQ,GAAK,GAAG,CAAA;QACxB,OAAO,CAAC,IAAI,KAAZ,OAAO,CAAC,IAAI,GAAK,SAAS,CAAA;IAC9B;AAEA,IAAA,OAAO,OAAO;AAClB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs deleted file mode 100644 index fa9eca81..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs +++ /dev/null @@ -1,13 +0,0 @@ -const browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/; -function hasBrowserOnlyColors(keyframes) { - for (let i = 0; i < keyframes.length; i++) { - if (typeof keyframes[i] === "string" && - browserColorFunctions.test(keyframes[i])) { - return true; - } - } - return false; -} - -export { hasBrowserOnlyColors }; -//# sourceMappingURL=is-browser-color.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs.map deleted file mode 100644 index d54d58e9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-browser-color.mjs","sources":["../../../../../src/animation/waapi/utils/is-browser-color.ts"],"sourcesContent":["const browserColorFunctions =\n /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\\(/\n\nexport function hasBrowserOnlyColors(keyframes: any[]): boolean {\n for (let i = 0; i < keyframes.length; i++) {\n if (\n typeof keyframes[i] === \"string\" &&\n browserColorFunctions.test(keyframes[i])\n ) {\n return true\n }\n }\n return false\n}\n"],"names":[],"mappings":"AAAA,MAAM,qBAAqB,GACvB,uDAAuD;AAErD,SAAU,oBAAoB,CAAC,SAAgB,EAAA;AACjD,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACvC,QAAA,IACI,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,QAAQ;YAChC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC1C;AACE,YAAA,OAAO,IAAI;QACf;IACJ;AACA,IAAA,OAAO,KAAK;AAChB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs deleted file mode 100644 index 7cb72e22..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs +++ /dev/null @@ -1,13 +0,0 @@ -const generateLinearEasing = (easing, duration, // as milliseconds -resolution = 10 // as milliseconds -) => { - let points = ""; - const numPoints = Math.max(Math.round(duration / resolution), 2); - for (let i = 0; i < numPoints; i++) { - points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + ", "; - } - return `linear(${points.substring(0, points.length - 2)})`; -}; - -export { generateLinearEasing }; -//# sourceMappingURL=linear.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.map deleted file mode 100644 index 5de407c6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linear.mjs","sources":["../../../../../src/animation/waapi/utils/linear.ts"],"sourcesContent":["import { EasingFunction } from \"motion-utils\"\n\nexport const generateLinearEasing = (\n easing: EasingFunction,\n duration: number, // as milliseconds\n resolution: number = 10 // as milliseconds\n): string => {\n let points = \"\"\n const numPoints = Math.max(Math.round(duration / resolution), 2)\n\n for (let i = 0; i < numPoints; i++) {\n points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + \", \"\n }\n\n return `linear(${points.substring(0, points.length - 2)})`\n}\n"],"names":[],"mappings":"MAEa,oBAAoB,GAAG,CAChC,MAAsB,EACtB,QAAgB;AAChB,UAAA,GAAqB,EAAE;KACf;IACR,IAAI,MAAM,GAAG,EAAE;AACf,IAAA,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;AAEhE,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;QAChC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI;IAC5E;AAEA,IAAA,OAAO,CAAA,OAAA,EAAU,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG;AAC9D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/px-values.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/px-values.mjs deleted file mode 100644 index 16bce8d8..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/px-values.mjs +++ /dev/null @@ -1,60 +0,0 @@ -const pxValues = new Set([ - // Border props - "borderWidth", - "borderTopWidth", - "borderRightWidth", - "borderBottomWidth", - "borderLeftWidth", - "borderRadius", - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomRightRadius", - "borderBottomLeftRadius", - // Positioning props - "width", - "maxWidth", - "height", - "maxHeight", - "top", - "right", - "bottom", - "left", - "inset", - "insetBlock", - "insetBlockStart", - "insetBlockEnd", - "insetInline", - "insetInlineStart", - "insetInlineEnd", - // Spacing props - "padding", - "paddingTop", - "paddingRight", - "paddingBottom", - "paddingLeft", - "paddingBlock", - "paddingBlockStart", - "paddingBlockEnd", - "paddingInline", - "paddingInlineStart", - "paddingInlineEnd", - "margin", - "marginTop", - "marginRight", - "marginBottom", - "marginLeft", - "marginBlock", - "marginBlockStart", - "marginBlockEnd", - "marginInline", - "marginInlineStart", - "marginInlineEnd", - // Typography - "fontSize", - // Misc - "backgroundPositionX", - "backgroundPositionY", -]); - -export { pxValues }; -//# sourceMappingURL=px-values.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/px-values.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/px-values.mjs.map deleted file mode 100644 index 5955a9c6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/px-values.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"px-values.mjs","sources":["../../../../../src/animation/waapi/utils/px-values.ts"],"sourcesContent":["export const pxValues = new Set([\n // Border props\n \"borderWidth\",\n \"borderTopWidth\",\n \"borderRightWidth\",\n \"borderBottomWidth\",\n \"borderLeftWidth\",\n \"borderRadius\",\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\",\n \"borderBottomLeftRadius\",\n // Positioning props\n \"width\",\n \"maxWidth\",\n \"height\",\n \"maxHeight\",\n \"top\",\n \"right\",\n \"bottom\",\n \"left\",\n \"inset\",\n \"insetBlock\",\n \"insetBlockStart\",\n \"insetBlockEnd\",\n \"insetInline\",\n \"insetInlineStart\",\n \"insetInlineEnd\",\n // Spacing props\n \"padding\",\n \"paddingTop\",\n \"paddingRight\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"paddingBlock\",\n \"paddingBlockStart\",\n \"paddingBlockEnd\",\n \"paddingInline\",\n \"paddingInlineStart\",\n \"paddingInlineEnd\",\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n \"marginBlock\",\n \"marginBlockStart\",\n \"marginBlockEnd\",\n \"marginInline\",\n \"marginInlineStart\",\n \"marginInlineEnd\",\n // Typography\n \"fontSize\",\n // Misc\n \"backgroundPositionX\",\n \"backgroundPositionY\",\n])\n"],"names":[],"mappings":"AAAO,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC;;IAE5B,aAAa;IACb,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,qBAAqB;IACrB,sBAAsB;IACtB,yBAAyB;IACzB,wBAAwB;;IAExB,OAAO;IACP,UAAU;IACV,QAAQ;IACR,WAAW;IACX,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,OAAO;IACP,YAAY;IACZ,iBAAiB;IACjB,eAAe;IACf,aAAa;IACb,kBAAkB;IAClB,gBAAgB;;IAEhB,SAAS;IACT,YAAY;IACZ,cAAc;IACd,eAAe;IACf,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,iBAAiB;IACjB,eAAe;IACf,oBAAoB;IACpB,kBAAkB;IAClB,QAAQ;IACR,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;IACZ,aAAa;IACb,kBAAkB;IAClB,gBAAgB;IAChB,cAAc;IACd,mBAAmB;IACnB,iBAAiB;;IAEjB,UAAU;;IAEV,qBAAqB;IACrB,qBAAqB;AACxB,CAAA;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs deleted file mode 100644 index b6415878..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs +++ /dev/null @@ -1,19 +0,0 @@ -import { circInOut, backInOut, anticipate } from 'motion-utils'; - -const unsupportedEasingFunctions = { - anticipate, - backInOut, - circInOut, -}; -function isUnsupportedEase(key) { - return key in unsupportedEasingFunctions; -} -function replaceStringEasing(transition) { - if (typeof transition.ease === "string" && - isUnsupportedEase(transition.ease)) { - transition.ease = unsupportedEasingFunctions[transition.ease]; - } -} - -export { replaceStringEasing }; -//# sourceMappingURL=unsupported-easing.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs.map deleted file mode 100644 index de1539f3..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"unsupported-easing.mjs","sources":["../../../../../src/animation/waapi/utils/unsupported-easing.ts"],"sourcesContent":["import { anticipate, backInOut, circInOut } from \"motion-utils\"\nimport { ValueAnimationTransition } from \"../../types\"\n\nconst unsupportedEasingFunctions = {\n anticipate,\n backInOut,\n circInOut,\n}\n\nfunction isUnsupportedEase(\n key: string\n): key is keyof typeof unsupportedEasingFunctions {\n return key in unsupportedEasingFunctions\n}\n\nexport function replaceStringEasing(transition: ValueAnimationTransition) {\n if (\n typeof transition.ease === \"string\" &&\n isUnsupportedEase(transition.ease)\n ) {\n transition.ease = unsupportedEasingFunctions[transition.ease]\n }\n}\n"],"names":[],"mappings":";;AAGA,MAAM,0BAA0B,GAAG;IAC/B,UAAU;IACV,SAAS;IACT,SAAS;CACZ;AAED,SAAS,iBAAiB,CACtB,GAAW,EAAA;IAEX,OAAO,GAAG,IAAI,0BAA0B;AAC5C;AAEM,SAAU,mBAAmB,CAAC,UAAoC,EAAA;AACpE,IAAA,IACI,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;AACnC,QAAA,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,EACpC;QACE,UAAU,CAAC,IAAI,GAAG,0BAA0B,CAAC,UAAU,CAAC,IAAI,CAAC;IACjE;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/MotionValueState.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/MotionValueState.mjs deleted file mode 100644 index 908922d5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/MotionValueState.mjs +++ /dev/null @@ -1,43 +0,0 @@ -import { frame, cancelFrame } from '../frameloop/frame.mjs'; -import { numberValueTypes } from '../value/types/maps/number.mjs'; -import { getValueAsType } from '../value/types/utils/get-as-type.mjs'; - -class MotionValueState { - constructor() { - this.latest = {}; - this.values = new Map(); - } - set(name, value, render, computed, useDefaultValueType = true) { - const existingValue = this.values.get(name); - if (existingValue) { - existingValue.onRemove(); - } - const onChange = () => { - const v = value.get(); - if (useDefaultValueType) { - this.latest[name] = getValueAsType(v, numberValueTypes[name]); - } - else { - this.latest[name] = v; - } - render && frame.render(render); - }; - onChange(); - const cancelOnChange = value.on("change", onChange); - computed && value.addDependent(computed); - const remove = () => { - cancelOnChange(); - render && cancelFrame(render); - this.values.delete(name); - computed && value.removeDependent(computed); - }; - this.values.set(name, { value, onRemove: remove }); - return remove; - } - get(name) { - return this.values.get(name)?.value; - } -} - -export { MotionValueState }; -//# sourceMappingURL=MotionValueState.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/MotionValueState.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/MotionValueState.mjs.map deleted file mode 100644 index c59b390f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/MotionValueState.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MotionValueState.mjs","sources":["../../../src/effects/MotionValueState.ts"],"sourcesContent":["import { AnyResolvedKeyframe } from \"../animation/types\"\nimport { cancelFrame, frame } from \"../frameloop/frame\"\nimport { MotionValue } from \"../value\"\nimport { numberValueTypes } from \"../value/types/maps/number\"\nimport { getValueAsType } from \"../value/types/utils/get-as-type\"\n\nexport class MotionValueState {\n latest: { [name: string]: AnyResolvedKeyframe } = {}\n\n private values = new Map<\n string,\n { value: MotionValue; onRemove: VoidFunction }\n >()\n\n set(\n name: string,\n value: MotionValue,\n render?: VoidFunction,\n computed?: MotionValue,\n useDefaultValueType = true\n ) {\n const existingValue = this.values.get(name)\n\n if (existingValue) {\n existingValue.onRemove()\n }\n\n const onChange = () => {\n const v = value.get()\n\n if (useDefaultValueType) {\n this.latest[name] = getValueAsType(v, numberValueTypes[name])\n } else {\n this.latest[name] = v\n }\n\n render && frame.render(render)\n }\n\n onChange()\n\n const cancelOnChange = value.on(\"change\", onChange)\n\n computed && value.addDependent(computed)\n\n const remove = () => {\n cancelOnChange()\n render && cancelFrame(render)\n this.values.delete(name)\n computed && value.removeDependent(computed)\n }\n\n this.values.set(name, { value, onRemove: remove })\n\n return remove\n }\n\n get(name: string): MotionValue | undefined {\n return this.values.get(name)?.value\n }\n}\n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,IAAI,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAElD,QAAA,OAAO,MAAM;IACjB;AAEA,IAAA,GAAG,CAAC,IAAY,EAAA;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK;IACvC;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/attr/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/attr/index.mjs deleted file mode 100644 index 08067fd3..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/attr/index.mjs +++ /dev/null @@ -1,42 +0,0 @@ -import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs'; -import { createSelectorEffect } from '../utils/create-dom-effect.mjs'; -import { createEffect } from '../utils/create-effect.mjs'; - -function canSetAsProperty(element, name) { - if (!(name in element)) - return false; - const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) || - Object.getOwnPropertyDescriptor(element, name); - // Check if it has a setter - return descriptor && typeof descriptor.set === "function"; -} -const addAttrValue = (element, state, key, value) => { - const isProp = canSetAsProperty(element, key); - const name = isProp - ? key - : key.startsWith("data") || key.startsWith("aria") - ? camelToDash(key) - : key; - /** - * Set attribute directly via property if available - */ - const render = isProp - ? () => { - element[name] = state.latest[key]; - } - : () => { - const v = state.latest[key]; - if (v === null || v === undefined) { - element.removeAttribute(name); - } - else { - element.setAttribute(name, String(v)); - } - }; - return state.set(key, value, render); -}; -const attrEffect = /*@__PURE__*/ createSelectorEffect( -/*@__PURE__*/ createEffect(addAttrValue)); - -export { addAttrValue, attrEffect }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/attr/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/attr/index.mjs.map deleted file mode 100644 index da48db27..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/attr/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/effects/attr/index.ts"],"sourcesContent":["import { camelToDash } from \"../../render/dom/utils/camel-to-dash\"\nimport { MotionValue } from \"../../value\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { createSelectorEffect } from \"../utils/create-dom-effect\"\nimport { createEffect } from \"../utils/create-effect\"\n\nfunction canSetAsProperty(element: HTMLElement | SVGElement, name: string) {\n if (!(name in element)) return false\n\n const descriptor =\n Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) ||\n Object.getOwnPropertyDescriptor(element, name)\n\n // Check if it has a setter\n return descriptor && typeof descriptor.set === \"function\"\n}\n\nexport const addAttrValue = (\n element: HTMLElement | SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) => {\n const isProp = canSetAsProperty(element, key)\n const name = isProp\n ? key\n : key.startsWith(\"data\") || key.startsWith(\"aria\")\n ? camelToDash(key)\n : key\n\n /**\n * Set attribute directly via property if available\n */\n const render = isProp\n ? () => {\n ;(element as any)[name] = state.latest[key]\n }\n : () => {\n const v = state.latest[key]\n if (v === null || v === undefined) {\n element.removeAttribute(name)\n } else {\n element.setAttribute(name, String(v))\n }\n }\n\n return state.set(key, value, render)\n}\n\nexport const attrEffect = /*@__PURE__*/ createSelectorEffect(\n /*@__PURE__*/ createEffect(addAttrValue)\n)\n"],"names":[],"mappings":";;;;AAMA,SAAS,gBAAgB,CAAC,OAAiC,EAAE,IAAY,EAAA;AACrE,IAAA,IAAI,EAAE,IAAI,IAAI,OAAO,CAAC;AAAE,QAAA,OAAO,KAAK;AAEpC,IAAA,MAAM,UAAU,GACZ,MAAM,CAAC,wBAAwB,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC;AACrE,QAAA,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC;;IAGlD,OAAO,UAAU,IAAI,OAAO,UAAU,CAAC,GAAG,KAAK,UAAU;AAC7D;AAEO,MAAM,YAAY,GAAG,CACxB,OAAiC,EACjC,KAAuB,EACvB,GAAW,EACX,KAAkB,KAClB;IACA,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC;IAC7C,MAAM,IAAI,GAAG;AACT,UAAE;AACF,UAAE,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM;AACjD,cAAE,WAAW,CAAC,GAAG;cACf,GAAG;AAET;;AAEG;IACH,MAAM,MAAM,GAAG;UACT,MAAK;YACC,OAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;QAC/C;UACA,MAAK;YACD,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;YAC3B,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,EAAE;AAC/B,gBAAA,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;YACjC;iBAAO;gBACH,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;YACzC;AACJ,QAAA,CAAC;IAEP,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC;AACxC;AAEO,MAAM,UAAU,iBAAiB,oBAAoB;AACxD,cAAc,YAAY,CAAC,YAAY,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/prop/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/prop/index.mjs deleted file mode 100644 index 2b5e9884..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/prop/index.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { createEffect } from '../utils/create-effect.mjs'; - -const propEffect = /*@__PURE__*/ createEffect((subject, state, key, value) => { - return state.set(key, value, () => { - subject[key] = state.latest[key]; - }, undefined, false); -}); - -export { propEffect }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/prop/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/prop/index.mjs.map deleted file mode 100644 index b1705c06..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/prop/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/effects/prop/index.ts"],"sourcesContent":["import { MotionValue } from \"../../value\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { createEffect } from \"../utils/create-effect\"\n\nexport const propEffect = /*@__PURE__*/ createEffect(\n (\n subject: { [key: string]: any },\n state: MotionValueState,\n key: string,\n value: MotionValue\n ) => {\n return state.set(\n key,\n value,\n () => {\n subject[key] = state.latest[key]\n },\n undefined,\n false\n )\n }\n)\n"],"names":[],"mappings":";;AAIO,MAAM,UAAU,iBAAiB,YAAY,CAChD,CACI,OAA+B,EAC/B,KAAuB,EACvB,GAAW,EACX,KAAkB,KAClB;IACA,OAAO,KAAK,CAAC,GAAG,CACZ,GAAG,EACH,KAAK,EACL,MAAK;QACD,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;AACpC,IAAA,CAAC,EACD,SAAS,EACT,KAAK,CACR;AACL,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/index.mjs deleted file mode 100644 index a7e290c6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/index.mjs +++ /dev/null @@ -1,53 +0,0 @@ -import { isCSSVar } from '../../render/dom/is-css-var.mjs'; -import { transformProps } from '../../render/utils/keys-transform.mjs'; -import { isHTMLElement } from '../../utils/is-html-element.mjs'; -import { MotionValue } from '../../value/index.mjs'; -import { createSelectorEffect } from '../utils/create-dom-effect.mjs'; -import { createEffect } from '../utils/create-effect.mjs'; -import { buildTransform } from './transform.mjs'; - -const originProps = new Set(["originX", "originY", "originZ"]); -const addStyleValue = (element, state, key, value) => { - let render = undefined; - let computed = undefined; - if (transformProps.has(key)) { - if (!state.get("transform")) { - // If this is an HTML element, we need to set the transform-box to fill-box - // to normalise the transform relative to the element's bounding box - if (!isHTMLElement(element) && !state.get("transformBox")) { - addStyleValue(element, state, "transformBox", new MotionValue("fill-box")); - } - state.set("transform", new MotionValue("none"), () => { - element.style.transform = buildTransform(state); - }); - } - computed = state.get("transform"); - } - else if (originProps.has(key)) { - if (!state.get("transformOrigin")) { - state.set("transformOrigin", new MotionValue(""), () => { - const originX = state.latest.originX ?? "50%"; - const originY = state.latest.originY ?? "50%"; - const originZ = state.latest.originZ ?? 0; - element.style.transformOrigin = `${originX} ${originY} ${originZ}`; - }); - } - computed = state.get("transformOrigin"); - } - else if (isCSSVar(key)) { - render = () => { - element.style.setProperty(key, state.latest[key]); - }; - } - else { - render = () => { - element.style[key] = state.latest[key]; - }; - } - return state.set(key, value, render, computed); -}; -const styleEffect = /*@__PURE__*/ createSelectorEffect( -/*@__PURE__*/ createEffect(addStyleValue)); - -export { addStyleValue, styleEffect }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/index.mjs.map deleted file mode 100644 index 7e53ba07..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/effects/style/index.ts"],"sourcesContent":["import { isCSSVar } from \"../../render/dom/is-css-var\"\nimport { transformProps } from \"../../render/utils/keys-transform\"\nimport { isHTMLElement } from \"../../utils/is-html-element\"\nimport { MotionValue } from \"../../value\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { createSelectorEffect } from \"../utils/create-dom-effect\"\nimport { createEffect } from \"../utils/create-effect\"\nimport { buildTransform } from \"./transform\"\n\nconst originProps = new Set([\"originX\", \"originY\", \"originZ\"])\n\nexport const addStyleValue = (\n element: HTMLElement | SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) => {\n let render: VoidFunction | undefined = undefined\n let computed: MotionValue | undefined = undefined\n\n if (transformProps.has(key)) {\n if (!state.get(\"transform\")) {\n // If this is an HTML element, we need to set the transform-box to fill-box\n // to normalise the transform relative to the element's bounding box\n if (!isHTMLElement(element) && !state.get(\"transformBox\")) {\n addStyleValue(\n element,\n state,\n \"transformBox\",\n new MotionValue(\"fill-box\")\n )\n }\n\n state.set(\"transform\", new MotionValue(\"none\"), () => {\n element.style.transform = buildTransform(state)\n })\n }\n\n computed = state.get(\"transform\")\n } else if (originProps.has(key)) {\n if (!state.get(\"transformOrigin\")) {\n state.set(\"transformOrigin\", new MotionValue(\"\"), () => {\n const originX = state.latest.originX ?? \"50%\"\n const originY = state.latest.originY ?? \"50%\"\n const originZ = state.latest.originZ ?? 0\n element.style.transformOrigin = `${originX} ${originY} ${originZ}`\n })\n }\n\n computed = state.get(\"transformOrigin\")\n } else if (isCSSVar(key)) {\n render = () => {\n element.style.setProperty(key, state.latest[key] as string)\n }\n } else {\n render = () => {\n element.style[key as any] = state.latest[key] as string\n }\n }\n\n return state.set(key, value, render, computed)\n}\n\nexport const styleEffect = /*@__PURE__*/ createSelectorEffect(\n /*@__PURE__*/ createEffect(addStyleValue)\n)\n"],"names":[],"mappings":";;;;;;;;AASA,MAAM,WAAW,GAAG,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CAAC,KAAK,CAAC,eAAe,GAAG,CAAA,EAAG,OAAO,CAAA,CAAA,EAAI,OAAO,CAAA,CAAA,EAAI,OAAO,CAAA,CAAE;AACtE,YAAA,CAAC,CAAC;QACN;AAEA,QAAA,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC;IAC3C;AAAO,SAAA,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE;QACtB,MAAM,GAAG,MAAK;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAW,CAAC;AAC/D,QAAA,CAAC;IACL;SAAO;QACH,MAAM,GAAG,MAAK;AACV,YAAA,OAAO,CAAC,KAAK,CAAC,GAAU,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAW;AAC3D,QAAA,CAAC;IACL;AAEA,IAAA,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC;AAClD;AAEO,MAAM,WAAW,iBAAiB,oBAAoB;AACzD,cAAc,YAAY,CAAC,aAAa,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/transform.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/transform.mjs deleted file mode 100644 index ccb5c63a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/transform.mjs +++ /dev/null @@ -1,48 +0,0 @@ -import { transformPropOrder } from '../../render/utils/keys-transform.mjs'; - -const translateAlias = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective", -}; -function buildTransform(state) { - let transform = ""; - let transformIsDefault = true; - /** - * Loop over all possible transforms in order, adding the ones that - * are present to the transform string. - */ - for (let i = 0; i < transformPropOrder.length; i++) { - const key = transformPropOrder[i]; - const value = state.latest[key]; - if (value === undefined) - continue; - let valueIsDefault = true; - if (typeof value === "number") { - valueIsDefault = value === (key.startsWith("scale") ? 1 : 0); - } - else { - const parsed = parseFloat(value); - valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0; - } - if (!valueIsDefault) { - transformIsDefault = false; - const transformName = translateAlias[key] || key; - transform += `${transformName}(${value}) `; - } - } - // See build-transform.ts: additive `rotate()` so user `rotate` isn't - // clobbered. Not a `transformPropOrder` slot. - const pathRotation = state.latest.pathRotation; - if (pathRotation) { - transformIsDefault = false; - transform += `rotate(${typeof pathRotation === "number" - ? `${pathRotation}deg` - : pathRotation}) `; - } - return transformIsDefault ? "none" : transform.trim(); -} - -export { buildTransform }; -//# sourceMappingURL=transform.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/transform.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/transform.mjs.map deleted file mode 100644 index 8553fb47..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/style/transform.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transform.mjs","sources":["../../../../src/effects/style/transform.ts"],"sourcesContent":["import { transformPropOrder } from \"../../render/utils/keys-transform\"\nimport { MotionValueState } from \"../MotionValueState\"\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n}\n\nexport function buildTransform(state: MotionValueState) {\n let transform = \"\"\n let transformIsDefault = true\n\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < transformPropOrder.length; i++) {\n const key = transformPropOrder[i] as keyof typeof translateAlias\n const value = state.latest[key]\n\n if (value === undefined) continue\n\n let valueIsDefault = true\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0)\n } else {\n const parsed = parseFloat(value)\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0\n }\n\n if (!valueIsDefault) {\n transformIsDefault = false\n const transformName = translateAlias[key] || key\n transform += `${transformName}(${value}) `\n }\n }\n\n // See build-transform.ts: additive `rotate()` so user `rotate` isn't\n // clobbered. Not a `transformPropOrder` slot.\n const pathRotation = state.latest.pathRotation\n if (pathRotation) {\n transformIsDefault = false\n transform += `rotate(${\n typeof pathRotation === \"number\"\n ? `${pathRotation}deg`\n : pathRotation\n }) `\n }\n\n return transformIsDefault ? \"none\" : transform.trim()\n}\n"],"names":[],"mappings":";;AAGA,MAAM,cAAc,GAAG;AACnB,IAAA,CAAC,EAAE,YAAY;AACf,IAAA,CAAC,EAAE,YAAY;AACf,IAAA,CAAC,EAAE,YAAY;AACf,IAAA,oBAAoB,EAAE,aAAa;CACtC;AAEK,SAAU,cAAc,CAAC,KAAuB,EAAA;IAClD,IAAI,SAAS,GAAG,EAAE;IAClB,IAAI,kBAAkB,GAAG,IAAI;AAE7B;;;AAGG;AACH,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAChD,QAAA,MAAM,GAAG,GAAG,kBAAkB,CAAC,CAAC,CAAgC;QAChE,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;QAE/B,IAAI,KAAK,KAAK,SAAS;YAAE;QAEzB,IAAI,cAAc,GAAG,IAAI;AACzB,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC3B,YAAA,cAAc,GAAG,KAAK,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChE;aAAO;AACH,YAAA,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC;AAChC,YAAA,cAAc,GAAG,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,MAAM,KAAK,CAAC,GAAG,MAAM,KAAK,CAAC;QAC1E;QAEA,IAAI,CAAC,cAAc,EAAE;YACjB,kBAAkB,GAAG,KAAK;YAC1B,MAAM,aAAa,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,GAAG;AAChD,YAAA,SAAS,IAAI,CAAA,EAAG,aAAa,CAAA,CAAA,EAAI,KAAK,IAAI;QAC9C;IACJ;;;AAIA,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY;IAC9C,IAAI,YAAY,EAAE;QACd,kBAAkB,GAAG,KAAK;AAC1B,QAAA,SAAS,IAAI,CAAA,OAAA,EACT,OAAO,YAAY,KAAK;cAClB,CAAA,EAAG,YAAY,CAAA,GAAA;cACf,YACV,CAAA,EAAA,CAAI;IACR;AAEA,IAAA,OAAO,kBAAkB,GAAG,MAAM,GAAG,SAAS,CAAC,IAAI,EAAE;AACzD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/svg/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/svg/index.mjs deleted file mode 100644 index 83bc656f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/svg/index.mjs +++ /dev/null @@ -1,45 +0,0 @@ -import { MotionValue } from '../../value/index.mjs'; -import { addAttrValue } from '../attr/index.mjs'; -import { addStyleValue } from '../style/index.mjs'; -import { createSelectorEffect } from '../utils/create-dom-effect.mjs'; -import { createEffect } from '../utils/create-effect.mjs'; -import { frame } from '../../frameloop/frame.mjs'; - -function addSVGPathValue(element, state, key, value) { - frame.render(() => element.setAttribute("pathLength", "1")); - if (key === "pathOffset") { - return state.set(key, value, () => { - // Use unitless value to avoid Safari zoom bug - const offset = state.latest[key]; - element.setAttribute("stroke-dashoffset", `${-offset}`); - }); - } - else { - if (!state.get("stroke-dasharray")) { - state.set("stroke-dasharray", new MotionValue("1 1"), () => { - const { pathLength = 1, pathSpacing } = state.latest; - // Use unitless values to avoid Safari zoom bug - element.setAttribute("stroke-dasharray", `${pathLength} ${pathSpacing ?? 1 - Number(pathLength)}`); - }); - } - return state.set(key, value, undefined, state.get("stroke-dasharray")); - } -} -const addSVGValue = (element, state, key, value) => { - if (key.startsWith("path")) { - return addSVGPathValue(element, state, key, value); - } - else if (key.startsWith("attr")) { - return addAttrValue(element, state, convertAttrKey(key), value); - } - const handler = key in element.style ? addStyleValue : addAttrValue; - return handler(element, state, key, value); -}; -const svgEffect = /*@__PURE__*/ createSelectorEffect( -/*@__PURE__*/ createEffect(addSVGValue)); -function convertAttrKey(key) { - return key.replace(/^attr([A-Z])/, (_, firstChar) => firstChar.toLowerCase()); -} - -export { svgEffect }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/svg/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/svg/index.mjs.map deleted file mode 100644 index 8548e1f8..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/svg/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/effects/svg/index.ts"],"sourcesContent":["import { frame } from \"../../frameloop\"\nimport { MotionValue } from \"../../value\"\nimport { addAttrValue } from \"../attr\"\nimport { MotionValueState } from \"../MotionValueState\"\nimport { addStyleValue } from \"../style\"\nimport { createSelectorEffect } from \"../utils/create-dom-effect\"\nimport { createEffect } from \"../utils/create-effect\"\n\nfunction addSVGPathValue(\n element: SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) {\n frame.render(() => element.setAttribute(\"pathLength\", \"1\"))\n\n if (key === \"pathOffset\") {\n return state.set(key, value, () => {\n // Use unitless value to avoid Safari zoom bug\n const offset = state.latest[key]\n element.setAttribute(\"stroke-dashoffset\", `${-offset}`)\n })\n } else {\n if (!state.get(\"stroke-dasharray\")) {\n state.set(\"stroke-dasharray\", new MotionValue(\"1 1\"), () => {\n const { pathLength = 1, pathSpacing } = state.latest\n\n // Use unitless values to avoid Safari zoom bug\n element.setAttribute(\n \"stroke-dasharray\",\n `${pathLength} ${pathSpacing ?? 1 - Number(pathLength)}`\n )\n })\n }\n\n return state.set(key, value, undefined, state.get(\"stroke-dasharray\"))\n }\n}\n\nconst addSVGValue = (\n element: SVGElement,\n state: MotionValueState,\n key: string,\n value: MotionValue\n) => {\n if (key.startsWith(\"path\")) {\n return addSVGPathValue(element, state, key, value)\n } else if (key.startsWith(\"attr\")) {\n return addAttrValue(element, state, convertAttrKey(key), value)\n }\n\n const handler = key in element.style ? addStyleValue : addAttrValue\n return handler(element, state, key, value)\n}\n\nexport const svgEffect = /*@__PURE__*/ createSelectorEffect(\n /*@__PURE__*/ createEffect(addSVGValue)\n)\n\nfunction convertAttrKey(key: string) {\n return key.replace(/^attr([A-Z])/, (_, firstChar) =>\n firstChar.toLowerCase()\n )\n}\n"],"names":[],"mappings":";;;;;;;AAQA,SAAS,eAAe,CACpB,OAAmB,EACnB,KAAuB,EACvB,GAAW,EACX,KAAkB,EAAA;AAElB,IAAA,KAAK,CAAC,MAAM,CAAC,MAAM,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;AAE3D,IAAA,IAAI,GAAG,KAAK,YAAY,EAAE;QACtB,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAK;;YAE9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;YAChC,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAA,CAAE,CAAC;AAC3D,QAAA,CAAC,CAAC;IACN;SAAO;QACH,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE;AAChC,YAAA,KAAK,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,MAAK;gB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node_modules/motion-dom/dist/es/effects/utils/create-dom-effect.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-dom-effect.mjs deleted file mode 100644 index ede6a43c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-dom-effect.mjs +++ /dev/null @@ -1,19 +0,0 @@ -import { resolveElements } from '../../utils/resolve-elements.mjs'; - -function createSelectorEffect(subjectEffect) { - return (subject, values) => { - const elements = resolveElements(subject); - const subscriptions = []; - for (const element of elements) { - const remove = subjectEffect(element, values); - subscriptions.push(remove); - } - return () => { - for (const remove of subscriptions) - remove(); - }; - }; -} - -export { createSelectorEffect }; -//# sourceMappingURL=create-dom-effect.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-dom-effect.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-dom-effect.mjs.map deleted file mode 100644 index f750c00a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-dom-effect.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create-dom-effect.mjs","sources":["../../../../src/effects/utils/create-dom-effect.ts"],"sourcesContent":["import {\n ElementOrSelector,\n resolveElements,\n} from \"../../utils/resolve-elements\"\nimport { MotionValue } from \"../../value\"\n\nexport function createSelectorEffect(\n subjectEffect: (\n subject: T,\n values: Record\n ) => VoidFunction\n) {\n return (\n subject: ElementOrSelector,\n values: Record\n ) => {\n const elements = resolveElements(subject)\n const subscriptions: VoidFunction[] = []\n\n for (const element of elements) {\n const remove = subjectEffect(element as T, values)\n subscriptions.push(remove)\n }\n\n return () => {\n for (const remove of subscriptions) remove()\n }\n }\n}\n"],"names":[],"mappings":";;AAMM,SAAU,oBAAoB,CAChC,aAGiB,EAAA;AAEjB,IAAA,OAAO,CACH,OAA0B,EAC1B,MAAmC,KACnC;AACA,QAAA,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,CAAC;QACzC,MAAM,aAAa,GAAmB,EAAE;AAExC,QAAA,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC5B,MAAM,MAAM,GAAG,aAAa,CAAC,OAAY,EAAE,MAAM,CAAC;AAClD,YAAA,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;QAC9B;AAEA,QAAA,OAAO,MAAK;YACR,KAAK,MAAM,MAAM,IAAI,aAAa;AAAE,gBAAA,MAAM,EAAE;AAChD,QAAA,CAAC;AACL,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-effect.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-effect.mjs deleted file mode 100644 index 7bd45998..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-effect.mjs +++ /dev/null @@ -1,22 +0,0 @@ -import { MotionValueState } from '../MotionValueState.mjs'; - -function createEffect(addValue) { - const stateCache = new WeakMap(); - return (subject, values) => { - const state = stateCache.get(subject) ?? new MotionValueState(); - stateCache.set(subject, state); - const subscriptions = []; - for (const key in values) { - const value = values[key]; - const remove = addValue(subject, state, key, value); - subscriptions.push(remove); - } - return () => { - for (const cancel of subscriptions) - cancel(); - }; - }; -} - -export { createEffect }; -//# sourceMappingURL=create-effect.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-effect.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-effect.mjs.map deleted file mode 100644 index 10631da3..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/effects/utils/create-effect.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create-effect.mjs","sources":["../../../../src/effects/utils/create-effect.ts"],"sourcesContent":["import { MotionValue } from \"../../value\"\nimport { MotionValueState } from \"../MotionValueState\"\n\nexport function createEffect(\n addValue: (\n subject: Subject,\n state: MotionValueState,\n key: string,\n value: MotionValue\n ) => VoidFunction\n) {\n const stateCache = new WeakMap()\n\n return (\n subject: Subject,\n values: Record\n ): VoidFunction => {\n const state = stateCache.get(subject) ?? new MotionValueState()\n\n stateCache.set(subject, state)\n\n const subscriptions: VoidFunction[] = []\n\n for (const key in values) {\n const value = values[key]\n const remove = addValue(subject, state, key, value)\n subscriptions.push(remove)\n }\n\n return () => {\n for (const cancel of subscriptions) cancel()\n }\n }\n}\n"],"names":[],"mappings":";;AAGM,SAAU,YAAY,CACxB,QAKiB,EAAA;AAEjB,IAAA,MAAM,UAAU,GAAG,IAAI,OAAO,EAA6B;AAE3D,IAAA,OAAO,CACH,OAAgB,EAChB,MAAmC,KACrB;AACd,QAAA,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,gBAAgB,EAAE;AAE/D,QAAA,UAAU,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC;QAE9B,MAAM,aAAa,GAAmB,EAAE;AAExC,QAAA,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;AACtB,YAAA,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC;AACzB,YAAA,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC;AACnD,YAAA,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;QAC9B;AAEA,QAAA,OAAO,MAAK;YACR,KAAK,MAAM,MAAM,IAAI,aAAa;AAAE,gBAAA,MAAM,EAAE;AAChD,QAAA,CAAC;AACL,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/events/add-dom-event.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/events/add-dom-event.mjs deleted file mode 100644 index 560139be..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/events/add-dom-event.mjs +++ /dev/null @@ -1,7 +0,0 @@ -function addDomEvent(target, eventName, handler, options = { passive: true }) { - target.addEventListener(eventName, handler, options); - return () => target.removeEventListener(eventName, handler); -} - -export { addDomEvent }; -//# sourceMappingURL=add-dom-event.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.map deleted file mode 100644 index d110fb8a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"add-dom-event.mjs","sources":["../../../src/events/add-dom-event.ts"],"sourcesContent":["export function addDomEvent(\n target: EventTarget,\n eventName: string,\n handler: EventListener,\n options: AddEventListenerOptions = { passive: true }\n) {\n target.addEventListener(eventName, handler, options)\n\n return () => target.removeEventListener(eventName, handler)\n}\n"],"names":[],"mappings":"AAAM,SAAU,WAAW,CACvB,MAAmB,EACnB,SAAiB,EACjB,OAAsB,EACtB,OAAA,GAAmC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAA;IAEpD,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC;IAEpD,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC;AAC/D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/batcher.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/batcher.mjs deleted file mode 100644 index f7063088..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/batcher.mjs +++ /dev/null @@ -1,73 +0,0 @@ -import { MotionGlobalConfig } from 'motion-utils'; -import { stepsOrder } from './order.mjs'; -import { createRenderStep } from './render-step.mjs'; - -const maxElapsed = 40; -function createRenderBatcher(scheduleNextBatch, allowKeepAlive) { - let runNextFrame = false; - let useDefaultElapsed = true; - const state = { - delta: 0.0, - timestamp: 0.0, - isProcessing: false, - }; - const flagRunNextFrame = () => (runNextFrame = true); - const steps = stepsOrder.reduce((acc, key) => { - acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined); - return acc; - }, {}); - const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps; - const processBatch = () => { - const useManualTiming = MotionGlobalConfig.useManualTiming; - const timestamp = useManualTiming - ? state.timestamp - : performance.now(); - runNextFrame = false; - if (!useManualTiming) { - state.delta = useDefaultElapsed - ? 1000 / 60 - : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1); - } - state.timestamp = timestamp; - state.isProcessing = true; - // Unrolled render loop for better per-frame performance - setup.process(state); - read.process(state); - resolveKeyframes.process(state); - preUpdate.process(state); - update.process(state); - preRender.process(state); - render.process(state); - postRender.process(state); - state.isProcessing = false; - if (runNextFrame && allowKeepAlive) { - useDefaultElapsed = false; - scheduleNextBatch(processBatch); - } - }; - const wake = () => { - runNextFrame = true; - useDefaultElapsed = true; - if (!state.isProcessing) { - scheduleNextBatch(processBatch); - } - }; - const schedule = stepsOrder.reduce((acc, key) => { - const step = steps[key]; - acc[key] = (process, keepAlive = false, immediate = false) => { - if (!runNextFrame) - wake(); - return step.schedule(process, keepAlive, immediate); - }; - return acc; - }, {}); - const cancel = (process) => { - for (let i = 0; i < stepsOrder.length; i++) { - steps[stepsOrder[i]].cancel(process); - } - }; - return { schedule, cancel, state, steps }; -} - -export { createRenderBatcher }; -//# sourceMappingURL=batcher.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.map deleted file mode 100644 index c8694bc5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"batcher.mjs","sources":["../../../src/frameloop/batcher.ts"],"sourcesContent":["import { MotionGlobalConfig } from \"motion-utils\"\nimport { stepsOrder } from \"./order\"\nimport { createRenderStep } from \"./render-step\"\nimport { Batcher, FrameData, Process, Steps } from \"./types\"\n\nconst maxElapsed = 40\n\nexport function createRenderBatcher(\n scheduleNextBatch: (callback: Function) => void,\n allowKeepAlive: boolean\n) {\n let runNextFrame = false\n let useDefaultElapsed = true\n\n const state: FrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n }\n\n const flagRunNextFrame = () => (runNextFrame = true)\n\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(\n flagRunNextFrame,\n allowKeepAlive ? key : undefined\n )\n return acc\n }, {} as Steps)\n\n const {\n setup,\n read,\n resolveKeyframes,\n preUpdate,\n update,\n preRender,\n render,\n postRender,\n } = steps\n\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now()\n runNextFrame = false\n\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1)\n }\n\n state.timestamp = timestamp\n state.isProcessing = true\n\n // Unrolled render loop for better per-frame performance\n setup.process(state)\n read.process(state)\n resolveKeyframes.process(state)\n preUpdate.process(state)\n update.process(state)\n preRender.process(state)\n render.process(state)\n postRender.process(state)\n\n state.isProcessing = false\n\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false\n scheduleNextBatch(processBatch)\n }\n }\n\n const wake = () => {\n runNextFrame = true\n useDefaultElapsed = true\n\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch)\n }\n }\n\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key]\n acc[key] = (process: Process, keepAlive = false, immediate = false) => {\n if (!runNextFrame) wake()\n\n return step.schedule(process, keepAlive, immediate)\n }\n return acc\n }, {} as Batcher)\n\n const cancel = (process: Process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process)\n }\n }\n\n return { schedule, cancel, state, steps }\n}\n"],"names":[],"mappings":";;;;AAKA,MAAM,UAAU,GAAG,EAAE;AAEf,SAAU,mBAAmB,CAC/B,iBAA+C,EAC/C,cAAuB,EAAA;IAEvB,IAAI,YAAY,GAAG,KAAK;IACxB,IAAI,iBAAiB,GAAG,IAAI;AAE5B,IAAA,MAAM,KAAK,GAAc;AACrB,QAAA,KAAK,EAAE,GAAG;AACV,QAAA,SAAS,EAAE,GAAG;AACd,QAAA,YAAY,EAAE,KAAK;KACtB;IAED,MAAM,gBAAgB,GAAG,OAAO,YAAY,GAAG,IAAI,CAAC;IAEpD,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAI;AACzC,QAAA,GAAG,CAAC,GAAG,CAAC,GAAG,gBAAgB,CACvB,gBAAgB,EAChB,cAAc,GAAG,GAAG,GAAG,SAAS,CACnC;AACD,QAAA,OAAO,GAAG;IACd,CAAC,EAAE,EAAW,CAAC;AAEf,IAAA,MAAM,EACF,KAAK,EACL,IAAI,EACJ,gBAAgB,EAChB,SAAS,EACT,MAAM,EACN,SAAS,EACT,MAAM,EACN,UAAU,GACb,GAAG,KAAK;IAET,MAAM,YAAY,GAAG,MAAK;AACtB,QAAA,MAAM,eAAe,GAAG,kBAAkB,CAAC,eAAe;QAC1D,MAAM,SAAS,GAAG;cACZ,KAAK,CAAC;AACR,cAAE,WAAW,CAAC,GAAG,EAAE;QACvB,YAAY,GAAG,KAAK;QAEpB,IAAI,CAAC,eAAe,EAAE;YAClB,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K,KAAI;AAClE,YAAA,IAAI,CAAC,YAAY;AAAE,gBAAA,IAAI,EAAE;YAEzB,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC;AACvD,QAAA,CAAC;AACD,QAAA,OAAO,GAAG;IACd,CAAC,EAAE,EAAa,CAAC;AAEjB,IAAA,MAAM,MAAM,GAAG,CAAC,OAAgB,KAAI;AAChC,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACxC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;QACxC;AACJ,IAAA,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE;AAC7C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/frame.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/frame.mjs deleted file mode 100644 index fa001b18..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/frame.mjs +++ /dev/null @@ -1,7 +0,0 @@ -import { noop } from 'motion-utils'; -import { createRenderBatcher } from './batcher.mjs'; - -const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop, true); - -export { cancelFrame, frame, frameData, frameSteps }; -//# sourceMappingURL=frame.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/frame.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/frame.mjs.map deleted file mode 100644 index 37d67b0a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/frame.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"frame.mjs","sources":["../../../src/frameloop/frame.ts"],"sourcesContent":["import { noop } from \"motion-utils\"\nimport { createRenderBatcher } from \"./batcher\"\n\nexport const {\n schedule: frame,\n cancel: cancelFrame,\n state: frameData,\n steps: frameSteps,\n} = /* @__PURE__ */ createRenderBatcher(\n typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop,\n true\n)\n"],"names":[],"mappings":";;;AAGO,MAAM,EACT,QAAQ,EAAE,KAAK,EACf,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,UAAU,GACpB,mBAAmB,mBAAmB,CACnC,OAAO,qBAAqB,KAAK,WAAW,GAAG,qBAAqB,GAAG,IAAI,EAC3E,IAAI;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/index-legacy.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/index-legacy.mjs deleted file mode 100644 index aa3de452..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/index-legacy.mjs +++ /dev/null @@ -1,21 +0,0 @@ -import { stepsOrder } from './order.mjs'; -import { frame, cancelFrame } from './frame.mjs'; - -/** - * @deprecated - * - * Import as `frame` instead. - */ -const sync = frame; -/** - * @deprecated - * - * Use cancelFrame(callback) instead. - */ -const cancelSync = stepsOrder.reduce((acc, key) => { - acc[key] = (process) => cancelFrame(process); - return acc; -}, {}); - -export { cancelSync, sync }; -//# sourceMappingURL=index-legacy.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/index-legacy.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/index-legacy.mjs.map deleted file mode 100644 index 26f7d7ee..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/index-legacy.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index-legacy.mjs","sources":["../../../src/frameloop/index-legacy.ts"],"sourcesContent":["import { cancelFrame, frame } from \".\"\nimport { stepsOrder } from \"./order\"\nimport { Process } from \"./types\"\n\n/**\n * @deprecated\n *\n * Import as `frame` instead.\n */\nexport const sync = frame\n\n/**\n * @deprecated\n *\n * Use cancelFrame(callback) instead.\n */\nexport const cancelSync = stepsOrder.reduce((acc, key) => {\n acc[key] = (process: Process) => cancelFrame(process)\n return acc\n}, {} as Record void>)\n"],"names":[],"mappings":";;;AAIA;;;;AAIG;AACI,MAAM,IAAI,GAAG;AAEpB;;;;AAIG;AACI,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAI;AACrD,IAAA,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,OAAgB,KAAK,WAAW,CAAC,OAAO,CAAC;AACrD,IAAA,OAAO,GAAG;AACd,CAAC,EAAE,EAAgD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/microtask.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/microtask.mjs deleted file mode 100644 index d81e76c1..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/microtask.mjs +++ /dev/null @@ -1,7 +0,0 @@ -import { createRenderBatcher } from './batcher.mjs'; - -const { schedule: microtask, cancel: cancelMicrotask } = -/* @__PURE__ */ createRenderBatcher(queueMicrotask, false); - -export { cancelMicrotask, microtask }; -//# sourceMappingURL=microtask.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/microtask.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/microtask.mjs.map deleted file mode 100644 index 8e8e7cd9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/microtask.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"microtask.mjs","sources":["../../../src/frameloop/microtask.ts"],"sourcesContent":["import { createRenderBatcher } from \"./batcher\"\n\nexport const { schedule: microtask, cancel: cancelMicrotask } =\n /* @__PURE__ */ createRenderBatcher(queueMicrotask, false)\n"],"names":[],"mappings":";;AAEO,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE;AACzD,gBAAgB,mBAAmB,CAAC,cAAc,EAAE,KAAK;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/order.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/order.mjs deleted file mode 100644 index f2fb09f7..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/order.mjs +++ /dev/null @@ -1,13 +0,0 @@ -const stepsOrder = [ - "setup", // Compute - "read", // Read - "resolveKeyframes", // Write/Read/Write/Read - "preUpdate", // Compute - "update", // Compute - "preRender", // Compute - "render", // Write - "postRender", // Compute -]; - -export { stepsOrder }; -//# sourceMappingURL=order.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/order.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/order.mjs.map deleted file mode 100644 index 19ceee3c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/order.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"order.mjs","sources":["../../../src/frameloop/order.ts"],"sourcesContent":["import { StepId } from \"./types\"\n\nexport const stepsOrder: StepId[] = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n] as const\n\nexport type StepNames = (typeof stepsOrder)[number]\n"],"names":[],"mappings":"AAEO,MAAM,UAAU,GAAa;AAChC,IAAA,OAAO;AACP,IAAA,MAAM;AACN,IAAA,kBAAkB;AAClB,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,WAAW;AACX,IAAA,QAAQ;AACR,IAAA,YAAY;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/render-step.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/render-step.mjs deleted file mode 100644 index b495ee7b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/render-step.mjs +++ /dev/null @@ -1,95 +0,0 @@ -import { statsBuffer } from '../stats/buffer.mjs'; - -function createRenderStep(runNextFrame, stepName) { - /** - * We create and reuse two queues, one to queue jobs for the current frame - * and one for the next. We reuse to avoid triggering GC after x frames. - */ - let thisFrame = new Set(); - let nextFrame = new Set(); - /** - * Track whether we're currently processing jobs in this step. This way - * we can decide whether to schedule new jobs for this frame or next. - */ - let isProcessing = false; - let flushNextFrame = false; - /** - * A set of processes which were marked keepAlive when scheduled. - */ - const toKeepAlive = new WeakSet(); - let latestFrameData = { - delta: 0.0, - timestamp: 0.0, - isProcessing: false, - }; - let numCalls = 0; - function triggerCallback(callback) { - if (toKeepAlive.has(callback)) { - step.schedule(callback); - runNextFrame(); - } - numCalls++; - callback(latestFrameData); - } - const step = { - /** - * Schedule a process to run on the next frame. - */ - schedule: (callback, keepAlive = false, immediate = false) => { - const addToCurrentFrame = immediate && isProcessing; - const queue = addToCurrentFrame ? thisFrame : nextFrame; - if (keepAlive) - toKeepAlive.add(callback); - queue.add(callback); - return callback; - }, - /** - * Cancel the provided callback from running on the next frame. - */ - cancel: (callback) => { - nextFrame.delete(callback); - toKeepAlive.delete(callback); - }, - /** - * Execute all schedule callbacks. - */ - process: (frameData) => { - latestFrameData = frameData; - /** - * If we're already processing we've probably been triggered by a flushSync - * inside an existing process. Instead of executing, mark flushNextFrame - * as true and ensure we flush the following frame at the end of this one. - */ - if (isProcessing) { - flushNextFrame = true; - return; - } - isProcessing = true; - // Swap this frame and the next to avoid GC - const prevFrame = thisFrame; - thisFrame = nextFrame; - nextFrame = prevFrame; - // Execute this frame - thisFrame.forEach(triggerCallback); - /** - * If we're recording stats then - */ - if (stepName && statsBuffer.value) { - statsBuffer.value.frameloop[stepName].push(numCalls); - } - numCalls = 0; - // Clear the frame so no callbacks remain. This is to avoid - // memory leaks should this render step not run for a while. - thisFrame.clear(); - isProcessing = false; - if (flushNextFrame) { - flushNextFrame = false; - step.process(frameData); - } - }, - }; - return step; -} - -export { createRenderStep }; -//# sourceMappingURL=render-step.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.map deleted file mode 100644 index b0a67250..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"render-step.mjs","sources":["../../../src/frameloop/render-step.ts"],"sourcesContent":["import { statsBuffer } from \"../stats/buffer\"\nimport { StepNames } from \"./order\"\nimport { FrameData, Process, Step } from \"./types\"\n\nexport function createRenderStep(\n runNextFrame: () => void,\n stepName?: StepNames\n): Step {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set()\n let nextFrame = new Set()\n\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false\n\n let flushNextFrame = false\n\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet()\n\n let latestFrameData: FrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n }\n\n let numCalls = 0\n\n function triggerCallback(callback: Process) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback)\n runNextFrame()\n }\n\n numCalls++\n callback(latestFrameData)\n }\n\n const step: Step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing\n const queue = addToCurrentFrame ? thisFrame : nextFrame\n\n if (keepAlive) toKeepAlive.add(callback)\n\n queue.add(callback)\n\n return callback\n },\n\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback)\n toKeepAlive.delete(callback)\n },\n\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData\n\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true\n return\n }\n\n isProcessing = true\n\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame\n thisFrame = nextFrame\n nextFrame = prevFrame\n\n // Execute this frame\n thisFrame.forEach(triggerCallback)\n\n /**\n * If we're recording stats then\n */\n if (stepName && statsBuffer.value) {\n statsBuffer.value.frameloop[stepName].push(numCalls)\n }\n numCalls = 0\n\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear()\n\n isProcessing = false\n\n if (flushNextFrame) {\n flushNextFrame = false\n step.process(frameData)\n }\n },\n }\n\n return step\n}\n"],"names":[],"mappings":";;AAIM,SAAU,gBAAgB,CAC5B,YAAwB,EACxB,QAAoB,EAAA;AAEpB;;;AAGG;AACH,IAAA,IAAI,SAAS,GAAG,IAAI,GAAG,EAAW;AAClC,IAAA,IAAI,SAAS,GAAG,IAAI,GAAG,EAAW;AAElC;;;A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AAI;gBACrB;YACJ;YAEA,YAAY,GAAG,IAAI;;YAGnB,MAAM,SAAS,GAAG,SAAS;YAC3B,SAAS,GAAG,SAAS;YACrB,SAAS,GAAG,SAAS;;AAGrB,YAAA,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;AAElC;;AAEG;AACH,YAAA,IAAI,QAAQ,IAAI,WAAW,CAAC,KAAK,EAAE;AAC/B,gBAAA,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;YACxD;YACA,QAAQ,GAAG,CAAC;;;YAIZ,SAAS,CAAC,KAAK,EAAE;YAEjB,YAAY,GAAG,KAAK;YAEpB,IAAI,cAAc,EAAE;gBAChB,cAAc,GAAG,KAAK;AACtB,gBAAA,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;YAC3B;QACJ,CAAC;KACJ;AAED,IAAA,OAAO,IAAI;AACf;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs deleted file mode 100644 index e24804ce..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs +++ /dev/null @@ -1,32 +0,0 @@ -import { MotionGlobalConfig } from 'motion-utils'; -import { frameData } from './frame.mjs'; - -let now; -function clearTime() { - now = undefined; -} -/** - * An eventloop-synchronous alternative to performance.now(). - * - * Ensures that time measurements remain consistent within a synchronous context. - * Usually calling performance.now() twice within the same synchronous context - * will return different values which isn't useful for animations when we're usually - * trying to sync animations to the same frame. - */ -const time = { - now: () => { - if (now === undefined) { - time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming - ? frameData.timestamp - : performance.now()); - } - return now; - }, - set: (newTime) => { - now = newTime; - queueMicrotask(clearTime); - }, -}; - -export { time }; -//# sourceMappingURL=sync-time.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.map deleted file mode 100644 index 55cb987b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sync-time.mjs","sources":["../../../src/frameloop/sync-time.ts"],"sourcesContent":["import { MotionGlobalConfig } from \"motion-utils\"\nimport { frameData } from \"./frame\"\n\nlet now: number | undefined\n\nfunction clearTime() {\n now = undefined\n}\n\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nexport const time = {\n now: (): number => {\n if (now === undefined) {\n time.set(\n frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now()\n )\n }\n\n return now!\n },\n set: (newTime: number) => {\n now = newTime\n queueMicrotask(clearTime)\n },\n}\n"],"names":[],"mappings":";;;AAGA,IAAI,GAAuB;AAE3B,SAAS,SAAS,GAAA;IACd,GAAG,GAAG,SAAS;AACnB;AAEA;;;;;;;AAOG;AACI,MAAM,IAAI,GAAG;IAChB,GAAG,EAAE,MAAa;AACd,QAAA,IAAI,GAAG,KAAK,SAAS,EAAE;YACnB,IAAI,CAAC,GAAG,CACJ,SAAS,CAAC,YAAY,IAAI,kBAAkB,CAAC;kBACvC,SAAS,CAAC;AACZ,kBAAE,WAAW,CAAC,GAAG,EAAE,CAC1B;QACL;AAEA,QAAA,OAAO,GAAI;IACf,CAAC;AACD,IAAA,GAAG,EAAE,CAAC,OAAe,KAAI;QACrB,GAAG,GAAG,OAAO;QACb,cAAc,CAAC,SAAS,CAAC;IAC7B,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs deleted file mode 100644 index f5bfa774..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs +++ /dev/null @@ -1,10 +0,0 @@ -const isDragging = { - x: false, - y: false, -}; -function isDragActive() { - return isDragging.x || isDragging.y; -} - -export { isDragActive, isDragging }; -//# sourceMappingURL=is-active.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs.map deleted file mode 100644 index 80f56c4a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-active.mjs","sources":["../../../../../src/gestures/drag/state/is-active.ts"],"sourcesContent":["export const isDragging = {\n x: false,\n y: false,\n}\n\nexport function isDragActive() {\n return isDragging.x || isDragging.y\n}\n"],"names":[],"mappings":"AAAO,MAAM,UAAU,GAAG;AACtB,IAAA,CAAC,EAAE,KAAK;AACR,IAAA,CAAC,EAAE,KAAK;;SAGI,YAAY,GAAA;AACxB,IAAA,OAAO,UAAU,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC;AACvC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs deleted file mode 100644 index 78e2661b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs +++ /dev/null @@ -1,29 +0,0 @@ -import { isDragging } from './is-active.mjs'; - -function setDragLock(axis) { - if (axis === "x" || axis === "y") { - if (isDragging[axis]) { - return null; - } - else { - isDragging[axis] = true; - return () => { - isDragging[axis] = false; - }; - } - } - else { - if (isDragging.x || isDragging.y) { - return null; - } - else { - isDragging.x = isDragging.y = true; - return () => { - isDragging.x = isDragging.y = false; - }; - } - } -} - -export { setDragLock }; -//# sourceMappingURL=set-active.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs.map deleted file mode 100644 index b3c08e38..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set-active.mjs","sources":["../../../../../src/gestures/drag/state/set-active.ts"],"sourcesContent":["import { isDragging } from \"./is-active\"\n\nexport function setDragLock(axis: boolean | \"x\" | \"y\" | \"lockDirection\") {\n if (axis === \"x\" || axis === \"y\") {\n if (isDragging[axis]) {\n return null\n } else {\n isDragging[axis] = true\n return () => {\n isDragging[axis] = false\n }\n }\n } else {\n if (isDragging.x || isDragging.y) {\n return null\n } else {\n isDragging.x = isDragging.y = true\n return () => {\n isDragging.x = isDragging.y = false\n }\n }\n }\n}\n"],"names":[],"mappings":";;AAEM,SAAU,WAAW,CAAC,IAA2C,EAAA;IACnE,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,EAAE;AAC9B,QAAA,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;AAClB,YAAA,OAAO,IAAI;QACf;aAAO;AACH,YAAA,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI;AACvB,YAAA,OAAO,MAAK;AACR,gBAAA,UAAU,CAAC,IAAI,CAAC,GAAG,KAAK;AAC5B,YAAA,CAAC;QACL;IACJ;SAAO;QACH,IAAI,UAAU,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE;AAC9B,YAAA,OAAO,IAAI;QACf;aAAO;YACH,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,IAAI;AAClC,YAAA,OAAO,MAAK;gBACR,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,KAAK;AACvC,YAAA,CAAC;QACL;IACJ;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/hover.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/hover.mjs deleted file mode 100644 index 2d540e94..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/hover.mjs +++ /dev/null @@ -1,70 +0,0 @@ -import { isDragActive } from './drag/state/is-active.mjs'; -import { setupGesture } from './utils/setup.mjs'; - -function isValidHover(event) { - return !(event.pointerType === "touch" || isDragActive()); -} -/** - * Create a hover gesture. hover() is different to .addEventListener("pointerenter") - * in that it has an easier syntax, filters out polyfilled touch events, interoperates - * with drag gestures, and automatically removes the "pointerennd" event listener when the hover ends. - * - * @public - */ -function hover(elementOrSelector, onHoverStart, options = {}) { - const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options); - elements.forEach((element) => { - let isPressed = false; - let deferredHoverEnd = false; - let hoverEndCallback; - const removePointerLeave = () => { - element.removeEventListener("pointerleave", onPointerLeave); - }; - const endHover = (event) => { - if (hoverEndCallback) { - hoverEndCallback(event); - hoverEndCallback = undefined; - } - removePointerLeave(); - }; - const onPointerUp = (event) => { - isPressed = false; - window.removeEventListener("pointerup", onPointerUp); - window.removeEventListener("pointercancel", onPointerUp); - if (deferredHoverEnd) { - deferredHoverEnd = false; - endHover(event); - } - }; - const onPointerDown = () => { - isPressed = true; - window.addEventListener("pointerup", onPointerUp, eventOptions); - window.addEventListener("pointercancel", onPointerUp, eventOptions); - }; - const onPointerLeave = (leaveEvent) => { - if (leaveEvent.pointerType === "touch") - return; - if (isPressed) { - deferredHoverEnd = true; - return; - } - endHover(leaveEvent); - }; - const onPointerEnter = (enterEvent) => { - if (!isValidHover(enterEvent)) - return; - deferredHoverEnd = false; - const onHoverEnd = onHoverStart(element, enterEvent); - if (typeof onHoverEnd !== "function") - return; - hoverEndCallback = onHoverEnd; - element.addEventListener("pointerleave", onPointerLeave, eventOptions); - }; - element.addEventListener("pointerenter", onPointerEnter, eventOptions); - element.addEventListener("pointerdown", onPointerDown, eventOptions); - }); - return cancel; -} - -export { hover }; -//# sourceMappingURL=hover.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/hover.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/hover.mjs.map deleted file mode 100644 index 78e6f7ee..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/hover.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hover.mjs","sources":["../../../src/gestures/hover.ts"],"sourcesContent":["import { ElementOrSelector } from \"../utils/resolve-elements\"\nimport { isDragActive } from \"./drag/state/is-active\"\nimport { EventOptions } from \"./types\"\nimport { setupGesture } from \"./utils/setup\"\n\n/**\n * A function to be called when a hover gesture starts.\n *\n * This function can optionally return a function that will be called\n * when the hover gesture ends.\n *\n * @public\n */\nexport type OnHoverStartEvent = (\n element: Element,\n event: PointerEvent\n) => void | OnHoverEndEvent\n\n/**\n * A function to be called when a hover gesture ends.\n *\n * @public\n */\nexport type OnHoverEndEvent = (event: PointerEvent) => void\n\nfunction isValidHover(event: PointerEvent) {\n return !(event.pointerType === \"touch\" || isDragActive())\n}\n\n/**\n * Create a hover gesture. hover() is different to .addEventListener(\"pointerenter\")\n * in that it has an easier syntax, filters out polyfilled touch events, interoperates\n * with drag gestures, and automatically removes the \"pointerennd\" event listener when the hover ends.\n *\n * @public\n */\nexport function hover(\n elementOrSelector: ElementOrSelector,\n onHoverStart: OnHoverStartEvent,\n options: EventOptions = {}\n): VoidFunction {\n const [elements, eventOptions, cancel] = setupGesture(\n elementOrSelector,\n options\n )\n\n elements.forEach((element) => {\n let isPressed = false\n let deferredHoverEnd = false\n let hoverEndCallback: OnHoverEndEvent | undefined\n\n const removePointerLeave = () => {\n element.removeEventListener(\n \"pointerleave\",\n onPointerLeave as EventListener\n )\n }\n\n const endHover = (event: PointerEvent) => {\n if (hoverEndCallback) {\n hoverEndCallback(event)\n hoverEndCallback = undefined\n }\n removePointerLeave()\n }\n\n const onPointerUp = (event: Event) => {\n isPressed = false\n window.removeEventListener(\n \"pointerup\",\n onPointerUp as EventListener\n )\n window.removeEventListener(\n \"pointercancel\",\n onPointerUp as EventListener\n )\n\n if (deferredHoverEnd) {\n deferredHoverEnd = false\n endHover(event as PointerEvent)\n }\n }\n\n const onPointerDown = () => {\n isPressed = true\n window.addEventListener(\n \"pointerup\",\n onPointerUp as EventListener,\n eventOptions\n )\n window.addEventListener(\n \"pointercancel\",\n onPointerUp as EventListener,\n eventOptions\n )\n }\n\n const onPointerLeave = (leaveEvent: PointerEvent) => {\n if (leaveEvent.pointerType === \"touch\") return\n\n if (isPressed) {\n deferredHoverEnd = true\n return\n }\n\n endHover(leaveEvent)\n }\n\n const onPointerEnter = (enterEvent: PointerEvent) => {\n if (!isValidHover(enterEvent)) return\n\n deferredHoverEnd = false\n\n const onHoverEnd = onHoverStart(\n element as Element,\n enterEvent\n )\n\n if (typeof onHoverEnd !== \"function\") return\n\n hoverEndCallback = onHoverEnd\n\n element.addEventListener(\n \"pointerleave\",\n onPointerLeave as EventListener,\n eventOptions\n )\n }\n\n element.addEventListener(\n \"pointerenter\",\n onPointerEnter as EventListener,\n eventOptions\n )\n element.addEventListener(\n \"pointerdown\",\n onPointerDown as EventListener,\n eventOptions\n )\n })\n\n return cancel\n}\n"],"names":[],"mappings":";;;AAyBA,SA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B,YAAY,CACf;AACL,QAAA,CAAC;AAED,QAAA,MAAM,cAAc,GAAG,CAAC,UAAwB,KAAI;AAChD,YAAA,IAAI,UAAU,CAAC,WAAW,KAAK,OAAO;gBAAE;YAExC,IAAI,SAAS,EAAE;gBACX,gBAAgB,GAAG,IAAI;gBACvB;YACJ;YAEA,QAAQ,CAAC,UAAU,CAAC;AACxB,QAAA,CAAC;AAED,QAAA,MAAM,cAAc,GAAG,CAAC,UAAwB,KAAI;AAChD,YAAA,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;gBAAE;YAE/B,gBAAgB,GAAG,KAAK;YAExB,MAAM,UAAU,GAAG,YAAY,CAC3B,OAAkB,EAClB,UAAU,CACb;YAED,IAAI,OAAO,UAAU,KAAK,UAAU;gBAAE;YAEtC,gBAAgB,GAAG,UAAU;YAE7B,OAAO,CAAC,gBAAgB,CACpB,cAAc,EACd,cAA+B,EAC/B,YAAY,CACf;AACL,QAAA,CAAC;QAED,OAAO,CAAC,gBAAgB,CACpB,cAAc,EACd,cAA+B,EAC/B,YAAY,CACf;QACD,OAAO,CAAC,gBAAgB,CACpB,aAAa,EACb,aAA8B,EAC9B,YAAY,CACf;AACL,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,MAAM;AACjB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/index.mjs deleted file mode 100644 index c50422af..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/index.mjs +++ /dev/null @@ -1,90 +0,0 @@ -import { isHTMLElement } from '../../utils/is-html-element.mjs'; -import { isDragActive } from '../drag/state/is-active.mjs'; -import { isNodeOrChild } from '../utils/is-node-or-child.mjs'; -import { isPrimaryPointer } from '../utils/is-primary-pointer.mjs'; -import { setupGesture } from '../utils/setup.mjs'; -import { isElementKeyboardAccessible } from './utils/is-keyboard-accessible.mjs'; -import { enableKeyboardPress } from './utils/keyboard.mjs'; -import { isPressing } from './utils/state.mjs'; - -/** - * Filter out events that are not primary pointer events, or are triggering - * while a Motion gesture is active. - */ -function isValidPressEvent(event) { - return isPrimaryPointer(event) && !isDragActive(); -} -const claimedPointerDownEvents = new WeakSet(); -/** - * Create a press gesture. - * - * Press is different to `"pointerdown"`, `"pointerup"` in that it - * automatically filters out secondary pointer events like right - * click and multitouch. - * - * It also adds accessibility support for keyboards, where - * an element with a press gesture will receive focus and - * trigger on Enter `"keydown"` and `"keyup"` events. - * - * This is different to a browser's `"click"` event, which does - * respond to keyboards but only for the `"click"` itself, rather - * than the press start and end/cancel. The element also needs - * to be focusable for this to work, whereas a press gesture will - * make an element focusable by default. - * - * @public - */ -function press(targetOrSelector, onPressStart, options = {}) { - const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options); - const startPress = (startEvent) => { - const target = startEvent.currentTarget; - if (!isValidPressEvent(startEvent)) - return; - if (claimedPointerDownEvents.has(startEvent)) - return; - isPressing.add(target); - if (options.stopPropagation) { - claimedPointerDownEvents.add(startEvent); - } - const onPressEnd = onPressStart(target, startEvent); - const onPointerEnd = (endEvent, success) => { - window.removeEventListener("pointerup", onPointerUp); - window.removeEventListener("pointercancel", onPointerCancel); - if (isPressing.has(target)) { - isPressing.delete(target); - } - if (!isValidPressEvent(endEvent)) { - return; - } - if (typeof onPressEnd === "function") { - onPressEnd(endEvent, { success }); - } - }; - const onPointerUp = (upEvent) => { - onPointerEnd(upEvent, target === window || - target === document || - options.useGlobalTarget || - isNodeOrChild(target, upEvent.target)); - }; - const onPointerCancel = (cancelEvent) => { - onPointerEnd(cancelEvent, false); - }; - window.addEventListener("pointerup", onPointerUp, eventOptions); - window.addEventListener("pointercancel", onPointerCancel, eventOptions); - }; - targets.forEach((target) => { - const pointerDownTarget = options.useGlobalTarget ? window : target; - pointerDownTarget.addEventListener("pointerdown", startPress, eventOptions); - if (isHTMLElement(target)) { - target.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions)); - if (!isElementKeyboardAccessible(target) && - !target.hasAttribute("tabindex")) { - target.tabIndex = 0; - } - } - }); - return cancelEvents; -} - -export { press }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/index.mjs.map deleted file mode 100644 index d835a0aa..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/gestures/press/index.ts"],"sourcesContent":["import { isHTMLElement } from \"../../utils/is-html-element\"\nimport { ElementOrSelector } from \"../../utils/resolve-elements\"\nimport { isDragActive } from \"../drag/state/is-active\"\nimport { EventOptions } from \"../types\"\nimport { isNodeOrChild } from \"../utils/is-node-or-child\"\nimport { isPrimaryPointer } from \"../utils/is-primary-pointer\"\nimport { setupGesture } from \"../utils/setup\"\nimport { OnPressStartEvent } from \"./types\"\nimport { isElementKeyboardAccessible } from \"./utils/is-keyboard-accessible\"\nimport { enableKeyboardPress } from \"./utils/keyboard\"\nimport { isPressing } from \"./utils/state\"\n\n/**\n * Filter out events that are not primary pointer events, or are triggering\n * while a Motion gesture is active.\n */\nfunction isValidPressEvent(event: PointerEvent) {\n return isPrimaryPointer(event) && !isDragActive()\n}\n\nconst claimedPointerDownEvents = new WeakSet()\n\nexport interface PointerEventOptions extends EventOptions {\n useGlobalTarget?: boolean\n stopPropagation?: boolean\n}\n\n/**\n * Create a press gesture.\n *\n * Press is different to `\"pointerdown\"`, `\"pointerup\"` in that it\n * automatically filters out secondary pointer events like right\n * click and multitouch.\n *\n * It also adds accessibility support for keyboards, where\n * an element with a press gesture will receive focus and\n * trigger on Enter `\"keydown\"` and `\"keyup\"` events.\n *\n * This is different to a browser's `\"click\"` event, which does\n * respond to keyboards but only for the `\"click\"` itself, rather\n * than the press start and end/cancel. The element also needs\n * to be focusable for this to work, whereas a press gesture will\n * make an element focusable by default.\n *\n * @public\n */\nexport function press(\n targetOrSelector: ElementOrSelector,\n onPressStart: OnPressStartEvent,\n options: PointerEventOptions = {}\n): VoidFunction {\n const [targets, eventOptions, cancelEvents] = setupGesture(\n targetOrSelector,\n options\n )\n\n const startPress = (startEvent: PointerEvent) => {\n const target = startEvent.currentTarget as Element\n\n if (!isValidPressEvent(startEvent)) return\n if (claimedPointerDownEvents.has(startEvent)) return\n\n isPressing.add(target)\n\n if (options.stopPropagation) {\n claimedPointerDownEvents.add(startEvent)\n }\n\n const onPressEnd = onPressStart(target, startEvent)\n\n const onPointerEnd = (endEvent: PointerEvent, success: boolean) => {\n window.removeEventListener(\"pointerup\", onPointerUp)\n window.removeEventListener(\"pointercancel\", onPointerCancel)\n\n if (isPressing.has(target)) {\n isPressing.delete(target)\n }\n\n if (!isValidPressEvent(endEvent)) {\n return\n }\n\n if (typeof onPressEnd === \"function\") {\n onPressEnd(endEvent, { success })\n }\n }\n\n const onPointerUp = (upEvent: PointerEvent) => {\n onPointerEnd(\n upEvent,\n (target as any) === window ||\n (target as any) === document ||\n options.useGlobalTarget ||\n isNodeOrChild(target, upEvent.target as Element)\n )\n }\n\n const onPointerCancel = (cancelEvent: PointerEvent) => {\n onPointerEnd(cancelEvent, false)\n }\n\n window.addEventListener(\"pointerup\", onPointerUp, eventOptions)\n window.addEventListener(\"pointercancel\", onPointerCancel, eventOptions)\n }\n\n targets.forEach((target: EventTarget) => {\n const pointerDownTarget = options.useGlobalTarget ? window : target\n pointerDownTarget.addEventListener(\n \"pointerdown\",\n startPress as EventListener,\n eventOptions\n )\n\n if (isHTMLElement(target)) {\n target.addEventListener(\"focus\", (event) =>\n enableKeyboardPress(event as FocusEvent, eventOptions)\n )\n\n if (\n !isElementKeyboardAccessible(target) &&\n !target.hasAttribute(\"tabindex\")\n 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F,IAAA,OAAO,YAAY;AACvB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs deleted file mode 100644 index defa4bfc..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +++ /dev/null @@ -1,34 +0,0 @@ -const keyboardAccessibleElements = new Set([ - "BUTTON", - "INPUT", - "SELECT", - "TEXTAREA", - "A", -]); -/** - * Checks if an element is natively keyboard accessible (focusable). - * Used by the press gesture to determine if we need to add tabIndex. - */ -function isElementKeyboardAccessible(element) { - return (keyboardAccessibleElements.has(element.tagName) || - element.isContentEditable === true); -} -const textInputElements = new Set(["INPUT", "SELECT", "TEXTAREA"]); -/** - * Checks if an element has text selection or direct interaction behavior - * that should block drag gestures from starting. - * - * This specifically targets form controls where the user might want to select - * text or interact with the control (e.g., sliders, dropdowns). - * - * Buttons and links are NOT included because they don't have click-and-move - * actions of their own - they only respond to click events, so dragging - * should still work when initiated from these elements. - */ -function isElementTextInput(element) { - return (textInputElements.has(element.tagName) || - element.isContentEditable === true); -} - -export { isElementKeyboardAccessible, isElementTextInput }; -//# sourceMappingURL=is-keyboard-accessible.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.map deleted file mode 100644 index cc945170..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-keyboard-accessible.mjs","sources":["../../../../../src/gestures/press/utils/is-keyboard-accessible.ts"],"sourcesContent":["const keyboardAccessibleElements = new Set([\n \"BUTTON\",\n \"INPUT\",\n \"SELECT\",\n \"TEXTAREA\",\n \"A\",\n])\n\n/**\n * Checks if an element is natively keyboard accessible (focusable).\n * Used by the press gesture to determine if we need to add tabIndex.\n */\nexport function isElementKeyboardAccessible(element: Element) {\n return (\n keyboardAccessibleElements.has(element.tagName) ||\n (element as HTMLElement).isContentEditable === true\n )\n}\n\nconst textInputElements = new Set([\"INPUT\", \"SELECT\", \"TEXTAREA\"])\n\n/**\n * Checks if an element has text selection or direct interaction behavior\n * that should block drag gestures from starting.\n *\n * This specifically targets form controls where the user might want to select\n * text or interact with the control (e.g., sliders, dropdowns).\n *\n * Buttons and links are NOT included because they don't have click-and-move\n * actions of their own - they only respond to click events, so dragging\n * should still work when initiated from these elements.\n */\nexport function isElementTextInput(element: Element) {\n return (\n textInputElements.has(element.tagName) ||\n (element as HTMLElement).isContentEditable === true\n )\n}\n"],"names":[],"mappings":"AAAA,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACvC,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,UAAU;IACV,GAAG;AACN,CAAA,CAAC;AAEF;;;AAGG;AACG,SAAU,2BAA2B,CAAC,OAAgB,EAAA;IACxD,QACI,0BAA0B,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;AAC9C,QAAA,OAAuB,CAAC,iBAAiB,KAAK,IAAI;AAE3D;AAEA,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAElE;;;;;;;;;;AAUG;AACG,SAAU,kBAAkB,CAAC,OAAgB,EAAA;IAC/C,QACI,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;AACrC,QAAA,OAAuB,CAAC,iBAAiB,KAAK,IAAI;AAE3D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs deleted file mode 100644 index 81865998..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +++ /dev/null @@ -1,39 +0,0 @@ -import { isPressing } from './state.mjs'; - -/** - * Filter out events that are not "Enter" keys. - */ -function filterEvents(callback) { - return (event) => { - if (event.key !== "Enter") - return; - callback(event); - }; -} -function firePointerEvent(target, type) { - target.dispatchEvent(new PointerEvent("pointer" + type, { isPrimary: true, bubbles: true })); -} -const enableKeyboardPress = (focusEvent, eventOptions) => { - const element = focusEvent.currentTarget; - if (!element) - return; - const handleKeydown = filterEvents(() => { - if (isPressing.has(element)) - return; - firePointerEvent(element, "down"); - const handleKeyup = filterEvents(() => { - firePointerEvent(element, "up"); - }); - const handleBlur = () => firePointerEvent(element, "cancel"); - element.addEventListener("keyup", handleKeyup, eventOptions); - element.addEventListener("blur", handleBlur, eventOptions); - }); - element.addEventListener("keydown", handleKeydown, eventOptions); - /** - * Add an event listener that fires on blur to remove the keydown events. - */ - element.addEventListener("blur", () => element.removeEventListener("keydown", handleKeydown), eventOptions); -}; - -export { enableKeyboardPress }; -//# sourceMappingURL=keyboard.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.map deleted file mode 100644 index d83f7b62..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keyboard.mjs","sources":["../../../../../src/gestures/press/utils/keyboard.ts"],"sourcesContent":["import { isPressing } from \"./state\"\n\n/**\n * Filter out events that are not \"Enter\" keys.\n */\nfunction filterEvents(callback: (event: KeyboardEvent) => void) {\n return (event: KeyboardEvent) => {\n if (event.key !== \"Enter\") return\n callback(event)\n }\n}\n\nfunction firePointerEvent(target: EventTarget, type: \"down\" | \"up\" | \"cancel\") {\n target.dispatchEvent(\n new PointerEvent(\"pointer\" + type, { isPrimary: true, bubbles: true })\n )\n}\n\nexport const enableKeyboardPress = (\n focusEvent: FocusEvent,\n eventOptions: AddEventListenerOptions\n) => {\n const element = focusEvent.currentTarget as HTMLElement\n if (!element) return\n\n const handleKeydown = filterEvents(() => {\n if (isPressing.has(element)) return\n\n firePointerEvent(element, \"down\")\n\n const handleKeyup = filterEvents(() => {\n firePointerEvent(element, \"up\")\n })\n\n const handleBlur = () => firePointerEvent(element, \"cancel\")\n\n element.addEventListener(\"keyup\", handleKeyup, eventOptions)\n element.addEventListener(\"blur\", handleBlur, eventOptions)\n })\n\n element.addEventListener(\"keydown\", handleKeydown, eventOptions)\n\n /**\n * Add an event listener that fires on blur to remove the keydown events.\n */\n element.addEventListener(\n \"blur\",\n () => element.removeEventListener(\"keydown\", handleKeydown),\n eventOptions\n )\n}\n"],"names":[],"mappings":";;AAEA;;AAEG;AACH,SAAS,YAAY,CAAC,QAAwC,EAAA;IAC1D,OAAO,CAAC,KAAoB,KAAI;AAC5B,QAAA,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO;YAAE;QAC3B,QAAQ,CAAC,KAAK,CAAC;AACnB,IAAA,CAAC;AACL;AAEA,SAAS,gBAAgB,CAAC,MAAmB,EAAE,IAA8B,EAAA;IACzE,MAAM,CAAC,aAAa,CAChB,IAAI,YAAY,CAAC,SAAS,GAAG,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CACzE;AACL;MAEa,mBAAmB,GAAG,CAC/B,UAAsB,EACtB,YAAqC,KACrC;AACA,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,aAA4B;AACvD,IAAA,IAAI,CAAC,OAAO;QAAE;AAEd,IAAA,MAAM,aAAa,GAAG,YAAY,CAAC,MAAK;AACpC,QAAA,IAAI,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC;YAAE;AAE7B,QAAA,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC;AAEjC,QAAA,MAAM,WAAW,GAAG,YAAY,CAAC,MAAK;AAClC,YAAA,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC;AACnC,QAAA,CAAC,CAAC;QAEF,MAAM,UAAU,GAAG,MAAM,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC;QAE5D,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC;QAC5D,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC;AAC9D,IAAA,CAAC,CAAC;IAEF,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,aAAa,EAAE,YAAY,CAAC;AAEhE;;AAEG;AACH,IAAA,OAAO,CAAC,gBAAgB,CACpB,MAAM,EACN,MAAM,OAAO,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,EAC3D,YAAY,CACf;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs deleted file mode 100644 index ac86eab4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const isPressing = new WeakSet(); - -export { isPressing }; -//# sourceMappingURL=state.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs.map deleted file mode 100644 index ee9c7c1f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"state.mjs","sources":["../../../../../src/gestures/press/utils/state.ts"],"sourcesContent":["export const isPressing = new WeakSet()\n"],"names":[],"mappings":"AAAO,MAAM,UAAU,GAAG,IAAI,OAAO;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs deleted file mode 100644 index 7cc1da69..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Recursively traverse up the tree to check whether the provided child node - * is the parent or a descendant of it. - * - * @param parent - Element to find - * @param child - Element to test against parent - */ -const isNodeOrChild = (parent, child) => { - if (!child) { - return false; - } - else if (parent === child) { - return true; - } - else { - return isNodeOrChild(parent, child.parentElement); - } -}; - -export { isNodeOrChild }; -//# sourceMappingURL=is-node-or-child.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs.map deleted file mode 100644 index 91603752..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-node-or-child.mjs","sources":["../../../../src/gestures/utils/is-node-or-child.ts"],"sourcesContent":["/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nexport const isNodeOrChild = (\n parent: Element | null,\n child?: Element | null\n): boolean => {\n if (!child) {\n return false\n } else if (parent === child) {\n return true\n } else {\n return isNodeOrChild(parent, child.parentElement)\n }\n}\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;MACU,aAAa,GAAG,CACzB,MAAsB,EACtB,KAAsB,KACb;IACT,IAAI,CAAC,KAAK,EAAE;AACR,QAAA,OAAO,KAAK;IAChB;AAAO,SAAA,IAAI,MAAM,KAAK,KAAK,EAAE;AACzB,QAAA,OAAO,IAAI;IACf;SAAO;QACH,OAAO,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC;IACrD;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs deleted file mode 100644 index c013d7ee..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +++ /dev/null @@ -1,19 +0,0 @@ -const isPrimaryPointer = (event) => { - if (event.pointerType === "mouse") { - return typeof event.button !== "number" || event.button <= 0; - } - else { - /** - * isPrimary is true for all mice buttons, whereas every touch point - * is regarded as its own input. So subsequent concurrent touch points - * will be false. - * - * Specifically match against false here as incomplete versions of - * PointerEvents in very old browser might have it set as undefined. - */ - return event.isPrimary !== false; - } -}; - -export { isPrimaryPointer }; -//# sourceMappingURL=is-primary-pointer.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs.map deleted file mode 100644 index d391a326..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-primary-pointer.mjs","sources":["../../../../src/gestures/utils/is-primary-pointer.ts"],"sourcesContent":["export const isPrimaryPointer = (event: PointerEvent) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0\n } else {\n /**\n * isPrimary is true for all mice buttons, whereas every touch point\n * is regarded as its own input. So subsequent concurrent touch points\n * will be false.\n *\n * Specifically match against false here as incomplete versions of\n * PointerEvents in very old browser might have it set as undefined.\n */\n return event.isPrimary !== false\n }\n}\n"],"names":[],"mappings":"AAAO,MAAM,gBAAgB,GAAG,CAAC,KAAmB,KAAI;AACpD,IAAA,IAAI,KAAK,CAAC,WAAW,KAAK,OAAO,EAAE;AAC/B,QAAA,OAAO,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;IAChE;SAAO;AACH;;;;;;;AAOG;AACH,QAAA,OAAO,KAAK,CAAC,SAAS,KAAK,KAAK;IACpC;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs deleted file mode 100644 index 9505c062..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import { resolveElements } from '../../utils/resolve-elements.mjs'; - -function setupGesture(elementOrSelector, options) { - const elements = resolveElements(elementOrSelector); - const gestureAbortController = new AbortController(); - const eventOptions = { - passive: true, - ...options, - signal: gestureAbortController.signal, - }; - const cancel = () => gestureAbortController.abort(); - return [elements, eventOptions, cancel]; -} - -export { setupGesture }; -//# sourceMappingURL=setup.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.map deleted file mode 100644 index 5bfea58d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"setup.mjs","sources":["../../../../src/gestures/utils/setup.ts"],"sourcesContent":["import {\n ElementOrSelector,\n resolveElements,\n} from \"../../utils/resolve-elements\"\nimport { EventOptions } from \"../types\"\n\nexport function setupGesture(\n elementOrSelector: ElementOrSelector,\n options: EventOptions\n): [Element[], AddEventListenerOptions, VoidFunction] {\n const elements = resolveElements(elementOrSelector)\n\n const gestureAbortController = new AbortController()\n\n const eventOptions = {\n passive: true,\n ...options,\n signal: gestureAbortController.signal,\n }\n\n const cancel = () => gestureAbortController.abort()\n\n return [elements, eventOptions, cancel]\n}\n"],"names":[],"mappings":";;AAMM,SAAU,YAAY,CACxB,iBAAoC,EACpC,OAAqB,EAAA;AAErB,IAAA,MAAM,QAAQ,GAAG,eAAe,CAAC,iBAAiB,CAAC;AAEnD,IAAA,MAAM,sBAAsB,GAAG,IAAI,eAAe,EAAE;AAEpD,IAAA,MAAM,YAAY,GAAG;AACjB,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,GAAG,OAAO;QACV,MAAM,EAAE,sBAAsB,CAAC,MAAM;KACxC;IAED,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC,KAAK,EAAE;AAEnD,IAAA,OAAO,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC;AAC3C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/index.mjs deleted file mode 100644 index 5bf262a9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/index.mjs +++ /dev/null @@ -1,177 +0,0 @@ -export { AsyncMotionValueAnimation } from './animation/AsyncMotionValueAnimation.mjs'; -export { GroupAnimation } from './animation/GroupAnimation.mjs'; -export { GroupAnimationWithThen } from './animation/GroupAnimationWithThen.mjs'; -export { JSAnimation, animateValue } from './animation/JSAnimation.mjs'; -export { NativeAnimation } from './animation/NativeAnimation.mjs'; -export { NativeAnimationExtended } from './animation/NativeAnimationExtended.mjs'; -export { NativeAnimationWrapper } from './animation/NativeAnimationWrapper.mjs'; -export { animationMapKey, getAnimationMap } from './animation/utils/active-animations.mjs'; -export { calcChildStagger } from './animation/utils/calc-child-stagger.mjs'; -export { arc } from './animation/utils/arc.mjs'; -export { getVariableValue, parseCSSVariable } from './animation/utils/css-variables-conversion.mjs'; -export { getDefaultTransition } from './animation/utils/default-transitions.mjs'; -export { getFinalKeyframe } from './animation/keyframes/get-final.mjs'; -export { getValueTransition } from './animation/utils/get-value-transition.mjs'; -export { resolveTransition } from './animation/utils/resolve-transition.mjs'; -export { containsCSSVariable, isCSSVariableName, isCSSVariableToken } from './animation/utils/is-css-variable.mjs'; -export { isTransitionDefined } from './animation/utils/is-transition-defined.mjs'; -export { makeAnimationInstant } from './animation/utils/make-animation-instant.mjs'; -export { animateMotionValue } from './animation/interfaces/motion-value.mjs'; -export { animateVisualElement } from './animation/interfaces/visual-element.mjs'; -export { animateTarget } from './animation/interfaces/visual-element-target.mjs'; -export { animateVariant } from './animation/interfaces/visual-element-variant.mjs'; -export { optimizedAppearDataAttribute, optimizedAppearDataId } from './animation/optimized-appear/data-id.mjs'; -export { getOptimisedAppearId } from './animation/optimized-appear/get-appear-id.mjs'; -export { inertia } from './animation/generators/inertia.mjs'; -export { defaultEasing, keyframes } from './animation/generators/keyframes.mjs'; -export { spring } from './animation/generators/spring.mjs'; -export { calcGeneratorDuration, maxGeneratorDuration } from './animation/generators/utils/calc-duration.mjs'; -export { createGeneratorEasing } from './animation/generators/utils/create-generator-easing.mjs'; -export { isGenerator } from './animation/generators/utils/is-generator.mjs'; -export { DOMKeyframesResolver } from './animation/keyframes/DOMKeyframesResolver.mjs'; -export { KeyframeResolver, flushKeyframeResolvers } from './animation/keyframes/KeyframesResolver.mjs'; -export { defaultOffset } from './animation/keyframes/offsets/default.mjs'; -export { fillOffset } from './animation/keyframes/offsets/fill.mjs'; -export { convertOffsetToTimes } from './animation/keyframes/offsets/time.mjs'; -export { applyPxDefaults } from './animation/keyframes/utils/apply-px-defaults.mjs'; -export { fillWildcards } from './animation/keyframes/utils/fill-wildcards.mjs'; -export { cubicBezierAsString } from './animation/waapi/easing/cubic-bezier.mjs'; -export { isWaapiSupportedEasing } from './animation/waapi/easing/is-supported.mjs'; -export { mapEasingToNativeEasing } from './animation/waapi/easing/map-easing.mjs'; -export { supportedWaapiEasing } from './animation/waapi/easing/supported.mjs'; -export { startWaapiAnimation } from './animation/waapi/start-waapi-animation.mjs'; -export { supportsPartialKeyframes } from './animation/waapi/supports/partial-keyframes.mjs'; -export { supportsBrowserAnimation } from './animation/waapi/supports/waapi.mjs'; -export { acceleratedValues } from './animation/waapi/utils/accelerated-values.mjs'; -export { applyGeneratorOptions } from './animation/waapi/utils/apply-generator.mjs'; -export { generateLinearEasing } from './animation/waapi/utils/linear.mjs'; -export { addAttrValue, attrEffect } from './effects/attr/index.mjs'; -export { propEffect } from './effects/prop/index.mjs'; -export { addStyleValue, styleEffect } from './effects/style/index.mjs'; -export { svgEffect } from './effects/svg/index.mjs'; -export { createRenderBatcher } from './frameloop/batcher.mjs'; -export { cancelMicrotask, microtask } from './frameloop/microtask.mjs'; -export { time } from './frameloop/sync-time.mjs'; -export { isDragActive, isDragging } from './gestures/drag/state/is-active.mjs'; -export { setDragLock } from './gestures/drag/state/set-active.mjs'; -export { hover } from './gestures/hover.mjs'; -export { press } from './gestures/press/index.mjs'; -export { isElementKeyboardAccessible, isElementTextInput } from './gestures/press/utils/is-keyboard-accessible.mjs'; -export { isNodeOrChild } from './gestures/utils/is-node-or-child.mjs'; -export { isPrimaryPointer } from './gestures/utils/is-primary-pointer.mjs'; -export { defaultTransformValue, parseValueFromTransform, readTransformValue } from './render/dom/parse-transform.mjs'; -export { getComputedStyle } from './render/dom/style-computed.mjs'; -export { setStyle } from './render/dom/style-set.mjs'; -export { isKeyframesTarget } from './render/utils/is-keyframes-target.mjs'; -export { positionalKeys } from './render/utils/keys-position.mjs'; -export { transformPropOrder, transformProps } from './render/utils/keys-transform.mjs'; -export { resize } from './resize/index.mjs'; -export { observeTimeline } from './scroll/observe.mjs'; -export { recordStats } from './stats/index.mjs'; -export { activeAnimations } from './stats/animation-count.mjs'; -export { statsBuffer } from './stats/buffer.mjs'; -export { interpolate } from './utils/interpolate.mjs'; -export { isHTMLElement } from './utils/is-html-element.mjs'; -export { isSVGElement } from './utils/is-svg-element.mjs'; -export { isSVGSVGElement } from './utils/is-svg-svg-element.mjs'; -export { mix } from './utils/mix/index.mjs'; -export { mixColor, mixLinearColor } from './utils/mix/color.mjs'; -export { getMixer, mixArray, mixComplex, mixObject } from './utils/mix/complex.mjs'; -export { mixImmediate } from './utils/mix/immediate.mjs'; -export { mixNumber } from './utils/mix/number.mjs'; -export { invisibleValues, mixVisibility } from './utils/mix/visibility.mjs'; -export { resolveElements } from './utils/resolve-elements.mjs'; -export { getOriginIndex, stagger } from './utils/stagger.mjs'; -export { supportsFlags } from './utils/supports/flags.mjs'; -export { supportsLinearEasing } from './utils/supports/linear-easing.mjs'; -export { supportsScrollTimeline, supportsViewTimeline } from './utils/supports/scroll-timeline.mjs'; -export { transform } from './utils/transform.mjs'; -export { MotionValue, collectMotionValues, motionValue } from './value/index.mjs'; -export { attachFollow, followValue } from './value/follow-value.mjs'; -export { mapValue } from './value/map-value.mjs'; -export { attachSpring, springValue } from './value/spring-value.mjs'; -export { transformValue } from './value/transform-value.mjs'; -export { color } from './value/types/color/index.mjs'; -export { hex } from './value/types/color/hex.mjs'; -export { hsla } from './value/types/color/hsla.mjs'; -export { hslaToRgba } from './value/types/color/hsla-to-rgba.mjs'; -export { rgbUnit, rgba } from './value/types/color/rgba.mjs'; -export { analyseComplexValue, complex } from './value/types/complex/index.mjs'; -export { dimensionValueTypes, findDimensionValueType } from './value/types/dimensions.mjs'; -export { defaultValueTypes, getDefaultValueType } from './value/types/maps/defaults.mjs'; -export { numberValueTypes } from './value/types/maps/number.mjs'; -export { transformValueTypes } from './value/types/maps/transform.mjs'; -export { alpha, number, scale } from './value/types/numbers/index.mjs'; -export { degrees, percent, progressPercentage, px, vh, vw } from './value/types/numbers/units.mjs'; -export { testValueType } from './value/types/test.mjs'; -export { getAnimatableNone } from './value/types/utils/animatable-none.mjs'; -export { findValueType } from './value/types/utils/find.mjs'; -export { getValueAsType } from './value/types/utils/get-as-type.mjs'; -export { isMotionValue } from './value/utils/is-motion-value.mjs'; -export { addValueToWillChange } from './value/will-change/add-will-change.mjs'; -export { isWillChangeMotionValue } from './value/will-change/is.mjs'; -export { ViewTransitionBuilder, animateView } from './view/index.mjs'; -export { getViewAnimationLayerInfo } from './view/utils/get-layer-info.mjs'; -export { getViewAnimations } from './view/utils/get-view-animations.mjs'; -export { DOMVisualElement } from './render/dom/DOMVisualElement.mjs'; -export { Feature } from './render/Feature.mjs'; -export { HTMLVisualElement } from './render/html/HTMLVisualElement.mjs'; -export { ObjectVisualElement } from './render/object/ObjectVisualElement.mjs'; -export { visualElementStore } from './render/store.mjs'; -export { SVGVisualElement } from './render/svg/SVGVisualElement.mjs'; -export { VisualElement, getFeatureDefinitions, setFeatureDefinitions } from './render/VisualElement.mjs'; -export { checkVariantsDidChange, createAnimationState } from './render/utils/animation-state.mjs'; -export { getVariantContext } from './render/utils/get-variant-context.mjs'; -export { isAnimationControls } from './render/utils/is-animation-controls.mjs'; -export { isControllingVariants, isVariantNode } from './render/utils/is-controlling-variants.mjs'; -export { isForcedMotionValue } from './render/utils/is-forced-motion-value.mjs'; -export { isVariantLabel } from './render/utils/is-variant-label.mjs'; -export { updateMotionValuesFromProps } from './render/utils/motion-values.mjs'; -export { resolveVariant } from './render/utils/resolve-dynamic-variants.mjs'; -export { resolveVariantFromProps } from './render/utils/resolve-variants.mjs'; -export { setTarget } from './render/utils/setters.mjs'; -export { variantPriorityOrder, variantProps } from './render/utils/variant-props.mjs'; -export { initPrefersReducedMotion } from './render/utils/reduced-motion/index.mjs'; -export { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints } from './projection/geometry/conversion.mjs'; -export { copyAxisDeltaInto, copyAxisInto, copyBoxInto } from './projection/geometry/copy.mjs'; -export { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis } from './projection/geometry/delta-apply.mjs'; -export { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear } from './projection/geometry/delta-calc.mjs'; -export { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta } from './projection/geometry/delta-remove.mjs'; -export { createAxis, createAxisDelta, createBox, createDelta } from './projection/geometry/models.mjs'; -export { aspectRatio, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, isDeltaZero } from './projection/geometry/utils.mjs'; -export { eachAxis } from './projection/utils/each-axis.mjs'; -export { has2DTranslate, hasScale, hasTransform } from './projection/utils/has-transform.mjs'; -export { measurePageBox, measureViewportBox } from './projection/utils/measure.mjs'; -export { correctBorderRadius, pixelsToPercent } from './projection/styles/scale-border-radius.mjs'; -export { correctBoxShadow } from './projection/styles/scale-box-shadow.mjs'; -export { buildProjectionTransform } from './projection/styles/transform.mjs'; -export { mixValues } from './projection/animation/mix-values.mjs'; -export { animateSingleValue } from './animation/animate/single-value.mjs'; -export { addDomEvent } from './events/add-dom-event.mjs'; -export { compareByDepth } from './projection/utils/compare-by-depth.mjs'; -export { FlatTree } from './projection/utils/flat-tree.mjs'; -export { delay, delayInSeconds } from './utils/delay.mjs'; -export { resolveMotionValue } from './value/utils/resolve-motion-value.mjs'; -export { cleanDirtyNodes, createProjectionNode, propagateDirtyNodes } from './projection/node/create-projection-node.mjs'; -export { DocumentProjectionNode } from './projection/node/DocumentProjectionNode.mjs'; -export { nodeGroup } from './projection/node/group.mjs'; -export { HTMLProjectionNode, rootProjectionNode } from './projection/node/HTMLProjectionNode.mjs'; -export { globalProjectionState } from './projection/node/state.mjs'; -export { NodeStack } from './projection/shared/stack.mjs'; -export { camelToDash } from './render/dom/utils/camel-to-dash.mjs'; -export { buildHTMLStyles } from './render/html/utils/build-styles.mjs'; -export { buildTransform } from './render/html/utils/build-transform.mjs'; -export { renderHTML } from './render/html/utils/render.mjs'; -export { scrapeMotionValuesFromProps as scrapeHTMLMotionValuesFromProps } from './render/html/utils/scrape-motion-values.mjs'; -export { buildSVGAttrs } from './render/svg/utils/build-attrs.mjs'; -export { camelCaseAttributes } from './render/svg/utils/camel-case-attrs.mjs'; -export { isSVGTag } from './render/svg/utils/is-svg-tag.mjs'; -export { buildSVGPath } from './render/svg/utils/path.mjs'; -export { renderSVG } from './render/svg/utils/render.mjs'; -export { scrapeMotionValuesFromProps as scrapeSVGMotionValuesFromProps } from './render/svg/utils/scrape-motion-values.mjs'; -export { LayoutAnimationBuilder, parseAnimateLayoutArgs } from './layout/LayoutAnimationBuilder.mjs'; -export { cancelSync, sync } from './frameloop/index-legacy.mjs'; -export { addScaleCorrector, scaleCorrectors } from './projection/styles/scale-correction.mjs'; -export { cancelFrame, frame, frameData, frameSteps } from './frameloop/frame.mjs'; -export { hasReducedMotionListener, prefersReducedMotion } from './render/utils/reduced-motion/state.mjs'; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/index.mjs.map deleted file mode 100644 index 28cb21eb..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/layout/LayoutAnimationBuilder.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/layout/LayoutAnimationBuilder.mjs deleted file mode 100644 index 701b6445..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/layout/LayoutAnimationBuilder.mjs +++ /dev/null @@ -1,269 +0,0 @@ -import { GroupAnimation } from '../animation/GroupAnimation.mjs'; -import { copyBoxInto } from '../projection/geometry/copy.mjs'; -import { createBox } from '../projection/geometry/models.mjs'; -import { HTMLProjectionNode } from '../projection/node/HTMLProjectionNode.mjs'; -import { HTMLVisualElement } from '../render/html/HTMLVisualElement.mjs'; -import { visualElementStore } from '../render/store.mjs'; -import { resolveElements } from '../utils/resolve-elements.mjs'; -import { frame } from '../frameloop/frame.mjs'; - -const layoutSelector = "[data-layout], [data-layout-id]"; -const noop = () => { }; -function snapshotFromTarget(projection) { - const target = projection.targetWithTransforms || projection.target; - if (!target) - return undefined; - const measuredBox = createBox(); - const layoutBox = createBox(); - copyBoxInto(measuredBox, target); - copyBoxInto(layoutBox, target); - return { - animationId: projection.root?.animationId ?? 0, - measuredBox, - layoutBox, - latestValues: projection.animationValues || projection.latestValues || {}, - source: projection.id, - }; -} -class LayoutAnimationBuilder { - constructor(scope, updateDom, defaultOptions) { - this.sharedTransitions = new Map(); - this.notifyReady = noop; - this.rejectReady = noop; - this.scope = scope; - this.updateDom = updateDom; - this.defaultOptions = defaultOptions; - this.readyPromise = new Promise((resolve, reject) => { - this.notifyReady = resolve; - this.rejectReady = reject; - }); - frame.postRender(() => { - this.start().then(this.notifyReady).catch(this.rejectReady); - }); - } - shared(id, transition) { - this.sharedTransitions.set(id, transition); - return this; - } - then(resolve, reject) { - return this.readyPromise.then(resolve, reject); - } - async start() { - const beforeElements = collectLayoutElements(this.scope); - const beforeRecords = this.buildRecords(beforeElements); - beforeRecords.forEach(({ projection }) => { - const hasCurrentAnimation = Boolean(projection.currentAnimation); - const isSharedLayout = Boolean(projection.options.layoutId); - if (hasCurrentAnimation && isSharedLayout) { - const snapshot = snapshotFromTarget(projection); - if (snapshot) { - projection.snapshot = snapshot; - } - else if (projection.snapshot) { - projection.snapshot = undefined; - } - } - else if (projection.snapshot && - (projection.currentAnimation || projection.isProjecting())) { - projection.snapshot = undefined; - } - projection.isPresent = true; - projection.willUpdate(); - }); - await this.updateDom(); - const afterElements = collectLayoutElements(this.scope); - const afterRecords = this.buildRecords(afterElements); - this.handleExitingElements(beforeRecords, afterRecords); - afterRecords.forEach(({ projection }) => { - const instance = projection.instance; - const resumeFromInstance = projection.resumeFrom - ?.instance; - if (!instance || !resumeFromInstance) - return; - if (!("style" in instance)) - return; - const currentTransform = instance.style.transform; - const resumeFromTransform = resumeFromInstance.style.transform; - if (currentTransform && - resumeFromTransform && - currentTransform === resumeFromTransform) { - instance.style.transform = ""; - instance.style.transformOrigin = ""; - } - }); - afterRecords.forEach(({ projection }) => { - projection.isPresent = true; - }); - const root = getProjectionRoot(afterRecords, beforeRecords); - root?.didUpdate(); - await new Promise((resolve) => { - frame.postRender(() => resolve()); - }); - const animations = collectAnimations(afterRecords); - const animation = new GroupAnimation(animations); - return animation; - } - buildRecords(elements) { - const records = []; - const recordMap = new Map(); - for (const element of elements) { - const parentRecord = findParentRecord(element, recordMap, this.scope); - const { layout, layoutId } = readLayoutAttributes(element); - const override = layoutId - ? this.sharedTransitions.get(layoutId) - : undefined; - const transition = override || this.defaultOptions; - const record = getOrCreateRecord(element, parentRecord?.projection, { - layout, - layoutId, - animationType: typeof layout === "string" ? layout : "both", - transition: transition, - }); - recordMap.set(element, record); - records.push(record); - } - return records; - } - handleExitingElements(beforeRecords, afterRecords) { - const afterElementsSet = new Set(afterRecords.map((record) => record.element)); - beforeRecords.forEach((record) => { - if (afterElementsSet.has(record.element)) - return; - // For shared layout elements, relegate to set up resumeFrom - // so the remaining element animates from this position - if (record.projection.options.layoutId) { - record.projection.isPresent = false; - record.projection.relegate(); - } - record.visualElement.unmount(); - visualElementStore.delete(record.element); - }); - // Clear resumeFrom on EXISTING nodes that point to unmounted projections - // This prevents crossfade animation when the source element was removed entirely - // But preserve resumeFrom for NEW nodes so they can animate from the old position - // Also preserve resumeFrom for lead nodes that were just promoted via relegate - const beforeElementsSet = new Set(beforeRecords.map((record) => record.element)); - afterRecords.forEach(({ element, projection }) => { - if (beforeElementsSet.has(element) && - projection.resumeFrom && - !projection.resumeFrom.instance && - !projection.isLead()) { - projection.resumeFrom = undefined; - projection.snapshot = undefined; - } - }); - } -} -function parseAnimateLayoutArgs(scopeOrUpdateDom, updateDomOrOptions, options) { - // animateLayout(updateDom) - if (typeof scopeOrUpdateDom === "function") { - return { - scope: document, - updateDom: scopeOrUpdateDom, - defaultOptions: updateDomOrOptions, - }; - } - // animateLayout(scope, updateDom, options?) - const elements = resolveElements(scopeOrUpdateDom); - const scope = elements[0] || document; - return { - scope, - updateDom: updateDomOrOptions, - defaultOptions: options, - }; -} -function collectLayoutElements(scope) { - const elements = Array.from(scope.querySelectorAll(layoutSelector)); - if (scope instanceof Element && scope.matches(layoutSelector)) { - if (!elements.includes(scope)) { - elements.unshift(scope); - } - } - return elements; -} -function readLayoutAttributes(element) { - const layoutId = element.getAttribute("data-layout-id") || undefined; - const rawLayout = element.getAttribute("data-layout"); - let layout; - if (rawLayout === "" || rawLayout === "true") { - layout = true; - } - else if (rawLayout) { - layout = rawLayout; - } - return { - layout, - layoutId, - }; -} -function createVisualState() { - return { - latestValues: {}, - renderState: { - transform: {}, - transformOrigin: {}, - style: {}, - vars: {}, - }, - }; -} -function getOrCreateRecord(element, parentProjection, projectionOptions) { - const existing = visualElementStore.get(element); - const visualElement = existing ?? - new HTMLVisualElement({ - props: {}, - presenceContext: null, - visualState: createVisualState(), - }, { allowProjection: true }); - if (!existing || !visualElement.projection) { - visualElement.projection = new HTMLProjectionNode(visualElement.latestValues, parentProjection); - } - visualElement.projection.setOptions({ - ...projectionOptions, - visualElement, - }); - if (!visualElement.current) { - visualElement.mount(element); - } - else if (!visualElement.projection.instance) { - // Mount projection if VisualElement is already mounted but projection isn't - // This happens when animate() was called before animateLayout() - visualElement.projection.mount(element); - } - if (!existing) { - visualElementStore.set(element, visualElement); - } - return { - element, - visualElement, - projection: visualElement.projection, - }; -} -function findParentRecord(element, recordMap, scope) { - let parent = element.parentElement; - while (parent) { - const record = recordMap.get(parent); - if (record) - return record; - if (parent === scope) - break; - parent = parent.parentElement; - } - return undefined; -} -function getProjectionRoot(afterRecords, beforeRecords) { - const record = afterRecords[0] || beforeRecords[0]; - return record?.projection.root; -} -function collectAnimations(afterRecords) { - const animations = new Set(); - afterRecords.forEach((record) => { - const animation = record.projection.currentAnimation; - if (animation) - animations.add(animation); - }); - return Array.from(animations); -} - -export { LayoutAnimationBuilder, parseAnimateLayoutArgs }; -//# sourceMappingURL=LayoutAnimationBuilder.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/layout/LayoutAnimationBuilder.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/layout/LayoutAnimationBuilder.mjs.map deleted file mode 100644 index c1e14dfc..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/layout/LayoutAnimationBuilder.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LayoutAnimationBuilder.mjs","sources":["../../../src/layout/LayoutAnimationBuilder.ts"],"sourcesContent":["import type { Box } from \"motion-utils\"\nimport { GroupAnimation } from \"../animation/GroupAnimation\"\nimport type {\n AnimationOptions,\n AnimationPlaybackControls,\n Transition,\n} from \"../animation/types\"\nimport { frame } from \"../frameloop\"\nimport { copyBoxInto } from \"../projection/geometry/copy\"\nimport { createBox } from \"../projection/geometry/models\"\nimport { HTMLProjectionNode } from \"../projection/node/HTMLProjectionNode\"\nimport type { IProjectionNode } from \"../projection/node/types\"\nimport { HTMLVisualElement } from \"../render/html/HTMLVisualElement\"\nimport { visualElementStore } from \"../render/store\"\nimport type { VisualElement } from \"../render/VisualElement\"\nimport { resolveElements, type ElementOrSelector } from \"../utils/resolve-elements\"\n\ntype LayoutAnimationScope = Element | Document\n\ninterface LayoutElementRecord {\n element: Element\n visualElement: VisualElement\n projection: IProjectionNode\n}\n\ninterface LayoutAttributes {\n layout?: boolean | \"position\" | \"size\" | \"preserve-aspect\" | \"x\" | \"y\"\n layoutId?: string\n}\n\ntype LayoutBuilderResolve = (animation: GroupAnimation) => void\ntype LayoutBuilderReject = (error: unknown) => void\n\ninterface ProjectionOptions {\n layout?: boolean | \"position\" | \"size\" | \"preserve-aspect\" | \"x\" | \"y\"\n layoutId?: string\n animationType?: \"size\" | \"position\" | \"both\" | \"preserve-aspect\" | \"x\" | \"y\"\n transition?: Transition\n crossfade?: boolean\n}\n\nconst layoutSelector = \"[data-layout], [data-layout-id]\"\nconst noop = () => {}\nfunction snapshotFromTarget(projection: IProjectionNode): LayoutElementRecord[\"projection\"][\"snapshot\"] {\n const target = projection.targetWithTransforms || projection.target\n if (!target) return undefined\n\n const measuredBox = createBox()\n const layoutBox = createBox()\n copyBoxInto(measuredBox, target as Box)\n copyBoxInto(layoutBox, target as Box)\n\n return {\n animationId: projection.root?.animationId ?? 0,\n measuredBox,\n layoutBox,\n latestValues: projection.animationValues || projection.latestValues || {},\n source: projection.id,\n }\n}\n\nexport class LayoutAnimationBuilder {\n private scope: LayoutAnimationScope\n private updateDom: () => void | Promise\n private defaultOptions?: AnimationOptions\n private sharedTransitions = new Map()\n private notifyReady: LayoutBuilderResolve = noop\n private rejectReady: LayoutBuilderReject = noop\n private readyPromise: Promise\n\n constructor(\n scope: LayoutAnimationScope,\n updateDom: () => void | Promise,\n defaultOptions?: AnimationOptions\n ) {\n this.scope = scope\n this.updateDom = updateDom\n this.defaultOptions = defaultOptions\n\n this.readyPromise = new Promise((resolve, reject) => {\n this.notifyReady = resolve\n this.rejectReady = reject\n })\n\n frame.postRender(() => {\n this.start().then(this.notifyReady).catch(this.rejectReady)\n })\n }\n\n shared(id: string, transition: AnimationOptions): this {\n this.sharedTransitions.set(id, transition)\n return this\n }\n\n then(\n resolve: LayoutBuilderResolve,\n reject?: LayoutBuilderReject\n ): Promise {\n return this.readyPromise.then(resolve, reject)\n }\n\n private async start(): Promise {\n const beforeElements = collectLayoutElements(this.scope)\n const beforeRecords = this.buildRecords(beforeElements)\n\n beforeRecords.forEach(({ projection }) => {\n const hasCurrentAnimation = Boolean(projection.currentAnimation)\n const isSharedLayout = Boolean(projection.options.layoutId)\n if (hasCurrentAnimation && isSharedLayout) {\n const snapshot = snapshotFromTarget(projection)\n if (snapshot) {\n projection.snapshot = snapshot\n } else if (projection.snapshot) {\n projection.snapshot = undefined\n }\n } else if (\n projection.snapshot &&\n (projection.currentAnimation || projection.isProjecting())\n ) {\n projection.snapshot = undefined\n }\n projection.isPresent = true\n projection.willUpdate()\n })\n\n await this.updateDom()\n\n const afterElements = collectLayoutElements(this.scope)\n const afterRecords = this.buildRecords(afterElements)\n this.handleExitingElements(beforeRecords, afterRecords)\n\n afterRecords.forEach(({ projection }) => {\n const instance = projection.instance as HTMLElement | undefined\n const resumeFromInstance = projection.resumeFrom\n ?.instance as HTMLElement | undefined\n if (!instance || !resumeFromInstance) return\n if (!(\"style\" in instance)) return\n\n const currentTransform = instance.style.transform\n const resumeFromTransform = resumeFromInstance.style.transform\n\n if (\n currentTransform &&\n resumeFromTransform &&\n currentTransform === resumeFromTransform\n ) {\n instance.style.transform = \"\"\n instance.style.transformOrigin = \"\"\n }\n })\n\n afterRecords.forEach(({ projection }) => {\n projection.isPresent = true\n })\n\n const root = getProjectionRoot(afterRecords, beforeRecords)\n root?.didUpdate()\n\n await new Promise((resolve) => {\n frame.postRender(() => resolve())\n })\n\n const animations = collectAnimations(afterRecords)\n const animation = new GroupAnimation(animations)\n\n return animation\n }\n\n private buildRecords(elements: Element[]): LayoutElementRecord[] {\n const records: LayoutElementRecord[] = []\n const recordMap = new Map()\n\n for (const element of elements) {\n const parentRecord = findParentRecord(element, recordMap, this.scope)\n const { layout, layoutId } = readLayoutAttributes(element)\n const override = layoutId\n ? this.sharedTransitions.get(layoutId)\n : undefined\n const transition = override || this.defaultOptions\n const record = getOrCreateRecord(element, parentRecord?.projection, {\n layout,\n layoutId,\n animationType: typeof layout === \"string\" ? layout : \"both\",\n transition: transition as Transition,\n })\n recordMap.set(element, record)\n records.push(record)\n }\n\n return records\n }\n\n private handleExitingElements(\n beforeRecords: LayoutElementRecord[],\n afterRecords: LayoutElementRecord[]\n ): void {\n const afterElementsSet = new Set(afterRecords.map((record) => record.element))\n\n beforeRecords.forEach((record) => {\n if (afterElementsSet.has(record.element)) return\n\n // For shared layout elements, relegate to set up resumeFrom\n // so the remaining element animates from this position\n if (record.projection.options.layoutId) {\n record.projection.isPresent = false\n record.projection.relegate()\n }\n\n record.visualElement.unmount()\n visualElementStore.delete(record.element)\n })\n\n // Clear resumeFrom on EXISTING nodes that point to unmounted projections\n // This prevents crossfade animation when the source element was removed entirely\n // But preserve resumeFrom for NEW nodes so they can animate from the old position\n // Also preserve resumeFrom for lead nodes that were just promoted via relegate\n const beforeElementsSet = new Set(beforeRecords.map((record) => record.element))\n afterRecords.forEach(({ element, projection }) => {\n if (\n beforeElementsSet.has(element) &&\n projection.resumeFrom &&\n !projection.resumeFrom.instance &&\n !projection.isLead()\n ) {\n projection.resumeFrom = undefined\n projection.snapshot = undefined\n }\n })\n }\n}\n\nexport function parseAnimateLayoutArgs(\n scopeOrUpdateDom: ElementOrSelector | (() => void),\n updateDomOrOptions?: (() => void) | AnimationOptions,\n options?: AnimationOptions\n): {\n scope: Element | Document\n updateDom: () => void\n defaultOptions?: AnimationOptions\n} {\n // animateLayout(updateDom)\n if (typeof scopeOrUpdateDom === \"function\") {\n return {\n scope: document,\n updateDom: scopeOrUpdateDom,\n defaultOptions: updateDomOrOptions as AnimationOptions | undefined,\n }\n }\n\n // animateLayout(scope, updateDom, options?)\n const elements = resolveElements(scopeOrUpdateDom)\n const scope = elements[0] || document\n\n return {\n scope,\n updateDom: updateDomOrOptions as () => void,\n defaultOptions: options,\n }\n}\n\nfunction collectLayoutElements(scope: LayoutAnimationScope): Element[] {\n const elements = Array.from(scope.querySelectorAll(layoutSelector))\n\n if (scope instanceof Element && scope.matches(layoutSelector)) {\n if (!elements.includes(scope)) {\n elements.unshift(scope)\n }\n }\n\n return elements\n}\n\nfunction readLayoutAttributes(element: Element): LayoutAttributes {\n const layoutId = element.getAttribute(\"data-layout-id\") || undefined\n const rawLayout = element.getAttribute(\"data-layout\")\n let layout: LayoutAttributes[\"layout\"]\n\n if (rawLayout === \"\" || rawLayout === \"true\") {\n layout = true\n } else if (rawLayout) {\n layout = rawLayout as LayoutAttributes[\"layout\"]\n }\n\n return {\n layout,\n layoutId,\n }\n}\n\nfunction createVisualState() {\n return {\n latestValues: {},\n renderState: {\n transform: {},\n transformOrigin: {},\n style: {},\n vars: {},\n },\n }\n}\n\nfunction getOrCreateRecord(\n element: Element,\n parentProjection?: IProjectionNode,\n projectionOptions?: ProjectionOptions\n): LayoutElementRecord {\n const existing = visualElementStore.get(element) as VisualElement | undefined\n const visualElement =\n existing ??\n new HTMLVisualElement(\n {\n props: {},\n presenceContext: null,\n visualState: createVisualState(),\n },\n { allowProjection: true }\n )\n\n if (!existing || !visualElement.projection) {\n visualElement.projection = new HTMLProjectionNode(\n visualElement.latestValues,\n parentProjection\n )\n }\n\n visualElement.projection.setOptions({\n ...projectionOptions,\n visualElement,\n })\n\n if (!visualElement.current) {\n visualElement.mount(element as HTMLElement)\n } else if (!visualElement.projection.instance) {\n // Mount projection if VisualElement is already mounted but projection isn't\n // This happens when animate() was called before animateLayout()\n visualElement.projection.mount(element as HTMLElement)\n }\n\n if (!existing) {\n visualElementStore.set(element, visualElement)\n }\n\n return {\n element,\n visualElement,\n projection: visualElement.projection as IProjectionNode,\n }\n}\n\nfunction findParentRecord(\n element: Element,\n recordMap: Map,\n scope: LayoutAnimationScope\n) {\n let parent = element.parentElement\n\n while (parent) {\n const record = recordMap.get(parent)\n if (record) return record\n\n if (parent === scope) break\n parent = parent.parentElement\n }\n\n return undefined\n}\n\nfunction getProjectionRoot(\n afterRecords: LayoutElementRecord[],\n beforeRecords: LayoutElementRecord[]\n) {\n const record = afterRecords[0] || beforeRecords[0]\n return record?.projection.root\n}\n\nfunction collectAnimations(afterRecords: LayoutElementRecord[]) {\n const animations = new Set()\n\n afterRecords.forEach((record) => {\n const animation = record.projection.currentAnimation\n if (animation) animations.add(animation)\n })\n\n return Array.from(animations)\n}\n"],"names":[],"mappings":";;;;;;;;;AAyCA,MAAM,cAAc,GAAG,iCAAiC;AACxD,MAAM,IAAI,GAAG,MAAK,EAAE,CAAC;AACrB,SAAS,kBAAkB,CAAC,UAA2B,EAAA;IACnD,MAAM,MAAM,GAAG,UAAU,CAAC,oBAAoB,IAAI,UAAU,CAAC,MAAM;AACnE,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,SAAS;AAE7B,IAAA,MAAM,WAAW,GAAG,SAAS,EAAE;AAC/B,IAAA,MAAM,SAAS,GAAG,SAAS,EAAE;AAC7B,IAAA,WAAW,CAAC,WAAW,EAAE,MAAa,CAAC;AACvC,IAAA,WAAW,CAAC,SAAS,EAAE,MAAa,CAAC;IAErC,OAAO;AACH,QAAA,WAAW,EAAE,UAAU,CAAC,IAAI,EAAE,WAAW,IAAI,CAAC;QAC9C,WAAW;QACX,SAAS;QACT,YAAY,EAAE,UAAU,CAAC,eAAe,IAAI,UAAU,CAAC,YAAY,IAAI,EAAE;QACzE,MAAM,EAAE,UAAU,CAAC,EAAE;KACxB;AACL;MAEa,sBAAsB,CAAA;AAS/B,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AC;AACjC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs deleted file mode 100644 index 1aa81ada..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs +++ /dev/null @@ -1,72 +0,0 @@ -import { mixNumber } from '../../utils/mix/number.mjs'; -import { percent, px } from '../../value/types/numbers/units.mjs'; -import { progress, circOut, noop } from 'motion-utils'; - -const borderLabels = [ - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomLeftRadius", - "borderBottomRightRadius", -]; -const numBorders = borderLabels.length; -const asNumber = (value) => typeof value === "string" ? parseFloat(value) : value; -const isPx = (value) => typeof value === "number" || px.test(value); -function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) { - if (shouldCrossfadeOpacity) { - target.opacity = mixNumber(0, lead.opacity ?? 1, easeCrossfadeIn(progress)); - target.opacityExit = mixNumber(follow.opacity ?? 1, 0, easeCrossfadeOut(progress)); - } - else if (isOnlyMember) { - target.opacity = mixNumber(follow.opacity ?? 1, lead.opacity ?? 1, progress); - } - /** - * Mix border radius - */ - for (let i = 0; i < numBorders; i++) { - const borderLabel = borderLabels[i]; - let followRadius = getRadius(follow, borderLabel); - let leadRadius = getRadius(lead, borderLabel); - if (followRadius === undefined && leadRadius === undefined) - continue; - followRadius || (followRadius = 0); - leadRadius || (leadRadius = 0); - const canMix = followRadius === 0 || - leadRadius === 0 || - isPx(followRadius) === isPx(leadRadius); - if (canMix) { - target[borderLabel] = Math.max(mixNumber(asNumber(followRadius), asNumber(leadRadius), progress), 0); - if (percent.test(leadRadius) || percent.test(followRadius)) { - target[borderLabel] += "%"; - } - } - else { - target[borderLabel] = leadRadius; - } - } - /** - * Mix rotation - */ - if (follow.rotate || lead.rotate) { - target.rotate = mixNumber(follow.rotate || 0, lead.rotate || 0, progress); - } -} -function getRadius(values, radiusName) { - return values[radiusName] !== undefined - ? values[radiusName] - : values.borderRadius; -} -const easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut); -const easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop); -function compress(min, max, easing) { - return (p) => { - // Could replace ifs with clamp - if (p < min) - return 0; - if (p > max) - return 1; - return easing(progress(min, max, p)); - }; -} - -export { mixValues }; -//# sourceMappingURL=mix-values.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.map deleted file mode 100644 index b8e399c0..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mix-values.mjs","sources":["../../../../src/projection/animation/mix-values.ts"],"sourcesContent":["import { mixNumber } from \"../../utils/mix/number\"\nimport { percent, px } from \"../../value/types/numbers/units\"\nimport type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport {\n progress as calcProgress,\n circOut,\n EasingFunction,\n noop,\n} from \"motion-utils\"\nimport type { ResolvedValues } from \"../../node/types\"\n\nconst borderLabels = [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n]\nconst numBorders = borderLabels.length\n\nconst asNumber = (value: AnyResolvedKeyframe) =>\n typeof value === \"string\" ? parseFloat(value) : value\n\nconst isPx = (value: AnyResolvedKeyframe) =>\n typeof value === \"number\" || px.test(value)\n\nexport function mixValues(\n target: ResolvedValues,\n follow: ResolvedValues,\n lead: ResolvedValues,\n progress: number,\n shouldCrossfadeOpacity: boolean,\n isOnlyMember: boolean\n) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mixNumber(\n 0,\n (lead.opacity as number) ?? 1,\n easeCrossfadeIn(progress)\n )\n target.opacityExit = mixNumber(\n (follow.opacity as number) ?? 1,\n 0,\n easeCrossfadeOut(progress)\n )\n } else if (isOnlyMember) {\n target.opacity = mixNumber(\n (follow.opacity as number) ?? 1,\n (lead.opacity as number) ?? 1,\n progress\n )\n }\n\n /**\n * Mix border radius\n */\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = borderLabels[i]\n let followRadius = getRadius(follow, borderLabel)\n let leadRadius = getRadius(lead, borderLabel)\n\n if (followRadius === undefined && leadRadius === undefined) continue\n\n followRadius ||= 0\n leadRadius ||= 0\n\n const canMix =\n followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius)\n\n if (canMix) {\n target[borderLabel] = Math.max(\n mixNumber(\n asNumber(followRadius),\n asNumber(leadRadius),\n progress\n ),\n 0\n )\n\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\"\n }\n } else {\n target[borderLabel] = leadRadius\n }\n }\n\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mixNumber(\n (follow.rotate as number) || 0,\n (lead.rotate as number) || 0,\n progress\n )\n }\n}\n\nfunction getRadius(values: ResolvedValues, radiusName: string) {\n return values[radiusName] !== undefined\n ? values[radiusName]\n : values.borderRadius\n}\n\nconst easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut)\nconst easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop)\n\nfunction compress(\n min: number,\n max: number,\n easing: EasingFunction\n): EasingFunction {\n return (p: number) => {\n // Could replace ifs with clamp\n if (p < min) return 0\n if (p > max) return 1\n return easing(calcProgress(min, max, p))\n }\n}\n"],"names":["calcProgress"],"mappings":";;;;AAWA,MAAM,YAAY,GAAG;IACjB,qBAAqB;IACrB,sBAAsB;IACtB,wBAAwB;IACxB,yBAAyB;CAC5B;AACD,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM;AAEtC,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O,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG;AAAE,YAAA,OAAO,CAAC;QACrB,OAAO,MAAM,CAACA,QAAY,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs deleted file mode 100644 index fa9b9a06..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Bounding boxes tend to be defined as top, left, right, bottom. For various operations - * it's easier to consider each axis individually. This function returns a bounding box - * as a map of single-axis min/max values. - */ -function convertBoundingBoxToBox({ top, left, right, bottom, }) { - return { - x: { min: left, max: right }, - y: { min: top, max: bottom }, - }; -} -function convertBoxToBoundingBox({ x, y }) { - return { top: y.min, right: x.max, bottom: y.max, left: x.min }; -} -/** - * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function - * provided by Framer to allow measured points to be corrected for device scaling. This is used - * when measuring DOM elements and DOM event points. - */ -function transformBoxPoints(point, transformPoint) { - if (!transformPoint) - return point; - const topLeft = transformPoint({ x: point.left, y: point.top }); - const bottomRight = transformPoint({ x: point.right, y: point.bottom }); - return { - top: topLeft.y, - left: topLeft.x, - bottom: bottomRight.y, - right: bottomRight.x, - }; -} - -export { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints }; -//# sourceMappingURL=conversion.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.map deleted file mode 100644 index 6d31dea1..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"conversion.mjs","sources":["../../../../src/projection/geometry/conversion.ts"],"sourcesContent":["import { BoundingBox, Box, TransformPoint } from \"motion-utils\"\n\n/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nexport function convertBoundingBoxToBox({\n top,\n left,\n right,\n bottom,\n}: BoundingBox): Box {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n }\n}\n\nexport function convertBoxToBoundingBox({ x, y }: Box): BoundingBox {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min }\n}\n\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nexport function transformBoxPoints(\n point: BoundingBox,\n transformPoint?: TransformPoint\n) {\n if (!transformPoint) return point\n const topLeft = transformPoint({ x: point.left, y: point.top })\n const bottomRight = transformPoint({ x: point.right, y: point.bottom })\n\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n }\n}\n"],"names":[],"mappings":"AAEA;;;;AAIG;AACG,SAAU,uBAAuB,CAAC,EACpC,GAAG,EACH,IAAI,EACJ,KAAK,EACL,MAAM,GACI,EAAA;IACV,OAAO;QACH,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE;QAC5B,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE;KAC/B;AACL;SAEgB,uBAAuB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAO,EAAA;IACjD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE;AACnE;AAEA;;;;AAIG;AACG,SAAU,kBAAkB,CAC9B,KAAkB,EAClB,cAA+B,EAAA;AAE/B,IAAA,IAAI,CAAC,cAAc;AAAE,QAAA,OAAO,KAAK;AACjC,IAAA,MAAM,OAAO,GAAG,cAAc,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC;AAC/D,IAAA,MAAM,WAAW,GAAG,cAAc,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;IAEvE,OAAO;QACH,GAAG,EAAE,OAAO,CAAC,CAAC;QACd,IAAI,EAAE,OAAO,CAAC,CAAC;QACf,MAAM,EAAE,WAAW,CAAC,CAAC;QACrB,KAAK,EAAE,WAAW,CAAC,CAAC;KACvB;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/copy.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/copy.mjs deleted file mode 100644 index 5269ba1e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/copy.mjs +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Reset an axis to the provided origin box. - * - * This is a mutative operation. - */ -function copyAxisInto(axis, originAxis) { - axis.min = originAxis.min; - axis.max = originAxis.max; -} -/** - * Reset a box to the provided origin box. - * - * This is a mutative operation. - */ -function copyBoxInto(box, originBox) { - copyAxisInto(box.x, originBox.x); - copyAxisInto(box.y, originBox.y); -} -/** - * Reset a delta to the provided origin box. - * - * This is a mutative operation. - */ -function copyAxisDeltaInto(delta, originDelta) { - delta.translate = originDelta.translate; - delta.scale = originDelta.scale; - delta.originPoint = originDelta.originPoint; - delta.origin = originDelta.origin; -} - -export { copyAxisDeltaInto, copyAxisInto, copyBoxInto }; -//# sourceMappingURL=copy.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/copy.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/copy.mjs.map deleted file mode 100644 index 310e797d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/copy.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"copy.mjs","sources":["../../../../src/projection/geometry/copy.ts"],"sourcesContent":["import { Axis, AxisDelta, Box } from \"motion-utils\"\n\n/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nexport function copyAxisInto(axis: Axis, originAxis: Axis) {\n axis.min = originAxis.min\n axis.max = originAxis.max\n}\n\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nexport function copyBoxInto(box: Box, originBox: Box) {\n copyAxisInto(box.x, originBox.x)\n copyAxisInto(box.y, originBox.y)\n}\n\n/**\n * Reset a delta to the provided origin box.\n *\n * This is a mutative operation.\n */\nexport function copyAxisDeltaInto(delta: AxisDelta, originDelta: AxisDelta) {\n delta.translate = originDelta.translate\n delta.scale = originDelta.scale\n delta.originPoint = originDelta.originPoint\n delta.origin = originDelta.origin\n}\n"],"names":[],"mappings":"AAEA;;;;AAIG;AACG,SAAU,YAAY,CAAC,IAAU,EAAE,UAAgB,EAAA;AACrD,IAAA,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG;AACzB,IAAA,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG;AAC7B;AAEA;;;;AAIG;AACG,SAAU,WAAW,CAAC,GAAQ,EAAE,SAAc,EAAA;IAChD,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;IAChC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;AACpC;AAEA;;;;AAIG;AACG,SAAU,iBAAiB,CAAC,KAAgB,EAAE,WAAsB,EAAA;AACtE,IAAA,KAAK,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS;AACvC,IAAA,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK;AAC/B,IAAA,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC,WAAW;AAC3C,IAAA,KAAK,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM;AACrC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs deleted file mode 100644 index f60e7c83..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs +++ /dev/null @@ -1,125 +0,0 @@ -import { mixNumber } from '../../utils/mix/number.mjs'; -import { hasTransform } from '../utils/has-transform.mjs'; - -/** - * Scales a point based on a factor and an originPoint - */ -function scalePoint(point, scale, originPoint) { - const distanceFromOrigin = point - originPoint; - const scaled = scale * distanceFromOrigin; - return originPoint + scaled; -} -/** - * Applies a translate/scale delta to a point - */ -function applyPointDelta(point, translate, scale, originPoint, boxScale) { - if (boxScale !== undefined) { - point = scalePoint(point, boxScale, originPoint); - } - return scalePoint(point, scale, originPoint) + translate; -} -/** - * Applies a translate/scale delta to an axis - */ -function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) { - axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale); - axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale); -} -/** - * Applies a translate/scale delta to a box - */ -function applyBoxDelta(box, { x, y }) { - applyAxisDelta(box.x, x.translate, x.scale, x.originPoint); - applyAxisDelta(box.y, y.translate, y.scale, y.originPoint); -} -const TREE_SCALE_SNAP_MIN = 0.999999999999; -const TREE_SCALE_SNAP_MAX = 1.0000000000001; -/** - * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms - * in a tree upon our box before then calculating how to project it into our desired viewport-relative box - * - * This is the final nested loop within updateLayoutDelta for future refactoring - */ -function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) { - const treeLength = treePath.length; - if (!treeLength) - return; - // Reset the treeScale - treeScale.x = treeScale.y = 1; - let node; - let delta; - for (let i = 0; i < treeLength; i++) { - node = treePath[i]; - delta = node.projectionDelta; - /** - * TODO: Prefer to remove this, but currently we have motion components with - * display: contents in Framer. - */ - const { visualElement } = node.options; - if (visualElement && - visualElement.props.style && - visualElement.props.style.display === "contents") { - continue; - } - if (isSharedTransition && - node.options.layoutScroll && - node.scroll && - node !== node.root) { - translateAxis(box.x, -node.scroll.offset.x); - translateAxis(box.y, -node.scroll.offset.y); - } - if (delta) { - // Incoporate each ancestor's scale into a cumulative treeScale for this component - treeScale.x *= delta.x.scale; - treeScale.y *= delta.y.scale; - // Apply each ancestor's calculated delta into this component's recorded layout box - applyBoxDelta(box, delta); - } - if (isSharedTransition && hasTransform(node.latestValues)) { - transformBox(box, node.latestValues, node.layout?.layoutBox); - } - } - /** - * Snap tree scale back to 1 if it's within a non-perceivable threshold. - * This will help reduce useless scales getting rendered. - */ - if (treeScale.x < TREE_SCALE_SNAP_MAX && - treeScale.x > TREE_SCALE_SNAP_MIN) { - treeScale.x = 1.0; - } - if (treeScale.y < TREE_SCALE_SNAP_MAX && - treeScale.y > TREE_SCALE_SNAP_MIN) { - treeScale.y = 1.0; - } -} -function translateAxis(axis, distance) { - axis.min += distance; - axis.max += distance; -} -/** - * Apply a transform to an axis from the latest resolved motion values. - * This function basically acts as a bridge between a flat motion value map - * and applyAxisDelta - */ -function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) { - const originPoint = mixNumber(axis.min, axis.max, axisOrigin); - // Apply the axis delta to the final axis - applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale); -} -function resolveAxisTranslate(value, axis) { - if (typeof value === "string") { - return (parseFloat(value) / 100) * (axis.max - axis.min); - } - return value; -} -/** - * Apply a transform to a box from the latest resolved motion values. - */ -function transformBox(box, transform, sourceBox) { - const resolveBox = sourceBox ?? box; - transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX); - transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY); -} - -export { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis }; -//# sourceMappingURL=delta-apply.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.map deleted file mode 100644 index a2eae435..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta-apply.mjs","sources":["../../../../src/projection/geometry/delta-apply.ts"],"sourcesContent":["import { Axis, Box, Delta, Point } from \"motion-utils\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { ResolvedValues } from \"../../render/types\"\nimport { hasTransform } from \"../utils/has-transform\"\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nexport function scalePoint(point: number, scale: number, originPoint: number) {\n const distanceFromOrigin = point - originPoint\n const scaled = scale * distanceFromOrigin\n return originPoint + scaled\n}\n\n/**\n * Applies a translate/scale delta to a point\n */\nexport function applyPointDelta(\n point: number,\n translate: number,\n scale: number,\n originPoint: number,\n boxScale?: number\n): number {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint)\n }\n\n return scalePoint(point, scale, originPoint) + translate\n}\n\n/**\n * Applies a translate/scale delta to an axis\n */\nexport function applyAxisDelta(\n axis: Axis,\n translate: number = 0,\n scale: number = 1,\n originPoint: number,\n boxScale?: number\n): void {\n axis.min = applyPointDelta(\n axis.min,\n translate,\n scale,\n originPoint,\n boxScale\n )\n\n axis.max = applyPointDelta(\n axis.max,\n translate,\n scale,\n originPoint,\n boxScale\n )\n}\n\n/**\n * Applies a translate/scale delta to a box\n */\nexport function applyBoxDelta(box: Box, { x, y }: Delta): void {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint)\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint)\n}\n\nconst TREE_SCALE_SNAP_MIN = 0.999999999999\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001\n\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nexport function applyTreeDeltas(\n box: Box,\n treeScale: Point,\n treePath: any[],\n isSharedTransition: boolean = false\n) {\n const treeLength = treePath.length\n if (!treeLength) return\n\n // Reset the treeScale\n treeScale.x = treeScale.y = 1\n\n let node: any\n let delta: Delta | undefined\n\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i]\n delta = node.projectionDelta\n\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const { visualElement } = node.options\n if (\n visualElement &&\n visualElement.props.style &&\n visualElement.props.style.display === \"contents\"\n ) {\n continue\n }\n\n if (\n isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root\n ) {\n translateAxis(box.x, -node.scroll.offset.x)\n translateAxis(box.y, -node.scroll.offset.y)\n }\n\n if (delta) {\n // Incoporate each ancestor's scale into a cumulative treeScale for this component\n treeScale.x *= delta.x.scale\n treeScale.y *= delta.y.scale\n\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta)\n }\n\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues, node.layout?.layoutBox)\n }\n }\n\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n if (\n treeScale.x < TREE_SCALE_SNAP_MAX &&\n treeScale.x > TREE_SCALE_SNAP_MIN\n ) {\n treeScale.x = 1.0\n }\n if (\n treeScale.y < TREE_SCALE_SNAP_MAX &&\n treeScale.y > TREE_SCALE_SNAP_MIN\n ) {\n treeScale.y = 1.0\n }\n}\n\nexport function translateAxis(axis: Axis, distance: number) {\n axis.min += distance\n axis.max += distance\n}\n\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nexport function transformAxis(\n axis: Axis,\n axisTranslate?: number,\n axisScale?: number,\n boxScale?: number,\n axisOrigin: number = 0.5\n): void {\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin)\n\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale)\n}\n\nfunction resolveAxisTranslate(\n value: number | string | undefined,\n axis: Axis\n): number | undefined {\n if (typeof value === \"string\") {\n return (parseFloat(value) / 100) * (axis.max - axis.min)\n }\n return value as number | undefined\n}\n\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nexport function transformBox(\n box: Box,\n transform: ResolvedValues,\n sourceBox?: Box\n) {\n const resolveBox = sourceBox ?? box\n transformAxis(\n box.x,\n resolveAxisTranslate(transform.x, resolveBox.x),\n transform.scaleX as number,\n transform.scale as number,\n transform.originX as number\n )\n transformAxis(\n box.y,\n resolveAxisTranslate(transform.y, resolveBox.y),\n transform.scaleY as number,\n transform.scale as number,\n transform.originY as number\n )\n}\n"],"names":[],"mappings":";;;AAKA;;AAEG;SACa,UAAU,CAAC,KAAa,EAAE,KAAa,EAAE,WAAmB,EAAA;AACxE,IAAA,MAAM,kBAAkB,GAAG,KAAK,GAAG,WAAW;AAC9C,IAAA,MAAM,MAAM,GAAG,KAAK,GAAG,kBAAkB;IACzC,OAAO,WAAW,GAAG,MAAM;AAC/B;AAEA;;AAEG;AACG,SAAU,eAAe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C,SAAS,CAAC,MAAgB,EAC1B,SAAS,CAAC,KAAe,EACzB,SAAS,CAAC,OAAiB,CAC9B;AACD,IAAA,aAAa,CACT,GAAG,CAAC,CAAC,EACL,oBAAoB,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAC/C,SAAS,CAAC,MAAgB,EAC1B,SAAS,CAAC,KAAe,EACzB,SAAS,CAAC,OAAiB,CAC9B;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs deleted file mode 100644 index 39e0f7bb..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs +++ /dev/null @@ -1,59 +0,0 @@ -import { mixNumber } from '../../utils/mix/number.mjs'; - -const SCALE_PRECISION = 0.0001; -const SCALE_MIN = 1 - SCALE_PRECISION; -const SCALE_MAX = 1 + SCALE_PRECISION; -const TRANSLATE_PRECISION = 0.01; -const TRANSLATE_MIN = 0 - TRANSLATE_PRECISION; -const TRANSLATE_MAX = 0 + TRANSLATE_PRECISION; -function calcLength(axis) { - return axis.max - axis.min; -} -function isNear(value, target, maxDistance) { - return Math.abs(value - target) <= maxDistance; -} -function calcAxisDelta(delta, source, target, origin = 0.5) { - delta.origin = origin; - delta.originPoint = mixNumber(source.min, source.max, delta.origin); - delta.scale = calcLength(target) / calcLength(source); - delta.translate = - mixNumber(target.min, target.max, delta.origin) - delta.originPoint; - if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) || - isNaN(delta.scale)) { - delta.scale = 1.0; - } - if ((delta.translate >= TRANSLATE_MIN && - delta.translate <= TRANSLATE_MAX) || - isNaN(delta.translate)) { - delta.translate = 0.0; - } -} -function calcBoxDelta(delta, source, target, origin) { - calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined); - calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined); -} -function calcRelativeAxis(target, relative, parent, anchor = 0) { - const anchorPoint = anchor - ? mixNumber(parent.min, parent.max, anchor) - : parent.min; - target.min = anchorPoint + relative.min; - target.max = target.min + calcLength(relative); -} -function calcRelativeBox(target, relative, parent, anchor) { - calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x); - calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y); -} -function calcRelativeAxisPosition(target, layout, parent, anchor = 0) { - const anchorPoint = anchor - ? mixNumber(parent.min, parent.max, anchor) - : parent.min; - target.min = layout.min - anchorPoint; - target.max = target.min + calcLength(layout); -} -function calcRelativePosition(target, layout, parent, anchor) { - calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x); - calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y); -} - -export { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear }; -//# sourceMappingURL=delta-calc.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.map deleted file mode 100644 index b9b53e09..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta-calc.mjs","sources":["../../../../src/projection/geometry/delta-calc.ts"],"sourcesContent":["import { Axis, AxisDelta, Box, Delta, Point } from \"motion-utils\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { ResolvedValues } from \"../../render/types\"\n\nconst SCALE_PRECISION = 0.0001\nconst SCALE_MIN = 1 - SCALE_PRECISION\nconst SCALE_MAX = 1 + SCALE_PRECISION\nconst TRANSLATE_PRECISION = 0.01\nconst TRANSLATE_MIN = 0 - TRANSLATE_PRECISION\nconst TRANSLATE_MAX = 0 + TRANSLATE_PRECISION\n\nexport function calcLength(axis: Axis) {\n return axis.max - axis.min\n}\n\nexport function isNear(\n value: number,\n target: number,\n maxDistance: number\n): boolean {\n return Math.abs(value - target) <= maxDistance\n}\n\nexport function calcAxisDelta(\n delta: AxisDelta,\n source: Axis,\n target: Axis,\n origin: number = 0.5\n) {\n delta.origin = origin\n delta.originPoint = mixNumber(source.min, source.max, delta.origin)\n delta.scale = calcLength(target) / calcLength(source)\n delta.translate =\n mixNumber(target.min, target.max, delta.origin) - delta.originPoint\n\n if (\n (delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) ||\n isNaN(delta.scale)\n ) {\n delta.scale = 1.0\n }\n\n if (\n (delta.translate >= TRANSLATE_MIN &&\n delta.translate <= TRANSLATE_MAX) ||\n isNaN(delta.translate)\n ) {\n delta.translate = 0.0\n }\n}\n\nexport function calcBoxDelta(\n delta: Delta,\n source: Box,\n target: Box,\n origin?: ResolvedValues\n): void {\n calcAxisDelta(\n delta.x,\n source.x,\n target.x,\n origin ? (origin.originX as number) : undefined\n )\n calcAxisDelta(\n delta.y,\n source.y,\n target.y,\n origin ? (origin.originY as number) : undefined\n )\n}\n\nexport function calcRelativeAxis(\n target: Axis,\n relative: Axis,\n parent: Axis,\n anchor: number = 0\n) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min\n target.min = anchorPoint + relative.min\n target.max = target.min + calcLength(relative)\n}\n\nexport function calcRelativeBox(\n target: Box,\n relative: Box,\n parent: Box,\n anchor?: Point\n) {\n calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x)\n calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y)\n}\n\nexport function calcRelativeAxisPosition(\n target: Axis,\n layout: Axis,\n parent: Axis,\n anchor: number = 0\n) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min\n target.min = layout.min - anchorPoint\n target.max = target.min + calcLength(layout)\n}\n\nexport function calcRelativePosition(\n target: Box,\n layout: Box,\n parent: Box,\n anchor?: Point\n) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x)\n calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y)\n}\n"],"names":[],"mappings":";;AAIA,MAAM,eAAe,GAAG,MAAM;AAC9B,MAAM,SAAS,GAAG,CAAC,GAAG,eAAe;AACrC,MAAM,SAAS,GAAG,CAAC,GAAG,eAAe;AACrC,MAAM,mBAAmB,GAAG,IAAI;AAChC,MAAM,aAAa,GAAG,CAAC,GAAG,mBAAmB;AAC7C,MAAM,aAAa,GAAG,CAAC,GAAG,mBAAmB;AAEvC,SAAU,UAAU,CAAC,IAAU,EAAA;AACjC,IAAA,OAAO,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG;AAC9B;SAEgB,MAAM,CAClB,KAAa,EACb,MAAc,EACd,WAAmB,EAAA;IAEnB,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,WAAW;AAClD;AAEM,SAAU,aAAa,CACzB,KAAgB,EAChB,MAAY,EACZ,MAAY,EACZ,MAAA,GAAiB,GAAG,EAAA;AAEpB,IAAA,KAAK,CAAC,MAAM,GAAG,MAAM;AACrB,IAAA,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC;AACnE,IAAA,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC;AACrD,IAAA,KAAK,CAAC,SAAS;AACX,QAAA,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,WAAW;AAEvE,IAAA,IACI,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,IAAI,KAAK,CAAC,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C3D,IAAA,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;AAC/D;AAEM,SAAU,wBAAwB,CACpC,MAAY,EACZ,MAAY,EACZ,MAAY,EACZ,MAAA,GAAiB,CAAC,EAAA;IAElB,MAAM,WAAW,GAAG;AAChB,UAAE,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM;AAC1C,UAAE,MAAM,CAAC,GAAG;IAChB,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,WAAW;IACrC,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;AAChD;AAEM,SAAU,oBAAoB,CAChC,MAAW,EACX,MAAW,EACX,MAAW,EACX,MAAc,EAAA;AAEd,IAAA,wBAAwB,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;AACjE,IAAA,wBAAwB,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;AACrE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs deleted file mode 100644 index 59915adb..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs +++ /dev/null @@ -1,55 +0,0 @@ -import { mixNumber } from '../../utils/mix/number.mjs'; -import { percent } from '../../value/types/numbers/units.mjs'; -import { scalePoint } from './delta-apply.mjs'; - -/** - * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse - */ -function removePointDelta(point, translate, scale, originPoint, boxScale) { - point -= translate; - point = scalePoint(point, 1 / scale, originPoint); - if (boxScale !== undefined) { - point = scalePoint(point, 1 / boxScale, originPoint); - } - return point; -} -/** - * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse - */ -function removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) { - if (percent.test(translate)) { - translate = parseFloat(translate); - const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100); - translate = relativeProgress - sourceAxis.min; - } - if (typeof translate !== "number") - return; - let originPoint = mixNumber(originAxis.min, originAxis.max, origin); - if (axis === originAxis) - originPoint -= translate; - axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale); - axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale); -} -/** - * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ -function removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) { - removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis); -} -/** - * The names of the motion values we want to apply as translation, scale and origin. - */ -const xKeys = ["x", "scaleX", "originX"]; -const yKeys = ["y", "scaleY", "originY"]; -/** - * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ -function removeBoxTransforms(box, transforms, originBox, sourceBox) { - removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined); - removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined); -} - -export { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta }; -//# sourceMappingURL=delta-remove.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.map deleted file mode 100644 index f413dde2..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delta-remove.mjs","sources":["../../../../src/projection/geometry/delta-remove.ts"],"sourcesContent":["import { Axis, Box } from \"motion-utils\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { percent } from \"../../value/types/numbers/units\"\nimport { ResolvedValues } from \"../../render/types\"\nimport { scalePoint } from \"./delta-apply\"\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nexport function removePointDelta(\n point: number,\n translate: number,\n scale: number,\n originPoint: number,\n boxScale?: number\n): number {\n point -= translate\n point = scalePoint(point, 1 / scale, originPoint)\n\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint)\n }\n\n return point\n}\n\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nexport function removeAxisDelta(\n axis: Axis,\n translate: number | string = 0,\n scale: number = 1,\n origin: number = 0.5,\n boxScale?: number,\n originAxis: Axis = axis,\n sourceAxis: Axis = axis\n): void {\n if (percent.test(translate)) {\n translate = parseFloat(translate as string)\n const relativeProgress = mixNumber(\n sourceAxis.min,\n sourceAxis.max,\n translate / 100\n )\n translate = relativeProgress - sourceAxis.min\n }\n\n if (typeof translate !== \"number\") return\n\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin)\n if (axis === originAxis) originPoint -= translate\n\n axis.min = removePointDelta(\n axis.min,\n translate,\n scale,\n originPoint,\n boxScale\n )\n\n axis.max = removePointDelta(\n axis.max,\n translate,\n scale,\n originPoint,\n boxScale\n )\n}\n\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nexport function removeAxisTransforms(\n axis: Axis,\n transforms: ResolvedValues,\n [key, scaleKey, originKey]: string[],\n origin?: Axis,\n sourceAxis?: Axis\n) {\n removeAxisDelta(\n axis,\n transforms[key] as number,\n transforms[scaleKey] as number,\n transforms[originKey] as number,\n transforms.scale as number,\n origin,\n sourceAxis\n )\n}\n\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"]\nconst yKeys = [\"y\", \"scaleY\", \"originY\"]\n\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nexport function removeBoxTransforms(\n box: Box,\n transforms: ResolvedValues,\n originBox?: Box,\n sourceBox?: Box\n): void {\n removeAxisTransforms(\n box.x,\n transforms,\n xKeys,\n originBox ? originBox.x : undefined,\n sourceBox ? sourceBox.x : undefined\n )\n removeAxisTransforms(\n box.y,\n transforms,\n yKeys,\n originBox ? originBox.y : undefined,\n sourceBox ? sourceBox.y : undefined\n )\n}\n"],"names":[],"mappings":";;;;AAMA;;AAEG;AACG,SAAU,gBAAgB,CAC5B,KAAa,EACb,SAAiB,EACjB,KAAa,EACb,WAAmB,EACnB,QAAiB,EAAA;IAEjB,KAAK,IAAI,SAAS;IAClB,KAAK,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,GAAG,KAAK,EAAE,WAAW,CAAC;AAEjD,IAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;QACxB,KAAK,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,GAAG,QAAQ,EAAE,WAAW,CAAC;IACxD;AAEA,IAAA,OAAO,KAAK;AAChB;AAEA;;AAEG;AACG,SAAU,eAAe,CAC3B,IAAU,EACV,SAAA,GAA6B,CAAC,EAC9B,KAAA,GAAgB,CAAC,EACjB,MAAA,GAAiB,GAAG,EACpB,QAAiB,EACjB,aAAmB,IAAI,EACvB,aAAmB,IAAI,EAAA;AAEvB,IAAA,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AACzB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ChB,GAAG,CAAC,CAAC,EACL,UAAU,EACV,KAAK,EACL,SAAS,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,EACnC,SAAS,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,CACtC;AACD,IAAA,oBAAoB,CAChB,GAAG,CAAC,CAAC,EACL,UAAU,EACV,KAAK,EACL,SAAS,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,EACnC,SAAS,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,CACtC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/models.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/models.mjs deleted file mode 100644 index f6ca4f0a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/models.mjs +++ /dev/null @@ -1,18 +0,0 @@ -const createAxisDelta = () => ({ - translate: 0, - scale: 1, - origin: 0, - originPoint: 0, -}); -const createDelta = () => ({ - x: createAxisDelta(), - y: createAxisDelta(), -}); -const createAxis = () => ({ min: 0, max: 0 }); -const createBox = () => ({ - x: createAxis(), - y: createAxis(), -}); - -export { createAxis, createAxisDelta, createBox, createDelta }; -//# sourceMappingURL=models.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/models.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/models.mjs.map deleted file mode 100644 index 5e571a9e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/models.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"models.mjs","sources":["../../../../src/projection/geometry/models.ts"],"sourcesContent":["import { Axis, AxisDelta, Box, Delta } from \"motion-utils\"\n\nexport const createAxisDelta = (): AxisDelta => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n})\n\nexport const createDelta = (): Delta => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n})\n\nexport const createAxis = (): Axis => ({ min: 0, max: 0 })\n\nexport const createBox = (): Box => ({\n x: createAxis(),\n y: createAxis(),\n})\n"],"names":[],"mappings":"AAEO,MAAM,eAAe,GAAG,OAAkB;AAC7C,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,WAAW,EAAE,CAAC;AACjB,CAAA;AAEM,MAAM,WAAW,GAAG,OAAc;IACrC,CAAC,EAAE,eAAe,EAAE;IACpB,CAAC,EAAE,eAAe,EAAE;AACvB,CAAA;AAEM,MAAM,UAAU,GAAG,OAAa,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE;AAElD,MAAM,SAAS,GAAG,OAAY;IACjC,CAAC,EAAE,UAAU,EAAE;IACf,CAAC,EAAE,UAAU,EAAE;AAClB,CAAA;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/utils.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/utils.mjs deleted file mode 100644 index 807d96d4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/utils.mjs +++ /dev/null @@ -1,32 +0,0 @@ -import { calcLength } from './delta-calc.mjs'; - -function isAxisDeltaZero(delta) { - return delta.translate === 0 && delta.scale === 1; -} -function isDeltaZero(delta) { - return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y); -} -function axisEquals(a, b) { - return a.min === b.min && a.max === b.max; -} -function boxEquals(a, b) { - return axisEquals(a.x, b.x) && axisEquals(a.y, b.y); -} -function axisEqualsRounded(a, b) { - return (Math.round(a.min) === Math.round(b.min) && - Math.round(a.max) === Math.round(b.max)); -} -function boxEqualsRounded(a, b) { - return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y); -} -function aspectRatio(box) { - return calcLength(box.x) / calcLength(box.y); -} -function axisDeltaEquals(a, b) { - return (a.translate === b.translate && - a.scale === b.scale && - a.originPoint === b.originPoint); -} - -export { aspectRatio, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, isDeltaZero }; -//# sourceMappingURL=utils.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/utils.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/utils.mjs.map deleted file mode 100644 index 2cb527d4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/geometry/utils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.mjs","sources":["../../../../src/projection/geometry/utils.ts"],"sourcesContent":["import { Axis, AxisDelta, Box, Delta } from \"motion-utils\"\nimport { calcLength } from \"./delta-calc\"\n\nfunction isAxisDeltaZero(delta: AxisDelta) {\n return delta.translate === 0 && delta.scale === 1\n}\n\nexport function isDeltaZero(delta: Delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y)\n}\n\nexport function axisEquals(a: Axis, b: Axis) {\n return a.min === b.min && a.max === b.max\n}\n\nexport function boxEquals(a: Box, b: Box) {\n return axisEquals(a.x, b.x) && axisEquals(a.y, b.y)\n}\n\nexport function axisEqualsRounded(a: Axis, b: Axis) {\n return (\n Math.round(a.min) === Math.round(b.min) &&\n Math.round(a.max) === Math.round(b.max)\n )\n}\n\nexport function boxEqualsRounded(a: Box, b: Box) {\n return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y)\n}\n\nexport function aspectRatio(box: Box): number {\n return calcLength(box.x) / calcLength(box.y)\n}\n\nexport function axisDeltaEquals(a: AxisDelta, b: AxisDelta) {\n return (\n a.translate === b.translate &&\n a.scale === b.scale &&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C,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AAChD;AAEM,SAAU,eAAe,CAAC,CAAY,EAAE,CAAY,EAAA;AACtD,IAAA,QACI,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS;AAC3B,QAAA,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;AACnB,QAAA,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW;AAEvC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs deleted file mode 100644 index e6755c84..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { addDomEvent } from '../../events/add-dom-event.mjs'; -import { createProjectionNode } from './create-projection-node.mjs'; - -const DocumentProjectionNode = createProjectionNode({ - attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify), - measureScroll: () => ({ - x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0, - y: document.documentElement.scrollTop || document.body?.scrollTop || 0, - }), - checkIsScrollRoot: () => true, -}); - -export { DocumentProjectionNode }; -//# sourceMappingURL=DocumentProjectionNode.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.map deleted file mode 100644 index aaa5c4d2..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DocumentProjectionNode.mjs","sources":["../../../../src/projection/node/DocumentProjectionNode.ts"],"sourcesContent":["import { addDomEvent } from \"../../events/add-dom-event\"\nimport { createProjectionNode } from \"./create-projection-node\"\n\nexport const DocumentProjectionNode = createProjectionNode({\n attachResizeListener: (\n ref: Window | Element,\n notify: VoidFunction\n ): VoidFunction => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,\n y: document.documentElement.scrollTop || document.body?.scrollTop || 0,\n }),\n checkIsScrollRoot: () => true,\n})\n"],"names":[],"mappings":";;;AAGO,MAAM,sBAAsB,GAAG,oBAAoB,CAAS;AAC/D,IAAA,oBAAoB,EAAE,CAClB,GAAqB,EACrB,MAAoB,KACL,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC;AACrD,IAAA,aAAa,EAAE,OAAO;AAClB,QAAA,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,UAAU,IAAI,QAAQ,CAAC,IAAI,EAAE,UAAU,IAAI,CAAC;AACxE,QAAA,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,SAAS,IAAI,QAAQ,CAAC,IAAI,EAAE,SAAS,IAAI,CAAC;KACzE,CAAC;AACF,IAAA,iBAAiB,EAAE,MAAM,IAAI;AAChC,CAAA;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs deleted file mode 100644 index 2fb7f4c9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs +++ /dev/null @@ -1,28 +0,0 @@ -import { createProjectionNode } from './create-projection-node.mjs'; -import { DocumentProjectionNode } from './DocumentProjectionNode.mjs'; - -const rootProjectionNode = { - current: undefined, -}; -const HTMLProjectionNode = createProjectionNode({ - measureScroll: (instance) => ({ - x: instance.scrollLeft, - y: instance.scrollTop, - }), - defaultParent: () => { - if (!rootProjectionNode.current) { - const documentNode = new DocumentProjectionNode({}); - documentNode.mount(window); - documentNode.setOptions({ layoutScroll: true }); - rootProjectionNode.current = documentNode; - } - return rootProjectionNode.current; - }, - resetTransform: (instance, value) => { - instance.style.transform = value !== undefined ? value : "none"; - }, - checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed"), -}); - -export { HTMLProjectionNode, rootProjectionNode }; -//# sourceMappingURL=HTMLProjectionNode.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.map deleted file mode 100644 index 57d847d2..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HTMLProjectionNode.mjs","sources":["../../../../src/projection/node/HTMLProjectionNode.ts"],"sourcesContent":["import { createProjectionNode } from \"./create-projection-node\"\nimport { DocumentProjectionNode } from \"./DocumentProjectionNode\"\nimport { IProjectionNode } from \"./types\"\n\nexport const rootProjectionNode: { current: IProjectionNode | undefined } = {\n current: undefined,\n}\n\nexport const HTMLProjectionNode = createProjectionNode({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({})\n documentNode.mount(window)\n documentNode.setOptions({ layoutScroll: true })\n rootProjectionNode.current = documentNode\n }\n return rootProjectionNode.current\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\"\n },\n checkIsScrollRoot: (instance) =>\n Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n})\n"],"names":[],"mappings":";;;AAIO,MAAM,kBAAkB,GAA6C;AACxE,IAAA,OAAO,EAAE,SAAS;;AAGf,MAAM,kBAAkB,GAAG,oBAAoB,CAAc;AAChE,IAAA,aAAa,EAAE,CAAC,QAAQ,MAAM;QAC1B,CAAC,EAAE,QAAQ,CAAC,UAAU;QACtB,CAAC,EAAE,QAAQ,CAAC,SAAS;KACxB,CAAC;IACF,aAAa,EAAE,MAAK;AAChB,QAAA,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;AAC7B,YAAA,MAAM,YAAY,GAAG,IAAI,sBAAsB,CAAC,EAAE,CAAC;AACnD,YAAA,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;YAC1B,YAAY,CAAC,UAAU,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAC/C,YAAA,kBAAkB,CAAC,OAAO,GAAG,YAAY;QAC7C;QACA,OAAO,kBAAkB,CAAC,OAAO;IACrC,CAAC;AACD,IAAA,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,KAAI;AAChC,QAAA,QAAQ,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK,KAAK,SAAS,GAAG,KAAK,GAAG,MAAM;IACnE,CAAC;AACD,IAAA,iBAAiB,EAAE,CAAC,QAAQ,KACxB,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC;AACtE,CAAA;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs deleted file mode 100644 index a3c4372b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs +++ /dev/null @@ -1,1701 +0,0 @@ -import { SubscriptionManager, clamp, noop } from 'motion-utils'; -import { animateSingleValue } from '../../animation/animate/single-value.mjs'; -import { getOptimisedAppearId } from '../../animation/optimized-appear/get-appear-id.mjs'; -import { getValueTransition } from '../../animation/utils/get-value-transition.mjs'; -import { microtask } from '../../frameloop/microtask.mjs'; -import { time } from '../../frameloop/sync-time.mjs'; -import { scaleCorrectors } from '../styles/scale-correction.mjs'; -import { activeAnimations } from '../../stats/animation-count.mjs'; -import { statsBuffer } from '../../stats/buffer.mjs'; -import { delay } from '../../utils/delay.mjs'; -import { isSVGElement } from '../../utils/is-svg-element.mjs'; -import { isSVGSVGElement } from '../../utils/is-svg-svg-element.mjs'; -import { mixNumber } from '../../utils/mix/number.mjs'; -import { motionValue } from '../../value/index.mjs'; -import { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs'; -import { mixValues } from '../animation/mix-values.mjs'; -import { copyBoxInto, copyAxisDeltaInto, copyAxisInto } from '../geometry/copy.mjs'; -import { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs'; -import { calcLength, calcRelativeBox, calcRelativePosition, calcBoxDelta, isNear } from '../geometry/delta-calc.mjs'; -import { removeBoxTransforms } from '../geometry/delta-remove.mjs'; -import { createBox, createDelta } from '../geometry/models.mjs'; -import { boxEqualsRounded, isDeltaZero, axisDeltaEquals, boxEquals, aspectRatio } from '../geometry/utils.mjs'; -import { NodeStack } from '../shared/stack.mjs'; -import { buildProjectionTransform } from '../styles/transform.mjs'; -import { eachAxis } from '../utils/each-axis.mjs'; -import { FlatTree } from '../utils/flat-tree.mjs'; -import { hasTransform, hasScale, has2DTranslate } from '../utils/has-transform.mjs'; -import { globalProjectionState } from './state.mjs'; -import { frame, cancelFrame, frameData, frameSteps } from '../../frameloop/frame.mjs'; - -const metrics = { - nodes: 0, - calculatedTargetDeltas: 0, - calculatedProjections: 0, -}; -const transformAxes = ["", "X", "Y", "Z"]; -/** - * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1 - * which has a noticeable difference in spring animations - */ -const animationTarget = 1000; -let id = 0; -function resetDistortingTransform(key, visualElement, values, sharedAnimationValues) { - const { latestValues } = visualElement; - // Record the distorting transform and then temporarily set it to 0 - if (latestValues[key]) { - values[key] = latestValues[key]; - visualElement.setStaticValue(key, 0); - if (sharedAnimationValues) { - sharedAnimationValues[key] = 0; - } - } -} -function cancelTreeOptimisedTransformAnimations(projectionNode) { - projectionNode.hasCheckedOptimisedAppear = true; - if (projectionNode.root === projectionNode) - return; - const { visualElement } = projectionNode.options; - if (!visualElement) - return; - const appearId = getOptimisedAppearId(visualElement); - if (window.MotionHasOptimisedAnimation(appearId, "transform")) { - const { layout, layoutId } = projectionNode.options; - window.MotionCancelOptimisedAnimation(appearId, "transform", frame, !(layout || layoutId)); - } - const { parent } = projectionNode; - if (parent && !parent.hasCheckedOptimisedAppear) { - cancelTreeOptimisedTransformAnimations(parent); - } -} -function createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) { - return class ProjectionNode { - constructor(latestValues = {}, parent = defaultParent?.()) { - /** - * A unique ID generated for every projection node. - */ - this.id = id++; - /** - * An id that represents a unique session instigated by startUpdate. - */ - this.animationId = 0; - this.animationCommitId = 0; - /** - * A Set containing all this component's children. This is used to iterate - * through the children. - * - * TODO: This could be faster to iterate as a flat array stored on the root node. - */ - this.children = new Set(); - /** - * Options for the node. We use this to configure what kind of layout animations - * we should perform (if any). - */ - this.options = {}; - /** - * We use this to detect when its safe to shut down part of a projection tree. - * We have to keep projecting children for scale correction and relative projection - * until all their parents stop performing layout animations. - */ - this.isTreeAnimating = false; - this.isAnimationBlocked = false; - /** - * Flag to true if we think this layout has been changed. We can't always know this, - * currently we set it to true every time a component renders, or if it has a layoutDependency - * if that has changed between renders. Additionally, components can be grouped by LayoutGroup - * and if one node is dirtied, they all are. - */ - this.isLayoutDirty = false; - /** - * Flag to true if we think the projection calculations for this node needs - * recalculating as a result of an updated transform or layout animation. - */ - this.isProjectionDirty = false; - /** - * Flag to true if the layout *or* transform has changed. This then gets propagated - * throughout the projection tree, forcing any element below to recalculate on the next frame. - */ - this.isSharedProjectionDirty = false; - /** - * Flag transform dirty. This gets propagated throughout the whole tree but is only - * respected by shared nodes. - */ - this.isTransformDirty = false; - /** - * Block layout updates for instant layout transitions throughout the tree. - */ - this.updateManuallyBlocked = false; - this.updateBlockedByResize = false; - /** - * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate` - * call. - */ - this.isUpdating = false; - /** - * If this is an SVG element we currently disable projection transforms - */ - this.isSVG = false; - /** - * Flag to true (during promotion) if a node doing an instant layout transition needs to reset - * its projection styles. - */ - this.needsReset = false; - /** - * Flags whether this node should have its transform reset prior to measuring. - */ - this.shouldResetTransform = false; - /** - * Store whether this node has been checked for optimised appear animations. As - * effects fire bottom-up, and we want to look up the tree for appear animations, - * this makes sure we only check each path once, stopping at nodes that - * have already been checked. - */ - this.hasCheckedOptimisedAppear = false; - /** - * An object representing the calculated contextual/accumulated/tree scale. - * This will be used to scale calculcated projection transforms, as these are - * calculated in screen-space but need to be scaled for elements to layoutly - * make it to their calculated destinations. - * - * TODO: Lazy-init - */ - this.treeScale = { x: 1, y: 1 }; - /** - * - */ - this.eventHandlers = new Map(); - this.hasTreeAnimated = false; - this.layoutVersion = 0; - // Note: Currently only running on root node - this.updateScheduled = false; - this.scheduleUpdate = () => this.update(); - this.projectionUpdateScheduled = false; - this.checkUpdateFailed = () => { - if (this.isUpdating) { - this.isUpdating = false; - this.clearAllSnapshots(); - } - }; - /** - * This is a multi-step process as shared nodes might be of different depths. Nodes - * are sorted by depth order, so we need to resolve the entire tree before moving to - * the next step. - */ - this.updateProjection = () => { - this.projectionUpdateScheduled = false; - /** - * Reset debug counts. Manually resetting rather than creating a new - * object each frame. - */ - if (statsBuffer.value) { - metrics.nodes = - metrics.calculatedTargetDeltas = - metrics.calculatedProjections = - 0; - } - this.nodes.forEach(propagateDirtyNodes); - this.nodes.forEach(resolveTargetDelta); - this.nodes.forEach(calcProjection); - this.nodes.forEach(cleanDirtyNodes); - if (statsBuffer.addProjectionMetrics) { - statsBuffer.addProjectionMetrics(metrics); - } - }; - /** - * Frame calculations - */ - this.resolvedRelativeTargetAt = 0.0; - this.linkedParentVersion = 0; - this.hasProjected = false; - this.isVisible = true; - this.animationProgress = 0; - /** - * Shared layout - */ - // TODO Only running on root node - this.sharedNodes = new Map(); - this.latestValues = latestValues; - this.root = parent ? parent.root || parent : this; - this.path = parent ? [...parent.path, parent] : []; - this.parent = parent; - this.depth = parent ? parent.depth + 1 : 0; - for (let i = 0; i < this.path.length; i++) { - this.path[i].shouldResetTransform = true; - } - if (this.root === this) - this.nodes = new FlatTree(); - } - addEventListener(name, handler) { - if (!this.eventHandlers.has(name)) { - this.eventHandlers.set(name, new SubscriptionManager()); - } - return this.eventHandlers.get(name).add(handler); - } - notifyListeners(name, ...args) { - const subscriptionManager = this.eventHandlers.get(name); - subscriptionManager && subscriptionManager.notify(...args); - } - hasListeners(name) { - return this.eventHandlers.has(name); - } - /** - * Lifecycles - */ - mount(instance) { - if (this.instance) - return; - this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance); - this.instance = instance; - const { layoutId, layout, visualElement } = this.options; - if (visualElement && !visualElement.current) { - visualElement.mount(instance); - } - this.root.nodes.add(this); - this.parent && this.parent.children.add(this); - if (this.root.hasTreeAnimated && (layout || layoutId)) { - this.isLayoutDirty = true; - } - if (attachResizeListener) { - let cancelDelay; - let innerWidth = 0; - const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false); - // Set initial innerWidth in a frame.read callback to batch the read - frame.read(() => { - innerWidth = window.innerWidth; - }); - attachResizeListener(instance, () => { - const newInnerWidth = window.innerWidth; - if (newInnerWidth === innerWidth) - return; - innerWidth = newInnerWidth; - this.root.updateBlockedByResize = true; - cancelDelay && cancelDelay(); - cancelDelay = delay(resizeUnblockUpdate, 250); - if (globalProjectionState.hasAnimatedSinceResize) { - globalProjectionState.hasAnimatedSinceResize = false; - this.nodes.forEach(finishAnimation); - } - }); - } - if (layoutId) { - this.root.registerSharedNode(layoutId, this); - } - // Only register the handler if it requires layout animation - if (this.options.animate !== false && - visualElement && - (layoutId || layout)) { - this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout, }) => { - if (this.isTreeAnimationBlocked()) { - this.target = undefined; - this.relativeTarget = undefined; - return; - } - // TODO: Check here if an animation exists - const layoutTransition = this.options.transition || - visualElement.getDefaultTransition() || - defaultLayoutTransition; - const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps(); - /** - * The target layout of the element might stay the same, - * but its position relative to its parent has changed. - */ - const hasTargetChanged = !this.targetLayout || - !boxEqualsRounded(this.targetLayout, newLayout); - /* - * Note: Disabled to fix relative animations always triggering new - * layout animations. If this causes further issues, we can try - * a different approach to detecting relative target changes. - */ - // || hasRelativeLayoutChanged - /** - * If the layout hasn't seemed to have changed, it might be that the - * element is visually in the same place in the document but its position - * relative to its parent has indeed changed. So here we check for that. - */ - const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged; - if (this.options.layoutRoot || - this.resumeFrom || - hasOnlyRelativeTargetChanged || - (hasLayoutChanged && - (hasTargetChanged || !this.currentAnimation))) { - if (this.resumeFrom) { - this.resumingFrom = this.resumeFrom; - this.resumingFrom.resumingFrom = undefined; - } - const animationOptions = { - ...getValueTransition(layoutTransition, "layout"), - onPlay: onLayoutAnimationStart, - onComplete: onLayoutAnimationComplete, - }; - if (visualElement.shouldReduceMotion || - this.options.layoutRoot) { - animationOptions.delay = 0; - animationOptions.type = false; - } - this.startAnimation(animationOptions); - /** - * Set animation origin after starting animation to avoid layout jump - * caused by stopping previous layout animation - */ - this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged, animationOptions - .path); - } - else { - /** - * If the layout hasn't changed and we have an animation that hasn't started yet, - * finish it immediately. Otherwise it will be animating from a location - * that was probably never committed to screen and look like a jumpy box. - */ - if (!hasLayoutChanged) { - finishAnimation(this); - } - if (this.isLead() && this.options.onExitComplete) { - this.options.onExitComplete(); - } - } - this.targetLayout = newLayout; - }); - } - } - unmount() { - this.options.layoutId && this.willUpdate(); - this.root.nodes.remove(this); - const stack = this.getStack(); - stack && stack.remove(this); - this.parent && this.parent.children.delete(this); - this.instance = undefined; - this.eventHandlers.clear(); - cancelFrame(this.updateProjection); - } - // only on the root - blockUpdate() { - this.updateManuallyBlocked = true; - } - unblockUpdate() { - this.updateManuallyBlocked = false; - } - isUpdateBlocked() { - return this.updateManuallyBlocked || this.updateBlockedByResize; - } - isTreeAnimationBlocked() { - return (this.isAnimationBlocked || - (this.parent && this.parent.isTreeAnimationBlocked()) || - false); - } - // Note: currently only running on root node - startUpdate() { - if (this.isUpdateBlocked()) - return; - this.isUpdating = true; - this.nodes && this.nodes.forEach(resetSkewAndRotation); - this.animationId++; - } - getTransformTemplate() { - const { visualElement } = this.options; - return visualElement && visualElement.getProps().transformTemplate; - } - willUpdate(shouldNotifyListeners = true) { - this.root.hasTreeAnimated = true; - if (this.root.isUpdateBlocked()) { - this.options.onExitComplete && this.options.onExitComplete(); - return; - } - /** - * If we're running optimised appear animations then these must be - * cancelled before measuring the DOM. This is so we can measure - * the true layout of the element rather than the WAAPI animation - * which will be unaffected by the resetSkewAndRotate step. - * - * Note: This is a DOM write. Worst case scenario is this is sandwiched - * between other snapshot reads which will cause unnecessary style recalculations. - * This has to happen here though, as we don't yet know which nodes will need - * snapshots in startUpdate(), but we only want to cancel optimised animations - * if a layout animation measurement is actually going to be affected by them. - */ - if (window.MotionCancelOptimisedAnimation && - !this.hasCheckedOptimisedAppear) { - cancelTreeOptimisedTransformAnimations(this); - } - !this.root.isUpdating && this.root.startUpdate(); - if (this.isLayoutDirty) - return; - this.isLayoutDirty = true; - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - node.shouldResetTransform = true; - /** - * Percentage translates resolve against layoutBox dimensions, - * so ancestors with them must be re-measured after transform reset. - */ - if (typeof node.latestValues.x === "string" || - typeof node.latestValues.y === "string") { - node.isLayoutDirty = true; - } - node.updateScroll("snapshot"); - if (node.options.layoutRoot) { - node.willUpdate(false); - } - } - const { layoutId, layout } = this.options; - if (layoutId === undefined && !layout) - return; - const transformTemplate = this.getTransformTemplate(); - this.prevTransformTemplateValue = transformTemplate - ? transformTemplate(this.latestValues, "") - : undefined; - this.updateSnapshot(); - shouldNotifyListeners && this.notifyListeners("willUpdate"); - } - update() { - this.updateScheduled = false; - const updateWasBlocked = this.isUpdateBlocked(); - // When doing an instant transition, we skip the layout update, - // but should still clean up the measurements so that the next - // snapshot could be taken correctly. - if (updateWasBlocked) { - const wasBlockedByResize = this.updateBlockedByResize; - this.unblockUpdate(); - this.updateBlockedByResize = false; - this.clearAllSnapshots(); - /** - * When blocked by resize, still measure layouts so - * callbacks like onLayoutMeasure fire (e.g. Reorder). - * Skip notifyLayoutUpdate to prevent animations. - */ - if (wasBlockedByResize) { - this.nodes.forEach(forceLayoutMeasure); - } - this.nodes.forEach(clearMeasurements); - return; - } - /** - * If this is a repeat of didUpdate then ignore the animation. - */ - if (this.animationId <= this.animationCommitId) { - this.nodes.forEach(clearIsLayoutDirty); - return; - } - this.animationCommitId = this.animationId; - if (!this.isUpdating) { - this.nodes.forEach(clearIsLayoutDirty); - } - else { - this.isUpdating = false; - /** - * Ensure animation-blocked nodes (e.g. during drag) - * get measured even when memoized (willUpdate skipped). - */ - this.nodes.forEach(ensureDraggedNodesSnapshotted); - /** - * Write - */ - this.nodes.forEach(resetTransformStyle); - /** - * Read ================== - */ - // Update layout measurements of updated children - this.nodes.forEach(updateLayout); - /** - * Write - */ - // Notify listeners that the layout is updated - this.nodes.forEach(notifyLayoutUpdate); - } - this.clearAllSnapshots(); - /** - * Manually flush any pending updates. Ideally - * we could leave this to the following requestAnimationFrame but this seems - * to leave a flash of incorrectly styled content. - */ - const now = time.now(); - frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp); - frameData.timestamp = now; - frameData.isProcessing = true; - frameSteps.update.process(frameData); - frameSteps.preRender.process(frameData); - frameSteps.render.process(frameData); - frameData.isProcessing = false; - } - didUpdate() { - if (!this.updateScheduled) { - this.updateScheduled = true; - microtask.read(this.scheduleUpdate); - } - } - clearAllSnapshots() { - this.nodes.forEach(clearSnapshot); - this.sharedNodes.forEach(removeLeadSnapshots); - } - scheduleUpdateProjection() { - if (!this.projectionUpdateScheduled) { - this.projectionUpdateScheduled = true; - frame.preRender(this.updateProjection, false, true); - } - } - scheduleCheckAfterUnmount() { - /** - * If the unmounting node is in a layoutGroup and did trigger a willUpdate, - * we manually call didUpdate to give a chance to the siblings to animate. - * Otherwise, cleanup all snapshots to prevents future nodes from reusing them. - */ - frame.postRender(() => { - if (this.isLayoutDirty) { - this.root.didUpdate(); - } - else { - this.root.checkUpdateFailed(); - } - }); - } - /** - * Update measurements - */ - updateSnapshot() { - if (this.snapshot || !this.instance) - return; - this.snapshot = this.measure(); - if (this.snapshot && - !calcLength(this.snapshot.measuredBox.x) && - !calcLength(this.snapshot.measuredBox.y)) { - this.snapshot = undefined; - } - } - updateLayout() { - if (!this.instance) - return; - this.updateScroll(); - if (!(this.options.alwaysMeasureLayout && this.isLead()) && - !this.isLayoutDirty) { - return; - } - /** - * When a node is mounted, it simply resumes from the prevLead's - * snapshot instead of taking a new one, but the ancestors scroll - * might have updated while the prevLead is unmounted. We need to - * update the scroll again to make sure the layout we measure is - * up to date. - */ - if (this.resumeFrom && !this.resumeFrom.instance) { - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - node.updateScroll(); - } - } - const prevLayout = this.layout; - this.layout = this.measure(false); - this.layoutVersion++; - if (!this.layoutCorrected) - this.layoutCorrected = createBox(); - this.isLayoutDirty = false; - this.projectionDelta = undefined; - this.notifyListeners("measure", this.layout.layoutBox); - const { visualElement } = this.options; - visualElement && - visualElement.notify("LayoutMeasure", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined); - } - updateScroll(phase = "measure") { - let needsMeasurement = Boolean(this.options.layoutScroll && this.instance); - if (this.scroll && - this.scroll.animationId === this.root.animationId && - this.scroll.phase === phase) { - needsMeasurement = false; - } - if (needsMeasurement && this.instance) { - const isRoot = checkIsScrollRoot(this.instance); - this.scroll = { - animationId: this.root.animationId, - phase, - isRoot, - offset: measureScroll(this.instance), - wasRoot: this.scroll ? this.scroll.isRoot : isRoot, - }; - } - } - resetTransform() { - if (!resetTransform) - return; - const isResetRequested = this.isLayoutDirty || - this.shouldResetTransform || - this.options.alwaysMeasureLayout; - const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta); - const transformTemplate = this.getTransformTemplate(); - const transformTemplateValue = transformTemplate - ? transformTemplate(this.latestValues, "") - : undefined; - const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue; - if (isResetRequested && - this.instance && - (hasProjection || - hasTransform(this.latestValues) || - transformTemplateHasChanged)) { - resetTransform(this.instance, transformTemplateValue); - this.shouldResetTransform = false; - this.scheduleRender(); - } - } - measure(removeTransform = true) { - const pageBox = this.measurePageBox(); - let layoutBox = this.removeElementScroll(pageBox); - /** - * Measurements taken during the pre-render stage - * still have transforms applied so we remove them - * via calculation. - */ - if (removeTransform) { - layoutBox = this.removeTransform(layoutBox); - } - roundBox(layoutBox); - return { - animationId: this.root.animationId, - measuredBox: pageBox, - layoutBox, - latestValues: {}, - source: this.id, - }; - } - measurePageBox() { - const { visualElement } = this.options; - if (!visualElement) - return createBox(); - const box = visualElement.measureViewportBox(); - const wasInScrollRoot = this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot); - if (!wasInScrollRoot) { - // Remove viewport scroll to give page-relative coordinates - const { scroll } = this.root; - if (scroll) { - translateAxis(box.x, scroll.offset.x); - translateAxis(box.y, scroll.offset.y); - } - } - return box; - } - removeElementScroll(box) { - const boxWithoutScroll = createBox(); - copyBoxInto(boxWithoutScroll, box); - if (this.scroll?.wasRoot) { - return boxWithoutScroll; - } - /** - * Performance TODO: Keep a cumulative scroll offset down the tree - * rather than loop back up the path. - */ - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - const { scroll, options } = node; - if (node !== this.root && scroll && options.layoutScroll) { - /** - * If this is a new scroll root, we want to remove all previous scrolls - * from the viewport box. - */ - if (scroll.wasRoot) { - copyBoxInto(boxWithoutScroll, box); - } - translateAxis(boxWithoutScroll.x, scroll.offset.x); - translateAxis(boxWithoutScroll.y, scroll.offset.y); - } - } - return boxWithoutScroll; - } - applyTransform(box, transformOnly = false, output) { - const withTransforms = output || createBox(); - copyBoxInto(withTransforms, box); - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - if (!transformOnly && - node.options.layoutScroll && - node.scroll && - node !== node.root) { - translateAxis(withTransforms.x, -node.scroll.offset.x); - translateAxis(withTransforms.y, -node.scroll.offset.y); - } - if (!hasTransform(node.latestValues)) - continue; - transformBox(withTransforms, node.latestValues, node.layout?.layoutBox); - } - if (hasTransform(this.latestValues)) { - transformBox(withTransforms, this.latestValues, this.layout?.layoutBox); - } - return withTransforms; - } - removeTransform(box) { - const boxWithoutTransform = createBox(); - copyBoxInto(boxWithoutTransform, box); - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - if (!hasTransform(node.latestValues)) - continue; - let sourceBox; - if (node.instance) { - hasScale(node.latestValues) && node.updateSnapshot(); - sourceBox = createBox(); - copyBoxInto(sourceBox, node.measurePageBox()); - } - removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot?.layoutBox, sourceBox); - } - if (hasTransform(this.latestValues)) { - removeBoxTransforms(boxWithoutTransform, this.latestValues); - } - return boxWithoutTransform; - } - setTargetDelta(delta) { - this.targetDelta = delta; - this.root.scheduleUpdateProjection(); - this.isProjectionDirty = true; - } - setOptions(options) { - this.options = { - ...this.options, - ...options, - crossfade: options.crossfade !== undefined ? options.crossfade : true, - }; - } - clearMeasurements() { - this.scroll = undefined; - this.layout = undefined; - this.snapshot = undefined; - this.prevTransformTemplateValue = undefined; - this.targetDelta = undefined; - this.target = undefined; - this.isLayoutDirty = false; - } - forceRelativeParentToResolveTarget() { - if (!this.relativeParent) - return; - /** - * If the parent target isn't up-to-date, force it to update. - * This is an unfortunate de-optimisation as it means any updating relative - * projection will cause all the relative parents to recalculate back - * up the tree. - */ - if (this.relativeParent.resolvedRelativeTargetAt !== - frameData.timestamp) { - this.relativeParent.resolveTargetDelta(true); - } - } - resolveTargetDelta(forceRecalculation = false) { - /** - * Once the dirty status of nodes has been spread through the tree, we also - * need to check if we have a shared node of a different depth that has itself - * been dirtied. - */ - const lead = this.getLead(); - this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty); - this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty); - this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty); - const isShared = Boolean(this.resumingFrom) || this !== lead; - /** - * We don't use transform for this step of processing so we don't - * need to check whether any nodes have changed transform. - */ - const canSkip = !(forceRecalculation || - (isShared && this.isSharedProjectionDirty) || - this.isProjectionDirty || - this.parent?.isProjectionDirty || - this.attemptToResolveRelativeTarget || - this.root.updateBlockedByResize); - if (canSkip) - return; - const { layout, layoutId } = this.options; - /** - * If we have no layout, we can't perform projection, so early return - */ - if (!this.layout || !(layout || layoutId)) - return; - this.resolvedRelativeTargetAt = frameData.timestamp; - const relativeParent = this.getClosestProjectingParent(); - if (relativeParent && - this.linkedParentVersion !== relativeParent.layoutVersion && - !relativeParent.options.layoutRoot) { - this.removeRelativeTarget(); - } - /** - * If we don't have a targetDelta but do have a layout, we can attempt to resolve - * a relativeParent. This will allow a component to perform scale correction - * even if no animation has started. - */ - if (!this.targetDelta && !this.relativeTarget) { - if (this.options.layoutAnchor !== false && - relativeParent && - relativeParent.layout) { - this.createRelativeTarget(relativeParent, this.layout.layoutBox, relativeParent.layout.layoutBox); - } - else { - this.removeRelativeTarget(); - } - } - /** - * If we have no relative target or no target delta our target isn't valid - * for this frame. - */ - if (!this.relativeTarget && !this.targetDelta) - return; - /** - * Lazy-init target data structure - */ - if (!this.target) { - this.target = createBox(); - this.targetWithTransforms = createBox(); - } - /** - * If we've got a relative box for this component, resolve it into a target relative to the parent. - */ - if (this.relativeTarget && - this.relativeTargetOrigin && - this.relativeParent && - this.relativeParent.target) { - this.forceRelativeParentToResolveTarget(); - calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || undefined); - /** - * If we've only got a targetDelta, resolve it into a target - */ - } - else if (this.targetDelta) { - if (Boolean(this.resumingFrom)) { - this.applyTransform(this.layout.layoutBox, false, this.target); - } - else { - copyBoxInto(this.target, this.layout.layoutBox); - } - applyBoxDelta(this.target, this.targetDelta); - } - else { - /** - * If no target, use own layout as target - */ - copyBoxInto(this.target, this.layout.layoutBox); - } - /** - * If we've been told to attempt to resolve a relative target, do so. - */ - if (this.attemptToResolveRelativeTarget) { - this.attemptToResolveRelativeTarget = false; - if (this.options.layoutAnchor !== false && - relativeParent && - Boolean(relativeParent.resumingFrom) === - Boolean(this.resumingFrom) && - !relativeParent.options.layoutScroll && - relativeParent.target && - this.animationProgress !== 1) { - this.createRelativeTarget(relativeParent, this.target, relativeParent.target); - } - else { - this.relativeParent = this.relativeTarget = undefined; - } - } - /** - * Increase debug counter for resolved target deltas - */ - if (statsBuffer.value) { - metrics.calculatedTargetDeltas++; - } - } - getClosestProjectingParent() { - if (!this.parent || - hasScale(this.parent.latestValues) || - has2DTranslate(this.parent.latestValues)) { - return undefined; - } - if (this.parent.isProjecting()) { - return this.parent; - } - else { - return this.parent.getClosestProjectingParent(); - } - } - isProjecting() { - return Boolean((this.relativeTarget || - this.targetDelta || - this.options.layoutRoot) && - this.layout); - } - createRelativeTarget(relativeParent, layout, parentLayout) { - this.relativeParent = relativeParent; - this.linkedParentVersion = relativeParent.layoutVersion; - this.forceRelativeParentToResolveTarget(); - this.relativeTarget = createBox(); - this.relativeTargetOrigin = createBox(); - calcRelativePosition(this.relativeTargetOrigin, layout, parentLayout, this.options.layoutAnchor || undefined); - copyBoxInto(this.relativeTarget, this.relativeTargetOrigin); - } - removeRelativeTarget() { - this.relativeParent = this.relativeTarget = undefined; - } - calcProjection() { - const lead = this.getLead(); - const isShared = Boolean(this.resumingFrom) || this !== lead; - let canSkip = true; - /** - * If this is a normal layout animation and neither this node nor its nearest projecting - * is dirty then we can't skip. - */ - if (this.isProjectionDirty || this.parent?.isProjectionDirty) { - canSkip = false; - } - /** - * If this is a shared layout animation and this node's shared projection is dirty then - * we can't skip. - */ - if (isShared && - (this.isSharedProjectionDirty || this.isTransformDirty)) { - canSkip = false; - } - /** - * If we have resolved the target this frame we must recalculate the - * projection to ensure it visually represents the internal calculations. - */ - if (this.resolvedRelativeTargetAt === frameData.timestamp) { - canSkip = false; - } - if (canSkip) - return; - const { layout, layoutId } = this.options; - /** - * If this section of the tree isn't animating we can - * delete our target sources for the following frame. - */ - this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) || - this.currentAnimation || - this.pendingAnimation); - if (!this.isTreeAnimating) { - this.targetDelta = this.relativeTarget = undefined; - } - if (!this.layout || !(layout || layoutId)) - return; - /** - * Reset the corrected box with the latest values from box, as we're then going - * to perform mutative operations on it. - */ - copyBoxInto(this.layoutCorrected, this.layout.layoutBox); - /** - * Record previous tree scales before updating. - */ - const prevTreeScaleX = this.treeScale.x; - const prevTreeScaleY = this.treeScale.y; - /** - * Apply all the parent deltas to this box to produce the corrected box. This - * is the layout box, as it will appear on screen as a result of the transforms of its parents. - */ - applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared); - /** - * If this layer needs to perform scale correction but doesn't have a target, - * use the layout as the target. - */ - if (lead.layout && - !lead.target && - (this.treeScale.x !== 1 || this.treeScale.y !== 1)) { - lead.target = lead.layout.layoutBox; - lead.targetWithTransforms = createBox(); - } - const { target } = lead; - if (!target) { - /** - * If we don't have a target to project into, but we were previously - * projecting, we want to remove the stored transform and schedule - * a render to ensure the elements reflect the removed transform. - */ - if (this.prevProjectionDelta) { - this.createProjectionDeltas(); - this.scheduleRender(); - } - return; - } - if (!this.projectionDelta || !this.prevProjectionDelta) { - this.createProjectionDeltas(); - } - else { - copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x); - copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y); - } - /** - * Update the delta between the corrected box and the target box before user-set transforms were applied. - * This will allow us to calculate the corrected borderRadius and boxShadow to compensate - * for our layout reprojection, but still allow them to be scaled correctly by the user. - * It might be that to simplify this we may want to accept that user-set scale is also corrected - * and we wouldn't have to keep and calc both deltas, OR we could support a user setting - * to allow people to choose whether these styles are corrected based on just the - * layout reprojection or the final bounding box. - */ - calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues); - if (this.treeScale.x !== prevTreeScaleX || - this.treeScale.y !== prevTreeScaleY || - !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) || - !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) { - this.hasProjected = true; - this.scheduleRender(); - this.notifyListeners("projectionUpdate", target); - } - /** - * Increase debug counter for recalculated projections - */ - if (statsBuffer.value) { - metrics.calculatedProjections++; - } - } - hide() { - this.isVisible = false; - // TODO: Schedule render - } - show() { - this.isVisible = true; - // TODO: Schedule render - } - scheduleRender(notifyAll = true) { - this.options.visualElement?.scheduleRender(); - if (notifyAll) { - const stack = this.getStack(); - stack && stack.scheduleRender(); - } - if (this.resumingFrom && !this.resumingFrom.instance) { - this.resumingFrom = undefined; - } - } - createProjectionDeltas() { - this.prevProjectionDelta = createDelta(); - this.projectionDelta = createDelta(); - this.projectionDeltaWithTransform = createDelta(); - } - setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false, pathFn) { - const snapshot = this.snapshot; - const snapshotLatestValues = snapshot ? snapshot.latestValues : {}; - const mixedValues = { ...this.latestValues }; - const targetDelta = createDelta(); - if (!this.relativeParent || - !this.relativeParent.options.layoutRoot) { - this.relativeTarget = this.relativeTargetOrigin = undefined; - } - this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged; - const relativeLayout = createBox(); - const snapshotSource = snapshot ? snapshot.source : undefined; - const layoutSource = this.layout ? this.layout.source : undefined; - const isSharedLayoutAnimation = snapshotSource !== layoutSource; - const stack = this.getStack(); - const isOnlyMember = !stack || stack.members.length <= 1; - const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && - !isOnlyMember && - this.options.crossfade === true && - !this.path.some(hasOpacityCrossfade)); - this.animationProgress = 0; - let prevRelativeTarget; - // The path decides whether the layout shift is worth curving - // (distance floor) and resolves the interpolator from the delta. - const interpolate = pathFn?.interpolateProjection(delta); - this.mixTargetDelta = (latest) => { - const progress = latest / 1000; - const point = interpolate?.(progress); - if (point) { - targetDelta.x.translate = point.x; - targetDelta.x.scale = mixNumber(delta.x.scale, 1, progress); - targetDelta.x.origin = delta.x.origin; - targetDelta.x.originPoint = delta.x.originPoint; - targetDelta.y.translate = point.y; - targetDelta.y.scale = mixNumber(delta.y.scale, 1, progress); - targetDelta.y.origin = delta.y.origin; - targetDelta.y.originPoint = delta.y.originPoint; - } - else { - mixAxisDeltaLinear(targetDelta.x, delta.x, progress); - mixAxisDeltaLinear(targetDelta.y, delta.y, progress); - } - this.setTargetDelta(targetDelta); - if (this.relativeTarget && - this.relativeTargetOrigin && - this.layout && - this.relativeParent && - this.relativeParent.layout) { - calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || undefined); - mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress); - /** - * If this is an unchanged relative target we can consider the - * projection not dirty. - */ - if (prevRelativeTarget && - boxEquals(this.relativeTarget, prevRelativeTarget)) { - this.isProjectionDirty = false; - } - if (!prevRelativeTarget) - prevRelativeTarget = createBox(); - copyBoxInto(prevRelativeTarget, this.relativeTarget); - } - if (isSharedLayoutAnimation) { - this.animationValues = mixedValues; - mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember); - } - if (point && point.rotate !== undefined) { - // Dedicated `pathRotation` channel, not `rotate`, so an - // animating `rotate` is composed with, never clobbered. - if (!this.animationValues) - this.animationValues = mixedValues; - this.animationValues.pathRotation = point.rotate; - } - this.root.scheduleUpdateProjection(); - this.scheduleRender(); - this.animationProgress = progress; - }; - this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0); - } - startAnimation(options) { - this.notifyListeners("animationStart"); - this.currentAnimation?.stop(); - this.resumingFrom?.currentAnimation?.stop(); - if (this.pendingAnimation) { - cancelFrame(this.pendingAnimation); - this.pendingAnimation = undefined; - } - /** - * Start the animation in the next frame to have a frame with progress 0, - * where the target is the same as when the animation started, so we can - * calculate the relative positions correctly for instant transitions. - */ - this.pendingAnimation = frame.update(() => { - globalProjectionState.hasAnimatedSinceResize = true; - activeAnimations.layout++; - this.motionValue || (this.motionValue = motionValue(0)); - this.motionValue.jump(0, false); - this.currentAnimation = animateSingleValue(this.motionValue, [0, 1000], { - ...options, - velocity: 0, - isSync: true, - onUpdate: (latest) => { - this.mixTargetDelta(latest); - options.onUpdate && options.onUpdate(latest); - }, - onStop: () => { - activeAnimations.layout--; - }, - onComplete: () => { - activeAnimations.layout--; - options.onComplete && options.onComplete(); - this.completeAnimation(); - }, - }); - if (this.resumingFrom) { - this.resumingFrom.currentAnimation = this.currentAnimation; - } - this.pendingAnimation = undefined; - }); - } - completeAnimation() { - if (this.resumingFrom) { - this.resumingFrom.currentAnimation = undefined; - this.resumingFrom.preserveOpacity = undefined; - } - const stack = this.getStack(); - stack && stack.exitAnimationComplete(); - this.resumingFrom = - this.currentAnimation = - this.animationValues = - undefined; - this.notifyListeners("animationComplete"); - } - finishAnimation() { - if (this.currentAnimation) { - this.mixTargetDelta && this.mixTargetDelta(animationTarget); - this.currentAnimation.stop(); - } - this.completeAnimation(); - } - applyTransformsToTarget() { - const lead = this.getLead(); - let { targetWithTransforms, target, layout, latestValues } = lead; - if (!targetWithTransforms || !target || !layout) - return; - /** - * If we're only animating position, and this element isn't the lead element, - * then instead of projecting into the lead box we instead want to calculate - * a new target that aligns the two boxes but maintains the layout shape. - */ - if (this !== lead && - this.layout && - layout && - shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) { - target = this.target || createBox(); - const xLength = calcLength(this.layout.layoutBox.x); - target.x.min = lead.target.x.min; - target.x.max = target.x.min + xLength; - const yLength = calcLength(this.layout.layoutBox.y); - target.y.min = lead.target.y.min; - target.y.max = target.y.min + yLength; - } - copyBoxInto(targetWithTransforms, target); - /** - * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal. - * This is the final box that we will then project into by calculating a transform delta and - * applying it to the corrected box. - */ - transformBox(targetWithTransforms, latestValues); - /** - * Update the delta between the corrected box and the final target box, after - * user-set transforms are applied to it. This will be used by the renderer to - * create a transform style that will reproject the element from its layout layout - * into the desired bounding box. - */ - calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues); - } - registerSharedNode(layoutId, node) { - if (!this.sharedNodes.has(layoutId)) { - this.sharedNodes.set(layoutId, new NodeStack()); - } - const stack = this.sharedNodes.get(layoutId); - stack.add(node); - const config = node.options.initialPromotionConfig; - node.promote({ - transition: config ? config.transition : undefined, - preserveFollowOpacity: config && config.shouldPreserveFollowOpacity - ? config.shouldPreserveFollowOpacity(node) - : undefined, - }); - } - isLead() { - const stack = this.getStack(); - return stack ? stack.lead === this : true; - } - getLead() { - const { layoutId } = this.options; - return layoutId ? this.getStack()?.lead || this : this; - } - getPrevLead() { - const { layoutId } = this.options; - return layoutId ? this.getStack()?.prevLead : undefined; - } - getStack() { - const { layoutId } = this.options; - if (layoutId) - return this.root.sharedNodes.get(layoutId); - } - promote({ needsReset, transition, preserveFollowOpacity, } = {}) { - const stack = this.getStack(); - if (stack) - stack.promote(this, preserveFollowOpacity); - if (needsReset) { - this.projectionDelta = undefined; - this.needsReset = true; - } - if (transition) - this.setOptions({ transition }); - } - relegate() { - const stack = this.getStack(); - if (stack) { - return stack.relegate(this); - } - else { - return false; - } - } - resetSkewAndRotation() { - const { visualElement } = this.options; - if (!visualElement) - return; - // If there's no detected skew or rotation values, we can early return without a forced render. - let hasDistortingTransform = false; - /** - * An unrolled check for rotation values. Most elements don't have any rotation and - * skipping the nested loop and new object creation is 50% faster. - */ - const { latestValues } = visualElement; - if (latestValues.z || - latestValues.rotate || - latestValues.rotateX || - latestValues.rotateY || - latestValues.rotateZ || - latestValues.skewX || - latestValues.skewY) { - hasDistortingTransform = true; - } - // If there's no distorting values, we don't need to do any more. - if (!hasDistortingTransform) - return; - const resetValues = {}; - if (latestValues.z) { - resetDistortingTransform("z", visualElement, resetValues, this.animationValues); - } - // Check the skew and rotate value of all axes and reset to 0 - for (let i = 0; i < transformAxes.length; i++) { - resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues); - resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues); - } - // Force a render of this element to apply the transform with all skews and rotations - // set to 0. - visualElement.render(); - // Put back all the values we reset - for (const key in resetValues) { - visualElement.setStaticValue(key, resetValues[key]); - if (this.animationValues) { - this.animationValues[key] = resetValues[key]; - } - } - // Schedule a render for the next frame. This ensures we won't visually - // see the element with the reset rotate value applied. - visualElement.scheduleRender(); - } - applyProjectionStyles(targetStyle, // CSSStyleDeclaration - doesn't allow numbers to be assigned to properties - styleProp) { - if (!this.instance || this.isSVG) - return; - if (!this.isVisible) { - targetStyle.visibility = "hidden"; - return; - } - const transformTemplate = this.getTransformTemplate(); - if (this.needsReset) { - this.needsReset = false; - targetStyle.visibility = ""; - targetStyle.opacity = ""; - targetStyle.pointerEvents = - resolveMotionValue(styleProp?.pointerEvents) || ""; - targetStyle.transform = transformTemplate - ? transformTemplate(this.latestValues, "") - : "none"; - return; - } - const lead = this.getLead(); - if (!this.projectionDelta || !this.layout || !lead.target) { - if (this.options.layoutId) { - targetStyle.opacity = - this.latestValues.opacity !== undefined - ? this.latestValues.opacity - : 1; - targetStyle.pointerEvents = - resolveMotionValue(styleProp?.pointerEvents) || ""; - } - if (this.hasProjected && !hasTransform(this.latestValues)) { - targetStyle.transform = transformTemplate - ? transformTemplate({}, "") - : "none"; - this.hasProjected = false; - } - return; - } - targetStyle.visibility = ""; - const valuesToRender = lead.animationValues || lead.latestValues; - this.applyTransformsToTarget(); - let transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender); - if (transformTemplate) { - transform = transformTemplate(valuesToRender, transform); - } - targetStyle.transform = transform; - const { x, y } = this.projectionDelta; - targetStyle.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`; - if (lead.animationValues) { - /** - * If the lead component is animating, assign this either the entering/leaving - * opacity - */ - targetStyle.opacity = - lead === this - ? valuesToRender.opacity ?? - this.latestValues.opacity ?? - 1 - : this.preserveOpacity - ? this.latestValues.opacity - : valuesToRender.opacityExit; - } - else { - /** - * Or we're not animating at all, set the lead component to its layout - * opacity and other components to hidden. - */ - targetStyle.opacity = - lead === this - ? valuesToRender.opacity !== undefined - ? valuesToRender.opacity - : "" - : valuesToRender.opacityExit !== undefined - ? valuesToRender.opacityExit - : 0; - } - /** - * Apply scale correction - */ - for (const key in scaleCorrectors) { - if (valuesToRender[key] === undefined) - continue; - const { correct, applyTo, isCSSVariable } = scaleCorrectors[key]; - /** - * Only apply scale correction to the value if we have an - * active projection transform. Otherwise these values become - * vulnerable to distortion if the element changes size without - * a corresponding layout animation. - */ - const corrected = transform === "none" - ? valuesToRender[key] - : correct(valuesToRender[key], lead); - if (applyTo) { - const num = applyTo.length; - for (let i = 0; i < num; i++) { - targetStyle[applyTo[i]] = corrected; - } - } - else { - // If this is a CSS variable, set it directly on the instance. - // Replacing this function from creating styles to setting them - // would be a good place to remove per frame object creation - if (isCSSVariable) { - this.options.visualElement.renderState.vars[key] = corrected; - } - else { - targetStyle[key] = corrected; - } - } - } - /** - * Disable pointer events on follow components. This is to ensure - * that if a follow component covers a lead component it doesn't block - * pointer events on the lead. - */ - if (this.options.layoutId) { - targetStyle.pointerEvents = - lead === this - ? resolveMotionValue(styleProp?.pointerEvents) || "" - : "none"; - } - } - clearSnapshot() { - this.resumeFrom = this.snapshot = undefined; - } - // Only run on root - resetTree() { - this.root.nodes.forEach((node) => node.currentAnimation?.stop()); - this.root.nodes.forEach(clearMeasurements); - this.root.sharedNodes.clear(); - } - }; -} -function updateLayout(node) { - node.updateLayout(); -} -function notifyLayoutUpdate(node) { - const snapshot = node.resumeFrom?.snapshot || node.snapshot; - if (node.isLead() && - node.layout && - snapshot && - node.hasListeners("didUpdate")) { - const { layoutBox: layout, measuredBox: measuredLayout } = node.layout; - const { animationType } = node.options; - const isShared = snapshot.source !== node.layout.source; - // TODO Maybe we want to also resize the layout snapshot so we don't trigger - // animations for instance if layout="size" and an element has only changed position - if (animationType === "size") { - eachAxis((axis) => { - const axisSnapshot = isShared - ? snapshot.measuredBox[axis] - : snapshot.layoutBox[axis]; - const length = calcLength(axisSnapshot); - axisSnapshot.min = layout[axis].min; - axisSnapshot.max = axisSnapshot.min + length; - }); - } - else if (animationType === "x" || animationType === "y") { - const snapAxis = animationType === "x" ? "y" : "x"; - copyAxisInto(isShared - ? snapshot.measuredBox[snapAxis] - : snapshot.layoutBox[snapAxis], layout[snapAxis]); - } - else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) { - eachAxis((axis) => { - const axisSnapshot = isShared - ? snapshot.measuredBox[axis] - : snapshot.layoutBox[axis]; - const length = calcLength(layout[axis]); - axisSnapshot.max = axisSnapshot.min + length; - /** - * Ensure relative target gets resized and rerendererd - */ - if (node.relativeTarget && !node.currentAnimation) { - node.isProjectionDirty = true; - node.relativeTarget[axis].max = - node.relativeTarget[axis].min + length; - } - }); - } - const layoutDelta = createDelta(); - calcBoxDelta(layoutDelta, layout, snapshot.layoutBox); - const visualDelta = createDelta(); - if (isShared) { - calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox); - } - else { - calcBoxDelta(visualDelta, layout, snapshot.layoutBox); - } - const hasLayoutChanged = !isDeltaZero(layoutDelta); - let hasRelativeLayoutChanged = false; - if (!node.resumeFrom) { - const relativeParent = node.getClosestProjectingParent(); - /** - * If the relativeParent is itself resuming from a different element then - * the relative snapshot is not relavent - */ - if (relativeParent && !relativeParent.resumeFrom) { - const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent; - if (parentSnapshot && parentLayout) { - const anchor = node.options.layoutAnchor || undefined; - const relativeSnapshot = createBox(); - calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox, anchor); - const relativeLayout = createBox(); - calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox, anchor); - if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) { - hasRelativeLayoutChanged = true; - } - if (relativeParent.options.layoutRoot) { - node.relativeTarget = relativeLayout; - node.relativeTargetOrigin = relativeSnapshot; - node.relativeParent = relativeParent; - } - } - } - } - node.notifyListeners("didUpdate", { - layout, - snapshot, - delta: visualDelta, - layoutDelta, - hasLayoutChanged, - hasRelativeLayoutChanged, - }); - } - else if (node.isLead()) { - const { onExitComplete } = node.options; - onExitComplete && onExitComplete(); - } - /** - * Clearing transition - * TODO: Investigate why this transition is being passed in as {type: false } from Framer - * and why we need it at all - */ - node.options.transition = undefined; -} -function propagateDirtyNodes(node) { - /** - * Increase debug counter for nodes encountered this frame - */ - if (statsBuffer.value) { - metrics.nodes++; - } - if (!node.parent) - return; - /** - * If this node isn't projecting, propagate isProjectionDirty. It will have - * no performance impact but it will allow the next child that *is* projecting - * but *isn't* dirty to just check its parent to see if *any* ancestor needs - * correcting. - */ - if (!node.isProjecting()) { - node.isProjectionDirty = node.parent.isProjectionDirty; - } - /** - * Propagate isSharedProjectionDirty and isTransformDirty - * throughout the whole tree. A future revision can take another look at - * this but for safety we still recalcualte shared nodes. - */ - node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty || - node.parent.isProjectionDirty || - node.parent.isSharedProjectionDirty)); - node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty); -} -function cleanDirtyNodes(node) { - node.isProjectionDirty = - node.isSharedProjectionDirty = - node.isTransformDirty = - false; -} -function clearSnapshot(node) { - node.clearSnapshot(); -} -function clearMeasurements(node) { - node.clearMeasurements(); -} -function forceLayoutMeasure(node) { - node.isLayoutDirty = true; - node.updateLayout(); -} -function clearIsLayoutDirty(node) { - node.isLayoutDirty = false; -} -/** - * When a node is animation-blocked (e.g. during drag) and its component - * didn't re-render (memoized), willUpdate() is never called so there's - * no snapshot. Use the previous layout as a snapshot and mark dirty so - * resetTransform/updateLayout/notifyLayoutUpdate process it normally. - */ -function ensureDraggedNodesSnapshotted(node) { - if (node.isAnimationBlocked && node.layout && !node.isLayoutDirty) { - node.snapshot = node.layout; - node.isLayoutDirty = true; - } -} -function resetTransformStyle(node) { - const { visualElement } = node.options; - if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) { - visualElement.notify("BeforeLayoutMeasure"); - } - node.resetTransform(); -} -function finishAnimation(node) { - node.finishAnimation(); - node.targetDelta = node.relativeTarget = node.target = undefined; - node.isProjectionDirty = true; -} -function resolveTargetDelta(node) { - node.resolveTargetDelta(); -} -function calcProjection(node) { - node.calcProjection(); -} -function resetSkewAndRotation(node) { - node.resetSkewAndRotation(); -} -function removeLeadSnapshots(stack) { - stack.removeLeadSnapshot(); -} -function mixAxisDeltaLinear(output, delta, p) { - output.translate = mixNumber(delta.translate, 0, p); - output.scale = mixNumber(delta.scale, 1, p); - output.origin = delta.origin; - output.originPoint = delta.originPoint; -} -function mixAxis(output, from, to, p) { - output.min = mixNumber(from.min, to.min, p); - output.max = mixNumber(from.max, to.max, p); -} -function mixBox(output, from, to, p) { - mixAxis(output.x, from.x, to.x, p); - mixAxis(output.y, from.y, to.y, p); -} -function hasOpacityCrossfade(node) { - return (node.animationValues && node.animationValues.opacityExit !== undefined); -} -const defaultLayoutTransition = { - duration: 0.45, - ease: [0.4, 0, 0.1, 1], -}; -const userAgentContains = (string) => typeof navigator !== "undefined" && - navigator.userAgent && - navigator.userAgent.toLowerCase().includes(string); -/** - * Measured bounding boxes must be rounded in Safari and - * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements - * can appear to jump. - */ -const roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/") - ? Math.round - : noop; -function roundAxis(axis) { - // Round to the nearest .5 pixels to support subpixel layouts - axis.min = roundPoint(axis.min); - axis.max = roundPoint(axis.max); -} -function roundBox(box) { - roundAxis(box.x); - roundAxis(box.y); -} -function shouldAnimatePositionOnly(animationType, snapshot, layout) { - return (animationType === "position" || - (animationType === "preserve-aspect" && - !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2))); -} -function checkNodeWasScrollRoot(node) { - return node !== node.root && node.scroll?.wasRoot; -} - -export { cleanDirtyNodes, createProjectionNode, mixAxis, mixBox, propagateDirtyNodes }; -//# sourceMappingURL=create-projection-node.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.map deleted file mode 100644 index 55beee21..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create-projection-node.mjs","sources":["../../../../src/projection/node/create-projection-node.ts"],"sourcesContent":["import {\n Axis,\n AxisDelta,\n Box,\n clamp,\n Delta,\n noop,\n Point,\n SubscriptionManager,\n} from \"motion-utils\"\nimport { animateSingleValue } from \"../../animation/animate/single-value\"\nimport { JSAnimation } from \"../../animation/JSAnimation\"\nimport { getOptimisedAppearId } from \"../../animation/optimized-appear/get-appear-id\"\nimport {\n MotionPath,\n PathInterpolator,\n Transition,\n ValueAnimationOptions,\n} from \"../../animation/types\"\nimport { getValueTransition } from \"../../animation/utils/get-value-transition\"\nimport { cancelFrame, frame, frameData, frameSteps } from \"../../frameloop\"\nimport { microtask } from \"../../frameloop/microtask\"\nimport { time } from \"../../frameloop/sync-time\"\nimport type { Process } from \"../../frameloop/types\"\nimport { HTMLVisualElement } from \"../../render/html/HTMLVisualElement\"\nimport type { ResolvedValues } from \"../../render/types\"\nimport { scaleCorrectors } from \"../../render/utils/is-forced-motion-value\"\nimport type { MotionStyle, VisualElement } from \"../../render/VisualElement\"\nimport { activeAnimations } from \"../../stats/animation-count\"\nimport { statsBuffer } from \"../../stats/buffer\"\nimport { delay } from \"../../utils/delay\"\nimport { isSVGElement } from \"../../utils/is-svg-element\"\nimport { isSVGSVGElement } from \"../../utils/is-svg-svg-element\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport { MotionValue, motionValue } from \"../../value\"\nimport { resolveMotionValue } from \"../../value/utils/resolve-motion-value\"\nimport { mixValues } from \"../animation/mix-values\"\nimport { copyAxisDeltaInto, copyAxisInto, copyBoxInto } from \"../geometry/copy\"\nimport {\n applyBoxDelta,\n applyTreeDeltas,\n transformBox,\n translateAxis,\n} from \"../geometry/delta-apply\"\nimport {\n calcBoxDelta,\n calcLength,\n calcRelativeBox,\n calcRelativePosition,\n isNear,\n} from \"../geometry/delta-calc\"\nimport { removeBoxTransforms } from \"../geometry/delta-remove\"\nimport { createBox, createDelta } from \"../geometry/models\"\nimport {\n aspectRatio,\n axisDeltaEquals,\n boxEquals,\n boxEqualsRounded,\n isDeltaZero,\n} from \"../geometry/utils\"\nimport { NodeStack } from \"../shared/stack\"\nimport { buildProjectionTransform } from \"../styles/transform\"\nimport { eachAxis } from \"../utils/each-axis\"\nimport { FlatTree } from \"../utils/flat-tree\"\nimport { has2DTranslate, hasScale, hasTransform } from \"../utils/has-transform\"\nimport { globalProjectionState } from \"./state\"\nimport {\n IProjectionNode,\n LayoutEvents,\n LayoutUpdateData,\n Measurements,\n Phase,\n ProjectionNodeConfig,\n ProjectionNodeOptions,\n ScrollMeasurements,\n} from \"./types\"\n\nconst metrics = {\n nodes: 0,\n calculatedTargetDeltas: 0,\n calculatedProjections: 0,\n}\n\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"]\n\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nconst animationTarget = 1000\n\nlet id = 0\n\nfunction resetDistortingTransform(\n key: string,\n visualElement: VisualElement,\n values: ResolvedValues,\n sharedAnimationValues?: ResolvedValues\n) {\n const { latestValues } = visualElement\n\n // Record the distorting transform and then temporarily set it to 0\n if (latestValues[key]) {\n values[key] = latestValues[key]\n visualElement.setStaticValue(key, 0)\n if (sharedAnimationValues) {\n sharedAnimationValues[key] = 0\n }\n }\n}\n\nfunction cancelTreeOptimisedTransformAnimations(\n projectionNode: IProjectionNode\n) {\n projectionNode.hasCheckedOptimisedAppear = true\n if (projectionNode.root === projectionNode) return\n\n const { visualElement } = projectionNode.options\n\n if (!visualElement) return\n\n const appearId = getOptimisedAppearId(visualElement)\n\n if (window.MotionHasOptimisedAnimation!(appearId, \"transform\")) {\n const { layout, layoutId } = projectionNode.options\n window.MotionCancelOptimisedAnimation!(\n appearId,\n \"transform\",\n frame,\n !(layout || layoutId)\n )\n }\n\n const { parent } = projectionNode\n if (parent && !parent.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(parent)\n }\n}\n\nexport function createProjectionNode({\n attachResizeListener,\n defaultParent,\n measureScroll,\n checkIsScrollRoot,\n resetTransform,\n}: ProjectionNodeConfig) {\n return class ProjectionNode implements IProjectionNode {\n /**\n * A unique ID generated for every projection node.\n */\n id: number = id++\n\n /**\n * An id that represents a unique session instigated by startUpdate.\n */\n animationId: number = 0\n\n animationCommitId = 0\n\n /**\n * A reference to the platform-native node (currently this will be a HTMLElement).\n */\n instance: I | undefined\n\n /**\n * A reference to the root projection node. There'll only ever be one tree and one root.\n */\n root: IProjectionNode\n\n /**\n * A reference to this node's parent.\n */\n parent?: IProjectionNode\n\n /**\n * A path from this node to the root node. This provides a fast way to iterate\n * back up the tree.\n */\n path: IProjectionNode[]\n\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n children = new Set()\n\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n options: ProjectionNodeOptions = {}\n\n /**\n * A snapshot of the element's state just before the current update. This is\n * hydrated when this node's `willUpdate` method is called and scrubbed at the\n * end of the tree's `didUpdate` method.\n */\n snapshot: Measurements | undefined\n\n /**\n * A box defining the element's layout relative to the page. This will have been\n * captured with all parent scrolls and projection transforms unset.\n */\n layout: Measurements | undefined\n\n /**\n * The layout used to calculate the previous layout animation. We use this to compare\n * layouts between renders and decide whether we need to trigger a new layout animation\n * or just let the current one play out.\n */\n targetLayout?: Box\n\n /**\n * A mutable data structure we use to apply all parent transforms currently\n * acting on the element's layout. It's from here we can calculate the projectionDelta\n * required to get the element from its layout into its calculated target box.\n */\n layoutCorrected: Box\n\n /**\n * An ideal projection transform we want to apply to the element. This is calculated,\n * usually when an element's layout has changed, and we want the element to look as though\n * its in its previous layout on the next frame. From there, we animated it down to 0\n * to animate the element to its new layout.\n */\n targetDelta?: Delta\n\n /**\n * A mutable structure representing the visual bounding box on the page where we want\n * and element to appear. This can be set directly but is currently derived once a frame\n * from apply targetDelta to layout.\n */\n target?: Box\n\n /**\n * A mutable structure describing a visual bounding box relative to the element's\n * projected parent. If defined, target will be derived from this rather than targetDelta.\n * If not defined, we'll attempt to calculate on the first layout animation frame\n * based on the targets calculated from targetDelta. This will transfer a layout animation\n * from viewport-relative to parent-relative.\n */\n relativeTarget?: Box\n\n relativeTargetOrigin?: Box\n relativeParent?: IProjectionNode\n\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n isTreeAnimating = false\n\n isAnimationBlocked = false\n\n /**\n * If true, attempt to resolve relativeTarget.\n */\n attemptToResolveRelativeTarget?: boolean\n\n /**\n * A mutable structure that represents the target as transformed by the element's\n * latest user-set transforms (ie scale, x)\n */\n targetWithTransforms?: Box\n\n /**\n * The previous projection delta, which we can compare with the newly calculated\n * projection delta to see if we need to render.\n */\n prevProjectionDelta?: Delta\n\n /**\n * A calculated transform that will project an element from its layoutCorrected\n * into the target. This will be used by children to calculate their own layoutCorrect boxes.\n */\n projectionDelta?: Delta\n\n /**\n * A calculated transform that will project an element from its layoutCorrected\n * into the targetWithTransforms.\n */\n projectionDeltaWithTransform?: Delta\n\n /**\n * If we're tracking the scroll of this element, we store it here.\n */\n scroll?: ScrollMeasurements\n\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n isLayoutDirty = false\n\n /**\n * Flag to true if we think the projection calculations for this node needs\n * recalculating as a result of an updated transform or layout animation.\n */\n isProjectionDirty = false\n\n /**\n * Flag to true if the layout *or* transform has changed. This then gets propagated\n * throughout the projection tree, forcing any element below to recalculate on the next frame.\n */\n isSharedProjectionDirty = false\n\n /**\n * Flag transform dirty. This gets propagated throughout the whole tree but is only\n * respected by shared nodes.\n */\n isTransformDirty = false\n\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n updateManuallyBlocked = false\n\n updateBlockedByResize = false\n\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n isUpdating = false\n\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n isSVG = false\n\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n needsReset = false\n\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n shouldResetTransform = false\n\n /**\n * Store whether this node has been checked for optimised appear animations. As\n * effects fire bottom-up, and we want to look up the tree for appear animations,\n * this makes sure we only check each path once, stopping at nodes that\n * have already been checked.\n */\n hasCheckedOptimisedAppear = false\n\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to layoutly\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n treeScale: Point = { x: 1, y: 1 }\n\n /**\n * Is hydrated with a projection node if an element is animating from another.\n */\n resumeFrom?: IProjectionNode\n\n /**\n * Is hydrated with a projection node if an element is animating from another.\n */\n resumingFrom?: IProjectionNode\n\n /**\n * A reference to the element's latest animated values. This is a reference shared\n * between the element's VisualElement and the ProjectionNode.\n */\n latestValues: ResolvedValues\n\n /**\n *\n */\n eventHandlers = new Map>()\n\n nodes?: FlatTree\n\n depth: number\n\n /**\n * If transformTemplate generates a different value before/after the\n * update, we need to reset the transform.\n */\n prevTransformTemplateValue: string | undefined\n\n preserveOpacity?: boolean\n\n hasTreeAnimated = false\n\n layoutVersion: number = 0\n\n constructor(\n latestValues: ResolvedValues = {},\n parent: IProjectionNode | undefined = defaultParent?.()\n ) {\n this.latestValues = latestValues\n this.root = parent ? parent.root || parent : this\n this.path = parent ? [...parent.path, parent] : []\n this.parent = parent\n\n this.depth = parent ? parent.depth + 1 : 0\n\n for (let i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true\n }\n\n if (this.root === this) this.nodes = new FlatTree()\n }\n\n addEventListener(name: LayoutEvents, handler: any) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager())\n }\n\n return this.eventHandlers.get(name)!.add(handler)\n }\n\n notifyListeners(name: LayoutEvents, ...args: any) {\n const subscriptionManager = this.eventHandlers.get(name)\n subscriptionManager && subscriptionManager.notify(...args)\n }\n\n hasListeners(name: LayoutEvents) {\n return this.eventHandlers.has(name)\n }\n\n /**\n * Lifecycles\n */\n mount(instance: I) {\n if (this.instance) return\n\n this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance)\n\n this.instance = instance\n\n const { layoutId, layout, visualElement } = this.options\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance)\n }\n\n this.root.nodes!.add(this)\n this.parent && this.parent.children.add(this)\n\n if (this.root.hasTreeAnimated && (layout || layoutId)) {\n this.isLayoutDirty = true\n }\n\n if (attachResizeListener) {\n let cancelDelay: VoidFunction\n let innerWidth = 0\n\n const resizeUnblockUpdate = () =>\n (this.root.updateBlockedByResize = false)\n\n // Set initial innerWidth in a frame.read callback to batch the read\n frame.read(() => {\n innerWidth = window.innerWidth\n })\n\n attachResizeListener(instance, () => {\n const newInnerWidth = window.innerWidth\n if (newInnerWidth === innerWidth) return\n\n innerWidth = newInnerWidth\n\n this.root.updateBlockedByResize = true\n\n cancelDelay && cancelDelay()\n cancelDelay = delay(resizeUnblockUpdate, 250)\n\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false\n this.nodes!.forEach(finishAnimation)\n }\n })\n }\n\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this)\n }\n\n // Only register the handler if it requires layout animation\n if (\n this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)\n ) {\n this.addEventListener(\n \"didUpdate\",\n ({\n delta,\n hasLayoutChanged,\n hasRelativeLayoutChanged,\n layout: newLayout,\n }: LayoutUpdateData) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = undefined\n this.relativeTarget = undefined\n return\n }\n\n // TODO: Check here if an animation exists\n const layoutTransition =\n this.options.transition ||\n visualElement.getDefaultTransition() ||\n defaultLayoutTransition\n\n const {\n onLayoutAnimationStart,\n onLayoutAnimationComplete,\n } = visualElement.getProps()\n\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n const hasTargetChanged =\n !this.targetLayout ||\n !boxEqualsRounded(this.targetLayout, newLayout)\n /*\n * Note: Disabled to fix relative animations always triggering new\n * layout animations. If this causes further issues, we can try\n * a different approach to detecting relative target changes.\n */\n // || hasRelativeLayoutChanged\n\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n const hasOnlyRelativeTargetChanged =\n !hasLayoutChanged && hasRelativeLayoutChanged\n\n if (\n this.options.layoutRoot ||\n this.resumeFrom ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (hasTargetChanged || !this.currentAnimation))\n ) {\n if (this.resumeFrom) {\n this.resumingFrom = this.resumeFrom\n this.resumingFrom.resumingFrom = undefined\n }\n\n const animationOptions = {\n ...getValueTransition(\n layoutTransition,\n \"layout\"\n ),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete,\n }\n\n if (\n visualElement.shouldReduceMotion ||\n this.options.layoutRoot\n ) {\n animationOptions.delay = 0\n animationOptions.type = false\n }\n\n this.startAnimation(animationOptions)\n /**\n * Set animation origin after starting animation to avoid layout jump\n * caused by stopping previous layout animation\n */\n this.setAnimationOrigin(\n delta,\n hasOnlyRelativeTargetChanged,\n (animationOptions as { path?: MotionPath })\n .path\n )\n } else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never committed to screen and look like a jumpy box.\n */\n\n if (!hasLayoutChanged) {\n finishAnimation(this)\n }\n\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete()\n }\n }\n\n this.targetLayout = newLayout\n }\n )\n }\n }\n\n unmount() {\n this.options.layoutId && this.willUpdate()\n this.root.nodes!.remove(this)\n const stack = this.getStack()\n stack && stack.remove(this)\n this.parent && this.parent.children.delete(this)\n this.instance = undefined\n this.eventHandlers.clear()\n\n cancelFrame(this.updateProjection)\n }\n\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true\n }\n\n unblockUpdate() {\n this.updateManuallyBlocked = false\n }\n\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize\n }\n\n isTreeAnimationBlocked() {\n return (\n this.isAnimationBlocked ||\n (this.parent && this.parent.isTreeAnimationBlocked()) ||\n false\n )\n }\n\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked()) return\n\n this.isUpdating = true\n\n this.nodes && this.nodes.forEach(resetSkewAndRotation)\n this.animationId++\n }\n\n getTransformTemplate() {\n const { visualElement } = this.options\n return visualElement && visualElement.getProps().transformTemplate\n }\n\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true\n\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete()\n return\n }\n\n /**\n * If we're running optimised appear animations then these must be\n * cancelled before measuring the DOM. This is so we can measure\n * the true layout of the element rather than the WAAPI animation\n * which will be unaffected by the resetSkewAndRotate step.\n *\n * Note: This is a DOM write. Worst case scenario is this is sandwiched\n * between other snapshot reads which will cause unnecessary style recalculations.\n * This has to happen here though, as we don't yet know which nodes will need\n * snapshots in startUpdate(), but we only want to cancel optimised animations\n * if a layout animation measurement is actually going to be affected by them.\n */\n if (\n window.MotionCancelOptimisedAnimation &&\n !this.hasCheckedOptimisedAppear\n ) {\n cancelTreeOptimisedTransformAnimations(this)\n }\n\n !this.root.isUpdating && this.root.startUpdate()\n\n if (this.isLayoutDirty) return\n\n this.isLayoutDirty = true\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i]\n node.shouldResetTransform = true\n\n /**\n * Percentage translates resolve against layoutBox dimensions,\n * so ancestors with them must be re-measured after transform reset.\n */\n if (\n typeof node.latestValues.x === \"string\" ||\n typeof node.latestValues.y === \"string\"\n ) {\n node.isLayoutDirty = true\n }\n\n node.updateScroll(\"snapshot\")\n\n if (node.options.layoutRoot) {\n node.willUpdate(false)\n }\n }\n\n const { layoutId, layout } = this.options\n if (layoutId === undefined && !layout) return\n\n const transformTemplate = this.getTransformTemplate()\n this.prevTransformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined\n\n this.updateSnapshot()\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\")\n }\n\n // Note: Currently only running on root node\n updateScheduled = false\n\n update() {\n this.updateScheduled = false\n\n const updateWasBlocked = this.isUpdateBlocked()\n\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n const wasBlockedByResize = this.updateBlockedByResize\n\n this.unblockUpdate()\n this.updateBlockedByResize = false\n this.clearAllSnapshots()\n\n /**\n * When blocked by resize, still measure layouts so\n * callbacks like onLayoutMeasure fire (e.g. Reorder).\n * Skip notifyLayoutUpdate to prevent animations.\n */\n if (wasBlockedByResize) {\n this.nodes!.forEach(forceLayoutMeasure)\n }\n\n this.nodes!.forEach(clearMeasurements)\n return\n }\n\n /**\n * If this is a repeat of didUpdate then ignore the animation.\n */\n if (this.animationId <= this.animationCommitId) {\n this.nodes!.forEach(clearIsLayoutDirty)\n return\n }\n\n this.animationCommitId = this.animationId\n\n if (!this.isUpdating) {\n this.nodes!.forEach(clearIsLayoutDirty)\n } else {\n this.isUpdating = false\n\n /**\n * Ensure animation-blocked nodes (e.g. during drag)\n * get measured even when memoized (willUpdate skipped).\n */\n this.nodes!.forEach(ensureDraggedNodesSnapshotted)\n\n /**\n * Write\n */\n this.nodes!.forEach(resetTransformStyle)\n\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes!.forEach(updateLayout)\n\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes!.forEach(notifyLayoutUpdate)\n }\n\n this.clearAllSnapshots()\n\n /**\n * Manually flush any pending updates. Ideally\n * we could leave this to the following requestAnimationFrame but this seems\n * to leave a flash of incorrectly styled content.\n */\n const now = time.now()\n frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp)\n frameData.timestamp = now\n frameData.isProcessing = true\n frameSteps.update.process(frameData)\n frameSteps.preRender.process(frameData)\n frameSteps.render.process(frameData)\n frameData.isProcessing = false\n }\n\n scheduleUpdate = () => this.update()\n\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true\n microtask.read(this.scheduleUpdate)\n }\n }\n\n clearAllSnapshots() {\n this.nodes!.forEach(clearSnapshot)\n this.sharedNodes.forEach(removeLeadSnapshots)\n }\n\n projectionUpdateScheduled = false\n scheduleUpdateProjection() {\n if (!this.projectionUpdateScheduled) {\n this.projectionUpdateScheduled = true\n frame.preRender(this.updateProjection, false, true)\n }\n }\n\n scheduleCheckAfterUnmount() {\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate()\n } else {\n this.root.checkUpdateFailed()\n }\n })\n }\n\n checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false\n this.clearAllSnapshots()\n }\n }\n\n /**\n * This is a multi-step process as shared nodes might be of different depths. Nodes\n * are sorted by depth order, so we need to resolve the entire tree before moving to\n * the next step.\n */\n updateProjection = () => {\n this.projectionUpdateScheduled = false\n\n /**\n * Reset debug counts. Manually resetting rather than creating a new\n * object each frame.\n */\n if (statsBuffer.value) {\n metrics.nodes =\n metrics.calculatedTargetDeltas =\n metrics.calculatedProjections =\n 0\n }\n\n this.nodes!.forEach(propagateDirtyNodes)\n this.nodes!.forEach(resolveTargetDelta)\n this.nodes!.forEach(calcProjection)\n this.nodes!.forEach(cleanDirtyNodes)\n\n if (statsBuffer.addProjectionMetrics) {\n statsBuffer.addProjectionMetrics(metrics)\n }\n }\n\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance) return\n\n this.snapshot = this.measure()\n\n if (\n this.snapshot &&\n !calcLength(this.snapshot.measuredBox.x) &&\n !calcLength(this.snapshot.measuredBox.y)\n ) {\n this.snapshot = undefined\n }\n }\n\n updateLayout() {\n if (!this.instance) return\n\n this.updateScroll()\n\n if (\n !(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty\n ) {\n return\n }\n\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i]\n node.updateScroll()\n }\n }\n\n const prevLayout = this.layout\n this.layout = this.measure(false)\n this.layoutVersion++\n if (!this.layoutCorrected) this.layoutCorrected = createBox()\n this.isLayoutDirty = false\n this.projectionDelta = undefined\n this.notifyListeners(\"measure\", this.layout.layoutBox)\n\n const { visualElement } = this.options\n visualElement &&\n visualElement.notify(\n \"LayoutMeasure\",\n this.layout.layoutBox,\n prevLayout ? prevLayout.layoutBox : undefined\n )\n }\n\n updateScroll(phase: Phase = \"measure\") {\n let needsMeasurement = Boolean(\n this.options.layoutScroll && this.instance\n )\n\n if (\n this.scroll &&\n this.scroll.animationId === this.root.animationId &&\n this.scroll.phase === phase\n ) {\n needsMeasurement = false\n }\n\n if (needsMeasurement && this.instance) {\n const isRoot = checkIsScrollRoot(this.instance)\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot,\n offset: measureScroll(this.instance),\n wasRoot: this.scroll ? this.scroll.isRoot : isRoot,\n }\n }\n }\n\n resetTransform() {\n if (!resetTransform) return\n\n const isResetRequested =\n this.isLayoutDirty ||\n this.shouldResetTransform ||\n this.options.alwaysMeasureLayout\n\n const hasProjection =\n this.projectionDelta && !isDeltaZero(this.projectionDelta)\n\n const transformTemplate = this.getTransformTemplate()\n const transformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined\n\n const transformTemplateHasChanged =\n transformTemplateValue !== this.prevTransformTemplateValue\n\n if (\n isResetRequested &&\n this.instance &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)\n ) {\n resetTransform(this.instance, transformTemplateValue)\n this.shouldResetTransform = false\n this.scheduleRender()\n }\n }\n\n measure(removeTransform = true) {\n const pageBox = this.measurePageBox()\n\n let layoutBox = this.removeElementScroll(pageBox)\n\n /**\n * Measurements taken during the pre-render stage\n * still have transforms applied so we remove them\n * via calculation.\n */\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox)\n }\n\n roundBox(layoutBox)\n\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id,\n }\n }\n\n measurePageBox() {\n const { visualElement } = this.options\n if (!visualElement) return createBox()\n\n const box = visualElement.measureViewportBox()\n\n const wasInScrollRoot =\n this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot)\n\n if (!wasInScrollRoot) {\n // Remove viewport scroll to give page-relative coordinates\n const { scroll } = this.root\n if (scroll) {\n translateAxis(box.x, scroll.offset.x)\n translateAxis(box.y, scroll.offset.y)\n }\n }\n\n return box\n }\n\n removeElementScroll(box: Box): Box {\n const boxWithoutScroll = createBox()\n copyBoxInto(boxWithoutScroll, box)\n\n if (this.scroll?.wasRoot) {\n return boxWithoutScroll\n }\n\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i]\n const { scroll, options } = node\n\n if (node !== this.root && scroll && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (scroll.wasRoot) {\n copyBoxInto(boxWithoutScroll, box)\n }\n\n translateAxis(boxWithoutScroll.x, scroll.offset.x)\n translateAxis(boxWithoutScroll.y, scroll.offset.y)\n }\n }\n\n return boxWithoutScroll\n }\n\n applyTransform(box: Box, transformOnly = false, output?: Box): Box {\n const withTransforms = output || createBox()\n copyBoxInto(withTransforms, box)\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i]\n\n if (\n !transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root\n ) {\n translateAxis(withTransforms.x, -node.scroll.offset.x)\n translateAxis(withTransforms.y, -node.scroll.offset.y)\n }\n\n if (!hasTransform(node.latestValues)) continue\n transformBox(\n withTransforms,\n node.latestValues,\n node.layout?.layoutBox\n )\n }\n\n if (hasTransform(this.latestValues)) {\n transformBox(\n withTransforms,\n this.latestValues,\n this.layout?.layoutBox\n )\n }\n\n return withTransforms\n }\n\n removeTransform(box: Box): Box {\n const boxWithoutTransform = createBox()\n copyBoxInto(boxWithoutTransform, box)\n\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i]\n if (!hasTransform(node.latestValues)) continue\n\n let sourceBox: Box | undefined\n\n if (node.instance) {\n hasScale(node.latestValues) && node.updateSnapshot()\n sourceBox = createBox()\n copyBoxInto(sourceBox, node.measurePageBox())\n }\n\n removeBoxTransforms(\n boxWithoutTransform,\n node.latestValues,\n node.snapshot?.layoutBox,\n sourceBox\n )\n }\n\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues)\n }\n\n return boxWithoutTransform\n }\n\n setTargetDelta(delta: Delta) {\n this.targetDelta = delta\n this.root.scheduleUpdateProjection()\n this.isProjectionDirty = true\n }\n\n setOptions(options: ProjectionNodeOptions) {\n this.options = {\n ...this.options,\n ...options,\n crossfade:\n options.crossfade !== undefined ? options.crossfade : true,\n }\n }\n\n clearMeasurements() {\n this.scroll = undefined\n this.layout = undefined\n this.snapshot = undefined\n this.prevTransformTemplateValue = undefined\n this.targetDelta = undefined\n this.target = undefined\n this.isLayoutDirty = false\n }\n\n forceRelativeParentToResolveTarget() {\n if (!this.relativeParent) return\n\n /**\n * If the parent target isn't up-to-date, force it to update.\n * This is an unfortunate de-optimisation as it means any updating relative\n * projection will cause all the relative parents to recalculate back\n * up the tree.\n */\n if (\n this.relativeParent.resolvedRelativeTargetAt !==\n frameData.timestamp\n ) {\n this.relativeParent.resolveTargetDelta(true)\n }\n }\n\n /**\n * Frame calculations\n */\n resolvedRelativeTargetAt: number = 0.0\n resolveTargetDelta(forceRecalculation = false) {\n /**\n * Once the dirty status of nodes has been spread through the tree, we also\n * need to check if we have a shared node of a different depth that has itself\n * been dirtied.\n */\n const lead = this.getLead()\n this.isProjectionDirty ||= lead.isProjectionDirty\n this.isTransformDirty ||= lead.isTransformDirty\n this.isSharedProjectionDirty ||= lead.isSharedProjectionDirty\n\n const isShared = Boolean(this.resumingFrom) || this !== lead\n\n /**\n * We don't use transform for this step of processing so we don't\n * need to check whether any nodes have changed transform.\n */\n const canSkip = !(\n forceRecalculation ||\n (isShared && this.isSharedProjectionDirty) ||\n this.isProjectionDirty ||\n this.parent?.isProjectionDirty ||\n this.attemptToResolveRelativeTarget ||\n this.root.updateBlockedByResize\n )\n\n if (canSkip) return\n\n const { layout, layoutId } = this.options\n\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId)) return\n\n this.resolvedRelativeTargetAt = frameData.timestamp\n\n const relativeParent = this.getClosestProjectingParent()\n\n if (\n relativeParent &&\n this.linkedParentVersion !== relativeParent.layoutVersion &&\n !relativeParent.options.layoutRoot\n ) {\n this.removeRelativeTarget()\n }\n\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n if (!this.targetDelta && !this.relativeTarget) {\n if (\n this.options.layoutAnchor !== false &&\n relativeParent &&\n relativeParent.layout\n ) {\n this.createRelativeTarget(\n relativeParent,\n this.layout.layoutBox,\n relativeParent.layout.layoutBox\n )\n } else {\n this.removeRelativeTarget()\n }\n }\n\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta) return\n\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox()\n this.targetWithTransforms = createBox()\n }\n\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (\n this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.relativeParent &&\n this.relativeParent.target\n ) {\n this.forceRelativeParentToResolveTarget()\n\n calcRelativeBox(\n this.target,\n this.relativeTarget,\n this.relativeParent.target,\n this.options.layoutAnchor || undefined\n )\n\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n } else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n this.applyTransform(\n this.layout.layoutBox,\n false,\n this.target\n )\n } else {\n copyBoxInto(this.target, this.layout.layoutBox)\n }\n\n applyBoxDelta(this.target, this.targetDelta)\n } else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.layoutBox)\n }\n\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false\n\n if (\n this.options.layoutAnchor !== false &&\n relativeParent &&\n Boolean(relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !relativeParent.options.layoutScroll &&\n relativeParent.target &&\n this.animationProgress !== 1\n ) {\n this.createRelativeTarget(\n relativeParent,\n this.target,\n relativeParent.target\n )\n } else {\n this.relativeParent = this.relativeTarget = undefined\n }\n }\n\n /**\n * Increase debug counter for resolved target deltas\n */\n if (statsBuffer.value) {\n metrics.calculatedTargetDeltas++\n }\n }\n\n getClosestProjectingParent() {\n if (\n !this.parent ||\n hasScale(this.parent.latestValues) ||\n has2DTranslate(this.parent.latestValues)\n ) {\n return undefined\n }\n\n if (this.parent.isProjecting()) {\n return this.parent\n } else {\n return this.parent.getClosestProjectingParent()\n }\n }\n\n isProjecting() {\n return Boolean(\n (this.relativeTarget ||\n this.targetDelta ||\n this.options.layoutRoot) &&\n this.layout\n )\n }\n\n linkedParentVersion: number = 0\n createRelativeTarget(\n relativeParent: IProjectionNode,\n layout: Box,\n parentLayout: Box\n ) {\n this.relativeParent = relativeParent\n this.linkedParentVersion = relativeParent.layoutVersion\n this.forceRelativeParentToResolveTarget()\n this.relativeTarget = createBox()\n this.relativeTargetOrigin = createBox()\n calcRelativePosition(\n this.relativeTargetOrigin,\n layout,\n parentLayout,\n this.options.layoutAnchor || undefined\n )\n\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin)\n }\n\n removeRelativeTarget() {\n this.relativeParent = this.relativeTarget = undefined\n }\n\n hasProjected: boolean = false\n\n calcProjection() {\n const lead = this.getLead()\n const isShared = Boolean(this.resumingFrom) || this !== lead\n\n let canSkip = true\n\n /**\n * If this is a normal layout animation and neither this node nor its nearest projecting\n * is dirty then we can't skip.\n */\n if (this.isProjectionDirty || this.parent?.isProjectionDirty) {\n canSkip = false\n }\n\n /**\n * If this is a shared layout animation and this node's shared projection is dirty then\n * we can't skip.\n */\n if (\n isShared &&\n (this.isSharedProjectionDirty || this.isTransformDirty)\n ) {\n canSkip = false\n }\n\n /**\n * If we have resolved the target this frame we must recalculate the\n * projection to ensure it visually represents the internal calculations.\n */\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false\n }\n\n if (canSkip) return\n\n const { layout, layoutId } = this.options\n\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean(\n (this.parent && this.parent.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation\n )\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined\n }\n\n if (!this.layout || !(layout || layoutId)) return\n\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.layoutBox)\n\n /**\n * Record previous tree scales before updating.\n */\n const prevTreeScaleX = this.treeScale.x\n const prevTreeScaleY = this.treeScale.y\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(\n this.layoutCorrected,\n this.treeScale,\n this.path,\n isShared\n )\n\n /**\n * If this layer needs to perform scale correction but doesn't have a target,\n * use the layout as the target.\n */\n if (\n lead.layout &&\n !lead.target &&\n (this.treeScale.x !== 1 || this.treeScale.y !== 1)\n ) {\n lead.target = lead.layout.layoutBox\n lead.targetWithTransforms = createBox()\n }\n\n const { target } = lead\n\n if (!target) {\n /**\n * If we don't have a target to project into, but we were previously\n * projecting, we want to remove the stored transform and schedule\n * a render to ensure the elements reflect the removed transform.\n */\n if (this.prevProjectionDelta) {\n this.createProjectionDeltas()\n this.scheduleRender()\n }\n\n return\n }\n\n if (!this.projectionDelta || !this.prevProjectionDelta) {\n this.createProjectionDeltas()\n } else {\n copyAxisDeltaInto(\n this.prevProjectionDelta.x,\n this.projectionDelta.x\n )\n copyAxisDeltaInto(\n this.prevProjectionDelta.y,\n this.projectionDelta.y\n )\n }\n\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(\n this.projectionDelta!,\n this.layoutCorrected,\n target,\n this.latestValues\n )\n\n if (\n this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY ||\n !axisDeltaEquals(\n this.projectionDelta!.x,\n this.prevProjectionDelta!.x\n ) ||\n !axisDeltaEquals(\n this.projectionDelta!.y,\n this.prevProjectionDelta!.y\n )\n ) {\n this.hasProjected = true\n this.scheduleRender()\n this.notifyListeners(\"projectionUpdate\", target)\n }\n\n /**\n * Increase debug counter for recalculated projections\n */\n if (statsBuffer.value) {\n metrics.calculatedProjections++\n }\n }\n\n isVisible = true\n hide() {\n this.isVisible = false\n // TODO: Schedule render\n }\n show() {\n this.isVisible = true\n // TODO: Schedule render\n }\n\n scheduleRender(notifyAll = true) {\n this.options.visualElement?.scheduleRender()\n if (notifyAll) {\n const stack = this.getStack()\n stack && stack.scheduleRender()\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined\n }\n }\n\n createProjectionDeltas() {\n this.prevProjectionDelta = createDelta()\n this.projectionDelta = createDelta()\n this.projectionDeltaWithTransform = createDelta()\n }\n\n /**\n * Animation\n */\n animationValues?: ResolvedValues\n pendingAnimation?: Process\n currentAnimation?: JSAnimation\n mixTargetDelta: (progress: number) => void\n animationProgress = 0\n\n setAnimationOrigin(\n delta: Delta,\n hasOnlyRelativeTargetChanged: boolean = false,\n pathFn?: MotionPath\n ) {\n const snapshot = this.snapshot\n const snapshotLatestValues = snapshot ? snapshot.latestValues : {}\n const mixedValues = { ...this.latestValues }\n\n const targetDelta = createDelta()\n if (\n !this.relativeParent ||\n !this.relativeParent.options.layoutRoot\n ) {\n this.relativeTarget = this.relativeTargetOrigin = undefined\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged\n\n const relativeLayout = createBox()\n\n const snapshotSource = snapshot ? snapshot.source : undefined\n const layoutSource = this.layout ? this.layout.source : undefined\n const isSharedLayoutAnimation = snapshotSource !== layoutSource\n const stack = this.getStack()\n const isOnlyMember = !stack || stack.members.length <= 1\n const shouldCrossfadeOpacity = Boolean(\n isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade)\n )\n\n this.animationProgress = 0\n\n let prevRelativeTarget: Box\n\n // The path decides whether the layout shift is worth curving\n // (distance floor) and resolves the interpolator from the delta.\n const interpolate: PathInterpolator | undefined =\n pathFn?.interpolateProjection(delta)\n\n this.mixTargetDelta = (latest: number) => {\n const progress = latest / 1000\n const point = interpolate?.(progress)\n\n if (point) {\n targetDelta.x.translate = point.x\n targetDelta.x.scale = mixNumber(delta.x.scale, 1, progress)\n targetDelta.x.origin = delta.x.origin\n targetDelta.x.originPoint = delta.x.originPoint\n targetDelta.y.translate = point.y\n targetDelta.y.scale = mixNumber(delta.y.scale, 1, progress)\n targetDelta.y.origin = delta.y.origin\n targetDelta.y.originPoint = delta.y.originPoint\n } else {\n mixAxisDeltaLinear(targetDelta.x, delta.x, progress)\n mixAxisDeltaLinear(targetDelta.y, delta.y, progress)\n }\n\n this.setTargetDelta(targetDelta)\n\n if (\n this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.layout &&\n this.relativeParent &&\n this.relativeParent.layout\n ) {\n calcRelativePosition(\n relativeLayout,\n this.layout.layoutBox,\n this.relativeParent.layout.layoutBox,\n this.options.layoutAnchor || undefined\n )\n mixBox(\n this.relativeTarget,\n this.relativeTargetOrigin,\n relativeLayout,\n progress\n )\n\n /**\n * If this is an unchanged relative target we can consider the\n * projection not dirty.\n */\n if (\n prevRelativeTarget &&\n boxEquals(this.relativeTarget, prevRelativeTarget)\n ) {\n this.isProjectionDirty = false\n }\n\n if (!prevRelativeTarget) prevRelativeTarget = createBox()\n copyBoxInto(prevRelativeTarget, this.relativeTarget)\n }\n\n if (isSharedLayoutAnimation) {\n this.animationValues = mixedValues\n\n mixValues(\n mixedValues,\n snapshotLatestValues,\n this.latestValues,\n progress,\n shouldCrossfadeOpacity,\n isOnlyMember\n )\n }\n\n if (point && point.rotate !== undefined) {\n // Dedicated `pathRotation` channel, not `rotate`, so an\n // animating `rotate` is composed with, never clobbered.\n if (!this.animationValues)\n this.animationValues = mixedValues\n this.animationValues.pathRotation = point.rotate\n }\n\n this.root.scheduleUpdateProjection()\n this.scheduleRender()\n\n this.animationProgress = progress\n }\n\n this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0)\n }\n\n motionValue?: MotionValue\n startAnimation(options: ValueAnimationOptions) {\n this.notifyListeners(\"animationStart\")\n\n this.currentAnimation?.stop()\n this.resumingFrom?.currentAnimation?.stop()\n\n if (this.pendingAnimation) {\n cancelFrame(this.pendingAnimation)\n this.pendingAnimation = undefined\n }\n\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true\n\n activeAnimations.layout++\n this.motionValue ||= motionValue(0)\n this.motionValue.jump(0, false)\n\n this.currentAnimation = animateSingleValue(\n this.motionValue,\n [0, 1000],\n {\n ...(options as any),\n velocity: 0,\n isSync: true,\n onUpdate: (latest: number) => {\n this.mixTargetDelta(latest)\n options.onUpdate && options.onUpdate(latest)\n },\n onStop: () => {\n activeAnimations.layout--\n },\n onComplete: () => {\n activeAnimations.layout--\n options.onComplete && options.onComplete()\n this.completeAnimation()\n },\n }\n ) as JSAnimation\n\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation\n }\n\n this.pendingAnimation = undefined\n })\n }\n\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined\n this.resumingFrom.preserveOpacity = undefined\n }\n\n const stack = this.getStack()\n stack && stack.exitAnimationComplete()\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined\n\n this.notifyListeners(\"animationComplete\")\n }\n\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget)\n this.currentAnimation.stop()\n }\n\n this.completeAnimation()\n }\n\n applyTransformsToTarget() {\n const lead = this.getLead()\n let { targetWithTransforms, target, layout, latestValues } = lead\n\n if (!targetWithTransforms || !target || !layout) return\n\n /**\n * If we're only animating position, and this element isn't the lead element,\n * then instead of projecting into the lead box we instead want to calculate\n * a new target that aligns the two boxes but maintains the layout shape.\n */\n if (\n this !== lead &&\n this.layout &&\n layout &&\n shouldAnimatePositionOnly(\n this.options.animationType,\n this.layout.layoutBox,\n layout.layoutBox\n )\n ) {\n target = this.target || createBox()\n\n const xLength = calcLength(this.layout!.layoutBox.x)\n target!.x.min = lead.target!.x.min\n target!.x.max = target.x.min + xLength\n\n const yLength = calcLength(this.layout!.layoutBox.y)\n target!.y.min = lead.target!.y.min\n target!.y.max = target.y.min + yLength\n }\n\n copyBoxInto(targetWithTransforms, target)\n\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues)\n\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its layout layout\n * into the desired bounding box.\n */\n calcBoxDelta(\n this.projectionDeltaWithTransform!,\n this.layoutCorrected,\n targetWithTransforms!,\n latestValues\n )\n }\n\n /**\n * Shared layout\n */\n // TODO Only running on root node\n sharedNodes: Map = new Map()\n registerSharedNode(layoutId: string, node: IProjectionNode) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack())\n }\n\n const stack = this.sharedNodes.get(layoutId)!\n stack.add(node)\n\n const config = node.options.initialPromotionConfig\n node.promote({\n transition: config ? config.transition : undefined,\n preserveFollowOpacity:\n config && config.shouldPreserveFollowOpacity\n ? config.shouldPreserveFollowOpacity(node)\n : undefined,\n })\n }\n\n isLead(): boolean {\n const stack = this.getStack()\n return stack ? stack.lead === this : true\n }\n\n getLead() {\n const { layoutId } = this.options\n return layoutId ? this.getStack()?.lead || this : this\n }\n\n getPrevLead() {\n const { layoutId } = this.options\n return layoutId ? this.getStack()?.prevLead : undefined\n }\n\n getStack() {\n const { layoutId } = this.options\n if (layoutId) return this.root.sharedNodes.get(layoutId)\n }\n\n promote({\n needsReset,\n transition,\n preserveFollowOpacity,\n }: {\n needsReset?: boolean\n transition?: Transition\n preserveFollowOpacity?: boolean\n } = {}) {\n const stack = this.getStack()\n if (stack) stack.promote(this, preserveFollowOpacity)\n\n if (needsReset) {\n this.projectionDelta = undefined\n this.needsReset = true\n }\n if (transition) this.setOptions({ transition })\n }\n\n relegate(): boolean {\n const stack = this.getStack()\n if (stack) {\n return stack.relegate(this)\n } else {\n return false\n }\n }\n\n resetSkewAndRotation() {\n const { visualElement } = this.options\n\n if (!visualElement) return\n\n // If there's no detected skew or rotation values, we can early return without a forced render.\n let hasDistortingTransform = false\n\n /**\n * An unrolled check for rotation values. Most elements don't have any rotation and\n * skipping the nested loop and new object creation is 50% faster.\n */\n const { latestValues } = visualElement\n if (\n latestValues.z ||\n latestValues.rotate ||\n latestValues.rotateX ||\n latestValues.rotateY ||\n latestValues.rotateZ ||\n latestValues.skewX ||\n latestValues.skewY\n ) {\n hasDistortingTransform = true\n }\n\n // If there's no distorting values, we don't need to do any more.\n if (!hasDistortingTransform) return\n\n const resetValues: ResolvedValues = {}\n\n if (latestValues.z) {\n resetDistortingTransform(\n \"z\",\n visualElement,\n resetValues,\n this.animationValues\n )\n }\n\n // Check the skew and rotate value of all axes and reset to 0\n for (let i = 0; i < transformAxes.length; i++) {\n resetDistortingTransform(\n `rotate${transformAxes[i]}`,\n visualElement,\n resetValues,\n this.animationValues\n )\n resetDistortingTransform(\n `skew${transformAxes[i]}`,\n visualElement,\n resetValues,\n this.animationValues\n )\n }\n\n // Force a render of this element to apply the transform with all skews and rotations\n // set to 0.\n visualElement.render()\n\n // Put back all the values we reset\n for (const key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key])\n if (this.animationValues) {\n this.animationValues[key] = resetValues[key]\n }\n }\n\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender()\n }\n\n applyProjectionStyles(\n targetStyle: any, // CSSStyleDeclaration - doesn't allow numbers to be assigned to properties\n styleProp?: MotionStyle\n ) {\n if (!this.instance || this.isSVG) return\n\n if (!this.isVisible) {\n targetStyle.visibility = \"hidden\"\n return\n }\n\n const transformTemplate = this.getTransformTemplate()\n\n if (this.needsReset) {\n this.needsReset = false\n\n targetStyle.visibility = \"\"\n targetStyle.opacity = \"\"\n targetStyle.pointerEvents =\n resolveMotionValue(styleProp?.pointerEvents) || \"\"\n targetStyle.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\"\n return\n }\n\n const lead = this.getLead()\n if (!this.projectionDelta || !this.layout || !lead.target) {\n if (this.options.layoutId) {\n targetStyle.opacity =\n this.latestValues.opacity !== undefined\n ? this.latestValues.opacity\n : 1\n targetStyle.pointerEvents =\n resolveMotionValue(styleProp?.pointerEvents) || \"\"\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n targetStyle.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\"\n this.hasProjected = false\n }\n\n return\n }\n\n targetStyle.visibility = \"\"\n\n const valuesToRender = lead.animationValues || lead.latestValues\n this.applyTransformsToTarget()\n\n let transform = buildProjectionTransform(\n this.projectionDeltaWithTransform!,\n this.treeScale,\n valuesToRender\n )\n\n if (transformTemplate) {\n transform = transformTemplate(valuesToRender, transform)\n }\n\n targetStyle.transform = transform\n\n const { x, y } = this.projectionDelta\n targetStyle.transformOrigin = `${x.origin * 100}% ${\n y.origin * 100\n }% 0`\n\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n targetStyle.opacity =\n lead === this\n ? valuesToRender.opacity ??\n this.latestValues.opacity ??\n 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit\n } else {\n /**\n * Or we're not animating at all, set the lead component to its layout\n * opacity and other components to hidden.\n */\n targetStyle.opacity =\n lead === this\n ? valuesToRender.opacity !== undefined\n ? valuesToRender.opacity\n : \"\"\n : valuesToRender.opacityExit !== undefined\n ? valuesToRender.opacityExit\n : 0\n }\n\n /**\n * Apply scale correction\n */\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === undefined) continue\n\n const { correct, applyTo, isCSSVariable } = scaleCorrectors[key]\n\n /**\n * Only apply scale correction to the value if we have an\n * active projection transform. Otherwise these values become\n * vulnerable to distortion if the element changes size without\n * a corresponding layout animation.\n */\n const corrected =\n transform === \"none\"\n ? valuesToRender[key]\n : correct(valuesToRender[key], lead)\n\n if (applyTo) {\n const num = applyTo.length\n for (let i = 0; i < num; i++) {\n targetStyle[applyTo[i] as any] = corrected\n }\n } else {\n // If this is a CSS variable, set it directly on the instance.\n // Replacing this function from creating styles to setting them\n // would be a good place to remove per frame object creation\n if (isCSSVariable) {\n ;(\n this.options.visualElement as HTMLVisualElement\n ).renderState.vars[key] = corrected\n } else {\n targetStyle[key as any] = corrected\n }\n }\n }\n\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n targetStyle.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp?.pointerEvents) || \"\"\n : \"none\"\n }\n }\n\n clearSnapshot() {\n this.resumeFrom = this.snapshot = undefined\n }\n\n // Only run on root\n resetTree() {\n this.root.nodes!.forEach((node: IProjectionNode) =>\n node.currentAnimation?.stop()\n )\n this.root.nodes!.forEach(clearMeasurements)\n this.root.sharedNodes.clear()\n }\n }\n}\n\nfunction updateLayout(node: IProjectionNode) {\n node.updateLayout()\n}\n\nfunction notifyLayoutUpdate(node: IProjectionNode) {\n const snapshot = node.resumeFrom?.snapshot || node.snapshot\n\n if (\n node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")\n ) {\n const { layoutBox: layout, measuredBox: measuredLayout } = node.layout\n const { animationType } = node.options\n\n const isShared = snapshot.source !== node.layout.source\n\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis]\n const length = calcLength(axisSnapshot)\n axisSnapshot.min = layout[axis].min\n axisSnapshot.max = axisSnapshot.min + length\n })\n } else if (animationType === \"x\" || animationType === \"y\") {\n const snapAxis = animationType === \"x\" ? \"y\" : \"x\"\n copyAxisInto(\n isShared\n ? snapshot.measuredBox[snapAxis]\n : snapshot.layoutBox[snapAxis],\n layout[snapAxis]\n )\n } else if (\n shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)\n ) {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis]\n const length = calcLength(layout[axis])\n axisSnapshot.max = axisSnapshot.min + length\n\n /**\n * Ensure relative target gets resized and rerendererd\n */\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true\n node.relativeTarget[axis].max =\n node.relativeTarget[axis].min + length\n }\n })\n }\n\n const layoutDelta = createDelta()\n\n calcBoxDelta(layoutDelta, layout, snapshot.layoutBox)\n const visualDelta = createDelta()\n if (isShared) {\n calcBoxDelta(\n visualDelta,\n node.applyTransform(measuredLayout, true),\n snapshot.measuredBox\n )\n } else {\n calcBoxDelta(visualDelta, layout, snapshot.layoutBox)\n }\n\n const hasLayoutChanged = !isDeltaZero(layoutDelta)\n let hasRelativeLayoutChanged = false\n\n if (!node.resumeFrom) {\n const relativeParent = node.getClosestProjectingParent()\n\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } =\n relativeParent\n\n if (parentSnapshot && parentLayout) {\n const anchor =\n node.options.layoutAnchor || undefined\n\n const relativeSnapshot = createBox()\n calcRelativePosition(\n relativeSnapshot,\n snapshot.layoutBox,\n parentSnapshot.layoutBox,\n anchor\n )\n\n const relativeLayout = createBox()\n calcRelativePosition(\n relativeLayout,\n layout,\n parentLayout.layoutBox,\n anchor\n )\n\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeLayoutChanged = true\n }\n\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout\n node.relativeTargetOrigin = relativeSnapshot\n node.relativeParent = relativeParent\n }\n }\n }\n }\n\n node.notifyListeners(\"didUpdate\", {\n layout,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeLayoutChanged,\n })\n } else if (node.isLead()) {\n const { onExitComplete } = node.options\n onExitComplete && onExitComplete()\n }\n\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined\n}\n\nexport function propagateDirtyNodes(node: IProjectionNode) {\n /**\n * Increase debug counter for nodes encountered this frame\n */\n if (statsBuffer.value) {\n metrics.nodes++\n }\n\n if (!node.parent) return\n\n /**\n * If this node isn't projecting, propagate isProjectionDirty. It will have\n * no performance impact but it will allow the next child that *is* projecting\n * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n * correcting.\n */\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty\n }\n\n /**\n * Propagate isSharedProjectionDirty and isTransformDirty\n * throughout the whole tree. A future revision can take another look at\n * this but for safety we still recalcualte shared nodes.\n */\n node.isSharedProjectionDirty ||= Boolean(\n node.isProjectionDirty ||\n node.parent.isProjectionDirty ||\n node.parent.isSharedProjectionDirty\n )\n\n node.isTransformDirty ||= node.parent.isTransformDirty\n}\n\nexport function cleanDirtyNodes(node: IProjectionNode) {\n node.isProjectionDirty =\n node.isSharedProjectionDirty =\n node.isTransformDirty =\n false\n}\n\nfunction clearSnapshot(node: IProjectionNode) {\n node.clearSnapshot()\n}\n\nfunction clearMeasurements(node: IProjectionNode) {\n node.clearMeasurements()\n}\n\nfunction forceLayoutMeasure(node: IProjectionNode) {\n node.isLayoutDirty = true\n node.updateLayout()\n}\n\nfunction clearIsLayoutDirty(node: IProjectionNode) {\n node.isLayoutDirty = false\n}\n\n/**\n * When a node is animation-blocked (e.g. during drag) and its component\n * didn't re-render (memoized), willUpdate() is never called so there's\n * no snapshot. Use the previous layout as a snapshot and mark dirty so\n * resetTransform/updateLayout/notifyLayoutUpdate process it normally.\n */\nfunction ensureDraggedNodesSnapshotted(node: IProjectionNode) {\n if (node.isAnimationBlocked && node.layout && !node.isLayoutDirty) {\n node.snapshot = node.layout\n node.isLayoutDirty = true\n }\n}\n\nfunction resetTransformStyle(node: IProjectionNode) {\n const { visualElement } = node.options\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\")\n }\n\n node.resetTransform()\n}\n\nfunction finishAnimation(node: IProjectionNode) {\n node.finishAnimation()\n node.targetDelta = node.relativeTarget = node.target = undefined\n node.isProjectionDirty = true\n}\n\nfunction resolveTargetDelta(node: IProjectionNode) {\n node.resolveTargetDelta()\n}\n\nfunction calcProjection(node: IProjectionNode) {\n node.calcProjection()\n}\n\nfunction resetSkewAndRotation(node: IProjectionNode) {\n node.resetSkewAndRotation()\n}\n\nfunction removeLeadSnapshots(stack: NodeStack) {\n stack.removeLeadSnapshot()\n}\n\nfunction mixAxisDeltaLinear(output: AxisDelta, delta: AxisDelta, p: number) {\n output.translate = mixNumber(delta.translate, 0, p)\n output.scale = mixNumber(delta.scale, 1, p)\n output.origin = delta.origin\n output.originPoint = delta.originPoint\n}\n\nexport function mixAxis(output: Axis, from: Axis, to: Axis, p: number) {\n output.min = mixNumber(from.min, to.min, p)\n output.max = mixNumber(from.max, to.max, p)\n}\n\nexport function mixBox(output: Box, from: Box, to: Box, p: number) {\n mixAxis(output.x, from.x, to.x, p)\n mixAxis(output.y, from.y, to.y, p)\n}\n\nfunction hasOpacityCrossfade(node: IProjectionNode) {\n return (\n node.animationValues && node.animationValues.opacityExit !== undefined\n )\n}\n\nconst defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n}\n\nconst userAgentContains = (string: string) =>\n typeof navigator !== \"undefined\" &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().includes(string)\n\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint =\n userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n ? Math.round\n : noop\n\nfunction roundAxis(axis: Axis): void {\n // Round to the nearest .5 pixels to support subpixel layouts\n axis.min = roundPoint(axis.min)\n axis.max = roundPoint(axis.max)\n}\n\nfunction roundBox(box: Box): void {\n roundAxis(box.x)\n roundAxis(box.y)\n}\n\nfunction shouldAnimatePositionOnly(\n animationType: string | undefined,\n snapshot: Box,\n layout: Box\n) {\n return (\n animationType === \"position\" ||\n (animationType === \"preserve-aspect\" &&\n !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2))\n )\n}\n\nfunction checkNodeWasScrollRoot(node: IProjectionNode) {\n return node !== node.root && node.scroll?.wasRoot\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A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AC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;AAErE;AAEA,SAAS,sBAAsB,CAAC,IAAqB,EAAA;IACjD,OAAO,IAAI,KAAK,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;AACrD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/group.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/group.mjs deleted file mode 100644 index ad789a50..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/group.mjs +++ /dev/null @@ -1,25 +0,0 @@ -const notify = (node) => !node.isLayoutDirty && node.willUpdate(false); -function nodeGroup() { - const nodes = new Set(); - const subscriptions = new WeakMap(); - const dirtyAll = () => nodes.forEach(notify); - return { - add: (node) => { - nodes.add(node); - subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll)); - }, - remove: (node) => { - nodes.delete(node); - const unsubscribe = subscriptions.get(node); - if (unsubscribe) { - unsubscribe(); - subscriptions.delete(node); - } - dirtyAll(); - }, - dirty: dirtyAll, - }; -} - -export { nodeGroup }; -//# sourceMappingURL=group.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/group.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/group.mjs.map deleted file mode 100644 index 11aadc93..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/group.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"group.mjs","sources":["../../../../src/projection/node/group.ts"],"sourcesContent":["import { IProjectionNode } from \"./types\"\n\nconst notify = (node: IProjectionNode) =>\n !node.isLayoutDirty && node.willUpdate(false)\n\nexport interface NodeGroup {\n add: (node: IProjectionNode) => void\n remove: (node: IProjectionNode) => void\n dirty: VoidFunction\n}\n\nexport function nodeGroup(): NodeGroup {\n const nodes = new Set()\n const subscriptions = new WeakMap void>()\n\n const dirtyAll = () => nodes.forEach(notify)\n\n return {\n add: (node) => {\n nodes.add(node)\n subscriptions.set(\n node,\n node.addEventListener(\"willUpdate\", dirtyAll)\n )\n },\n remove: (node) => {\n nodes.delete(node)\n const unsubscribe = subscriptions.get(node)\n if (unsubscribe) {\n unsubscribe()\n subscriptions.delete(node)\n }\n dirtyAll()\n },\n dirty: dirtyAll,\n }\n}\n"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,CAAC,IAAqB,KACjC,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;SAQjC,SAAS,GAAA;AACrB,IAAA,MAAM,KAAK,GAAG,IAAI,GAAG,EAAmB;AACxC,IAAA,MAAM,aAAa,GAAG,IAAI,OAAO,EAA+B;IAEhE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;IAE5C,OAAO;AACH,QAAA,GAAG,EAAE,CAAC,IAAI,KAAI;AACV,YAAA,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;AACf,YAAA,aAAa,CAAC,GAAG,CACb,IAAI,EACJ,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAChD;QACL,CAAC;AACD,QAAA,MAAM,EAAE,CAAC,IAAI,KAAI;AACb,YAAA,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;YAClB,MAAM,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC;YAC3C,IAAI,WAAW,EAAE;AACb,gBAAA,WAAW,EAAE;AACb,gBAAA,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC;YAC9B;AACA,YAAA,QAAQ,EAAE;QACd,CAAC;AACD,QAAA,KAAK,EAAE,QAAQ;KAClB;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/state.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/state.mjs deleted file mode 100644 index 5ad856c0..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/state.mjs +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This should only ever be modified on the client otherwise it'll - * persist through server requests. If we need instanced states we - * could lazy-init via root. - */ -const globalProjectionState = { - /** - * Global flag as to whether the tree has animated since the last time - * we resized the window - */ - hasAnimatedSinceResize: true, - /** - * We set this to true once, on the first update. Any nodes added to the tree beyond that - * update will be given a `data-projection-id` attribute. - */ - hasEverUpdated: false, -}; - -export { globalProjectionState }; -//# sourceMappingURL=state.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/state.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/state.mjs.map deleted file mode 100644 index 1597f765..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/node/state.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"state.mjs","sources":["../../../../src/projection/node/state.ts"],"sourcesContent":["/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nexport const globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n}\n"],"names":[],"mappings":"AAAA;;;;AAIG;AACI,MAAM,qBAAqB,GAAG;AACjC;;;AAGG;AACH,IAAA,sBAAsB,EAAE,IAAI;AAE5B;;;AAGG;AACH,IAAA,cAAc,EAAE,KAAK;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/shared/stack.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/shared/stack.mjs deleted file mode 100644 index 3dd23ec9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/shared/stack.mjs +++ /dev/null @@ -1,85 +0,0 @@ -import { addUniqueItem, removeItem } from 'motion-utils'; - -class NodeStack { - constructor() { - this.members = []; - } - add(node) { - addUniqueItem(this.members, node); - for (let i = this.members.length - 1; i >= 0; i--) { - const member = this.members[i]; - if (member === node || member === this.lead || member === this.prevLead) - continue; - const inst = member.instance; - if ((!inst || inst.isConnected === false) && !member.snapshot) { - removeItem(this.members, member); - member.unmount(); - } - } - node.scheduleRender(); - } - remove(node) { - removeItem(this.members, node); - if (node === this.prevLead) - this.prevLead = undefined; - if (node === this.lead) { - const prevLead = this.members[this.members.length - 1]; - if (prevLead) - this.promote(prevLead); - } - } - relegate(node) { - for (let i = this.members.indexOf(node) - 1; i >= 0; i--) { - const member = this.members[i]; - if (member.isPresent !== false && member.instance?.isConnected !== false) { - this.promote(member); - return true; - } - } - return false; - } - promote(node, preserveFollowOpacity) { - const prevLead = this.lead; - if (node === prevLead) - return; - this.prevLead = prevLead; - this.lead = node; - node.show(); - if (prevLead) { - prevLead.updateSnapshot(); - node.scheduleRender(); - const { layoutDependency: prevDep } = prevLead.options; - const { layoutDependency: nextDep } = node.options; - if (prevDep === undefined || prevDep !== nextDep) { - node.resumeFrom = prevLead; - if (preserveFollowOpacity) - prevLead.preserveOpacity = true; - if (prevLead.snapshot) { - node.snapshot = prevLead.snapshot; - node.snapshot.latestValues = - prevLead.animationValues || prevLead.latestValues; - } - if (node.root?.isUpdating) - node.isLayoutDirty = true; - } - if (node.options.crossfade === false) - prevLead.hide(); - } - } - exitAnimationComplete() { - this.members.forEach((member) => { - member.options.onExitComplete?.(); - member.resumingFrom?.options.onExitComplete?.(); - }); - } - scheduleRender() { - this.members.forEach((member) => member.instance && member.scheduleRender(false)); - } - removeLeadSnapshot() { - if (this.lead?.snapshot) - this.lead.snapshot = undefined; - } -} - -export { NodeStack }; -//# sourceMappingURL=stack.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.map deleted file mode 100644 index c1b74700..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stack.mjs","sources":["../../../../src/projection/shared/stack.ts"],"sourcesContent":["import { addUniqueItem, removeItem } from \"motion-utils\"\nimport type { IProjectionNode } from \"../node/types\"\n\nexport class NodeStack {\n lead?: IProjectionNode\n prevLead?: IProjectionNode\n members: IProjectionNode[] = []\n\n add(node: IProjectionNode) {\n addUniqueItem(this.members, node)\n\n for (let i = this.members.length - 1; i >= 0; i--) {\n const member = this.members[i]\n if (member === node || member === this.lead || member === this.prevLead) continue\n const inst = member.instance as HTMLElement | undefined\n if ((!inst || inst.isConnected === false) && !member.snapshot) {\n removeItem(this.members, member)\n member.unmount()\n }\n }\n\n node.scheduleRender()\n }\n\n remove(node: IProjectionNode) {\n removeItem(this.members, node)\n if (node === this.prevLead) this.prevLead = undefined\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1]\n if (prevLead) this.promote(prevLead)\n }\n }\n\n relegate(node: IProjectionNode) {\n for (let i = this.members.indexOf(node) - 1; i >= 0; i--) {\n const member = this.members[i]\n if (member.isPresent !== false && (member.instance as HTMLElement)?.isConnected !== false) {\n this.promote(member)\n return true\n }\n }\n return false\n }\n\n promote(node: IProjectionNode, preserveFollowOpacity?: boolean) {\n const prevLead = this.lead\n if (node === prevLead) return\n\n this.prevLead = prevLead\n this.lead = node\n node.show()\n\n if (prevLead) {\n prevLead.updateSnapshot()\n node.scheduleRender()\n\n const { layoutDependency: prevDep } = prevLead.options\n const { layoutDependency: nextDep } = node.options\n\n if (prevDep === undefined || prevDep !== nextDep) {\n node.resumeFrom = prevLead\n if (preserveFollowOpacity) prevLead.preserveOpacity = true\n\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues\n }\n\n if (node.root?.isUpdating) node.isLayoutDirty = true\n }\n if (node.options.crossfade === false) prevLead.hide()\n }\n }\n\n exitAnimationComplete() {\n this.members.forEach((member) => {\n member.options.onExitComplete?.()\n member.resumingFrom?.options.onExitComplete?.()\n })\n }\n\n scheduleRender() {\n this.members.forEach(\n (member) => member.instance && member.scheduleRender(false)\n )\n }\n\n removeLeadSnapshot() {\n if (this.lead?.snapshot) this.lead.snapshot = undefined\n }\n}\n"],"names":[],"mappings":";;MAGa,SAAS,CAAA;AAAtB,IAAA,WAAA,GAAA;QAGI,IAAA,CAAA,OAAO,GAAsB,EAAE;IAqFnC;AAnFI,IAAA,GAAG,CAAC,IAAqB,EAAA;AACrB,QAAA,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;AAEjC,QAAA,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;AAC9B,YAAA,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI,CAAC,IAAI,IAAI,MAAM,KAAK,IAAI,CAAC,QAAQ;gBAAE;AACzE,YAAA,MAAM,IAAI,GAAG,MAAM,CAAC,QAAmC;AACvD,YAAA,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;AAC3D,gBAAA,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;gBAChC,MAAM,CAAC,OAAO,EAAE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C,IAAI,CAAC,QAAQ,GAAG,SAAS;IAC3D;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs deleted file mode 100644 index 769cd506..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs +++ /dev/null @@ -1,42 +0,0 @@ -import { px } from '../../value/types/numbers/units.mjs'; - -function pixelsToPercent(pixels, axis) { - if (axis.max === axis.min) - return 0; - return (pixels / (axis.max - axis.min)) * 100; -} -/** - * We always correct borderRadius as a percentage rather than pixels to reduce paints. - * For example, if you are projecting a box that is 100px wide with a 10px borderRadius - * into a box that is 200px wide with a 20px borderRadius, that is actually a 10% - * borderRadius in both states. If we animate between the two in pixels that will trigger - * a paint each time. If we animate between the two in percentage we'll avoid a paint. - */ -const correctBorderRadius = { - correct: (latest, node) => { - if (!node.target) - return latest; - /** - * If latest is a string, if it's a percentage we can return immediately as it's - * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number. - */ - if (typeof latest === "string") { - if (px.test(latest)) { - latest = parseFloat(latest); - } - else { - return latest; - } - } - /** - * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that - * pixel value as a percentage of each axis - */ - const x = pixelsToPercent(latest, node.target.x); - const y = pixelsToPercent(latest, node.target.y); - return `${x}% ${y}%`; - }, -}; - -export { correctBorderRadius, pixelsToPercent }; -//# sourceMappingURL=scale-border-radius.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.map deleted file mode 100644 index 4e1f2206..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scale-border-radius.mjs","sources":["../../../../src/projection/styles/scale-border-radius.ts"],"sourcesContent":["import { px } from \"../../value/types/numbers/units\"\nimport type { Axis } from \"motion-utils\"\nimport type { ScaleCorrectorDefinition } from \"./types\"\n\nexport function pixelsToPercent(pixels: number, axis: Axis): number {\n if (axis.max === axis.min) return 0\n return (pixels / (axis.max - axis.min)) * 100\n}\n\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nexport const correctBorderRadius: ScaleCorrectorDefinition = {\n correct: (latest, node) => {\n if (!node.target) return latest\n\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest)\n } else {\n return latest\n }\n }\n\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x)\n const y = pixelsToPercent(latest, node.target.y)\n\n return `${x}% ${y}%`\n },\n}\n"],"names":[],"mappings":";;AAIM,SAAU,eAAe,CAAC,MAAc,EAAE,IAAU,EAAA;AACtD,IAAA,IAAI,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG;AAAE,QAAA,OAAO,CAAC;AACnC,IAAA,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG;AACjD;AAEA;;;;;;AAMG;AACI,MAAM,mBAAmB,GAA6B;AACzD,IAAA,OAAO,EAAE,CAAC,MAAM,EAAE,IAAI,KAAI;QACtB,IAAI,CAAC,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,MAAM;AAE/B;;;AAGG;AACH,QAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AAC5B,YAAA,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACjB,gBAAA,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;YAC/B;iBAAO;AACH,gBAAA,OAAO,MAAM;YACjB;QACJ;AAEA;;;AAGG;AACH,QAAA,MAAM,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAChD,QAAA,MAAM,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAEhD,QAAA,OAAO,CAAA,EAAG,CAAC,CAAA,EAAA,EAAK,CAAC,GAAG;IACxB,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs deleted file mode 100644 index 8d6464f4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import { complex } from '../../value/types/complex/index.mjs'; -import { mixNumber } from '../../utils/mix/number.mjs'; - -const correctBoxShadow = { - correct: (latest, { treeScale, projectionDelta }) => { - const original = latest; - const shadow = complex.parse(latest); - // TODO: Doesn't support multiple shadows - if (shadow.length > 5) - return original; - const template = complex.createTransformer(latest); - const offset = typeof shadow[0] !== "number" ? 1 : 0; - // Calculate the overall context scale - const xScale = projectionDelta.x.scale * treeScale.x; - const yScale = projectionDelta.y.scale * treeScale.y; - shadow[0 + offset] /= xScale; - shadow[1 + offset] /= yScale; - /** - * Ideally we'd correct x and y scales individually, but because blur and - * spread apply to both we have to take a scale average and apply that instead. - * We could potentially improve the outcome of this by incorporating the ratio between - * the two scales. - */ - const averageScale = mixNumber(xScale, yScale, 0.5); - // Blur - if (typeof shadow[2 + offset] === "number") - shadow[2 + offset] /= averageScale; - // Spread - if (typeof shadow[3 + offset] === "number") - shadow[3 + offset] /= averageScale; - return template(shadow); - }, -}; - -export { correctBoxShadow }; -//# sourceMappingURL=scale-box-shadow.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.map deleted file mode 100644 index 2498366a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scale-box-shadow.mjs","sources":["../../../../src/projection/styles/scale-box-shadow.ts"],"sourcesContent":["import { complex } from \"../../value/types/complex\"\nimport { mixNumber } from \"../../utils/mix/number\"\nimport type { ScaleCorrectorDefinition } from \"./types\"\n\nexport const correctBoxShadow: ScaleCorrectorDefinition = {\n correct: (latest: string, { treeScale, projectionDelta }) => {\n const original = latest\n const shadow = complex.parse(latest)\n\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5) return original\n\n const template = complex.createTransformer(latest)\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0\n\n // Calculate the overall context scale\n const xScale = projectionDelta!.x.scale * treeScale!.x\n const yScale = projectionDelta!.y.scale * treeScale!.y\n\n // Scale x/y\n ;(shadow[0 + offset] as number) /= xScale\n ;(shadow[1 + offset] as number) /= yScale\n\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5)\n\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n (shadow[2 + offset] as number) /= average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\ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs deleted file mode 100644 index fa9dd860..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs +++ /dev/null @@ -1,31 +0,0 @@ -import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs'; -import { correctBorderRadius } from './scale-border-radius.mjs'; -import { correctBoxShadow } from './scale-box-shadow.mjs'; - -const scaleCorrectors = { - borderRadius: { - ...correctBorderRadius, - applyTo: [ - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomLeftRadius", - "borderBottomRightRadius", - ], - }, - borderTopLeftRadius: correctBorderRadius, - borderTopRightRadius: correctBorderRadius, - borderBottomLeftRadius: correctBorderRadius, - borderBottomRightRadius: correctBorderRadius, - boxShadow: correctBoxShadow, -}; -function addScaleCorrector(correctors) { - for (const key in correctors) { - scaleCorrectors[key] = correctors[key]; - if (isCSSVariableName(key)) { - scaleCorrectors[key].isCSSVariable = true; - } - } -} - -export { addScaleCorrector, scaleCorrectors }; -//# sourceMappingURL=scale-correction.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.map deleted file mode 100644 index dd761a46..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scale-correction.mjs","sources":["../../../../src/projection/styles/scale-correction.ts"],"sourcesContent":["import { isCSSVariableName } from \"../../animation/utils/is-css-variable\"\nimport { correctBorderRadius } from \"./scale-border-radius\"\nimport { correctBoxShadow } from \"./scale-box-shadow\"\nimport type { ScaleCorrectorMap } from \"./types\"\n\nexport const scaleCorrectors: ScaleCorrectorMap = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n}\n\nexport function addScaleCorrector(correctors: ScaleCorrectorMap) {\n for (const key in correctors) {\n scaleCorrectors[key] = correctors[key]\n if (isCSSVariableName(key)) {\n scaleCorrectors[key].isCSSVariable = true\n }\n }\n}\n"],"names":[],"mappings":";;;;AAKO,MAAM,eAAe,GAAsB;AAC9C,IAAA,YAAY,EAAE;AACV,QAAA,GAAG,mBAAmB;AACtB,QAAA,OAAO,EAAE;YACL,qBAAqB;YACrB,sBAAsB;YACtB,wBAAwB;YACxB,yBAAyB;AAC5B,SAAA;AACJ,KAAA;AACD,IAAA,mBAAmB,EAAE,mBAAmB;AACxC,IAAA,oBAAoB,EAAE,mBAAmB;AACzC,IAAA,sBAAsB,EAAE,mBAAmB;AAC3C,IAAA,uBAAuB,EAAE,mBAAmB;AAC5C,IAAA,SAAS,EAAE,gBAAgB;;AAGzB,SAAU,iBAAiB,CAAC,UAA6B,EAAA;AAC3D,IAAA,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;QAC1B,eAAe,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC;AACtC,QAAA,IAAI,iBAAiB,CAAC,GAAG,CAAC,EAAE;AACxB,YAAA,eAAe,CAAC,GAAG,CAAC,CAAC,aAAa,GAAG,IAAI;QAC7C;IACJ;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/transform.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/transform.mjs deleted file mode 100644 index aba77bfd..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/transform.mjs +++ /dev/null @@ -1,53 +0,0 @@ -function buildProjectionTransform(delta, treeScale, latestTransform) { - let transform = ""; - /** - * The translations we use to calculate are always relative to the viewport coordinate space. - * But when we apply scales, we also scale the coordinate space of an element and its children. - * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need - * to move an element 100 pixels, we actually need to move it 200 in within that scaled space. - */ - const xTranslate = delta.x.translate / treeScale.x; - const yTranslate = delta.y.translate / treeScale.y; - const zTranslate = latestTransform?.z || 0; - if (xTranslate || yTranslate || zTranslate) { - transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `; - } - /** - * Apply scale correction for the tree transform. - * This will apply scale to the screen-orientated axes. - */ - if (treeScale.x !== 1 || treeScale.y !== 1) { - transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `; - } - if (latestTransform) { - const { transformPerspective, rotate, pathRotation, rotateX, rotateY, skewX, skewY, } = latestTransform; - if (transformPerspective) - transform = `perspective(${transformPerspective}px) ${transform}`; - if (rotate) - transform += `rotate(${rotate}deg) `; - // Additive `rotate()` so user `rotate` isn't clobbered. - if (pathRotation) - transform += `rotate(${pathRotation}deg) `; - if (rotateX) - transform += `rotateX(${rotateX}deg) `; - if (rotateY) - transform += `rotateY(${rotateY}deg) `; - if (skewX) - transform += `skewX(${skewX}deg) `; - if (skewY) - transform += `skewY(${skewY}deg) `; - } - /** - * Apply scale to match the size of the element to the size we want it. - * This will apply scale to the element-orientated axes. - */ - const elementScaleX = delta.x.scale * treeScale.x; - const elementScaleY = delta.y.scale * treeScale.y; - if (elementScaleX !== 1 || elementScaleY !== 1) { - transform += `scale(${elementScaleX}, ${elementScaleY})`; - } - return transform || "none"; -} - -export { buildProjectionTransform }; -//# sourceMappingURL=transform.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.map deleted file mode 100644 index 2ef27a9e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transform.mjs","sources":["../../../../src/projection/styles/transform.ts"],"sourcesContent":["import type { Delta, Point } from \"motion-utils\"\nimport type { ResolvedValues } from \"../../node/types\"\n\nexport function buildProjectionTransform(\n delta: Delta,\n treeScale: Point,\n latestTransform?: ResolvedValues\n): string {\n let transform = \"\"\n\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x\n const yTranslate = delta.y.translate / treeScale.y\n const zTranslate = latestTransform?.z || 0\n if (xTranslate || yTranslate || zTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `\n }\n\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `\n }\n\n if (latestTransform) {\n const {\n transformPerspective,\n rotate,\n pathRotation,\n rotateX,\n rotateY,\n skewX,\n skewY,\n } = latestTransform\n if (transformPerspective)\n transform = `perspective(${transformPerspective}px) ${transform}`\n if (rotate) transform += `rotate(${rotate}deg) `\n // Additive `rotate()` so user `rotate` isn't clobbered.\n if (pathRotation) transform += `rotate(${pathRotation}deg) `\n if (rotateX) transform += `rotateX(${rotateX}deg) `\n if (rotateY) transform += `rotateY(${rotateY}deg) `\n if (skewX) transform += `skewX(${skewX}deg) `\n if (skewY) transform += `skewY(${skewY}deg) `\n }\n\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x\n const elementScaleY = delta.y.scale * treeScale.y\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`\n }\n\n return transform || \"none\"\n}\n"],"names":[],"mappings":"SAGgB,wBAAwB,CACpC,KAAY,EACZ,SAAgB,EAChB,eAAgC,EAAA;IAEhC,IAAI,SAAS,GAAG,EAAE;AAElB;;;;;AAKG;IACH,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;AAClD,IAAA,MAAM,UAAU,GAAG,eAAe,EAAE,CAAC,IAAI,CAAC;AAC1C,IAAA,IAAI,UAAU,IAAI,UAAU,IAAI,UAAU,EAAE;QACxC,SAAS,GAAG,eAAe,UAAU,CAAA,IAAA,EAAO,UAAU,CAAA,IAAA,EAAO,UAAU,MAAM;IACjF;AAEA;;;AAGG;AACH,IAAA,IAAI,SAAS,CAAC,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC,KAAK,CAAC,EAAE;AACxC,QAAA,SAAS,IAAI,CAAA,MAAA,EAAS,CAAC,GAAG,SAAS,CAAC,CAAC,CAAA,EAAA,EAAK,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI;IACjE;IAEA,IAAI,eAAe,EAAE;AACjB,QAAA,MAAM,EACF,oBAAoB,EACpB,MAAM,EACN,YAAY,EACZ,OAAO,EACP,OAAO,EACP,KAAK,EACL,KAAK,GACR,GAAG,eAAe;AACnB,QAAA,IAAI,oBAAoB;AACpB,YAAA,SAAS,GAAG,CAAA,YAAA,EAAe,oBAAoB,CAAA,IAAA,EAAO,SAAS,EAAE;AACrE,QAAA,IAAI,MAAM;AAAE,YAAA,SAAS,IAAI,CAAA,OAAA,EAAU,MAAM,CAAA,KAAA,CAAO;;AAEhD,QAAA,IAAI,YAAY;AAAE,YAAA,SAAS,IAAI,CAAA,OAAA,EAAU,YAAY,CAAA,KAAA,CAAO;AAC5D,QAAA,IAAI,OAAO;AAAE,YAAA,SAAS,IAAI,CAAA,QAAA,EAAW,OAAO,CAAA,KAAA,CAAO;AACnD,QAAA,IAAI,OAAO;AAAE,YAAA,SAAS,IAAI,CAAA,QAAA,EAAW,OAAO,CAAA,KAAA,CAAO;AACnD,QAAA,IAAI,KAAK;AAAE,YAAA,SAAS,IAAI,CAAA,MAAA,EAAS,KAAK,CAAA,KAAA,CAAO;AAC7C,QAAA,IAAI,KAAK;AAAE,YAAA,SAAS,IAAI,CAAA,MAAA,EAAS,KAAK,CAAA,KAAA,CAAO;IACjD;AAEA;;;AAGG;IACH,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IACjD,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IACjD,IAAI,aAAa,KAAK,CAAC,IAAI,aAAa,KAAK,CAAC,EAAE;AAC5C,QAAA,SAAS,IAAI,CAAA,MAAA,EAAS,aAAa,CAAA,EAAA,EAAK,aAAa,GAAG;IAC5D;IAEA,OAAO,SAAS,IAAI,MAAM;AAC9B;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs deleted file mode 100644 index 463a1842..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const compareByDepth = (a, b) => a.depth - b.depth; - -export { compareByDepth }; -//# sourceMappingURL=compare-by-depth.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs.map deleted file mode 100644 index 789454da..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compare-by-depth.mjs","sources":["../../../../src/projection/utils/compare-by-depth.ts"],"sourcesContent":["import type { VisualElement } from \"../../render/VisualElement\"\n\nexport interface WithDepth {\n depth: number\n}\n\nexport const compareByDepth = (a: VisualElement, b: VisualElement) =>\n a.depth - b.depth\n"],"names":[],"mappings":"AAMO,MAAM,cAAc,GAAG,CAAC,CAAgB,EAAE,CAAgB,KAC7D,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs deleted file mode 100644 index 00e4c669..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs +++ /dev/null @@ -1,6 +0,0 @@ -function eachAxis(callback) { - return [callback("x"), callback("y")]; -} - -export { eachAxis }; -//# sourceMappingURL=each-axis.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs.map deleted file mode 100644 index c3cb6c4b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"each-axis.mjs","sources":["../../../../src/projection/utils/each-axis.ts"],"sourcesContent":["type Callback = (axis: \"x\" | \"y\") => void\n\nexport function eachAxis(callback: Callback) {\n return [callback(\"x\"), callback(\"y\")]\n}\n"],"names":[],"mappings":"AAEM,SAAU,QAAQ,CAAC,QAAkB,EAAA;IACvC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;AACzC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/flat-tree.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/flat-tree.mjs deleted file mode 100644 index d9d6817e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/flat-tree.mjs +++ /dev/null @@ -1,25 +0,0 @@ -import { addUniqueItem, removeItem } from 'motion-utils'; -import { compareByDepth } from './compare-by-depth.mjs'; - -class FlatTree { - constructor() { - this.children = []; - this.isDirty = false; - } - add(child) { - addUniqueItem(this.children, child); - this.isDirty = true; - } - remove(child) { - removeItem(this.children, child); - this.isDirty = true; - } - forEach(callback) { - this.isDirty && this.children.sort(compareByDepth); - this.isDirty = false; - this.children.forEach(callback); - } -} - -export { FlatTree }; -//# sourceMappingURL=flat-tree.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/flat-tree.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/flat-tree.mjs.map deleted file mode 100644 index c9d0b756..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/flat-tree.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flat-tree.mjs","sources":["../../../../src/projection/utils/flat-tree.ts"],"sourcesContent":["import { addUniqueItem, removeItem } from \"motion-utils\"\nimport { compareByDepth, WithDepth } from \"./compare-by-depth\"\n\nexport class FlatTree {\n private children: WithDepth[] = []\n\n private isDirty: boolean = false\n\n add(child: WithDepth) {\n addUniqueItem(this.children, child)\n this.isDirty = true\n }\n\n remove(child: WithDepth) {\n removeItem(this.children, child)\n this.isDirty = true\n }\n\n forEach(callback: (child: WithDepth) => void) {\n this.isDirty && this.children.sort(compareByDepth)\n this.isDirty = false\n this.children.forEach(callback)\n }\n}\n"],"names":[],"mappings":";;;MAGa,QAAQ,CAAA;AAArB,IAAA,WAAA,GAAA;QACY,IAAA,CAAA,QAAQ,GAAgB,EAAE;QAE1B,IAAA,CAAA,OAAO,GAAY,KAAK;IAiBpC;AAfI,IAAA,GAAG,CAAC,KAAgB,EAAA;AAChB,QAAA,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC;AACnC,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;IACvB;AAEA,IAAA,MAAM,CAAC,KAAgB,EAAA;AACnB,QAAA,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC;AAChC,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;IACvB;AAEA,IAAA,OAAO,CAAC,QAAoC,EAAA;QACxC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC;AAClD,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AACpB,QAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;IACnC;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs deleted file mode 100644 index bf5d3246..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs +++ /dev/null @@ -1,27 +0,0 @@ -function isIdentityScale(scale) { - return scale === undefined || scale === 1; -} -function hasScale({ scale, scaleX, scaleY }) { - return (!isIdentityScale(scale) || - !isIdentityScale(scaleX) || - !isIdentityScale(scaleY)); -} -function hasTransform(values) { - return (hasScale(values) || - has2DTranslate(values) || - values.z || - values.rotate || - values.rotateX || - values.rotateY || - values.skewX || - values.skewY); -} -function has2DTranslate(values) { - return is2DTranslate(values.x) || is2DTranslate(values.y); -} -function is2DTranslate(value) { - return value && value !== "0%"; -} - -export { has2DTranslate, hasScale, hasTransform }; -//# sourceMappingURL=has-transform.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.map deleted file mode 100644 index 40ba0e5f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-transform.mjs","sources":["../../../../src/projection/utils/has-transform.ts"],"sourcesContent":["import { type AnyResolvedKeyframe } from \"../../animation/types\"\nimport { ResolvedValues } from \"../../render/types\"\n\nfunction isIdentityScale(scale: AnyResolvedKeyframe | undefined) {\n return scale === undefined || scale === 1\n}\n\nexport function hasScale({ scale, scaleX, scaleY }: ResolvedValues) {\n return (\n !isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY)\n )\n}\n\nexport function hasTransform(values: ResolvedValues) {\n return (\n hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY ||\n values.skewX ||\n values.skewY\n )\n}\n\nexport function has2DTranslate(values: ResolvedValues) {\n return is2DTranslate(values.x) || is2DTranslate(values.y)\n}\n\nfunction is2DTranslate(value: AnyResolvedKeyframe | undefined) {\n return value && value !== \"0%\"\n}\n"],"names":[],"mappings":"AAGA,SAAS,eAAe,CAAC,KAAsC,EAAA;AAC3D,IAAA,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,CAAC;AAC7C;AAEM,SAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAkB,EAAA;AAC9D,IAAA,QACI,CAAC,eAAe,CAAC,KAAK,CAAC;QACvB,CAAC,eAAe,CAAC,MAAM,CAAC;AACxB,QAAA,CAAC,eAAe,CAAC,MAAM,CAAC;AAEhC;AAEM,SAAU,YAAY,CAAC,MAAsB,EAAA;AAC/C,IAAA,QACI,QAAQ,CAAC,MAAM,CAAC;QAChB,cAAc,CAAC,MAAM,CAAC;AACtB,QAAA,MAAM,CAAC,CAAC;AACR,QAAA,MAAM,CAAC,MAAM;AACb,QAAA,MAAM,CAAC,OAAO;AACd,QAAA,MAAM,CAAC,OAAO;AACd,QAAA,MAAM,CAAC,KAAK;QACZ,MAAM,CAAC,KAAK;AAEpB;AAEM,SAAU,cAAc,CAAC,MAAsB,EAAA;AACjD,IAAA,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7D;AAEA,SAAS,aAAa,CAAC,KAAsC,EAAA;AACzD,IAAA,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI;AAClC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/measure.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/measure.mjs deleted file mode 100644 index 33e0a656..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/measure.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs'; -import { translateAxis } from '../geometry/delta-apply.mjs'; - -function measureViewportBox(instance, transformPoint) { - return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint)); -} -function measurePageBox(element, rootProjectionNode, transformPagePoint) { - const viewportBox = measureViewportBox(element, transformPagePoint); - const { scroll } = rootProjectionNode; - if (scroll) { - translateAxis(viewportBox.x, scroll.offset.x); - translateAxis(viewportBox.y, scroll.offset.y); - } - return viewportBox; -} - -export { measurePageBox, measureViewportBox }; -//# sourceMappingURL=measure.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.map deleted file mode 100644 index d1c0d8d4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"measure.mjs","sources":["../../../../src/projection/utils/measure.ts"],"sourcesContent":["import { TransformPoint } from \"motion-utils\"\nimport {\n convertBoundingBoxToBox,\n transformBoxPoints,\n} from \"../geometry/conversion\"\nimport { translateAxis } from \"../geometry/delta-apply\"\n\nexport function measureViewportBox(\n instance: HTMLElement,\n transformPoint?: TransformPoint\n) {\n return convertBoundingBoxToBox(\n transformBoxPoints(instance.getBoundingClientRect(), transformPoint)\n )\n}\n\nexport function measurePageBox(\n element: HTMLElement,\n rootProjectionNode: any,\n transformPagePoint?: TransformPoint\n) {\n const viewportBox = measureViewportBox(element, transformPagePoint)\n const { scroll } = rootProjectionNode\n\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x)\n translateAxis(viewportBox.y, scroll.offset.y)\n }\n\n return viewportBox\n}\n"],"names":[],"mappings":";;;AAOM,SAAU,kBAAkB,CAC9B,QAAqB,EACrB,cAA+B,EAAA;AAE/B,IAAA,OAAO,uBAAuB,CAC1B,kBAAkB,CAAC,QAAQ,CAAC,qBAAqB,EAAE,EAAE,cAAc,CAAC,CACvE;AACL;SAEgB,cAAc,CAC1B,OAAoB,EACpB,kBAAuB,EACvB,kBAAmC,EAAA;IAEnC,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC;AACnE,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,kBAAkB;IAErC,IAAI,MAAM,EAAE;QACR,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7C,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD;AAEA,IAAA,OAAO,WAAW;AACtB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/Feature.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/Feature.mjs deleted file mode 100644 index d614c3c7..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/Feature.mjs +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Feature base class for extending VisualElement functionality. - * Features are plugins that can be mounted/unmounted to add behavior - * like gestures, animations, or layout tracking. - */ -class Feature { - constructor(node) { - this.isMounted = false; - this.node = node; - } - update() { } -} - -export { Feature }; -//# sourceMappingURL=Feature.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/Feature.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/Feature.mjs.map deleted file mode 100644 index c627149b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/Feature.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Feature.mjs","sources":["../../../src/render/Feature.ts"],"sourcesContent":["import type { VisualElement } from \"./VisualElement\"\n\n/**\n * Feature base class for extending VisualElement functionality.\n * Features are plugins that can be mounted/unmounted to add behavior\n * like gestures, animations, or layout tracking.\n */\nexport abstract class Feature {\n isMounted = false\n\n node: VisualElement\n\n constructor(node: VisualElement) {\n this.node = node\n }\n\n abstract mount(): void\n\n abstract unmount(): void\n\n update(): void {}\n}\n"],"names":[],"mappings":"AAEA;;;;AAIG;MACmB,OAAO,CAAA;AAKzB,IAAA,WAAA,CAAY,IAAsB,EAAA;QAJlC,IAAA,CAAA,SAAS,GAAG,KAAK;AAKb,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;IACpB;AAMA,IAAA,MAAM,KAAU;AACnB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/VisualElement.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/VisualElement.mjs deleted file mode 100644 index fba5cd39..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/VisualElement.mjs +++ /dev/null @@ -1,560 +0,0 @@ -import { warnOnce, secondsToMilliseconds, isNumericalString, isZeroValueString, SubscriptionManager } from 'motion-utils'; -import { KeyframeResolver } from '../animation/keyframes/KeyframesResolver.mjs'; -import { NativeAnimation } from '../animation/NativeAnimation.mjs'; -import { acceleratedValues } from '../animation/waapi/utils/accelerated-values.mjs'; -import { microtask } from '../frameloop/microtask.mjs'; -import { time } from '../frameloop/sync-time.mjs'; -import { createBox } from '../projection/geometry/models.mjs'; -import { motionValue } from '../value/index.mjs'; -import { complex } from '../value/types/complex/index.mjs'; -import { getAnimatableNone } from '../value/types/utils/animatable-none.mjs'; -import { findValueType } from '../value/types/utils/find.mjs'; -import { isMotionValue } from '../value/utils/is-motion-value.mjs'; -import { visualElementStore } from './store.mjs'; -import { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs'; -import { transformProps } from './utils/keys-transform.mjs'; -import { updateMotionValuesFromProps } from './utils/motion-values.mjs'; -import { initPrefersReducedMotion } from './utils/reduced-motion/index.mjs'; -import { resolveVariantFromProps } from './utils/resolve-variants.mjs'; -import { hasReducedMotionListener, prefersReducedMotion } from './utils/reduced-motion/state.mjs'; -import { frame, cancelFrame } from '../frameloop/frame.mjs'; - -const propEventHandlers = [ - "AnimationStart", - "AnimationComplete", - "Update", - "BeforeLayoutMeasure", - "LayoutMeasure", - "LayoutAnimationStart", - "LayoutAnimationComplete", -]; -/** - * Static feature definitions - can be injected by framework layer - */ -let featureDefinitions = {}; -/** - * Set feature definitions for all VisualElements. - * This should be called by the framework layer (e.g., framer-motion) during initialization. - */ -function setFeatureDefinitions(definitions) { - featureDefinitions = definitions; -} -/** - * Get the current feature definitions - */ -function getFeatureDefinitions() { - return featureDefinitions; -} -/** - * A VisualElement is an imperative abstraction around UI elements such as - * HTMLElement, SVGElement, Three.Object3D etc. - */ -class VisualElement { - /** - * This method takes React props and returns found MotionValues. For example, HTML - * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays. - * - * This isn't an abstract method as it needs calling in the constructor, but it is - * intended to be one. - */ - scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) { - return {}; - } - constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) { - /** - * A reference to the current underlying Instance, e.g. a HTMLElement - * or Three.Mesh etc. - */ - this.current = null; - /** - * A set containing references to this VisualElement's children. - */ - this.children = new Set(); - /** - * Determine what role this visual element should take in the variant tree. - */ - this.isVariantNode = false; - this.isControllingVariants = false; - /** - * Decides whether this VisualElement should animate in reduced motion - * mode. - * - * TODO: This is currently set on every individual VisualElement but feels - * like it could be set globally. - */ - this.shouldReduceMotion = null; - /** - * Decides whether animations should be skipped for this VisualElement. - * Useful for E2E tests and visual regression testing. - */ - this.shouldSkipAnimations = false; - /** - * A map of all motion values attached to this visual element. Motion - * values are source of truth for any given animated value. A motion - * value might be provided externally by the component via props. - */ - this.values = new Map(); - this.KeyframeResolver = KeyframeResolver; - /** - * Cleanup functions for active features (hover/tap/exit etc) - */ - this.features = {}; - /** - * A map of every subscription that binds the provided or generated - * motion values onChange listeners to this visual element. - */ - this.valueSubscriptions = new Map(); - /** - * A reference to the previously-provided motion values as returned - * from scrapeMotionValuesFromProps. We use the keys in here to determine - * if any motion values need to be removed after props are updated. - */ - this.prevMotionValues = {}; - /** - * Track whether this element has been mounted before, to detect - * remounts after Suspense unmount/remount cycles. - */ - this.hasBeenMounted = false; - /** - * An object containing a SubscriptionManager for each active event. - */ - this.events = {}; - /** - * An object containing an unsubscribe function for each prop event subscription. - * For example, every "Update" event can have multiple subscribers via - * VisualElement.on(), but only one of those can be defined via the onUpdate prop. - */ - this.propEventSubscriptions = {}; - this.notifyUpdate = () => this.notify("Update", this.latestValues); - this.render = () => { - if (!this.current) - return; - this.triggerBuild(); - this.renderInstance(this.current, this.renderState, this.props.style, this.projection); - }; - this.renderScheduledAt = 0.0; - this.scheduleRender = () => { - const now = time.now(); - if (this.renderScheduledAt < now) { - this.renderScheduledAt = now; - frame.render(this.render, false, true); - } - }; - const { latestValues, renderState } = visualState; - this.latestValues = latestValues; - this.baseTarget = { ...latestValues }; - this.initialValues = props.initial ? { ...latestValues } : {}; - this.renderState = renderState; - this.parent = parent; - this.props = props; - this.presenceContext = presenceContext; - this.depth = parent ? parent.depth + 1 : 0; - this.reducedMotionConfig = reducedMotionConfig; - this.skipAnimationsConfig = skipAnimations; - this.options = options; - this.blockInitialAnimation = Boolean(blockInitialAnimation); - this.isControllingVariants = isControllingVariants(props); - this.isVariantNode = isVariantNode(props); - if (this.isVariantNode) { - this.variantChildren = new Set(); - } - this.manuallyAnimateOnMount = Boolean(parent && parent.current); - /** - * Any motion values that are provided to the element when created - * aren't yet bound to the element, as this would technically be impure. - * However, we iterate through the motion values and set them to the - * initial values for this component. - * - * TODO: This is impure and we should look at changing this to run on mount. - * Doing so will break some tests but this isn't necessarily a breaking change, - * more a reflection of the test. - */ - const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this); - for (const key in initialMotionValues) { - const value = initialMotionValues[key]; - if (latestValues[key] !== undefined && isMotionValue(value)) { - value.set(latestValues[key]); - } - } - } - mount(instance) { - /** - * If this element has been mounted before (e.g. after a Suspense - * unmount/remount), reset motion values to their initial state - * so animations replay correctly from initial → animate. - */ - if (this.hasBeenMounted) { - for (const key in this.initialValues) { - this.values.get(key)?.jump(this.initialValues[key]); - this.latestValues[key] = this.initialValues[key]; - } - } - this.current = instance; - visualElementStore.set(instance, this); - if (this.projection && !this.projection.instance) { - this.projection.mount(instance); - } - if (this.parent && this.isVariantNode && !this.isControllingVariants) { - this.removeFromVariantTree = this.parent.addVariantChild(this); - } - this.values.forEach((value, key) => this.bindToMotionValue(key, value)); - /** - * Determine reduced motion preference. Only initialize the matchMedia - * listener if we actually need the dynamic value (i.e., when config - * is neither "never" nor "always"). - */ - if (this.reducedMotionConfig === "never") { - this.shouldReduceMotion = false; - } - else if (this.reducedMotionConfig === "always") { - this.shouldReduceMotion = true; - } - else { - if (!hasReducedMotionListener.current) { - initPrefersReducedMotion(); - } - this.shouldReduceMotion = prefersReducedMotion.current; - } - if (process.env.NODE_ENV !== "production") { - warnOnce(this.shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"); - } - /** - * Set whether animations should be skipped based on the config. - */ - this.shouldSkipAnimations = this.skipAnimationsConfig ?? false; - this.parent?.addChild(this); - this.update(this.props, this.presenceContext); - this.hasBeenMounted = true; - } - unmount() { - this.projection && this.projection.unmount(); - cancelFrame(this.notifyUpdate); - cancelFrame(this.render); - this.valueSubscriptions.forEach((remove) => remove()); - this.valueSubscriptions.clear(); - this.removeFromVariantTree && this.removeFromVariantTree(); - this.parent?.removeChild(this); - for (const key in this.events) { - this.events[key].clear(); - } - for (const key in this.features) { - const feature = this.features[key]; - if (feature) { - feature.unmount(); - feature.isMounted = false; - } - } - this.current = null; - } - addChild(child) { - this.children.add(child); - this.enteringChildren ?? (this.enteringChildren = new Set()); - this.enteringChildren.add(child); - } - removeChild(child) { - this.children.delete(child); - this.enteringChildren && this.enteringChildren.delete(child); - } - bindToMotionValue(key, value) { - if (this.valueSubscriptions.has(key)) { - this.valueSubscriptions.get(key)(); - } - if (value.accelerate && - acceleratedValues.has(key) && - this.current instanceof HTMLElement) { - const { factory, keyframes, times, ease, duration } = value.accelerate; - const animation = new NativeAnimation({ - element: this.current, - name: key, - keyframes, - times, - ease, - duration: secondsToMilliseconds(duration), - }); - const cleanup = factory(animation); - this.valueSubscriptions.set(key, () => { - cleanup(); - animation.cancel(); - }); - return; - } - const valueIsTransform = transformProps.has(key); - if (valueIsTransform && this.onBindTransform) { - this.onBindTransform(); - } - const removeOnChange = value.on("change", (latestValue) => { - this.latestValues[key] = latestValue; - this.props.onUpdate && frame.preRender(this.notifyUpdate); - if (valueIsTransform && this.projection) { - this.projection.isTransformDirty = true; - } - this.scheduleRender(); - }); - let removeSyncCheck; - if (typeof window !== "undefined" && - window.MotionCheckAppearSync) { - removeSyncCheck = window.MotionCheckAppearSync(this, key, value); - } - this.valueSubscriptions.set(key, () => { - removeOnChange(); - if (removeSyncCheck) - removeSyncCheck(); - // Defer to MotionValue.on("change") auto-stop so React 19 remounts - // can resubscribe before the animation is cancelled (#3315). - }); - } - sortNodePosition(other) { - /** - * If these nodes aren't even of the same type we can't compare their depth. - */ - if (!this.current || - !this.sortInstanceNodePosition || - this.type !== other.type) { - return 0; - } - return this.sortInstanceNodePosition(this.current, other.current); - } - updateFeatures() { - let key = "animation"; - for (key in featureDefinitions) { - const featureDefinition = featureDefinitions[key]; - if (!featureDefinition) - continue; - const { isEnabled, Feature: FeatureConstructor } = featureDefinition; - /** - * If this feature is enabled but not active, make a new instance. - */ - if (!this.features[key] && - FeatureConstructor && - isEnabled(this.props)) { - this.features[key] = new FeatureConstructor(this); - } - /** - * If we have a feature, mount or update it. - */ - if (this.features[key]) { - const feature = this.features[key]; - if (feature.isMounted) { - feature.update(); - } - else { - feature.mount(); - feature.isMounted = true; - } - } - } - } - triggerBuild() { - this.build(this.renderState, this.latestValues, this.props); - } - /** - * Measure the current viewport box with or without transforms. - * Only measures axis-aligned boxes, rotate and skew must be manually - * removed with a re-render to work. - */ - measureViewportBox() { - return this.current - ? this.measureInstanceViewportBox(this.current, this.props) - : createBox(); - } - getStaticValue(key) { - return this.latestValues[key]; - } - setStaticValue(key, value) { - this.latestValues[key] = value; - } - /** - * Update the provided props. Ensure any newly-added motion values are - * added to our map, old ones removed, and listeners updated. - */ - update(props, presenceContext) { - if (props.transformTemplate || this.props.transformTemplate) { - this.scheduleRender(); - } - this.prevProps = this.props; - this.props = props; - this.prevPresenceContext = this.presenceContext; - this.presenceContext = presenceContext; - /** - * Update prop event handlers ie onAnimationStart, onAnimationComplete - */ - for (let i = 0; i < propEventHandlers.length; i++) { - const key = propEventHandlers[i]; - if (this.propEventSubscriptions[key]) { - this.propEventSubscriptions[key](); - delete this.propEventSubscriptions[key]; - } - const listenerName = ("on" + key); - const listener = props[listenerName]; - if (listener) { - this.propEventSubscriptions[key] = this.on(key, listener); - } - } - this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues); - if (this.handleChildMotionValue) { - this.handleChildMotionValue(); - } - } - getProps() { - return this.props; - } - /** - * Returns the variant definition with a given name. - */ - getVariant(name) { - return this.props.variants ? this.props.variants[name] : undefined; - } - /** - * Returns the defined default transition on this component. - */ - getDefaultTransition() { - return this.props.transition; - } - getTransformPagePoint() { - return this.props.transformPagePoint; - } - getClosestVariantNode() { - return this.isVariantNode - ? this - : this.parent - ? this.parent.getClosestVariantNode() - : undefined; - } - /** - * Add a child visual element to our set of children. - */ - addVariantChild(child) { - const closestVariantNode = this.getClosestVariantNode(); - if (closestVariantNode) { - closestVariantNode.variantChildren && - closestVariantNode.variantChildren.add(child); - return () => closestVariantNode.variantChildren.delete(child); - } - } - /** - * Add a motion value and bind it to this visual element. - */ - addValue(key, value) { - // Remove existing value if it exists - const existingValue = this.values.get(key); - if (value !== existingValue) { - if (existingValue) - this.removeValue(key); - this.bindToMotionValue(key, value); - this.values.set(key, value); - this.latestValues[key] = value.get(); - } - } - /** - * Remove a motion value and unbind any active subscriptions. - */ - removeValue(key) { - this.values.delete(key); - const unsubscribe = this.valueSubscriptions.get(key); - if (unsubscribe) { - unsubscribe(); - this.valueSubscriptions.delete(key); - } - delete this.latestValues[key]; - this.removeValueFromRenderState(key, this.renderState); - } - /** - * Check whether we have a motion value for this key - */ - hasValue(key) { - return this.values.has(key); - } - getValue(key, defaultValue) { - if (this.props.values && this.props.values[key]) { - return this.props.values[key]; - } - let value = this.values.get(key); - if (value === undefined && defaultValue !== undefined) { - value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this }); - this.addValue(key, value); - } - return value; - } - /** - * If we're trying to animate to a previously unencountered value, - * we need to check for it in our state and as a last resort read it - * directly from the instance (which might have performance implications). - */ - readValue(key, target) { - let value = this.latestValues[key] !== undefined || !this.current - ? this.latestValues[key] - : this.getBaseTargetFromProps(this.props, key) ?? - this.readValueFromInstance(this.current, key, this.options); - if (value !== undefined && value !== null) { - if (typeof value === "string" && - (isNumericalString(value) || isZeroValueString(value))) { - // If this is a number read as a string, ie "0" or "200", convert it to a number - value = parseFloat(value); - } - else if (!findValueType(value) && complex.test(target)) { - value = getAnimatableNone(key, target); - } - this.setBaseTarget(key, isMotionValue(value) ? value.get() : value); - } - return isMotionValue(value) ? value.get() : value; - } - /** - * Set the base target to later animate back to. This is currently - * only hydrated on creation and when we first read a value. - */ - setBaseTarget(key, value) { - this.baseTarget[key] = value; - } - /** - * Find the base target for a value thats been removed from all animation - * props. - */ - getBaseTarget(key) { - const { initial } = this.props; - let valueFromInitial; - if (typeof initial === "string" || typeof initial === "object") { - const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom); - if (variant) { - valueFromInitial = variant[key]; - } - } - /** - * If this value still exists in the current initial variant, read that. - */ - if (initial && valueFromInitial !== undefined) { - return valueFromInitial; - } - /** - * Alternatively, if this VisualElement config has defined a getBaseTarget - * so we can read the value from an alternative source, try that. - */ - const target = this.getBaseTargetFromProps(this.props, key); - if (target !== undefined && !isMotionValue(target)) - return target; - /** - * If the value was initially defined on initial, but it doesn't any more, - * return undefined. Otherwise return the value as initially read from the DOM. - */ - return this.initialValues[key] !== undefined && - valueFromInitial === undefined - ? undefined - : this.baseTarget[key]; - } - on(eventName, callback) { - if (!this.events[eventName]) { - this.events[eventName] = new SubscriptionManager(); - } - return this.events[eventName].add(callback); - } - notify(eventName, ...args) { - if (this.events[eventName]) { - this.events[eventName].notify(...args); - } - } - scheduleRenderMicrotask() { - microtask.render(this.render); - } -} - -export { VisualElement, getFeatureDefinitions, setFeatureDefinitions }; -//# sourceMappingURL=VisualElement.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/VisualElement.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/VisualElement.mjs.map deleted file mode 100644 index 5ea221b2..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/VisualElement.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VisualElement.mjs","sources":["../../../src/render/VisualElement.ts"],"sourcesContent":["import {\n Box,\n isNumericalString,\n isZeroValueString,\n secondsToMilliseconds,\n SubscriptionManager,\n warnOnce,\n} from \"motion-utils\"\nimport { KeyframeResolver } from \"../animation/keyframes/KeyframesResolver\"\nimport { NativeAnimation } from \"../animation/NativeAnimation\"\nimport type { AnyResolvedKeyframe } from \"../animation/types\"\nimport { acceleratedValues } from \"../animation/waapi/utils/accelerated-values\"\nimport { cancelFrame, frame } from \"../frameloop\"\nimport { microtask } from \"../frameloop/microtask\"\nimport { time } from \"../frameloop/sync-time\"\nimport type { MotionNodeOptions } from \"../node/types\"\nimport { createBox } from \"../projection/geometry/models\"\nimport { motionValue, MotionValue } from \"../value\"\nimport { complex } from \"../value/types/complex\"\nimport { getAnimatableNone } from \"../value/types/utils/animatable-none\"\nimport { findValueType } from \"../value/types/utils/find\"\nimport { isMotionValue } from \"../value/utils/is-motion-value\"\nimport { Feature } from \"./Feature\"\nimport { visualElementStore } from \"./store\"\nimport {\n FeatureDefinitions,\n MotionConfigContextProps,\n PresenceContextProps,\n ReducedMotionConfig,\n ResolvedValues,\n VisualElementEventCallbacks,\n VisualElementOptions,\n} from \"./types\"\nimport { AnimationState } from \"./utils/animation-state\"\nimport {\n isControllingVariants as checkIsControllingVariants,\n isVariantNode as checkIsVariantNode,\n} from \"./utils/is-controlling-variants\"\nimport { transformProps } from \"./utils/keys-transform\"\nimport { updateMotionValuesFromProps } from \"./utils/motion-values\"\nimport {\n hasReducedMotionListener,\n initPrefersReducedMotion,\n prefersReducedMotion,\n} from \"./utils/reduced-motion\"\nimport { resolveVariantFromProps } from \"./utils/resolve-variants\"\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n] as const\n\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions: Partial = {}\n\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nexport function setFeatureDefinitions(\n definitions: Partial\n) {\n featureDefinitions = definitions\n}\n\n/**\n * Get the current feature definitions\n */\nexport function getFeatureDefinitions(): Partial {\n return featureDefinitions\n}\n\n/**\n * Motion style type - a subset of CSS properties that can contain motion values\n */\nexport type MotionStyle = {\n [K: string]: AnyResolvedKeyframe | MotionValue | undefined\n}\n\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nexport abstract class VisualElement<\n Instance = unknown,\n RenderState = unknown,\n Options extends {} = {}\n> {\n /**\n * VisualElements are arranged in trees mirroring that of the React tree.\n * Each type of VisualElement has a unique name, to detect when we're crossing\n * type boundaries within that tree.\n */\n abstract type: string\n\n /**\n * An `Array.sort` compatible function that will compare two Instances and\n * compare their respective positions within the tree.\n */\n abstract sortInstanceNodePosition(a: Instance, b: Instance): number\n\n /**\n * Measure the viewport-relative bounding box of the Instance.\n */\n abstract measureInstanceViewportBox(\n instance: Instance,\n props: MotionNodeOptions & Partial\n ): Box\n\n /**\n * When a value has been removed from all animation props we need to\n * pick a target to animate back to. For instance, for HTMLElements\n * we can look in the style prop.\n */\n abstract getBaseTargetFromProps(\n props: MotionNodeOptions,\n key: string\n ): AnyResolvedKeyframe | undefined | MotionValue\n\n /**\n * When we first animate to a value we need to animate it *from* a value.\n * Often this have been specified via the initial prop but it might be\n * that the value needs to be read from the Instance.\n */\n abstract readValueFromInstance(\n instance: Instance,\n key: string,\n options: Options\n ): AnyResolvedKeyframe | null | undefined\n\n /**\n * When a value has been removed from the VisualElement we use this to remove\n * it from the inherting class' unique render state.\n */\n abstract removeValueFromRenderState(\n key: string,\n renderState: RenderState\n ): void\n\n /**\n * Run before a React or VisualElement render, builds the latest motion\n * values into an Instance-specific format. For example, HTMLVisualElement\n * will use this step to build `style` and `var` values.\n */\n abstract build(\n renderState: RenderState,\n latestValues: ResolvedValues,\n props: MotionNodeOptions\n ): void\n\n /**\n * Apply the built values to the Instance. For example, HTMLElements will have\n * styles applied via `setProperty` and the style attribute, whereas SVGElements\n * will have values applied to attributes.\n */\n abstract renderInstance(\n instance: Instance,\n renderState: RenderState,\n styleProp?: MotionStyle,\n projection?: any\n ): void\n\n /**\n * This method is called when a transform property is bound to a motion value.\n * It's currently used to measure SVG elements when a new transform property is bound.\n */\n onBindTransform?(): void\n\n /**\n * If the component child is provided as a motion value, handle subscriptions\n * with the renderer-specific VisualElement.\n */\n handleChildMotionValue?(): void\n\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(\n _props: MotionNodeOptions,\n _prevProps: MotionNodeOptions,\n _visualElement: VisualElement\n ): {\n [key: string]: MotionValue | AnyResolvedKeyframe\n } {\n return {}\n }\n\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n current: Instance | null = null\n\n /**\n * A reference to the parent VisualElement (if exists).\n */\n parent: VisualElement | undefined\n\n /**\n * A set containing references to this VisualElement's children.\n */\n children = new Set()\n\n /**\n * A set containing the latest children of this VisualElement. This is flushed\n * at the start of every commit. We use it to calculate the stagger delay\n * for newly-added children.\n */\n enteringChildren?: Set\n\n /**\n * The depth of this VisualElement within the overall VisualElement tree.\n */\n depth: number\n\n /**\n * The current render state of this VisualElement. Defined by inherting VisualElements.\n */\n renderState: RenderState\n\n /**\n * An object containing the latest static values for each of this VisualElement's\n * MotionValues.\n */\n latestValues: ResolvedValues\n\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n isVariantNode: boolean = false\n isControllingVariants: boolean = false\n\n /**\n * If this component is part of the variant tree, it should track\n * any children that are also part of the tree. This is essentially\n * a shadow tree to simplify logic around how to stagger over children.\n */\n variantChildren?: Set\n\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n shouldReduceMotion: boolean | null = null\n\n /**\n * Decides whether animations should be skipped for this VisualElement.\n * Useful for E2E tests and visual regression testing.\n */\n shouldSkipAnimations: boolean = false\n\n /**\n * Normally, if a component is controlled by a parent's variants, it can\n * rely on that ancestor to trigger animations further down the tree.\n * However, if a component is created after its parent is mounted, the parent\n * won't trigger that mount animation so the child needs to.\n *\n * TODO: This might be better replaced with a method isParentMounted\n */\n manuallyAnimateOnMount: boolean\n\n /**\n * This can be set by AnimatePresence to force components that mount\n * at the same time as it to mount as if they have initial={false} set.\n */\n blockInitialAnimation: boolean\n\n /**\n * A reference to this VisualElement's projection node, used in layout animations.\n */\n projection?: any\n\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n values = new Map()\n\n /**\n * The AnimationState, this is hydrated by the animation Feature.\n */\n animationState?: AnimationState\n\n KeyframeResolver = KeyframeResolver\n\n /**\n * The options used to create this VisualElement. The Options type is defined\n * by the inheriting VisualElement and is passed straight through to the render functions.\n */\n readonly options: Options\n\n /**\n * A reference to the latest props provided to the VisualElement's host React component.\n */\n props: MotionNodeOptions\n prevProps?: MotionNodeOptions\n\n presenceContext: PresenceContextProps | null\n prevPresenceContext?: PresenceContextProps | null\n\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n private features: {\n [K in keyof FeatureDefinitions]?: Feature\n } = {}\n\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n private valueSubscriptions = new Map()\n\n /**\n * A reference to the ReducedMotionConfig passed to the VisualElement's host React component.\n */\n private reducedMotionConfig: ReducedMotionConfig | undefined\n\n /**\n * A reference to the skipAnimations config passed to the VisualElement's host React component.\n */\n private skipAnimationsConfig: boolean | undefined\n\n /**\n * On mount, this will be hydrated with a callback to disconnect\n * this visual element from its parent on unmount.\n */\n private removeFromVariantTree: undefined | VoidFunction\n\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n private prevMotionValues: MotionStyle = {}\n\n /**\n * When values are removed from all animation props we need to search\n * for a fallback value to animate to. These values are tracked in baseTarget.\n */\n private baseTarget: ResolvedValues\n\n /**\n * Create an object of the values we initially animated from (if initial prop present).\n */\n private initialValues: ResolvedValues\n\n /**\n * Track whether this element has been mounted before, to detect\n * remounts after Suspense unmount/remount cycles.\n */\n private hasBeenMounted = false\n\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n private events: {\n [key: string]: SubscriptionManager\n } = {}\n\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n private propEventSubscriptions: {\n [key: string]: VoidFunction\n } = {}\n\n constructor(\n {\n parent,\n props,\n presenceContext,\n reducedMotionConfig,\n skipAnimations,\n blockInitialAnimation,\n visualState,\n }: VisualElementOptions,\n options: Options = {} as any\n ) {\n const { latestValues, renderState } = visualState\n this.latestValues = latestValues\n this.baseTarget = { ...latestValues }\n this.initialValues = props.initial ? { ...latestValues } : {}\n this.renderState = renderState\n this.parent = parent\n this.props = props\n this.presenceContext = presenceContext\n this.depth = parent ? parent.depth + 1 : 0\n this.reducedMotionConfig = reducedMotionConfig\n this.skipAnimationsConfig = skipAnimations\n this.options = options\n this.blockInitialAnimation = Boolean(blockInitialAnimation)\n\n this.isControllingVariants = checkIsControllingVariants(props)\n this.isVariantNode = checkIsVariantNode(props)\n if (this.isVariantNode) {\n this.variantChildren = new Set()\n }\n\n this.manuallyAnimateOnMount = Boolean(parent && parent.current)\n\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } =\n this.scrapeMotionValuesFromProps(props, {}, this)\n\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key]\n\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key])\n }\n }\n }\n\n mount(instance: Instance) {\n /**\n * If this element has been mounted before (e.g. after a Suspense\n * unmount/remount), reset motion values to their initial state\n * so animations replay correctly from initial → animate.\n */\n if (this.hasBeenMounted) {\n for (const key in this.initialValues) {\n this.values.get(key)?.jump(this.initialValues[key])\n this.latestValues[key] = this.initialValues[key]\n }\n }\n\n this.current = instance\n\n visualElementStore.set(instance, this)\n\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance)\n }\n\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this)\n }\n\n this.values.forEach((value, key) => this.bindToMotionValue(key, value))\n\n /**\n * Determine reduced motion preference. Only initialize the matchMedia\n * listener if we actually need the dynamic value (i.e., when config\n * is neither \"never\" nor \"always\").\n */\n if (this.reducedMotionConfig === \"never\") {\n this.shouldReduceMotion = false\n } else if (this.reducedMotionConfig === \"always\") {\n this.shouldReduceMotion = true\n } else {\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion()\n }\n this.shouldReduceMotion = prefersReducedMotion.current\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n this.shouldReduceMotion !== true,\n \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\",\n \"reduced-motion-disabled\"\n )\n }\n\n /**\n * Set whether animations should be skipped based on the config.\n */\n this.shouldSkipAnimations = this.skipAnimationsConfig ?? false\n\n this.parent?.addChild(this)\n\n this.update(this.props, this.presenceContext)\n\n this.hasBeenMounted = true\n }\n\n unmount() {\n this.projection && this.projection.unmount()\n cancelFrame(this.notifyUpdate)\n cancelFrame(this.render)\n this.valueSubscriptions.forEach((remove) => remove())\n this.valueSubscriptions.clear()\n this.removeFromVariantTree && this.removeFromVariantTree()\n this.parent?.removeChild(this)\n\n for (const key in this.events) {\n this.events[key].clear()\n }\n\n for (const key in this.features) {\n const feature = this.features[key as keyof typeof this.features]\n if (feature) {\n feature.unmount()\n feature.isMounted = false\n }\n }\n this.current = null\n }\n\n addChild(child: VisualElement) {\n this.children.add(child)\n this.enteringChildren ??= new Set()\n this.enteringChildren.add(child)\n }\n\n removeChild(child: VisualElement) {\n this.children.delete(child)\n this.enteringChildren && this.enteringChildren.delete(child)\n }\n\n private bindToMotionValue(key: string, value: MotionValue) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)!()\n }\n\n if (\n value.accelerate &&\n acceleratedValues.has(key) &&\n this.current instanceof HTMLElement\n ) {\n const { factory, keyframes, times, ease, duration } =\n value.accelerate\n\n const animation = new NativeAnimation({\n element: this.current,\n name: key,\n keyframes,\n times,\n ease,\n duration: secondsToMilliseconds(duration),\n })\n\n const cleanup = factory(animation)\n\n this.valueSubscriptions.set(key, () => {\n cleanup()\n animation.cancel()\n })\n return\n }\n\n const valueIsTransform = transformProps.has(key)\n\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform()\n }\n\n const removeOnChange = value.on(\n \"change\",\n (latestValue: AnyResolvedKeyframe) => {\n this.latestValues[key] = latestValue\n\n this.props.onUpdate && frame.preRender(this.notifyUpdate)\n\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true\n }\n\n this.scheduleRender()\n }\n )\n\n let removeSyncCheck: VoidFunction | void\n if (\n typeof window !== \"undefined\" &&\n (window as any).MotionCheckAppearSync\n ) {\n removeSyncCheck = (window as any).MotionCheckAppearSync(\n this,\n key,\n value\n )\n }\n\n this.valueSubscriptions.set(key, () => {\n removeOnChange()\n if (removeSyncCheck) removeSyncCheck()\n // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n // can resubscribe before the animation is cancelled (#3315).\n })\n }\n\n sortNodePosition(other: VisualElement) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (\n !this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type\n ) {\n return 0\n }\n\n return this.sortInstanceNodePosition(\n this.current as Instance,\n other.current as Instance\n )\n }\n\n updateFeatures() {\n let key: keyof typeof featureDefinitions = \"animation\"\n\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key]\n\n if (!featureDefinition) continue\n\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition\n\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (\n !this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)\n ) {\n this.features[key] = new FeatureConstructor(this) as any\n }\n\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key]!\n if (feature.isMounted) {\n feature.update()\n } else {\n feature.mount()\n feature.isMounted = true\n }\n }\n }\n }\n\n notifyUpdate = () => this.notify(\"Update\", this.latestValues)\n\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props)\n }\n\n render = () => {\n if (!this.current) return\n this.triggerBuild()\n this.renderInstance(\n this.current,\n this.renderState,\n (this.props as any).style,\n this.projection\n )\n }\n\n private renderScheduledAt = 0.0\n scheduleRender = () => {\n const now = time.now()\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now\n frame.render(this.render, false, true)\n }\n }\n\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox()\n }\n\n getStaticValue(key: string) {\n return this.latestValues[key]\n }\n\n setStaticValue(key: string, value: AnyResolvedKeyframe) {\n this.latestValues[key] = value\n }\n\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(\n props: MotionNodeOptions,\n presenceContext: PresenceContextProps | null\n ) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender()\n }\n\n this.prevProps = this.props\n this.props = props\n\n this.prevPresenceContext = this.presenceContext\n this.presenceContext = presenceContext\n\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i]\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]()\n delete this.propEventSubscriptions[key]\n }\n\n const listenerName = (\"on\" + key) as keyof typeof props\n const listener = props[listenerName]\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key as any, listener)\n }\n }\n\n this.prevMotionValues = updateMotionValuesFromProps(\n this,\n this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this),\n this.prevMotionValues\n )\n\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue()\n }\n }\n\n getProps() {\n return this.props\n }\n\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name: string) {\n return this.props.variants ? this.props.variants[name] : undefined\n }\n\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition\n }\n\n getTransformPagePoint() {\n return (this.props as any).transformPagePoint\n }\n\n getClosestVariantNode(): VisualElement | undefined {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined\n }\n\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child: VisualElement) {\n const closestVariantNode = this.getClosestVariantNode()\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child)\n return () => closestVariantNode.variantChildren!.delete(child)\n }\n }\n\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key: string, value: MotionValue) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key)\n\n if (value !== existingValue) {\n if (existingValue) this.removeValue(key)\n this.bindToMotionValue(key, value)\n this.values.set(key, value)\n this.latestValues[key] = value.get()\n }\n }\n\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key: string) {\n this.values.delete(key)\n const unsubscribe = this.valueSubscriptions.get(key)\n if (unsubscribe) {\n unsubscribe()\n this.valueSubscriptions.delete(key)\n }\n delete this.latestValues[key]\n this.removeValueFromRenderState(key, this.renderState)\n }\n\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key: string) {\n return this.values.has(key)\n }\n\n /**\n * Get a motion value for this key. If called with a default\n * value, we'll create one if none exists.\n */\n getValue(key: string): MotionValue | undefined\n getValue(key: string, defaultValue: AnyResolvedKeyframe | null): MotionValue\n getValue(\n key: string,\n defaultValue?: AnyResolvedKeyframe | null\n ): MotionValue | undefined {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key]\n }\n\n let value = this.values.get(key)\n\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(\n defaultValue === null ? undefined : defaultValue,\n { owner: this }\n )\n this.addValue(key, value)\n }\n\n return value\n }\n\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key: string, target?: AnyResolvedKeyframe | null) {\n let value =\n this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options)\n\n if (value !== undefined && value !== null) {\n if (\n typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))\n ) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value)\n } else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target as string)\n }\n\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value)\n }\n\n return isMotionValue(value) ? value.get() : value\n }\n\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key: string, value: AnyResolvedKeyframe) {\n this.baseTarget[key] = value\n }\n\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key: string): ResolvedValues[string] | undefined | null {\n const { initial } = this.props\n\n let valueFromInitial: ResolvedValues[string] | undefined | null\n\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(\n this.props,\n initial as any,\n this.presenceContext?.custom\n )\n if (variant) {\n valueFromInitial = variant[\n key as keyof typeof variant\n ] as string\n }\n }\n\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial\n }\n\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key)\n if (target !== undefined && !isMotionValue(target)) return target\n\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key]\n }\n\n on(\n eventName: EventName,\n callback: VisualElementEventCallbacks[EventName]\n ) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager()\n }\n\n return this.events[eventName].add(callback)\n }\n\n notify(\n eventName: EventName,\n ...args: any\n ) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args)\n }\n }\n\n scheduleRenderMicrotask() {\n microtask.render(this.render)\n }\n}\n"],"names":["checkIsControllingVariants","checkIsVariantNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+CA,MAAM,iBAAiB,GAAG;IACtB,gBAAgB;IAChB,mBAAmB;IACnB,QAAQ;IACR,qBAAqB;IACrB,eAAe;IACf,sBAAsB;IACtB,yBAAyB;CACnB;AAEV;;AAEG;AACH,IAAI,kBAAkB,GAAgC,EAAE;AAExD;;;AAGG;AACG,SAAU,qBAAqB,CACjC,WAAwC,EAAA;IAExC,kBAAkB,GAAG,WAAW;AACpC;AAEA;;AAEG;SACa,qBAAqB,GAAA;AACjC,IAAA,OAAO,kBAAkB;AAC7B;AASA;;;AAGG;MACmB,aAAa,CAAA;AA2F/B;;;;;;AAMG;AACH,IAAA,2BAA2B,CACvB,MAAyB,EACzB,UAA6B,EAC7B,cAA6B,EAAA;AAI7B,QAAA,OAAO,EAAE;IACb;AA4LA,IAAA,WAAA,CACI,EACI,MAAM,EACN,KAAK,EACL,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,WAAW,GAC+B,EAC9C,UAAmB,EAAS,EAAA;AApMhC;;;AAGG;QACH,IAAA,CAAA,OAAO,GAAoB,IAAI;AAO/B;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,GAAG,EAAiB;AAyBnC;;AAEG;QACH,IAAA,CAAA,aAAa,GAAY,KAAK;QAC9B,IAAA,CAAA,qBAAqB,GAAY,KAAK;AAStC;;;;;;AAMG;QACH,IAAA,CAAA,kBAAkB,GAAmB,IAAI;AAEzC;;;AAGG;QACH,IAAA,CAAA,oBAAoB,GAAY,KAAK;AAuBrC;;;;AAIG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,GAAG,EAAuB;QAOvC,IAAA,CAAA,gBAAgB,GAAG,gBAAgB;AAiBnC;;AAEG;QACK,IAAA,CAAA,QAAQ,GAEZ,EAAE;AAEN;;;AAGG;AACK,Q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C,GAAG,CAAC,QAAQ,CAAC;IAC/C;AAEA,IAAA,MAAM,CACF,SAAoB,EACpB,GAAG,IAAS,EAAA;AAEZ,QAAA,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;YACxB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAC1C;IACJ;IAEA,uBAAuB,GAAA;AACnB,QAAA,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;IACjC;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs deleted file mode 100644 index ee72b5e5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs +++ /dev/null @@ -1,43 +0,0 @@ -import { isMotionValue } from '../../value/utils/is-motion-value.mjs'; -import { DOMKeyframesResolver } from '../../animation/keyframes/DOMKeyframesResolver.mjs'; -import { VisualElement } from '../VisualElement.mjs'; - -class DOMVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.KeyframeResolver = DOMKeyframesResolver; - } - sortInstanceNodePosition(a, b) { - /** - * compareDocumentPosition returns a bitmask, by using the bitwise & - * we're returning true if 2 in that bitmask is set to true. 2 is set - * to true if b preceeds a. - */ - return a.compareDocumentPosition(b) & 2 ? 1 : -1; - } - getBaseTargetFromProps(props, key) { - const style = props.style; - return style ? style[key] : undefined; - } - removeValueFromRenderState(key, { vars, style }) { - delete vars[key]; - delete style[key]; - } - handleChildMotionValue() { - if (this.childSubscription) { - this.childSubscription(); - delete this.childSubscription; - } - const { children } = this.props; - if (isMotionValue(children)) { - this.childSubscription = children.on("change", (latest) => { - if (this.current) { - this.current.textContent = `${latest}`; - } - }); - } - } -} - -export { DOMVisualElement }; -//# sourceMappingURL=DOMVisualElement.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.map deleted file mode 100644 index 99b2be9b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DOMVisualElement.mjs","sources":["../../../../src/render/dom/DOMVisualElement.ts"],"sourcesContent":["import { isMotionValue } from \"../../value/utils/is-motion-value\"\nimport type { MotionValue } from \"../../value\"\nimport type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { DOMKeyframesResolver } from \"../../animation/keyframes/DOMKeyframesResolver\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport type { DOMVisualElementOptions } from \"./types\"\nimport type { HTMLRenderState } from \"../html/types\"\nimport { VisualElement, MotionStyle } from \"../VisualElement\"\n\nexport abstract class DOMVisualElement<\n Instance extends HTMLElement | SVGElement = HTMLElement,\n State extends HTMLRenderState = HTMLRenderState,\n Options extends DOMVisualElementOptions = DOMVisualElementOptions\n> extends VisualElement {\n sortInstanceNodePosition(a: Instance, b: Instance): number {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1\n }\n\n getBaseTargetFromProps(\n props: MotionNodeOptions,\n key: string\n ): AnyResolvedKeyframe | MotionValue | undefined {\n const style = (props as MotionNodeOptions & { style?: MotionStyle }).style\n return style ? (style[key] as string) : undefined\n }\n\n removeValueFromRenderState(\n key: string,\n { vars, style }: HTMLRenderState\n ): void {\n delete vars[key]\n delete style[key]\n }\n\n KeyframeResolver = DOMKeyframesResolver\n\n childSubscription?: VoidFunction\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription()\n delete this.childSubscription\n }\n\n const { children } = this.props as MotionNodeOptions & { children?: MotionValue | any }\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`\n }\n })\n }\n }\n}\n"],"names":[],"mappings":";;;;AASM,MAAgB,gBAIpB,SAAQ,aAAuC,CAAA;AAJjD,IAAA,WAAA,GAAA;;QA8BI,IAAA,CAAA,gBAAgB,GAAG,oBAAoB;IAkB3C;IA3CI,wBAAwB,CAAC,CAAW,EAAE,CAAW,EAAA;AAC7C;;;;AAIG;AACH,QAAA,OAAO,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE;IACpD;IAEA,sBAAsB,CAClB,KAAwB,EACxB,GAAW,EAAA;AAEX,QAAA,MAAM,KAAK,GAAI,KAAqD,CAAC,KAAK;AAC1E,QAAA,OAAO,KAAK,GAAI,KAAK,CAAC,GAAG,CAAY,GAAG,SAAS;IACrD;AAEA,IAAA,0BAA0B,CACtB,GAAW,EACX,EAAE,IAAI,EAAE,KAAK,EAAmB,EAAA;AAEhC,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC;AAChB,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC;IACrB;IAKA,sBAAsB,GAAA;AAClB,QAAA,IAAI,IAAI,CAAC,iBAAiB,EAAE;YACxB,IAAI,CAAC,iBAAiB,EAAE;YACxB,OAAO,IAAI,CAAC,iBAAiB;QACjC;AAEA,QAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAA6D;AACvF,QAAA,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;AACzB,YAAA,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,KAAI;AACtD,gBAAA,IAAI,IAAI,CAAC,OAAO,EAAE;oBACd,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,CAAA,EAAG,MAAM,EAAE;gBAC1C;AACJ,YAAA,CAAC,CAAC;QACN;IACJ;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs deleted file mode 100644 index 7ee34f47..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const isCSSVar = (name) => name.startsWith("--"); - -export { isCSSVar }; -//# sourceMappingURL=is-css-var.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs.map deleted file mode 100644 index 55eaadbe..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-css-var.mjs","sources":["../../../../src/render/dom/is-css-var.ts"],"sourcesContent":["export const isCSSVar = (name: string) => name.startsWith(\"--\")\n"],"names":[],"mappings":"AAAO,MAAM,QAAQ,GAAG,CAAC,IAAY,KAAK,IAAI,CAAC,UAAU,CAAC,IAAI;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs deleted file mode 100644 index 414bdf38..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs +++ /dev/null @@ -1,84 +0,0 @@ -const radToDeg = (rad) => (rad * 180) / Math.PI; -const rotate = (v) => { - const angle = radToDeg(Math.atan2(v[1], v[0])); - return rebaseAngle(angle); -}; -const matrix2dParsers = { - x: 4, - y: 5, - translateX: 4, - translateY: 5, - scaleX: 0, - scaleY: 3, - scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2, - rotate, - rotateZ: rotate, - skewX: (v) => radToDeg(Math.atan(v[1])), - skewY: (v) => radToDeg(Math.atan(v[2])), - skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2, -}; -const rebaseAngle = (angle) => { - angle = angle % 360; - if (angle < 0) - angle += 360; - return angle; -}; -const rotateZ = rotate; -const scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]); -const scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]); -const matrix3dParsers = { - x: 12, - y: 13, - z: 14, - translateX: 12, - translateY: 13, - translateZ: 14, - scaleX, - scaleY, - scale: (v) => (scaleX(v) + scaleY(v)) / 2, - rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))), - rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))), - rotateZ, - rotate: rotateZ, - skewX: (v) => radToDeg(Math.atan(v[4])), - skewY: (v) => radToDeg(Math.atan(v[1])), - skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2, -}; -function defaultTransformValue(name) { - return name.includes("scale") ? 1 : 0; -} -function parseValueFromTransform(transform, name) { - if (!transform || transform === "none") { - return defaultTransformValue(name); - } - const matrix3dMatch = transform.match(/^matrix3d\(([-\d.e\s,]+)\)$/u); - let parsers; - let match; - if (matrix3dMatch) { - parsers = matrix3dParsers; - match = matrix3dMatch; - } - else { - const matrix2dMatch = transform.match(/^matrix\(([-\d.e\s,]+)\)$/u); - parsers = matrix2dParsers; - match = matrix2dMatch; - } - if (!match) { - return defaultTransformValue(name); - } - const valueParser = parsers[name]; - const values = match[1].split(",").map(convertTransformToNumber); - return typeof valueParser === "function" - ? valueParser(values) - : values[valueParser]; -} -const readTransformValue = (instance, name) => { - const { transform = "none" } = getComputedStyle(instance); - return parseValueFromTransform(transform, name); -}; -function convertTransformToNumber(value) { - return parseFloat(value.trim()); -} - -export { defaultTransformValue, parseValueFromTransform, readTransformValue }; -//# sourceMappingURL=parse-transform.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.map deleted file mode 100644 index 0a97a8c2..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse-transform.mjs","sources":["../../../../src/render/dom/parse-transform.ts"],"sourcesContent":["import { transformPropOrder } from \"../utils/keys-transform\"\n\nconst radToDeg = (rad: number) => (rad * 180) / Math.PI\n\ntype MatrixParser = (values: number[]) => number\n\ntype MatrixParsers = Record<\n (typeof transformPropOrder)[number],\n number | MatrixParser\n>\n\nconst rotate = (v: number[]) => {\n const angle = radToDeg(Math.atan2(v[1], v[0]))\n return rebaseAngle(angle)\n}\n\nconst matrix2dParsers: MatrixParsers = {\n x: 4,\n y: 5,\n translateX: 4,\n translateY: 5,\n scaleX: 0,\n scaleY: 3,\n scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n} as const\n\nconst rebaseAngle = (angle: number) => {\n angle = angle % 360\n if (angle < 0) angle += 360\n return angle\n}\n\nconst rotateZ = rotate\n\nconst scaleX = (v: number[]) => Math.sqrt(v[0] * v[0] + v[1] * v[1])\nconst scaleY = (v: number[]) => Math.sqrt(v[4] * v[4] + v[5] * v[5])\n\nconst matrix3dParsers: MatrixParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n} as const\n\nexport function defaultTransformValue(name: string): number {\n return name.includes(\"scale\") ? 1 : 0\n}\n\nexport function parseValueFromTransform(\n transform: string | undefined,\n name: string\n): number {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name)\n }\n\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u)\n\n let parsers: MatrixParsers\n let match: RegExpMatchArray | null\n\n if (matrix3dMatch) {\n parsers = matrix3dParsers\n match = matrix3dMatch\n } else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u)\n\n parsers = matrix2dParsers\n match = matrix2dMatch\n }\n\n if (!match) {\n return defaultTransformValue(name)\n }\n\n const valueParser = parsers[name]\n const values = match[1].split(\",\").map(convertTransformToNumber)\n\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser]\n}\n\nexport const readTransformValue = (instance: HTMLElement, name: string) => {\n const { transform = \"none\" } = getComputedStyle(instance)\n return parseValueFromTransform(transform, name)\n}\n\nfunction convertTransformToNumber(value: string): number {\n return parseFloat(value.trim())\n}\n"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,GAAW,KAAK,CAAC,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,EAAE;AASvD,MAAM,MAAM,GAAG,CAAC,CAAW,KAAI;AAC3B,IAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CA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AACzD,IAAA,OAAO,uBAAuB,CAAC,SAAS,EAAE,IAAI,CAAC;AACnD;AAEA,SAAS,wBAAwB,CAAC,KAAa,EAAA;AAC3C,IAAA,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;AACnC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-computed.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-computed.mjs deleted file mode 100644 index 73002fbd..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-computed.mjs +++ /dev/null @@ -1,11 +0,0 @@ -import { isCSSVar } from './is-css-var.mjs'; - -function getComputedStyle(element, name) { - const computedStyle = window.getComputedStyle(element); - return isCSSVar(name) - ? computedStyle.getPropertyValue(name) - : computedStyle[name]; -} - -export { getComputedStyle }; -//# sourceMappingURL=style-computed.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-computed.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-computed.mjs.map deleted file mode 100644 index 4a930db6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-computed.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"style-computed.mjs","sources":["../../../../src/render/dom/style-computed.ts"],"sourcesContent":["import { isCSSVar } from \"./is-css-var\"\n\nexport function getComputedStyle(\n element: HTMLElement | SVGElement,\n name: string\n) {\n const computedStyle = window.getComputedStyle(element)\n return isCSSVar(name)\n ? computedStyle.getPropertyValue(name)\n : computedStyle[name as any]\n}\n"],"names":[],"mappings":";;AAEM,SAAU,gBAAgB,CAC5B,OAAiC,EACjC,IAAY,EAAA;IAEZ,MAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC;IACtD,OAAO,QAAQ,CAAC,IAAI;AAChB,UAAE,aAAa,CAAC,gBAAgB,CAAC,IAAI;AACrC,UAAE,aAAa,CAAC,IAAW,CAAC;AACpC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-set.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-set.mjs deleted file mode 100644 index e4389cca..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-set.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { isCSSVar } from './is-css-var.mjs'; - -function setStyle(element, name, value) { - isCSSVar(name) - ? element.style.setProperty(name, value) - : (element.style[name] = value); -} - -export { setStyle }; -//# sourceMappingURL=style-set.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-set.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-set.mjs.map deleted file mode 100644 index 68ee566c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/style-set.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"style-set.mjs","sources":["../../../../src/render/dom/style-set.ts"],"sourcesContent":["import { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isCSSVar } from \"./is-css-var\"\n\nexport function setStyle(\n element: HTMLElement | SVGElement,\n name: string,\n value: AnyResolvedKeyframe\n) {\n isCSSVar(name)\n ? element.style.setProperty(name, value as string)\n : (element.style[name as any] = value as string)\n}\n"],"names":[],"mappings":";;SAGgB,QAAQ,CACpB,OAAiC,EACjC,IAAY,EACZ,KAA0B,EAAA;IAE1B,QAAQ,CAAC,IAAI;UACP,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAe;WAC9C,OAAO,CAAC,KAAK,CAAC,IAAW,CAAC,GAAG,KAAe,CAAC;AACxD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs deleted file mode 100644 index aa8caef7..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs +++ /dev/null @@ -1,6 +0,0 @@ -function camelToDash(str) { - return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`); -} - -export { camelToDash }; -//# sourceMappingURL=camel-to-dash.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs.map deleted file mode 100644 index 6942af23..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"camel-to-dash.mjs","sources":["../../../../../src/render/dom/utils/camel-to-dash.ts"],"sourcesContent":["export function camelToDash(str: string): string {\n return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`)\n}\n"],"names":[],"mappings":"AAAM,SAAU,WAAW,CAAC,GAAW,EAAA;AACnC,IAAA,OAAO,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,KAAK,IAAI,KAAK,CAAC,WAAW,EAAE,CAAA,CAAE,CAAC;AACxE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs deleted file mode 100644 index 9af18228..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs +++ /dev/null @@ -1,45 +0,0 @@ -import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs'; -import { transformProps } from '../utils/keys-transform.mjs'; -import { defaultTransformValue, readTransformValue } from '../dom/parse-transform.mjs'; -import { measureViewportBox } from '../../projection/utils/measure.mjs'; -import { DOMVisualElement } from '../dom/DOMVisualElement.mjs'; -import { buildHTMLStyles } from './utils/build-styles.mjs'; -import { renderHTML } from './utils/render.mjs'; -import { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs'; - -function getComputedStyle(element) { - return window.getComputedStyle(element); -} -class HTMLVisualElement extends DOMVisualElement { - constructor() { - super(...arguments); - this.type = "html"; - this.renderInstance = renderHTML; - } - readValueFromInstance(instance, key) { - if (transformProps.has(key)) { - return this.projection?.isProjecting - ? defaultTransformValue(key) - : readTransformValue(instance, key); - } - else { - const computedStyle = getComputedStyle(instance); - const value = (isCSSVariableName(key) - ? computedStyle.getPropertyValue(key) - : computedStyle[key]) || 0; - return typeof value === "string" ? value.trim() : value; - } - } - measureInstanceViewportBox(instance, { transformPagePoint }) { - return measureViewportBox(instance, transformPagePoint); - } - build(renderState, latestValues, props) { - buildHTMLStyles(renderState, latestValues, props.transformTemplate); - } - scrapeMotionValuesFromProps(props, prevProps, visualElement) { - return scrapeMotionValuesFromProps(props, prevProps, visualElement); - } -} - -export { HTMLVisualElement, getComputedStyle }; -//# sourceMappingURL=HTMLVisualElement.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.map deleted file mode 100644 index 6d8859e4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HTMLVisualElement.mjs","sources":["../../../../src/render/html/HTMLVisualElement.ts"],"sourcesContent":["import type { Box } from \"motion-utils\"\nimport type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isCSSVariableName } from \"../../animation/utils/is-css-variable\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport { transformProps } from \"../utils/keys-transform\"\nimport {\n defaultTransformValue,\n readTransformValue,\n} from \"../dom/parse-transform\"\nimport { measureViewportBox } from \"../../projection/utils/measure\"\nimport { DOMVisualElement } from \"../dom/DOMVisualElement\"\nimport type { DOMVisualElementOptions } from \"../dom/types\"\nimport type { ResolvedValues, MotionConfigContextProps } from \"../types\"\nimport type { VisualElement } from \"../VisualElement\"\nimport { HTMLRenderState } from \"./types\"\nimport { buildHTMLStyles } from \"./utils/build-styles\"\nimport { renderHTML } from \"./utils/render\"\nimport { scrapeMotionValuesFromProps } from \"./utils/scrape-motion-values\"\n\nexport function getComputedStyle(element: HTMLElement) {\n return window.getComputedStyle(element)\n}\n\nexport class HTMLVisualElement extends DOMVisualElement<\n HTMLElement,\n HTMLRenderState,\n DOMVisualElementOptions\n> {\n type = \"html\"\n\n readValueFromInstance(\n instance: HTMLElement,\n key: string\n ): AnyResolvedKeyframe | null | undefined {\n if (transformProps.has(key)) {\n return this.projection?.isProjecting\n ? defaultTransformValue(key)\n : readTransformValue(instance, key)\n } else {\n const computedStyle = getComputedStyle(instance)\n const value =\n (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key as keyof typeof computedStyle]) || 0\n\n return typeof value === \"string\" ? value.trim() : (value as number)\n }\n }\n\n measureInstanceViewportBox(\n instance: HTMLElement,\n { transformPagePoint }: MotionNodeOptions & Partial\n ): Box {\n return measureViewportBox(instance, transformPagePoint)\n }\n\n build(\n renderState: HTMLRenderState,\n latestValues: ResolvedValues,\n props: MotionNodeOptions\n ) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate)\n }\n\n scrapeMotionValuesFromProps(\n props: MotionNodeOptions,\n prevProps: MotionNodeOptions,\n visualElement: VisualElement\n ) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement)\n }\n\n renderInstance = renderHTML\n}\n"],"names":[],"mappings":";;;;;;;;;AAmBM,SAAU,gBAAgB,CAAC,OAAoB,EAAA;AACjD,IAAA,OAAO,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC;AAC3C;AAEM,MAAO,iBAAkB,SAAQ,gBAItC,CAAA;AAJD,IAAA,WAAA,GAAA;;QAKI,IAAA,CAAA,IAAI,GAAG,MAAM;QA4Cb,IAAA,CAAA,cAAc,GAAG,UAAU;IAC/B;IA3CI,qBAAqB,CACjB,QAAqB,EACrB,GAAW,EAAA;AAEX,QAAA,IAAI,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;AACzB,YAAA,OAAO,IAAI,CAAC,UAAU,EAAE;AACpB,kBAAE,qBAAqB,CAAC,GAAG;AAC3B,kBAAE,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC;QAC3C;aAAO;AACH,YAAA,MAAM,aAAa,GAAG,gBAAgB,CAAC,QAAQ,CAAC;AAChD,YAAA,MAAM,KAAK,GACP,CAAC,iBAAiB,CAAC,GAAG;AAClB,kBAAE,aAAa,CAAC,gBAAgB,CAAC,GAAG;kBAClC,aAAa,CAAC,GAAiC,CAAC,KAAK,CAAC;AAEhE,YAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,CAAC,IAAI,EAAE,GAAI,KAAgB;QACvE;IACJ;AAEA,IAAA,0BAA0B,CACtB,QAAqB,EACrB,EAAE,kBAAkB,EAAyD,EAAA;AAE7E,QAAA,OAAO,kBAAkB,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IAC3D;AAEA,IAAA,KAAK,CACD,WAA4B,EAC5B,YAA4B,EAC5B,KAAwB,EAAA;QAExB,eAAe,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACvE;AAEA,IAAA,2BAA2B,CACvB,KAAwB,EACxB,SAA4B,EAC5B,aAA4B,EAAA;QAE5B,OAAO,2BAA2B,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC;IACvE;AAGH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs deleted file mode 100644 index bd068f2b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs +++ /dev/null @@ -1,66 +0,0 @@ -import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs'; -import { numberValueTypes } from '../../../value/types/maps/number.mjs'; -import { transformProps } from '../../utils/keys-transform.mjs'; -import { isCSSVariableName } from '../../../animation/utils/is-css-variable.mjs'; -import { buildTransform } from './build-transform.mjs'; - -function buildHTMLStyles(state, latestValues, transformTemplate) { - const { style, vars, transformOrigin } = state; - // Track whether we encounter any transform or transformOrigin values. - let hasTransform = false; - let hasTransformOrigin = false; - /** - * Loop over all our latest animated values and decide whether to handle them - * as a style or CSS variable. - * - * Transforms and transform origins are kept separately for further processing. - */ - for (const key in latestValues) { - const value = latestValues[key]; - if (transformProps.has(key)) { - // If this is a transform, flag to enable further transform processing - hasTransform = true; - continue; - } - else if (isCSSVariableName(key)) { - vars[key] = value; - continue; - } - else { - // Convert the value to its default value type, ie 0 -> "0px" - const valueAsType = getValueAsType(value, numberValueTypes[key]); - if (key.startsWith("origin")) { - // If this is a transform origin, flag and enable further transform-origin processing - hasTransformOrigin = true; - transformOrigin[key] = - valueAsType; - } - else { - style[key] = valueAsType; - } - } - } - if (!latestValues.transform) { - if (hasTransform || transformTemplate) { - style.transform = buildTransform(latestValues, state.transform, transformTemplate); - } - else if (style.transform) { - /** - * If we have previously created a transform but currently don't have any, - * reset transform style to none. - */ - style.transform = "none"; - } - } - /** - * Build a transformOrigin style. Uses the same defaults as the browser for - * undefined origins. - */ - if (hasTransformOrigin) { - const { originX = "50%", originY = "50%", originZ = 0, } = transformOrigin; - style.transformOrigin = `${originX} ${originY} ${originZ}`; - } -} - -export { buildHTMLStyles }; -//# sourceMappingURL=build-styles.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs.map deleted file mode 100644 index cb0f620a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"build-styles.mjs","sources":["../../../../../src/render/html/utils/build-styles.ts"],"sourcesContent":["import { getValueAsType } from \"../../../value/types/utils/get-as-type\"\nimport { numberValueTypes } from \"../../../value/types/maps/number\"\nimport { transformProps } from \"../../utils/keys-transform\"\nimport { isCSSVariableName } from \"../../../animation/utils/is-css-variable\"\nimport { ResolvedValues } from \"../../types\"\nimport { HTMLRenderState } from \"../types\"\nimport { buildTransform } from \"./build-transform\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\n\nexport function buildHTMLStyles(\n state: HTMLRenderState,\n latestValues: ResolvedValues,\n transformTemplate?: MotionNodeOptions[\"transformTemplate\"]\n) {\n const { style, vars, transformOrigin } = state\n\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false\n let hasTransformOrigin = false\n\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept separately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key]\n\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true\n continue\n } else if (isCSSVariableName(key)) {\n vars[key] = value\n continue\n } else {\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueAsType = getValueAsType(value, numberValueTypes[key])\n\n if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true\n transformOrigin[key as keyof typeof transformOrigin] =\n valueAsType\n } else {\n style[key] = valueAsType\n }\n }\n }\n\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(\n latestValues,\n state.transform,\n transformTemplate\n )\n } else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\"\n }\n }\n\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const {\n originX = \"50%\",\n originY = \"50%\",\n originZ = 0,\n } = transformOrigin\n style.transformOrigin = `${originX} ${originY} ${originZ}`\n }\n}\n"],"names":[],"mappings":";;;;;;SASgB,eAAe,CAC3B,KAAsB,EACtB,YAA4B,EAC5B,iBAA0D,EAAA;IAE1D,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,KAAK;;IAG9C,IAAI,YAAY,GAAG,KAAK;IACxB,IAAI,kBAAkB,GAAG,KAAK;AAE9B;;;;;AAKG;AACH,IAAA,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE;AAC5B,QAAA,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC;AAE/B,QAAA,IAAI,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;;YAEzB,YAAY,GAAG,IAAI;YACnB;QACJ;AAAO,aAAA,IAAI,iBAAiB,CAAC,GAAG,CAAC,EAAE;AAC/B,YAAA,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK;YACjB;QACJ;aAAO;;YAEH,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAEhE,YAAA,IAAI,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;;gBAE1B,kBAAkB,GAAG,IAAI;gBACzB,eAAe,CAAC,GAAmC,CAAC;AAChD,oBAAA,WAAW;YACnB;iBAAO;AACH,gBAAA,KAAK,CAAC,GAAG,CAAC,GAAG,WAAW;YAC5B;QACJ;IACJ;AAEA,IAAA,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE;AACzB,QAAA,IAAI,YAAY,IAAI,iBAAiB,EAAE;AACnC,YAAA,KAAK,CAAC,SAAS,GAAG,cAAc,CAC5B,YAAY,EACZ,KAAK,CAAC,SAAS,EACf,iBAAiB,CACpB;QACL;AAAO,aAAA,IAAI,KAAK,CAAC,SAAS,EAAE;AACxB;;;AAGG;AACH,YAAA,KAAK,CAAC,SAAS,GAAG,MAAM;QAC5B;IACJ;AAEA;;;AAGG;IACH,IAAI,kBAAkB,EAAE;AACpB,QAAA,MAAM,EACF,OAAO,GAAG,KAAK,EACf,OAAO,GAAG,KAAK,EACf,OAAO,GAAG,CAAC,GACd,GAAG,eAAe;QACnB,KAAK,CAAC,eAAe,GAAG,CAAA,EAAG,OAAO,IAAI,OAAO,CAAA,CAAA,EAAI,OAAO,CAAA,CAAE;IAC9D;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs deleted file mode 100644 index 30f8a576..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs +++ /dev/null @@ -1,72 +0,0 @@ -import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs'; -import { numberValueTypes } from '../../../value/types/maps/number.mjs'; -import { transformPropOrder } from '../../utils/keys-transform.mjs'; - -const translateAlias = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective", -}; -const numTransforms = transformPropOrder.length; -/** - * Build a CSS transform style from individual x/y/scale etc properties. - * - * This outputs with a default order of transforms/scales/rotations, this can be customised by - * providing a transformTemplate function. - */ -function buildTransform(latestValues, transform, transformTemplate) { - // The transform string we're going to build into. - let transformString = ""; - let transformIsDefault = true; - /** - * Loop over all possible transforms in order, adding the ones that - * are present to the transform string. - */ - for (let i = 0; i < numTransforms; i++) { - const key = transformPropOrder[i]; - const value = latestValues[key]; - if (value === undefined) - continue; - let valueIsDefault = true; - if (typeof value === "number") { - valueIsDefault = value === (key.startsWith("scale") ? 1 : 0); - } - else { - const parsed = parseFloat(value); - valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0; - } - if (!valueIsDefault || transformTemplate) { - const valueAsType = getValueAsType(value, numberValueTypes[key]); - if (!valueIsDefault) { - transformIsDefault = false; - const transformName = translateAlias[key] || key; - transformString += `${transformName}(${valueAsType}) `; - } - if (transformTemplate) { - transform[key] = valueAsType; - } - } - } - // `pathRotation` composes onto `rotate` as a separate additive term so - // the user's `rotate` is never clobbered. Deliberately not a slot in - // `transformPropOrder`. - const pathRotation = latestValues.pathRotation; - if (pathRotation) { - transformIsDefault = false; - transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `; - } - transformString = transformString.trim(); - // If we have a custom `transform` template, pass our transform values and - // generated transformString to that before returning - if (transformTemplate) { - transformString = transformTemplate(transform, transformIsDefault ? "" : transformString); - } - else if (transformIsDefault) { - transformString = "none"; - } - return transformString; -} - -export { buildTransform }; -//# sourceMappingURL=build-transform.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.map deleted file mode 100644 index fe879d2f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"build-transform.mjs","sources":["../../../../../src/render/html/utils/build-transform.ts"],"sourcesContent":["import { getValueAsType } from \"../../../value/types/utils/get-as-type\"\nimport { numberValueTypes } from \"../../../value/types/maps/number\"\nimport { transformPropOrder } from \"../../utils/keys-transform\"\nimport { ResolvedValues } from \"../../types\"\nimport { HTMLRenderState } from \"../types\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n}\n\nconst numTransforms = transformPropOrder.length\n\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nexport function buildTransform(\n latestValues: ResolvedValues,\n transform: HTMLRenderState[\"transform\"],\n transformTemplate?: MotionNodeOptions[\"transformTemplate\"]\n) {\n // The transform string we're going to build into.\n let transformString = \"\"\n let transformIsDefault = true\n\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i] as keyof typeof translateAlias\n const value = latestValues[key]\n\n if (value === undefined) continue\n\n let valueIsDefault = true\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0)\n } else {\n const parsed = parseFloat(value)\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0\n }\n\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key])\n\n if (!valueIsDefault) {\n transformIsDefault = false\n const transformName = translateAlias[key] || key\n transformString += `${transformName}(${valueAsType}) `\n }\n\n if (transformTemplate) {\n transform[key] = valueAsType\n }\n }\n }\n\n // `pathRotation` composes onto `rotate` as a separate additive term so\n // the user's `rotate` is never clobbered. Deliberately not a slot in\n // `transformPropOrder`.\n const pathRotation = latestValues.pathRotation\n if (pathRotation) {\n transformIsDefault = false\n transformString += `rotate(${getValueAsType(\n pathRotation,\n numberValueTypes.pathRotation\n )}) `\n }\n\n transformString = transformString.trim()\n\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(\n transform,\n transformIsDefault ? \"\" : transformString\n )\n } else if (transformIsDefault) {\n transformString = \"none\"\n }\n\n return transformString\n}\n"],"names":[],"mappings":";;;;AAOA,MAAM,cAAc,GAAG;AACnB,IAAA,CAAC,EAAE,YAAY;AACf,IAAA,CAAC,EAAE,YAAY;AACf,IAAA,CAAC,EAAE,YAAY;AACf,IAAA,oBAAoB,EAAE,aAAa;CACtC;AAED,MAAM,aAAa,GAAG,kBAAkB,CAAC,MAAM;AAE/C;;;;;AAKG;SACa,cAAc,CAC1B,YAA4B,EAC5B,SAAuC,EACvC,iBAA0D,EAAA;;IAG1D,IAAI,eAAe,GAAG,EAAE;IACxB,IAAI,kBAAkB,GAAG,IAAI;AAE7B;;;AAGG;AACH,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,EAAE,CAAC,EAAE,EAAE;AACpC,QAAA,MAAM,GAAG,GAAG,kBAAkB,CAAC,CAAC,CAAgC;AAChE,QAAA,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC;QAE/B,IAAI,KAAK,KAAK,SAAS;YAAE;QAEzB,IAAI,cAAc,GAAG,IAAI;AACzB,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC3B,YAAA,cAAc,GAAG,KAAK,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChE;aAAO;AACH,YAAA,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC;AAChC,YAAA,cAAc,GAAG,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,MAAM,KAAK,CAAC,GAAG,MAAM,KAAK,CAAC;QAC1E;AAEA,QAAA,IAAI,CAAC,cAAc,IAAI,iBAAiB,EAAE;YACtC,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC;YAEhE,IAAI,CAAC,cAAc,EAAE;gBACjB,kBAAkB,GAAG,KAAK;gBAC1B,MAAM,aAAa,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,GAAG;AAChD,gBAAA,eAAe,IAAI,CAAA,EAAG,aAAa,CAAA,CAAA,EAAI,WAAW,IAAI;YAC1D;YAEA,IAAI,iBAAiB,EAAE;AACnB,gBAAA,SAAS,CAAC,GAAG,CAAC,GAAG,WAAW;YAChC;QACJ;IACJ;;;;AAKA,IAAA,MAAM,YAAY,GAAG,YAAY,CAAC,YAAY;IAC9C,IAAI,YAAY,EAAE;QACd,kBAAkB,GAAG,KAAK;QAC1B,eAAe,IAAI,CAAA,OAAA,EAAU,cAAc,CACvC,YAAY,EACZ,gBAAgB,CAAC,YAAY,CAChC,CAAA,EAAA,CAAI;IACT;AAEA,IAAA,eAAe,GAAG,eAAe,CAAC,IAAI,EAAE;;;IAIxC,IAAI,iBAAiB,EAAE;AACnB,QAAA,eAAe,GAAG,iBAAiB,CAC/B,SAAS,EACT,kBAAkB,GAAG,EAAE,GAAG,eAAe,CAC5C;IACL;SAAO,IAAI,kBAAkB,EAAE;QAC3B,eAAe,GAAG,MAAM;IAC5B;AAEA,IAAA,OAAO,eAAe;AAC1B;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/render.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/render.mjs deleted file mode 100644 index d5e52410..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/render.mjs +++ /dev/null @@ -1,18 +0,0 @@ -function renderHTML(element, { style, vars }, styleProp, projection) { - const elementStyle = element.style; - let key; - for (key in style) { - // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type. - elementStyle[key] = style[key]; - } - // Write projection styles directly to element style - projection?.applyProjectionStyles(elementStyle, styleProp); - for (key in vars) { - // Loop over any CSS variables and assign those. - // They can only be assigned using `setProperty`. - elementStyle.setProperty(key, vars[key]); - } -} - -export { renderHTML }; -//# sourceMappingURL=render.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.map deleted file mode 100644 index c8252494..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"render.mjs","sources":["../../../../../src/render/html/utils/render.ts"],"sourcesContent":["import type { MotionStyle } from \"../../VisualElement\"\nimport { HTMLRenderState } from \"../types\"\n\nexport function renderHTML(\n element: HTMLElement,\n { style, vars }: HTMLRenderState,\n styleProp?: MotionStyle,\n projection?: any\n) {\n const elementStyle = element.style\n\n let key: string\n for (key in style) {\n // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type.\n elementStyle[key as unknown as number] = style[key] as string\n }\n\n // Write projection styles directly to element style\n projection?.applyProjectionStyles(elementStyle, styleProp)\n\n for (key in vars) {\n // Loop over any CSS variables and assign those.\n // They can only be assigned using `setProperty`.\n elementStyle.setProperty(key, vars[key] as string)\n }\n}\n"],"names":[],"mappings":"AAGM,SAAU,UAAU,CACtB,OAAoB,EACpB,EAAE,KAAK,EAAE,IAAI,EAAmB,EAChC,SAAuB,EACvB,UAAgB,EAAA;AAEhB,IAAA,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK;AAElC,IAAA,IAAI,GAAW;AACf,IAAA,KAAK,GAAG,IAAI,KAAK,EAAE;;QAEf,YAAY,CAAC,GAAwB,CAAC,GAAG,KAAK,CAAC,GAAG,CAAW;IACjE;;AAGA,IAAA,UAAU,EAAE,qBAAqB,CAAC,YAAY,EAAE,SAAS,CAAC;AAE1D,IAAA,KAAK,GAAG,IAAI,IAAI,EAAE;;;QAGd,YAAY,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAW,CAAC;IACtD;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs deleted file mode 100644 index fa40038b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs +++ /dev/null @@ -1,22 +0,0 @@ -import { isMotionValue } from '../../../value/utils/is-motion-value.mjs'; -import { isForcedMotionValue } from '../../utils/is-forced-motion-value.mjs'; - -function scrapeMotionValuesFromProps(props, prevProps, visualElement) { - const style = props.style; - const prevStyle = prevProps?.style; - const newValues = {}; - if (!style) - return newValues; - for (const key in style) { - if (isMotionValue(style[key]) || - (prevStyle && isMotionValue(prevStyle[key])) || - isForcedMotionValue(key, props) || - visualElement?.getValue(key)?.liveStyle !== undefined) { - newValues[key] = style[key]; - } - } - return newValues; -} - -export { scrapeMotionValuesFromProps }; -//# sourceMappingURL=scrape-motion-values.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs.map deleted file mode 100644 index e8a85c55..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scrape-motion-values.mjs","sources":["../../../../../src/render/html/utils/scrape-motion-values.ts"],"sourcesContent":["import { isMotionValue } from \"../../../value/utils/is-motion-value\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\nimport { isForcedMotionValue } from \"../../utils/is-forced-motion-value\"\nimport type { VisualElement } from \"../../VisualElement\"\n\nexport function scrapeMotionValuesFromProps(\n props: MotionNodeOptions,\n prevProps: MotionNodeOptions,\n visualElement?: VisualElement\n) {\n const style = (props as any).style\n const prevStyle = (prevProps as any)?.style\n const newValues: { [key: string]: any } = {}\n\n if (!style) return newValues\n\n for (const key in style) {\n if (\n isMotionValue(style[key]) ||\n (prevStyle && isMotionValue(prevStyle[key])) ||\n isForcedMotionValue(key, props) ||\n visualElement?.getValue(key)?.liveStyle !== undefined\n ) {\n newValues[key] = style[key]\n }\n }\n\n return newValues\n}\n"],"names":[],"mappings":";;;SAKgB,2BAA2B,CACvC,KAAwB,EACxB,SAA4B,EAC5B,aAA6B,EAAA;AAE7B,IAAA,MAAM,KAAK,GAAI,KAAa,CAAC,KAAK;AAClC,IAAA,MAAM,SAAS,GAAI,SAAiB,EAAE,KAAK;IAC3C,MAAM,SAAS,GAA2B,EAAE;AAE5C,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,SAAS;AAE5B,IAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;AACrB,QAAA,IACI,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACxB,SAAS,IAAI,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,YAAA,mBAAmB,CAAC,GAAG,EAAE,KAAK,CAAC;YAC/B,aAAa,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,KAAK,SAAS,EACvD;YACE,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC;QAC/B;IACJ;AAEA,IAAA,OAAO,SAAS;AACpB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.mjs deleted file mode 100644 index d2dedf7f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.mjs +++ /dev/null @@ -1,42 +0,0 @@ -import { createBox } from '../../projection/geometry/models.mjs'; -import { VisualElement } from '../VisualElement.mjs'; - -function isObjectKey(key, object) { - return key in object; -} -class ObjectVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.type = "object"; - } - readValueFromInstance(instance, key) { - if (isObjectKey(key, instance)) { - const value = instance[key]; - if (typeof value === "string" || typeof value === "number") { - return value; - } - } - return undefined; - } - getBaseTargetFromProps() { - return undefined; - } - removeValueFromRenderState(key, renderState) { - delete renderState.output[key]; - } - measureInstanceViewportBox() { - return createBox(); - } - build(renderState, latestValues) { - Object.assign(renderState.output, latestValues); - } - renderInstance(instance, { output }) { - Object.assign(instance, output); - } - sortInstanceNodePosition() { - return 0; - } -} - -export { ObjectVisualElement }; -//# sourceMappingURL=ObjectVisualElement.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.mjs.map deleted file mode 100644 index 8c1b18b2..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ObjectVisualElement.mjs","sources":["../../../../src/render/object/ObjectVisualElement.ts"],"sourcesContent":["import { createBox } from \"../../projection/geometry/models\"\nimport { ResolvedValues } from \"../types\"\nimport { VisualElement } from \"../VisualElement\"\n\ninterface ObjectRenderState {\n output: ResolvedValues\n}\n\nfunction isObjectKey(key: string, object: Object): key is keyof Object {\n return key in object\n}\n\nexport class ObjectVisualElement extends VisualElement<\n Object,\n ObjectRenderState\n> {\n type = \"object\"\n\n readValueFromInstance(instance: Object, key: string) {\n if (isObjectKey(key, instance)) {\n const value = instance[key]\n if (typeof value === \"string\" || typeof value === \"number\") {\n return value\n }\n }\n\n return undefined\n }\n\n getBaseTargetFromProps() {\n return undefined\n }\n\n removeValueFromRenderState(\n key: string,\n renderState: ObjectRenderState\n ): void {\n delete renderState.output[key]\n }\n\n measureInstanceViewportBox() {\n return createBox()\n }\n\n build(renderState: ObjectRenderState, latestValues: ResolvedValues) {\n Object.assign(renderState.output, latestValues)\n }\n\n renderInstance(instance: Object, { output }: ObjectRenderState) {\n Object.assign(instance, output)\n }\n\n sortInstanceNodePosition() {\n return 0\n }\n}\n"],"names":[],"mappings":";;;AAQA,SAAS,WAAW,CAAC,GAAW,EAAE,MAAc,EAAA;IAC5C,OAAO,GAAG,IAAI,MAAM;AACxB;AAEM,MAAO,mBAAoB,SAAQ,aAGxC,CAAA;AAHD,IAAA,WAAA,GAAA;;QAII,IAAA,CAAA,IAAI,GAAG,QAAQ;IAuCnB;IArCI,qBAAqB,CAAC,QAAgB,EAAE,GAAW,EAAA;AAC/C,QAAA,IAAI,WAAW,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE;AAC5B,YAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC;YAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACxD,gBAAA,OAAO,KAAK;YAChB;QACJ;AAEA,QAAA,OAAO,SAAS;IACpB;IAEA,sBAAsB,GAAA;AAClB,QAAA,OAAO,SAAS;IACpB;IAEA,0BAA0B,CACtB,GAAW,EACX,WAA8B,EAAA;AAE9B,QAAA,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC;IAClC;IAEA,0BAA0B,GAAA;QACtB,OAAO,SAAS,EAAE;IACtB;IAEA,KAAK,CAAC,WAA8B,EAAE,YAA4B,EAAA;QAC9D,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC;IACnD;AAEA,IAAA,cAAc,CAAC,QAAgB,EAAE,EAAE,MAAM,EAAqB,EAAA;AAC1D,QAAA,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;IACnC;IAEA,wBAAwB,GAAA;AACpB,QAAA,OAAO,CAAC;IACZ;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/store.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/store.mjs deleted file mode 100644 index 9a65634f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/store.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const visualElementStore = new WeakMap(); - -export { visualElementStore }; -//# sourceMappingURL=store.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/store.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/store.mjs.map deleted file mode 100644 index cad62f94..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/store.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"store.mjs","sources":["../../../src/render/store.ts"],"sourcesContent":["import type { VisualElement } from \"./VisualElement\"\n\nexport const visualElementStore = new WeakMap()\n"],"names":[],"mappings":"AAEO,MAAM,kBAAkB,GAAG,IAAI,OAAO;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs deleted file mode 100644 index 18c5e682..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs +++ /dev/null @@ -1,46 +0,0 @@ -import { transformProps } from '../utils/keys-transform.mjs'; -import { getDefaultValueType } from '../../value/types/maps/defaults.mjs'; -import { createBox } from '../../projection/geometry/models.mjs'; -import { DOMVisualElement } from '../dom/DOMVisualElement.mjs'; -import { camelToDash } from '../dom/utils/camel-to-dash.mjs'; -import { buildSVGAttrs } from './utils/build-attrs.mjs'; -import { camelCaseAttributes } from './utils/camel-case-attrs.mjs'; -import { isSVGTag } from './utils/is-svg-tag.mjs'; -import { renderSVG } from './utils/render.mjs'; -import { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs'; - -class SVGVisualElement extends DOMVisualElement { - constructor() { - super(...arguments); - this.type = "svg"; - this.isSVGTag = false; - this.measureInstanceViewportBox = createBox; - } - getBaseTargetFromProps(props, key) { - return props[key]; - } - readValueFromInstance(instance, key) { - if (transformProps.has(key)) { - const defaultType = getDefaultValueType(key); - return defaultType ? defaultType.default || 0 : 0; - } - key = !camelCaseAttributes.has(key) ? camelToDash(key) : key; - return instance.getAttribute(key); - } - scrapeMotionValuesFromProps(props, prevProps, visualElement) { - return scrapeMotionValuesFromProps(props, prevProps, visualElement); - } - build(renderState, latestValues, props) { - buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style); - } - renderInstance(instance, renderState, styleProp, projection) { - renderSVG(instance, renderState, styleProp, projection); - } - mount(instance) { - this.isSVGTag = isSVGTag(instance.tagName); - super.mount(instance); - } -} - -export { SVGVisualElement }; -//# sourceMappingURL=SVGVisualElement.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.map deleted file mode 100644 index 713986d7..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SVGVisualElement.mjs","sources":["../../../../src/render/svg/SVGVisualElement.ts"],"sourcesContent":["import type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport type { MotionValue } from \"../../value\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport { transformProps } from \"../utils/keys-transform\"\nimport { getDefaultValueType } from \"../../value/types/maps/defaults\"\nimport { createBox } from \"../../projection/geometry/models\"\nimport { DOMVisualElement } from \"../dom/DOMVisualElement\"\nimport type { DOMVisualElementOptions } from \"../dom/types\"\nimport { camelToDash } from \"../dom/utils/camel-to-dash\"\nimport type { ResolvedValues } from \"../types\"\nimport type { VisualElement, MotionStyle } from \"../VisualElement\"\nimport { SVGRenderState } from \"./types\"\nimport { buildSVGAttrs } from \"./utils/build-attrs\"\nimport { camelCaseAttributes } from \"./utils/camel-case-attrs\"\nimport { isSVGTag } from \"./utils/is-svg-tag\"\nimport { renderSVG } from \"./utils/render\"\nimport { scrapeMotionValuesFromProps } from \"./utils/scrape-motion-values\"\nexport class SVGVisualElement extends DOMVisualElement<\n SVGElement,\n SVGRenderState,\n DOMVisualElementOptions\n> {\n type = \"svg\"\n\n isSVGTag = false\n\n getBaseTargetFromProps(\n props: MotionNodeOptions,\n key: string\n ): AnyResolvedKeyframe | MotionValue | undefined {\n return props[key as keyof MotionNodeOptions]\n }\n\n readValueFromInstance(instance: SVGElement, key: string) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key)\n return defaultType ? defaultType.default || 0 : 0\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key\n return instance.getAttribute(key)\n }\n\n measureInstanceViewportBox = createBox\n\n scrapeMotionValuesFromProps(\n props: MotionNodeOptions,\n prevProps: MotionNodeOptions,\n visualElement: VisualElement\n ) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement)\n }\n\n build(\n renderState: SVGRenderState,\n latestValues: ResolvedValues,\n props: MotionNodeOptions\n ) {\n buildSVGAttrs(\n renderState,\n latestValues,\n this.isSVGTag,\n props.transformTemplate,\n (props as any).style\n )\n }\n\n renderInstance(\n instance: SVGElement,\n renderState: SVGRenderState,\n styleProp?: MotionStyle | undefined,\n projection?: any\n ): void {\n renderSVG(instance, renderState, styleProp, projection)\n }\n\n mount(instance: SVGElement) {\n this.isSVGTag = isSVGTag(instance.tagName)\n super.mount(instance)\n }\n}\n"],"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AoB,EAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC1C,QAAA,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;IACzB;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs deleted file mode 100644 index 6783b45d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs +++ /dev/null @@ -1,73 +0,0 @@ -import { buildHTMLStyles } from '../../html/utils/build-styles.mjs'; -import { buildSVGPath } from './path.mjs'; - -/** - * CSS Motion Path properties that should remain as CSS styles on SVG elements. - */ -const cssMotionPathProperties = [ - "offsetDistance", - "offsetPath", - "offsetRotate", - "offsetAnchor", -]; -/** - * Build SVG visual attributes, like cx and style.transform - */ -function buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, -// This is object creation, which we try to avoid per-frame. -...latest }, isSVGTag, transformTemplate, styleProp) { - buildHTMLStyles(state, latest, transformTemplate); - /** - * For svg tags we just want to make sure viewBox is animatable and treat all the styles - * as normal HTML tags. - */ - if (isSVGTag) { - if (state.style.viewBox) { - state.attrs.viewBox = state.style.viewBox; - } - return; - } - state.attrs = state.style; - state.style = {}; - const { attrs, style } = state; - /** - * However, we apply transforms as CSS transforms. - * So if we detect a transform, transformOrigin we take it from attrs and copy it into style. - */ - if (attrs.transform) { - style.transform = attrs.transform; - delete attrs.transform; - } - if (style.transform || attrs.transformOrigin) { - style.transformOrigin = attrs.transformOrigin ?? "50% 50%"; - delete attrs.transformOrigin; - } - if (style.transform) { - /** - * SVG's element transform-origin uses its own median as a reference. - * Therefore, transformBox becomes a fill-box - */ - style.transformBox = styleProp?.transformBox ?? "fill-box"; - delete attrs.transformBox; - } - for (const key of cssMotionPathProperties) { - if (attrs[key] !== undefined) { - style[key] = attrs[key]; - delete attrs[key]; - } - } - // Render attrX/attrY/attrScale as attributes - if (attrX !== undefined) - attrs.x = attrX; - if (attrY !== undefined) - attrs.y = attrY; - if (attrScale !== undefined) - attrs.scale = attrScale; - // Build SVG path if one has been defined - if (pathLength !== undefined) { - buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false); - } -} - -export { buildSVGAttrs }; -//# sourceMappingURL=build-attrs.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.map deleted file mode 100644 index d610a82a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"build-attrs.mjs","sources":["../../../../../src/render/svg/utils/build-attrs.ts"],"sourcesContent":["import type { MotionNodeOptions } from \"../../../node/types\"\nimport { buildHTMLStyles } from \"../../html/utils/build-styles\"\nimport { ResolvedValues } from \"../../types\"\nimport { SVGRenderState } from \"../types\"\nimport { buildSVGPath } from \"./path\"\n\n/**\n * CSS Motion Path properties that should remain as CSS styles on SVG elements.\n */\nconst cssMotionPathProperties = [\n \"offsetDistance\",\n \"offsetPath\",\n \"offsetRotate\",\n \"offsetAnchor\",\n]\n\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nexport function buildSVGAttrs(\n state: SVGRenderState,\n {\n attrX,\n attrY,\n attrScale,\n pathLength,\n pathSpacing = 1,\n pathOffset = 0,\n // This is object creation, which we try to avoid per-frame.\n ...latest\n }: ResolvedValues,\n isSVGTag: boolean,\n transformTemplate?: MotionNodeOptions[\"transformTemplate\"],\n styleProp?: Record\n) {\n buildHTMLStyles(state, latest, transformTemplate)\n\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox\n }\n return\n }\n\n state.attrs = state.style\n state.style = {}\n const { attrs, style } = state\n\n /**\n * However, we apply transforms as CSS transforms.\n * So if we detect a transform, transformOrigin we take it from attrs and copy it into style.\n */\n if (attrs.transform) {\n style.transform = attrs.transform\n delete attrs.transform\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\"\n delete attrs.transformOrigin\n }\n\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = (styleProp?.transformBox as string) ?? \"fill-box\"\n delete attrs.transformBox\n }\n\n for (const key of cssMotionPathProperties) {\n if (attrs[key] !== undefined) {\n style[key] = attrs[key]\n delete attrs[key]\n }\n }\n\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined) attrs.x = attrX\n if (attrY !== undefined) attrs.y = attrY\n if (attrScale !== undefined) attrs.scale = attrScale\n\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(\n attrs,\n pathLength as number,\n pathSpacing as number,\n pathOffset as number,\n false\n )\n }\n}\n"],"names":[],"mappings":";;;AAMA;;AAEG;AACH,MAAM,uBAAuB,GAAG;IAC5B,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,cAAc;CACjB;AAED;;AAEG;AACG,SAAU,aAAa,CACzB,KAAqB,EACrB,EACI,KAAK,EACL,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,GAAG,CAAC,EACf,UAAU,GAAG,CAAC;AACd;AACA,GAAG,MAAM,EACI,EACjB,QAAiB,EACjB,iBAA0D,EAC1D,SAA+B,EAAA;AAE/B,IAAA,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,iBAAiB,CAAC;AAEjD;;;AAGG;IACH,IAAI,QAAQ,EAAE;AACV,QAAA,IAAI,K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C1B,YAAY,CACR,KAAK,EACL,UAAoB,EACpB,WAAqB,EACrB,UAAoB,EACpB,KAAK,CACR;IACL;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs deleted file mode 100644 index 4885a9bf..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs +++ /dev/null @@ -1,31 +0,0 @@ -/** - * A set of attribute names that are always read/written as camel case. - */ -const camelCaseAttributes = new Set([ - "baseFrequency", - "diffuseConstant", - "kernelMatrix", - "kernelUnitLength", - "keySplines", - "keyTimes", - "limitingConeAngle", - "markerHeight", - "markerWidth", - "numOctaves", - "targetX", - "targetY", - "surfaceScale", - "specularConstant", - "specularExponent", - "stdDeviation", - "tableValues", - "viewBox", - "gradientTransform", - "pathLength", - "startOffset", - "textLength", - "lengthAdjust", -]); - -export { camelCaseAttributes }; -//# sourceMappingURL=camel-case-attrs.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs.map deleted file mode 100644 index 7ca6fe30..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"camel-case-attrs.mjs","sources":["../../../../../src/render/svg/utils/camel-case-attrs.ts"],"sourcesContent":["/**\n * A set of attribute names that are always read/written as camel case.\n */\nexport const camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n])\n"],"names":[],"mappings":"AAAA;;AAEG;AACI,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IACvC,eAAe;IACf,iBAAiB;IACjB,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,UAAU;IACV,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,YAAY;IACZ,SAAS;IACT,SAAS;IACT,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,aAAa;IACb,SAAS;IACT,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,cAAc;AACjB,CAAA;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs deleted file mode 100644 index 37ab4489..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const isSVGTag = (tag) => typeof tag === "string" && tag.toLowerCase() === "svg"; - -export { isSVGTag }; -//# sourceMappingURL=is-svg-tag.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs.map deleted file mode 100644 index ce8c3acb..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-svg-tag.mjs","sources":["../../../../../src/render/svg/utils/is-svg-tag.ts"],"sourcesContent":["export const isSVGTag = (tag: unknown) =>\n typeof tag === \"string\" && tag.toLowerCase() === \"svg\"\n"],"names":[],"mappings":"MAAa,QAAQ,GAAG,CAAC,GAAY,KACjC,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs deleted file mode 100644 index 02aff410..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs +++ /dev/null @@ -1,32 +0,0 @@ -const dashKeys = { - offset: "stroke-dashoffset", - array: "stroke-dasharray", -}; -const camelKeys = { - offset: "strokeDashoffset", - array: "strokeDasharray", -}; -/** - * Build SVG path properties. Uses the path's measured length to convert - * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset - * and stroke-dasharray attributes. - * - * This function is mutative to reduce per-frame GC. - * - * Note: We use unitless values for stroke-dasharray and stroke-dashoffset - * because Safari incorrectly scales px values when the page is zoomed. - */ -function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) { - // Normalise path length by setting SVG attribute pathLength to 1 - attrs.pathLength = 1; - // We use dash case when setting attributes directly to the DOM node and camel case - // when defining props on a React component. - const keys = useDashCase ? dashKeys : camelKeys; - // Build the dash offset (unitless to avoid Safari zoom bug) - attrs[keys.offset] = `${-offset}`; - // Build the dash array (unitless to avoid Safari zoom bug) - attrs[keys.array] = `${length} ${spacing}`; -} - -export { buildSVGPath }; -//# sourceMappingURL=path.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.map deleted file mode 100644 index 8bf08854..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"path.mjs","sources":["../../../../../src/render/svg/utils/path.ts"],"sourcesContent":["import { ResolvedValues } from \"../../types\"\n\nconst dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n}\n\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n}\n\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n *\n * Note: We use unitless values for stroke-dasharray and stroke-dashoffset\n * because Safari incorrectly scales px values when the page is zoomed.\n */\nexport function buildSVGPath(\n attrs: ResolvedValues,\n length: number,\n spacing = 1,\n offset = 0,\n useDashCase: boolean = true\n): void {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1\n\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys\n\n // Build the dash offset (unitless to avoid Safari zoom bug)\n attrs[keys.offset] = `${-offset}`\n\n // Build the dash array (unitless to avoid Safari zoom bug)\n attrs[keys.array] = `${length} ${spacing}`\n}\n"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG;AACb,IAAA,MAAM,EAAE,mBAAmB;AAC3B,IAAA,KAAK,EAAE,kBAAkB;CAC5B;AAED,MAAM,SAAS,GAAG;AACd,IAAA,MAAM,EAAE,kBAAkB;AAC1B,IAAA,KAAK,EAAE,iBAAiB;CAC3B;AAED;;;;;;;;;AASG;SACa,YAAY,CACxB,KAAqB,EACrB,MAAc,EACd,OAAO,GAAG,CAAC,EACX,MAAM,GAAG,CAAC,EACV,cAAuB,IAAI,EAAA;;AAG3B,IAAA,KAAK,CAAC,UAAU,GAAG,CAAC;;;IAIpB,MAAM,IAAI,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS;;IAG/C,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAA,EAAG,CAAC,MAAM,CAAA,CAAE;;IAGjC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,OAAO,CAAA,CAAE;AAC9C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/render.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/render.mjs deleted file mode 100644 index 81713615..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/render.mjs +++ /dev/null @@ -1,13 +0,0 @@ -import { camelToDash } from '../../dom/utils/camel-to-dash.mjs'; -import { renderHTML } from '../../html/utils/render.mjs'; -import { camelCaseAttributes } from './camel-case-attrs.mjs'; - -function renderSVG(element, renderState, _styleProp, projection) { - renderHTML(element, renderState, undefined, projection); - for (const key in renderState.attrs) { - element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]); - } -} - -export { renderSVG }; -//# sourceMappingURL=render.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/render.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/render.mjs.map deleted file mode 100644 index 8fcd12e5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/render.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"render.mjs","sources":["../../../../../src/render/svg/utils/render.ts"],"sourcesContent":["import type { MotionStyle } from \"../../VisualElement\"\nimport { camelToDash } from \"../../dom/utils/camel-to-dash\"\nimport { renderHTML } from \"../../html/utils/render\"\nimport { SVGRenderState } from \"../types\"\nimport { camelCaseAttributes } from \"./camel-case-attrs\"\n\nexport function renderSVG(\n element: SVGElement,\n renderState: SVGRenderState,\n _styleProp?: MotionStyle,\n projection?: any\n) {\n renderHTML(element as any, renderState, undefined, projection)\n\n for (const key in renderState.attrs) {\n element.setAttribute(\n !camelCaseAttributes.has(key) ? camelToDash(key) : key,\n renderState.attrs[key] as string\n )\n }\n}\n"],"names":[],"mappings":";;;;AAMM,SAAU,SAAS,CACrB,OAAmB,EACnB,WAA2B,EAC3B,UAAwB,EACxB,UAAgB,EAAA;IAEhB,UAAU,CAAC,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,CAAC;AAE9D,IAAA,KAAK,MAAM,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE;AACjC,QAAA,OAAO,CAAC,YAAY,CAChB,CAAC,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,GAAG,EACtD,WAAW,CAAC,KAAK,CAAC,GAAG,CAAW,CACnC;IACL;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs deleted file mode 100644 index 9c83e3d6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs +++ /dev/null @@ -1,20 +0,0 @@ -import { isMotionValue } from '../../../value/utils/is-motion-value.mjs'; -import { transformPropOrder } from '../../utils/keys-transform.mjs'; -import { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs'; - -function scrapeMotionValuesFromProps(props, prevProps, visualElement) { - const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement); - for (const key in props) { - if (isMotionValue(props[key]) || - isMotionValue(prevProps[key])) { - const targetKey = transformPropOrder.indexOf(key) !== -1 - ? "attr" + key.charAt(0).toUpperCase() + key.substring(1) - : key; - newValues[targetKey] = props[key]; - } - } - return newValues; -} - -export { scrapeMotionValuesFromProps }; -//# sourceMappingURL=scrape-motion-values.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.map deleted file mode 100644 index 70be0087..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scrape-motion-values.mjs","sources":["../../../../../src/render/svg/utils/scrape-motion-values.ts"],"sourcesContent":["import { isMotionValue } from \"../../../value/utils/is-motion-value\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\nimport { transformPropOrder } from \"../../utils/keys-transform\"\nimport { scrapeMotionValuesFromProps as scrapeHTMLMotionValuesFromProps } from \"../../html/utils/scrape-motion-values\"\nimport type { VisualElement } from \"../../VisualElement\"\n\nexport function scrapeMotionValuesFromProps(\n props: MotionNodeOptions,\n prevProps: MotionNodeOptions,\n visualElement?: VisualElement\n) {\n const newValues = scrapeHTMLMotionValuesFromProps(\n props,\n prevProps,\n visualElement\n )\n\n for (const key in props) {\n if (\n isMotionValue(props[key as keyof typeof props]) ||\n isMotionValue(prevProps[key as keyof typeof prevProps])\n ) {\n const targetKey =\n transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key\n\n newValues[targetKey] = props[key as keyof typeof props]\n }\n }\n\n return newValues\n}\n"],"names":["scrapeHTMLMotionValuesFromProps"],"mappings":";;;;SAMgB,2BAA2B,CACvC,KAAwB,EACxB,SAA4B,EAC5B,aAA6B,EAAA;IAE7B,MAAM,SAAS,GAAGA,6BAA+B,CAC7C,KAAK,EACL,SAAS,EACT,aAAa,CAChB;AAED,IAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;AACrB,QAAA,IACI,aAAa,CAAC,KAAK,CAAC,GAAyB,CAAC,CAAC;AAC/C,YAAA,aAAa,CAAC,SAAS,CAAC,GAA6B,CAAC,CAAC,EACzD;YACE,MAAM,SAAS,GACX,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;AAChC,kBAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC;kBACtD,GAAG;YAEb,SAAS,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,GAAyB,CAAC;QAC3D;IACJ;AAEA,IAAA,OAAO,SAAS;AACpB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs deleted file mode 100644 index 9d7b2062..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs +++ /dev/null @@ -1,387 +0,0 @@ -import { animateVisualElement } from '../../animation/interfaces/visual-element.mjs'; -import { calcChildStagger } from '../../animation/utils/calc-child-stagger.mjs'; -import { getVariantContext } from './get-variant-context.mjs'; -import { isAnimationControls } from './is-animation-controls.mjs'; -import { isKeyframesTarget } from './is-keyframes-target.mjs'; -import { isVariantLabel } from './is-variant-label.mjs'; -import { resolveVariant } from './resolve-dynamic-variants.mjs'; -import { shallowCompare } from './shallow-compare.mjs'; -import { variantPriorityOrder } from './variant-props.mjs'; - -const reversePriorityOrder = [...variantPriorityOrder].reverse(); -const numAnimationTypes = variantPriorityOrder.length; -function createAnimateFunction(visualElement) { - return (animations) => { - return Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options))); - }; -} -function createAnimationState(visualElement) { - let animate = createAnimateFunction(visualElement); - let state = createState(); - let isInitialRender = true; - /** - * Track whether the animation state has been reset (e.g. via StrictMode - * double-invocation or Suspense unmount/remount). On the first - * animateChanges() call after a reset we need to behave like the initial - * render for variant-inheritance checks, even though isInitialRender is - * already false. - */ - let wasReset = false; - /** - * This function will be used to reduce the animation definitions for - * each active animation type into an object of resolved values for it. - */ - const buildResolvedTypeValues = (type) => (acc, definition) => { - const resolved = resolveVariant(visualElement, definition, type === "exit" - ? visualElement.presenceContext?.custom - : undefined); - if (resolved) { - const { transition, transitionEnd, ...target } = resolved; - acc = { ...acc, ...target, ...transitionEnd }; - } - return acc; - }; - /** - * This just allows us to inject mocked animation functions - * @internal - */ - function setAnimateFunction(makeAnimator) { - animate = makeAnimator(visualElement); - } - /** - * When we receive new props, we need to: - * 1. Create a list of protected keys for each type. This is a directory of - * value keys that are currently being "handled" by types of a higher priority - * so that whenever an animation is played of a given type, these values are - * protected from being animated. - * 2. Determine if an animation type needs animating. - * 3. Determine if any values have been removed from a type and figure out - * what to animate those to. - */ - function animateChanges(changedActiveType) { - const { props } = visualElement; - const context = getVariantContext(visualElement.parent) || {}; - /** - * A list of animations that we'll build into as we iterate through the animation - * types. This will get executed at the end of the function. - */ - const animations = []; - /** - * Keep track of which values have been removed. Then, as we hit lower priority - * animation types, we can check if they contain removed values and animate to that. - */ - const removedKeys = new Set(); - /** - * A dictionary of all encountered keys. This is an object to let us build into and - * copy it without iteration. Each time we hit an animation type we set its protected - * keys - the keys its not allowed to animate - to the latest version of this object. - */ - let encounteredKeys = {}; - /** - * If a variant has been removed at a given index, and this component is controlling - * variant animations, we want to ensure lower-priority variants are forced to animate. - */ - let removedVariantIndex = Infinity; - /** - * Iterate through all animation types in reverse priority order. For each, we want to - * detect which values it's handling and whether or not they've changed (and therefore - * need to be animated). If any values have been removed, we want to detect those in - * lower priority props and flag for animation. - */ - for (let i = 0; i < numAnimationTypes; i++) { - const type = reversePriorityOrder[i]; - const typeState = state[type]; - const prop = props[type] !== undefined - ? props[type] - : context[type]; - const propIsVariant = isVariantLabel(prop); - /** - * If this type has *just* changed isActive status, set activeDelta - * to that status. Otherwise set to null. - */ - const activeDelta = type === changedActiveType ? typeState.isActive : null; - if (activeDelta === false) - removedVariantIndex = i; - /** - * If this prop is an inherited variant, rather than been set directly on the - * component itself, we want to make sure we allow the parent to trigger animations. - * - * TODO: Can probably change this to a !isControllingVariants check - */ - let isInherited = prop === context[type] && - prop !== props[type] && - propIsVariant; - if (isInherited && - (isInitialRender || wasReset) && - visualElement.manuallyAnimateOnMount) { - isInherited = false; - } - /** - * Set all encountered keys so far as the protected keys for this type. This will - * be any key that has been animated or otherwise handled by active, higher-priortiy types. - */ - typeState.protectedKeys = { ...encounteredKeys }; - // Check if we can skip analysing this prop early - if ( - // If it isn't active and hasn't *just* been set as inactive - (!typeState.isActive && activeDelta === null) || - // If we didn't and don't have any defined prop for this animation type - (!prop && !typeState.prevProp) || - // Or if the prop doesn't define an animation - isAnimationControls(prop) || - typeof prop === "boolean") { - continue; - } - /** - * If exit is already active and wasn't just activated, skip - * re-processing to prevent interrupting running exit animations. - * Re-resolving exit with a changed custom value can start new - * value animations that stop the originals, leaving the exit - * animation promise unresolved and the component stuck in the DOM. - */ - if (type === "exit" && typeState.isActive && activeDelta !== true) { - if (typeState.prevResolvedValues) { - encounteredKeys = { - ...encounteredKeys, - ...typeState.prevResolvedValues, - }; - } - continue; - } - /** - * As we go look through the values defined on this type, if we detect - * a changed value or a value that was removed in a higher priority, we set - * this to true and add this prop to the animation list. - */ - const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop); - let shouldAnimateType = variantDidChange || - // If we're making this variant active, we want to always make it active - (type === changedActiveType && - typeState.isActive && - !isInherited && - propIsVariant) || - // If we removed a higher-priority variant (i is in reverse order) - (i > removedVariantIndex && propIsVariant); - let handledRemovedValues = false; - /** - * As animations can be set as variant lists, variants or target objects, we - * coerce everything to an array if it isn't one already - */ - const definitionList = Array.isArray(prop) ? prop : [prop]; - /** - * Build an object of all the resolved values. We'll use this in the subsequent - * animateChanges calls to determine whether a value has changed. - */ - let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {}); - if (activeDelta === false) - resolvedValues = {}; - /** - * Now we need to loop through all the keys in the prev prop and this prop, - * and decide: - * 1. If the value has changed, and needs animating - * 2. If it has been removed, and needs adding to the removedKeys set - * 3. If it has been removed in a higher priority type and needs animating - * 4. If it hasn't been removed in a higher priority but hasn't changed, and - * needs adding to the type's protectedKeys list. - */ - const { prevResolvedValues = {} } = typeState; - const allKeys = { - ...prevResolvedValues, - ...resolvedValues, - }; - const markToAnimate = (key) => { - shouldAnimateType = true; - if (removedKeys.has(key)) { - handledRemovedValues = true; - removedKeys.delete(key); - } - typeState.needsAnimating[key] = true; - const motionValue = visualElement.getValue(key); - if (motionValue) - motionValue.liveStyle = false; - }; - for (const key in allKeys) { - const next = resolvedValues[key]; - const prev = prevResolvedValues[key]; - // If we've already handled this we can just skip ahead - if (encounteredKeys.hasOwnProperty(key)) - continue; - /** - * If the value has changed, we probably want to animate it. - */ - let valueHasChanged = false; - if (isKeyframesTarget(next) && isKeyframesTarget(prev)) { - valueHasChanged = - !shallowCompare(next, prev) || variantDidChange; - } - else { - valueHasChanged = next !== prev; - } - if (valueHasChanged) { - if (next !== undefined && next !== null) { - // If next is defined and doesn't equal prev, it needs animating - markToAnimate(key); - } - else { - // If it's undefined, it's been removed. - removedKeys.add(key); - } - } - else if (next !== undefined && removedKeys.has(key)) { - /** - * If next hasn't changed and it isn't undefined, we want to check if it's - * been removed by a higher priority - */ - markToAnimate(key); - } - else { - /** - * If it hasn't changed, we add it to the list of protected values - * to ensure it doesn't get animated. - */ - typeState.protectedKeys[key] = true; - } - } - /** - * Update the typeState so next time animateChanges is called we can compare the - * latest prop and resolvedValues to these. - */ - typeState.prevProp = prop; - typeState.prevResolvedValues = resolvedValues; - if (typeState.isActive) { - encounteredKeys = { ...encounteredKeys, ...resolvedValues }; - } - if ((isInitialRender || wasReset) && - visualElement.blockInitialAnimation) { - shouldAnimateType = false; - } - /** - * If this is an inherited prop we want to skip this animation - * unless the inherited variants haven't changed on this render. - */ - const willAnimateViaParent = isInherited && variantDidChange; - const needsAnimating = !willAnimateViaParent || handledRemovedValues; - if (shouldAnimateType && needsAnimating) { - animations.push(...definitionList.map((animation) => { - const options = { type }; - /** - * If we're performing the initial animation, but we're not - * rendering at the same time as the variant-controlling parent, - * we want to use the parent's transition to calculate the stagger. - */ - if (typeof animation === "string" && - (isInitialRender || wasReset) && - !willAnimateViaParent && - visualElement.manuallyAnimateOnMount && - visualElement.parent) { - const { parent } = visualElement; - const parentVariant = resolveVariant(parent, animation); - if (parent.enteringChildren && parentVariant) { - const { delayChildren } = parentVariant.transition || {}; - options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren); - } - } - return { - animation: animation, - options, - }; - })); - } - } - /** - * If there are some removed value that haven't been dealt with, - * we need to create a new animation that falls back either to the value - * defined in the style prop, or the last read value. - */ - if (removedKeys.size) { - const fallbackAnimation = {}; - /** - * If the initial prop contains a transition we can use that, otherwise - * allow the animation function to use the visual element's default. - */ - if (typeof props.initial !== "boolean") { - const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial) - ? props.initial[0] - : props.initial); - if (initialTransition && initialTransition.transition) { - fallbackAnimation.transition = initialTransition.transition; - } - } - removedKeys.forEach((key) => { - const fallbackTarget = visualElement.getBaseTarget(key); - const motionValue = visualElement.getValue(key); - if (motionValue) - motionValue.liveStyle = true; - // @ts-expect-error - @mattgperry to figure if we should do something here - fallbackAnimation[key] = fallbackTarget ?? null; - }); - animations.push({ animation: fallbackAnimation }); - } - let shouldAnimate = Boolean(animations.length); - if (isInitialRender && - (props.initial === false || props.initial === props.animate) && - !visualElement.manuallyAnimateOnMount) { - shouldAnimate = false; - } - isInitialRender = false; - wasReset = false; - return shouldAnimate ? animate(animations) : Promise.resolve(); - } - /** - * Change whether a certain animation type is active. - */ - function setActive(type, isActive) { - // If the active state hasn't changed, we can safely do nothing here - if (state[type].isActive === isActive) - return Promise.resolve(); - // Propagate active change to children - visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive)); - state[type].isActive = isActive; - const animations = animateChanges(type); - for (const key in state) { - state[key].protectedKeys = {}; - } - return animations; - } - return { - animateChanges, - setActive, - setAnimateFunction, - getState: () => state, - reset: () => { - state = createState(); - wasReset = true; - }, - }; -} -function checkVariantsDidChange(prev, next) { - if (typeof next === "string") { - return next !== prev; - } - else if (Array.isArray(next)) { - return !shallowCompare(next, prev); - } - return false; -} -function createTypeState(isActive = false) { - return { - isActive, - protectedKeys: {}, - needsAnimating: {}, - prevResolvedValues: {}, - }; -} -function createState() { - return { - animate: createTypeState(true), - whileInView: createTypeState(), - whileHover: createTypeState(), - whileTap: createTypeState(), - whileDrag: createTypeState(), - whileFocus: createTypeState(), - exit: createTypeState(), - }; -} - -export { checkVariantsDidChange, createAnimationState }; -//# sourceMappingURL=animation-state.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.map deleted file mode 100644 index 7786bfd5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animation-state.mjs","sources":["../../../../src/render/utils/animation-state.ts"],"sourcesContent":["import type {\n AnimationDefinition,\n TargetAndTransition,\n VariantLabels,\n} from \"../../node/types\"\nimport type { AnimationType } from \"../types\"\nimport type { VisualElementAnimationOptions } from \"../../animation/interfaces/types\"\nimport { animateVisualElement } from \"../../animation/interfaces/visual-element\"\nimport { calcChildStagger } from \"../../animation/utils/calc-child-stagger\"\nimport { getVariantContext } from \"./get-variant-context\"\nimport { isAnimationControls } from \"./is-animation-controls\"\nimport { isKeyframesTarget } from \"./is-keyframes-target\"\nimport { isVariantLabel } from \"./is-variant-label\"\nimport { resolveVariant } from \"./resolve-dynamic-variants\"\nimport { shallowCompare } from \"./shallow-compare\"\nimport { variantPriorityOrder } from \"./variant-props\"\n\nexport type { VisualElementAnimationOptions }\n\nexport interface AnimationState {\n animateChanges: (type?: AnimationType) => Promise\n setActive: (\n type: AnimationType,\n isActive: boolean,\n options?: VisualElementAnimationOptions\n ) => Promise\n setAnimateFunction: (fn: any) => void\n getState: () => { [key: string]: AnimationTypeState }\n reset: () => void\n}\n\ninterface DefinitionAndOptions {\n animation: AnimationDefinition\n options?: VisualElementAnimationOptions\n}\n\nexport type AnimationList = string[] | TargetAndTransition[]\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse()\nconst numAnimationTypes = variantPriorityOrder.length\n\n/**\n * Type for the animate function that can be injected.\n * This allows the animation implementation to be provided by the framework layer.\n */\nexport type AnimateFunction = (animations: DefinitionAndOptions[]) => Promise\n\nfunction createAnimateFunction(visualElement: any): AnimateFunction {\n return (animations: DefinitionAndOptions[]) => {\n return Promise.all(\n animations.map(({ animation, options }) =>\n animateVisualElement(visualElement, animation, options)\n )\n )\n }\n}\n\nexport function createAnimationState(visualElement: any): AnimationState {\n let animate = createAnimateFunction(visualElement)\n let state = createState()\n let isInitialRender = true\n /**\n * Track whether the animation state has been reset (e.g. via StrictMode\n * double-invocation or Suspense unmount/remount). On the first\n * animateChanges() call after a reset we need to behave like the initial\n * render for variant-inheritance checks, even though isInitialRender is\n * already false.\n */\n let wasReset = false\n\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues =\n (type: AnimationType) =>\n (\n acc: { [key: string]: any },\n definition: string | TargetAndTransition | undefined\n ) => {\n const resolved = resolveVariant(\n visualElement,\n definition,\n type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined\n )\n\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved\n acc = { ...acc, ...target, ...transitionEnd }\n }\n\n return acc\n }\n\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(\n makeAnimator: (visualElement: any) => AnimateFunction\n ) {\n animate = makeAnimator(visualElement)\n }\n\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(changedActiveType?: AnimationType) {\n const { props } = visualElement\n const context = getVariantContext(visualElement.parent) || {}\n\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations: DefinitionAndOptions[] = []\n\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set()\n\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys: { [key: string]: any } = {}\n\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity\n\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i]\n const typeState = state[type]\n const prop =\n props[type] !== undefined\n ? props[type]\n : context[type as keyof typeof context]\n const propIsVariant = isVariantLabel(prop)\n\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta =\n type === changedActiveType ? typeState.isActive : null\n\n if (activeDelta === false) removedVariantIndex = i\n\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited =\n prop === context[type as keyof typeof context] &&\n prop !== props[type] &&\n propIsVariant\n\n if (\n isInherited &&\n (isInitialRender || wasReset) &&\n visualElement.manuallyAnimateOnMount\n ) {\n isInherited = false\n }\n\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys }\n\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\"\n ) {\n continue\n }\n\n /**\n * If exit is already active and wasn't just activated, skip\n * re-processing to prevent interrupting running exit animations.\n * Re-resolving exit with a changed custom value can start new\n * value animations that stop the originals, leaving the exit\n * animation promise unresolved and the component stuck in the DOM.\n */\n if (type === \"exit\" && typeState.isActive && activeDelta !== true) {\n if (typeState.prevResolvedValues) {\n encounteredKeys = {\n ...encounteredKeys,\n ...typeState.prevResolvedValues,\n }\n }\n continue\n }\n\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(\n typeState.prevProp,\n prop\n )\n\n let shouldAnimateType =\n variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant)\n\n let handledRemovedValues = false\n\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop]\n\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(\n buildResolvedTypeValues(type),\n {}\n )\n\n if (activeDelta === false) resolvedValues = {}\n\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState\n\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n }\n const markToAnimate = (key: string) => {\n shouldAnimateType = true\n if (removedKeys.has(key)) {\n handledRemovedValues = true\n removedKeys.delete(key)\n }\n typeState.needsAnimating[key] = true\n\n const motionValue = visualElement.getValue(key)\n if (motionValue) motionValue.liveStyle = false\n }\n\n for (const key in allKeys) {\n const next = resolvedValues[key]\n const prev = prevResolvedValues[key]\n\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key)) continue\n\n /**\n * If the value has changed, we probably want to animate it.\n */\n let valueHasChanged = false\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n valueHasChanged =\n !shallowCompare(next, prev) || variantDidChange\n } else {\n valueHasChanged = next !== prev\n }\n\n if (valueHasChanged) {\n if (next !== undefined && next !== null) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key)\n } else {\n // If it's undefined, it's been removed.\n removedKeys.add(key)\n }\n } else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key)\n } else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true\n }\n }\n\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop\n typeState.prevResolvedValues = resolvedValues\n\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues }\n }\n\n if (\n (isInitialRender || wasReset) &&\n visualElement.blockInitialAnimation\n ) {\n shouldAnimateType = false\n }\n\n /**\n * If this is an inherited prop we want to skip this animation\n * unless the inherited variants haven't changed on this render.\n */\n const willAnimateViaParent = isInherited && variantDidChange\n const needsAnimating = !willAnimateViaParent || handledRemovedValues\n if (shouldAnimateType && needsAnimating) {\n animations.push(\n ...definitionList.map((animation) => {\n const options: VisualElementAnimationOptions = { type }\n\n /**\n * If we're performing the initial animation, but we're not\n * rendering at the same time as the variant-controlling parent,\n * we want to use the parent's transition to calculate the stagger.\n */\n if (\n typeof animation === \"string\" &&\n (isInitialRender || wasReset) &&\n !willAnimateViaParent &&\n visualElement.manuallyAnimateOnMount &&\n visualElement.parent\n ) {\n const { parent } = visualElement\n const parentVariant = resolveVariant(\n parent,\n animation\n )\n\n if (parent.enteringChildren && parentVariant) {\n const { delayChildren } =\n parentVariant.transition || {}\n options.delay = calcChildStagger(\n parent.enteringChildren,\n visualElement,\n delayChildren\n )\n }\n }\n\n return {\n animation: animation as AnimationDefinition,\n options,\n }\n })\n )\n }\n }\n\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation: TargetAndTransition = {}\n\n /**\n * If the initial prop contains a transition we can use that, otherwise\n * allow the animation function to use the visual element's default.\n */\n if (typeof props.initial !== \"boolean\") {\n const initialTransition = resolveVariant(\n visualElement,\n Array.isArray(props.initial)\n ? props.initial[0]\n : props.initial\n )\n\n if (initialTransition && initialTransition.transition) {\n fallbackAnimation.transition = initialTransition.transition\n }\n }\n\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key)\n\n const motionValue = visualElement.getValue(key)\n if (motionValue) motionValue.liveStyle = true\n\n // @ts-expect-error - @mattgperry to figure if we should do something here\n fallbackAnimation[key] = fallbackTarget ?? null\n })\n\n animations.push({ animation: fallbackAnimation })\n }\n\n let shouldAnimate = Boolean(animations.length)\n\n if (\n isInitialRender &&\n (props.initial === false || props.initial === props.animate) &&\n !visualElement.manuallyAnimateOnMount\n ) {\n shouldAnimate = false\n }\n\n isInitialRender = false\n wasReset = false\n return shouldAnimate ? animate(animations) : Promise.resolve()\n }\n\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type: AnimationType, isActive: boolean) {\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive) return Promise.resolve()\n\n // Propagate active change to children\n visualElement.variantChildren?.forEach((child: any) =>\n child.animationState?.setActive(type, isActive)\n )\n\n state[type].isActive = isActive\n\n const animations = animateChanges(type)\n\n for (const key in state) {\n state[key as keyof typeof state].protectedKeys = {}\n }\n\n return animations\n }\n\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n reset: () => {\n state = createState()\n wasReset = true\n },\n }\n}\n\nexport function checkVariantsDidChange(prev: any, next: any) {\n if (typeof next === \"string\") {\n return next !== prev\n } else if (Array.isArray(next)) {\n return !shallowCompare(next, prev)\n }\n\n return false\n}\n\nexport interface AnimationTypeState {\n isActive: boolean\n protectedKeys: { [key: string]: true }\n needsAnimating: { [key: string]: boolean }\n prevResolvedValues: { [key: string]: any }\n prevProp?: VariantLabels | TargetAndTransition\n}\n\nfunction createTypeState(isActive = false): AnimationTypeState {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n }\n}\n\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;AAsCA,MAAM,oBAAoB,GAAG,CAAC,GAAG,oBAAoB,CAAC,CAAC,OAAO,EAAE;AAChE,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,MAAM;AAQrD,SAAS,qBAAqB,CAAC,aAAkB,EAAA;IAC7C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EAAE;AAClB,QAAA,kBAAkB,EAAE,EAAE;KACzB;AACL;AAEA,SAAS,WAAW,GAAA;IAChB,OAAO;AACH,QAAA,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC;QAC9B,WAAW,EAAE,eAAe,EAAE;QAC9B,UAAU,EAAE,eAAe,EAAE;QAC7B,QAAQ,EAAE,eAAe,EAAE;QAC3B,SAAS,EAAE,eAAe,EAAE;QAC5B,UAAU,EAAE,eAAe,EAAE;QAC7B,IAAI,EAAE,eAAe,EAAE;KAC1B;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs deleted file mode 100644 index 6866d117..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs +++ /dev/null @@ -1,33 +0,0 @@ -import { isVariantLabel } from './is-variant-label.mjs'; -import { variantProps } from './variant-props.mjs'; - -const numVariantProps = variantProps.length; -/** - * Get variant context from a visual element's parent chain. - * Uses `any` type for visualElement to avoid circular dependencies. - */ -function getVariantContext(visualElement) { - if (!visualElement) - return undefined; - if (!visualElement.isControllingVariants) { - const context = visualElement.parent - ? getVariantContext(visualElement.parent) || {} - : {}; - if (visualElement.props.initial !== undefined) { - context.initial = visualElement.props.initial; - } - return context; - } - const context = {}; - for (let i = 0; i < numVariantProps; i++) { - const name = variantProps[i]; - const prop = visualElement.props[name]; - if (isVariantLabel(prop) || prop === false) { - context[name] = prop; - } - } - return context; -} - -export { getVariantContext }; -//# sourceMappingURL=get-variant-context.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.map deleted file mode 100644 index 08e36cd8..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get-variant-context.mjs","sources":["../../../../src/render/utils/get-variant-context.ts"],"sourcesContent":["import { isVariantLabel } from \"./is-variant-label\"\nimport { variantProps } from \"./variant-props\"\n\nconst numVariantProps = variantProps.length\n\ntype VariantStateContext = {\n initial?: string | string[]\n animate?: string | string[]\n exit?: string | string[]\n whileHover?: string | string[]\n whileDrag?: string | string[]\n whileFocus?: string | string[]\n whileTap?: string | string[]\n}\n\n/**\n * Get variant context from a visual element's parent chain.\n * Uses `any` type for visualElement to avoid circular dependencies.\n */\nexport function getVariantContext(\n visualElement?: any\n): undefined | VariantStateContext {\n if (!visualElement) return undefined\n\n if (!visualElement.isControllingVariants) {\n const context = visualElement.parent\n ? getVariantContext(visualElement.parent) || {}\n : {}\n if (visualElement.props.initial !== undefined) {\n context.initial = visualElement.props.initial as any\n }\n return context\n }\n\n const context: VariantStateContext = {}\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i] as keyof typeof context\n const prop = visualElement.props[name]\n\n if (isVariantLabel(prop) || prop === false) {\n ;(context as any)[name] = prop\n }\n }\n\n return context\n}\n"],"names":[],"mappings":";;;AAGA,MAAM,eAAe,GAAG,YAAY,CAAC,MAAM;AAY3C;;;AAGG;AACG,SAAU,iBAAiB,CAC7B,aAAmB,EAAA;AAEnB,IAAA,IAAI,CAAC,aAAa;AAAE,QAAA,OAAO,SAAS;AAEpC,IAAA,IAAI,CAAC,aAAa,CAAC,qBAAqB,EAAE;AACtC,QAAA,MAAM,OAAO,GAAG,aAAa,CAAC;cACxB,iBAAiB,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI;cAC3C,EAAE;QACR,IAAI,aAAa,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,EAAE;YAC3C,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,OAAc;QACxD;AACA,QAAA,OAAO,OAAO;IAClB;IAEA,MAAM,OAAO,GAAwB,EAAE;AACvC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,EAAE,CAAC,EAAE,EAAE;AACtC,QAAA,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,CAAyB;QACpD,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC;QAEtC,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,IAAI,KAAK,KAAK,EAAE;AACtC,YAAA,OAAe,CAAC,IAAI,CAAC,GAAG,IAAI;QAClC;IACJ;AAEA,IAAA,OAAO,OAAO;AAClB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs deleted file mode 100644 index 17f587f1..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs +++ /dev/null @@ -1,8 +0,0 @@ -function isAnimationControls(v) { - return (v !== null && - typeof v === "object" && - typeof v.start === "function"); -} - -export { isAnimationControls }; -//# sourceMappingURL=is-animation-controls.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs.map deleted file mode 100644 index 985f8041..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-animation-controls.mjs","sources":["../../../../src/render/utils/is-animation-controls.ts"],"sourcesContent":["import type { LegacyAnimationControls } from \"../../node/types\"\n\nexport function isAnimationControls(v?: unknown): v is LegacyAnimationControls {\n return (\n v !== null &&\n typeof v === \"object\" &&\n typeof (v as LegacyAnimationControls).start === \"function\"\n )\n}\n"],"names":[],"mappings":"AAEM,SAAU,mBAAmB,CAAC,CAAW,EAAA;IAC3C,QACI,CAAC,KAAK,IAAI;QACV,OAAO,CAAC,KAAK,QAAQ;AACrB,QAAA,OAAQ,CAA6B,CAAC,KAAK,KAAK,UAAU;AAElE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs deleted file mode 100644 index 724ace7d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { isAnimationControls } from './is-animation-controls.mjs'; -import { isVariantLabel } from './is-variant-label.mjs'; -import { variantProps } from './variant-props.mjs'; - -function isControllingVariants(props) { - return (isAnimationControls(props.animate) || - variantProps.some((name) => isVariantLabel(props[name]))); -} -function isVariantNode(props) { - return Boolean(isControllingVariants(props) || props.variants); -} - -export { isControllingVariants, isVariantNode }; -//# sourceMappingURL=is-controlling-variants.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.map deleted file mode 100644 index 8476a49d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-controlling-variants.mjs","sources":["../../../../src/render/utils/is-controlling-variants.ts"],"sourcesContent":["import type { MotionNodeOptions } from \"../../node/types\"\nimport { isAnimationControls } from \"./is-animation-controls\"\nimport { isVariantLabel } from \"./is-variant-label\"\nimport { variantProps } from \"./variant-props\"\n\nexport function isControllingVariants(props: MotionNodeOptions) {\n return (\n isAnimationControls(props.animate) ||\n variantProps.some((name) =>\n isVariantLabel(props[name as keyof typeof props])\n )\n )\n}\n\nexport function isVariantNode(props: MotionNodeOptions) {\n return Boolean(isControllingVariants(props) || props.variants)\n}\n"],"names":[],"mappings":";;;;AAKM,SAAU,qBAAqB,CAAC,KAAwB,EAAA;AAC1D,IAAA,QACI,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC;AAClC,QAAA,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,KACnB,cAAc,CAAC,KAAK,CAAC,IAA0B,CAAC,CAAC,CACpD;AAET;AAEM,SAAU,aAAa,CAAC,KAAwB,EAAA;IAClD,OAAO,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC;AAClE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs deleted file mode 100644 index e9bb0bd9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs +++ /dev/null @@ -1,13 +0,0 @@ -import { transformProps } from './keys-transform.mjs'; -import { scaleCorrectors } from '../../projection/styles/scale-correction.mjs'; -export { addScaleCorrector } from '../../projection/styles/scale-correction.mjs'; - -function isForcedMotionValue(key, { layout, layoutId }) { - return (transformProps.has(key) || - key.startsWith("origin") || - ((layout || layoutId !== undefined) && - (!!scaleCorrectors[key] || key === "opacity"))); -} - -export { isForcedMotionValue, scaleCorrectors }; -//# sourceMappingURL=is-forced-motion-value.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.map deleted file mode 100644 index 5ecd4e60..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-forced-motion-value.mjs","sources":["../../../../src/render/utils/is-forced-motion-value.ts"],"sourcesContent":["import { transformProps } from \"./keys-transform\"\nimport type { MotionNodeOptions } from \"../../node/types\"\nimport {\n scaleCorrectors,\n addScaleCorrector,\n} from \"../../projection/styles/scale-correction\"\n\nexport { scaleCorrectors, addScaleCorrector }\n\nexport function isForcedMotionValue(\n key: string,\n { layout, layoutId }: MotionNodeOptions\n) {\n return (\n transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\"))\n )\n}\n"],"names":[],"mappings":";;;;AASM,SAAU,mBAAmB,CAC/B,GAAW,EACX,EAAE,MAAM,EAAE,QAAQ,EAAqB,EAAA;AAEvC,IAAA,QACI,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC;AACvB,QAAA,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC;AACxB,SAAC,CAAC,MAAM,IAAI,QAAQ,KAAK,SAAS;AAC9B,aAAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,SAAS,CAAC,CAAC;AAE1D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs deleted file mode 100644 index 9e01dbef..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs +++ /dev/null @@ -1,6 +0,0 @@ -const isKeyframesTarget = (v) => { - return Array.isArray(v); -}; - -export { isKeyframesTarget }; -//# sourceMappingURL=is-keyframes-target.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs.map deleted file mode 100644 index 7c69a6a0..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-keyframes-target.mjs","sources":["../../../../src/render/utils/is-keyframes-target.ts"],"sourcesContent":["import type { UnresolvedValueKeyframe, ValueKeyframesDefinition } from \"../../animation/types\"\n\nexport const isKeyframesTarget = (\n v: ValueKeyframesDefinition\n): v is UnresolvedValueKeyframe[] => {\n return Array.isArray(v)\n}\n"],"names":[],"mappings":"AAEO,MAAM,iBAAiB,GAAG,CAC7B,CAA2B,KACK;AAChC,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC3B;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs deleted file mode 100644 index 1064983a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Decides if the supplied variable is variant label - */ -function isVariantLabel(v) { - return typeof v === "string" || Array.isArray(v); -} - -export { isVariantLabel }; -//# sourceMappingURL=is-variant-label.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs.map deleted file mode 100644 index 154c8c78..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-variant-label.mjs","sources":["../../../../src/render/utils/is-variant-label.ts"],"sourcesContent":["/**\n * Decides if the supplied variable is variant label\n */\nexport function isVariantLabel(v: unknown): v is string | string[] {\n return typeof v === \"string\" || Array.isArray(v)\n}\n"],"names":[],"mappings":"AAAA;;AAEG;AACG,SAAU,cAAc,CAAC,CAAU,EAAA;IACrC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACpD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs deleted file mode 100644 index d000529c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { transformPropOrder } from './keys-transform.mjs'; - -const positionalKeys = new Set([ - "width", - "height", - "top", - "left", - "right", - "bottom", - ...transformPropOrder, -]); - -export { positionalKeys }; -//# sourceMappingURL=keys-position.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs.map deleted file mode 100644 index 12f42fdd..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keys-position.mjs","sources":["../../../../src/render/utils/keys-position.ts"],"sourcesContent":["import { transformPropOrder } from \"./keys-transform\"\n\nexport const positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n ...transformPropOrder,\n])\n"],"names":[],"mappings":";;AAEO,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAClC,OAAO;IACP,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;AACR,IAAA,GAAG,kBAAkB;AACxB,CAAA;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs deleted file mode 100644 index 8a2b6871..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Generate a list of every possible transform key. - */ -const transformPropOrder = [ - "transformPerspective", - "x", - "y", - "z", - "translateX", - "translateY", - "translateZ", - "scale", - "scaleX", - "scaleY", - "rotate", - "rotateX", - "rotateY", - "rotateZ", - "skew", - "skewX", - "skewY", -]; -/** - * A quick lookup for transform props. - * - * `pathRotation` is a transform for routing purposes (skipped from raw - * style application, wired to the transform composite, flags transform - * dirty) but is intentionally NOT in `transformPropOrder` — it is - * composed onto `rotate` at the build sites, not serialized in its own - * slot, and must stay out of the order-array consumers (parse-transform, - * unit-conversion, keys-position). - */ -const transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, "pathRotation"]))(); - -export { transformPropOrder, transformProps }; -//# sourceMappingURL=keys-transform.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.map deleted file mode 100644 index aec5e459..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keys-transform.mjs","sources":["../../../../src/render/utils/keys-transform.ts"],"sourcesContent":["/**\n * Generate a list of every possible transform key.\n */\nexport const transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n]\n\n/**\n * A quick lookup for transform props.\n *\n * `pathRotation` is a transform for routing purposes (skipped from raw\n * style application, wired to the transform composite, flags transform\n * dirty) but is intentionally NOT in `transformPropOrder` — it is\n * composed onto `rotate` at the build sites, not serialized in its own\n * slot, and must stay out of the order-array consumers (parse-transform,\n * unit-conversion, keys-position).\n */\nexport const transformProps = /*@__PURE__*/ (() =>\n new Set([...transformPropOrder, \"pathRotation\"]))()\n"],"names":[],"mappings":"AAAA;;AAEG;AACI,MAAM,kBAAkB,GAAG;IAC9B,sBAAsB;IACtB,GAAG;IACH,GAAG;IACH,GAAG;IACH,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,SAAS;IACT,SAAS;IACT,MAAM;IACN,OAAO;IACP,OAAO;;AAGX;;;;;;;;;AASG;MACU,cAAc,iBAAiB,CAAC,MACzC,IAAI,GAAG,CAAC,CAAC,GAAG,kBAAkB,EAAE,cAAc,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs deleted file mode 100644 index be01fdf5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs +++ /dev/null @@ -1,56 +0,0 @@ -import { motionValue } from '../../value/index.mjs'; -import { isMotionValue } from '../../value/utils/is-motion-value.mjs'; - -/** - * Updates motion values from props changes. - * Uses `any` type for element to avoid circular dependencies with VisualElement. - */ -function updateMotionValuesFromProps(element, next, prev) { - for (const key in next) { - const nextValue = next[key]; - const prevValue = prev[key]; - if (isMotionValue(nextValue)) { - /** - * If this is a motion value found in props or style, we want to add it - * to our visual element's motion value map. - */ - element.addValue(key, nextValue); - } - else if (isMotionValue(prevValue)) { - /** - * If we're swapping from a motion value to a static value, - * create a new motion value from that - */ - element.addValue(key, motionValue(nextValue, { owner: element })); - } - else if (prevValue !== nextValue) { - /** - * If this is a flat value that has changed, update the motion value - * or create one if it doesn't exist. We only want to do this if we're - * not handling the value with our animation state. - */ - if (element.hasValue(key)) { - const existingValue = element.getValue(key); - if (existingValue.liveStyle === true) { - existingValue.jump(nextValue); - } - else if (!existingValue.hasAnimated) { - existingValue.set(nextValue); - } - } - else { - const latestValue = element.getStaticValue(key); - element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element })); - } - } - } - // Handle removed values - for (const key in prev) { - if (next[key] === undefined) - element.removeValue(key); - } - return next; -} - -export { updateMotionValuesFromProps }; -//# sourceMappingURL=motion-values.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs.map deleted file mode 100644 index 30b05c5b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"motion-values.mjs","sources":["../../../../src/render/utils/motion-values.ts"],"sourcesContent":["import { motionValue } from \"../../value\"\nimport { isMotionValue } from \"../../value/utils/is-motion-value\"\n\ntype MotionStyleLike = Record\n\n/**\n * Updates motion values from props changes.\n * Uses `any` type for element to avoid circular dependencies with VisualElement.\n */\nexport function updateMotionValuesFromProps(\n element: any,\n next: MotionStyleLike,\n prev: MotionStyleLike\n) {\n for (const key in next) {\n const nextValue = next[key]\n const prevValue = prev[key]\n\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue)\n } else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }))\n } else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key)!\n\n if (existingValue.liveStyle === true) {\n existingValue.jump(nextValue)\n } else if (!existingValue.hasAnimated) {\n existingValue.set(nextValue)\n }\n } else {\n const latestValue = element.getStaticValue(key)\n element.addValue(\n key,\n motionValue(\n latestValue !== undefined ? latestValue : nextValue,\n { owner: element }\n )\n )\n }\n }\n }\n\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined) element.removeValue(key)\n }\n\n return next\n}\n"],"names":[],"mappings":";;;AAKA;;;AAGG;SACa,2BAA2B,CACvC,OAAY,EACZ,IAAqB,EACrB,IAAqB,EAAA;AAErB,IAAA,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;AACpB,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;AAC3B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;AAE3B,QAAA,IAAI,aAAa,CAAC,SAAS,CAAC,EAAE;AAC1B;;;AAGG;AACH,YAAA,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;QACpC;AAAO,aAAA,IAAI,aAAa,CAAC,SAAS,CAAC,EAAE;AACjC;;;AAGG;AACH,YAAA,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QACrE;AAAO,aAAA,IAAI,SAAS,KAAK,SAAS,EAAE;AAChC;;;;AAIG;AACH,YAAA,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACvB,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAE;AAE5C,gBAAA,IAAI,aAAa,CAAC,SAAS,KAAK,IAAI,EAAE;AAClC,oBAAA,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC;gBACjC;AAAO,qBAAA,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE;AACnC,oBAAA,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC;gBAChC;YACJ;iBAAO;gBACH,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC;gBAC/C,OAAO,CAAC,QAAQ,CACZ,GAAG,EACH,WAAW,CACP,WAAW,KAAK,SAAS,GAAG,WAAW,GAAG,SAAS,EACnD,EAAE,KAAK,EAAE,OAAO,EAAE,CACrB,CACJ;YACL;QACJ;IACJ;;AAGA,IAAA,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;AACpB,QAAA,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,SAAS;AAAE,YAAA,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC;IACzD;AAEA,IAAA,OAAO,IAAI;AACf;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs deleted file mode 100644 index a9550a25..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs +++ /dev/null @@ -1,20 +0,0 @@ -import { hasReducedMotionListener, prefersReducedMotion } from './state.mjs'; - -const isBrowser = typeof window !== "undefined"; -function initPrefersReducedMotion() { - hasReducedMotionListener.current = true; - if (!isBrowser) - return; - if (window.matchMedia) { - const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)"); - const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches); - motionMediaQuery.addEventListener("change", setReducedMotionPreferences); - setReducedMotionPreferences(); - } - else { - prefersReducedMotion.current = false; - } -} - -export { hasReducedMotionListener, initPrefersReducedMotion, prefersReducedMotion }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs.map deleted file mode 100644 index 2fb891c1..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../../src/render/utils/reduced-motion/index.ts"],"sourcesContent":["import { hasReducedMotionListener, prefersReducedMotion } from \"./state\"\n\nconst isBrowser = typeof window !== \"undefined\"\n\nexport function initPrefersReducedMotion() {\n hasReducedMotionListener.current = true\n if (!isBrowser) return\n\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\")\n\n const setReducedMotionPreferences = () =>\n (prefersReducedMotion.current = motionMediaQuery.matches)\n\n motionMediaQuery.addEventListener(\"change\", setReducedMotionPreferences)\n\n setReducedMotionPreferences()\n } else {\n prefersReducedMotion.current = false\n }\n}\n\nexport { prefersReducedMotion, hasReducedMotionListener }\n"],"names":[],"mappings":";;AAEA,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW;SAE/B,wBAAwB,GAAA;AACpC,IAAA,wBAAwB,CAAC,OAAO,GAAG,IAAI;AACvC,IAAA,IAAI,CAAC,SAAS;QAAE;AAEhB,IAAA,IAAI,MAAM,CAAC,UAAU,EAAE;QACnB,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,0BAA0B,CAAC;AAEtE,QAAA,MAAM,2BAA2B,GAAG,OAC/B,oBAAoB,CAAC,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAE7D,QAAA,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,EAAE,2BAA2B,CAAC;AAExE,QAAA,2BAA2B,EAAE;IACjC;SAAO;AACH,QAAA,oBAAoB,CAAC,OAAO,GAAG,KAAK;IACxC;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs deleted file mode 100644 index c846f8fc..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs +++ /dev/null @@ -1,6 +0,0 @@ -// Does this device prefer reduced motion? Returns `null` server-side. -const prefersReducedMotion = { current: null }; -const hasReducedMotionListener = { current: false }; - -export { hasReducedMotionListener, prefersReducedMotion }; -//# sourceMappingURL=state.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs.map deleted file mode 100644 index 33df383d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"state.mjs","sources":["../../../../../src/render/utils/reduced-motion/state.ts"],"sourcesContent":["interface ReducedMotionState {\n current: boolean | null\n}\n\n// Does this device prefer reduced motion? Returns `null` server-side.\nexport const prefersReducedMotion: ReducedMotionState = { current: null }\n\nexport const hasReducedMotionListener = { current: false }\n"],"names":[],"mappings":"AAIA;MACa,oBAAoB,GAAuB,EAAE,OAAO,EAAE,IAAI;MAE1D,wBAAwB,GAAG,EAAE,OAAO,EAAE,KAAK;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs deleted file mode 100644 index e7b6fc40..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { resolveVariantFromProps } from './resolve-variants.mjs'; - -function resolveVariant(visualElement, definition, custom) { - const props = visualElement.getProps(); - return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement); -} - -export { resolveVariant }; -//# sourceMappingURL=resolve-dynamic-variants.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.map deleted file mode 100644 index ceef8b43..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-dynamic-variants.mjs","sources":["../../../../src/render/utils/resolve-dynamic-variants.ts"],"sourcesContent":["import type {\n AnimationDefinition,\n TargetAndTransition,\n TargetResolver,\n} from \"../../node/types\"\nimport { resolveVariantFromProps } from \"./resolve-variants\"\n\n/**\n * Resolves a variant if it's a variant resolver.\n * Uses `any` type for visualElement to avoid circular dependencies.\n */\nexport function resolveVariant(\n visualElement: any,\n definition?: TargetAndTransition | TargetResolver,\n custom?: any\n): TargetAndTransition\nexport function resolveVariant(\n visualElement: any,\n definition?: AnimationDefinition,\n custom?: any\n): TargetAndTransition | undefined\nexport function resolveVariant(\n visualElement: any,\n definition?: AnimationDefinition,\n custom?: any\n) {\n const props = visualElement.getProps()\n return resolveVariantFromProps(\n props,\n definition,\n custom !== undefined ? custom : props.custom,\n visualElement\n )\n}\n"],"names":[],"mappings":";;SAqBgB,cAAc,CAC1B,aAAkB,EAClB,UAAgC,EAChC,MAAY,EAAA;AAEZ,IAAA,MAAM,KAAK,GAAG,aAAa,CAAC,QAAQ,EAAE;IACtC,OAAO,uBAAuB,CAC1B,KAAK,EACL,UAAU,EACV,MAAM,KAAK,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,EAC5C,aAAa,CAChB;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs deleted file mode 100644 index 61756dd9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs +++ /dev/null @@ -1,37 +0,0 @@ -function getValueState(visualElement) { - const state = [{}, {}]; - visualElement?.values.forEach((value, key) => { - state[0][key] = value.get(); - state[1][key] = value.getVelocity(); - }); - return state; -} -function resolveVariantFromProps(props, definition, custom, visualElement) { - /** - * If the variant definition is a function, resolve. - */ - if (typeof definition === "function") { - const [current, velocity] = getValueState(visualElement); - definition = definition(custom !== undefined ? custom : props.custom, current, velocity); - } - /** - * If the variant definition is a variant label, or - * the function returned a variant label, resolve. - */ - if (typeof definition === "string") { - definition = props.variants && props.variants[definition]; - } - /** - * At this point we've resolved both functions and variant labels, - * but the resolved variant label might itself have been a function. - * If so, resolve. This can only have returned a valid target object. - */ - if (typeof definition === "function") { - const [current, velocity] = getValueState(visualElement); - definition = definition(custom !== undefined ? custom : props.custom, current, velocity); - } - return definition; -} - -export { resolveVariantFromProps }; -//# sourceMappingURL=resolve-variants.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.map deleted file mode 100644 index 740741f1..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-variants.mjs","sources":["../../../../src/render/utils/resolve-variants.ts"],"sourcesContent":["import type {\n AnimationDefinition,\n MotionNodeOptions,\n TargetAndTransition,\n TargetResolver,\n} from \"../../node/types\"\nimport type { ResolvedValues } from \"../types\"\n\nfunction getValueState(visualElement?: any): [ResolvedValues, ResolvedValues] {\n const state: [ResolvedValues, ResolvedValues] = [{}, {}]\n\n visualElement?.values.forEach((value: any, key: string) => {\n state[0][key] = value.get()\n state[1][key] = value.getVelocity()\n })\n\n return state\n}\n\nexport function resolveVariantFromProps(\n props: MotionNodeOptions,\n definition: TargetAndTransition | TargetResolver,\n custom?: any,\n visualElement?: any\n): TargetAndTransition\nexport function resolveVariantFromProps(\n props: MotionNodeOptions,\n definition?: AnimationDefinition,\n custom?: any,\n visualElement?: any\n): undefined | TargetAndTransition\nexport function resolveVariantFromProps(\n props: MotionNodeOptions,\n definition?: AnimationDefinition,\n custom?: any,\n visualElement?: any\n) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement)\n definition = definition(\n custom !== undefined ? custom : props.custom,\n current,\n velocity\n )\n }\n\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition]\n }\n\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement)\n definition = definition(\n custom !== undefined ? custom : props.custom,\n current,\n velocity\n )\n }\n\n return definition\n}\n"],"names":[],"mappings":"AAQA,SAAS,aAAa,CAAC,aAAmB,EAAA;AACtC,IAAA,MAAM,KAAK,GAAqC,CAAC,EAAE,EAAE,EAAE,CAAC;IAExD,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,KAAU,EAAE,GAAW,KAAI;QACtD,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE;QAC3B,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,WAAW,EAAE;AACvC,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,KAAK;AAChB;AAcM,SAAU,uBAAuB,CACnC,KAAwB,EACxB,UAAgC,EAChC,MAAY,EACZ,aAAmB,EAAA;AAEnB;;AAEG;AACH,IAAA,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;QAClC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,aAAa,CAAC,aAAa,CAAC;QACxD,UAAU,GAAG,UAAU,CACnB,MAAM,KAAK,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,EAC5C,OAAO,EACP,QAAQ,CACX;IACL;AAEA;;;AAGG;AACH,IAAA,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAChC,UAAU,GAAG,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;IAC7D;AAEA;;;;AAIG;AACH,IAAA,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;QAClC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,aAAa,CAAC,aAAa,CAAC;QACxD,UAAU,GAAG,UAAU,CACnB,MAAM,KAAK,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,EAC5C,OAAO,EACP,QAAQ,CACX;IACL;AAEA,IAAA,OAAO,UAAU;AACrB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/setters.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/setters.mjs deleted file mode 100644 index 9c94d6eb..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/setters.mjs +++ /dev/null @@ -1,32 +0,0 @@ -import { motionValue } from '../../value/index.mjs'; -import { resolveVariant } from './resolve-dynamic-variants.mjs'; -import { isKeyframesTarget } from './is-keyframes-target.mjs'; - -/** - * Set VisualElement's MotionValue, creating a new MotionValue for it if - * it doesn't exist. - */ -function setMotionValue(visualElement, key, value) { - if (visualElement.hasValue(key)) { - visualElement.getValue(key).set(value); - } - else { - visualElement.addValue(key, motionValue(value)); - } -} -function resolveFinalValueInKeyframes(v) { - // TODO maybe throw if v.length - 1 is placeholder token? - return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v; -} -function setTarget(visualElement, definition) { - const resolved = resolveVariant(visualElement, definition); - let { transitionEnd = {}, transition = {}, ...target } = resolved || {}; - target = { ...target, ...transitionEnd }; - for (const key in target) { - const value = resolveFinalValueInKeyframes(target[key]); - setMotionValue(visualElement, key, value); - } -} - -export { setTarget }; -//# sourceMappingURL=setters.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/setters.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/setters.mjs.map deleted file mode 100644 index c7e9915f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/setters.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"setters.mjs","sources":["../../../../src/render/utils/setters.ts"],"sourcesContent":["import { motionValue } from \"../../value\"\nimport { resolveVariant } from \"./resolve-dynamic-variants\"\nimport { isKeyframesTarget } from \"./is-keyframes-target\"\nimport type { AnimationDefinition } from \"../../node/types\"\nimport type {\n AnyResolvedKeyframe,\n UnresolvedValueKeyframe,\n ValueKeyframesDefinition,\n} from \"../../animation/types\"\nimport type { VisualElement } from \"../VisualElement\"\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(\n visualElement: VisualElement,\n key: string,\n value: AnyResolvedKeyframe\n) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key)!.set(value)\n } else {\n visualElement.addValue(key, motionValue(value))\n }\n}\n\nfunction resolveFinalValueInKeyframes(\n v: ValueKeyframesDefinition\n): UnresolvedValueKeyframe {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v\n}\n\nexport function setTarget(\n visualElement: VisualElement,\n definition: AnimationDefinition\n) {\n const resolved = resolveVariant(visualElement, definition)\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {}\n\n target = { ...target, ...transitionEnd }\n\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(\n target[key as keyof typeof target] as any\n )\n setMotionValue(visualElement, key, value as AnyResolvedKeyframe)\n }\n}\n"],"names":[],"mappings":";;;;AAWA;;;AAGG;AACH,SAAS,cAAc,CACnB,aAA4B,EAC5B,GAAW,EACX,KAA0B,EAAA;AAE1B,IAAA,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC7B,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAE,CAAC,GAAG,CAAC,KAAK,CAAC;IAC3C;SAAO;QACH,aAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IACnD;AACJ;AAEA,SAAS,4BAA4B,CACjC,CAA2B,EAAA;;IAG3B,OAAO,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAC1D;AAEM,SAAU,SAAS,CACrB,aAA4B,EAC5B,UAA+B,EAAA;IAE/B,MAAM,QAAQ,GAAG,cAAc,CAAC,aAAa,EAAE,UAAU,CAAC;AAC1D,IAAA,IAAI,EAAE,aAAa,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,MAAM,EAAE,GAAG,QAAQ,IAAI,EAAE;IAEvE,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,aAAa,EAAE;AAExC,IAAA,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACtB,MAAM,KAAK,GAAG,4BAA4B,CACtC,MAAM,CAAC,GAA0B,CAAQ,CAC5C;AACD,QAAA,cAAc,CAAC,aAAa,EAAE,GAAG,EAAE,KAA4B,CAAC;IACpE;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs deleted file mode 100644 index a6bf3088..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs +++ /dev/null @@ -1,15 +0,0 @@ -function shallowCompare(next, prev) { - if (!Array.isArray(prev)) - return false; - const prevLength = prev.length; - if (prevLength !== next.length) - return false; - for (let i = 0; i < prevLength; i++) { - if (prev[i] !== next[i]) - return false; - } - return true; -} - -export { shallowCompare }; -//# sourceMappingURL=shallow-compare.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs.map deleted file mode 100644 index a76ba4e7..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shallow-compare.mjs","sources":["../../../../src/render/utils/shallow-compare.ts"],"sourcesContent":["export function shallowCompare(next: any[], prev: any[] | null) {\n if (!Array.isArray(prev)) return false\n\n const prevLength = prev.length\n\n if (prevLength !== next.length) return false\n\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i]) return false\n }\n\n return true\n}\n"],"names":[],"mappings":"AAAM,SAAU,cAAc,CAAC,IAAW,EAAE,IAAkB,EAAA;AAC1D,IAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AAAE,QAAA,OAAO,KAAK;AAEtC,IAAA,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM;AAE9B,IAAA,IAAI,UAAU,KAAK,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;AAE5C,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;QACjC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;AAAE,YAAA,OAAO,KAAK;IACzC;AAEA,IAAA,OAAO,IAAI;AACf;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs deleted file mode 100644 index 56a3899f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs +++ /dev/null @@ -1,13 +0,0 @@ -const variantPriorityOrder = [ - "animate", - "whileInView", - "whileFocus", - "whileHover", - "whileTap", - "whileDrag", - "exit", -]; -const variantProps = ["initial", ...variantPriorityOrder]; - -export { variantPriorityOrder, variantProps }; -//# sourceMappingURL=variant-props.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.map deleted file mode 100644 index 86915c1f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"variant-props.mjs","sources":["../../../../src/render/utils/variant-props.ts"],"sourcesContent":["import type { AnimationType } from \"../types\"\n\nexport const variantPriorityOrder: AnimationType[] = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n]\n\nexport const variantProps = [\"initial\", ...variantPriorityOrder]\n"],"names":[],"mappings":"AAEO,MAAM,oBAAoB,GAAoB;IACjD,SAAS;IACT,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,WAAW;IACX,MAAM;;AAGH,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,GAAG,oBAAoB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-element.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-element.mjs deleted file mode 100644 index 7b4abe3b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-element.mjs +++ /dev/null @@ -1,64 +0,0 @@ -import { isSVGElement } from '../utils/is-svg-element.mjs'; -import { resolveElements } from '../utils/resolve-elements.mjs'; - -const resizeHandlers = new WeakMap(); -let observer; -const getSize = (borderBoxAxis, svgAxis, htmlAxis) => (target, borderBoxSize) => { - if (borderBoxSize && borderBoxSize[0]) { - return borderBoxSize[0][(borderBoxAxis + "Size")]; - } - else if (isSVGElement(target) && "getBBox" in target) { - return target.getBBox()[svgAxis]; - } - else { - return target[htmlAxis]; - } -}; -const getWidth = /*@__PURE__*/ getSize("inline", "width", "offsetWidth"); -const getHeight = /*@__PURE__*/ getSize("block", "height", "offsetHeight"); -function notifyTarget({ target, borderBoxSize }) { - resizeHandlers.get(target)?.forEach((handler) => { - handler(target, { - get width() { - return getWidth(target, borderBoxSize); - }, - get height() { - return getHeight(target, borderBoxSize); - }, - }); - }); -} -function notifyAll(entries) { - entries.forEach(notifyTarget); -} -function createResizeObserver() { - if (typeof ResizeObserver === "undefined") - return; - observer = new ResizeObserver(notifyAll); -} -function resizeElement(target, handler) { - if (!observer) - createResizeObserver(); - const elements = resolveElements(target); - elements.forEach((element) => { - let elementHandlers = resizeHandlers.get(element); - if (!elementHandlers) { - elementHandlers = new Set(); - resizeHandlers.set(element, elementHandlers); - } - elementHandlers.add(handler); - observer?.observe(element); - }); - return () => { - elements.forEach((element) => { - const elementHandlers = resizeHandlers.get(element); - elementHandlers?.delete(handler); - if (!elementHandlers?.size) { - observer?.unobserve(element); - } - }); - }; -} - -export { resizeElement }; -//# sourceMappingURL=handle-element.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-element.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-element.mjs.map deleted file mode 100644 index b86aac02..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-element.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handle-element.mjs","sources":["../../../src/resize/handle-element.ts"],"sourcesContent":["import { isSVGElement } from \"../utils/is-svg-element\"\nimport { ElementOrSelector, resolveElements } from \"../utils/resolve-elements\"\nimport { ResizeHandler } from \"./types\"\n\nconst resizeHandlers = new WeakMap>>()\n\nlet observer: ResizeObserver | undefined\n\nconst getSize =\n (\n borderBoxAxis: \"inline\" | \"block\",\n svgAxis: \"width\" | \"height\",\n htmlAxis: \"offsetWidth\" | \"offsetHeight\"\n ) =>\n (target: Element, borderBoxSize?: ReadonlyArray) => {\n if (borderBoxSize && borderBoxSize[0]) {\n return borderBoxSize[0][\n (borderBoxAxis + \"Size\") as keyof ResizeObserverSize\n ]\n } else if (isSVGElement(target) && \"getBBox\" in target) {\n return (target as SVGGraphicsElement).getBBox()[svgAxis]\n } else {\n return (target as HTMLElement)[htmlAxis]\n }\n }\n\nconst getWidth = /*@__PURE__*/ getSize(\"inline\", \"width\", \"offsetWidth\")\nconst getHeight = /*@__PURE__*/ getSize(\"block\", \"height\", \"offsetHeight\")\n\nfunction notifyTarget({ target, borderBoxSize }: ResizeObserverEntry) {\n resizeHandlers.get(target)?.forEach((handler) => {\n handler(target, {\n get width() {\n return getWidth(target, borderBoxSize)\n },\n get height() {\n return getHeight(target, borderBoxSize)\n },\n })\n })\n}\n\nfunction notifyAll(entries: ResizeObserverEntry[]) {\n entries.forEach(notifyTarget)\n}\n\nfunction createResizeObserver() {\n if (typeof ResizeObserver === \"undefined\") return\n\n observer = new ResizeObserver(notifyAll)\n}\n\nexport function resizeElement(\n target: ElementOrSelector,\n handler: ResizeHandler\n) {\n if (!observer) createResizeObserver()\n\n const elements = resolveElements(target)\n\n elements.forEach((element) => {\n let elementHandlers = resizeHandlers.get(element)\n\n if (!elementHandlers) {\n elementHandlers = new Set()\n resizeHandlers.set(element, elementHandlers)\n }\n\n elementHandlers.add(handler)\n observer?.observe(element)\n })\n\n return () => {\n elements.forEach((element) => {\n const elementHandlers = resizeHandlers.get(element)\n\n elementHandlers?.delete(handler)\n\n if (!elementHandlers?.size) {\n observer?.unobserve(element)\n }\n })\n }\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,cAAc,GAAG,IAAI,OAAO,EAAwC;AAE1E,IAAI,QAAoC;AAExC,MAAM,OAAO,GACT,CACI,aAAiC,EACjC,OAA2B,EAC3B,QAAwC,KAE5C,CAAC,MAAe,EAAE,aAAiD,KAAI;AACnE,IAAA,IAAI,aAAa,IAAI,aAAa,CAAC,CAAC,CAAC,EAAE;QACnC,OAAO,aAAa,CAAC,CAAC,CAAC,EAClB,aAAa,GAAG,MAAM,EAC1B;IACL;SAAO,IAAI,YAAY,CAAC,MAAM,CAAC,IAAI,SAAS,IAAI,MAAM,EAAE;AACpD,QAAA,OAAQ,MAA6B,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC;IAC5D;SAAO;AACH,QAAA,OAAQ,MAAsB,CAAC,QAAQ,CAAC;IAC5C;AACJ,C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e,CAAC,GAAG,CAAC,OAAO,CAAC;AAC5B,QAAA,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC;AAC9B,IAAA,CAAC,CAAC;AAEF,IAAA,OAAO,MAAK;AACR,QAAA,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,KAAI;YACzB,MAAM,eAAe,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC;AAEnD,YAAA,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC;AAEhC,YAAA,IAAI,CAAC,eAAe,EAAE,IAAI,EAAE;AACxB,gBAAA,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC;YAChC;AACJ,QAAA,CAAC,CAAC;AACN,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-window.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-window.mjs deleted file mode 100644 index cdc8977d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-window.mjs +++ /dev/null @@ -1,32 +0,0 @@ -const windowCallbacks = new Set(); -let windowResizeHandler; -function createWindowResizeHandler() { - windowResizeHandler = () => { - const info = { - get width() { - return window.innerWidth; - }, - get height() { - return window.innerHeight; - }, - }; - windowCallbacks.forEach((callback) => callback(info)); - }; - window.addEventListener("resize", windowResizeHandler); -} -function resizeWindow(callback) { - windowCallbacks.add(callback); - if (!windowResizeHandler) - createWindowResizeHandler(); - return () => { - windowCallbacks.delete(callback); - if (!windowCallbacks.size && - typeof windowResizeHandler === "function") { - window.removeEventListener("resize", windowResizeHandler); - windowResizeHandler = undefined; - } - }; -} - -export { resizeWindow }; -//# sourceMappingURL=handle-window.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-window.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-window.mjs.map deleted file mode 100644 index 59fb9b6a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/handle-window.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handle-window.mjs","sources":["../../../src/resize/handle-window.ts"],"sourcesContent":["import { WindowResizeHandler } from \"./types\"\n\nconst windowCallbacks = new Set()\n\nlet windowResizeHandler: VoidFunction | undefined\n\nfunction createWindowResizeHandler() {\n windowResizeHandler = () => {\n const info = {\n get width() {\n return window.innerWidth\n },\n get height() {\n return window.innerHeight\n },\n }\n\n windowCallbacks.forEach((callback) => callback(info))\n }\n\n window.addEventListener(\"resize\", windowResizeHandler)\n}\n\nexport function resizeWindow(callback: WindowResizeHandler) {\n windowCallbacks.add(callback)\n\n if (!windowResizeHandler) createWindowResizeHandler()\n\n return () => {\n windowCallbacks.delete(callback)\n\n if (\n !windowCallbacks.size &&\n typeof windowResizeHandler === \"function\"\n ) {\n window.removeEventListener(\"resize\", windowResizeHandler)\n windowResizeHandler = undefined\n }\n }\n}\n"],"names":[],"mappings":"AAEA,MAAM,eAAe,GAAG,IAAI,GAAG,EAAuB;AAEtD,IAAI,mBAA6C;AAEjD,SAAS,yBAAyB,GAAA;IAC9B,mBAAmB,GAAG,MAAK;AACvB,QAAA,MAAM,IAAI,GAAG;AACT,YAAA,IAAI,KAAK,GAAA;gBACL,OAAO,MAAM,CAAC,UAAU;YAC5B,CAAC;AACD,YAAA,IAAI,MAAM,GAAA;gBACN,OAAO,MAAM,CAAC,WAAW;YAC7B,CAAC;SACJ;AAED,QAAA,eAAe,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC;AACzD,IAAA,CAAC;AAED,IAAA,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,mBAAmB,CAAC;AAC1D;AAEM,SAAU,YAAY,CAAC,QAA6B,EAAA;AACtD,IAAA,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC;AAE7B,IAAA,IAAI,CAAC,mBAAmB;AAAE,QAAA,yBAAyB,EAAE;AAErD,IAAA,OAAO,MAAK;AACR,QAAA,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC;QAEhC,IACI,CAAC,eAAe,CAAC,IAAI;AACrB,YAAA,OAAO,mBAAmB,KAAK,UAAU,EAC3C;AACE,YAAA,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,CAAC;YACzD,mBAAmB,GAAG,SAAS;QACnC;AACJ,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/index.mjs deleted file mode 100644 index 5d871a63..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/index.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { resizeElement } from './handle-element.mjs'; -import { resizeWindow } from './handle-window.mjs'; - -function resize(a, b) { - return typeof a === "function" ? resizeWindow(a) : resizeElement(a, b); -} - -export { resize }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/index.mjs.map deleted file mode 100644 index 56227215..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/resize/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../src/resize/index.ts"],"sourcesContent":["import { ElementOrSelector } from \"../utils/resolve-elements\"\nimport { resizeElement } from \"./handle-element\"\nimport { resizeWindow } from \"./handle-window\"\nimport { ResizeHandler, WindowResizeHandler } from \"./types\"\n\nexport function resize(onResize: WindowResizeHandler): VoidFunction\nexport function resize(\n target: ElementOrSelector,\n onResize: ResizeHandler\n): VoidFunction\nexport function resize(\n a: WindowResizeHandler | ElementOrSelector,\n b?: ResizeHandler\n) {\n return typeof a === \"function\" ? resizeWindow(a) : resizeElement(a, b!)\n}\n"],"names":[],"mappings":";;;AAUM,SAAU,MAAM,CAClB,CAA0C,EAC1C,CAA0B,EAAA;IAE1B,OAAO,OAAO,CAAC,KAAK,UAAU,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,CAAE,CAAC;AAC3E;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/scroll/observe.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/scroll/observe.mjs deleted file mode 100644 index 52c4a846..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/scroll/observe.mjs +++ /dev/null @@ -1,19 +0,0 @@ -import { frame, cancelFrame } from '../frameloop/frame.mjs'; - -function observeTimeline(update, timeline) { - let prevProgress; - const onFrame = () => { - const { currentTime } = timeline; - const percentage = currentTime === null ? 0 : currentTime.value; - const progress = percentage / 100; - if (prevProgress !== progress) { - update(progress); - } - prevProgress = progress; - }; - frame.preUpdate(onFrame, true); - return () => cancelFrame(onFrame); -} - -export { observeTimeline }; -//# sourceMappingURL=observe.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/scroll/observe.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/scroll/observe.mjs.map deleted file mode 100644 index 3af25723..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/scroll/observe.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observe.mjs","sources":["../../../src/scroll/observe.ts"],"sourcesContent":["import { ProgressTimeline } from \"../animation/types\"\nimport { cancelFrame, frame } from \"../frameloop\"\n\ntype Update = (progress: number) => void\n\nexport function observeTimeline(update: Update, timeline: ProgressTimeline) {\n let prevProgress: number\n\n const onFrame = () => {\n const { currentTime } = timeline\n const percentage = currentTime === null ? 0 : currentTime.value\n const progress = percentage / 100\n\n if (prevProgress !== progress) {\n update(progress)\n }\n\n prevProgress = progress\n }\n\n frame.preUpdate(onFrame, true)\n\n return () => cancelFrame(onFrame)\n}\n"],"names":[],"mappings":";;AAKM,SAAU,eAAe,CAAC,MAAc,EAAE,QAA0B,EAAA;AACtE,IAAA,IAAI,YAAoB;IAExB,MAAM,OAAO,GAAG,MAAK;AACjB,QAAA,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ;AAChC,QAAA,MAAM,UAAU,GAAG,WAAW,KAAK,IAAI,GAAG,CAAC,GAAG,WAAW,CAAC,KAAK;AAC/D,QAAA,MAAM,QAAQ,GAAG,UAAU,GAAG,GAAG;AAEjC,QAAA,IAAI,YAAY,KAAK,QAAQ,EAAE;YAC3B,MAAM,CAAC,QAAQ,CAAC;QACpB;QAEA,YAAY,GAAG,QAAQ;AAC3B,IAAA,CAAC;AAED,IAAA,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC;AAE9B,IAAA,OAAO,MAAM,WAAW,CAAC,OAAO,CAAC;AACrC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/animation-count.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/animation-count.mjs deleted file mode 100644 index 805ad764..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/animation-count.mjs +++ /dev/null @@ -1,8 +0,0 @@ -const activeAnimations = { - layout: 0, - mainThread: 0, - waapi: 0, -}; - -export { activeAnimations }; -//# sourceMappingURL=animation-count.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/animation-count.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/animation-count.mjs.map deleted file mode 100644 index c0d4f4f9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/animation-count.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animation-count.mjs","sources":["../../../src/stats/animation-count.ts"],"sourcesContent":["export const activeAnimations = {\n layout: 0,\n mainThread: 0,\n waapi: 0,\n}\n"],"names":[],"mappings":"AAAO,MAAM,gBAAgB,GAAG;AAC5B,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,KAAK,EAAE,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/buffer.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/buffer.mjs deleted file mode 100644 index 6349d902..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/buffer.mjs +++ /dev/null @@ -1,7 +0,0 @@ -const statsBuffer = { - value: null, - addProjectionMetrics: null, -}; - -export { statsBuffer }; -//# sourceMappingURL=buffer.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/buffer.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/buffer.mjs.map deleted file mode 100644 index ed9f2216..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/buffer.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer.mjs","sources":["../../../src/stats/buffer.ts"],"sourcesContent":["import type { StatsRecording } from \"./types\"\n\nexport type InactiveStatsBuffer = {\n value: null\n addProjectionMetrics: null\n}\n\nexport type ActiveStatsBuffer = {\n value: StatsRecording\n addProjectionMetrics: (metrics: {\n nodes: number\n calculatedTargetDeltas: number\n calculatedProjections: number\n }) => void\n}\n\nexport const statsBuffer: InactiveStatsBuffer | ActiveStatsBuffer = {\n value: null,\n addProjectionMetrics: null,\n}\n"],"names":[],"mappings":"AAgBO,MAAM,WAAW,GAA4C;AAChE,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,oBAAoB,EAAE,IAAI;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/index.mjs deleted file mode 100644 index b9475468..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/index.mjs +++ /dev/null @@ -1,118 +0,0 @@ -import { activeAnimations } from './animation-count.mjs'; -import { statsBuffer } from './buffer.mjs'; -import { frame, cancelFrame, frameData } from '../frameloop/frame.mjs'; - -function record() { - const { value } = statsBuffer; - if (value === null) { - cancelFrame(record); - return; - } - value.frameloop.rate.push(frameData.delta); - value.animations.mainThread.push(activeAnimations.mainThread); - value.animations.waapi.push(activeAnimations.waapi); - value.animations.layout.push(activeAnimations.layout); -} -function mean(values) { - return values.reduce((acc, value) => acc + value, 0) / values.length; -} -function summarise(values, calcAverage = mean) { - if (values.length === 0) { - return { - min: 0, - max: 0, - avg: 0, - }; - } - return { - min: Math.min(...values), - max: Math.max(...values), - avg: calcAverage(values), - }; -} -const msToFps = (ms) => Math.round(1000 / ms); -function clearStatsBuffer() { - statsBuffer.value = null; - statsBuffer.addProjectionMetrics = null; -} -function reportStats() { - const { value } = statsBuffer; - if (!value) { - throw new Error("Stats are not being measured"); - } - clearStatsBuffer(); - cancelFrame(record); - const summary = { - frameloop: { - setup: summarise(value.frameloop.setup), - rate: summarise(value.frameloop.rate), - read: summarise(value.frameloop.read), - resolveKeyframes: summarise(value.frameloop.resolveKeyframes), - preUpdate: summarise(value.frameloop.preUpdate), - update: summarise(value.frameloop.update), - preRender: summarise(value.frameloop.preRender), - render: summarise(value.frameloop.render), - postRender: summarise(value.frameloop.postRender), - }, - animations: { - mainThread: summarise(value.animations.mainThread), - waapi: summarise(value.animations.waapi), - layout: summarise(value.animations.layout), - }, - layoutProjection: { - nodes: summarise(value.layoutProjection.nodes), - calculatedTargetDeltas: summarise(value.layoutProjection.calculatedTargetDeltas), - calculatedProjections: summarise(value.layoutProjection.calculatedProjections), - }, - }; - /** - * Convert the rate to FPS - */ - const { rate } = summary.frameloop; - rate.min = msToFps(rate.min); - rate.max = msToFps(rate.max); - rate.avg = msToFps(rate.avg); - [rate.min, rate.max] = [rate.max, rate.min]; - return summary; -} -function recordStats() { - if (statsBuffer.value) { - clearStatsBuffer(); - throw new Error("Stats are already being measured"); - } - const newStatsBuffer = statsBuffer; - newStatsBuffer.value = { - frameloop: { - setup: [], - rate: [], - read: [], - resolveKeyframes: [], - preUpdate: [], - update: [], - preRender: [], - render: [], - postRender: [], - }, - animations: { - mainThread: [], - waapi: [], - layout: [], - }, - layoutProjection: { - nodes: [], - calculatedTargetDeltas: [], - calculatedProjections: [], - }, - }; - newStatsBuffer.addProjectionMetrics = (metrics) => { - const { layoutProjection } = newStatsBuffer.value; - layoutProjection.nodes.push(metrics.nodes); - layoutProjection.calculatedTargetDeltas.push(metrics.calculatedTargetDeltas); - layoutProjection.calculatedProjections.push(metrics.calculatedProjections); - }; - frame.postRender(record, true); - return reportStats; -} - -export { recordStats }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/index.mjs.map deleted file mode 100644 index ea993f47..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/stats/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../src/stats/index.ts"],"sourcesContent":["import { cancelFrame, frame, frameData } from \"../frameloop\"\nimport { activeAnimations } from \"./animation-count\"\nimport { ActiveStatsBuffer, statsBuffer } from \"./buffer\"\nimport { StatsSummary, Summary } from \"./types\"\n\nfunction record() {\n const { value } = statsBuffer\n\n if (value === null) {\n cancelFrame(record)\n return\n }\n\n value.frameloop.rate.push(frameData.delta)\n value.animations.mainThread.push(activeAnimations.mainThread)\n value.animations.waapi.push(activeAnimations.waapi)\n value.animations.layout.push(activeAnimations.layout)\n}\n\nfunction mean(values: number[]) {\n return values.reduce((acc, value) => acc + value, 0) / values.length\n}\n\nfunction summarise(\n values: number[],\n calcAverage: (allValues: number[]) => number = mean\n): Summary {\n if (values.length === 0) {\n return {\n min: 0,\n max: 0,\n avg: 0,\n }\n }\n\n return {\n min: Math.min(...values),\n max: Math.max(...values),\n avg: calcAverage(values),\n }\n}\n\nconst msToFps = (ms: number) => Math.round(1000 / ms)\n\nfunction clearStatsBuffer() {\n statsBuffer.value = null\n statsBuffer.addProjectionMetrics = null\n}\n\nfunction reportStats(): StatsSummary {\n const { value } = statsBuffer\n\n if (!value) {\n throw new Error(\"Stats are not being measured\")\n }\n\n clearStatsBuffer()\n cancelFrame(record)\n\n const summary = {\n frameloop: {\n setup: summarise(value.frameloop.setup),\n rate: summarise(value.frameloop.rate),\n read: summarise(value.frameloop.read),\n resolveKeyframes: summarise(value.frameloop.resolveKeyframes),\n preUpdate: summarise(value.frameloop.preUpdate),\n update: summarise(value.frameloop.update),\n preRender: summarise(value.frameloop.preRender),\n render: summarise(value.frameloop.render),\n postRender: summarise(value.frameloop.postRender),\n },\n animations: {\n mainThread: summarise(value.animations.mainThread),\n waapi: summarise(value.animations.waapi),\n layout: summarise(value.animations.layout),\n },\n layoutProjection: {\n nodes: summarise(value.layoutProjection.nodes),\n calculatedTargetDeltas: summarise(\n value.layoutProjection.calculatedTargetDeltas\n ),\n calculatedProjections: summarise(\n value.layoutProjection.calculatedProjections\n ),\n },\n }\n\n /**\n * Convert the rate to FPS\n */\n const { rate } = summary.frameloop\n rate.min = msToFps(rate.min)\n rate.max = msToFps(rate.max)\n rate.avg = msToFps(rate.avg)\n // Swap these as the min and max are inverted when converted to FPS\n ;[rate.min, rate.max] = [rate.max, rate.min]\n\n return summary\n}\n\nexport function recordStats() {\n if (statsBuffer.value) {\n clearStatsBuffer()\n throw new Error(\"Stats are already being measured\")\n }\n\n const newStatsBuffer = statsBuffer as unknown as ActiveStatsBuffer\n\n newStatsBuffer.value = {\n frameloop: {\n setup: [],\n rate: [],\n read: [],\n resolveKeyframes: [],\n preUpdate: [],\n update: [],\n preRender: [],\n render: [],\n postRender: [],\n },\n animations: {\n mainThread: [],\n waapi: [],\n layout: [],\n },\n layoutProjection: {\n nodes: [],\n calculatedTargetDeltas: [],\n calculatedProjections: [],\n },\n }\n\n newStatsBuffer.addProjectionMetrics = (metrics) => {\n const { layoutProjection } = newStatsBuffer.value\n layoutProjection.nodes.push(metrics.nodes)\n layoutProjection.calculatedTargetDeltas.push(\n metrics.calculatedTargetDeltas\n )\n layoutProjection.calculatedProjections.push(\n metrics.calculatedProjections\n )\n }\n\n frame.postRender(record, true)\n\n return reportStats\n}\n"],"names":[],"mappings":";;;;AAKA,SAAS,MAAM,GAAA;AACX,IAAA,MAAM,EAAE,KAAK,EAAE,GAAG,WAAW;AAE7B,IAAA,IAAI,KAAK,KAAK,IAAI,EAAE;QAChB,WAAW,CAAC,MAAM,CAAC;QACnB;IACJ;IAEA,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAC1C,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC;IAC7D,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACnD,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;AACzD;AAEA,SAAS,IAAI,CAAC,MAAgB,EAAA;IAC1B,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK,GAAG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O,WAAW;AACtB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/delay.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/delay.mjs deleted file mode 100644 index 55bfdf84..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/delay.mjs +++ /dev/null @@ -1,25 +0,0 @@ -import { time } from '../frameloop/sync-time.mjs'; -import { secondsToMilliseconds } from 'motion-utils'; -import { frame, cancelFrame } from '../frameloop/frame.mjs'; - -/** - * Timeout defined in ms - */ -function delay(callback, timeout) { - const start = time.now(); - const checkElapsed = ({ timestamp }) => { - const elapsed = timestamp - start; - if (elapsed >= timeout) { - cancelFrame(checkElapsed); - callback(elapsed - timeout); - } - }; - frame.setup(checkElapsed, true); - return () => cancelFrame(checkElapsed); -} -function delayInSeconds(callback, timeout) { - return delay(callback, secondsToMilliseconds(timeout)); -} - -export { delay, delayInSeconds }; -//# sourceMappingURL=delay.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/delay.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/delay.mjs.map deleted file mode 100644 index 7520457f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/delay.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delay.mjs","sources":["../../../src/utils/delay.ts"],"sourcesContent":["import { cancelFrame, frame } from \"../frameloop\"\nimport { time } from \"../frameloop/sync-time\"\nimport type { FrameData } from \"../frameloop/types\"\nimport { secondsToMilliseconds } from \"motion-utils\"\n\nexport type DelayedFunction = (overshoot: number) => void\n\n/**\n * Timeout defined in ms\n */\nexport function delay(callback: DelayedFunction, timeout: number) {\n const start = time.now()\n\n const checkElapsed = ({ timestamp }: FrameData) => {\n const elapsed = timestamp - start\n\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed)\n callback(elapsed - timeout)\n }\n }\n\n frame.setup(checkElapsed, true)\n\n return () => cancelFrame(checkElapsed)\n}\n\nexport function delayInSeconds(callback: DelayedFunction, timeout: number) {\n return delay(callback, secondsToMilliseconds(timeout))\n}\n"],"names":[],"mappings":";;;;AAOA;;AAEG;AACG,SAAU,KAAK,CAAC,QAAyB,EAAE,OAAe,EAAA;AAC5D,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE;AAExB,IAAA,MAAM,YAAY,GAAG,CAAC,EAAE,SAAS,EAAa,KAAI;AAC9C,QAAA,MAAM,OAAO,GAAG,SAAS,GAAG,KAAK;AAEjC,QAAA,IAAI,OAAO,IAAI,OAAO,EAAE;YACpB,WAAW,CAAC,YAAY,CAAC;AACzB,YAAA,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;QAC/B;AACJ,IAAA,CAAC;AAED,IAAA,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC;AAE/B,IAAA,OAAO,MAAM,WAAW,CAAC,YAAY,CAAC;AAC1C;AAEM,SAAU,cAAc,CAAC,QAAyB,EAAE,OAAe,EAAA;IACrE,OAAO,KAAK,CAAC,QAAQ,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAC1D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/interpolate.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/interpolate.mjs deleted file mode 100644 index a7260c7b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/interpolate.mjs +++ /dev/null @@ -1,75 +0,0 @@ -import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils'; -import { mix } from './mix/index.mjs'; - -function createMixers(output, ease, customMixer) { - const mixers = []; - const mixerFactory = customMixer || MotionGlobalConfig.mix || mix; - const numMixers = output.length - 1; - for (let i = 0; i < numMixers; i++) { - let mixer = mixerFactory(output[i], output[i + 1]); - if (ease) { - const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease; - mixer = pipe(easingFunction, mixer); - } - mixers.push(mixer); - } - return mixers; -} -/** - * Create a function that maps from a numerical input array to a generic output array. - * - * Accepts: - * - Numbers - * - Colors (hex, hsl, hsla, rgb, rgba) - * - Complex (combinations of one or more numbers or strings) - * - * ```jsx - * const mixColor = interpolate([0, 1], ['#fff', '#000']) - * - * mixColor(0.5) // 'rgba(128, 128, 128, 1)' - * ``` - * - * TODO Revisit this approach once we've moved to data models for values, - * probably not needed to pregenerate mixer functions. - * - * @public - */ -function interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) { - const inputLength = input.length; - invariant(inputLength === output.length, "Both input and output ranges must be the same length", "range-length"); - /** - * If we're only provided a single input, we can just make a function - * that returns the output. - */ - if (inputLength === 1) - return () => output[0]; - if (inputLength === 2 && output[0] === output[1]) - return () => output[1]; - const isZeroDeltaRange = input[0] === input[1]; - // If input runs highest -> lowest, reverse both arrays - if (input[0] > input[inputLength - 1]) { - input = [...input].reverse(); - output = [...output].reverse(); - } - const mixers = createMixers(output, ease, mixer); - const numMixers = mixers.length; - const interpolator = (v) => { - if (isZeroDeltaRange && v < input[0]) - return output[0]; - let i = 0; - if (numMixers > 1) { - for (; i < input.length - 2; i++) { - if (v < input[i + 1]) - break; - } - } - const progressInRange = progress(input[i], input[i + 1], v); - return mixers[i](progressInRange); - }; - return isClamp - ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v)) - : interpolator; -} - -export { interpolate }; -//# sourceMappingURL=interpolate.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/interpolate.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/interpolate.mjs.map deleted file mode 100644 index c5dcae1a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/interpolate.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interpolate.mjs","sources":["../../../src/utils/interpolate.ts"],"sourcesContent":["import {\n clamp,\n EasingFunction,\n invariant,\n MotionGlobalConfig,\n noop,\n pipe,\n progress,\n} from \"motion-utils\"\nimport { mix } from \"./mix\"\nimport { Mixer, MixerFactory } from \"./mix/types\"\n\nexport interface InterpolateOptions {\n clamp?: boolean\n ease?: EasingFunction | EasingFunction[]\n mixer?: MixerFactory\n}\n\nfunction createMixers(\n output: T[],\n ease?: EasingFunction | EasingFunction[],\n customMixer?: MixerFactory\n) {\n const mixers: Array> = []\n const mixerFactory: MixerFactory =\n customMixer || MotionGlobalConfig.mix || mix\n const numMixers = output.length - 1\n\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1])\n\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease\n mixer = pipe(easingFunction, mixer) as Mixer\n }\n\n mixers.push(mixer)\n }\n\n return mixers\n}\n\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nexport function interpolate(\n input: number[],\n output: T[],\n { clamp: isClamp = true, ease, mixer }: InterpolateOptions = {}\n): (v: number) => T {\n const inputLength = input.length\n\n invariant(\n inputLength === output.length,\n \"Both input and output ranges must be the same length\",\n \"range-length\"\n )\n\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1) return () => output[0]\n if (inputLength === 2 && output[0] === output[1]) return () => output[1]\n\n const isZeroDeltaRange = input[0] === input[1]\n\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse()\n output = [...output].reverse()\n }\n\n const mixers = createMixers(output, ease, mixer)\n const numMixers = mixers.length\n\n const interpolator = (v: number): T => {\n if (isZeroDeltaRange && v < input[0]) return output[0]\n\n let i = 0\n\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1]) break\n }\n }\n\n const progressInRange = progress(input[i], input[i + 1], v)\n\n return mixers[i](progressInRange)\n }\n\n return isClamp\n ? (v: number) =>\n interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator\n}\n"],"names":[],"mappings":";;;AAkBA,SAAS,YAAY,CACjB,MAAW,EACX,IAAwC,EACxC,WAA6B,EAAA;IAE7B,MAAM,MAAM,GAAoB,EAAE;IAClC,MAAM,YAAY,GACd,WAAW,IAAI,kBAAkB,CAAC,GAAG,IAAI,GAAG;AAChD,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC;AAEnC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;AAChC,QAAA,IAAI,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAElD,IAAI,IAAI,EAAE;YACN,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,IAAI;AACnE,YAAA,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,KAAK,CAAa;QACnD;AAEA,QAAA,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;IACtB;AAEA,IAAA,OAAO,MAAM;AACjB;AAEA;;;;;;;;;;;;;;;;;;AAkBG;SACa,WAAW,CACvB,KAAe,EACf,MAAW,EACX,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,EAAE,IAAI,EAAE,KAAK,K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,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AAE3D,QAAA,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC;AACrC,IAAA,CAAC;AAED,IAAA,OAAO;UACD,CAAC,CAAS,KACN,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;UAC3D,YAAY;AACtB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-html-element.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-html-element.mjs deleted file mode 100644 index 9ead44d3..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-html-element.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { isObject } from 'motion-utils'; - -/** - * Checks if an element is an HTML element in a way - * that works across iframes - */ -function isHTMLElement(element) { - return (isObject(element) && - "offsetHeight" in element && - !("ownerSVGElement" in element)); -} - -export { isHTMLElement }; -//# sourceMappingURL=is-html-element.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-html-element.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-html-element.mjs.map deleted file mode 100644 index 3e9f0324..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-html-element.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-html-element.mjs","sources":["../../../src/utils/is-html-element.ts"],"sourcesContent":["import { isObject } from \"motion-utils\"\n\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nexport function isHTMLElement(element: unknown): element is HTMLElement {\n return (\n isObject(element) &&\n \"offsetHeight\" in element &&\n !(\"ownerSVGElement\" in element)\n )\n}\n"],"names":[],"mappings":";;AAEA;;;AAGG;AACG,SAAU,aAAa,CAAC,OAAgB,EAAA;AAC1C,IAAA,QACI,QAAQ,CAAC,OAAO,CAAC;AACjB,QAAA,cAAc,IAAI,OAAO;AACzB,QAAA,EAAE,iBAAiB,IAAI,OAAO,CAAC;AAEvC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs deleted file mode 100644 index f529a495..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import { isObject } from 'motion-utils'; - -/** - * Checks if an element is an SVG element in a way - * that works across iframes - */ -function isSVGElement(element) { - return isObject(element) && "ownerSVGElement" in element; -} - -export { isSVGElement }; -//# sourceMappingURL=is-svg-element.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs.map deleted file mode 100644 index bf9056cd..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-svg-element.mjs","sources":["../../../src/utils/is-svg-element.ts"],"sourcesContent":["import { isObject } from \"motion-utils\"\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nexport function isSVGElement(element: unknown): element is SVGElement {\n return isObject(element) && \"ownerSVGElement\" in element\n}\n"],"names":[],"mappings":";;AAEA;;;AAGG;AACG,SAAU,YAAY,CAAC,OAAgB,EAAA;IACzC,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,iBAAiB,IAAI,OAAO;AAC5D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs deleted file mode 100644 index e61de126..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import { isSVGElement } from './is-svg-element.mjs'; - -/** - * Checks if an element is specifically an SVGSVGElement (the root SVG element) - * in a way that works across iframes - */ -function isSVGSVGElement(element) { - return isSVGElement(element) && element.tagName === "svg"; -} - -export { isSVGSVGElement }; -//# sourceMappingURL=is-svg-svg-element.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs.map deleted file mode 100644 index 80b46cf5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-svg-svg-element.mjs","sources":["../../../src/utils/is-svg-svg-element.ts"],"sourcesContent":["import { isSVGElement } from \"./is-svg-element\"\n\n/**\n * Checks if an element is specifically an SVGSVGElement (the root SVG element)\n * in a way that works across iframes\n */\nexport function isSVGSVGElement(element: unknown): element is SVGSVGElement {\n return isSVGElement(element) && element.tagName === \"svg\"\n}\n"],"names":[],"mappings":";;AAEA;;;AAGG;AACG,SAAU,eAAe,CAAC,OAAgB,EAAA;IAC5C,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,OAAO,KAAK,KAAK;AAC7D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/color.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/color.mjs deleted file mode 100644 index 5c1bc4bd..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/color.mjs +++ /dev/null @@ -1,48 +0,0 @@ -import { warning } from 'motion-utils'; -import { hex } from '../../value/types/color/hex.mjs'; -import { hsla } from '../../value/types/color/hsla.mjs'; -import { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs'; -import { rgba } from '../../value/types/color/rgba.mjs'; -import { mixImmediate } from './immediate.mjs'; -import { mixNumber } from './number.mjs'; - -// Linear color space blending -// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw -// Demonstrated http://codepen.io/osublake/pen/xGVVaN -const mixLinearColor = (from, to, v) => { - const fromExpo = from * from; - const expo = v * (to * to - fromExpo) + fromExpo; - return expo < 0 ? 0 : Math.sqrt(expo); -}; -const colorTypes = [hex, rgba, hsla]; -const getColorType = (v) => colorTypes.find((type) => type.test(v)); -function asRGBA(color) { - const type = getColorType(color); - warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"); - if (!Boolean(type)) - return false; - let model = type.parse(color); - if (type === hsla) { - // TODO Remove this cast - needed since Motion's stricter typing - model = hslaToRgba(model); - } - return model; -} -const mixColor = (from, to) => { - const fromRGBA = asRGBA(from); - const toRGBA = asRGBA(to); - if (!fromRGBA || !toRGBA) { - return mixImmediate(from, to); - } - const blended = { ...fromRGBA }; - return (v) => { - blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v); - blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v); - blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v); - blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v); - return rgba.transform(blended); - }; -}; - -export { mixColor, mixLinearColor }; -//# sourceMappingURL=color.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/color.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/color.mjs.map deleted file mode 100644 index e5228d6b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/color.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"color.mjs","sources":["../../../../src/utils/mix/color.ts"],"sourcesContent":["import { warning } from \"motion-utils\"\nimport { hex } from \"../../value/types/color/hex\"\nimport { hsla } from \"../../value/types/color/hsla\"\nimport { hslaToRgba } from \"../../value/types/color/hsla-to-rgba\"\nimport { rgba } from \"../../value/types/color/rgba\"\nimport { Color, HSLA, RGBA } from \"../../value/types/types\"\nimport { mixImmediate } from \"./immediate\"\nimport { mixNumber } from \"./number\"\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nexport const mixLinearColor = (from: number, to: number, v: number) => {\n const fromExpo = from * from\n const expo = v * (to * to - fromExpo) + fromExpo\n return expo < 0 ? 0 : Math.sqrt(expo)\n}\n\nconst colorTypes = [hex, rgba, hsla]\nconst getColorType = (v: Color | string) =>\n colorTypes.find((type) => type.test(v))\n\nfunction asRGBA(color: Color | string) {\n const type = getColorType(color)\n\n warning(\n Boolean(type),\n `'${color}' is not an animatable color. Use the equivalent color code instead.`,\n \"color-not-animatable\"\n )\n\n if (!Boolean(type)) return false\n\n let model = type!.parse(color)\n\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model as HSLA)\n }\n\n return model as RGBA\n}\n\nexport const mixColor = (from: Color | string, to: Color | string) => {\n const fromRGBA = asRGBA(from)\n const toRGBA = asRGBA(to)\n\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to)\n }\n\n const blended = { ...fromRGBA }\n\n return (v: number) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v)\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v)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;AAC7B,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAEzB,IAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,EAAE;AACtB,QAAA,OAAO,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC;IACjC;AAEA,IAAA,MAAM,OAAO,GAAG,EAAE,GAAG,QAAQ,EAAE;IAE/B,OAAO,CAAC,CAAS,KAAI;AACjB,QAAA,OAAO,CAAC,GAAG,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;AACzD,QAAA,OAAO,CAAC,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC/D,QAAA,OAAO,CAAC,IAAI,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5D,QAAA,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC1D,QAAA,OAAO,IAAI,CAAC,SAAU,CAAC,OAAO,CAAC;AACnC,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/complex.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/complex.mjs deleted file mode 100644 index 687a6411..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/complex.mjs +++ /dev/null @@ -1,93 +0,0 @@ -import { pipe, warning } from 'motion-utils'; -import { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs'; -import { color } from '../../value/types/color/index.mjs'; -import { complex, analyseComplexValue } from '../../value/types/complex/index.mjs'; -import { mixColor } from './color.mjs'; -import { mixImmediate } from './immediate.mjs'; -import { mixNumber as mixNumber$1 } from './number.mjs'; -import { invisibleValues, mixVisibility } from './visibility.mjs'; - -function mixNumber(a, b) { - return (p) => mixNumber$1(a, b, p); -} -function getMixer(a) { - if (typeof a === "number") { - return mixNumber; - } - else if (typeof a === "string") { - return isCSSVariableToken(a) - ? mixImmediate - : color.test(a) - ? mixColor - : mixComplex; - } - else if (Array.isArray(a)) { - return mixArray; - } - else if (typeof a === "object") { - return color.test(a) ? mixColor : mixObject; - } - return mixImmediate; -} -function mixArray(a, b) { - const output = [...a]; - const numValues = output.length; - const blendValue = a.map((v, i) => getMixer(v)(v, b[i])); - return (p) => { - for (let i = 0; i < numValues; i++) { - output[i] = blendValue[i](p); - } - return output; - }; -} -function mixObject(a, b) { - const output = { ...a, ...b }; - const blendValue = {}; - for (const key in output) { - if (a[key] !== undefined && b[key] !== undefined) { - blendValue[key] = getMixer(a[key])(a[key], b[key]); - } - } - return (v) => { - for (const key in blendValue) { - output[key] = blendValue[key](v); - } - return output; - }; -} -function matchOrder(origin, target) { - const orderedOrigin = []; - const pointers = { color: 0, var: 0, number: 0 }; - for (let i = 0; i < target.values.length; i++) { - const type = target.types[i]; - const originIndex = origin.indexes[type][pointers[type]]; - const originValue = origin.values[originIndex] ?? 0; - orderedOrigin[i] = originValue; - pointers[type]++; - } - return orderedOrigin; -} -const mixComplex = (origin, target) => { - const template = complex.createTransformer(target); - const originStats = analyseComplexValue(origin); - const targetStats = analyseComplexValue(target); - const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length && - originStats.indexes.color.length === targetStats.indexes.color.length && - originStats.indexes.number.length >= targetStats.indexes.number.length; - if (canInterpolate) { - if ((invisibleValues.has(origin) && - !targetStats.values.length) || - (invisibleValues.has(target) && - !originStats.values.length)) { - return mixVisibility(origin, target); - } - return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template); - } - else { - warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"); - return mixImmediate(origin, target); - } -}; - -export { getMixer, mixArray, mixComplex, mixObject }; -//# sourceMappingURL=complex.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.map deleted file mode 100644 index 61d88125..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"complex.mjs","sources":["../../../../src/utils/mix/complex.ts"],"sourcesContent":["import { pipe, warning } from \"motion-utils\"\nimport { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isCSSVariableToken } from \"../../animation/utils/is-css-variable\"\nimport { color } from \"../../value/types/color\"\nimport {\n analyseComplexValue,\n complex,\n ComplexValueInfo,\n ComplexValues,\n} from \"../../value/types/complex\"\nimport { HSLA, RGBA } from \"../../value/types/types\"\nimport { mixColor } from \"./color\"\nimport { mixImmediate } from \"./immediate\"\nimport { mixNumber as mixNumberImmediate } from \"./number\"\nimport { invisibleValues, mixVisibility } from \"./visibility\"\n\ntype MixableArray = Array\ninterface MixableObject {\n [key: string]: AnyResolvedKeyframe | RGBA | HSLA\n}\n\nfunction mixNumber(a: number, b: number) {\n return (p: number) => mixNumberImmediate(a, b, p)\n}\n\nexport function getMixer(a: T) {\n if (typeof a === \"number\") {\n return mixNumber\n } else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex\n } else if (Array.isArray(a)) {\n return mixArray\n } else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject\n }\n\n return mixImmediate\n}\n\nexport function mixArray(a: MixableArray, b: MixableArray) {\n const output = [...a]\n const numValues = output.length\n\n const blendValue = a.map((v, i) => getMixer(v)(v as any, b[i] as any))\n\n return (p: number) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p) as any\n }\n return output\n }\n}\n\nexport function mixObject(a: MixableObject, b: MixableObject) {\n const output = { ...a, ...b }\n const blendValue: { [key: string]: (v: number) => any } = {}\n\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(\n a[key] as any,\n b[key] as any\n ) as any\n }\n }\n\n return (v: number) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v)\n }\n return output\n }\n}\n\nfunction matchOrder(\n origin: ComplexValueInfo,\n target: ComplexValueInfo\n): ComplexValues {\n const orderedOrigin: ComplexValues = []\n\n const pointers = { color: 0, var: 0, number: 0 }\n\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i]\n const originIndex = origin.indexes[type][pointers[type]]\n const originValue = origin.values[originIndex] ?? 0\n\n orderedOrigin[i] = originValue\n\n pointers[type]++\n }\n\n return orderedOrigin\n}\n\nexport const mixComplex = (\n origin: AnyResolvedKeyframe,\n target: AnyResolvedKeyframe\n) => {\n const template = complex.createTransformer(target)\n const originStats = analyseComplexValue(origin)\n const targetStats = analyseComplexValue(target)\n const canInterpolate =\n originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length\n\n if (canInterpolate) {\n if (\n (invisibleValues.has(origin as string) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target as string) &&\n !originStats.values.length)\n ) {\n return mixVisibility(origin as string, target as string)\n }\n\n return pipe(\n mixArray(matchOrder(originStats, targetStats), targetStats.values),\n template\n )\n } else {\n warning(\n true,\n `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,\n \"complex-values-different\"\n )\n\n return mixImmediate(origin, target)\n }\n}\n"],"names":["mixNumberImmediate"],"mappings":";;;;;;;;;AAqBA,SAAS,SAAS,CAAC,CAAS,EAAE,CAAS,EAAA;AACnC,IAAA,OAAO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,CAAC;IACvC;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs deleted file mode 100644 index 12ca8720..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs +++ /dev/null @@ -1,6 +0,0 @@ -function mixImmediate(a, b) { - return (p) => (p > 0 ? b : a); -} - -export { mixImmediate }; -//# sourceMappingURL=immediate.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs.map deleted file mode 100644 index 7b75737d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"immediate.mjs","sources":["../../../../src/utils/mix/immediate.ts"],"sourcesContent":["export function mixImmediate(a: T, b: T) {\n return (p: number) => (p > 0 ? b : a)\n}\n"],"names":[],"mappings":"AAAM,SAAU,YAAY,CAAI,CAAI,EAAE,CAAI,EAAA;AACtC,IAAA,OAAO,CAAC,CAAS,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACzC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/index.mjs deleted file mode 100644 index e41e103e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/index.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { getMixer } from './complex.mjs'; -import { mixNumber } from './number.mjs'; - -function mix(from, to, p) { - if (typeof from === "number" && - typeof to === "number" && - typeof p === "number") { - return mixNumber(from, to, p); - } - const mixer = getMixer(from); - return mixer(from, to); -} - -export { mix }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/index.mjs.map deleted file mode 100644 index 3b7d1d92..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../src/utils/mix/index.ts"],"sourcesContent":["import { getMixer } from \"./complex\"\nimport { mixNumber as mixNumberImmediate } from \"./number\"\nimport { Mixer } from \"./types\"\n\nexport function mix(from: T, to: T): Mixer\nexport function mix(from: number, to: number, p: number): number\nexport function mix(from: T, to: T, p?: T): Mixer | number {\n if (\n typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\"\n ) {\n return mixNumberImmediate(from, to, p)\n }\n\n const mixer = getMixer(from)\n return mixer(from as any, to as any) as Mixer\n}\n"],"names":["mixNumberImmediate"],"mappings":";;;SAMgB,GAAG,CAAI,IAAO,EAAE,EAAK,EAAE,CAAK,EAAA;IACxC,IACI,OAAO,IAAI,KAAK,QAAQ;QACxB,OAAO,EAAE,KAAK,QAAQ;AACtB,QAAA,OAAO,CAAC,KAAK,QAAQ,EACvB;QACE,OAAOA,SAAkB,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC1C;AAEA,IAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC5B,IAAA,OAAO,KAAK,CAAC,IAAW,EAAE,EAAS,CAAa;AACpD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/number.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/number.mjs deleted file mode 100644 index 1e19dfc5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/number.mjs +++ /dev/null @@ -1,27 +0,0 @@ -/* - Value in range from progress - - Given a lower limit and an upper limit, we return the value within - that range as expressed by progress (usually a number from 0 to 1) - - So progress = 0.5 would change - - from -------- to - - to - - from ---- to - - E.g. from = 10, to = 20, progress = 0.5 => 15 - - @param [number]: Lower limit of range - @param [number]: Upper limit of range - @param [number]: The progress between lower and upper limits expressed 0-1 - @return [number]: Value as calculated from progress within range (not limited within range) -*/ -const mixNumber = (from, to, progress) => { - return from + (to - from) * progress; -}; - -export { mixNumber }; -//# sourceMappingURL=number.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/number.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/number.mjs.map deleted file mode 100644 index c4414bc6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/number.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"number.mjs","sources":["../../../../src/utils/mix/number.ts"],"sourcesContent":["/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nexport const mixNumber = (from: number, to: number, progress: number) => {\n return from + (to - from) * progress\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;AAoBE;AACK,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,QAAgB,KAAI;IACpE,OAAO,IAAI,GAAG,CAAC,EAAE,GAAG,IAAI,IAAI,QAAQ;AACxC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs deleted file mode 100644 index 3810ffe4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs +++ /dev/null @@ -1,17 +0,0 @@ -const invisibleValues = new Set(["none", "hidden"]); -/** - * Returns a function that, when provided a progress value between 0 and 1, - * will return the "none" or "hidden" string only when the progress is that of - * the origin or target. - */ -function mixVisibility(origin, target) { - if (invisibleValues.has(origin)) { - return (p) => (p <= 0 ? origin : target); - } - else { - return (p) => (p >= 1 ? target : origin); - } -} - -export { invisibleValues, mixVisibility }; -//# sourceMappingURL=visibility.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs.map deleted file mode 100644 index 76ac7b69..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"visibility.mjs","sources":["../../../../src/utils/mix/visibility.ts"],"sourcesContent":["export const invisibleValues = new Set([\"none\", \"hidden\"])\n\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nexport function mixVisibility(origin: string, target: string) {\n if (invisibleValues.has(origin)) {\n return (p: number) => (p <= 0 ? origin : target)\n } else {\n return (p: number) => (p >= 1 ? target : origin)\n }\n}\n"],"names":[],"mappings":"AAAO,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC;AAEzD;;;;AAIG;AACG,SAAU,aAAa,CAAC,MAAc,EAAE,MAAc,EAAA;AACxD,IAAA,IAAI,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;AAC7B,QAAA,OAAO,CAAC,CAAS,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,MAAM,CAAC;IACpD;SAAO;AACH,QAAA,OAAO,CAAC,CAAS,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,MAAM,CAAC;IACpD;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs deleted file mode 100644 index a90b0c34..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs +++ /dev/null @@ -1,21 +0,0 @@ -function resolveElements(elementOrSelector, scope, selectorCache) { - if (elementOrSelector == null) { - return []; - } - if (elementOrSelector instanceof EventTarget) { - return [elementOrSelector]; - } - else if (typeof elementOrSelector === "string") { - let root = document; - if (scope) { - root = scope.current; - } - const elements = selectorCache?.[elementOrSelector] ?? - root.querySelectorAll(elementOrSelector); - return elements ? Array.from(elements) : []; - } - return Array.from(elementOrSelector).filter((element) => element != null); -} - -export { resolveElements }; -//# sourceMappingURL=resolve-elements.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.map deleted file mode 100644 index 3944813b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-elements.mjs","sources":["../../../src/utils/resolve-elements.ts"],"sourcesContent":["export type ElementOrSelector =\n | Element\n | Element[]\n | NodeListOf\n | string\n | null\n | undefined\n\nexport interface WithQuerySelectorAll {\n querySelectorAll: Element[\"querySelectorAll\"]\n}\n\nexport interface AnimationScope {\n readonly current: T\n animations: any[] // TODO: Refactor to types package AnimationPlaybackControls[]\n}\n\nexport interface SelectorCache {\n [key: string]: NodeListOf\n}\n\nexport function resolveElements(\n elementOrSelector: ElementOrSelector,\n scope?: AnimationScope,\n selectorCache?: SelectorCache\n): Element[] {\n if (elementOrSelector == null) {\n return []\n }\n\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector]\n } else if (typeof elementOrSelector === \"string\") {\n let root: WithQuerySelectorAll = document\n\n if (scope) {\n root = scope.current\n }\n\n const elements =\n selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector)\n\n return elements ? Array.from(elements) : []\n }\n\n return Array.from(elementOrSelector).filter(\n (element): element is Element => element != null\n )\n}\n"],"names":[],"mappings":"SAqBgB,eAAe,CAC3B,iBAAoC,EACpC,KAAsB,EACtB,aAA6B,EAAA;AAE7B,IAAA,IAAI,iBAAiB,IAAI,IAAI,EAAE;AAC3B,QAAA,OAAO,EAAE;IACb;AAEA,IAAA,IAAI,iBAAiB,YAAY,WAAW,EAAE;QAC1C,OAAO,CAAC,iBAAiB,CAAC;IAC9B;AAAO,SAAA,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;QAC9C,IAAI,IAAI,GAAyB,QAAQ;QAEzC,IAAI,KAAK,EAAE;AACP,YAAA,IAAI,GAAG,KAAK,CAAC,OAAO;QACxB;AAEA,QAAA,MAAM,QAAQ,GACV,aAAa,GAAG,iBAAiB,CAAC;AAClC,YAAA,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC;AAE5C,QAAA,OAAO,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;IAC/C;AAEA,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,CACvC,CAAC,OAAO,KAAyB,OAAO,IAAI,IAAI,CACnD;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/stagger.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/stagger.mjs deleted file mode 100644 index ed9b4699..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/stagger.mjs +++ /dev/null @@ -1,27 +0,0 @@ -import { easingDefinitionToFunction } from 'motion-utils'; - -function getOriginIndex(from, total) { - if (from === "first") { - return 0; - } - else { - const lastIndex = total - 1; - return from === "last" ? lastIndex : lastIndex / 2; - } -} -function stagger(duration = 0.1, { startDelay = 0, from = 0, ease } = {}) { - return (i, total) => { - const fromIndex = typeof from === "number" ? from : getOriginIndex(from, total); - const distance = Math.abs(fromIndex - i); - let delay = duration * distance; - if (ease) { - const maxDelay = total * duration; - const easingFunction = easingDefinitionToFunction(ease); - delay = easingFunction(delay / maxDelay) * maxDelay; - } - return startDelay + delay; - }; -} - -export { getOriginIndex, stagger }; -//# sourceMappingURL=stagger.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/stagger.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/stagger.mjs.map deleted file mode 100644 index 96d6e9c6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/stagger.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stagger.mjs","sources":["../../../src/utils/stagger.ts"],"sourcesContent":["import { Easing, easingDefinitionToFunction } from \"motion-utils\"\nimport { DynamicOption } from \"../animation/types\"\n\nexport type StaggerOrigin = \"first\" | \"last\" | \"center\" | number\n\nexport type StaggerOptions = {\n startDelay?: number\n from?: StaggerOrigin\n ease?: Easing\n}\n\nexport function getOriginIndex(from: StaggerOrigin, total: number) {\n if (from === \"first\") {\n return 0\n } else {\n const lastIndex = total - 1\n return from === \"last\" ? lastIndex : lastIndex / 2\n }\n}\n\nexport function stagger(\n duration: number = 0.1,\n { startDelay = 0, from = 0, ease }: StaggerOptions = {}\n): DynamicOption {\n return (i: number, total: number) => {\n const fromIndex =\n typeof from === \"number\" ? from : getOriginIndex(from, total)\n const distance = Math.abs(fromIndex - i)\n let delay = duration * distance\n\n if (ease) {\n const maxDelay = total * duration\n const easingFunction = easingDefinitionToFunction(ease)\n delay = easingFunction(delay / maxDelay) * maxDelay\n }\n\n return startDelay + delay\n }\n}\n"],"names":[],"mappings":";;AAWM,SAAU,cAAc,CAAC,IAAmB,EAAE,KAAa,EAAA;AAC7D,IAAA,IAAI,IAAI,KAAK,OAAO,EAAE;AAClB,QAAA,OAAO,CAAC;IACZ;SAAO;AACH,QAAA,MAAM,SAAS,GAAG,KAAK,GAAG,CAAC;AAC3B,QAAA,OAAO,IAAI,KAAK,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,CAAC;IACtD;AACJ;SAEgB,OAAO,CACnB,QAAA,GAAmB,GAAG,EACtB,EAAE,UAAU,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,KAAqB,EAAE,EAAA;AAEvD,IAAA,OAAO,CAAC,CAAS,EAAE,KAAa,KAAI;AAChC,QAAA,MAAM,SAAS,GACX,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC;QACjE,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;AACxC,QAAA,IAAI,KAAK,GAAG,QAAQ,GAAG,QAAQ;QAE/B,IAAI,IAAI,EAAE;AACN,YAAA,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ;AACjC,YAAA,MAAM,cAAc,GAAG,0BAA0B,CAAC,IAAI,CAAC;YACvD,KAAK,GAAG,cAAc,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,QAAQ;QACvD;QAEA,OAAO,UAAU,GAAG,KAAK;AAC7B,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/flags.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/flags.mjs deleted file mode 100644 index e0682b19..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/flags.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Add the ability for test suites to manually set support flags - * to better test more environments. - */ -const supportsFlags = {}; - -export { supportsFlags }; -//# sourceMappingURL=flags.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/flags.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/flags.mjs.map deleted file mode 100644 index bd44b301..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/flags.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flags.mjs","sources":["../../../../src/utils/supports/flags.ts"],"sourcesContent":["/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nexport const supportsFlags: Record = {}\n"],"names":[],"mappings":"AAAA;;;AAGG;AACI,MAAM,aAAa,GAAwC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs deleted file mode 100644 index 38f3729d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import { memoSupports } from './memo.mjs'; - -const supportsLinearEasing = /*@__PURE__*/ memoSupports(() => { - try { - document - .createElement("div") - .animate({ opacity: 0 }, { easing: "linear(0, 1)" }); - } - catch (e) { - return false; - } - return true; -}, "linearEasing"); - -export { supportsLinearEasing }; -//# sourceMappingURL=linear-easing.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs.map deleted file mode 100644 index e44c3a64..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linear-easing.mjs","sources":["../../../../src/utils/supports/linear-easing.ts"],"sourcesContent":["import { memoSupports } from \"./memo\"\n\nexport const supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" })\n } catch (e) {\n return false\n }\n return true\n}, \"linearEasing\")\n"],"names":[],"mappings":";;MAEa,oBAAoB,iBAAiB,YAAY,CAAC,MAAK;AAChE,IAAA,IAAI;QACA;aACK,aAAa,CAAC,KAAK;AACnB,aAAA,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IAC5D;IAAE,OAAO,CAAC,EAAE;AACR,QAAA,OAAO,KAAK;IAChB;AACA,IAAA,OAAO,IAAI;AACf,CAAC,EAAE,cAAc;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/memo.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/memo.mjs deleted file mode 100644 index e8dd26a5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/memo.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { memo } from 'motion-utils'; -import { supportsFlags } from './flags.mjs'; - -function memoSupports(callback, supportsFlag) { - const memoized = memo(callback); - return () => supportsFlags[supportsFlag] ?? memoized(); -} - -export { memoSupports }; -//# sourceMappingURL=memo.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/memo.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/memo.mjs.map deleted file mode 100644 index 285c5299..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/memo.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"memo.mjs","sources":["../../../../src/utils/supports/memo.ts"],"sourcesContent":["import { memo } from \"motion-utils\"\nimport { supportsFlags } from \"./flags\"\n\nexport function memoSupports(\n callback: () => T,\n supportsFlag: keyof typeof supportsFlags\n) {\n const memoized = memo(callback)\n return () => supportsFlags[supportsFlag] ?? memoized()\n}\n"],"names":[],"mappings":";;;AAGM,SAAU,YAAY,CACxB,QAAiB,EACjB,YAAwC,EAAA;AAExC,IAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/B,OAAO,MAAM,aAAa,CAAC,YAAY,CAAC,IAAI,QAAQ,EAAE;AAC1D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs deleted file mode 100644 index 59d9549c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +++ /dev/null @@ -1,7 +0,0 @@ -import { memoSupports } from './memo.mjs'; - -const supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, "scrollTimeline"); -const supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, "viewTimeline"); - -export { supportsScrollTimeline, supportsViewTimeline }; -//# sourceMappingURL=scroll-timeline.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.map deleted file mode 100644 index f05adaa6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scroll-timeline.mjs","sources":["../../../../src/utils/supports/scroll-timeline.ts"],"sourcesContent":["import { ProgressTimeline } from \"../..\"\nimport { memoSupports } from \"./memo\"\n\ndeclare global {\n interface Window {\n ScrollTimeline: ScrollTimeline\n ViewTimeline: ViewTimeline\n }\n}\n\ndeclare class ScrollTimeline implements ProgressTimeline {\n constructor(options: ScrollOptions)\n\n currentTime: null | { value: number }\n\n cancel?: VoidFunction\n}\n\ndeclare class ViewTimeline implements ProgressTimeline {\n constructor(options: { subject: Element; axis?: string })\n\n currentTime: null | { value: number }\n\n cancel?: VoidFunction\n}\n\nexport const supportsScrollTimeline = /* @__PURE__ */ memoSupports(\n () => window.ScrollTimeline !== undefined,\n \"scrollTimeline\"\n)\n\nexport const supportsViewTimeline = /* @__PURE__ */ memoSupports(\n () => window.ViewTimeline !== undefined,\n \"viewTimeline\"\n)\n"],"names":[],"mappings":";;AA0BO,MAAM,sBAAsB,mBAAmB,YAAY,CAC9D,MAAM,MAAM,CAAC,cAAc,KAAK,SAAS,EACzC,gBAAgB;AAGb,MAAM,oBAAoB,mBAAmB,YAAY,CAC5D,MAAM,MAAM,CAAC,YAAY,KAAK,SAAS,EACvC,cAAc;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/transform.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/transform.mjs deleted file mode 100644 index 74b624e0..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/transform.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { interpolate } from './interpolate.mjs'; - -function transform(...args) { - const useImmediate = !Array.isArray(args[0]); - const argOffset = useImmediate ? 0 : -1; - const inputValue = args[0 + argOffset]; - const inputRange = args[1 + argOffset]; - const outputRange = args[2 + argOffset]; - const options = args[3 + argOffset]; - const interpolator = interpolate(inputRange, outputRange, options); - return useImmediate ? interpolator(inputValue) : interpolator; -} - -export { transform }; -//# sourceMappingURL=transform.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/transform.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/transform.mjs.map deleted file mode 100644 index 462be813..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/utils/transform.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transform.mjs","sources":["../../../src/utils/transform.ts"],"sourcesContent":["import { EasingFunction } from \"motion-utils\"\nimport { interpolate } from \"./interpolate\"\n\n/**\n * @public\n */\nexport interface TransformOptions {\n /**\n * Clamp values to within the given range. Defaults to `true`\n *\n * @public\n */\n clamp?: boolean\n\n /**\n * Easing functions to use on the interpolations between each value in the input and output ranges.\n *\n * If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition **between** each.\n *\n * @public\n */\n ease?: EasingFunction | EasingFunction[]\n\n /**\n * Provide a function that can interpolate between any two values in the provided range.\n *\n * @public\n */\n mixer?: (from: T, to: T) => (v: number) => any\n}\n\n/**\n * Transforms numbers into other values by mapping them from an input range to an output range.\n * Returns the type of the input provided.\n *\n * @remarks\n *\n * Given an input range of `[0, 200]` and an output range of\n * `[0, 1]`, this function will return a value between `0` and `1`.\n * The input range must be a linear series of numbers. The output range\n * can be any supported value type, such as numbers, colors, shadows, arrays, objects and more.\n * Every value in the output range must be of the same type and in the same format.\n *\n * ```jsx\n * export function MyComponent() {\n * const inputRange = [0, 200]\n * const outputRange = [0, 1]\n * const output = transform(100, inputRange, outputRange)\n *\n * // Returns 0.5\n * return
{output}
\n * }\n * ```\n *\n * @param inputValue - A number to transform between the input and output ranges.\n * @param inputRange - A linear series of numbers (either all increasing or decreasing).\n * @param outputRange - A series of numbers, colors, strings, or arrays/objects of those. Must be the same length as `inputRange`.\n * @param options - Clamp: Clamp values to within the given range. Defaults to `true`.\n *\n * @public\n */\nexport function transform(\n inputValue: number,\n inputRange: number[],\n outputRange: T[],\n options?: TransformOptions\n): T\n/**\n *\n * Transforms numbers into other values by mapping them from an input range to an output range.\n *\n * Given an input range of `[0, 200]` and an output range of\n * `[0, 1]`, this function will return a value between `0` and `1`.\n * The input range must be a linear series of numbers. The output range\n * can be any supported value type, such as numbers, colors, shadows, arrays, objects and more.\n * Every value in the output range must be of the same type and in the same format.\n *\n * ```jsx\n * export function MyComponent() {\n * const inputRange = [-200, -100, 100, 200]\n * const outputRange = [0, 1, 1, 0]\n * const convertRange = transform(inputRange, outputRange)\n * const output = convertRange(-150)\n *\n * // Returns 0.5\n * return
{output}
\n * }\n *\n * ```\n *\n * @param inputRange - A linear series of numbers (either all increasing or decreasing).\n * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`.\n * @param options - Clamp: clamp values to within the given range. Defaults to `true`.\n *\n * @public\n */\nexport function transform(\n inputRange: number[],\n outputRange: T[],\n options?: TransformOptions\n): (inputValue: number) => T\nexport function transform(\n ...args:\n | [number, number[], T[], TransformOptions?]\n | [number[], T[], TransformOptions?]\n) {\n const useImmediate = !Array.isArray(args[0])\n const argOffset = useImmediate ? 0 : -1\n const inputValue = args[0 + argOffset] as number\n const inputRange = args[1 + argOffset] as number[]\n const outputRange = args[2 + argOffset] as T[]\n const options = args[3 + argOffset] as TransformOptions\n\n const interpolator = interpolate(inputRange, outputRange, options)\n\n return useImmediate ? interpolator(inputValue) : interpolator\n}\n"],"names":[],"mappings":";;AAqGM,SAAU,SAAS,CACrB,GAAG,IAEwC,EAAA;AAE3C,IAAA,MAAM,YAAY,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5C,IAAA,MAAM,SAAS,GAAG,YAAY,GAAG,CAAC,GAAG,EAAE;IACvC,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,GAAG,SAAS,CAAW;IAChD,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,GAAG,SAAS,CAAa;IAClD,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,GAAG,SAAS,CAAQ;IAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,GAAG,SAAS,CAAwB;IAE1D,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC;AAElE,IAAA,OAAO,YAAY,GAAG,YAAY,CAAC,UAAU,CAAC,GAAG,YAAY;AACjE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/follow-value.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/follow-value.mjs deleted file mode 100644 index 8a23743a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/follow-value.mjs +++ /dev/null @@ -1,124 +0,0 @@ -import { motionValue } from './index.mjs'; -import { JSAnimation } from '../animation/JSAnimation.mjs'; -import { isMotionValue } from './utils/is-motion-value.mjs'; -import { frame } from '../frameloop/frame.mjs'; - -/** - * Create a `MotionValue` that animates to its latest value using any transition type. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = followValue(x, { type: "spring", stiffness: 300 }) - * // or with tween - * const z = followValue(x, { type: "tween", duration: 0.5, ease: "easeOut" }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns `MotionValue` - * - * @public - */ -function followValue(source, options) { - const initialValue = isMotionValue(source) ? source.get() : source; - const value = motionValue(initialValue); - attachFollow(value, source, options); - return value; -} -/** - * Attach an animation to a MotionValue that will animate whenever the value changes. - * Similar to attachSpring but supports any transition type (spring, tween, inertia, etc.) - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns Cleanup function - * - * @public - */ -function attachFollow(value, source, options = {}) { - const initialValue = value.get(); - let activeAnimation = null; - let latestValue = initialValue; - let latestSetter; - const unit = typeof initialValue === "string" - ? initialValue.replace(/[\d.-]/g, "") - : undefined; - const stopAnimation = () => { - if (activeAnimation) { - activeAnimation.stop(); - activeAnimation = null; - } - value.animation = undefined; - }; - const startAnimation = () => { - const currentValue = asNumber(value.get()); - const targetValue = asNumber(latestValue); - // Don't animate if we're already at the target - if (currentValue === targetValue) { - stopAnimation(); - return; - } - // Use the running animation's analytical velocity for accuracy, - // falling back to the MotionValue's velocity for the initial animation. - // This prevents systematic velocity loss at high frame rates (240hz+). - const velocity = activeAnimation - ? activeAnimation.getGeneratorVelocity() - : value.getVelocity(); - stopAnimation(); - activeAnimation = new JSAnimation({ - keyframes: [currentValue, targetValue], - velocity, - // Default to spring if no type specified (matches useSpring behavior) - type: "spring", - restDelta: 0.001, - restSpeed: 0.01, - ...options, - onUpdate: latestSetter, - }); - }; - // Use a stable function reference so the frame loop Set deduplicates - // multiple calls within the same frame (e.g. rapid mouse events) - const scheduleAnimation = () => { - startAnimation(); - value.animation = activeAnimation ?? undefined; - value["events"].animationStart?.notify(); - activeAnimation?.then(() => { - value.animation = undefined; - value["events"].animationComplete?.notify(); - }); - }; - value.attach((v, set) => { - latestValue = v; - latestSetter = (latest) => set(parseValue(latest, unit)); - frame.postRender(scheduleAnimation); - }, stopAnimation); - if (isMotionValue(source)) { - let skipNextAnimation = options.skipInitialAnimation === true; - const removeSourceOnChange = source.on("change", (v) => { - if (skipNextAnimation) { - skipNextAnimation = false; - value.jump(parseValue(v, unit), false); - } - else { - value.set(parseValue(v, unit)); - } - }); - const removeValueOnDestroy = value.on("destroy", removeSourceOnChange); - return () => { - removeSourceOnChange(); - removeValueOnDestroy(); - }; - } - return stopAnimation; -} -function parseValue(v, unit) { - return unit ? v + unit : v; -} -function asNumber(v) { - return typeof v === "number" ? v : parseFloat(v); -} - -export { attachFollow, followValue }; -//# sourceMappingURL=follow-value.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/follow-value.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/follow-value.mjs.map deleted file mode 100644 index ed567862..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/follow-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"follow-value.mjs","sources":["../../../src/value/follow-value.ts"],"sourcesContent":["import { MotionValue, motionValue } from \".\"\nimport { JSAnimation } from \"../animation/JSAnimation\"\nimport { AnyResolvedKeyframe, ValueAnimationTransition } from \"../animation/types\"\nimport { frame } from \"../frameloop\"\nimport { isMotionValue } from \"./utils/is-motion-value\"\n\n/**\n * Options for useFollowValue hook, extending ValueAnimationTransition\n * but excluding lifecycle callbacks that don't make sense for the hook pattern.\n */\nexport type FollowValueOptions = Omit<\n ValueAnimationTransition,\n \"onUpdate\" | \"onComplete\" | \"onPlay\" | \"onRepeat\" | \"onStop\"\n> & {\n /**\n * When true, the first change from a tracked `MotionValue` source\n * will jump to the new value instead of animating. Subsequent\n * changes animate normally. This prevents unwanted animations\n * on page refresh or back navigation (e.g. `useScroll` + `useSpring`).\n *\n * @default false\n */\n skipInitialAnimation?: boolean\n}\n\n/**\n * Create a `MotionValue` that animates to its latest value using any transition type.\n * Can either be a value or track another `MotionValue`.\n *\n * ```jsx\n * const x = motionValue(0)\n * const y = followValue(x, { type: \"spring\", stiffness: 300 })\n * // or with tween\n * const z = followValue(x, { type: \"tween\", duration: 0.5, ease: \"easeOut\" })\n * ```\n *\n * @param source - Initial value or MotionValue to track\n * @param options - Animation transition options\n * @returns `MotionValue`\n *\n * @public\n */\nexport function followValue(\n source: T | MotionValue,\n options?: FollowValueOptions\n) {\n const initialValue = isMotionValue(source) ? source.get() : source\n const value = motionValue(initialValue)\n\n attachFollow(value, source, options)\n\n return value\n}\n\n/**\n * Attach an animation to a MotionValue that will animate whenever the value changes.\n * Similar to attachSpring but supports any transition type (spring, tween, inertia, etc.)\n *\n * @param value - The MotionValue to animate\n * @param source - Initial value or MotionValue to track\n * @param options - Animation transition options\n * @returns Cleanup function\n *\n * @public\n */\nexport function attachFollow(\n value: MotionValue,\n source: T | MotionValue,\n options: FollowValueOptions = {}\n): VoidFunction {\n const initialValue = value.get()\n\n let activeAnimation: JSAnimation | null = null\n let latestValue = initialValue\n let latestSetter: (v: T) => void\n\n const unit =\n typeof initialValue === \"string\"\n ? initialValue.replace(/[\\d.-]/g, \"\")\n : undefined\n\n const stopAnimation = () => {\n if (activeAnimation) {\n activeAnimation.stop()\n activeAnimation = null\n }\n value.animation = undefined\n }\n\n const startAnimation = () => {\n const currentValue = asNumber(value.get())\n const targetValue = asNumber(latestValue)\n\n // Don't animate if we're already at the target\n if (currentValue === targetValue) {\n stopAnimation()\n return\n }\n\n // Use the running animation's analytical velocity for accuracy,\n // falling back to the MotionValue's velocity for the initial animation.\n // This prevents systematic velocity loss at high frame rates (240hz+).\n const velocity = activeAnimation\n ? activeAnimation.getGeneratorVelocity()\n : value.getVelocity()\n\n stopAnimation()\n\n activeAnimation = new JSAnimation({\n keyframes: [currentValue, targetValue],\n velocity,\n // Default to spring if no type specified (matches useSpring behavior)\n type: \"spring\",\n restDelta: 0.001,\n restSpeed: 0.01,\n ...options,\n onUpdate: latestSetter,\n })\n }\n\n // Use a stable function reference so the frame loop Set deduplicates\n // multiple calls within the same frame (e.g. rapid mouse events)\n const scheduleAnimation = () => {\n startAnimation()\n value.animation = activeAnimation ?? undefined\n value[\"events\"].animationStart?.notify()\n activeAnimation?.then(() => {\n value.animation = undefined\n value[\"events\"].animationComplete?.notify()\n })\n }\n\n value.attach((v, set) => {\n latestValue = v\n latestSetter = (latest) => set(parseValue(latest, unit) as T)\n frame.postRender(scheduleAnimation)\n }, stopAnimation)\n\n if (isMotionValue(source)) {\n let skipNextAnimation = options.skipInitialAnimation === true\n\n const removeSourceOnChange = source.on(\"change\", (v) => {\n if (skipNextAnimation) {\n skipNextAnimation = false\n value.jump(parseValue(v, unit) as T, false)\n } else {\n value.set(parseValue(v, unit) as T)\n }\n })\n\n const removeValueOnDestroy = value.on(\"destroy\", removeSourceOnChange)\n\n return () => {\n removeSourceOnChange()\n removeValueOnDestroy()\n }\n }\n\n return stopAnimation\n}\n\nfunction parseValue(v: AnyResolvedKeyframe, unit?: string) {\n return unit ? v + unit : v\n}\n\nfunction asNumber(v: AnyResolvedKeyframe) {\n return typeof v === \"number\" ? v : parseFloat(v)\n}\n"],"names":[],"mappings":";;;;;AAyBA;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,WAAW,CACvB,MAA0B,EAC1B,OAA4B,EAAA;AAE5B,IAAA,MAAM,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,MAAM;AAClE,IAAA,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC;AAEvC,IAAA,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC;AAEpC,IAAA,OAAO,KAAK;AAChB;AAEA;;;;;;;;;;AAUG;AACG,SAAU,YAAY,CACxB,KAAqB,EACrB,MAA0B,EAC1B,UAA8B,EAAE,EAAA;AAEhC,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,GAAG,EAAE;IAEhC,IAAI,eAAe,GAA+B,IAAI;IACtD,IAAI,WAAW,GAAG,YAAY;AAC9B,IAAA,IAAI,YAA4B;AAEhC,IAAA,MAAM,IAAI,GACN,OAAO,YAAY,KAAK;UAClB,YAAY,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE;UAClC,SA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_modules/motion-dom/dist/es/value/index.mjs deleted file mode 100644 index 36993917..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/index.mjs +++ /dev/null @@ -1,324 +0,0 @@ -import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils'; -import { time } from '../frameloop/sync-time.mjs'; -import { frame } from '../frameloop/frame.mjs'; - -/** - * Maximum time between the value of two frames, beyond which we - * assume the velocity has since been 0. - */ -const MAX_VELOCITY_DELTA = 30; -const isFloat = (value) => { - return !isNaN(parseFloat(value)); -}; -const collectMotionValues = { - current: undefined, -}; -/** - * `MotionValue` is used to track the state and velocity of motion values. - * - * @public - */ -class MotionValue { - /** - * @param init - The initiating value - * @param config - Optional configuration options - * - * - `transformer`: A function to transform incoming values with. - */ - constructor(init, options = {}) { - /** - * Tracks whether this value can output a velocity. Currently this is only true - * if the value is numerical, but we might be able to widen the scope here and support - * other value types. - * - * @internal - */ - this.canTrackVelocity = null; - /** - * An object containing a SubscriptionManager for each active event. - */ - this.events = {}; - this.updateAndNotify = (v) => { - const currentTime = time.now(); - /** - * If we're updating the value during another frame or eventloop - * than the previous frame, then the we set the previous frame value - * to current. - */ - if (this.updatedAt !== currentTime) { - this.setPrevFrameValue(); - } - this.prev = this.current; - this.setCurrent(v); - // Update update subscribers - if (this.current !== this.prev) { - this.events.change?.notify(this.current); - if (this.dependents) { - for (const dependent of this.dependents) { - dependent.dirty(); - } - } - } - }; - this.hasAnimated = false; - this.setCurrent(init); - this.owner = options.owner; - } - setCurrent(current) { - this.current = current; - this.updatedAt = time.now(); - if (this.canTrackVelocity === null && current !== undefined) { - this.canTrackVelocity = isFloat(this.current); - } - } - setPrevFrameValue(prevFrameValue = this.current) { - this.prevFrameValue = prevFrameValue; - this.prevUpdatedAt = this.updatedAt; - } - /** - * Adds a function that will be notified when the `MotionValue` is updated. - * - * It returns a function that, when called, will cancel the subscription. - * - * When calling `onChange` inside a React component, it should be wrapped with the - * `useEffect` hook. As it returns an unsubscribe function, this should be returned - * from the `useEffect` function to ensure you don't add duplicate subscribers.. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * const y = useMotionValue(0) - * const opacity = useMotionValue(1) - * - * useEffect(() => { - * function updateOpacity() { - * const maxXY = Math.max(x.get(), y.get()) - * const newOpacity = transform(maxXY, [0, 100], [1, 0]) - * opacity.set(newOpacity) - * } - * - * const unsubscribeX = x.on("change", updateOpacity) - * const unsubscribeY = y.on("change", updateOpacity) - * - * return () => { - * unsubscribeX() - * unsubscribeY() - * } - * }, []) - * - * return - * } - * ``` - * - * @param subscriber - A function that receives the latest value. - * @returns A function that, when called, will cancel this subscription. - * - * @deprecated - */ - onChange(subscription) { - if (process.env.NODE_ENV !== "production") { - warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on("change", callback).`); - } - return this.on("change", subscription); - } - on(eventName, callback) { - if (!this.events[eventName]) { - this.events[eventName] = new SubscriptionManager(); - } - const unsubscribe = this.events[eventName].add(callback); - if (eventName === "change") { - return () => { - unsubscribe(); - /** - * If we have no more change listeners by the start - * of the next frame, stop active animations. - */ - frame.read(() => { - if (!this.events.change.getSize()) { - this.stop(); - } - }); - }; - } - return unsubscribe; - } - clearListeners() { - for (const eventManagers in this.events) { - this.events[eventManagers].clear(); - } - } - /** - * Attaches a passive effect to the `MotionValue`. - */ - attach(passiveEffect, stopPassiveEffect) { - this.passiveEffect = passiveEffect; - this.stopPassiveEffect = stopPassiveEffect; - } - /** - * Sets the state of the `MotionValue`. - * - * @remarks - * - * ```jsx - * const x = useMotionValue(0) - * x.set(10) - * ``` - * - * @param latest - Latest value to set. - * @param render - Whether to notify render subscribers. Defaults to `true` - * - * @public - */ - set(v) { - if (!this.passiveEffect) { - this.updateAndNotify(v); - } - else { - this.passiveEffect(v, this.updateAndNotify); - } - } - setWithVelocity(prev, current, delta) { - this.set(current); - this.prev = undefined; - this.prevFrameValue = prev; - this.prevUpdatedAt = this.updatedAt - delta; - } - /** - * Set the state of the `MotionValue`, stopping any active animations, - * effects, and resets velocity to `0`. - */ - jump(v, endAnimation = true) { - this.updateAndNotify(v); - this.prev = v; - this.prevUpdatedAt = this.prevFrameValue = undefined; - endAnimation && this.stop(); - if (this.stopPassiveEffect) - this.stopPassiveEffect(); - } - dirty() { - this.events.change?.notify(this.current); - } - addDependent(dependent) { - if (!this.dependents) { - this.dependents = new Set(); - } - this.dependents.add(dependent); - } - removeDependent(dependent) { - if (this.dependents) { - this.dependents.delete(dependent); - } - } - /** - * Returns the latest state of `MotionValue` - * - * @returns - The latest state of `MotionValue` - * - * @public - */ - get() { - if (collectMotionValues.current) { - collectMotionValues.current.push(this); - } - return this.current; - } - /** - * @public - */ - getPrevious() { - return this.prev; - } - /** - * Returns the latest velocity of `MotionValue` - * - * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical. - * - * @public - */ - getVelocity() { - const currentTime = time.now(); - if (!this.canTrackVelocity || - this.prevFrameValue === undefined || - currentTime - this.updatedAt > MAX_VELOCITY_DELTA) { - return 0; - } - const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA); - // Casts because of parseFloat's poor typing - return velocityPerSecond(parseFloat(this.current) - - parseFloat(this.prevFrameValue), delta); - } - /** - * Registers a new animation to control this `MotionValue`. Only one - * animation can drive a `MotionValue` at one time. - * - * ```jsx - * value.start() - * ``` - * - * @param animation - A function that starts the provided animation - */ - start(startAnimation) { - this.stop(); - return new Promise((resolve) => { - this.hasAnimated = true; - this.animation = startAnimation(resolve); - if (this.events.animationStart) { - this.events.animationStart.notify(); - } - }).then(() => { - if (this.events.animationComplete) { - this.events.animationComplete.notify(); - } - this.clearAnimation(); - }); - } - /** - * Stop the currently active animation. - * - * @public - */ - stop() { - if (this.animation) { - this.animation.stop(); - if (this.events.animationCancel) { - this.events.animationCancel.notify(); - } - } - this.clearAnimation(); - } - /** - * Returns `true` if this value is currently animating. - * - * @public - */ - isAnimating() { - return !!this.animation; - } - clearAnimation() { - delete this.animation; - } - /** - * Destroy and clean up subscribers to this `MotionValue`. - * - * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically - * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually - * created a `MotionValue` via the `motionValue` function. - * - * @public - */ - destroy() { - this.dependents?.clear(); - this.events.destroy?.notify(); - this.clearListeners(); - this.stop(); - if (this.stopPassiveEffect) { - this.stopPassiveEffect(); - } - } -} -function motionValue(init, options) { - return new MotionValue(init, options); -} - -export { MotionValue, collectMotionValues, motionValue }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/index.mjs.map deleted file mode 100644 index f8a3c4e8..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../src/value/index.ts"],"sourcesContent":["import {\n EasingFunction,\n SubscriptionManager,\n velocityPerSecond,\n warnOnce,\n} from \"motion-utils\"\nimport {\n AnimationPlaybackControlsWithThen,\n AnyResolvedKeyframe,\n TransformProperties,\n} from \"../animation/types\"\nimport { frame } from \"../frameloop\"\nimport { time } from \"../frameloop/sync-time\"\n\n/**\n * @public\n */\nexport type Subscriber = (v: T) => void\n\n/**\n * @public\n */\nexport type PassiveEffect = (v: T, safeSetter: (v: T) => void) => void\n\nexport type StartAnimation = (\n complete: () => void\n) => AnimationPlaybackControlsWithThen | undefined\n\nexport interface MotionValueEventCallbacks {\n animationStart: () => void\n animationComplete: () => void\n animationCancel: () => void\n change: (latestValue: V) => void\n destroy: () => void\n}\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30\n\nconst isFloat = (value: any): value is string => {\n return !isNaN(parseFloat(value))\n}\n\ninterface ResolvedValues {\n [key: string]: AnyResolvedKeyframe\n}\n\nexport interface Owner {\n current: HTMLElement | unknown\n getProps: () => {\n onUpdate?: (latest: ResolvedValues) => void\n transformTemplate?: (\n transform: TransformProperties,\n generatedTransform: string\n ) => string\n }\n}\n\nexport interface AccelerateConfig {\n factory: (animation: AnimationPlaybackControlsWithThen) => VoidFunction\n times: number[]\n keyframes: any[]\n ease?: EasingFunction | EasingFunction[]\n duration: number\n isTransformed?: boolean\n}\n\nexport interface MotionValueOptions {\n owner?: Owner\n}\n\nexport const collectMotionValues: { current: MotionValue[] | undefined } = {\n current: undefined,\n}\n\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nexport class MotionValue {\n /**\n * If a MotionValue has an owner, it was created internally within Motion\n * and therefore has no external listeners. It is therefore safe to animate via WAAPI.\n */\n owner?: Owner\n\n /**\n * The current state of the `MotionValue`.\n */\n private current: V | undefined\n\n /**\n * The previous state of the `MotionValue`.\n */\n private prev: V | undefined\n\n /**\n * The previous state of the `MotionValue` at the end of the previous frame.\n */\n private prevFrameValue: V | undefined\n\n /**\n * The last time the `MotionValue` was updated.\n */\n updatedAt: number\n\n /**\n * The time `prevFrameValue` was updated.\n */\n prevUpdatedAt: number | undefined\n\n /**\n * Add a passive effect to this `MotionValue`.\n *\n * A passive effect intercepts calls to `set`. For instance, `useSpring` adds\n * a passive effect that attaches a `spring` to the latest\n * set value. Hypothetically there could be a `useSmooth` that attaches an input smoothing effect.\n *\n * @internal\n */\n private passiveEffect?: PassiveEffect\n private stopPassiveEffect?: VoidFunction\n\n /**\n * Whether the passive effect is active.\n */\n isEffectActive?: boolean\n\n /**\n * A reference to the currently-controlling animation.\n */\n animation?: AnimationPlaybackControlsWithThen\n\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n private canTrackVelocity: boolean | null = null\n\n /**\n * A list of MotionValues whose values are computed from this one.\n * This is a rough start to a proper signal-like dirtying system.\n */\n private dependents: Set | undefined\n\n /**\n * Tracks whether this value should be removed\n */\n liveStyle?: boolean\n\n /**\n * Scroll timeline acceleration metadata. When set, VisualElement\n * can create a native WAAPI animation attached to a scroll timeline\n * instead of driving updates through JS.\n */\n accelerate?: AccelerateConfig\n\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init: V, options: MotionValueOptions = {}) {\n this.setCurrent(init)\n this.owner = options.owner\n }\n\n setCurrent(current: V) {\n this.current = current\n this.updatedAt = time.now()\n\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current)\n }\n }\n\n setPrevFrameValue(prevFrameValue: V | undefined = this.current) {\n this.prevFrameValue = prevFrameValue\n this.prevUpdatedAt = this.updatedAt\n }\n\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return \n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription: Subscriber): () => void {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n false,\n `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`\n )\n }\n return this.on(\"change\", subscription)\n }\n\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n private events: {\n [key: string]: SubscriptionManager\n } = {}\n\n on>(\n eventName: EventName,\n callback: MotionValueEventCallbacks[EventName]\n ) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager()\n }\n\n const unsubscribe = this.events[eventName].add(callback)\n\n if (eventName === \"change\") {\n return () => {\n unsubscribe()\n\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop()\n }\n })\n }\n }\n\n return unsubscribe\n }\n\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear()\n }\n }\n\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect: PassiveEffect, stopPassiveEffect: VoidFunction) {\n this.passiveEffect = passiveEffect\n this.stopPassiveEffect = stopPassiveEffect\n }\n\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v: V) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v)\n } else {\n this.passiveEffect(v, this.updateAndNotify)\n }\n }\n\n setWithVelocity(prev: V, current: V, delta: number) {\n this.set(current)\n this.prev = undefined\n this.prevFrameValue = prev\n this.prevUpdatedAt = this.updatedAt - delta\n }\n\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v: V, endAnimation = true) {\n this.updateAndNotify(v)\n this.prev = v\n this.prevUpdatedAt = this.prevFrameValue = undefined\n endAnimation && this.stop()\n if (this.stopPassiveEffect) this.stopPassiveEffect()\n }\n\n dirty() {\n this.events.change?.notify(this.current)\n }\n\n addDependent(dependent: MotionValue) {\n if (!this.dependents) {\n this.dependents = new Set()\n }\n this.dependents.add(dependent)\n }\n\n removeDependent(dependent: MotionValue) {\n if (this.dependents) {\n this.dependents.delete(dependent)\n }\n }\n\n updateAndNotify = (v: V) => {\n const currentTime = time.now()\n\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue()\n }\n\n this.prev = this.current\n\n this.setCurrent(v)\n\n // Update update subscribers\n if (this.current !== this.prev) {\n this.events.change?.notify(this.current)\n\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty()\n }\n }\n }\n }\n\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this)\n }\n\n return this.current!\n }\n\n /**\n * @public\n */\n getPrevious() {\n return this.prev\n }\n\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now()\n\n if (\n !this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA\n ) {\n return 0\n }\n\n const delta = Math.min(\n this.updatedAt - this.prevUpdatedAt!,\n MAX_VELOCITY_DELTA\n )\n\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(\n parseFloat(this.current as any) -\n parseFloat(this.prevFrameValue as any),\n delta\n )\n }\n\n hasAnimated = false\n\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation: StartAnimation) {\n this.stop()\n\n return new Promise((resolve) => {\n this.hasAnimated = true\n this.animation = startAnimation(resolve)\n\n if (this.events.animationStart) {\n this.events.animationStart.notify()\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify()\n }\n this.clearAnimation()\n })\n }\n\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop()\n if (this.events.animationCancel) {\n this.events.animationCancel.notify()\n }\n }\n this.clearAnimation()\n }\n\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation\n }\n\n private clearAnimation() {\n delete this.animation\n }\n\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear()\n this.events.destroy?.notify()\n this.clearListeners()\n this.stop()\n\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect()\n }\n }\n}\n\nexport function motionValue(init: V, options?: MotionValueOptions) {\n return new MotionValue(init, options)\n}\n"],"names":[],"mappings":";;;;AAoCA;;;AAGG;AACH,MAAM,kBAAkB,GAAG,EAAE;AAE7B,MAAM,OAAO,GAAG,CAAC,KAAU,KAAqB;IAC5C,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AA8BM,MAAM,mBAAmB,GAA2C;AACvE,IAAA,OAAO,EAAE,SAAS;;AAGtB;;;;AAIG;MACU,WAAW,CAAA;AAiFpB;;;;;AAKG;IACH,WAAA,CAAY,IAAO,EAAE,OAAA,GAA8B,EAAE,EAAA;AAjCrD;;;;;;AAMG;QACK,IAAA,CAAA,gBAAgB,GAAmB,IAAI;AA+F/C;;AAEG;QACK,IAAA,CAAA,MAAM,GAEV,EAAE;AAwGN,QAAA,IAAA,CAAA,eAAe,GAAG,CAAC,CAAI,KAAI;AACvB,YAAA,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE;AAE9B;;;;AAIG;AACH,YAAA,IAAI,IAAI,CAAC,SAAS,KAAK,WAAW,EAAE;gBAChC,IAAI,CAAC,iBAAiB,EAAE;YAC5B;AAEA,YAAA,IAAI,CAAC,IAAI,GAAG,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IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;AACrB,YAAA,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;AAC7B,gBAAA,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE;YACxC;QACJ;QACA,IAAI,CAAC,cAAc,EAAE;IACzB;AAEA;;;;AAIG;IACH,WAAW,GAAA;AACP,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS;IAC3B;IAEQ,cAAc,GAAA;QAClB,OAAO,IAAI,CAAC,SAAS;IACzB;AAEA;;;;;;;;AAQG;IACH,OAAO,GAAA;AACH,QAAA,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE;AACxB,QAAA,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE;QAC7B,IAAI,CAAC,cAAc,EAAE;QACrB,IAAI,CAAC,IAAI,EAAE;AAEX,QAAA,IAAI,IAAI,CAAC,iBAAiB,EAAE;YACxB,IAAI,CAAC,iBAAiB,EAAE;QAC5B;IACJ;AACH;AAEK,SAAU,WAAW,CAAI,IAAO,EAAE,OAA4B,EAAA;AAChE,IAAA,OAAO,IAAI,WAAW,CAAI,IAAI,EAAE,OAAO,CAAC;AAC5C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/map-value.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/map-value.mjs deleted file mode 100644 index d3eb12fd..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/map-value.mjs +++ /dev/null @@ -1,47 +0,0 @@ -import { transform } from '../utils/transform.mjs'; -import { transformValue } from './transform-value.mjs'; - -/** - * Create a `MotionValue` that maps the output of another `MotionValue` by - * mapping it from one range of values into another. - * - * @remarks - * - * Given an input range of `[-200, -100, 100, 200]` and an output range of - * `[0, 1, 1, 0]`, the returned `MotionValue` will: - * - * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`. - * - When provided a value between `-100` and `100`, will return `1`. - * - When provided a value between `100` and `200`, will return a value between `1` and `0` - * - * The input range must be a linear series of numbers. The output range - * can be any value type supported by Motion: numbers, colors, shadows, etc. - * - * Every value in the output range must be of the same type and in the same format. - * - * ```jsx - * const x = motionValue(0) - * const xRange = [-200, -100, 100, 200] - * const opacityRange = [0, 1, 1, 0] - * const opacity = mapValue(x, xRange, opacityRange) - * ``` - * - * @param inputValue - `MotionValue` - * @param inputRange - A linear series of numbers (either all increasing or decreasing) - * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`. - * @param options - - * - * - clamp: boolean. Clamp values to within the given range. Defaults to `true` - * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each. - * - * @returns `MotionValue` - * - * @public - */ -function mapValue(inputValue, inputRange, outputRange, options) { - const map = transform(inputRange, outputRange, options); - return transformValue(() => map(inputValue.get())); -} - -export { mapValue }; -//# sourceMappingURL=map-value.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/map-value.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/map-value.mjs.map deleted file mode 100644 index 02c07cd8..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/map-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map-value.mjs","sources":["../../../src/value/map-value.ts"],"sourcesContent":["import { MotionValue } from \".\"\nimport { transform, TransformOptions } from \"../utils/transform\"\nimport { transformValue } from \"./transform-value\"\n\nexport type MapInputRange = number[]\n\n/**\n * Create a `MotionValue` that maps the output of another `MotionValue` by\n * mapping it from one range of values into another.\n *\n * @remarks\n *\n * Given an input range of `[-200, -100, 100, 200]` and an output range of\n * `[0, 1, 1, 0]`, the returned `MotionValue` will:\n *\n * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`.\n * - When provided a value between `-100` and `100`, will return `1`.\n * - When provided a value between `100` and `200`, will return a value between `1` and `0`\n *\n * The input range must be a linear series of numbers. The output range\n * can be any value type supported by Motion: numbers, colors, shadows, etc.\n *\n * Every value in the output range must be of the same type and in the same format.\n *\n * ```jsx\n * const x = motionValue(0)\n * const xRange = [-200, -100, 100, 200]\n * const opacityRange = [0, 1, 1, 0]\n * const opacity = mapValue(x, xRange, opacityRange)\n * ```\n *\n * @param inputValue - `MotionValue`\n * @param inputRange - A linear series of numbers (either all increasing or decreasing)\n * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`.\n * @param options -\n *\n * - clamp: boolean. Clamp values to within the given range. Defaults to `true`\n * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each.\n *\n * @returns `MotionValue`\n *\n * @public\n */\nexport function mapValue(\n inputValue: MotionValue,\n inputRange: MapInputRange,\n outputRange: O[],\n options?: TransformOptions\n): MotionValue {\n const map = transform(inputRange, outputRange, options)\n return transformValue(() => map(inputValue.get()))\n}\n"],"names":[],"mappings":";;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCG;AACG,SAAU,QAAQ,CACpB,UAA+B,EAC/B,UAAyB,EACzB,WAAgB,EAChB,OAA6B,EAAA;IAE7B,MAAM,GAAG,GAAG,SAAS,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC;AACvD,IAAA,OAAO,cAAc,CAAC,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;AACtD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/spring-value.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/spring-value.mjs deleted file mode 100644 index 72b28b14..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/spring-value.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import { attachFollow, followValue } from './follow-value.mjs'; - -/** - * Create a `MotionValue` that animates to its latest value using a spring. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = springValue(x, { stiffness: 300 }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns `MotionValue` - * - * @public - */ -function springValue(source, options) { - return followValue(source, { type: "spring", ...options }); -} -/** - * Attach a spring animation to a MotionValue that will animate whenever the value changes. - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns Cleanup function - * - * @public - */ -function attachSpring(value, source, options) { - return attachFollow(value, source, { type: "spring", ...options }); -} - -export { attachSpring, springValue }; -//# sourceMappingURL=spring-value.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/spring-value.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/spring-value.mjs.map deleted file mode 100644 index 7b9b7615..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/spring-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"spring-value.mjs","sources":["../../../src/value/spring-value.ts"],"sourcesContent":["import { MotionValue } from \".\"\nimport { AnyResolvedKeyframe, SpringOptions } from \"../animation/types\"\nimport { attachFollow, followValue } from \"./follow-value\"\n\n/**\n * Create a `MotionValue` that animates to its latest value using a spring.\n * Can either be a value or track another `MotionValue`.\n *\n * ```jsx\n * const x = motionValue(0)\n * const y = springValue(x, { stiffness: 300 })\n * ```\n *\n * @param source - Initial value or MotionValue to track\n * @param options - Spring configuration options\n * @returns `MotionValue`\n *\n * @public\n */\nexport function springValue(\n source: T | MotionValue,\n options?: SpringOptions\n) {\n return followValue(source, { type: \"spring\", ...options })\n}\n\n/**\n * Attach a spring animation to a MotionValue that will animate whenever the value changes.\n *\n * @param value - The MotionValue to animate\n * @param source - Initial value or MotionValue to track\n * @param options - Spring configuration options\n * @returns Cleanup function\n *\n * @public\n */\nexport function attachSpring(\n value: MotionValue,\n source: T | MotionValue,\n options?: SpringOptions\n): VoidFunction {\n return attachFollow(value, source, { type: \"spring\", ...options })\n}\n"],"names":[],"mappings":";;AAIA;;;;;;;;;;;;;;AAcG;AACG,SAAU,WAAW,CACvB,MAA0B,EAC1B,OAAuB,EAAA;AAEvB,IAAA,OAAO,WAAW,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;AAC9D;AAEA;;;;;;;;;AASG;SACa,YAAY,CACxB,KAAqB,EACrB,MAA0B,EAC1B,OAAuB,EAAA;AAEvB,IAAA,OAAO,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;AACtE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/subscribe-value.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/subscribe-value.mjs deleted file mode 100644 index 166c874f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/subscribe-value.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { cancelFrame, frame } from '../frameloop/frame.mjs'; - -function subscribeValue(inputValues, outputValue, getLatest) { - const update = () => outputValue.set(getLatest()); - const scheduleUpdate = () => frame.preRender(update, false, true); - const subscriptions = inputValues.map((v) => v.on("change", scheduleUpdate)); - outputValue.on("destroy", () => { - subscriptions.forEach((unsubscribe) => unsubscribe()); - cancelFrame(update); - }); -} - -export { subscribeValue }; -//# sourceMappingURL=subscribe-value.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/subscribe-value.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/subscribe-value.mjs.map deleted file mode 100644 index 1678e502..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/subscribe-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscribe-value.mjs","sources":["../../../src/value/subscribe-value.ts"],"sourcesContent":["import { MotionValue } from \".\"\nimport { cancelFrame, frame } from \"../frameloop\"\n\nexport function subscribeValue(\n inputValues: MotionValue[],\n outputValue: MotionValue,\n getLatest: () => O\n) {\n const update = () => outputValue.set(getLatest())\n const scheduleUpdate = () => frame.preRender(update, false, true)\n\n const subscriptions = inputValues.map((v) => v.on(\"change\", scheduleUpdate))\n\n outputValue.on(\"destroy\", () => {\n subscriptions.forEach((unsubscribe) => unsubscribe())\n cancelFrame(update)\n })\n}\n"],"names":[],"mappings":";;SAGgB,cAAc,CAC1B,WAA0B,EAC1B,WAA2B,EAC3B,SAAkB,EAAA;AAElB,IAAA,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;AACjD,IAAA,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC;IAEjE,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AAE5E,IAAA,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAK;QAC3B,aAAa,CAAC,OAAO,CAAC,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;QACrD,WAAW,CAAC,MAAM,CAAC;AACvB,IAAA,CAAC,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/transform-value.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/transform-value.mjs deleted file mode 100644 index fd2c4e0e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/transform-value.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import { collectMotionValues, motionValue } from './index.mjs'; -import { subscribeValue } from './subscribe-value.mjs'; - -/** - * Create a `MotionValue` that transforms the output of other `MotionValue`s by - * passing their latest values through a transform function. - * - * Whenever a `MotionValue` referred to in the provided function is updated, - * it will be re-evaluated. - * - * ```jsx - * const x = motionValue(0) - * const y = transformValue(() => x.get() * 2) // double x - * ``` - * - * @param transformer - A transform function. This function must be pure with no side-effects or conditional statements. - * @returns `MotionValue` - * - * @public - */ -function transformValue(transform) { - const collectedValues = []; - /** - * Open session of collectMotionValues. Any MotionValue that calls get() - * inside transform will be saved into this array. - */ - collectMotionValues.current = collectedValues; - const initialValue = transform(); - collectMotionValues.current = undefined; - const value = motionValue(initialValue); - subscribeValue(collectedValues, value, transform); - return value; -} - -export { transformValue }; -//# sourceMappingURL=transform-value.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/transform-value.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/transform-value.mjs.map deleted file mode 100644 index 3f5c525c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/transform-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transform-value.mjs","sources":["../../../src/value/transform-value.ts"],"sourcesContent":["import { MotionValue, collectMotionValues, motionValue } from \".\"\nimport { subscribeValue } from \"./subscribe-value\"\n\nexport type TransformInputRange = number[]\nexport type SingleTransformer = (input: I) => O\nexport type MultiTransformer = (input: I[]) => O\nexport type ValueTransformer =\n | SingleTransformer\n | MultiTransformer\n\n/**\n * Create a `MotionValue` that transforms the output of other `MotionValue`s by\n * passing their latest values through a transform function.\n *\n * Whenever a `MotionValue` referred to in the provided function is updated,\n * it will be re-evaluated.\n *\n * ```jsx\n * const x = motionValue(0)\n * const y = transformValue(() => x.get() * 2) // double x\n * ```\n *\n * @param transformer - A transform function. This function must be pure with no side-effects or conditional statements.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function transformValue(transform: () => O): MotionValue {\n const collectedValues: MotionValue[] = []\n\n /**\n * Open session of collectMotionValues. Any MotionValue that calls get()\n * inside transform will be saved into this array.\n */\n collectMotionValues.current = collectedValues\n const initialValue = transform()\n collectMotionValues.current = undefined\n\n const value = motionValue(initialValue)\n\n subscribeValue(collectedValues, value, transform)\n\n return value\n}\n"],"names":[],"mappings":";;;AAUA;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,cAAc,CAAI,SAAkB,EAAA;IAChD,MAAM,eAAe,GAAkB,EAAE;AAEzC;;;AAGG;AACH,IAAA,mBAAmB,CAAC,OAAO,GAAG,eAAe;AAC7C,IAAA,MAAM,YAAY,GAAG,SAAS,EAAE;AAChC,IAAA,mBAAmB,CAAC,OAAO,GAAG,SAAS;AAEvC,IAAA,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC;AAEvC,IAAA,cAAc,CAAC,eAAe,EAAE,KAAK,EAAE,SAAS,CAAC;AAEjD,IAAA,OAAO,KAAK;AAChB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/auto.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/auto.mjs deleted file mode 100644 index b514b87c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/auto.mjs +++ /dev/null @@ -1,10 +0,0 @@ -/** - * ValueType for "auto" - */ -const auto = { - test: (v) => v === "auto", - parse: (v) => v, -}; - -export { auto }; -//# sourceMappingURL=auto.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/auto.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/auto.mjs.map deleted file mode 100644 index 3f0517d4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/auto.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auto.mjs","sources":["../../../../src/value/types/auto.ts"],"sourcesContent":["import { ValueType } from \"./types\"\n\n/**\n * ValueType for \"auto\"\n */\nexport const auto: ValueType = {\n test: (v: any) => v === \"auto\",\n parse: (v) => v,\n}\n"],"names":[],"mappings":"AAEA;;AAEG;AACI,MAAM,IAAI,GAAc;IAC3B,IAAI,EAAE,CAAC,CAAM,KAAK,CAAC,KAAK,MAAM;AAC9B,IAAA,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hex.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hex.mjs deleted file mode 100644 index 1ec7840b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hex.mjs +++ /dev/null @@ -1,41 +0,0 @@ -import { rgba } from './rgba.mjs'; -import { isColorString } from './utils.mjs'; - -function parseHex(v) { - let r = ""; - let g = ""; - let b = ""; - let a = ""; - // If we have 6 characters, ie #FF0000 - if (v.length > 5) { - r = v.substring(1, 3); - g = v.substring(3, 5); - b = v.substring(5, 7); - a = v.substring(7, 9); - // Or we have 3 characters, ie #F00 - } - else { - r = v.substring(1, 2); - g = v.substring(2, 3); - b = v.substring(3, 4); - a = v.substring(4, 5); - r += r; - g += g; - b += b; - a += a; - } - return { - red: parseInt(r, 16), - green: parseInt(g, 16), - blue: parseInt(b, 16), - alpha: a ? parseInt(a, 16) / 255 : 1, - }; -} -const hex = { - test: /*@__PURE__*/ isColorString("#"), - parse: parseHex, - transform: rgba.transform, -}; - -export { hex }; -//# sourceMappingURL=hex.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.map deleted file mode 100644 index 1ae6fffa..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hex.mjs","sources":["../../../../../src/value/types/color/hex.ts"],"sourcesContent":["import { RGBA } from \"../types\"\nimport { rgba } from \"./rgba\"\nimport { isColorString } from \"./utils\"\n\nfunction parseHex(v: string): RGBA {\n let r = \"\"\n let g = \"\"\n let b = \"\"\n let a = \"\"\n\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3)\n g = v.substring(3, 5)\n b = v.substring(5, 7)\n a = v.substring(7, 9)\n\n // Or we have 3 characters, ie #F00\n } else {\n r = v.substring(1, 2)\n g = v.substring(2, 3)\n b = v.substring(3, 4)\n a = v.substring(4, 5)\n r += r\n g += g\n b += b\n a += a\n }\n\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n }\n}\n\nexport const hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n}\n"],"names":[],"mappings":";;;AAIA,SAAS,QAAQ,CAAC,CAAS,EAAA;IACvB,IAAI,CAAC,GAAG,EAAE;IACV,IAAI,CAAC,GAAG,EAAE;IACV,IAAI,CAAC,GAAG,EAAE;IACV,IAAI,CAAC,GAAG,EAAE;;AAGV,IAAA,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;QACd,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;;IAGzB;SAAO;QACH,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC,IAAI,CAAC;QACN,CAAC,IAAI,CAAC;QACN,CAAC,IAAI,CAAC;QACN,CAAC,IAAI,CAAC;IACV;IAEA,OAAO;AACH,QAAA,GAAG,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC;AACpB,QAAA,KAAK,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC;AACtB,QAAA,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC;AACrB,QAAA,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC;KACvC;AACL;AAEO,MAAM,GAAG,GAAG;AACf,IAAA,IAAI,gBAAgB,aAAa,CAAC,GAAG,CAAC;AACtC,IAAA,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,IAAI,CAAC,SAAS;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs deleted file mode 100644 index 75a4e520..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs +++ /dev/null @@ -1,43 +0,0 @@ -// Adapted from https://gist.github.com/mjackson/5311256 -function hueToRgb(p, q, t) { - if (t < 0) - t += 1; - if (t > 1) - t -= 1; - if (t < 1 / 6) - return p + (q - p) * 6 * t; - if (t < 1 / 2) - return q; - if (t < 2 / 3) - return p + (q - p) * (2 / 3 - t) * 6; - return p; -} -function hslaToRgba({ hue, saturation, lightness, alpha }) { - hue /= 360; - saturation /= 100; - lightness /= 100; - let red = 0; - let green = 0; - let blue = 0; - if (!saturation) { - red = green = blue = lightness; - } - else { - const q = lightness < 0.5 - ? lightness * (1 + saturation) - : lightness + saturation - lightness * saturation; - const p = 2 * lightness - q; - red = hueToRgb(p, q, hue + 1 / 3); - green = hueToRgb(p, q, hue); - blue = hueToRgb(p, q, hue - 1 / 3); - } - return { - red: Math.round(red * 255), - green: Math.round(green * 255), - blue: Math.round(blue * 255), - alpha, - }; -} - -export { hslaToRgba }; -//# sourceMappingURL=hsla-to-rgba.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.map deleted file mode 100644 index eebe3a06..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hsla-to-rgba.mjs","sources":["../../../../../src/value/types/color/hsla-to-rgba.ts"],"sourcesContent":["import { HSLA, RGBA } from \"../types\"\n\n// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p: number, q: number, t: number) {\n if (t < 0) t += 1\n if (t > 1) t -= 1\n if (t < 1 / 6) return p + (q - p) * 6 * t\n if (t < 1 / 2) return q\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6\n return p\n}\n\nexport function hslaToRgba({ hue, saturation, lightness, alpha }: HSLA): RGBA {\n hue /= 360\n saturation /= 100\n lightness /= 100\n\n let red = 0\n let green = 0\n let blue = 0\n\n if (!saturation) {\n red = green = blue = lightness\n } else {\n const q =\n lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation\n const p = 2 * lightness - q\n\n red = hueToRgb(p, q, hue + 1 / 3)\n green = hueToRgb(p, q, hue)\n blue = hueToRgb(p, q, hue - 1 / 3)\n }\n\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n }\n}\n"],"names":[],"mappings":"AAEA;AACA,SAAS,QAAQ,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAA;IAC7C,IAAI,CAAC,GAAG,CAAC;QAAE,CAAC,IAAI,CAAC;IACjB,IAAI,CAAC,GAAG,CAAC;QAAE,CAAC,IAAI,CAAC;AACjB,IAAA,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;AACzC,IAAA,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAAE,QAAA,OAAO,CAAC;AACvB,IAAA,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAAE,QAAA,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;AACnD,IAAA,OAAO,CAAC;AACZ;AAEM,SAAU,UAAU,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAQ,EAAA;IAClE,GAAG,IAAI,GAAG;IACV,UAAU,IAAI,GAAG;IACjB,SAAS,IAAI,GAAG;IAEhB,IAAI,GAAG,GAAG,CAAC;IACX,IAAI,KAAK,GAAG,CAAC;IACb,IAAI,IAAI,GAAG,CAAC;IAEZ,IAAI,CAAC,UAAU,EAAE;AACb,QAAA,GAAG,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS;IAClC;SAAO;AACH,QAAA,MAAM,CAAC,GACH,SAAS,GAAG;AACR,cAAE,SAAS,IAAI,CAAC,GAAG,UAAU;cAC3B,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU;AACzD,QAAA,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,CAAC;AAE3B,QAAA,GAAG,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACjC,KAAK,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC;AAC3B,QAAA,IAAI,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IACtC;IAEA,OAAO;QACH,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;QAC1B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC;QAC9B,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC;QAC5B,KAAK;KACR;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs deleted file mode 100644 index d1af6658..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import { alpha } from '../numbers/index.mjs'; -import { percent } from '../numbers/units.mjs'; -import { sanitize } from '../utils/sanitize.mjs'; -import { splitColor, isColorString } from './utils.mjs'; - -const hsla = { - test: /*@__PURE__*/ isColorString("hsl", "hue"), - parse: /*@__PURE__*/ splitColor("hue", "saturation", "lightness"), - transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => { - return ("hsla(" + - Math.round(hue) + - ", " + - percent.transform(sanitize(saturation)) + - ", " + - percent.transform(sanitize(lightness)) + - ", " + - sanitize(alpha.transform(alpha$1)) + - ")"); - }, -}; - -export { hsla }; -//# sourceMappingURL=hsla.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.map deleted file mode 100644 index a67baaad..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hsla.mjs","sources":["../../../../../src/value/types/color/hsla.ts"],"sourcesContent":["import { alpha as alphaType } from \"../numbers\"\nimport { percent } from \"../numbers/units\"\nimport { HSLA } from \"../types\"\nimport { sanitize } from \"../utils/sanitize\"\nimport { isColorString, splitColor } from \"./utils\"\n\nexport const hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha = 1 }: HSLA) => {\n return (\n \"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alphaType.transform(alpha)) +\n \")\"\n )\n },\n}\n"],"names":["alpha","alphaType"],"mappings":";;;;;AAMO,MAAM,IAAI,GAAG;IAChB,IAAI,gBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC;IAC/C,KAAK,gBAAgB,UAAU,CAAO,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC;AACvE,IAAA,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,SAAEA,OAAK,GAAG,CAAC,EAAQ,KAAI;AAC3D,QAAA,QACI,OAAO;AACP,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;YACf,IAAI;AACJ,YAAA,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YACvC,IAAI;AACJ,YAAA,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI;AACJ,YAAA,QAAQ,CAACC,KAAS,CAAC,SAAS,CAACD,OAAK,CAAC,CAAC;AACpC,YAAA,GAAG;IAEX,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/index.mjs deleted file mode 100644 index 8de642b9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/index.mjs +++ /dev/null @@ -1,33 +0,0 @@ -import { hex } from './hex.mjs'; -import { hsla } from './hsla.mjs'; -import { rgba } from './rgba.mjs'; - -const color = { - test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v), - parse: (v) => { - if (rgba.test(v)) { - return rgba.parse(v); - } - else if (hsla.test(v)) { - return hsla.parse(v); - } - else { - return hex.parse(v); - } - }, - transform: (v) => { - return typeof v === "string" - ? v - : v.hasOwnProperty("red") - ? rgba.transform(v) - : hsla.transform(v); - }, - getAnimatableNone: (v) => { - const parsed = color.parse(v); - parsed.alpha = 0; - return color.transform(parsed); - }, -}; - -export { color }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/index.mjs.map deleted file mode 100644 index d2c99a92..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../../src/value/types/color/index.ts"],"sourcesContent":["import { HSLA, RGBA } from \"../types\"\nimport { hex } from \"./hex\"\nimport { hsla } from \"./hsla\"\nimport { rgba } from \"./rgba\"\n\nexport const color = {\n test: (v: any) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v: any): RGBA | HSLA => {\n if (rgba.test(v)) {\n return rgba.parse(v)\n } else if (hsla.test(v)) {\n return hsla.parse(v)\n } else {\n return hex.parse(v)\n }\n },\n transform: (v: HSLA | RGBA | string) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v as RGBA)\n : hsla.transform(v as HSLA)\n },\n getAnimatableNone: (v: string) => {\n const parsed = color.parse(v)\n parsed.alpha = 0\n return color.transform(parsed)\n },\n}\n"],"names":[],"mappings":";;;;AAKO,MAAM,KAAK,GAAG;IACjB,IAAI,EAAE,CAAC,CAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,IAAA,KAAK,EAAE,CAAC,CAAM,KAAiB;AAC3B,QAAA,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AACd,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACxB;AAAO,aAAA,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AACrB,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACxB;aAAO;AACH,YAAA,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QACvB;IACJ,CAAC;AACD,IAAA,SAAS,EAAE,CAAC,CAAuB,KAAI;QACnC,OAAO,OAAO,CAAC,KAAK;AAChB,cAAE;AACF,cAAE,CAAC,CAAC,cAAc,CAAC,KAAK;AACxB,kBAAE,IAAI,CAAC,SAAS,CAAC,CAAS;AAC1B,kBAAE,IAAI,CAAC,SAAS,CAAC,CAAS,CAAC;IACnC,CAAC;AACD,IAAA,iBAAiB,EAAE,CAAC,CAAS,KAAI;QAC7B,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7B,QAAA,MAAM,CAAC,KAAK,GAAG,CAAC;AAChB,QAAA,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;IAClC,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs deleted file mode 100644 index 8c27af7f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs +++ /dev/null @@ -1,26 +0,0 @@ -import { clamp } from 'motion-utils'; -import { number, alpha } from '../numbers/index.mjs'; -import { sanitize } from '../utils/sanitize.mjs'; -import { splitColor, isColorString } from './utils.mjs'; - -const clampRgbUnit = (v) => clamp(0, 255, v); -const rgbUnit = { - ...number, - transform: (v) => Math.round(clampRgbUnit(v)), -}; -const rgba = { - test: /*@__PURE__*/ isColorString("rgb", "red"), - parse: /*@__PURE__*/ splitColor("red", "green", "blue"), - transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" + - rgbUnit.transform(red) + - ", " + - rgbUnit.transform(green) + - ", " + - rgbUnit.transform(blue) + - ", " + - sanitize(alpha.transform(alpha$1)) + - ")", -}; - -export { rgbUnit, rgba }; -//# sourceMappingURL=rgba.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.map deleted file mode 100644 index 57b3f0bb..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rgba.mjs","sources":["../../../../../src/value/types/color/rgba.ts"],"sourcesContent":["import { clamp } from \"motion-utils\"\nimport { alpha as alphaType, number } from \"../numbers\"\nimport { RGBA } from \"../types\"\nimport { sanitize } from \"../utils/sanitize\"\nimport { isColorString, splitColor } from \"./utils\"\n\nconst clampRgbUnit = (v: number) => clamp(0, 255, v)\nexport const rgbUnit = {\n ...number,\n transform: (v: number) => Math.round(clampRgbUnit(v)),\n}\n\nexport const rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha = 1 }: RGBA) =>\n \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alphaType.transform(alpha)) +\n \")\",\n}\n"],"names":["alpha","alphaType"],"mappings":";;;;;AAMA,MAAM,YAAY,GAAG,CAAC,CAAS,KAAK,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;AAC7C,MAAM,OAAO,GAAG;AACnB,IAAA,GAAG,MAAM;AACT,IAAA,SAAS,EAAE,CAAC,CAAS,KAAK,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;;AAGlD,MAAM,IAAI,GAAG;IAChB,IAAI,gBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC;IAC/C,KAAK,gBAAgB,UAAU,CAAO,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC;AAC7D,IAAA,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,SAAEA,OAAK,GAAG,CAAC,EAAQ,KAC7C,OAAO;AACP,QAAA,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC;QACtB,IAAI;AACJ,QAAA,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC;QACxB,IAAI;AACJ,QAAA,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;QACvB,IAAI;AACJ,QAAA,QAAQ,CAACC,KAAS,CAAC,SAAS,CAACD,OAAK,CAAC,CAAC;QACpC,GAAG;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/utils.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/utils.mjs deleted file mode 100644 index cc4bd124..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/utils.mjs +++ /dev/null @@ -1,30 +0,0 @@ -import { floatRegex } from '../utils/float-regex.mjs'; -import { isNullish } from '../utils/is-nullish.mjs'; -import { singleColorRegex } from '../utils/single-color-regex.mjs'; - -/** - * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000, - * but false if a number or multiple colors - */ -const isColorString = (type, testProp) => (v) => { - return Boolean((typeof v === "string" && - singleColorRegex.test(v) && - v.startsWith(type)) || - (testProp && - !isNullish(v) && - Object.prototype.hasOwnProperty.call(v, testProp))); -}; -const splitColor = (aName, bName, cName) => (v) => { - if (typeof v !== "string") - return v; - const [a, b, c, alpha] = v.match(floatRegex); - return { - [aName]: parseFloat(a), - [bName]: parseFloat(b), - [cName]: parseFloat(c), - alpha: alpha !== undefined ? parseFloat(alpha) : 1, - }; -}; - -export { isColorString, splitColor }; -//# sourceMappingURL=utils.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/utils.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/utils.mjs.map deleted file mode 100644 index 7b9b54a4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/color/utils.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.mjs","sources":["../../../../../src/value/types/color/utils.ts"],"sourcesContent":["import { Color, HSLA, RGBA } from \"../types\"\nimport { floatRegex } from \"../utils/float-regex\"\nimport { isNullish } from \"../utils/is-nullish\"\nimport { singleColorRegex } from \"../utils/single-color-regex\"\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nexport const isColorString = (type: string, testProp?: string) => (v: any) => {\n return Boolean(\n (typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp))\n )\n}\n\nexport const splitColor =\n (aName: string, bName: string, cName: string) =>\n (v: string | Color): V => {\n if (typeof v !== \"string\") return v as any\n\n const [a, b, c, alpha] = v.match(floatRegex) as any\n\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n } as V\n }\n"],"names":[],"mappings":";;;;AAKA;;;AAGG;AACI,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,QAAiB,KAAK,CAAC,CAAM,KAAI;AACzE,IAAA,OAAO,OAAO,CACV,CAAC,OAAO,CAAC,KAAK,QAAQ;AAClB,QAAA,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;AACxB,QAAA,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;AAClB,SAAC,QAAQ;YACL,CAAC,SAAS,CAAC,CAAC,CAAC;AACb,YAAA,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAC7D;AACL;AAEO,MAAM,UAAU,GACnB,CAAwB,KAAa,EAAE,KAAa,EAAE,KAAa,KACnE,CAAC,CAAiB,KAAO;IACrB,IAAI,OAAO,CAAC,KAAK,QAAQ;AAAE,QAAA,OAAO,CAAQ;AAE1C,IAAA,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAQ;IAEnD,OAAO;AACH,QAAA,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;AACtB,QAAA,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;AACtB,QAAA,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;AACtB,QAAA,KAAK,EAAE,KAAK,KAAK,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC;KAChD;AACV;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs deleted file mode 100644 index c0237bc0..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs +++ /dev/null @@ -1,31 +0,0 @@ -import { complex } from './index.mjs'; -import { floatRegex } from '../utils/float-regex.mjs'; - -/** - * Properties that should default to 1 or 100% - */ -const maxDefaults = new Set(["brightness", "contrast", "saturate", "opacity"]); -function applyDefaultFilter(v) { - const [name, value] = v.slice(0, -1).split("("); - if (name === "drop-shadow") - return v; - const [number] = value.match(floatRegex) || []; - if (!number) - return v; - const unit = value.replace(number, ""); - let defaultValue = maxDefaults.has(name) ? 1 : 0; - if (number !== value) - defaultValue *= 100; - return name + "(" + defaultValue + unit + ")"; -} -const functionRegex = /\b([a-z-]*)\(.*?\)/gu; -const filter = { - ...complex, - getAnimatableNone: (v) => { - const functions = v.match(functionRegex); - return functions ? functions.map(applyDefaultFilter).join(" ") : v; - }, -}; - -export { filter }; -//# sourceMappingURL=filter.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs.map deleted file mode 100644 index 6df1c298..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter.mjs","sources":["../../../../../src/value/types/complex/filter.ts"],"sourcesContent":["import { complex } from \".\"\nimport { floatRegex } from \"../utils/float-regex\"\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"])\n\nfunction applyDefaultFilter(v: string) {\n const [name, value] = v.slice(0, -1).split(\"(\")\n\n if (name === \"drop-shadow\") return v\n\n const [number] = value.match(floatRegex) || []\n if (!number) return v\n\n const unit = value.replace(number, \"\")\n let defaultValue = maxDefaults.has(name) ? 1 : 0\n if (number !== value) defaultValue *= 100\n\n return name + \"(\" + defaultValue + unit + \")\"\n}\n\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu\n\nexport const filter = {\n ...complex,\n getAnimatableNone: (v: string) => {\n const functions = v.match(functionRegex)\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v\n },\n}\n"],"names":[],"mappings":";;;AAGA;;AAEG;AACH,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;AAE9E,SAAS,kBAAkB,CAAC,CAAS,EAAA;IACjC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;IAE/C,IAAI,IAAI,KAAK,aAAa;AAAE,QAAA,OAAO,CAAC;AAEpC,IAAA,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE;AAC9C,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,CAAC;IAErB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;AACtC,IAAA,IAAI,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAChD,IAAI,MAAM,KAAK,KAAK;QAAE,YAAY,IAAI,GAAG;IAEzC,OAAO,IAAI,GAAG,GAAG,GAAG,YAAY,GAAG,IAAI,GAAG,GAAG;AACjD;AAEA,MAAM,aAAa,GAAG,sBAAsB;AAErC,MAAM,MAAM,GAAG;AAClB,IAAA,GAAG,OAAO;AACV,IAAA,iBAAiB,EAAE,CAAC,CAAS,KAAI;QAC7B,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;AACxC,QAAA,OAAO,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IACtE,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/index.mjs deleted file mode 100644 index 66f4c01f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/index.mjs +++ /dev/null @@ -1,114 +0,0 @@ -import { color } from '../color/index.mjs'; -import { colorRegex } from '../utils/color-regex.mjs'; -import { floatRegex } from '../utils/float-regex.mjs'; -import { sanitize } from '../utils/sanitize.mjs'; - -function test(v) { - return (isNaN(v) && - typeof v === "string" && - (v.match(floatRegex)?.length || 0) + - (v.match(colorRegex)?.length || 0) > - 0); -} -const NUMBER_TOKEN = "number"; -const COLOR_TOKEN = "color"; -const VAR_TOKEN = "var"; -const VAR_FUNCTION_TOKEN = "var("; -const SPLIT_TOKEN = "${}"; -// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex` -const complexRegex = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu; -function analyseComplexValue(value) { - const originalValue = value.toString(); - const values = []; - const indexes = { - color: [], - number: [], - var: [], - }; - const types = []; - let i = 0; - const tokenised = originalValue.replace(complexRegex, (parsedValue) => { - if (color.test(parsedValue)) { - indexes.color.push(i); - types.push(COLOR_TOKEN); - values.push(color.parse(parsedValue)); - } - else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) { - indexes.var.push(i); - types.push(VAR_TOKEN); - values.push(parsedValue); - } - else { - indexes.number.push(i); - types.push(NUMBER_TOKEN); - values.push(parseFloat(parsedValue)); - } - ++i; - return SPLIT_TOKEN; - }); - const split = tokenised.split(SPLIT_TOKEN); - return { values, split, indexes, types }; -} -function parseComplexValue(v) { - return analyseComplexValue(v).values; -} -function buildTransformer({ split, types }) { - const numSections = split.length; - return (v) => { - let output = ""; - for (let i = 0; i < numSections; i++) { - output += split[i]; - if (v[i] !== undefined) { - const type = types[i]; - if (type === NUMBER_TOKEN) { - output += sanitize(v[i]); - } - else if (type === COLOR_TOKEN) { - output += color.transform(v[i]); - } - else { - output += v[i]; - } - } - } - return output; - }; -} -function createTransformer(source) { - return buildTransformer(analyseComplexValue(source)); -} -const convertNumbersToZero = (v) => typeof v === "number" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v; -/** - * Convert a parsed value to its zero equivalent, but preserve numbers - * that act as divisors in CSS calc() expressions. - * - * analyseComplexValue extracts numbers from CSS strings and puts the - * surrounding text into a `split` template array. For example: - * "calc(var(--gap) / 5)" → values: [var(--gap), 5] - * split: ["calc(", " / ", ")"] - * - * When building a zero-equivalent for animation, naively zeroing all - * numbers turns the divisor into 0 → "calc(var(--gap) / 0)" → NaN. - * We detect this by checking whether the text preceding a number - * (split[i]) ends with "/" — the CSS calc division operator. - */ -const convertToZero = (value, splitBefore) => { - if (typeof value === "number") { - return splitBefore?.trim().endsWith("/") ? value : 0; - } - return convertNumbersToZero(value); -}; -function getAnimatableNone(v) { - const info = analyseComplexValue(v); - const transformer = buildTransformer(info); - return transformer(info.values.map((value, i) => convertToZero(value, info.split[i]))); -} -const complex = { - test, - parse: parseComplexValue, - createTransformer, - getAnimatableNone, -}; - -export { analyseComplexValue, complex }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.map deleted file mode 100644 index fc24e81d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../../src/value/types/complex/index.ts"],"sourcesContent":["import { AnyResolvedKeyframe } from \"../../../animation/types\"\nimport { CSSVariableToken } from \"../../../animation/utils/is-css-variable\"\nimport { color } from \"../color\"\nimport { Color } from \"../types\"\nimport { colorRegex } from \"../utils/color-regex\"\nimport { floatRegex } from \"../utils/float-regex\"\nimport { sanitize } from \"../utils/sanitize\"\n\nfunction test(v: any) {\n return (\n isNaN(v) &&\n typeof v === \"string\" &&\n (v.match(floatRegex)?.length || 0) +\n (v.match(colorRegex)?.length || 0) >\n 0\n )\n}\n\nconst NUMBER_TOKEN = \"number\"\nconst COLOR_TOKEN = \"color\"\nconst VAR_TOKEN = \"var\"\nconst VAR_FUNCTION_TOKEN = \"var(\"\nconst SPLIT_TOKEN = \"${}\"\n\nexport type ComplexValues = Array<\n CSSVariableToken | AnyResolvedKeyframe | Color\n>\n\nexport interface ValueIndexes {\n color: number[]\n number: number[]\n var: number[]\n}\n\nexport interface ComplexValueInfo {\n values: ComplexValues\n split: string[]\n indexes: ValueIndexes\n types: Array\n}\n\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex =\n /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu\n\nexport function analyseComplexValue(\n value: AnyResolvedKeyframe\n): ComplexValueInfo {\n const originalValue = value.toString()\n\n const values: ComplexValues = []\n const indexes: ValueIndexes = {\n color: [],\n number: [],\n var: [],\n }\n const types: Array = []\n\n let i = 0\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i)\n types.push(COLOR_TOKEN)\n values.push(color.parse(parsedValue))\n } else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i)\n types.push(VAR_TOKEN)\n values.push(parsedValue)\n } else {\n indexes.number.push(i)\n types.push(NUMBER_TOKEN)\n values.push(parseFloat(parsedValue))\n }\n ++i\n return SPLIT_TOKEN\n })\n const split = tokenised.split(SPLIT_TOKEN)\n\n return { values, split, indexes, types }\n}\n\nfunction parseComplexValue(v: AnyResolvedKeyframe) {\n return analyseComplexValue(v).values\n}\n\nfunction buildTransformer({ split, types }: ComplexValueInfo) {\n const numSections = split.length\n return (v: Array) => {\n let output = \"\"\n for (let i = 0; i < numSections; i++) {\n output += split[i]\n if (v[i] !== undefined) {\n const type = types[i]\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i] as number)\n } else if (type === COLOR_TOKEN) {\n output += color.transform(v[i] as Color)\n } else {\n output += v[i]\n }\n }\n }\n\n return output\n }\n}\n\nfunction createTransformer(source: AnyResolvedKeyframe) {\n return buildTransformer(analyseComplexValue(source))\n}\n\nconst convertNumbersToZero = (v: number | string) =>\n typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v\n\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (\n value: ComplexValues[number],\n splitBefore: string\n): ComplexValues[number] => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0\n }\n return convertNumbersToZero(value as string)\n}\n\nfunction getAnimatableNone(v: AnyResolvedKeyframe) {\n const info = analyseComplexValue(v)\n const transformer = buildTransformer(info)\n return transformer(\n info.values.map((value, i) => convertToZero(value, info.split[i]))\n )\n}\n\nexport const complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n}\n"],"names":[],"mappings":";;;;;AAQA,SAAS,IAAI,CAAC,CAAM,EAAA;AAChB,IAAA,QACI,KAAK,CAAC,CAAC,CAAC;QACR,OAAO,CAAC,KAAK,QAAQ;QACrB,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;aAC5B,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC;AAClC,YAAA,CAAC;AAEb;AAEA,MAAM,YAAY,GAAG,QAAQ;AAC7B,MAAM,WAAW,GAAG,OAAO;AAC3B,MAAM,SAAS,GAAG,KAAK;AACvB,MAAM,kBAAkB,GAAG,MAAM;AACjC,MAAM,WAAW,GAAG,KAAK;AAmBzB;AACA,MAAM,YAAY,GACd,iOAAiO;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ACH,MAAM,aAAa,GAAG,CAClB,KAA4B,EAC5B,WAAmB,KACI;AACvB,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC3B,QAAA,OAAO,WAAW,EAAE,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC;IACxD;AACA,IAAA,OAAO,oBAAoB,CAAC,KAAe,CAAC;AAChD,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAsB,EAAA;AAC7C,IAAA,MAAM,IAAI,GAAG,mBAAmB,CAAC,CAAC,CAAC;AACnC,IAAA,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,WAAW,CACd,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CACrE;AACL;AAEO,MAAM,OAAO,GAAG;IACnB,IAAI;AACJ,IAAA,KAAK,EAAE,iBAAiB;IACxB,iBAAiB;IACjB,iBAAiB;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs deleted file mode 100644 index 2a3bb778..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs +++ /dev/null @@ -1,13 +0,0 @@ -import { complex } from './index.mjs'; - -const mask = { - ...complex, - getAnimatableNone: (v) => { - const parsed = complex.parse(v); - const transformer = complex.createTransformer(v); - return transformer(parsed.map((v) => typeof v === "number" ? 0 : typeof v === "object" ? { ...v, alpha: 1 } : v)); - }, -}; - -export { mask }; -//# sourceMappingURL=mask.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.map deleted file mode 100644 index e287f1e0..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mask.mjs","sources":["../../../../../src/value/types/complex/mask.ts"],"sourcesContent":["import { complex } from \".\"\nimport { AnyResolvedKeyframe } from \"../../../animation/types\"\n\nexport const mask = {\n ...complex,\n getAnimatableNone: (v: AnyResolvedKeyframe) => {\n const parsed = complex.parse(v)\n const transformer = complex.createTransformer(v)\n return transformer(\n parsed.map((v) =>\n typeof v === \"number\" ? 0 : typeof v === \"object\" ? { ...v, alpha: 1 } : v\n )\n )\n },\n}\n"],"names":[],"mappings":";;AAGO,MAAM,IAAI,GAAG;AAChB,IAAA,GAAG,OAAO;AACV,IAAA,iBAAiB,EAAE,CAAC,CAAsB,KAAI;QAC1C,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAC/B,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAChD,QAAA,OAAO,WAAW,CACd,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KACT,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,QAAQ,GAAG,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,CAC7E,CACJ;IACL,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/dimensions.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/dimensions.mjs deleted file mode 100644 index de400475..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/dimensions.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import { auto } from './auto.mjs'; -import { number } from './numbers/index.mjs'; -import { px, percent, degrees, vw, vh } from './numbers/units.mjs'; -import { testValueType } from './test.mjs'; - -/** - * A list of value types commonly used for dimensions - */ -const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto]; -/** - * Tests a dimensional value against the list of dimension ValueTypes - */ -const findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v)); - -export { dimensionValueTypes, findDimensionValueType }; -//# sourceMappingURL=dimensions.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/dimensions.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/dimensions.mjs.map deleted file mode 100644 index 79f7dc1f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/dimensions.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dimensions.mjs","sources":["../../../../src/value/types/dimensions.ts"],"sourcesContent":["import { auto } from \"./auto\"\nimport { number } from \"./numbers\"\nimport { degrees, percent, px, vh, vw } from \"./numbers/units\"\nimport { testValueType } from \"./test\"\n\n/**\n * A list of value types commonly used for dimensions\n */\nexport const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto]\n\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nexport const findDimensionValueType = (v: any) =>\n dimensionValueTypes.find(testValueType(v))\n"],"names":[],"mappings":";;;;;AAKA;;AAEG;AACI,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI;AAE9E;;AAEG;AACI,MAAM,sBAAsB,GAAG,CAAC,CAAM,KACzC,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/int.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/int.mjs deleted file mode 100644 index 065c6adc..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/int.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { number } from './numbers/index.mjs'; - -const int = { - ...number, - transform: Math.round, -}; - -export { int }; -//# sourceMappingURL=int.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/int.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/int.mjs.map deleted file mode 100644 index 8a3a6e85..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/int.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"int.mjs","sources":["../../../../src/value/types/int.ts"],"sourcesContent":["import { number } from \"./numbers\"\n\nexport const int = {\n ...number,\n transform: Math.round,\n}\n"],"names":[],"mappings":";;AAEO,MAAM,GAAG,GAAG;AACf,IAAA,GAAG,MAAM;IACT,SAAS,EAAE,IAAI,CAAC,KAAK;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs deleted file mode 100644 index ebca7428..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs +++ /dev/null @@ -1,34 +0,0 @@ -import { color } from '../color/index.mjs'; -import { filter } from '../complex/filter.mjs'; -import { mask } from '../complex/mask.mjs'; -import { numberValueTypes } from './number.mjs'; - -/** - * A map of default value types for common values - */ -const defaultValueTypes = { - ...numberValueTypes, - // Color props - color, - backgroundColor: color, - outlineColor: color, - fill: color, - stroke: color, - // Border props - borderColor: color, - borderTopColor: color, - borderRightColor: color, - borderBottomColor: color, - borderLeftColor: color, - filter, - WebkitFilter: filter, - mask, - WebkitMask: mask, -}; -/** - * Gets the default ValueType for the provided value key - */ -const getDefaultValueType = (key) => defaultValueTypes[key]; - -export { defaultValueTypes, getDefaultValueType }; -//# sourceMappingURL=defaults.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs.map deleted file mode 100644 index 1e279cce..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaults.mjs","sources":["../../../../../src/value/types/maps/defaults.ts"],"sourcesContent":["import { color } from \"../color\"\nimport { filter } from \"../complex/filter\"\nimport { mask } from \"../complex/mask\"\nimport { numberValueTypes } from \"./number\"\nimport { ValueTypeMap } from \"./types\"\n\n/**\n * A map of default value types for common values\n */\nexport const defaultValueTypes: ValueTypeMap = {\n ...numberValueTypes,\n\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n mask,\n WebkitMask: mask,\n}\n\n/**\n * Gets the default ValueType for the provided value key\n */\nexport const getDefaultValueType = (key: string) => defaultValueTypes[key]\n"],"names":[],"mappings":";;;;;AAMA;;AAEG;AACI,MAAM,iBAAiB,GAAiB;AAC3C,IAAA,GAAG,gBAAgB;;IAGnB,KAAK;AACL,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,IAAI,EAAE,KAAK;AACX,IAAA,MAAM,EAAE,KAAK;;AAGb,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,cAAc,EAAE,KAAK;AACrB,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,iBAAiB,EAAE,KAAK;AACxB,IAAA,eAAe,EAAE,KAAK;IACtB,MAAM;AACN,IAAA,YAAY,EAAE,MAAM;IACpB,IAAI;AACJ,IAAA,UAAU,EAAE,IAAI;;AAGpB;;AAEG;AACI,MAAM,mBAAmB,GAAG,CAAC,GAAW,KAAK,iBAAiB,CAAC,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/number.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/number.mjs deleted file mode 100644 index e3ee5a22..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/number.mjs +++ /dev/null @@ -1,71 +0,0 @@ -import { int } from '../int.mjs'; -import { alpha } from '../numbers/index.mjs'; -import { px } from '../numbers/units.mjs'; -import { transformValueTypes } from './transform.mjs'; - -const numberValueTypes = { - // Border props - borderWidth: px, - borderTopWidth: px, - borderRightWidth: px, - borderBottomWidth: px, - borderLeftWidth: px, - borderRadius: px, - borderTopLeftRadius: px, - borderTopRightRadius: px, - borderBottomRightRadius: px, - borderBottomLeftRadius: px, - // Positioning props - width: px, - maxWidth: px, - height: px, - maxHeight: px, - top: px, - right: px, - bottom: px, - left: px, - inset: px, - insetBlock: px, - insetBlockStart: px, - insetBlockEnd: px, - insetInline: px, - insetInlineStart: px, - insetInlineEnd: px, - // Spacing props - padding: px, - paddingTop: px, - paddingRight: px, - paddingBottom: px, - paddingLeft: px, - paddingBlock: px, - paddingBlockStart: px, - paddingBlockEnd: px, - paddingInline: px, - paddingInlineStart: px, - paddingInlineEnd: px, - margin: px, - marginTop: px, - marginRight: px, - marginBottom: px, - marginLeft: px, - marginBlock: px, - marginBlockStart: px, - marginBlockEnd: px, - marginInline: px, - marginInlineStart: px, - marginInlineEnd: px, - // Typography - fontSize: px, - // Misc - backgroundPositionX: px, - backgroundPositionY: px, - ...transformValueTypes, - zIndex: int, - // SVG - fillOpacity: alpha, - strokeOpacity: alpha, - numOctaves: int, -}; - -export { numberValueTypes }; -//# sourceMappingURL=number.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/number.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/number.mjs.map deleted file mode 100644 index 4c9cc78d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/number.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"number.mjs","sources":["../../../../../src/value/types/maps/number.ts"],"sourcesContent":["import { int } from \"../int\"\nimport { alpha } from \"../numbers\"\nimport { px } from \"../numbers/units\"\nimport { transformValueTypes } from \"./transform\"\nimport { ValueTypeMap } from \"./types\"\n\nexport const numberValueTypes: ValueTypeMap = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n inset: px,\n insetBlock: px,\n insetBlockStart: px,\n insetBlockEnd: px,\n insetInline: px,\n insetInlineStart: px,\n insetInlineEnd: px,\n\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n paddingBlock: px,\n paddingBlockStart: px,\n paddingBlockEnd: px,\n paddingInline: px,\n paddingInlineStart: px,\n paddingInlineEnd: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n marginBlock: px,\n marginBlockStart: px,\n marginBlockEnd: px,\n marginInline: px,\n marginInlineStart: px,\n marginInlineEnd: px,\n\n // Typography\n fontSize: px,\n\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n\n ...transformValueTypes,\n zIndex: int,\n\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n}\n"],"names":[],"mappings":";;;;;AAMO,MAAM,gBAAgB,GAAiB;;AAE1C,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,cAAc,EAAE,EAAE;AAClB,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,iBAAiB,EAAE,EAAE;AACrB,IAAA,eAAe,EAAE,EAAE;AACnB,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,mBAAmB,EAAE,EAAE;AACvB,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,uBAAuB,EAAE,EAAE;AAC3B,IAAA,sBAAsB,EAAE,EAAE;;AAG1B,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,QAAQ,EAAE,EAAE;AACZ,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,SAAS,EAAE,EAAE;AACb,IAAA,GAAG,EAAE,EAAE;AACP,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,eAAe,EAAE,EAAE;AACnB,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,cAAc,EAAE,EAAE;;AAGlB,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,iBAAiB,EAAE,EAAE;AACrB,IAAA,eAAe,EAAE,EAAE;AACnB,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,kBAAkB,EAAE,EAAE;AACtB,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,SAAS,EAAE,EAAE;AACb,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,cAAc,EAAE,EAAE;AAClB,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,iBAAiB,EAAE,EAAE;AACrB,IAAA,eAAe,EAAE,EAAE;;AAGnB,IAAA,QAAQ,EAAE,EAAE;;AAGZ,IAAA,mBAAmB,EAAE,EAAE;AACvB,IAAA,mBAAmB,EAAE,EAAE;AAEvB,IAAA,GAAG,mBAAmB;AACtB,IAAA,MAAM,EAAE,GAAG;;AAGX,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,UAAU,EAAE,GAAG;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs deleted file mode 100644 index b5cc0d92..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs +++ /dev/null @@ -1,38 +0,0 @@ -import { alpha, scale } from '../numbers/index.mjs'; -import { px, progressPercentage, degrees } from '../numbers/units.mjs'; - -const transformValueTypes = { - rotate: degrees, - /** - * Internal channel for `transition.path` orientToPath. Composed onto - * `rotate` at the transform-build sites so the user's `rotate` is - * never read or overwritten. Not part of `transformPropOrder`. - */ - pathRotation: degrees, - rotateX: degrees, - rotateY: degrees, - rotateZ: degrees, - scale, - scaleX: scale, - scaleY: scale, - scaleZ: scale, - skew: degrees, - skewX: degrees, - skewY: degrees, - distance: px, - translateX: px, - translateY: px, - translateZ: px, - x: px, - y: px, - z: px, - perspective: px, - transformPerspective: px, - opacity: alpha, - originX: progressPercentage, - originY: progressPercentage, - originZ: px, -}; - -export { transformValueTypes }; -//# sourceMappingURL=transform.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs.map deleted file mode 100644 index 6490b6b8..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transform.mjs","sources":["../../../../../src/value/types/maps/transform.ts"],"sourcesContent":["import { alpha, scale } from \"../numbers\"\nimport { degrees, progressPercentage, px } from \"../numbers/units\"\nimport { ValueTypeMap } from \"./types\"\n\nexport const transformValueTypes: ValueTypeMap = {\n rotate: degrees,\n /**\n * Internal channel for `transition.path` orientToPath. Composed onto\n * `rotate` at the transform-build sites so the user's `rotate` is\n * never read or overwritten. Not part of `transformPropOrder`.\n */\n pathRotation: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,mBAAmB,GAAiB;AAC7C,IAAA,MAAM,EAAE,OAAO;AACf;;;;AAIG;AACH,IAAA,YAAY,EAAE,OAAO;AACrB,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,OAAO,EAAE,OAAO;IAChB,KAAK;AACL,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,QAAQ,EAAE,EAAE;AACZ,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,CAAC,EAAE,EAAE;AACL,IAAA,CAAC,EAAE,EAAE;AACL,IAAA,CAAC,EAAE,EAAE;AACL,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,OAAO,EAAE,KAAK;AACd,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,OAAO,EAAE,EAAE;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs deleted file mode 100644 index 96393054..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import { clamp } from 'motion-utils'; - -const number = { - test: (v) => typeof v === "number", - parse: parseFloat, - transform: (v) => v, -}; -const alpha = { - ...number, - transform: (v) => clamp(0, 1, v), -}; -const scale = { - ...number, - default: 1, -}; - -export { alpha, number, scale }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs.map deleted file mode 100644 index d4ca6a24..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../../../src/value/types/numbers/index.ts"],"sourcesContent":["import { clamp } from \"motion-utils\"\n\nexport const number = {\n test: (v: number) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v: number) => v,\n}\n\nexport const alpha = {\n ...number,\n transform: (v: number) => clamp(0, 1, v),\n}\n\nexport const scale = {\n ...number,\n default: 1,\n}\n"],"names":[],"mappings":";;AAEO,MAAM,MAAM,GAAG;IAClB,IAAI,EAAE,CAAC,CAAS,KAAK,OAAO,CAAC,KAAK,QAAQ;AAC1C,IAAA,KAAK,EAAE,UAAU;AACjB,IAAA,SAAS,EAAE,CAAC,CAAS,KAAK,CAAC;;AAGxB,MAAM,KAAK,GAAG;AACjB,IAAA,GAAG,MAAM;AACT,IAAA,SAAS,EAAE,CAAC,CAAS,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;;AAGrC,MAAM,KAAK,GAAG;AACjB,IAAA,GAAG,MAAM;AACT,IAAA,OAAO,EAAE,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs deleted file mode 100644 index 5f592384..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs +++ /dev/null @@ -1,19 +0,0 @@ -/*#__NO_SIDE_EFFECTS__*/ -const createUnitType = (unit) => ({ - test: (v) => typeof v === "string" && v.endsWith(unit) && v.split(" ").length === 1, - parse: parseFloat, - transform: (v) => `${v}${unit}`, -}); -const degrees = /*@__PURE__*/ createUnitType("deg"); -const percent = /*@__PURE__*/ createUnitType("%"); -const px = /*@__PURE__*/ createUnitType("px"); -const vh = /*@__PURE__*/ createUnitType("vh"); -const vw = /*@__PURE__*/ createUnitType("vw"); -const progressPercentage = /*@__PURE__*/ (() => ({ - ...percent, - parse: (v) => percent.parse(v) / 100, - transform: (v) => percent.transform(v * 100), -}))(); - -export { degrees, percent, progressPercentage, px, vh, vw }; -//# sourceMappingURL=units.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs.map deleted file mode 100644 index 66cb8537..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"units.mjs","sources":["../../../../../src/value/types/numbers/units.ts"],"sourcesContent":["import { AnyResolvedKeyframe } from \"../../../animation/types\"\n\n/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit: string) => ({\n test: (v: AnyResolvedKeyframe) =>\n typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v: number | string) => `${v}${unit}`,\n})\n\nexport const degrees = /*@__PURE__*/ createUnitType(\"deg\")\nexport const percent = /*@__PURE__*/ createUnitType(\"%\")\nexport const px = /*@__PURE__*/ createUnitType(\"px\")\nexport const vh = /*@__PURE__*/ createUnitType(\"vh\")\nexport const vw = /*@__PURE__*/ createUnitType(\"vw\")\n\nexport const progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v: string) => percent.parse(v) / 100,\n transform: (v: number) => percent.transform(v * 100),\n}))()\n"],"names":[],"mappings":"AAEA;AACA,MAAM,cAAc,GAAG,CAAC,IAAY,MAAM;IACtC,IAAI,EAAE,CAAC,CAAsB,KACzB,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC;AAC1E,IAAA,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,CAAC,CAAkB,KAAK,CAAA,EAAG,CAAC,CAAA,EAAG,IAAI,CAAA,CAAE;AACnD,CAAA,CAAC;AAEK,MAAM,OAAO,iBAAiB,cAAc,CAAC,KAAK;AAClD,MAAM,OAAO,iBAAiB,cAAc,CAAC,GAAG;AAChD,MAAM,EAAE,iBAAiB,cAAc,CAAC,IAAI;AAC5C,MAAM,EAAE,iBAAiB,cAAc,CAAC,IAAI;AAC5C,MAAM,EAAE,iBAAiB,cAAc,CAAC,IAAI;AAE5C,MAAM,kBAAkB,iBAAiB,CAAC,OAAO;AACpD,IAAA,GAAG,OAAO;AACV,IAAA,KAAK,EAAE,CAAC,CAAS,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG;AAC5C,IAAA,SAAS,EAAE,CAAC,CAAS,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,GAAG,CAAC;CACvD,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/test.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/test.mjs deleted file mode 100644 index 26cb26e3..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/test.mjs +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Tests a provided value against a ValueType - */ -const testValueType = (v) => (type) => type.test(v); - -export { testValueType }; -//# sourceMappingURL=test.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/test.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/test.mjs.map deleted file mode 100644 index b0ecce07..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/test.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test.mjs","sources":["../../../../src/value/types/test.ts"],"sourcesContent":["import { ValueType } from \"./types\"\n\n/**\n * Tests a provided value against a ValueType\n */\nexport const testValueType = (v: any) => (type: ValueType) => type.test(v)\n"],"names":[],"mappings":"AAEA;;AAEG;MACU,aAAa,GAAG,CAAC,CAAM,KAAK,CAAC,IAAe,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs deleted file mode 100644 index c4efbc2a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import { complex } from '../complex/index.mjs'; -import { filter } from '../complex/filter.mjs'; -import { mask } from '../complex/mask.mjs'; -import { getDefaultValueType } from '../maps/defaults.mjs'; - -const customTypes = /*@__PURE__*/ new Set([filter, mask]); -function getAnimatableNone(key, value) { - let defaultValueType = getDefaultValueType(key); - if (!customTypes.has(defaultValueType)) - defaultValueType = complex; - // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target - return defaultValueType.getAnimatableNone - ? defaultValueType.getAnimatableNone(value) - : undefined; -} - -export { getAnimatableNone }; -//# sourceMappingURL=animatable-none.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.map deleted file mode 100644 index f832871b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animatable-none.mjs","sources":["../../../../../src/value/types/utils/animatable-none.ts"],"sourcesContent":["import { complex } from \"../complex\"\nimport { filter } from \"../complex/filter\"\nimport { mask } from \"../complex/mask\"\nimport { getDefaultValueType } from \"../maps/defaults\"\n\nconst customTypes = /*@__PURE__*/ new Set([filter, mask])\n\nexport function getAnimatableNone(key: string, value: string) {\n let defaultValueType = getDefaultValueType(key)\n if (!customTypes.has(defaultValueType as any)) defaultValueType = complex\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined\n}\n"],"names":[],"mappings":";;;;;AAKA,MAAM,WAAW,iBAAiB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAEnD,SAAU,iBAAiB,CAAC,GAAW,EAAE,KAAa,EAAA;AACxD,IAAA,IAAI,gBAAgB,GAAG,mBAAmB,CAAC,GAAG,CAAC;AAC/C,IAAA,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,gBAAuB,CAAC;QAAE,gBAAgB,GAAG,OAAO;;IAEzE,OAAO,gBAAgB,CAAC;AACpB,UAAE,gBAAgB,CAAC,iBAAiB,CAAC,KAAK;UACxC,SAAS;AACnB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs deleted file mode 100644 index 645be1e6..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu; - -export { colorRegex }; -//# sourceMappingURL=color-regex.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs.map deleted file mode 100644 index fcfdf787..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"color-regex.mjs","sources":["../../../../../src/value/types/utils/color-regex.ts"],"sourcesContent":["export const colorRegex =\n /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu\n"],"names":[],"mappings":"AAAO,MAAM,UAAU,GACnB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/find.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/find.mjs deleted file mode 100644 index aac4531b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/find.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import { color } from '../color/index.mjs'; -import { complex } from '../complex/index.mjs'; -import { dimensionValueTypes } from '../dimensions.mjs'; -import { testValueType } from '../test.mjs'; - -/** - * A list of all ValueTypes - */ -const valueTypes = [...dimensionValueTypes, color, complex]; -/** - * Tests a value against the list of ValueTypes - */ -const findValueType = (v) => valueTypes.find(testValueType(v)); - -export { findValueType }; -//# sourceMappingURL=find.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.map deleted file mode 100644 index 9de8942a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"find.mjs","sources":["../../../../../src/value/types/utils/find.ts"],"sourcesContent":["import { color } from \"../color\"\nimport { complex } from \"../complex\"\nimport { dimensionValueTypes } from \"../dimensions\"\nimport { testValueType } from \"../test\"\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex]\n\n/**\n * Tests a value against the list of ValueTypes\n */\nexport const findValueType = (v: any) => valueTypes.find(testValueType(v))\n"],"names":[],"mappings":";;;;;AAKA;;AAEG;AACH,MAAM,UAAU,GAAG,CAAC,GAAG,mBAAmB,EAAE,KAAK,EAAE,OAAO,CAAC;AAE3D;;AAEG;AACI,MAAM,aAAa,GAAG,CAAC,CAAM,KAAK,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs deleted file mode 100644 index 2e1cd7da..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const floatRegex = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu; - -export { floatRegex }; -//# sourceMappingURL=float-regex.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs.map deleted file mode 100644 index 76a6c87c..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"float-regex.mjs","sources":["../../../../../src/value/types/utils/float-regex.ts"],"sourcesContent":["export const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu\n"],"names":[],"mappings":"AAAO,MAAM,UAAU,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs deleted file mode 100644 index 768d5667..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Provided a value and a ValueType, returns the value as that value type. - */ -const getValueAsType = (value, type) => { - return type && typeof value === "number" - ? type.transform(value) - : value; -}; - -export { getValueAsType }; -//# sourceMappingURL=get-as-type.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs.map deleted file mode 100644 index 20ce63ee..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get-as-type.mjs","sources":["../../../../../src/value/types/utils/get-as-type.ts"],"sourcesContent":["import { ValueType } from \"../types\"\n\n/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nexport const getValueAsType = (value: any, type?: ValueType) => {\n return type && typeof value === \"number\"\n ? (type as any).transform(value)\n : value\n}\n"],"names":[],"mappings":"AAEA;;AAEG;MACU,cAAc,GAAG,CAAC,KAAU,EAAE,IAAgB,KAAI;AAC3D,IAAA,OAAO,IAAI,IAAI,OAAO,KAAK,KAAK;AAC5B,UAAG,IAAY,CAAC,SAAS,CAAC,KAAK;UAC7B,KAAK;AACf;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs deleted file mode 100644 index 28ccf2f0..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs +++ /dev/null @@ -1,6 +0,0 @@ -function isNullish(v) { - return v == null; -} - -export { isNullish }; -//# sourceMappingURL=is-nullish.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs.map deleted file mode 100644 index d883f28f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-nullish.mjs","sources":["../../../../../src/value/types/utils/is-nullish.ts"],"sourcesContent":["export function isNullish(v: any): v is null | undefined {\n return v == null\n}\n"],"names":[],"mappings":"AAAM,SAAU,SAAS,CAAC,CAAM,EAAA;IAC5B,OAAO,CAAC,IAAI,IAAI;AACpB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs deleted file mode 100644 index 8285b23b..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs +++ /dev/null @@ -1,6 +0,0 @@ -// If this number is a decimal, make it just five decimal places -// to avoid exponents -const sanitize = (v) => Math.round(v * 100000) / 100000; - -export { sanitize }; -//# sourceMappingURL=sanitize.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs.map deleted file mode 100644 index 24006569..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sanitize.mjs","sources":["../../../../../src/value/types/utils/sanitize.ts"],"sourcesContent":["// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nexport const sanitize = (v: number) => Math.round(v * 100000) / 100000\n"],"names":[],"mappings":"AAAA;AACA;AACO,MAAM,QAAQ,GAAG,CAAC,CAAS,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs deleted file mode 100644 index cf67f20a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const singleColorRegex = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu; - -export { singleColorRegex }; -//# sourceMappingURL=single-color-regex.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs.map deleted file mode 100644 index 706651bc..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"single-color-regex.mjs","sources":["../../../../../src/value/types/utils/single-color-regex.ts"],"sourcesContent":["export const singleColorRegex =\n /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu\n"],"names":[],"mappings":"AAAO,MAAM,gBAAgB,GACzB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs deleted file mode 100644 index ae80d222..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const isMotionValue = (value) => Boolean(value && value.getVelocity); - -export { isMotionValue }; -//# sourceMappingURL=is-motion-value.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs.map deleted file mode 100644 index 171e74ec..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-motion-value.mjs","sources":["../../../../src/value/utils/is-motion-value.ts"],"sourcesContent":["import type { MotionValue } from \"..\"\n\nexport const isMotionValue = (value: any): value is MotionValue =>\n Boolean(value && value.getVelocity)\n"],"names":[],"mappings":"AAEO,MAAM,aAAa,GAAG,CAAC,KAAU,KACpC,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs deleted file mode 100644 index 72614b6e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs +++ /dev/null @@ -1,11 +0,0 @@ -import { isMotionValue } from './is-motion-value.mjs'; - -/** - * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself - */ -function resolveMotionValue(value) { - return isMotionValue(value) ? value.get() : value; -} - -export { resolveMotionValue }; -//# sourceMappingURL=resolve-motion-value.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs.map deleted file mode 100644 index 1960b2c1..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-motion-value.mjs","sources":["../../../../src/value/utils/resolve-motion-value.ts"],"sourcesContent":["import type { AnyResolvedKeyframe } from \"../../animation/types\"\nimport { isMotionValue } from \"./is-motion-value\"\nimport type { MotionValue } from \"../index\"\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n */\nexport function resolveMotionValue(\n value?: AnyResolvedKeyframe | MotionValue\n): AnyResolvedKeyframe {\n return isMotionValue(value) ? value.get() : value\n}\n"],"names":[],"mappings":";;AAIA;;AAEG;AACG,SAAU,kBAAkB,CAC9B,KAAyC,EAAA;AAEzC,IAAA,OAAO,aAAa,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,GAAG,KAAK;AACrD;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs deleted file mode 100644 index 6c9ab79e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs +++ /dev/null @@ -1,21 +0,0 @@ -import { MotionGlobalConfig } from 'motion-utils'; -import { isWillChangeMotionValue } from './is.mjs'; - -function addValueToWillChange(visualElement, key) { - const willChange = visualElement.getValue("willChange"); - /** - * It could be that a user has set willChange to a regular MotionValue, - * in which case we can't add the value to it. - */ - if (isWillChangeMotionValue(willChange)) { - return willChange.add(key); - } - else if (!willChange && MotionGlobalConfig.WillChange) { - const newWillChange = new MotionGlobalConfig.WillChange("auto"); - visualElement.addValue("willChange", newWillChange); - newWillChange.add(key); - } -} - -export { addValueToWillChange }; -//# sourceMappingURL=add-will-change.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs.map deleted file mode 100644 index ef5a237f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"add-will-change.mjs","sources":["../../../../src/value/will-change/add-will-change.ts"],"sourcesContent":["import { MotionGlobalConfig } from \"motion-utils\"\nimport type { VisualElement } from \"../../render/VisualElement\"\nimport { isWillChangeMotionValue } from \"./is\"\n\nexport function addValueToWillChange(\n visualElement: VisualElement,\n key: string\n) {\n const willChange = visualElement.getValue(\"willChange\")\n\n /**\n * It could be that a user has set willChange to a regular MotionValue,\n * in which case we can't add the value to it.\n */\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key)\n } else if (!willChange && MotionGlobalConfig.WillChange) {\n const newWillChange = new MotionGlobalConfig.WillChange(\"auto\")\n\n visualElement.addValue(\"willChange\", newWillChange)\n newWillChange.add(key)\n }\n}\n"],"names":[],"mappings":";;;AAIM,SAAU,oBAAoB,CAChC,aAA4B,EAC5B,GAAW,EAAA;IAEX,MAAM,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC;AAEvD;;;AAGG;AACH,IAAA,IAAI,uBAAuB,CAAC,UAAU,CAAC,EAAE;AACrC,QAAA,OAAO,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC;IAC9B;AAAO,SAAA,IAAI,CAAC,UAAU,IAAI,kBAAkB,CAAC,UAAU,EAAE;QACrD,MAAM,aAAa,GAAG,IAAI,kBAAkB,CAAC,UAAU,CAAC,MAAM,CAAC;AAE/D,QAAA,aAAa,CAAC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;AACnD,QAAA,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC;IAC1B;AACJ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/is.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/is.mjs deleted file mode 100644 index b36be11f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/is.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import { isMotionValue } from '../utils/is-motion-value.mjs'; - -function isWillChangeMotionValue(value) { - return Boolean(isMotionValue(value) && value.add); -} - -export { isWillChangeMotionValue }; -//# sourceMappingURL=is.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/is.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/is.mjs.map deleted file mode 100644 index f68ce5fe..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/value/will-change/is.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is.mjs","sources":["../../../../src/value/will-change/is.ts"],"sourcesContent":["import { isMotionValue } from \"../utils/is-motion-value\"\nimport type { WillChange } from \"./types\"\n\nexport function isWillChangeMotionValue(value: any): value is WillChange {\n return Boolean(isMotionValue(value) && (value as WillChange).add)\n}\n"],"names":[],"mappings":";;AAGM,SAAU,uBAAuB,CAAC,KAAU,EAAA;IAC9C,OAAO,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,IAAK,KAAoB,CAAC,GAAG,CAAC;AACrE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/index.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/index.mjs deleted file mode 100644 index 571627b9..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/index.mjs +++ /dev/null @@ -1,65 +0,0 @@ -import { noop } from 'motion-utils'; -import { addToQueue } from './queue.mjs'; - -class ViewTransitionBuilder { - constructor(update, options = {}) { - this.currentSubject = "root"; - this.targets = new Map(); - this.notifyReady = noop; - this.readyPromise = new Promise((resolve) => { - this.notifyReady = resolve; - }); - this.update = update; - this.options = { - interrupt: "wait", - ...options, - }; - addToQueue(this); - } - get(subject) { - this.currentSubject = subject; - return this; - } - layout(keyframes, options) { - this.updateTarget("layout", keyframes, options); - return this; - } - new(keyframes, options) { - this.updateTarget("new", keyframes, options); - return this; - } - old(keyframes, options) { - this.updateTarget("old", keyframes, options); - return this; - } - enter(keyframes, options) { - this.updateTarget("enter", keyframes, options); - return this; - } - exit(keyframes, options) { - this.updateTarget("exit", keyframes, options); - return this; - } - crossfade(options) { - this.updateTarget("enter", { opacity: 1 }, options); - this.updateTarget("exit", { opacity: 0 }, options); - return this; - } - updateTarget(target, keyframes, options = {}) { - const { currentSubject, targets } = this; - if (!targets.has(currentSubject)) { - targets.set(currentSubject, {}); - } - const targetData = targets.get(currentSubject); - targetData[target] = { keyframes, options }; - } - then(resolve, reject) { - return this.readyPromise.then(resolve, reject); - } -} -function animateView(update, defaultOptions = {}) { - return new ViewTransitionBuilder(update, defaultOptions); -} - -export { ViewTransitionBuilder, animateView }; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/index.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/index.mjs.map deleted file mode 100644 index f6932656..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../../../src/view/index.ts"],"sourcesContent":["import { noop } from \"motion-utils\"\nimport type { GroupAnimation } from \"../animation/GroupAnimation\"\nimport { AnimationOptions, DOMKeyframesDefinition } from \"../animation/types\"\nimport { addToQueue } from \"./queue\"\nimport {\n ViewTransitionOptions,\n ViewTransitionTarget,\n ViewTransitionTargetDefinition,\n} from \"./types\"\nimport \"./types.global\"\n\nexport class ViewTransitionBuilder {\n private currentSubject: ViewTransitionTargetDefinition = \"root\"\n\n targets = new Map()\n\n update: () => void | Promise\n\n options: ViewTransitionOptions\n\n notifyReady: (value: GroupAnimation) => void = noop\n\n private readyPromise = new Promise((resolve) => {\n this.notifyReady = resolve\n })\n\n constructor(\n update: () => void | Promise,\n options: ViewTransitionOptions = {}\n ) {\n this.update = update\n this.options = {\n interrupt: \"wait\",\n ...options,\n }\n addToQueue(this)\n }\n\n get(subject: ViewTransitionTargetDefinition) {\n this.currentSubject = subject\n\n return this\n }\n\n layout(keyframes: DOMKeyframesDefinition, options?: AnimationOptions) {\n this.updateTarget(\"layout\", keyframes, options)\n\n return this\n }\n\n new(keyframes: DOMKeyframesDefinition, options?: AnimationOptions) {\n this.updateTarget(\"new\", keyframes, options)\n\n return this\n }\n\n old(keyframes: DOMKeyframesDefinition, options?: AnimationOptions) {\n this.updateTarget(\"old\", keyframes, options)\n\n return this\n }\n\n enter(keyframes: DOMKeyframesDefinition, options?: AnimationOptions) {\n this.updateTarget(\"enter\", keyframes, options)\n\n return this\n }\n\n exit(keyframes: DOMKeyframesDefinition, options?: AnimationOptions) {\n this.updateTarget(\"exit\", keyframes, options)\n\n return this\n }\n\n crossfade(options?: AnimationOptions) {\n this.updateTarget(\"enter\", { opacity: 1 }, options)\n this.updateTarget(\"exit\", { opacity: 0 }, options)\n\n return this\n }\n\n updateTarget(\n target: \"enter\" | \"exit\" | \"layout\" | \"new\" | \"old\",\n keyframes: DOMKeyframesDefinition,\n options: AnimationOptions = {}\n ) {\n const { currentSubject, targets } = this\n\n if (!targets.has(currentSubject)) {\n targets.set(currentSubject, {})\n }\n\n const targetData = targets.get(currentSubject)!\n\n targetData[target] = { keyframes, options }\n }\n\n then(resolve: () => void, reject?: () => void) {\n return this.readyPromise.then(resolve, reject)\n }\n}\n\nexport function animateView(\n update: () => void | Promise,\n defaultOptions: ViewTransitionOptions = {}\n) {\n return new ViewTransitionBuilder(update, defaultOptions)\n}\n"],"names":[],"mappings":";;;MAWa,qBAAqB,CAAA;IAe9B,WAAA,CACI,MAAkC,EAClC,OAAA,GAAiC,EAAE,EAAA;QAhB/B,IAAA,CAAA,cAAc,GAAmC,MAAM;AAE/D,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,GAAG,EAAwD;QAMzE,IAAA,CAAA,WAAW,GAAoC,IAAI;AAE3C,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,CAAiB,CAAC,OAAO,KAAI;AAC3D,YAAA,IAAI,CAAC,WAAW,GAAG,OAAO;AAC9B,QAAA,CAAC,CAAC;AAME,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM;QACpB,IAAI,CAAC,OAAO,GAAG;AACX,YAAA,SAAS,EAAE,MAAM;AACjB,YAAA,GAAG,OAAO;SACb;QACD,UAAU,CAAC,IAAI,CAAC;IACpB;AAEA,IAAA,GAAG,CAAC,OAAuC,EAAA;AACvC,QAAA,IAAI,CAAC,cAAc,GAAG,OAAO;AAE7B,QAAA,OAAO,IAAI;IACf;IAEA,MAAM,CAAC,SAAiC,EAAE,OAA0B,EAAA;QAChE,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;AAE/C,QAAA,OAAO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AEA,IAAI,CAAC,OAAmB,EAAE,MAAmB,EAAA;QACzC,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;IAClD;AACH;SAEe,WAAW,CACvB,MAAkC,EAClC,iBAAwC,EAAE,EAAA;AAE1C,IAAA,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,cAAc,CAAC;AAC5D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/queue.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/queue.mjs deleted file mode 100644 index 9bde208e..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/queue.mjs +++ /dev/null @@ -1,53 +0,0 @@ -import { removeItem } from 'motion-utils'; -import { microtask } from '../frameloop/microtask.mjs'; -import { startViewAnimation } from './start.mjs'; - -let builders = []; -let current = null; -function next() { - current = null; - const [nextBuilder] = builders; - if (nextBuilder) - start(nextBuilder); -} -function start(builder) { - removeItem(builders, builder); - current = builder; - startViewAnimation(builder).then((animation) => { - builder.notifyReady(animation); - animation.finished.finally(next); - }); -} -function processQueue() { - /** - * Iterate backwards over the builders array. We can ignore the - * "wait" animations. If we have an interrupting animation in the - * queue then we need to batch all preceeding animations into it. - * Currently this only batches the update functions but will also - * need to batch the targets. - */ - for (let i = builders.length - 1; i >= 0; i--) { - const builder = builders[i]; - const { interrupt } = builder.options; - if (interrupt === "immediate") { - const batchedUpdates = builders.slice(0, i + 1).map((b) => b.update); - const remaining = builders.slice(i + 1); - builder.update = () => { - batchedUpdates.forEach((update) => update()); - }; - // Put the current builder at the front, followed by any "wait" builders - builders = [builder, ...remaining]; - break; - } - } - if (!current || builders[0]?.options.interrupt === "immediate") { - next(); - } -} -function addToQueue(builder) { - builders.push(builder); - microtask.render(processQueue); -} - -export { addToQueue }; -//# sourceMappingURL=queue.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/queue.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/queue.mjs.map deleted file mode 100644 index c75d1563..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/queue.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queue.mjs","sources":["../../../src/view/queue.ts"],"sourcesContent":["import { removeItem } from \"motion-utils\"\nimport type { ViewTransitionBuilder } from \".\"\nimport { microtask } from \"../frameloop/microtask\"\nimport { startViewAnimation } from \"./start\"\n\nlet builders: ViewTransitionBuilder[] = []\n\nlet current: ViewTransitionBuilder | null = null\n\nfunction next() {\n current = null\n const [nextBuilder] = builders\n if (nextBuilder) start(nextBuilder)\n}\n\nfunction start(builder: ViewTransitionBuilder) {\n removeItem(builders, builder)\n current = builder\n startViewAnimation(builder).then((animation) => {\n builder.notifyReady(animation)\n animation.finished.finally(next)\n })\n}\n\nfunction processQueue() {\n /**\n * Iterate backwards over the builders array. We can ignore the\n * \"wait\" animations. If we have an interrupting animation in the\n * queue then we need to batch all preceeding animations into it.\n * Currently this only batches the update functions but will also\n * need to batch the targets.\n */\n for (let i = builders.length - 1; i >= 0; i--) {\n const builder = builders[i]\n const { interrupt } = builder.options\n\n if (interrupt === \"immediate\") {\n const batchedUpdates = builders.slice(0, i + 1).map((b) => b.update)\n const remaining = builders.slice(i + 1)\n\n builder.update = () => {\n batchedUpdates.forEach((update) => update())\n }\n\n // Put the current builder at the front, followed by any \"wait\" builders\n builders = [builder, ...remaining]\n\n break\n }\n }\n\n if (!current || builders[0]?.options.interrupt === \"immediate\") {\n next()\n }\n}\n\nexport function addToQueue(builder: ViewTransitionBuilder) {\n builders.push(builder)\n microtask.render(processQueue)\n}\n"],"names":[],"mappings":";;;;AAKA,IAAI,QAAQ,GAA4B,EAAE;AAE1C,IAAI,OAAO,GAAiC,IAAI;AAEhD,SAAS,IAAI,GAAA;IACT,O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AQ,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,KAAK,WAAW,EAAE;AAC5D,QAAA,IAAI,EAAE;IACV;AACJ;AAEM,SAAU,UAAU,CAAC,OAA8B,EAAA;AACrD,IAAA,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;AACtB,IAAA,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC;AAClC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/start.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/start.mjs deleted file mode 100644 index 22666ffe..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/start.mjs +++ /dev/null @@ -1,156 +0,0 @@ -import { secondsToMilliseconds } from 'motion-utils'; -import { GroupAnimation } from '../animation/GroupAnimation.mjs'; -import { NativeAnimation } from '../animation/NativeAnimation.mjs'; -import { NativeAnimationWrapper } from '../animation/NativeAnimationWrapper.mjs'; -import { getValueTransition } from '../animation/utils/get-value-transition.mjs'; -import { mapEasingToNativeEasing } from '../animation/waapi/easing/map-easing.mjs'; -import { applyGeneratorOptions } from '../animation/waapi/utils/apply-generator.mjs'; -import { chooseLayerType } from './utils/choose-layer-type.mjs'; -import { css } from './utils/css.mjs'; -import { getViewAnimationLayerInfo } from './utils/get-layer-info.mjs'; -import { getViewAnimations } from './utils/get-view-animations.mjs'; -import { hasTarget } from './utils/has-target.mjs'; - -const definitionNames = ["layout", "enter", "exit", "new", "old"]; -function startViewAnimation(builder) { - const { update, targets, options: defaultOptions } = builder; - if (!document.startViewTransition) { - return new Promise(async (resolve) => { - await update(); - resolve(new GroupAnimation([])); - }); - } - // TODO: Go over existing targets and ensure they all have ids - /** - * If we don't have any animations defined for the root target, - * remove it from being captured. - */ - if (!hasTarget("root", targets)) { - css.set(":root", { - "view-transition-name": "none", - }); - } - /** - * Set the timing curve to linear for all view transition layers. - * This gets baked into the keyframes, which can't be changed - * without breaking the generated animation. - * - * This allows us to set easing via updateTiming - which can be changed. - */ - css.set("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)", { "animation-timing-function": "linear !important" }); - css.commit(); // Write - const transition = document.startViewTransition(async () => { - await update(); - // TODO: Go over new targets and ensure they all have ids - }); - transition.finished.finally(() => { - css.remove(); // Write - }); - return new Promise((resolve) => { - transition.ready.then(() => { - const generatedViewAnimations = getViewAnimations(); - const animations = []; - /** - * Create animations for each of our explicitly-defined subjects. - */ - targets.forEach((definition, target) => { - // TODO: If target is not "root", resolve elements - // and iterate over each - for (const key of definitionNames) { - if (!definition[key]) - continue; - const { keyframes, options } = definition[key]; - for (let [valueName, valueKeyframes] of Object.entries(keyframes)) { - if (!valueKeyframes) - continue; - const valueOptions = { - ...getValueTransition(defaultOptions, valueName), - ...getValueTransition(options, valueName), - }; - const type = chooseLayerType(key); - /** - * If this is an opacity animation, and keyframes are not an array, - * we need to convert them into an array and set an initial value. - */ - if (valueName === "opacity" && - !Array.isArray(valueKeyframes)) { - const initialValue = type === "new" ? 0 : 1; - valueKeyframes = [initialValue, valueKeyframes]; - } - /** - * Resolve stagger function if provided. - */ - if (typeof valueOptions.delay === "function") { - valueOptions.delay = valueOptions.delay(0, 1); - } - valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay)); - const animation = new NativeAnimation({ - ...valueOptions, - element: document.documentElement, - name: valueName, - pseudoElement: `::view-transition-${type}(${target})`, - keyframes: valueKeyframes, - }); - animations.push(animation); - } - } - }); - /** - * Handle browser generated animations - */ - for (const animation of generatedViewAnimations) { - if (animation.playState === "finished") - continue; - const { effect } = animation; - if (!effect || !(effect instanceof KeyframeEffect)) - continue; - const { pseudoElement } = effect; - if (!pseudoElement) - continue; - const name = getViewAnimationLayerInfo(pseudoElement); - if (!name) - continue; - const targetDefinition = targets.get(name.layer); - if (!targetDefinition) { - /** - * If transition name is group then update the timing of the animation - * whereas if it's old or new then we could possibly replace it using - * the above method. - */ - const transitionName = name.type === "group" ? "layout" : ""; - let animationTransition = { - ...getValueTransition(defaultOptions, transitionName), - }; - animationTransition.duration && (animationTransition.duration = secondsToMilliseconds(animationTransition.duration)); - animationTransition = - applyGeneratorOptions(animationTransition); - const easing = mapEasingToNativeEasing(animationTransition.ease, animationTransition.duration); - effect.updateTiming({ - delay: secondsToMilliseconds(animationTransition.delay ?? 0), - duration: animationTransition.duration, - easing, - }); - animations.push(new NativeAnimationWrapper(animation)); - } - else if (hasOpacity(targetDefinition, "enter") && - hasOpacity(targetDefinition, "exit") && - effect - .getKeyframes() - .some((keyframe) => keyframe.mixBlendMode)) { - animations.push(new NativeAnimationWrapper(animation)); - } - else { - animation.cancel(); - } - } - resolve(new GroupAnimation(animations)); - }); - }); -} -function hasOpacity(target, key) { - return target?.[key]?.keyframes.opacity; -} - -export { startViewAnimation }; -//# sourceMappingURL=start.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/start.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/start.mjs.map deleted file mode 100644 index b966fda4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/start.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"start.mjs","sources":["../../../src/view/start.ts"],"sourcesContent":["import { secondsToMilliseconds } from \"motion-utils\"\nimport { GroupAnimation } from \"../animation/GroupAnimation\"\nimport { NativeAnimation } from \"../animation/NativeAnimation\"\nimport { NativeAnimationWrapper } from \"../animation/NativeAnimationWrapper\"\nimport { AnimationPlaybackControls } from \"../animation/types\"\nimport { getValueTransition } from \"../animation/utils/get-value-transition\"\nimport { mapEasingToNativeEasing } from \"../animation/waapi/easing/map-easing\"\nimport { applyGeneratorOptions } from \"../animation/waapi/utils/apply-generator\"\nimport type { ViewTransitionBuilder } from \"./index\"\nimport { ViewTransitionTarget } from \"./types\"\nimport { chooseLayerType } from \"./utils/choose-layer-type\"\nimport { css } from \"./utils/css\"\nimport { getViewAnimationLayerInfo } from \"./utils/get-layer-info\"\nimport { getViewAnimations } from \"./utils/get-view-animations\"\nimport { hasTarget } from \"./utils/has-target\"\n\nconst definitionNames = [\"layout\", \"enter\", \"exit\", \"new\", \"old\"] as const\n\nexport function startViewAnimation(\n builder: ViewTransitionBuilder\n): Promise {\n const { update, targets, options: defaultOptions } = builder\n\n if (!document.startViewTransition) {\n return new Promise(async (resolve) => {\n await update()\n resolve(new GroupAnimation([]))\n })\n }\n\n // TODO: Go over existing targets and ensure they all have ids\n\n /**\n * If we don't have any animations defined for the root target,\n * remove it from being captured.\n */\n if (!hasTarget(\"root\", targets)) {\n css.set(\":root\", {\n \"view-transition-name\": \"none\",\n })\n }\n\n /**\n * Set the timing curve to linear for all view transition layers.\n * This gets baked into the keyframes, which can't be changed\n * without breaking the generated animation.\n *\n * This allows us to set easing via updateTiming - which can be changed.\n */\n css.set(\n \"::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)\",\n { \"animation-timing-function\": \"linear !important\" }\n )\n\n css.commit() // Write\n\n const transition = document.startViewTransition(async () => {\n await update()\n\n // TODO: Go over new targets and ensure they all have ids\n })\n\n transition.finished.finally(() => {\n css.remove() // Write\n })\n\n return new Promise((resolve) => {\n transition.ready.then(() => {\n const generatedViewAnimations = getViewAnimations()\n\n const animations: AnimationPlaybackControls[] = []\n\n /**\n * Create animations for each of our explicitly-defined subjects.\n */\n targets.forEach((definition, target) => {\n // TODO: If target is not \"root\", resolve elements\n // and iterate over each\n for (const key of definitionNames) {\n if (!definition[key]) continue\n const { keyframes, options } =\n definition[key as keyof ViewTransitionTarget]!\n\n for (let [valueName, valueKeyframes] of Object.entries(\n keyframes\n )) {\n if (!valueKeyframes) continue\n\n const valueOptions = {\n ...getValueTransition(\n defaultOptions as any,\n valueName\n ),\n ...getValueTransition(options as any, valueName),\n }\n\n const type = chooseLayerType(\n key as keyof ViewTransitionTarget\n )\n\n /**\n * If this is an opacity animation, and keyframes are not an array,\n * we need to convert them into an array and set an initial value.\n */\n if (\n valueName === \"opacity\" &&\n !Array.isArray(valueKeyframes)\n ) {\n const initialValue = type === \"new\" ? 0 : 1\n valueKeyframes = [initialValue, valueKeyframes]\n }\n\n /**\n * Resolve stagger function if provided.\n */\n if (typeof valueOptions.delay === \"function\") {\n valueOptions.delay = valueOptions.delay(0, 1)\n }\n\n valueOptions.duration &&= secondsToMilliseconds(\n valueOptions.duration\n )\n\n valueOptions.delay &&= secondsToMilliseconds(\n valueOptions.delay\n )\n\n const animation = new NativeAnimation({\n ...valueOptions,\n element: document.documentElement,\n name: valueName,\n pseudoElement: `::view-transition-${type}(${target})`,\n keyframes: valueKeyframes,\n })\n\n animations.push(animation)\n }\n }\n })\n\n /**\n * Handle browser generated animations\n */\n for (const animation of generatedViewAnimations) {\n if (animation.playState === \"finished\") continue\n\n const { effect } = animation\n if (!effect || !(effect instanceof KeyframeEffect)) continue\n\n const { pseudoElement } = effect\n if (!pseudoElement) continue\n\n const name = getViewAnimationLayerInfo(pseudoElement)\n if (!name) continue\n\n const targetDefinition = targets.get(name.layer)\n\n if (!targetDefinition) {\n /**\n * If transition name is group then update the timing of the animation\n * whereas if it's old or new then we could possibly replace it using\n * the above method.\n */\n const transitionName = name.type === \"group\" ? \"layout\" : \"\"\n let animationTransition = {\n ...getValueTransition(defaultOptions, transitionName),\n }\n\n animationTransition.duration &&= secondsToMilliseconds(\n animationTransition.duration\n )\n\n animationTransition =\n applyGeneratorOptions(animationTransition)\n\n const easing = mapEasingToNativeEasing(\n animationTransition.ease,\n animationTransition.duration!\n ) as string\n\n effect.updateTiming({\n delay: secondsToMilliseconds(\n animationTransition.delay ?? 0\n ),\n duration: animationTransition.duration,\n easing,\n })\n\n animations.push(new NativeAnimationWrapper(animation))\n } else if (\n hasOpacity(targetDefinition, \"enter\") &&\n hasOpacity(targetDefinition, \"exit\") &&\n effect\n .getKeyframes()\n .some((keyframe) => keyframe.mixBlendMode)\n ) {\n animations.push(new NativeAnimationWrapper(animation))\n } else {\n animation.cancel()\n }\n }\n\n resolve(new GroupAnimation(animations))\n })\n })\n}\n\nfunction hasOpacity(\n target: ViewTransitionTarget | undefined,\n key: \"enter\" | \"exit\" | \"layout\"\n) {\n return target?.[key]?.keyframes.opacity\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAU;AAEpE,SAAU,kBAAkB,CAC9B,OAA8B,EAAA;IAE9B,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,OAAO;AAE5D,IAAA,IAAI,CAAC,QAAQ,CAAC,mBAAmB,EAAE;AAC/B,QAAA,OAAO,IAAI,OAAO,CAAC,OAAO,OAAO,KAAI;YACjC,MAAM,MAAM,EAAE;AACd,YAAA,OAAO,CAAC,IAAI,cAAc,CAAC,EAAE,CAAC,CAAC;AACnC,QAAA,CAAC,CAAC;IACN;;AAIA;;;AAGG;IACH,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;AAC7B,QAAA,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE;AACb,YAAA,sBAAsB,EAAE,MAAM;AACjC,SAAA,CAAC;IACN;AAEA;;;;;;AAMG;IACH,GAAG,CAAC,GAAG,CACH,gFAAgF,EAChF,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,CACvD;AAED,IAAA,GAAG,CAAC,MAAM,EAAE,CAAA;IAEZ,MAAM,UAAU,GAAG,QAAQ,CAAC,mBAAmB,CAAC,YAAW;QACvD,MAAM,MAAM,EAAE;;AAGlB,IAAA,CAAC,CAAC;AAEF,IAAA,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAK;AAC7B,QAAA,GAAG,CAAC,MAAM,EAAE,CAAA;A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/dist/es/view/utils/choose-layer-type.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/choose-layer-type.mjs deleted file mode 100644 index 36b38686..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/choose-layer-type.mjs +++ /dev/null @@ -1,12 +0,0 @@ -function chooseLayerType(valueName) { - if (valueName === "layout") - return "group"; - if (valueName === "enter" || valueName === "new") - return "new"; - if (valueName === "exit" || valueName === "old") - return "old"; - return "group"; -} - -export { chooseLayerType }; -//# sourceMappingURL=choose-layer-type.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/choose-layer-type.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/choose-layer-type.mjs.map deleted file mode 100644 index c05653f5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/choose-layer-type.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"choose-layer-type.mjs","sources":["../../../../src/view/utils/choose-layer-type.ts"],"sourcesContent":["export function chooseLayerType(\n valueName: \"layout\" | \"enter\" | \"exit\" | \"new\" | \"old\"\n): \"group\" | \"old\" | \"new\" {\n if (valueName === \"layout\") return \"group\"\n if (valueName === \"enter\" || valueName === \"new\") return \"new\"\n if (valueName === \"exit\" || valueName === \"old\") return \"old\"\n\n return \"group\"\n}\n"],"names":[],"mappings":"AAAM,SAAU,eAAe,CAC3B,SAAsD,EAAA;IAEtD,IAAI,SAAS,KAAK,QAAQ;AAAE,QAAA,OAAO,OAAO;AAC1C,IAAA,IAAI,SAAS,KAAK,OAAO,IAAI,SAAS,KAAK,KAAK;AAAE,QAAA,OAAO,KAAK;AAC9D,IAAA,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,KAAK;AAAE,QAAA,OAAO,KAAK;AAE7D,IAAA,OAAO,OAAO;AAClB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/css.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/css.mjs deleted file mode 100644 index 24f9b677..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/css.mjs +++ /dev/null @@ -1,33 +0,0 @@ -let pendingRules = {}; -let style = null; -const css = { - set: (selector, values) => { - pendingRules[selector] = values; - }, - commit: () => { - if (!style) { - style = document.createElement("style"); - style.id = "motion-view"; - } - let cssText = ""; - for (const selector in pendingRules) { - const rule = pendingRules[selector]; - cssText += `${selector} {\n`; - for (const [property, value] of Object.entries(rule)) { - cssText += ` ${property}: ${value};\n`; - } - cssText += "}\n"; - } - style.textContent = cssText; - document.head.appendChild(style); - pendingRules = {}; - }, - remove: () => { - if (style && style.parentElement) { - style.parentElement.removeChild(style); - } - }, -}; - -export { css }; -//# sourceMappingURL=css.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/css.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/css.mjs.map deleted file mode 100644 index bf16924a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/css.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"css.mjs","sources":["../../../../src/view/utils/css.ts"],"sourcesContent":["let pendingRules: Record> = {}\n\nlet style: HTMLStyleElement | null = null\n\nexport const css = {\n set: (selector: string, values: Record) => {\n pendingRules[selector] = values\n },\n\n commit: () => {\n if (!style) {\n style = document.createElement(\"style\")\n style.id = \"motion-view\"\n }\n\n let cssText = \"\"\n\n for (const selector in pendingRules) {\n const rule = pendingRules[selector]\n cssText += `${selector} {\\n`\n for (const [property, value] of Object.entries(rule)) {\n cssText += ` ${property}: ${value};\\n`\n }\n cssText += \"}\\n\"\n }\n\n style.textContent = cssText\n document.head.appendChild(style)\n\n pendingRules = {}\n },\n\n remove: () => {\n if (style && style.parentElement) {\n style.parentElement.removeChild(style)\n }\n },\n}\n"],"names":[],"mappings":"AAAA,IAAI,YAAY,GAA2C,EAAE;AAE7D,IAAI,KAAK,GAA4B,IAAI;AAElC,MAAM,GAAG,GAAG;AACf,IAAA,GAAG,EAAE,CAAC,QAAgB,EAAE,MAA8B,KAAI;AACtD,QAAA,YAAY,CAAC,QAAQ,CAAC,GAAG,MAAM;IACnC,CAAC;IAED,MAAM,EAAE,MAAK;QACT,IAAI,CAAC,KAAK,EAAE;AACR,YAAA,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AACvC,YAAA,KAAK,CAAC,EAAE,GAAG,aAAa;QAC5B;QAEA,IAAI,OAAO,GAAG,EAAE;AAEhB,QAAA,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE;AACjC,YAAA,MAAM,IAAI,GAAG,YAAY,CAAC,QAAQ,CAAC;AACnC,YAAA,OAAO,IAAI,CAAA,EAAG,QAAQ,CAAA,IAAA,CAAM;AAC5B,YAAA,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AAClD,gBAAA,OAAO,IAAI,CAAA,EAAA,EAAK,QAAQ,CAAA,EAAA,EAAK,KAAK,KAAK;YAC3C;YACA,OAAO,IAAI,KAAK;QACpB;AAEA,QAAA,KAAK,CAAC,WAAW,GAAG,OAAO;AAC3B,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;QAEhC,YAAY,GAAG,EAAE;IACrB,CAAC;IAED,MAAM,EAAE,MAAK;AACT,QAAA,IAAI,KAAK,IAAI,KAAK,CAAC,aAAa,EAAE;AAC9B,YAAA,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC;QAC1C;IACJ,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs deleted file mode 100644 index 6e6de51f..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs +++ /dev/null @@ -1,9 +0,0 @@ -function getViewAnimationLayerInfo(pseudoElement) { - const match = pseudoElement.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/); - if (!match) - return null; - return { layer: match[2], type: match[1] }; -} - -export { getViewAnimationLayerInfo }; -//# sourceMappingURL=get-layer-info.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs.map deleted file mode 100644 index 0ea661d1..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-layer-info.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get-layer-info.mjs","sources":["../../../../src/view/utils/get-layer-info.ts"],"sourcesContent":["export function getViewAnimationLayerInfo(pseudoElement: string) {\n const match = pseudoElement.match(\n /::view-transition-(old|new|group|image-pair)\\((.*?)\\)/\n )\n if (!match) return null\n\n return { layer: match[2], type: match[1] }\n}\n"],"names":[],"mappings":"AAAM,SAAU,yBAAyB,CAAC,aAAqB,EAAA;IAC3D,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAC7B,uDAAuD,CAC1D;AACD,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;AAEvB,IAAA,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE;AAC9C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs deleted file mode 100644 index 29e5abd5..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs +++ /dev/null @@ -1,13 +0,0 @@ -function filterViewAnimations(animation) { - const { effect } = animation; - if (!effect) - return false; - return (effect.target === document.documentElement && - effect.pseudoElement?.startsWith("::view-transition")); -} -function getViewAnimations() { - return document.getAnimations().filter(filterViewAnimations); -} - -export { getViewAnimations }; -//# sourceMappingURL=get-view-animations.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs.map deleted file mode 100644 index ba2cca35..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/get-view-animations.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get-view-animations.mjs","sources":["../../../../src/view/utils/get-view-animations.ts"],"sourcesContent":["function filterViewAnimations(animation: Animation) {\n const { effect } = animation\n if (!effect) return false\n\n return (\n effect.target === document.documentElement &&\n effect.pseudoElement?.startsWith(\"::view-transition\")\n )\n}\n\nexport function getViewAnimations() {\n return document.getAnimations().filter(filterViewAnimations)\n}\n"],"names":[],"mappings":"AAAA,SAAS,oBAAoB,CAAC,SAAoB,EAAA;AAC9C,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS;AAC5B,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;AAEzB,IAAA,QACI,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,eAAe;QAC1C,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,mBAAmB,CAAC;AAE7D;SAEgB,iBAAiB,GAAA;IAC7B,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC;AAChE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/has-target.mjs b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/has-target.mjs deleted file mode 100644 index ae14a102..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/has-target.mjs +++ /dev/null @@ -1,6 +0,0 @@ -function hasTarget(target, targets) { - return targets.has(target) && Object.keys(targets.get(target)).length > 0; -} - -export { hasTarget }; -//# sourceMappingURL=has-target.mjs.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/has-target.mjs.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/has-target.mjs.map deleted file mode 100644 index 4ef9574a..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/es/view/utils/has-target.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-target.mjs","sources":["../../../../src/view/utils/has-target.ts"],"sourcesContent":["import { ViewTransitionTarget, ViewTransitionTargetDefinition } from \"../types\"\n\nexport function hasTarget(\n target: ViewTransitionTargetDefinition,\n targets: Map\n) {\n return targets.has(target) && Object.keys(targets.get(target)!).length > 0\n}\n"],"names":[],"mappings":"AAEM,SAAU,SAAS,CACrB,MAAsC,EACtC,OAAkE,EAAA;IAElE,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC,CAAC,MAAM,GAAG,CAAC;AAC9E;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/index.d.ts b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/index.d.ts deleted file mode 100644 index e32283b7..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/index.d.ts +++ /dev/null @@ -1,5209 +0,0 @@ -import * as motion_utils from 'motion-utils'; -import { Point, BoundingBox, Axis, Box, TransformPoint, Easing, Delta, EasingFunction, BezierDefinition, AxisDelta, SubscriptionManager } from 'motion-utils'; - -/** - * Passed in to pan event handlers like `onPan` the `PanInfo` object contains - * information about the current state of the tap gesture such as its - * `point`, `delta`, `offset` and `velocity`. - * - * ```jsx - * { - * console.log(info.point.x, info.point.y) - * }} /> - * ``` - * - * @public - */ -interface PanInfo { - /** - * Contains `x` and `y` values for the current pan position relative - * to the device or page. - * - * ```jsx - * function onPan(event, info) { - * console.log(info.point.x, info.point.y) - * } - * - * - * ``` - * - * @public - */ - point: Point; - /** - * Contains `x` and `y` values for the distance moved since - * the last event. - * - * ```jsx - * function onPan(event, info) { - * console.log(info.delta.x, info.delta.y) - * } - * - * - * ``` - * - * @public - */ - delta: Point; - /** - * Contains `x` and `y` values for the distance moved from - * the first pan event. - * - * ```jsx - * function onPan(event, info) { - * console.log(info.offset.x, info.offset.y) - * } - * - * - * ``` - * - * @public - */ - offset: Point; - /** - * Contains `x` and `y` values for the current velocity of the pointer, in px/ms. - * - * ```jsx - * function onPan(event, info) { - * console.log(info.velocity.x, info.velocity.y) - * } - * - * - * ``` - * - * @public - */ - velocity: Point; -} -type PanHandler = (event: Event, info: PanInfo) => void; - -type DragHandler = (event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo) => void; -type DragElastic = boolean | number | Partial; -interface ResolvedConstraints { - x: Partial; - y: Partial; -} -interface ResolvedElastic { - x: Axis; - y: Axis; -} - -interface EventInfo { - point: Point; -} -/** - * A generic set of string/number values - */ -interface ResolvedValues$1 { - [key: string]: AnyResolvedKeyframe; -} -type AnimationDefinition = VariantLabels | TargetAndTransition | TargetResolver; -/** - * An object that specifies values to animate to. Each value may be set either as - * a single value, or an array of values. - * - * It may also option contain these properties: - * - * - `transition`: Specifies transitions for all or individual values. - * - `transitionEnd`: Specifies values to set when the animation finishes. - * - * ```jsx - * const target = { - * x: "0%", - * opacity: 0, - * transition: { duration: 1 }, - * transitionEnd: { display: "none" } - * } - * ``` - * - * @public - */ -type TargetAndTransition = Target & { - transition?: Transition; - transitionEnd?: ResolvedValues$1; -}; -type TargetResolver = (custom: any, current: ResolvedValues$1, velocity: ResolvedValues$1) => TargetAndTransition | string; -/** - * Either a string, or array of strings, that reference variants defined via the `variants` prop. - * @public - */ -type VariantLabels = string | string[]; -type Variant = TargetAndTransition | TargetResolver; -interface Variants { - [key: string]: Variant; -} -/** - * @deprecated - */ -type LegacyAnimationControls = { - /** - * Subscribes a component's animation controls to this. - * - * @param controls - The controls to subscribe - * @returns An unsubscribe function. - */ - subscribe(visualElement: any): () => void; - /** - * Starts an animation on all linked components. - * - * @remarks - * - * ```jsx - * controls.start("variantLabel") - * controls.start({ - * x: 0, - * transition: { duration: 1 } - * }) - * ``` - * - * @param definition - Properties or variant label to animate to - * @param transition - Optional `transition` to apply to a variant - * @returns - A `Promise` that resolves when all animations have completed. - * - * @public - */ - start(definition: AnimationDefinition, transitionOverride?: Transition): Promise; - /** - * Instantly set to a set of properties or a variant. - * - * ```jsx - * // With properties - * controls.set({ opacity: 0 }) - * - * // With variants - * controls.set("hidden") - * ``` - * - * @privateRemarks - * We could perform a similar trick to `.start` where this can be called before mount - * and we maintain a list of of pending actions that get applied on mount. But the - * expectation of `set` is that it happens synchronously and this would be difficult - * to do before any children have even attached themselves. It's also poor practise - * and we should discourage render-synchronous `.start` calls rather than lean into this. - * - * @public - */ - set(definition: AnimationDefinition): void; - /** - * Stops animations on all linked components. - * - * ```jsx - * controls.stop() - * ``` - * - * @public - */ - stop(): void; - mount(): () => void; -}; -interface MotionNodeAnimationOptions { - /** - * Properties, variant label or array of variant labels to start in. - * - * Set to `false` to initialise with the values in `animate` (disabling the mount animation) - * - * ```jsx - * // As values - * - * - * // As variant - * - * - * // Multiple variants - * - * - * // As false (disable mount animation) - * - * ``` - */ - initial?: TargetAndTransition | VariantLabels | boolean; - /** - * Values to animate to, variant label(s), or `LegacyAnimationControls`. - * - * ```jsx - * // As values - * - * - * // As variant - * - * - * // Multiple variants - * - * - * // LegacyAnimationControls - * - * ``` - */ - animate?: TargetAndTransition | VariantLabels | boolean | LegacyAnimationControls; - /** - * A target to animate to when this component is removed from the tree. - * - * This component **must** be the first animatable child of an `AnimatePresence` to enable this exit animation. - * - * This limitation exists because React doesn't allow components to defer unmounting until after - * an animation is complete. Once this limitation is fixed, the `AnimatePresence` component will be unnecessary. - * - * ```jsx - * import { AnimatePresence, motion } from 'framer-motion' - * - * export const MyComponent = ({ isVisible }) => { - * return ( - * - * {isVisible && ( - * - * )} - * - * ) - * } - * ``` - */ - exit?: TargetAndTransition | VariantLabels; - /** - * Variants allow you to define animation states and organise them by name. They allow - * you to control animations throughout a component tree by switching a single `animate` prop. - * - * Using `transition` options like `delayChildren` and `when`, you can orchestrate - * when children animations play relative to their parent. - - * - * After passing variants to one or more `motion` component's `variants` prop, these variants - * can be used in place of values on the `animate`, `initial`, `whileFocus`, `whileTap` and `whileHover` props. - * - * ```jsx - * const variants = { - * active: { - * backgroundColor: "#f00" - * }, - * inactive: { - * backgroundColor: "#fff", - * transition: { duration: 2 } - * } - * } - * - * - * ``` - */ - variants?: Variants; - /** - * Default transition. If no `transition` is defined in `animate`, it will use the transition defined here. - * ```jsx - * const spring = { - * type: "spring", - * damping: 10, - * stiffness: 100 - * } - * - * - * ``` - */ - transition?: Transition; -} -interface MotionNodeEventOptions { - /** - * Callback with latest motion values, fired max once per frame. - * - * ```jsx - * function onUpdate(latest) { - * console.log(latest.x, latest.opacity) - * } - * - * - * ``` - */ - onUpdate?(latest: ResolvedValues$1): void; - /** - * Callback when animation defined in `animate` begins. - * - * The provided callback will be called with the triggering animation definition. - * If this is a variant, it'll be the variant name, and if a target object - * then it'll be the target object. - * - * This way, it's possible to figure out which animation has started. - * - * ```jsx - * function onStart() { - * console.log("Animation started") - * } - * - * - * ``` - */ - onAnimationStart?(definition: AnimationDefinition): void; - /** - * Callback when animation defined in `animate` is complete. - * - * The provided callback will be called with the triggering animation definition. - * If this is a variant, it'll be the variant name, and if a target object - * then it'll be the target object. - * - * This way, it's possible to figure out which animation has completed. - * - * ```jsx - * function onComplete() { - * console.log("Animation completed") - * } - * - * { - * console.log('Completed animating', definition) - * }} - * /> - * ``` - */ - onAnimationComplete?(definition: AnimationDefinition): void; - onBeforeLayoutMeasure?(box: Box): void; - onLayoutMeasure?(box: Box, prevBox: Box): void; - onLayoutAnimationStart?(): void; - onLayoutAnimationComplete?(): void; -} -interface MotionNodePanHandlers { - /** - * Callback function that fires when the pan gesture is recognised on this element. - * - * **Note:** For pan gestures to work correctly with touch input, the element needs - * touch scrolling to be disabled on either x/y or both axis with the - * [touch-action](https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action) CSS rule. - * - * ```jsx - * function onPan(event, info) { - * console.log(info.point.x, info.point.y) - * } - * - * - * ``` - * - * @param event - The originating pointer event. - * @param info - A {@link PanInfo} object containing `x` and `y` values for: - * - * - `point`: Relative to the device or page. - * - `delta`: Distance moved since the last event. - * - `offset`: Offset from the original pan event. - * - `velocity`: Current velocity of the pointer. - */ - onPan?(event: PointerEvent, info: PanInfo): void; - /** - * Callback function that fires when the pan gesture begins on this element. - * - * ```jsx - * function onPanStart(event, info) { - * console.log(info.point.x, info.point.y) - * } - * - * - * ``` - * - * @param event - The originating pointer event. - * @param info - A {@link PanInfo} object containing `x`/`y` values for: - * - * - `point`: Relative to the device or page. - * - `delta`: Distance moved since the last event. - * - `offset`: Offset from the original pan event. - * - `velocity`: Current velocity of the pointer. - */ - onPanStart?(event: PointerEvent, info: PanInfo): void; - /** - * Callback function that fires when we begin detecting a pan gesture. This - * is analogous to `onMouseStart` or `onTouchStart`. - * - * ```jsx - * function onPanSessionStart(event, info) { - * console.log(info.point.x, info.point.y) - * } - * - * - * ``` - * - * @param event - The originating pointer event. - * @param info - An {@link EventInfo} object containing `x`/`y` values for: - * - * - `point`: Relative to the device or page. - */ - onPanSessionStart?(event: PointerEvent, info: EventInfo): void; - /** - * Callback function that fires when the pan gesture ends on this element. - * - * ```jsx - * function onPanEnd(event, info) { - * console.log(info.point.x, info.point.y) - * } - * - * - * ``` - * - * @param event - The originating pointer event. - * @param info - A {@link PanInfo} object containing `x`/`y` values for: - * - * - `point`: Relative to the device or page. - * - `delta`: Distance moved since the last event. - * - `offset`: Offset from the original pan event. - * - `velocity`: Current velocity of the pointer. - */ - onPanEnd?(event: PointerEvent, info: PanInfo): void; -} -interface MotionNodeHoverHandlers { - /** - * Properties or variant label to animate to while the hover gesture is recognised. - * - * ```jsx - * - * ``` - */ - whileHover?: VariantLabels | TargetAndTransition; - /** - * Callback function that fires when pointer starts hovering over the component. - * - * ```jsx - * console.log('Hover starts')} /> - * ``` - */ - onHoverStart?(event: PointerEvent, info: EventInfo): void; - /** - * Callback function that fires when pointer stops hovering over the component. - * - * ```jsx - * console.log("Hover ends")} /> - * ``` - */ - onHoverEnd?(event: PointerEvent, info: EventInfo): void; -} -/** - * Passed in to tap event handlers like `onTap` the `TapInfo` object contains - * information about the tap gesture such as it‘s location. - * - * ```jsx - * function onTap(event, info) { - * console.log(info.point.x, info.point.y) - * } - * - * - * ``` - * - * @public - */ -interface TapInfo { - /** - * Contains `x` and `y` values for the tap gesture relative to the - * device or page. - * - * ```jsx - * function onTapStart(event, info) { - * console.log(info.point.x, info.point.y) - * } - * - * - * ``` - * - * @public - */ - point: Point; -} -interface MotionNodeTapHandlers { - /** - * Callback when the tap gesture successfully ends on this element. - * - * ```jsx - * function onTap(event, info) { - * console.log(info.point.x, info.point.y) - * } - * - * - * ``` - * - * @param event - The originating pointer event. - * @param info - An {@link TapInfo} object containing `x` and `y` values for the `point` relative to the device or page. - */ - onTap?(event: MouseEvent | TouchEvent | PointerEvent, info: TapInfo): void; - /** - * Callback when the tap gesture starts on this element. - * - * ```jsx - * function onTapStart(event, info) { - * console.log(info.point.x, info.point.y) - * } - * - * - * ``` - * - * @param event - The originating pointer event. - * @param info - An {@link TapInfo} object containing `x` and `y` values for the `point` relative to the device or page. - */ - onTapStart?(event: MouseEvent | TouchEvent | PointerEvent, info: TapInfo): void; - /** - * Callback when the tap gesture ends outside this element. - * - * ```jsx - * function onTapCancel(event, info) { - * console.log(info.point.x, info.point.y) - * } - * - * - * ``` - * - * @param event - The originating pointer event. - * @param info - An {@link TapInfo} object containing `x` and `y` values for the `point` relative to the device or page. - */ - onTapCancel?(event: MouseEvent | TouchEvent | PointerEvent, info: TapInfo): void; - /** - * Properties or variant label to animate to while the component is pressed. - * - * ```jsx - * - * ``` - */ - whileTap?: VariantLabels | TargetAndTransition; - /** - * If `true`, the tap gesture will attach its start listener to window. - * - * Note: This is not supported publically. - */ - globalTapTarget?: boolean; -} -/** - * @deprecated - Use MotionNodeTapHandlers - */ -interface TapHandlers extends MotionNodeTapHandlers { -} -interface MotionNodeFocusHandlers { - /** - * Properties or variant label to animate to while the focus gesture is recognised. - * - * ```jsx - * - * ``` - */ - whileFocus?: VariantLabels | TargetAndTransition; -} -/** - * TODO: Replace with types from inView() - */ -type ViewportEventHandler = (entry: IntersectionObserverEntry | null) => void; -interface ViewportOptions { - root?: { - current: Element | null; - }; - once?: boolean; - margin?: string; - amount?: "some" | "all" | number; -} -interface MotionNodeViewportOptions { - whileInView?: VariantLabels | TargetAndTransition; - onViewportEnter?: ViewportEventHandler; - onViewportLeave?: ViewportEventHandler; - viewport?: ViewportOptions; -} -interface MotionNodeDraggableOptions { - /** - * Enable dragging for this element. Set to `false` by default. - * Set `true` to drag in both directions. - * Set `"x"` or `"y"` to only drag in a specific direction. - * - * ```jsx - * - * ``` - */ - drag?: boolean | "x" | "y"; - /** - * Properties or variant label to animate to while the drag gesture is recognised. - * - * ```jsx - * - * ``` - */ - whileDrag?: VariantLabels | TargetAndTransition; - /** - * If `true`, this will lock dragging to the initially-detected direction. Defaults to `false`. - * - * ```jsx - * - * ``` - */ - dragDirectionLock?: boolean; - /** - * Allows drag gesture propagation to child components. Set to `false` by - * default. - * - * ```jsx - * - * ``` - */ - dragPropagation?: boolean; - /** - * Applies constraints on the permitted draggable area. - * - * It can accept an object of optional `top`, `left`, `right`, and `bottom` values, measured in pixels. - * This will define a distance from the named edge of the draggable component. - * - * Alternatively, it can accept a `ref` to another component created with React's `useRef` hook. - * This `ref` should be passed both to the draggable component's `dragConstraints` prop, and the `ref` - * of the component you want to use as constraints. - * - * ```jsx - * // In pixels - * - * - * // As a ref to another component - * const MyComponent = () => { - * const constraintsRef = useRef(null) - * - * return ( - * - * - * - * ) - * } - * ``` - */ - dragConstraints?: false | Partial | { - current: Element | null; - }; - /** - * The degree of movement allowed outside constraints. 0 = no movement, 1 = - * full movement. - * - * Set to `0.5` by default. Can also be set as `false` to disable movement. - * - * By passing an object of `top`/`right`/`bottom`/`left`, individual values can be set - * per constraint. Any missing values will be set to `0`. - * - * ```jsx - * - * ``` - */ - dragElastic?: DragElastic; - /** - * Apply momentum from the pan gesture to the component when dragging - * finishes. Set to `true` by default. - * - * ```jsx - * - * ``` - */ - dragMomentum?: boolean; - /** - * Allows you to change dragging inertia parameters. - * When releasing a draggable Frame, an animation with type `inertia` starts. The animation is based on your dragging velocity. This property allows you to customize it. - * See {@link https://motion.dev/docs/react-motion-component#dragtransition | Inertia} for all properties you can use. - * - * ```jsx - * - * ``` - */ - dragTransition?: InertiaOptions; - /** - * Usually, dragging is initiated by pressing down on a component and moving it. For some - * use-cases, for instance clicking at an arbitrary point on a video scrubber, we - * might want to initiate dragging from a different component than the draggable one. - * - * By creating a `dragControls` using the `useDragControls` hook, we can pass this into - * the draggable component's `dragControls` prop. It exposes a `start` method - * that can start dragging from pointer events on other components. - * - * ```jsx - * const dragControls = useDragControls() - * - * function startDrag(event) { - * dragControls.start(event, { snapToCursor: true }) - * } - * - * return ( - * <> - *
- * - * - * ) - * ``` - */ - dragControls?: any; - /** - * If `true`, element will snap back to its origin when dragging ends. - * Set to `"x"` or `"y"` to only snap back on a specific axis. - * - * Enabling this is the equivalent of setting all `dragConstraints` axes to `0` - * with `dragElastic={1}`, but when used together `dragConstraints` can define - * a wider draggable area and `dragSnapToOrigin` will ensure the element - * animates back to its origin on release. - */ - dragSnapToOrigin?: boolean | "x" | "y"; - /** - * By default, if `drag` is defined on a component then an event listener will be attached - * to automatically initiate dragging when a user presses down on it. - * - * By setting `dragListener` to `false`, this event listener will not be created. - * - * ```jsx - * const dragControls = useDragControls() - * - * function startDrag(event) { - * dragControls.start(event, { snapToCursor: true }) - * } - * - * return ( - * <> - *
- * - * - * ) - * ``` - */ - dragListener?: boolean; - /** - * If `dragConstraints` is set to a React ref, this callback will call with the measured drag constraints. - * - * @public - */ - onMeasureDragConstraints?: (constraints: BoundingBox) => BoundingBox | void; - /** - * Usually, dragging uses the layout project engine, and applies transforms to the underlying VisualElement. - * Passing MotionValues as _dragX and _dragY instead applies drag updates to these motion values. - * This allows you to manually control how updates from a drag gesture on an element is applied. - * - * @public - */ - _dragX?: MotionValue; - /** - * Usually, dragging uses the layout project engine, and applies transforms to the underlying VisualElement. - * Passing MotionValues as _dragX and _dragY instead applies drag updates to these motion values. - * This allows you to manually control how updates from a drag gesture on an element is applied. - * - * @public - */ - _dragY?: MotionValue; -} -interface MotionNodeDragHandlers { - /** - * Callback function that fires when dragging starts. - * - * ```jsx - * console.log(info.point.x, info.point.y) - * } - * /> - * ``` - * - * @public - */ - onDragStart?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void; - /** - * Callback function that fires when dragging ends. - * - * ```jsx - * console.log(info.point.x, info.point.y) - * } - * /> - * ``` - * - * @public - */ - onDragEnd?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void; - /** - * Callback function that fires when the component is dragged. - * - * ```jsx - * console.log(info.point.x, info.point.y) - * } - * /> - * ``` - * - * @public - */ - onDrag?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void; - /** - * Callback function that fires a drag direction is determined. - * - * ```jsx - * console.log(axis)} - * /> - * ``` - * - * @public - */ - onDirectionLock?(axis: "x" | "y"): void; - /** - * Callback function that fires when drag momentum/bounce transition finishes. - * - * ```jsx - * console.log('Drag transition complete')} - * /> - * ``` - * - * @public - */ - onDragTransitionEnd?(): void; -} -interface MotionNodeLayoutOptions { - /** - * If `true`, this component will automatically animate to its new position when - * its layout changes. - * - * ```jsx - * - * ``` - * - * This will perform a layout animation using performant transforms. Part of this technique - * involved animating an element's scale. This can introduce visual distortions on children, - * `boxShadow` and `borderRadius`. - * - * To correct distortion on immediate children, add `layout` to those too. - * - * `boxShadow` and `borderRadius` will automatically be corrected if they are already being - * animated on this component. Otherwise, set them directly via the `initial` prop. - * - * If `layout` is set to `"position"`, the size of the component will change instantly and - * only its position will animate. - * - * If `layout` is set to `"size"`, the position of the component will change instantly and - * only its size will animate. - * - * If `layout` is set to `"preserve-aspect"`, the component will animate size & position if - * the aspect ratio remains the same between renders, and just position if the ratio changes. - * - * @public - */ - layout?: boolean | "position" | "size" | "preserve-aspect" | "x" | "y"; - /** - * Enable shared layout transitions between different components with the same `layoutId`. - * - * When a component with a layoutId is removed from the React tree, and then - * added elsewhere, it will visually animate from the previous component's bounding box - * and its latest animated values. - * - * ```jsx - * {items.map(item => ( - * - * {item.name} - * {item.isSelected && } - * - * ))} - * ``` - * - * If the previous component remains in the tree it will crossfade with the new component. - * - * @public - */ - layoutId?: string; - /** - * A callback that will fire when a layout animation on this component starts. - * - * @public - */ - onLayoutAnimationStart?(): void; - /** - * A callback that will fire when a layout animation on this component completes. - * - * @public - */ - onLayoutAnimationComplete?(): void; - /** - * @public - */ - layoutDependency?: any; - /** - * Whether a projection node should measure its scroll when it or its descendants update their layout. - * - * @public - */ - layoutScroll?: boolean; - /** - * Whether an element should be considered a "layout root", where - * all children will be forced to resolve relatively to it. - * Currently used for `position: sticky` elements in Framer. - */ - layoutRoot?: boolean; - /** - * The anchor point for relative layout projection. This defines which - * point on the parent is used as the reference for the child's position. - * - * `{ x: 0, y: 0 }` (default) anchors to the top-left corner. - * `{ x: 0.5, y: 0.5 }` anchors to the center, useful for centered layouts - * (e.g., flexbox) to prevent drift during parent layout animations. - * `false` disables relative projection entirely. - */ - layoutAnchor?: { - x: number; - y: number; - } | false; - /** - * Attached to a portal root to ensure we attach the child to the document root and don't - * perform scale correction on it. - */ - "data-framer-portal-id"?: string; - /** - * By default, shared layout elements will crossfade. By setting this - * to `false`, this element will take its default opacity throughout the animation. - */ - layoutCrossfade?: boolean; -} -/** - * @deprecated - Use MotionNodeDragHandlers/MotionNodeDraggableOptions - */ -interface DraggableProps extends MotionNodeDragHandlers, MotionNodeDraggableOptions { -} -type TransformTemplate = (transform: TransformProperties, generatedTransform: string) => string; -interface MotionNodeAdvancedOptions { - /** - * Custom data to use to resolve dynamic variants differently for each animating component. - * - * ```jsx - * const variants = { - * visible: (custom) => ({ - * opacity: 1, - * transition: { delay: custom * 0.2 } - * }) - * } - * - * - * - * - * ``` - * - * @public - */ - custom?: any; - /** - * @public - * Set to `false` to prevent inheriting variant changes from its parent. - */ - inherit?: boolean; - /** - * @public - * Set to `false` to prevent throwing an error when a `motion` component is used within a `LazyMotion` set to strict. - */ - ignoreStrict?: boolean; - /** - * Provide a set of motion values to perform animations on. - */ - values?: { - [key: string]: MotionValue | MotionValue; - }; - /** - * By default, Motion generates a `transform` property with a sensible transform order. `transformTemplate` - * can be used to create a different order, or to append/preprend the automatically generated `transform` property. - * - * ```jsx - * `rotate(${rotate}deg) translateX(${x}px)` - * } - * /> - * ``` - * - * @param transform - The latest animated transform props. - * @param generatedTransform - The transform string as automatically generated by Motion - * - * @public - */ - transformTemplate?: TransformTemplate; - "data-framer-appear-id"?: string; -} -interface PropagateOptions { - /** - * If `false`, this element's tap gesture will prevent any parent - * element's tap gesture handlers (`onTap`, `onTapStart`, `whileTap`) - * from firing. Defaults to `true`. - */ - tap?: boolean; -} -interface MotionNodeOptions extends MotionNodeAnimationOptions, MotionNodeEventOptions, MotionNodePanHandlers, MotionNodeTapHandlers, MotionNodeHoverHandlers, MotionNodeFocusHandlers, MotionNodeViewportOptions, MotionNodeDragHandlers, MotionNodeDraggableOptions, MotionNodeLayoutOptions, MotionNodeAdvancedOptions { - /** - * Controls whether gesture events propagate to parent motion components. - * By default all gestures propagate. Set individual gestures to `false` - * to prevent parent handlers from firing. - * - * ```jsx - * - * - * - * ``` - */ - propagate?: PropagateOptions; -} - -/** - * @public - */ -interface PresenceContextProps { - id: string; - isPresent: boolean; - register: (id: string | number) => () => void; - onExitComplete?: (id: string | number) => void; - initial?: false | VariantLabels; - custom?: any; -} -/** - * @public - */ -type ReducedMotionConfig = "always" | "never" | "user"; -/** - * @public - */ -interface MotionConfigContextProps { - /** - * Internal, exported only for usage in Framer - */ - transformPagePoint: TransformPoint; - /** - * Internal. Determines whether this is a static context ie the Framer canvas. If so, - * it'll disable all dynamic functionality. - */ - isStatic: boolean; - /** - * Defines a new default transition for the entire tree. - * - * @public - */ - transition?: Transition; - /** - * If true, will respect the device prefersReducedMotion setting by switching - * transform animations off. - * - * @public - */ - reducedMotion?: ReducedMotionConfig; - /** - * A custom `nonce` attribute used when wanting to enforce a Content Security Policy (CSP). - * For more details see: - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles - * - * @public - */ - nonce?: string; - /** - * If true, all animations will be skipped and values will be set instantly. - * Useful for E2E tests and visual regression testing. - * - * @public - */ - skipAnimations?: boolean; -} -interface VisualState<_Instance, RenderState> { - latestValues: ResolvedValues$1; - renderState: RenderState; -} -interface VisualElementOptions { - visualState: VisualState; - parent?: any; - variantParent?: any; - presenceContext: PresenceContextProps | null; - props: MotionNodeOptions; - blockInitialAnimation?: boolean; - reducedMotionConfig?: ReducedMotionConfig; - /** - * If true, all animations will be skipped and values will be set instantly. - * Useful for E2E tests and visual regression testing. - */ - skipAnimations?: boolean; - /** - * Explicit override for SVG detection. When true, uses SVG rendering; - * when false, uses HTML rendering. If undefined, auto-detects. - */ - isSVG?: boolean; -} -interface VisualElementEventCallbacks { - BeforeLayoutMeasure: () => void; - LayoutMeasure: (layout: Box, prevLayout?: Box) => void; - LayoutUpdate: (layout: Axis, prevLayout: Axis) => void; - Update: (latest: ResolvedValues$1) => void; - AnimationStart: (definition: AnimationDefinition) => void; - AnimationComplete: (definition: AnimationDefinition) => void; - LayoutAnimationStart: () => void; - LayoutAnimationComplete: () => void; - SetAxisTarget: () => void; - Unmount: () => void; -} -interface LayoutLifecycles { - onBeforeLayoutMeasure?(box: Box): void; - onLayoutMeasure?(box: Box, prevBox: Box): void; -} -type ScrapeMotionValuesFromProps = (props: MotionNodeOptions, prevProps: MotionNodeOptions, visualElement?: any) => { - [key: string]: MotionValue | AnyResolvedKeyframe; -}; -type UseRenderState = () => RenderState; -/** - * Animation type for variant state management - */ -type AnimationType = "animate" | "whileHover" | "whileTap" | "whileDrag" | "whileFocus" | "whileInView" | "exit"; -interface FeatureClass { - new (props: Props): any; -} -interface FeatureDefinition { - isEnabled: (props: MotionNodeOptions) => boolean; - Feature?: FeatureClass; - ProjectionNode?: any; - MeasureLayout?: any; -} -type FeatureDefinitions = { - animation?: FeatureDefinition; - exit?: FeatureDefinition; - drag?: FeatureDefinition; - tap?: FeatureDefinition; - focus?: FeatureDefinition; - hover?: FeatureDefinition; - pan?: FeatureDefinition; - inView?: FeatureDefinition; - layout?: FeatureDefinition; -}; - -interface TransformOrigin { - originX?: number | string; - originY?: number | string; - originZ?: number | string; -} -interface HTMLRenderState { - /** - * A mutable record of transforms we want to apply directly to the rendered Element - * every frame. We use a mutable data structure to reduce GC during animations. - */ - transform: ResolvedValues$1; - /** - * A mutable record of transform origins we want to apply directly to the rendered Element - * every frame. We use a mutable data structure to reduce GC during animations. - */ - transformOrigin: TransformOrigin; - /** - * A mutable record of styles we want to apply directly to the rendered Element - * every frame. We use a mutable data structure to reduce GC during animations. - */ - style: ResolvedValues$1; - /** - * A mutable record of CSS variables we want to apply directly to the rendered Element - * every frame. We use a mutable data structure to reduce GC during animations. - */ - vars: ResolvedValues$1; -} - -interface SVGRenderState extends HTMLRenderState { - /** - * A mutable record of attributes we want to apply directly to the rendered Element - * every frame. We use a mutable data structure to reduce GC during animations. - */ - attrs: ResolvedValues$1; -} -interface SVGAttributes { - accentHeight?: AnyResolvedKeyframe | undefined; - accumulate?: "none" | "sum" | undefined; - additive?: "replace" | "sum" | undefined; - alignmentBaseline?: "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit" | undefined; - allowReorder?: "no" | "yes" | undefined; - alphabetic?: AnyResolvedKeyframe | undefined; - amplitude?: AnyResolvedKeyframe | undefined; - arabicForm?: "initial" | "medial" | "terminal" | "isolated" | undefined; - ascent?: AnyResolvedKeyframe | undefined; - attributeName?: string | undefined; - attributeType?: string | undefined; - autoReverse?: boolean | undefined; - azimuth?: AnyResolvedKeyframe | undefined; - baseFrequency?: AnyResolvedKeyframe | undefined; - baselineShift?: AnyResolvedKeyframe | undefined; - baseProfile?: AnyResolvedKeyframe | undefined; - bbox?: AnyResolvedKeyframe | undefined; - begin?: AnyResolvedKeyframe | undefined; - bias?: AnyResolvedKeyframe | undefined; - by?: AnyResolvedKeyframe | undefined; - calcMode?: AnyResolvedKeyframe | undefined; - capHeight?: AnyResolvedKeyframe | undefined; - clip?: AnyResolvedKeyframe | undefined; - clipPath?: string | undefined; - clipPathUnits?: AnyResolvedKeyframe | undefined; - clipRule?: AnyResolvedKeyframe | undefined; - colorInterpolation?: AnyResolvedKeyframe | undefined; - colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit" | undefined; - colorProfile?: AnyResolvedKeyframe | undefined; - colorRendering?: AnyResolvedKeyframe | undefined; - contentScriptType?: AnyResolvedKeyframe | undefined; - contentStyleType?: AnyResolvedKeyframe | undefined; - cursor?: AnyResolvedKeyframe | undefined; - cx?: AnyResolvedKeyframe | undefined; - cy?: AnyResolvedKeyframe | undefined; - d?: string | undefined; - decelerate?: AnyResolvedKeyframe | undefined; - descent?: AnyResolvedKeyframe | undefined; - diffuseConstant?: AnyResolvedKeyframe | undefined; - direction?: AnyResolvedKeyframe | undefined; - display?: AnyResolvedKeyframe | undefined; - divisor?: AnyResolvedKeyframe | undefined; - dominantBaseline?: AnyResolvedKeyframe | undefined; - dur?: AnyResolvedKeyframe | undefined; - dx?: AnyResolvedKeyframe | undefined; - dy?: AnyResolvedKeyframe | undefined; - edgeMode?: AnyResolvedKeyframe | undefined; - elevation?: AnyResolvedKeyframe | undefined; - enableBackground?: AnyResolvedKeyframe | undefined; - end?: AnyResolvedKeyframe | undefined; - exponent?: AnyResolvedKeyframe | undefined; - externalResourcesRequired?: boolean | undefined; - fill?: string | undefined; - fillOpacity?: AnyResolvedKeyframe | undefined; - fillRule?: "nonzero" | "evenodd" | "inherit" | undefined; - filter?: string | undefined; - filterRes?: AnyResolvedKeyframe | undefined; - filterUnits?: AnyResolvedKeyframe | undefined; - floodColor?: AnyResolvedKeyframe | undefined; - floodOpacity?: AnyResolvedKeyframe | undefined; - focusable?: boolean | "auto" | undefined; - fontFamily?: string | undefined; - fontSize?: AnyResolvedKeyframe | undefined; - fontSizeAdjust?: AnyResolvedKeyframe | undefined; - fontStretch?: AnyResolvedKeyframe | undefined; - fontStyle?: AnyResolvedKeyframe | undefined; - fontVariant?: AnyResolvedKeyframe | undefined; - fontWeight?: AnyResolvedKeyframe | undefined; - format?: AnyResolvedKeyframe | undefined; - fr?: AnyResolvedKeyframe | undefined; - from?: AnyResolvedKeyframe | undefined; - fx?: AnyResolvedKeyframe | undefined; - fy?: AnyResolvedKeyframe | undefined; - g1?: AnyResolvedKeyframe | undefined; - g2?: AnyResolvedKeyframe | undefined; - glyphName?: AnyResolvedKeyframe | undefined; - glyphOrientationHorizontal?: AnyResolvedKeyframe | undefined; - glyphOrientationVertical?: AnyResolvedKeyframe | undefined; - glyphRef?: AnyResolvedKeyframe | undefined; - gradientTransform?: string | undefined; - gradientUnits?: string | undefined; - hanging?: AnyResolvedKeyframe | undefined; - horizAdvX?: AnyResolvedKeyframe | undefined; - horizOriginX?: AnyResolvedKeyframe | undefined; - href?: string | undefined; - ideographic?: AnyResolvedKeyframe | undefined; - imageRendering?: AnyResolvedKeyframe | undefined; - in2?: AnyResolvedKeyframe | undefined; - in?: string | undefined; - intercept?: AnyResolvedKeyframe | undefined; - k1?: AnyResolvedKeyframe | undefined; - k2?: AnyResolvedKeyframe | undefined; - k3?: AnyResolvedKeyframe | undefined; - k4?: AnyResolvedKeyframe | undefined; - k?: AnyResolvedKeyframe | undefined; - kernelMatrix?: AnyResolvedKeyframe | undefined; - kernelUnitLength?: AnyResolvedKeyframe | undefined; - kerning?: AnyResolvedKeyframe | undefined; - keyPoints?: AnyResolvedKeyframe | undefined; - keySplines?: AnyResolvedKeyframe | undefined; - keyTimes?: AnyResolvedKeyframe | undefined; - lengthAdjust?: AnyResolvedKeyframe | undefined; - letterSpacing?: AnyResolvedKeyframe | undefined; - lightingColor?: AnyResolvedKeyframe | undefined; - limitingConeAngle?: AnyResolvedKeyframe | undefined; - local?: AnyResolvedKeyframe | undefined; - markerEnd?: string | undefined; - markerHeight?: AnyResolvedKeyframe | undefined; - markerMid?: string | undefined; - markerStart?: string | undefined; - markerUnits?: AnyResolvedKeyframe | undefined; - markerWidth?: AnyResolvedKeyframe | undefined; - mask?: string | undefined; - maskContentUnits?: AnyResolvedKeyframe | undefined; - maskUnits?: AnyResolvedKeyframe | undefined; - mathematical?: AnyResolvedKeyframe | undefined; - mode?: AnyResolvedKeyframe | undefined; - numOctaves?: AnyResolvedKeyframe | undefined; - offset?: AnyResolvedKeyframe | undefined; - opacity?: AnyResolvedKeyframe | undefined; - operator?: AnyResolvedKeyframe | undefined; - order?: AnyResolvedKeyframe | undefined; - orient?: AnyResolvedKeyframe | undefined; - orientation?: AnyResolvedKeyframe | undefined; - origin?: AnyResolvedKeyframe | undefined; - overflow?: AnyResolvedKeyframe | undefined; - overlinePosition?: AnyResolvedKeyframe | undefined; - overlineThickness?: AnyResolvedKeyframe | undefined; - paintOrder?: AnyResolvedKeyframe | undefined; - panose1?: AnyResolvedKeyframe | undefined; - path?: string | undefined; - pathLength?: AnyResolvedKeyframe | undefined; - patternContentUnits?: string | undefined; - patternTransform?: AnyResolvedKeyframe | undefined; - patternUnits?: string | undefined; - pointerEvents?: AnyResolvedKeyframe | undefined; - points?: string | undefined; - pointsAtX?: AnyResolvedKeyframe | undefined; - pointsAtY?: AnyResolvedKeyframe | undefined; - pointsAtZ?: AnyResolvedKeyframe | undefined; - preserveAlpha?: boolean | undefined; - preserveAspectRatio?: string | undefined; - primitiveUnits?: AnyResolvedKeyframe | undefined; - r?: AnyResolvedKeyframe | undefined; - radius?: AnyResolvedKeyframe | undefined; - refX?: AnyResolvedKeyframe | undefined; - refY?: AnyResolvedKeyframe | undefined; - renderingIntent?: AnyResolvedKeyframe | undefined; - repeatCount?: AnyResolvedKeyframe | undefined; - repeatDur?: AnyResolvedKeyframe | undefined; - requiredExtensions?: AnyResolvedKeyframe | undefined; - requiredFeatures?: AnyResolvedKeyframe | undefined; - restart?: AnyResolvedKeyframe | undefined; - result?: string | undefined; - rotate?: AnyResolvedKeyframe | undefined; - rx?: AnyResolvedKeyframe | undefined; - ry?: AnyResolvedKeyframe | undefined; - scale?: AnyResolvedKeyframe | undefined; - seed?: AnyResolvedKeyframe | undefined; - shapeRendering?: AnyResolvedKeyframe | undefined; - slope?: AnyResolvedKeyframe | undefined; - spacing?: AnyResolvedKeyframe | undefined; - specularConstant?: AnyResolvedKeyframe | undefined; - specularExponent?: AnyResolvedKeyframe | undefined; - speed?: AnyResolvedKeyframe | undefined; - spreadMethod?: string | undefined; - startOffset?: AnyResolvedKeyframe | undefined; - stdDeviation?: AnyResolvedKeyframe | undefined; - stemh?: AnyResolvedKeyframe | undefined; - stemv?: AnyResolvedKeyframe | undefined; - stitchTiles?: AnyResolvedKeyframe | undefined; - stopColor?: string | undefined; - stopOpacity?: AnyResolvedKeyframe | undefined; - strikethroughPosition?: AnyResolvedKeyframe | undefined; - strikethroughThickness?: AnyResolvedKeyframe | undefined; - string?: AnyResolvedKeyframe | undefined; - stroke?: string | undefined; - strokeDasharray?: AnyResolvedKeyframe | undefined; - strokeDashoffset?: AnyResolvedKeyframe | undefined; - strokeLinecap?: "butt" | "round" | "square" | "inherit" | undefined; - strokeLinejoin?: "miter" | "round" | "bevel" | "inherit" | undefined; - strokeMiterlimit?: AnyResolvedKeyframe | undefined; - strokeOpacity?: AnyResolvedKeyframe | undefined; - strokeWidth?: AnyResolvedKeyframe | undefined; - surfaceScale?: AnyResolvedKeyframe | undefined; - systemLanguage?: AnyResolvedKeyframe | undefined; - tableValues?: AnyResolvedKeyframe | undefined; - targetX?: AnyResolvedKeyframe | undefined; - targetY?: AnyResolvedKeyframe | undefined; - textAnchor?: string | undefined; - textDecoration?: AnyResolvedKeyframe | undefined; - textLength?: AnyResolvedKeyframe | undefined; - textRendering?: AnyResolvedKeyframe | undefined; - to?: AnyResolvedKeyframe | undefined; - transform?: string | undefined; - u1?: AnyResolvedKeyframe | undefined; - u2?: AnyResolvedKeyframe | undefined; - underlinePosition?: AnyResolvedKeyframe | undefined; - underlineThickness?: AnyResolvedKeyframe | undefined; - unicode?: AnyResolvedKeyframe | undefined; - unicodeBidi?: AnyResolvedKeyframe | undefined; - unicodeRange?: AnyResolvedKeyframe | undefined; - unitsPerEm?: AnyResolvedKeyframe | undefined; - vAlphabetic?: AnyResolvedKeyframe | undefined; - values?: string | undefined; - vectorEffect?: AnyResolvedKeyframe | undefined; - version?: string | undefined; - vertAdvY?: AnyResolvedKeyframe | undefined; - vertOriginX?: AnyResolvedKeyframe | undefined; - vertOriginY?: AnyResolvedKeyframe | undefined; - vHanging?: AnyResolvedKeyframe | undefined; - vIdeographic?: AnyResolvedKeyframe | undefined; - viewBox?: string | undefined; - viewTarget?: AnyResolvedKeyframe | undefined; - visibility?: AnyResolvedKeyframe | undefined; - vMathematical?: AnyResolvedKeyframe | undefined; - widths?: AnyResolvedKeyframe | undefined; - wordSpacing?: AnyResolvedKeyframe | undefined; - writingMode?: AnyResolvedKeyframe | undefined; - x1?: AnyResolvedKeyframe | undefined; - x2?: AnyResolvedKeyframe | undefined; - x?: AnyResolvedKeyframe | undefined; - xChannelSelector?: string | undefined; - xHeight?: AnyResolvedKeyframe | undefined; - xlinkActuate?: string | undefined; - xlinkArcrole?: string | undefined; - xlinkHref?: string | undefined; - xlinkRole?: string | undefined; - xlinkShow?: string | undefined; - xlinkTitle?: string | undefined; - xlinkType?: string | undefined; - xmlBase?: string | undefined; - xmlLang?: string | undefined; - xmlns?: string | undefined; - xmlnsXlink?: string | undefined; - xmlSpace?: string | undefined; - y1?: AnyResolvedKeyframe | undefined; - y2?: AnyResolvedKeyframe | undefined; - y?: AnyResolvedKeyframe | undefined; - yChannelSelector?: string | undefined; - z?: AnyResolvedKeyframe | undefined; - zoomAndPan?: string | undefined; -} - -interface VisualElementAnimationOptions { - delay?: number; - transitionOverride?: Transition; - custom?: any; - type?: AnimationType; -} - -interface AnimationState$1 { - animateChanges: (type?: AnimationType) => Promise; - setActive: (type: AnimationType, isActive: boolean, options?: VisualElementAnimationOptions) => Promise; - setAnimateFunction: (fn: any) => void; - getState: () => { - [key: string]: AnimationTypeState; - }; - reset: () => void; -} -type AnimationList = string[] | TargetAndTransition[]; -declare function createAnimationState(visualElement: any): AnimationState$1; -declare function checkVariantsDidChange(prev: any, next: any): boolean; -interface AnimationTypeState { - isActive: boolean; - protectedKeys: { - [key: string]: true; - }; - needsAnimating: { - [key: string]: boolean; - }; - prevResolvedValues: { - [key: string]: any; - }; - prevProp?: VariantLabels | TargetAndTransition; -} - -/** - * Set feature definitions for all VisualElements. - * This should be called by the framework layer (e.g., framer-motion) during initialization. - */ -declare function setFeatureDefinitions(definitions: Partial): void; -/** - * Get the current feature definitions - */ -declare function getFeatureDefinitions(): Partial; -/** - * Motion style type - a subset of CSS properties that can contain motion values - */ -type MotionStyle = { - [K: string]: AnyResolvedKeyframe | MotionValue | undefined; -}; -/** - * A VisualElement is an imperative abstraction around UI elements such as - * HTMLElement, SVGElement, Three.Object3D etc. - */ -declare abstract class VisualElement { - /** - * VisualElements are arranged in trees mirroring that of the React tree. - * Each type of VisualElement has a unique name, to detect when we're crossing - * type boundaries within that tree. - */ - abstract type: string; - /** - * An `Array.sort` compatible function that will compare two Instances and - * compare their respective positions within the tree. - */ - abstract sortInstanceNodePosition(a: Instance, b: Instance): number; - /** - * Measure the viewport-relative bounding box of the Instance. - */ - abstract measureInstanceViewportBox(instance: Instance, props: MotionNodeOptions & Partial): Box; - /** - * When a value has been removed from all animation props we need to - * pick a target to animate back to. For instance, for HTMLElements - * we can look in the style prop. - */ - abstract getBaseTargetFromProps(props: MotionNodeOptions, key: string): AnyResolvedKeyframe | undefined | MotionValue; - /** - * When we first animate to a value we need to animate it *from* a value. - * Often this have been specified via the initial prop but it might be - * that the value needs to be read from the Instance. - */ - abstract readValueFromInstance(instance: Instance, key: string, options: Options): AnyResolvedKeyframe | null | undefined; - /** - * When a value has been removed from the VisualElement we use this to remove - * it from the inherting class' unique render state. - */ - abstract removeValueFromRenderState(key: string, renderState: RenderState): void; - /** - * Run before a React or VisualElement render, builds the latest motion - * values into an Instance-specific format. For example, HTMLVisualElement - * will use this step to build `style` and `var` values. - */ - abstract build(renderState: RenderState, latestValues: ResolvedValues$1, props: MotionNodeOptions): void; - /** - * Apply the built values to the Instance. For example, HTMLElements will have - * styles applied via `setProperty` and the style attribute, whereas SVGElements - * will have values applied to attributes. - */ - abstract renderInstance(instance: Instance, renderState: RenderState, styleProp?: MotionStyle, projection?: any): void; - /** - * This method is called when a transform property is bound to a motion value. - * It's currently used to measure SVG elements when a new transform property is bound. - */ - onBindTransform?(): void; - /** - * If the component child is provided as a motion value, handle subscriptions - * with the renderer-specific VisualElement. - */ - handleChildMotionValue?(): void; - /** - * This method takes React props and returns found MotionValues. For example, HTML - * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays. - * - * This isn't an abstract method as it needs calling in the constructor, but it is - * intended to be one. - */ - scrapeMotionValuesFromProps(_props: MotionNodeOptions, _prevProps: MotionNodeOptions, _visualElement: VisualElement): { - [key: string]: MotionValue | AnyResolvedKeyframe; - }; - /** - * A reference to the current underlying Instance, e.g. a HTMLElement - * or Three.Mesh etc. - */ - current: Instance | null; - /** - * A reference to the parent VisualElement (if exists). - */ - parent: VisualElement | undefined; - /** - * A set containing references to this VisualElement's children. - */ - children: Set>; - /** - * A set containing the latest children of this VisualElement. This is flushed - * at the start of every commit. We use it to calculate the stagger delay - * for newly-added children. - */ - enteringChildren?: Set; - /** - * The depth of this VisualElement within the overall VisualElement tree. - */ - depth: number; - /** - * The current render state of this VisualElement. Defined by inherting VisualElements. - */ - renderState: RenderState; - /** - * An object containing the latest static values for each of this VisualElement's - * MotionValues. - */ - latestValues: ResolvedValues$1; - /** - * Determine what role this visual element should take in the variant tree. - */ - isVariantNode: boolean; - isControllingVariants: boolean; - /** - * If this component is part of the variant tree, it should track - * any children that are also part of the tree. This is essentially - * a shadow tree to simplify logic around how to stagger over children. - */ - variantChildren?: Set; - /** - * Decides whether this VisualElement should animate in reduced motion - * mode. - * - * TODO: This is currently set on every individual VisualElement but feels - * like it could be set globally. - */ - shouldReduceMotion: boolean | null; - /** - * Decides whether animations should be skipped for this VisualElement. - * Useful for E2E tests and visual regression testing. - */ - shouldSkipAnimations: boolean; - /** - * Normally, if a component is controlled by a parent's variants, it can - * rely on that ancestor to trigger animations further down the tree. - * However, if a component is created after its parent is mounted, the parent - * won't trigger that mount animation so the child needs to. - * - * TODO: This might be better replaced with a method isParentMounted - */ - manuallyAnimateOnMount: boolean; - /** - * This can be set by AnimatePresence to force components that mount - * at the same time as it to mount as if they have initial={false} set. - */ - blockInitialAnimation: boolean; - /** - * A reference to this VisualElement's projection node, used in layout animations. - */ - projection?: any; - /** - * A map of all motion values attached to this visual element. Motion - * values are source of truth for any given animated value. A motion - * value might be provided externally by the component via props. - */ - values: Map>; - /** - * The AnimationState, this is hydrated by the animation Feature. - */ - animationState?: AnimationState$1; - KeyframeResolver: typeof KeyframeResolver; - /** - * The options used to create this VisualElement. The Options type is defined - * by the inheriting VisualElement and is passed straight through to the render functions. - */ - readonly options: Options; - /** - * A reference to the latest props provided to the VisualElement's host React component. - */ - props: MotionNodeOptions; - prevProps?: MotionNodeOptions; - presenceContext: PresenceContextProps | null; - prevPresenceContext?: PresenceContextProps | null; - /** - * Cleanup functions for active features (hover/tap/exit etc) - */ - private features; - /** - * A map of every subscription that binds the provided or generated - * motion values onChange listeners to this visual element. - */ - private valueSubscriptions; - /** - * A reference to the ReducedMotionConfig passed to the VisualElement's host React component. - */ - private reducedMotionConfig; - /** - * A reference to the skipAnimations config passed to the VisualElement's host React component. - */ - private skipAnimationsConfig; - /** - * On mount, this will be hydrated with a callback to disconnect - * this visual element from its parent on unmount. - */ - private removeFromVariantTree; - /** - * A reference to the previously-provided motion values as returned - * from scrapeMotionValuesFromProps. We use the keys in here to determine - * if any motion values need to be removed after props are updated. - */ - private prevMotionValues; - /** - * When values are removed from all animation props we need to search - * for a fallback value to animate to. These values are tracked in baseTarget. - */ - private baseTarget; - /** - * Create an object of the values we initially animated from (if initial prop present). - */ - private initialValues; - /** - * Track whether this element has been mounted before, to detect - * remounts after Suspense unmount/remount cycles. - */ - private hasBeenMounted; - /** - * An object containing a SubscriptionManager for each active event. - */ - private events; - /** - * An object containing an unsubscribe function for each prop event subscription. - * For example, every "Update" event can have multiple subscribers via - * VisualElement.on(), but only one of those can be defined via the onUpdate prop. - */ - private propEventSubscriptions; - constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }: VisualElementOptions, options?: Options); - mount(instance: Instance): void; - unmount(): void; - addChild(child: VisualElement): void; - removeChild(child: VisualElement): void; - private bindToMotionValue; - sortNodePosition(other: VisualElement): number; - updateFeatures(): void; - notifyUpdate: () => void; - triggerBuild(): void; - render: () => void; - private renderScheduledAt; - scheduleRender: () => void; - /** - * Measure the current viewport box with or without transforms. - * Only measures axis-aligned boxes, rotate and skew must be manually - * removed with a re-render to work. - */ - measureViewportBox(): Box; - getStaticValue(key: string): AnyResolvedKeyframe; - setStaticValue(key: string, value: AnyResolvedKeyframe): void; - /** - * Update the provided props. Ensure any newly-added motion values are - * added to our map, old ones removed, and listeners updated. - */ - update(props: MotionNodeOptions, presenceContext: PresenceContextProps | null): void; - getProps(): MotionNodeOptions; - /** - * Returns the variant definition with a given name. - */ - getVariant(name: string): Variant | undefined; - /** - * Returns the defined default transition on this component. - */ - getDefaultTransition(): Transition | undefined; - getTransformPagePoint(): any; - getClosestVariantNode(): VisualElement | undefined; - /** - * Add a child visual element to our set of children. - */ - addVariantChild(child: VisualElement): (() => boolean) | undefined; - /** - * Add a motion value and bind it to this visual element. - */ - addValue(key: string, value: MotionValue): void; - /** - * Remove a motion value and unbind any active subscriptions. - */ - removeValue(key: string): void; - /** - * Check whether we have a motion value for this key - */ - hasValue(key: string): boolean; - /** - * Get a motion value for this key. If called with a default - * value, we'll create one if none exists. - */ - getValue(key: string): MotionValue | undefined; - getValue(key: string, defaultValue: AnyResolvedKeyframe | null): MotionValue; - /** - * If we're trying to animate to a previously unencountered value, - * we need to check for it in our state and as a last resort read it - * directly from the instance (which might have performance implications). - */ - readValue(key: string, target?: AnyResolvedKeyframe | null): any; - /** - * Set the base target to later animate back to. This is currently - * only hydrated on creation and when we first read a value. - */ - setBaseTarget(key: string, value: AnyResolvedKeyframe): void; - /** - * Find the base target for a value thats been removed from all animation - * props. - */ - getBaseTarget(key: string): ResolvedValues$1[string] | undefined | null; - on(eventName: EventName, callback: VisualElementEventCallbacks[EventName]): VoidFunction; - notify(eventName: EventName, ...args: any): void; - scheduleRenderMicrotask(): void; -} - -/** - * An update function. It accepts a timestamp used to advance the animation. - */ -type Update$1 = (timestamp: number) => void; -/** - * Drivers accept a update function and call it at an interval. This interval - * could be a synchronous loop, a setInterval, or tied to the device's framerate. - */ -interface DriverControls { - start: (keepAlive?: boolean) => void; - stop: () => void; - now: () => number; -} -type Driver = (update: Update$1) => DriverControls; - -/** - * Temporary subset of VisualElement until VisualElement is - * moved to motion-dom - */ -interface WithRender { - render: () => void; - readValue: (name: string, keyframe: any) => any; - getValue: (name: string, defaultValue?: any) => any; - current?: HTMLElement | SVGElement; - measureViewportBox: () => Box; -} - -type AnyResolvedKeyframe = string | number; -interface ProgressTimeline { - currentTime: null | { - value: number; - }; - cancel?: VoidFunction; -} -interface ValueAnimationOptionsWithRenderContext extends ValueAnimationOptions { - KeyframeResolver?: typeof KeyframeResolver; - motionValue?: MotionValue; - element?: WithRender; -} -interface TimelineWithFallback { - timeline?: ProgressTimeline; - rangeStart?: string; - rangeEnd?: string; - observe: (animation: AnimationPlaybackControls) => VoidFunction; -} -/** - * Methods to control an animation. - */ -interface AnimationPlaybackControls { - /** - * The current time of the animation, in seconds. - */ - time: number; - /** - * The playback speed of the animation. - * 1 = normal speed, 2 = double speed, 0.5 = half speed. - */ - speed: number; - /** - * The start time of the animation, in milliseconds. - */ - startTime: number | null; - /** - * The state of the animation. - * - * This is currently for internal use only. - */ - state: AnimationPlayState; - duration: number; - /** - * The duration of the animation, including any delay. - */ - iterationDuration: number; - /** - * Stops the animation at its current state, and prevents it from - * resuming when the animation is played again. - */ - stop: () => void; - /** - * Plays the animation. - */ - play: () => void; - /** - * Pauses the animation. - */ - pause: () => void; - /** - * Completes the animation and applies the final state. - */ - complete: () => void; - /** - * Cancels the animation and applies the initial state. - */ - cancel: () => void; - /** - * Attaches a timeline to the animation, for instance the `ScrollTimeline`. - * - * This is currently for internal use only. - */ - attachTimeline: (timeline: TimelineWithFallback) => VoidFunction; - finished: Promise; -} -type AnimationPlaybackControlsWithThen = AnimationPlaybackControls & { - then: (onResolve: VoidFunction, onReject?: VoidFunction) => Promise; -}; -interface AnimationState { - value: V; - done: boolean; -} -interface KeyframeGenerator { - calculatedDuration: null | number; - next: (t: number) => AnimationState; - velocity?: (t: number) => number; - toString: () => string; -} -interface DOMValueAnimationOptions extends ValueAnimationTransition { - element: HTMLElement | SVGElement; - keyframes: ValueKeyframesDefinition; - name: string; - pseudoElement?: string; - allowFlatten?: boolean; -} -interface ValueAnimationOptions extends ValueAnimationTransition { - keyframes: V[]; - element?: any; - name?: string; - motionValue?: MotionValue; - from?: any; - isHandoff?: boolean; - allowFlatten?: boolean; - finalKeyframe?: V; -} -type GeneratorFactoryFunction = (options: ValueAnimationOptions) => KeyframeGenerator; -interface GeneratorFactory extends GeneratorFactoryFunction { - applyToOptions?: (options: Transition) => Transition; -} -type AnimationGeneratorName = "decay" | "spring" | "keyframes" | "tween" | "inertia"; -type AnimationGeneratorType = GeneratorFactory | AnimationGeneratorName | false; -interface AnimationPlaybackLifecycles { - onUpdate?: (latest: V) => void; - onPlay?: () => void; - onComplete?: () => void; - onRepeat?: () => void; - onStop?: () => void; -} -interface ValueAnimationTransition extends ValueTransition, AnimationPlaybackLifecycles { - isSync?: boolean; -} -type RepeatType = "loop" | "reverse" | "mirror"; -interface AnimationPlaybackOptions { - /** - * The number of times to repeat the transition. Set to `Infinity` for perpetual repeating. - * - * Without setting `repeatType`, this will loop the animation. - * - * @public - */ - repeat?: number; - /** - * How to repeat the animation. This can be either: - * - * "loop": Repeats the animation from the start - * - * "reverse": Alternates between forward and backwards playback - * - * "mirror": Switches `from` and `to` alternately - * - * @public - */ - repeatType?: RepeatType; - /** - * When repeating an animation, `repeatDelay` will set the - * duration of the time to wait, in seconds, between each repetition. - * - * @public - */ - repeatDelay?: number; -} -interface VelocityOptions { - velocity?: number; - /** - * End animation if absolute speed (in units per second) drops below this - * value and delta is smaller than `restDelta`. Set to `0.01` by default. - * - * @public - */ - restSpeed?: number; - /** - * End animation if distance is below this value and speed is below - * `restSpeed`. When animation ends, spring gets "snapped" to. Set to - * `0.01` by default. - * - * @public - */ - restDelta?: number; -} -interface DurationSpringOptions { - /** - * The total duration of the animation. Set to `0.3` by default. - * - * @public - */ - duration?: number; - /** - * If visualDuration is set, this will override duration. - * - * The visual duration is a time, set in seconds, that the animation will take to visually appear to reach its target. - * - * In other words, the bulk of the transition will occur before this time, and the "bouncy bit" will mostly happen after. - * - * This makes it easier to edit a spring, as well as visually coordinate it with other time-based animations. - * - * @public - */ - visualDuration?: number; - /** - * `bounce` determines the "bounciness" of a spring animation. - * - * `0` is no bounce, and `1` is extremely bouncy. - * - * If `duration` is set, this defaults to `0.25`. - * - * Note: `bounce` and `duration` will be overridden if `stiffness`, `damping` or `mass` are set. - * - * @public - */ - bounce?: number; -} -interface SpringOptions extends DurationSpringOptions, VelocityOptions { - /** - * Stiffness of the spring. Higher values will create more sudden movement. - * Set to `100` by default. - * - * @default 100 - * - * @public - */ - stiffness?: number; - /** - * Strength of opposing force. If set to 0, spring will oscillate - * indefinitely. Set to `10` by default. - * - * @default 10 - * - * @public - */ - damping?: number; - /** - * Mass of the moving object. Higher values will result in more lethargic - * movement. Set to `1` by default. - * - * @default 1 - * - * @public - */ - mass?: number; -} -/** - * @deprecated Use SpringOptions instead - */ -interface Spring extends SpringOptions { -} -interface DecayOptions extends VelocityOptions { - keyframes?: number[]; - /** - * A higher power value equals a further target. Set to `0.8` by default. - * - * @public - */ - power?: number; - /** - * Adjusting the time constant will change the duration of the - * deceleration, thereby affecting its feel. Set to `700` by default. - * - * @public - */ - timeConstant?: number; - /** - * A function that receives the automatically-calculated target and returns a new one. Useful for snapping the target to a grid. - * - * @public - */ - modifyTarget?: (v: number) => number; -} -interface InertiaOptions extends DecayOptions { - /** - * If `min` or `max` is set, this affects the stiffness of the bounce - * spring. Higher values will create more sudden movement. Set to `500` by - * default. - * - * @public - */ - bounceStiffness?: number; - /** - * If `min` or `max` is set, this affects the damping of the bounce spring. - * If set to `0`, spring will oscillate indefinitely. Set to `10` by - * default. - * - * @public - */ - bounceDamping?: number; - /** - * Minimum constraint. If set, the value will "bump" against this value (or immediately spring to it if the animation starts as less than this value). - * - * @public - */ - min?: number; - /** - * Maximum constraint. If set, the value will "bump" against this value (or immediately snap to it, if the initial animation value exceeds this value). - * - * @public - */ - max?: number; -} -interface AnimationOrchestrationOptions { - /** - * Delay the animation by this duration (in seconds). Defaults to `0`. - * - * @public - */ - delay?: number; - /** - * Describes the relationship between the transition and its children. Set - * to `false` by default. - * - * @remarks - * When using variants, the transition can be scheduled in relation to its - * children with either `"beforeChildren"` to finish this transition before - * starting children transitions, `"afterChildren"` to finish children - * transitions before starting this transition. - * - * @public - */ - when?: false | "beforeChildren" | "afterChildren" | string; - /** - * When using variants, children animations will start after this duration - * (in seconds). You can add the `transition` property to both the `motion.div` and the - * `variant` directly. Adding it to the `variant` generally offers more flexibility, - * as it allows you to customize the delay per visual state. - * - * @public - */ - delayChildren?: number | DynamicOption; - /** - * When using variants, animations of child components can be staggered by this - * duration (in seconds). - * - * For instance, if `staggerChildren` is `0.01`, the first child will be - * delayed by `0` seconds, the second by `0.01`, the third by `0.02` and so - * on. - * - * The calculated stagger delay will be added to `delayChildren`. - * - * @deprecated - Use `delayChildren: stagger(interval)` instead. - */ - staggerChildren?: number; - /** - * The direction in which to stagger children. - * - * A value of `1` staggers from the first to the last while `-1` - * staggers from the last to the first. - * - * @deprecated - Use `delayChildren: stagger(interval, { from: "last" })` instead. - */ - staggerDirection?: number; -} -interface KeyframeOptions { - /** - * The total duration of the animation. Set to `0.3` by default. - * - * @public - */ - duration?: number; - ease?: Easing | Easing[]; - times?: number[]; -} -interface ValueTransition extends AnimationOrchestrationOptions, AnimationPlaybackOptions, Omit, Omit, KeyframeOptions { - /** - * Delay the animation by this duration (in seconds). Defaults to `0`. - * - * @public - */ - delay?: number; - /** - * The duration of time already elapsed in the animation. Set to `0` by - * default. - */ - elapsed?: number; - driver?: Driver; - /** - * Type of animation to use. - * - * - "tween": Duration-based animation with ease curve - * - "spring": Physics or duration-based spring animation - * - false: Use an instant animation - */ - type?: AnimationGeneratorType; - /** - * The duration of the tween animation. Set to `0.3` by default, 0r `0.8` if animating a series of keyframes. - * - * @public - */ - duration?: number; - autoplay?: boolean; - startTime?: number; - from?: any; - /** - * If true, this transition will shallow-merge with its parent transition - * instead of replacing it. Inner keys win. - * - * @public - */ - inherit?: boolean; - /** - * If true, the animation skips straight to its final value instead of - * tweening. Used by `MotionConfig`'s `skipAnimations` to opt entire - * subtrees out of animation (e.g. for E2E screenshot stability). - * - * @public - */ - skipAnimations?: boolean; - /** - * The path the element travels between its old and new x/y positions. - * Slot in a path factory (e.g. `arc()`) to swap the default - * straight-line interpolation for something curved. - * - * Can be used in keyframe animations (`transition.path`) and layout - * animations (`transition.layout.path`), including with `useAnimate`. - * - * @public - */ - path?: MotionPath; -} -/** - * @deprecated Use KeyframeOptions instead - */ -interface Tween extends KeyframeOptions { -} -type SVGForcedAttrTransitions = { - [K in keyof SVGForcedAttrProperties]: ValueTransition; -}; -type SVGPathTransitions = { - [K in keyof SVGPathProperties]: ValueTransition; -}; -type SVGTransitions = { - [K in keyof Omit]: ValueTransition; -}; -interface VariableTransitions { - [key: `--${string}`]: ValueTransition; -} -type StyleTransitions = { - [K in keyof CSSStyleDeclarationWithTransform]?: ValueTransition; -}; -type ValueKeyframe = T; -type UnresolvedValueKeyframe = ValueKeyframe | null; -type ResolvedValueKeyframe = ValueKeyframe | ValueKeyframe[]; -type ValueKeyframesDefinition = ValueKeyframe | ValueKeyframe[] | UnresolvedValueKeyframe[]; -type StyleKeyframesDefinition = { - [K in keyof CSSStyleDeclarationWithTransform]?: ValueKeyframesDefinition; -}; -type SVGKeyframesDefinition = { - [K in keyof Omit]?: ValueKeyframesDefinition; -}; -interface VariableKeyframesDefinition { - [key: `--${string}`]: ValueKeyframesDefinition; -} -type SVGForcedAttrKeyframesDefinition = { - [K in keyof SVGForcedAttrProperties]?: ValueKeyframesDefinition; -}; -type SVGPathKeyframesDefinition = { - [K in keyof SVGPathProperties]?: ValueKeyframesDefinition; -}; -type DOMKeyframesDefinition = StyleKeyframesDefinition & SVGKeyframesDefinition & SVGPathKeyframesDefinition & SVGForcedAttrKeyframesDefinition & VariableKeyframesDefinition; -interface Target extends DOMKeyframesDefinition { -} -type CSSPropertyKeys = { - [K in keyof CSSStyleDeclaration as K extends string ? CSSStyleDeclaration[K] extends AnyResolvedKeyframe ? K : never : never]: CSSStyleDeclaration[K]; -}; -interface CSSStyleDeclarationWithTransform extends Omit { - x: number | string; - y: number | string; - z: number | string; - originX: number; - originY: number; - originZ: number; - translateX: number | string; - translateY: number | string; - translateZ: number | string; - rotateX: number | string; - rotateY: number | string; - rotateZ: number | string; - scaleX: number; - scaleY: number; - scaleZ: number; - skewX: number | string; - skewY: number | string; - transformPerspective: number; -} -type TransitionWithValueOverrides = ValueAnimationTransition & StyleTransitions & SVGPathTransitions & SVGForcedAttrTransitions & SVGTransitions & VariableTransitions & { - default?: ValueTransition; - layout?: ValueTransition; -}; -type Transition = ValueAnimationTransition | TransitionWithValueOverrides; -interface Point2D { - x: number; - y: number; -} -interface PathState { - x: number; - y: number; - /** - * Optional rotation in degrees. If returned, the engine will apply it - * to the element's `rotate` value for the duration of the animation. - */ - rotate?: number; -} -/** - * Sampling function — returns position (and optionally rotation) at - * progress `t` (0–1). - */ -interface PathInterpolator { - (t: number): PathState; -} -/** - * Returned by a path factory such as `arc()` and passed to `transition.path`. - * Implements both the keyframe-animation hook (`animateVisualElement`) and - * the layout-projection hook (`interpolateProjection`). - */ -interface MotionPath { - animateVisualElement(visualElement: VisualElement, target: TargetAndTransition, transition: Transition | undefined, delay: number, animations: AnimationPlaybackControlsWithThen[]): void; - interpolateProjection(delta: Delta): PathInterpolator | undefined; -} -type DynamicOption = (i: number, total: number) => T; -type ValueAnimationWithDynamicDelay = Omit, "delay"> & { - delay?: number | DynamicOption; -}; -interface ReduceMotionOption { - /** - * Whether to reduce motion for transform/layout animations. - * - * - `true`: Skip transform/layout animations (instant transition) - * - `false`: Always animate transforms/layout - * - `undefined`: Use device preference (default behavior) - */ - reduceMotion?: boolean; -} -type AnimationOptions = (ValueAnimationWithDynamicDelay & ReduceMotionOption) | (ValueAnimationWithDynamicDelay & ReduceMotionOption & StyleTransitions & SVGPathTransitions & SVGForcedAttrTransitions & SVGTransitions & VariableTransitions & { - default?: ValueTransition; - layout?: ValueTransition; -}); -interface TransformProperties { - x?: AnyResolvedKeyframe; - y?: AnyResolvedKeyframe; - z?: AnyResolvedKeyframe; - translateX?: AnyResolvedKeyframe; - translateY?: AnyResolvedKeyframe; - translateZ?: AnyResolvedKeyframe; - rotate?: AnyResolvedKeyframe; - rotateX?: AnyResolvedKeyframe; - rotateY?: AnyResolvedKeyframe; - rotateZ?: AnyResolvedKeyframe; - scale?: AnyResolvedKeyframe; - scaleX?: AnyResolvedKeyframe; - scaleY?: AnyResolvedKeyframe; - scaleZ?: AnyResolvedKeyframe; - skew?: AnyResolvedKeyframe; - skewX?: AnyResolvedKeyframe; - skewY?: AnyResolvedKeyframe; - originX?: AnyResolvedKeyframe; - originY?: AnyResolvedKeyframe; - originZ?: AnyResolvedKeyframe; - perspective?: AnyResolvedKeyframe; - transformPerspective?: AnyResolvedKeyframe; -} -interface SVGForcedAttrProperties { - attrX?: number; - attrY?: number; - attrScale?: number; -} -interface SVGPathProperties { - pathLength?: number; - pathOffset?: number; - pathSpacing?: number; -} - -/** - * @public - */ -type Subscriber = (v: T) => void; -/** - * @public - */ -type PassiveEffect = (v: T, safeSetter: (v: T) => void) => void; -type StartAnimation = (complete: () => void) => AnimationPlaybackControlsWithThen | undefined; -interface MotionValueEventCallbacks { - animationStart: () => void; - animationComplete: () => void; - animationCancel: () => void; - change: (latestValue: V) => void; - destroy: () => void; -} -interface ResolvedValues { - [key: string]: AnyResolvedKeyframe; -} -interface Owner { - current: HTMLElement | unknown; - getProps: () => { - onUpdate?: (latest: ResolvedValues) => void; - transformTemplate?: (transform: TransformProperties, generatedTransform: string) => string; - }; -} -interface AccelerateConfig { - factory: (animation: AnimationPlaybackControlsWithThen) => VoidFunction; - times: number[]; - keyframes: any[]; - ease?: EasingFunction | EasingFunction[]; - duration: number; - isTransformed?: boolean; -} -interface MotionValueOptions { - owner?: Owner; -} -declare const collectMotionValues: { - current: MotionValue[] | undefined; -}; -/** - * `MotionValue` is used to track the state and velocity of motion values. - * - * @public - */ -declare class MotionValue { - /** - * If a MotionValue has an owner, it was created internally within Motion - * and therefore has no external listeners. It is therefore safe to animate via WAAPI. - */ - owner?: Owner; - /** - * The current state of the `MotionValue`. - */ - private current; - /** - * The previous state of the `MotionValue`. - */ - private prev; - /** - * The previous state of the `MotionValue` at the end of the previous frame. - */ - private prevFrameValue; - /** - * The last time the `MotionValue` was updated. - */ - updatedAt: number; - /** - * The time `prevFrameValue` was updated. - */ - prevUpdatedAt: number | undefined; - private stopPassiveEffect?; - /** - * Whether the passive effect is active. - */ - isEffectActive?: boolean; - /** - * A reference to the currently-controlling animation. - */ - animation?: AnimationPlaybackControlsWithThen; - /** - * A list of MotionValues whose values are computed from this one. - * This is a rough start to a proper signal-like dirtying system. - */ - private dependents; - /** - * Tracks whether this value should be removed - */ - liveStyle?: boolean; - /** - * Scroll timeline acceleration metadata. When set, VisualElement - * can create a native WAAPI animation attached to a scroll timeline - * instead of driving updates through JS. - */ - accelerate?: AccelerateConfig; - /** - * @param init - The initiating value - * @param config - Optional configuration options - * - * - `transformer`: A function to transform incoming values with. - */ - constructor(init: V, options?: MotionValueOptions); - setCurrent(current: V): void; - setPrevFrameValue(prevFrameValue?: V | undefined): void; - /** - * Adds a function that will be notified when the `MotionValue` is updated. - * - * It returns a function that, when called, will cancel the subscription. - * - * When calling `onChange` inside a React component, it should be wrapped with the - * `useEffect` hook. As it returns an unsubscribe function, this should be returned - * from the `useEffect` function to ensure you don't add duplicate subscribers.. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * const y = useMotionValue(0) - * const opacity = useMotionValue(1) - * - * useEffect(() => { - * function updateOpacity() { - * const maxXY = Math.max(x.get(), y.get()) - * const newOpacity = transform(maxXY, [0, 100], [1, 0]) - * opacity.set(newOpacity) - * } - * - * const unsubscribeX = x.on("change", updateOpacity) - * const unsubscribeY = y.on("change", updateOpacity) - * - * return () => { - * unsubscribeX() - * unsubscribeY() - * } - * }, []) - * - * return - * } - * ``` - * - * @param subscriber - A function that receives the latest value. - * @returns A function that, when called, will cancel this subscription. - * - * @deprecated - */ - onChange(subscription: Subscriber): () => void; - /** - * An object containing a SubscriptionManager for each active event. - */ - private events; - on>(eventName: EventName, callback: MotionValueEventCallbacks[EventName]): VoidFunction; - clearListeners(): void; - /** - * Attaches a passive effect to the `MotionValue`. - */ - attach(passiveEffect: PassiveEffect, stopPassiveEffect: VoidFunction): void; - /** - * Sets the state of the `MotionValue`. - * - * @remarks - * - * ```jsx - * const x = useMotionValue(0) - * x.set(10) - * ``` - * - * @param latest - Latest value to set. - * @param render - Whether to notify render subscribers. Defaults to `true` - * - * @public - */ - set(v: V): void; - setWithVelocity(prev: V, current: V, delta: number): void; - /** - * Set the state of the `MotionValue`, stopping any active animations, - * effects, and resets velocity to `0`. - */ - jump(v: V, endAnimation?: boolean): void; - dirty(): void; - addDependent(dependent: MotionValue): void; - removeDependent(dependent: MotionValue): void; - updateAndNotify: (v: V) => void; - /** - * Returns the latest state of `MotionValue` - * - * @returns - The latest state of `MotionValue` - * - * @public - */ - get(): NonNullable; - /** - * @public - */ - getPrevious(): V | undefined; - /** - * Returns the latest velocity of `MotionValue` - * - * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical. - * - * @public - */ - getVelocity(): number; - hasAnimated: boolean; - /** - * Registers a new animation to control this `MotionValue`. Only one - * animation can drive a `MotionValue` at one time. - * - * ```jsx - * value.start() - * ``` - * - * @param animation - A function that starts the provided animation - */ - start(startAnimation: StartAnimation): Promise; - /** - * Stop the currently active animation. - * - * @public - */ - stop(): void; - /** - * Returns `true` if this value is currently animating. - * - * @public - */ - isAnimating(): boolean; - private clearAnimation; - /** - * Destroy and clean up subscribers to this `MotionValue`. - * - * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically - * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually - * created a `MotionValue` via the `motionValue` function. - * - * @public - */ - destroy(): void; -} -declare function motionValue(init: V, options?: MotionValueOptions): MotionValue; - -type UnresolvedKeyframes = Array; -type ResolvedKeyframes = Array; -declare function flushKeyframeResolvers(): void; -type OnKeyframesResolved = (resolvedKeyframes: ResolvedKeyframes, finalKeyframe: T, forced: boolean) => void; -declare class KeyframeResolver { - name?: string; - element?: WithRender; - finalKeyframe?: T; - suspendedScrollY?: number; - protected unresolvedKeyframes: UnresolvedKeyframes; - private motionValue?; - private onComplete; - state: "pending" | "scheduled" | "complete"; - /** - * Track whether this resolver is async. If it is, it'll be added to the - * resolver queue and flushed in the next frame. Resolvers that aren't going - * to trigger read/write thrashing don't need to be async. - */ - private isAsync; - /** - * Track whether this resolver needs to perform a measurement - * to resolve its keyframes. - */ - needsMeasurement: boolean; - constructor(unresolvedKeyframes: UnresolvedKeyframes, onComplete: OnKeyframesResolved, name?: string, motionValue?: MotionValue, element?: WithRender, isAsync?: boolean); - scheduleResolve(): void; - readKeyframes(): void; - setFinalKeyframe(): void; - measureInitialState(): void; - renderEndStyles(): void; - measureEndState(): void; - complete(isForcedComplete?: boolean): void; - cancel(): void; - resume(): void; -} - -declare class WithPromise { - protected _finished: Promise; - resolve: VoidFunction; - constructor(); - get finished(): Promise; - protected updateFinished(): void; - protected notifyFinished(): void; - /** - * Allows the animation to be awaited. - * - * @deprecated Use `finished` instead. - */ - then(onResolve: VoidFunction, onReject?: VoidFunction): Promise; -} - -type OptionsWithoutKeyframes = Omit, "keyframes">; -declare class AsyncMotionValueAnimation extends WithPromise implements AnimationPlaybackControls { - private createdAt; - private resolvedAt; - private _animation; - private pendingTimeline; - private keyframeResolver; - private stopTimeline; - constructor({ autoplay, delay, type, repeat, repeatDelay, repeatType, keyframes, name, motionValue, element, ...options }: ValueAnimationOptions); - onKeyframesResolved(keyframes: ResolvedKeyframes, finalKeyframe: T, options: OptionsWithoutKeyframes, sync: boolean): void; - get finished(): Promise; - then(onResolve: VoidFunction, _onReject?: VoidFunction): Promise; - get animation(): AnimationPlaybackControls; - get duration(): number; - get iterationDuration(): number; - get time(): number; - set time(newTime: number); - get speed(): number; - get state(): AnimationPlayState; - set speed(newSpeed: number); - get startTime(): number | null; - attachTimeline(timeline: TimelineWithFallback): () => void; - play(): void; - pause(): void; - complete(): void; - cancel(): void; - /** - * Bound to support return animation.stop pattern - */ - stop: () => void; -} - -type AcceptedAnimations = AnimationPlaybackControls; -type GroupedAnimations = AcceptedAnimations[]; -declare class GroupAnimation implements AnimationPlaybackControls { - animations: GroupedAnimations; - constructor(animations: Array); - get finished(): Promise; - /** - * TODO: Filter out cancelled or stopped animations before returning - */ - private getAll; - private setAll; - attachTimeline(timeline: TimelineWithFallback): () => void; - get time(): number; - set time(time: number); - get speed(): number; - set speed(speed: number); - get state(): any; - get startTime(): any; - get duration(): number; - get iterationDuration(): number; - private runAll; - play(): void; - pause(): void; - stop: () => void; - cancel(): void; - complete(): void; -} - -declare class GroupAnimationWithThen extends GroupAnimation implements AnimationPlaybackControlsWithThen { - then(onResolve: VoidFunction, _onReject?: VoidFunction): Promise; -} - -declare class JSAnimation extends WithPromise implements AnimationPlaybackControlsWithThen { - state: AnimationPlayState; - startTime: number | null; - /** - * The driver that's controlling the animation loop. Normally this is a requestAnimationFrame loop - * but in tests we can pass in a synchronous loop. - */ - private driver?; - private isStopped; - private generator; - private calculatedDuration; - private resolvedDuration; - private totalDuration; - private options; - /** - * The current time of the animation. - */ - private currentTime; - /** - * The time at which the animation was paused. - */ - private holdTime; - /** - * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed. - */ - private playbackSpeed; - private mixKeyframes; - private mirroredGenerator; - /** - * Reusable state object for the delay phase to avoid - * allocating a new object every frame. - */ - private delayState; - constructor(options: ValueAnimationOptions); - initAnimation(): void; - updateTime(timestamp: number): void; - tick(timestamp: number, sample?: boolean): AnimationState; - /** - * Allows the returned animation to be awaited or promise-chained. Currently - * resolves when the animation finishes at all but in a future update could/should - * reject if its cancels. - */ - then(resolve: VoidFunction, reject?: VoidFunction): Promise; - get duration(): number; - get iterationDuration(): number; - get time(): number; - set time(newTime: number); - /** - * Returns the generator's velocity at the current time in units/second. - * Uses the analytical derivative when available (springs), avoiding - * the MotionValue's frame-dependent velocity estimation. - */ - getGeneratorVelocity(): number; - get speed(): number; - set speed(newSpeed: number); - play(): void; - pause(): void; - /** - * This method is bound to the instance to fix a pattern where - * animation.stop is returned as a reference from a useEffect. - */ - stop: () => void; - complete(): void; - finish(): void; - cancel(): void; - private teardown; - private stopDriver; - sample(sampleTime: number): AnimationState; - attachTimeline(timeline: TimelineWithFallback): VoidFunction; -} -declare function animateValue(options: ValueAnimationOptions): JSAnimation; - -interface NativeAnimationOptions extends DOMValueAnimationOptions { - pseudoElement?: string; - startTime?: number; -} -/** - * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API. - */ -declare class NativeAnimation extends WithPromise implements AnimationPlaybackControlsWithThen { - /** - * The interfaced Web Animation API animation - */ - protected animation: Animation; - protected finishedTime: number | null; - protected options: NativeAnimationOptions; - private allowFlatten; - private isStopped; - private isPseudoElement; - /** - * Tracks a manually-set start time that takes precedence over WAAPI's - * dynamic startTime. This is cleared when play() or time setter is called, - * allowing WAAPI to take over timing. - */ - protected manualStartTime: number | null; - constructor(options?: NativeAnimationOptions); - updateMotionValue?(value?: T): void; - play(): void; - pause(): void; - complete(): void; - cancel(): void; - stop(): void; - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * In this method, we commit styles back to the DOM before cancelling - * the animation. - * - * This is designed to be overridden by NativeAnimationExtended, which - * will create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to also correctly calculate velocity for any subsequent animation - * while deferring the commit until the next animation frame. - */ - protected commitStyles(): void; - get duration(): number; - get iterationDuration(): number; - get time(): number; - set time(newTime: number); - /** - * The playback speed of the animation. - * 1 = normal speed, 2 = double speed, 0.5 = half speed. - */ - get speed(): number; - set speed(newSpeed: number); - get state(): AnimationPlayState; - get startTime(): number; - set startTime(newStartTime: number); - /** - * Attaches a timeline to the animation, for instance the `ScrollTimeline`. - */ - attachTimeline({ timeline, rangeStart, rangeEnd, observe, }: TimelineWithFallback): VoidFunction; -} - -type NativeAnimationOptionsExtended = NativeAnimationOptions & ValueAnimationOptions & NativeAnimationOptions; -declare class NativeAnimationExtended extends NativeAnimation { - options: NativeAnimationOptionsExtended; - constructor(options: NativeAnimationOptionsExtended); - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * Rather than read committed styles back out of the DOM, we can - * create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to calculate velocity for any subsequent animation. - */ - updateMotionValue(value?: T): void; -} - -declare class NativeAnimationWrapper extends NativeAnimation { - constructor(animation: Animation); -} - -declare const animationMapKey: (name: string, pseudoElement?: string) => string; -declare function getAnimationMap(element: Element): Map>; - -declare function calcChildStagger(children: Set, child: VisualElement, delayChildren?: number | DynamicOption, staggerChildren?: number, staggerDirection?: number): number; - -interface ArcOptions { - /** - * How far the arc bulges perpendicular to the straight-line path, - * as a fraction of the total distance. A value of `1` means the arc - * peaks at a height equal to the full travel distance. Default `0.5`. - */ - strength?: number; - /** - * Where along the path (0–1) the arc reaches its maximum height. - * Default `0.5` (symmetric). - */ - peak?: number; - /** - * Which side the arc bulges toward. - * - `"cw"` / `"ccw"` — locked relative to direction of travel - * - unset — auto-pick a stable screen-space side - */ - direction?: "cw" | "ccw"; - /** - * Rotates the element to follow the tangent of the arc path. - * - `true` — full tangent following (1.0) - * - number 0–1 — scale factor - */ - rotate?: boolean | number; -} -/** - * Creates a curved path for `transition.path`: - * - * ```ts - * - * ``` - * - * Reuse the returned value (module scope / useMemo / useRef) so its - * continuity closure survives re-renders — a fresh `arc()` has no memory. - */ -declare function arc(options?: ArcOptions): MotionPath; - -type CSSVariableName = `--${string}`; -type CSSVariableToken = `var(${CSSVariableName})`; -declare const isCSSVariableName: (key?: AnyResolvedKeyframe | null) => key is `--${string}`; -declare const isCSSVariableToken: (value?: string) => value is `var(--${string})`; -/** - * Check if a value contains a CSS variable anywhere (e.g. inside calc()). - * Unlike isCSSVariableToken which checks if the value IS a var() token, - * this checks if the value CONTAINS var() somewhere in the string. - */ -declare function containsCSSVariable(value?: AnyResolvedKeyframe | null): boolean; - -declare function parseCSSVariable(current: string): string[] | undefined[]; -declare function getVariableValue(current: CSSVariableToken, element: Element, depth?: number): AnyResolvedKeyframe | undefined; - -declare const getDefaultTransition: (valueKey: string, { keyframes }: ValueAnimationOptions) => Partial; - -declare function getFinalKeyframe(keyframes: T[], { repeat, repeatType }: AnimationPlaybackOptions, finalKeyframe?: T, speed?: number): T; - -declare function getValueTransition(transition: any, key: string): any; - -/** - * If `transition` has `inherit: true`, shallow-merge it with - * `parentTransition` (child keys win) and strip the `inherit` key. - * Otherwise return `transition` unchanged. - */ -declare function resolveTransition(transition: any, parentTransition?: any): any; - -/** - * Decide whether a transition is defined on a given Transition. - * This filters out orchestration options and returns true - * if any options are left. - */ -declare function isTransitionDefined(transition: Transition & { - elapsed?: number; - from?: AnyResolvedKeyframe; -}): boolean; - -declare function makeAnimationInstant(options: Partial<{ - duration: ValueAnimationOptions["duration"]; - type: ValueAnimationOptions["type"]; -}>): void; - -declare const animateMotionValue: (name: string, value: MotionValue, target: V | UnresolvedKeyframes, transition?: ValueTransition & { - elapsed?: number; -}, element?: VisualElement, isHandoff?: boolean) => StartAnimation; - -declare function animateVisualElement(visualElement: VisualElement, definition: AnimationDefinition, options?: VisualElementAnimationOptions): Promise; - -declare function animateTarget(visualElement: VisualElement, targetAndTransition: TargetAndTransition, { delay, transitionOverride, type }?: VisualElementAnimationOptions): AnimationPlaybackControlsWithThen[]; - -declare function animateVariant(visualElement: VisualElement, variant: string, options?: VisualElementAnimationOptions): Promise; - -declare const optimizedAppearDataId = "framerAppearId"; -declare const optimizedAppearDataAttribute: "data-framer-appear-id"; - -type Process = (data: FrameData) => void; -type Schedule = (process: Process, keepAlive?: boolean, immediate?: boolean) => Process; -interface Step { - schedule: Schedule; - cancel: (process: Process) => void; - process: (data: FrameData) => void; -} -type StepId = "setup" | "read" | "resolveKeyframes" | "preUpdate" | "update" | "preRender" | "render" | "postRender"; -type CancelProcess = (process: Process) => void; -type Batcher = { - [key in StepId]: Schedule; -}; -type Steps = { - [key in StepId]: Step; -}; -interface FrameData { - delta: number; - timestamp: number; - isProcessing: boolean; -} - -/** - * Expose only the needed part of the VisualElement interface to - * ensure React types don't end up in the generic DOM bundle. - */ -interface WithAppearProps { - props: { - [optimizedAppearDataAttribute]?: string; - values?: { - [key: string]: MotionValue | MotionValue; - }; - }; -} -type HandoffFunction = (storeId: string, valueName: string, frame: Batcher) => number | null; -/** - * The window global object acts as a bridge between our inline script - * triggering the optimized appear animations, and Motion. - */ -declare global { - interface Window { - MotionHandoffAnimation?: HandoffFunction; - MotionHandoffMarkAsComplete?: (elementId: string) => void; - MotionHandoffIsComplete?: (elementId: string) => boolean; - MotionHasOptimisedAnimation?: (elementId?: string, valueName?: string) => boolean; - MotionCancelOptimisedAnimation?: (elementId?: string, valueName?: string, frame?: Batcher, canResume?: boolean) => void; - MotionCheckAppearSync?: (visualElement: WithAppearProps, valueName: string, value: MotionValue) => VoidFunction | void; - MotionIsMounted?: boolean; - } -} - -declare function getOptimisedAppearId(visualElement: WithAppearProps): string | undefined; - -declare function inertia({ keyframes, velocity, power, timeConstant, bounceDamping, bounceStiffness, modifyTarget, min, max, restDelta, restSpeed, }: ValueAnimationOptions): KeyframeGenerator; - -declare function defaultEasing(values: any[], easing?: EasingFunction): EasingFunction[]; -declare function keyframes({ duration, keyframes: keyframeValues, times, ease, }: ValueAnimationOptions): KeyframeGenerator; - -declare function spring(optionsOrVisualDuration?: ValueAnimationOptions | number, bounce?: number): KeyframeGenerator; -declare namespace spring { - var applyToOptions: (options: Transition) => Transition; -} - -/** - * Implement a practical max duration for keyframe generation - * to prevent infinite loops - */ -declare const maxGeneratorDuration = 20000; -declare function calcGeneratorDuration(generator: KeyframeGenerator): number; - -/** - * Create a progress => progress easing function from a generator. - */ -declare function createGeneratorEasing(options: Transition, scale: number | undefined, createGenerator: GeneratorFactory): { - type: string; - ease: (progress: number) => number; - duration: number; -}; - -declare function isGenerator(type?: AnimationGeneratorType): type is GeneratorFactory; - -declare class DOMKeyframesResolver extends KeyframeResolver { - name: string; - element?: WithRender; - private removedTransforms?; - private measuredOrigin?; - constructor(unresolvedKeyframes: UnresolvedKeyframes, onComplete: OnKeyframesResolved, name?: string, motionValue?: MotionValue, element?: WithRender); - readKeyframes(): void; - resolveNoneKeyframes(): void; - measureInitialState(): void; - measureEndState(): void; -} - -declare function defaultOffset(arr: any[]): number[]; - -declare function fillOffset(offset: number[], remaining: number): void; - -declare function convertOffsetToTimes(offset: number[], duration: number): number[]; - -declare function applyPxDefaults(keyframes: ValueKeyframe[] | UnresolvedValueKeyframe[], name: string): void; - -declare function fillWildcards(keyframes: ValueKeyframe[] | UnresolvedValueKeyframe[]): void; - -declare const cubicBezierAsString: ([a, b, c, d]: BezierDefinition) => string; - -declare function isWaapiSupportedEasing(easing?: Easing | Easing[]): boolean; - -declare function mapEasingToNativeEasing(easing: Easing | Easing[] | undefined, duration: number): undefined | string | string[]; - -declare const supportedWaapiEasing: { - linear: string; - ease: string; - easeIn: string; - easeOut: string; - easeInOut: string; - circIn: string; - circOut: string; - backIn: string; - backOut: string; -}; - -declare function startWaapiAnimation(element: Element, valueName: string, keyframes: ValueKeyframesDefinition, { delay, duration, repeat, repeatType, ease, times, }?: ValueTransition, pseudoElement?: string | undefined): Animation; - -declare const supportsPartialKeyframes: () => boolean; - -declare function supportsBrowserAnimation(options: ValueAnimationOptionsWithRenderContext): any; - -/** - * A list of values that can be hardware-accelerated. - */ -declare const acceleratedValues: Set; - -declare function applyGeneratorOptions({ type, ...options }: ValueTransition): ValueTransition; - -declare const generateLinearEasing: (easing: EasingFunction, duration: number, resolution?: number) => string; - -declare class MotionValueState { - latest: { - [name: string]: AnyResolvedKeyframe; - }; - private values; - set(name: string, value: MotionValue, render?: VoidFunction, computed?: MotionValue, useDefaultValueType?: boolean): () => void; - get(name: string): MotionValue | undefined; -} - -declare const addAttrValue: (element: HTMLElement | SVGElement, state: MotionValueState, key: string, value: MotionValue) => () => void; -declare const attrEffect: (subject: ElementOrSelector, values: Record>) => () => void; - -declare const propEffect: (subject: { - [key: string]: any; -}, values: Record>) => VoidFunction; - -declare const addStyleValue: (element: HTMLElement | SVGElement, state: MotionValueState, key: string, value: MotionValue) => () => void; -declare const styleEffect: (subject: ElementOrSelector, values: Record>) => () => void; - -declare const svgEffect: (subject: ElementOrSelector, values: Record>) => () => void; - -declare const frame: Batcher; -declare const cancelFrame: (process: Process) => void; -declare const frameData: FrameData; -declare const frameSteps: Steps; - -declare function createRenderBatcher(scheduleNextBatch: (callback: Function) => void, allowKeepAlive: boolean): { - schedule: Batcher; - cancel: (process: Process) => void; - state: FrameData; - steps: Steps; -}; - -declare const microtask: Batcher; -declare const cancelMicrotask: (process: Process) => void; - -/** - * An eventloop-synchronous alternative to performance.now(). - * - * Ensures that time measurements remain consistent within a synchronous context. - * Usually calling performance.now() twice within the same synchronous context - * will return different values which isn't useful for animations when we're usually - * trying to sync animations to the same frame. - */ -declare const time: { - now: () => number; - set: (newTime: number) => void; -}; - -declare const isDragging: { - x: boolean; - y: boolean; -}; -declare function isDragActive(): boolean; - -declare function setDragLock(axis: boolean | "x" | "y" | "lockDirection"): (() => void) | null; - -type ElementOrSelector = Element | Element[] | NodeListOf | string | null | undefined; -interface WithQuerySelectorAll { - querySelectorAll: Element["querySelectorAll"]; -} -interface AnimationScope { - readonly current: T; - animations: any[]; -} -interface SelectorCache { - [key: string]: NodeListOf; -} -declare function resolveElements(elementOrSelector: ElementOrSelector, scope?: AnimationScope, selectorCache?: SelectorCache): Element[]; - -/** - * Options for event listeners. - * - * @public - */ -interface EventOptions { - /** - * Use passive event listeners. Doing so allows the browser to optimize - * scrolling performance by not allowing the use of `preventDefault()`. - * - * @default true - */ - passive?: boolean; - /** - * Remove the event listener after the first event. - * - * @default false - */ - once?: boolean; -} - -/** - * A function to be called when a hover gesture starts. - * - * This function can optionally return a function that will be called - * when the hover gesture ends. - * - * @public - */ -type OnHoverStartEvent = (element: Element, event: PointerEvent) => void | OnHoverEndEvent; -/** - * A function to be called when a hover gesture ends. - * - * @public - */ -type OnHoverEndEvent = (event: PointerEvent) => void; -/** - * Create a hover gesture. hover() is different to .addEventListener("pointerenter") - * in that it has an easier syntax, filters out polyfilled touch events, interoperates - * with drag gestures, and automatically removes the "pointerennd" event listener when the hover ends. - * - * @public - */ -declare function hover(elementOrSelector: ElementOrSelector, onHoverStart: OnHoverStartEvent, options?: EventOptions): VoidFunction; - -interface PressGestureInfo { - success: boolean; -} -type OnPressEndEvent = (event: PointerEvent, info: PressGestureInfo) => void; -type OnPressStartEvent = (element: Element, event: PointerEvent) => OnPressEndEvent | void; - -interface PointerEventOptions extends EventOptions { - useGlobalTarget?: boolean; - stopPropagation?: boolean; -} -/** - * Create a press gesture. - * - * Press is different to `"pointerdown"`, `"pointerup"` in that it - * automatically filters out secondary pointer events like right - * click and multitouch. - * - * It also adds accessibility support for keyboards, where - * an element with a press gesture will receive focus and - * trigger on Enter `"keydown"` and `"keyup"` events. - * - * This is different to a browser's `"click"` event, which does - * respond to keyboards but only for the `"click"` itself, rather - * than the press start and end/cancel. The element also needs - * to be focusable for this to work, whereas a press gesture will - * make an element focusable by default. - * - * @public - */ -declare function press(targetOrSelector: ElementOrSelector, onPressStart: OnPressStartEvent, options?: PointerEventOptions): VoidFunction; - -/** - * Checks if an element is natively keyboard accessible (focusable). - * Used by the press gesture to determine if we need to add tabIndex. - */ -declare function isElementKeyboardAccessible(element: Element): boolean; -/** - * Checks if an element has text selection or direct interaction behavior - * that should block drag gestures from starting. - * - * This specifically targets form controls where the user might want to select - * text or interact with the control (e.g., sliders, dropdowns). - * - * Buttons and links are NOT included because they don't have click-and-move - * actions of their own - they only respond to click events, so dragging - * should still work when initiated from these elements. - */ -declare function isElementTextInput(element: Element): boolean; - -/** - * Recursively traverse up the tree to check whether the provided child node - * is the parent or a descendant of it. - * - * @param parent - Element to find - * @param child - Element to test against parent - */ -declare const isNodeOrChild: (parent: Element | null, child?: Element | null) => boolean; - -declare const isPrimaryPointer: (event: PointerEvent) => boolean; - -declare function defaultTransformValue(name: string): number; -declare function parseValueFromTransform(transform: string | undefined, name: string): number; -declare const readTransformValue: (instance: HTMLElement, name: string) => number; - -declare function getComputedStyle(element: HTMLElement | SVGElement, name: string): string; - -declare function setStyle(element: HTMLElement | SVGElement, name: string, value: AnyResolvedKeyframe): void; - -declare const isKeyframesTarget: (v: ValueKeyframesDefinition) => v is UnresolvedValueKeyframe[]; - -declare const positionalKeys: Set; - -/** - * Generate a list of every possible transform key. - */ -declare const transformPropOrder: string[]; -/** - * A quick lookup for transform props. - * - * `pathRotation` is a transform for routing purposes (skipped from raw - * style application, wired to the transform composite, flags transform - * dirty) but is intentionally NOT in `transformPropOrder` — it is - * composed onto `rotate` at the build sites, not serialized in its own - * slot, and must stay out of the order-array consumers (parse-transform, - * unit-conversion, keys-position). - */ -declare const transformProps: Set; - -interface ResizeInfo { - width: number; - height: number; -} -type ResizeHandler = (element: I, info: ResizeInfo) => void; -type WindowResizeHandler = (info: ResizeInfo) => void; - -declare function resize(onResize: WindowResizeHandler): VoidFunction; -declare function resize(target: ElementOrSelector, onResize: ResizeHandler): VoidFunction; - -type Update = (progress: number) => void; -declare function observeTimeline(update: Update, timeline: ProgressTimeline): () => void; - -declare const stepsOrder: StepId[]; -type StepNames = (typeof stepsOrder)[number]; - -interface Summary { - min: number; - max: number; - avg: number; -} -type FrameloopStatNames = "rate" | StepNames; -interface Stats { - frameloop: { - [key in FrameloopStatNames]: T; - }; - animations: { - mainThread: T; - waapi: T; - layout: T; - }; - layoutProjection: { - nodes: T; - calculatedTargetDeltas: T; - calculatedProjections: T; - }; -} -type StatsBuffer = number[]; -type FrameStats = Stats; -type StatsRecording = Stats; -type StatsSummary = Stats; - -declare function reportStats(): StatsSummary; -declare function recordStats(): typeof reportStats; - -declare const activeAnimations: { - layout: number; - mainThread: number; - waapi: number; -}; - -type InactiveStatsBuffer = { - value: null; - addProjectionMetrics: null; -}; -type ActiveStatsBuffer = { - value: StatsRecording; - addProjectionMetrics: (metrics: { - nodes: number; - calculatedTargetDeltas: number; - calculatedProjections: number; - }) => void; -}; -declare const statsBuffer: InactiveStatsBuffer | ActiveStatsBuffer; - -type Mixer = (p: number) => T; -type MixerFactory = (a: T, b: T) => Mixer; - -interface InterpolateOptions { - clamp?: boolean; - ease?: EasingFunction | EasingFunction[]; - mixer?: MixerFactory; -} -/** - * Create a function that maps from a numerical input array to a generic output array. - * - * Accepts: - * - Numbers - * - Colors (hex, hsl, hsla, rgb, rgba) - * - Complex (combinations of one or more numbers or strings) - * - * ```jsx - * const mixColor = interpolate([0, 1], ['#fff', '#000']) - * - * mixColor(0.5) // 'rgba(128, 128, 128, 1)' - * ``` - * - * TODO Revisit this approach once we've moved to data models for values, - * probably not needed to pregenerate mixer functions. - * - * @public - */ -declare function interpolate(input: number[], output: T[], { clamp: isClamp, ease, mixer }?: InterpolateOptions): (v: number) => T; - -/** - * Checks if an element is an HTML element in a way - * that works across iframes - */ -declare function isHTMLElement(element: unknown): element is HTMLElement; - -/** - * Checks if an element is an SVG element in a way - * that works across iframes - */ -declare function isSVGElement(element: unknown): element is SVGElement; - -/** - * Checks if an element is specifically an SVGSVGElement (the root SVG element) - * in a way that works across iframes - */ -declare function isSVGSVGElement(element: unknown): element is SVGSVGElement; - -declare function mix(from: T, to: T): Mixer; -declare function mix(from: number, to: number, p: number): number; - -type Transformer = (v: any) => any; -type ValueType = { - test: (v: any) => boolean; - parse: (v: any) => any; - transform?: Transformer; - createTransformer?: (template: string) => Transformer; - default?: any; - getAnimatableNone?: (v: any) => any; -}; -type NumberMap = { - [key: string]: number; -}; -type RGBA = { - red: number; - green: number; - blue: number; - alpha: number; -}; -type HSLA = { - hue: number; - saturation: number; - lightness: number; - alpha: number; -}; -type Color = HSLA | RGBA; - -declare const mixLinearColor: (from: number, to: number, v: number) => number; -declare const mixColor: (from: Color | string, to: Color | string) => (p: number) => string | Color; - -type MixableArray = Array; -interface MixableObject { - [key: string]: AnyResolvedKeyframe | RGBA | HSLA; -} -declare function getMixer(a: T): ((from: string | Color, to: string | Color) => (p: number) => string | Color) | ((origin: AnyResolvedKeyframe, target: AnyResolvedKeyframe) => Function) | typeof mixArray | typeof mixObject; -declare function mixArray(a: MixableArray, b: MixableArray): (p: number) => (string | number | RGBA | HSLA)[]; -declare function mixObject(a: MixableObject, b: MixableObject): (v: number) => { - [x: string]: AnyResolvedKeyframe | RGBA | HSLA; -}; -declare const mixComplex: (origin: AnyResolvedKeyframe, target: AnyResolvedKeyframe) => Function; - -declare function mixImmediate(a: T, b: T): (p: number) => T; - -declare const mixNumber: (from: number, to: number, progress: number) => number; - -declare const invisibleValues: Set; -/** - * Returns a function that, when provided a progress value between 0 and 1, - * will return the "none" or "hidden" string only when the progress is that of - * the origin or target. - */ -declare function mixVisibility(origin: string, target: string): (p: number) => string; - -type StaggerOrigin = "first" | "last" | "center" | number; -type StaggerOptions = { - startDelay?: number; - from?: StaggerOrigin; - ease?: Easing; -}; -declare function getOriginIndex(from: StaggerOrigin, total: number): number; -declare function stagger(duration?: number, { startDelay, from, ease }?: StaggerOptions): DynamicOption; - -/** - * Add the ability for test suites to manually set support flags - * to better test more environments. - */ -declare const supportsFlags: Record; - -declare const supportsLinearEasing: () => boolean; - -declare global { - interface Window { - ScrollTimeline: ScrollTimeline; - ViewTimeline: ViewTimeline; - } -} -declare class ScrollTimeline implements ProgressTimeline { - constructor(options: ScrollOptions); - currentTime: null | { - value: number; - }; - cancel?: VoidFunction; -} -declare class ViewTimeline implements ProgressTimeline { - constructor(options: { - subject: Element; - axis?: string; - }); - currentTime: null | { - value: number; - }; - cancel?: VoidFunction; -} -declare const supportsScrollTimeline: () => boolean; -declare const supportsViewTimeline: () => boolean; - -/** - * @public - */ -interface TransformOptions { - /** - * Clamp values to within the given range. Defaults to `true` - * - * @public - */ - clamp?: boolean; - /** - * Easing functions to use on the interpolations between each value in the input and output ranges. - * - * If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition **between** each. - * - * @public - */ - ease?: EasingFunction | EasingFunction[]; - /** - * Provide a function that can interpolate between any two values in the provided range. - * - * @public - */ - mixer?: (from: T, to: T) => (v: number) => any; -} -/** - * Transforms numbers into other values by mapping them from an input range to an output range. - * Returns the type of the input provided. - * - * @remarks - * - * Given an input range of `[0, 200]` and an output range of - * `[0, 1]`, this function will return a value between `0` and `1`. - * The input range must be a linear series of numbers. The output range - * can be any supported value type, such as numbers, colors, shadows, arrays, objects and more. - * Every value in the output range must be of the same type and in the same format. - * - * ```jsx - * export function MyComponent() { - * const inputRange = [0, 200] - * const outputRange = [0, 1] - * const output = transform(100, inputRange, outputRange) - * - * // Returns 0.5 - * return
{output}
- * } - * ``` - * - * @param inputValue - A number to transform between the input and output ranges. - * @param inputRange - A linear series of numbers (either all increasing or decreasing). - * @param outputRange - A series of numbers, colors, strings, or arrays/objects of those. Must be the same length as `inputRange`. - * @param options - Clamp: Clamp values to within the given range. Defaults to `true`. - * - * @public - */ -declare function transform(inputValue: number, inputRange: number[], outputRange: T[], options?: TransformOptions): T; -/** - * - * Transforms numbers into other values by mapping them from an input range to an output range. - * - * Given an input range of `[0, 200]` and an output range of - * `[0, 1]`, this function will return a value between `0` and `1`. - * The input range must be a linear series of numbers. The output range - * can be any supported value type, such as numbers, colors, shadows, arrays, objects and more. - * Every value in the output range must be of the same type and in the same format. - * - * ```jsx - * export function MyComponent() { - * const inputRange = [-200, -100, 100, 200] - * const outputRange = [0, 1, 1, 0] - * const convertRange = transform(inputRange, outputRange) - * const output = convertRange(-150) - * - * // Returns 0.5 - * return
{output}
- * } - * - * ``` - * - * @param inputRange - A linear series of numbers (either all increasing or decreasing). - * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`. - * @param options - Clamp: clamp values to within the given range. Defaults to `true`. - * - * @public - */ -declare function transform(inputRange: number[], outputRange: T[], options?: TransformOptions): (inputValue: number) => T; - -/** - * Options for useFollowValue hook, extending ValueAnimationTransition - * but excluding lifecycle callbacks that don't make sense for the hook pattern. - */ -type FollowValueOptions = Omit & { - /** - * When true, the first change from a tracked `MotionValue` source - * will jump to the new value instead of animating. Subsequent - * changes animate normally. This prevents unwanted animations - * on page refresh or back navigation (e.g. `useScroll` + `useSpring`). - * - * @default false - */ - skipInitialAnimation?: boolean; -}; -/** - * Create a `MotionValue` that animates to its latest value using any transition type. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = followValue(x, { type: "spring", stiffness: 300 }) - * // or with tween - * const z = followValue(x, { type: "tween", duration: 0.5, ease: "easeOut" }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns `MotionValue` - * - * @public - */ -declare function followValue(source: T | MotionValue, options?: FollowValueOptions): MotionValue; -/** - * Attach an animation to a MotionValue that will animate whenever the value changes. - * Similar to attachSpring but supports any transition type (spring, tween, inertia, etc.) - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns Cleanup function - * - * @public - */ -declare function attachFollow(value: MotionValue, source: T | MotionValue, options?: FollowValueOptions): VoidFunction; - -type MapInputRange = number[]; -/** - * Create a `MotionValue` that maps the output of another `MotionValue` by - * mapping it from one range of values into another. - * - * @remarks - * - * Given an input range of `[-200, -100, 100, 200]` and an output range of - * `[0, 1, 1, 0]`, the returned `MotionValue` will: - * - * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`. - * - When provided a value between `-100` and `100`, will return `1`. - * - When provided a value between `100` and `200`, will return a value between `1` and `0` - * - * The input range must be a linear series of numbers. The output range - * can be any value type supported by Motion: numbers, colors, shadows, etc. - * - * Every value in the output range must be of the same type and in the same format. - * - * ```jsx - * const x = motionValue(0) - * const xRange = [-200, -100, 100, 200] - * const opacityRange = [0, 1, 1, 0] - * const opacity = mapValue(x, xRange, opacityRange) - * ``` - * - * @param inputValue - `MotionValue` - * @param inputRange - A linear series of numbers (either all increasing or decreasing) - * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`. - * @param options - - * - * - clamp: boolean. Clamp values to within the given range. Defaults to `true` - * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each. - * - * @returns `MotionValue` - * - * @public - */ -declare function mapValue(inputValue: MotionValue, inputRange: MapInputRange, outputRange: O[], options?: TransformOptions): MotionValue; - -/** - * Create a `MotionValue` that animates to its latest value using a spring. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = springValue(x, { stiffness: 300 }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns `MotionValue` - * - * @public - */ -declare function springValue(source: T | MotionValue, options?: SpringOptions): MotionValue; -/** - * Attach a spring animation to a MotionValue that will animate whenever the value changes. - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns Cleanup function - * - * @public - */ -declare function attachSpring(value: MotionValue, source: T | MotionValue, options?: SpringOptions): VoidFunction; - -type TransformInputRange = number[]; -type SingleTransformer = (input: I) => O; -type MultiTransformer = (input: I[]) => O; -type ValueTransformer = SingleTransformer | MultiTransformer; -/** - * Create a `MotionValue` that transforms the output of other `MotionValue`s by - * passing their latest values through a transform function. - * - * Whenever a `MotionValue` referred to in the provided function is updated, - * it will be re-evaluated. - * - * ```jsx - * const x = motionValue(0) - * const y = transformValue(() => x.get() * 2) // double x - * ``` - * - * @param transformer - A transform function. This function must be pure with no side-effects or conditional statements. - * @returns `MotionValue` - * - * @public - */ -declare function transformValue(transform: () => O): MotionValue; - -declare const color: { - test: (v: any) => boolean; - parse: (v: any) => RGBA | HSLA; - transform: (v: HSLA | RGBA | string) => string; - getAnimatableNone: (v: string) => string; -}; - -declare function parseHex(v: string): RGBA; -declare const hex: { - test: (v: any) => boolean; - parse: typeof parseHex; - transform: ({ red, green, blue, alpha }: RGBA) => string; -}; - -declare const hsla: { - test: (v: any) => boolean; - parse: (v: string | Color) => HSLA; - transform: ({ hue, saturation, lightness, alpha }: HSLA) => string; -}; - -declare function hslaToRgba({ hue, saturation, lightness, alpha }: HSLA): RGBA; - -declare const rgbUnit: { - transform: (v: number) => number; - test: (v: number) => boolean; - parse: typeof parseFloat; -}; -declare const rgba: { - test: (v: any) => boolean; - parse: (v: string | Color) => RGBA; - transform: ({ red, green, blue, alpha }: RGBA) => string; -}; - -declare function test(v: any): boolean; -type ComplexValues = Array; -interface ValueIndexes { - color: number[]; - number: number[]; - var: number[]; -} -interface ComplexValueInfo { - values: ComplexValues; - split: string[]; - indexes: ValueIndexes; - types: Array; -} -declare function analyseComplexValue(value: AnyResolvedKeyframe): ComplexValueInfo; -declare function parseComplexValue(v: AnyResolvedKeyframe): ComplexValues; -declare function createTransformer(source: AnyResolvedKeyframe): (v: (string | number | Color)[]) => string; -declare function getAnimatableNone$1(v: AnyResolvedKeyframe): string; -declare const complex: { - test: typeof test; - parse: typeof parseComplexValue; - createTransformer: typeof createTransformer; - getAnimatableNone: typeof getAnimatableNone$1; -}; - -/** - * A list of value types commonly used for dimensions - */ -declare const dimensionValueTypes: ({ - test: (v: number) => boolean; - parse: typeof parseFloat; - transform: (v: number) => number; -} | { - test: (v: AnyResolvedKeyframe) => boolean; - parse: typeof parseFloat; - transform: (v: string | number) => string; -} | ValueType)[]; -/** - * Tests a dimensional value against the list of dimension ValueTypes - */ -declare const findDimensionValueType: (v: any) => { - test: (v: number) => boolean; - parse: typeof parseFloat; - transform: (v: number) => number; -} | { - test: (v: AnyResolvedKeyframe) => boolean; - parse: typeof parseFloat; - transform: (v: string | number) => string; -} | ValueType | undefined; - -interface ValueTypeMap { - [key: string]: ValueType; -} - -/** - * A map of default value types for common values - */ -declare const defaultValueTypes: ValueTypeMap; -/** - * Gets the default ValueType for the provided value key - */ -declare const getDefaultValueType: (key: string) => ValueType; - -declare const numberValueTypes: ValueTypeMap; - -declare const transformValueTypes: ValueTypeMap; - -declare const number: { - test: (v: number) => boolean; - parse: typeof parseFloat; - transform: (v: number) => number; -}; -declare const alpha: { - transform: (v: number) => number; - test: (v: number) => boolean; - parse: typeof parseFloat; -}; -declare const scale: { - default: number; - test: (v: number) => boolean; - parse: typeof parseFloat; - transform: (v: number) => number; -}; - -declare const degrees: { - test: (v: AnyResolvedKeyframe) => boolean; - parse: typeof parseFloat; - transform: (v: number | string) => string; -}; -declare const percent: { - test: (v: AnyResolvedKeyframe) => boolean; - parse: typeof parseFloat; - transform: (v: number | string) => string; -}; -declare const px: { - test: (v: AnyResolvedKeyframe) => boolean; - parse: typeof parseFloat; - transform: (v: number | string) => string; -}; -declare const vh: { - test: (v: AnyResolvedKeyframe) => boolean; - parse: typeof parseFloat; - transform: (v: number | string) => string; -}; -declare const vw: { - test: (v: AnyResolvedKeyframe) => boolean; - parse: typeof parseFloat; - transform: (v: number | string) => string; -}; -declare const progressPercentage: { - parse: (v: string) => number; - transform: (v: number) => string; - test: (v: AnyResolvedKeyframe) => boolean; -}; - -/** - * Tests a provided value against a ValueType - */ -declare const testValueType: (v: any) => (type: ValueType) => boolean; - -declare function getAnimatableNone(key: string, value: string): any; - -/** - * Tests a value against the list of ValueTypes - */ -declare const findValueType: (v: any) => { - test: (v: number) => boolean; - parse: typeof parseFloat; - transform: (v: number) => number; -} | { - test: (v: AnyResolvedKeyframe) => boolean; - parse: typeof parseFloat; - transform: (v: string | number) => string; -} | ValueType | { - test: (v: any) => boolean; - parse: (v: any) => RGBA | HSLA; - transform: (v: string | RGBA | HSLA) => string; - getAnimatableNone: (v: string) => string; -} | { - test: (v: any) => boolean; - parse: (v: AnyResolvedKeyframe) => ComplexValues; - createTransformer: (source: AnyResolvedKeyframe) => (v: (string | number | Color)[]) => string; - getAnimatableNone: (v: AnyResolvedKeyframe) => string; -} | undefined; - -/** - * Provided a value and a ValueType, returns the value as that value type. - */ -declare const getValueAsType: (value: any, type?: ValueType) => any; - -declare const isMotionValue: (value: any) => value is MotionValue; - -declare function addValueToWillChange(visualElement: VisualElement, key: string): void; - -interface WillChange extends MotionValue { - add(name: string): void; -} - -declare function isWillChangeMotionValue(value: any): value is WillChange; - -type ViewTransitionAnimationDefinition = { - keyframes: DOMKeyframesDefinition; - options: AnimationOptions; -}; -type ViewTransitionTarget = { - layout?: ViewTransitionAnimationDefinition; - enter?: ViewTransitionAnimationDefinition; - exit?: ViewTransitionAnimationDefinition; - new?: ViewTransitionAnimationDefinition; - old?: ViewTransitionAnimationDefinition; -}; -type ViewTransitionOptions = AnimationOptions & { - interrupt?: "wait" | "immediate"; -}; -type ViewTransitionTargetDefinition = string | Element; - -declare class ViewTransitionBuilder { - private currentSubject; - targets: Map; - update: () => void | Promise; - options: ViewTransitionOptions; - notifyReady: (value: GroupAnimation) => void; - private readyPromise; - constructor(update: () => void | Promise, options?: ViewTransitionOptions); - get(subject: ViewTransitionTargetDefinition): this; - layout(keyframes: DOMKeyframesDefinition, options?: AnimationOptions): this; - new(keyframes: DOMKeyframesDefinition, options?: AnimationOptions): this; - old(keyframes: DOMKeyframesDefinition, options?: AnimationOptions): this; - enter(keyframes: DOMKeyframesDefinition, options?: AnimationOptions): this; - exit(keyframes: DOMKeyframesDefinition, options?: AnimationOptions): this; - crossfade(options?: AnimationOptions): this; - updateTarget(target: "enter" | "exit" | "layout" | "new" | "old", keyframes: DOMKeyframesDefinition, options?: AnimationOptions): void; - then(resolve: () => void, reject?: () => void): Promise; -} -declare function animateView(update: () => void | Promise, defaultOptions?: ViewTransitionOptions): ViewTransitionBuilder; - -declare function getViewAnimationLayerInfo(pseudoElement: string): { - layer: string; - type: string; -} | null; - -declare function getViewAnimations(): Animation[]; - -interface DOMVisualElementOptions { - /** - * If `true`, this element will be included in the projection tree. - * - * Default: `true` - * - * @public - */ - allowProjection?: boolean; - /** - * Allow this element to be GPU-accelerated. We currently enable this by - * adding a `translateZ(0)`. - * - * @public - */ - enableHardwareAcceleration?: boolean; -} - -declare abstract class DOMVisualElement extends VisualElement { - sortInstanceNodePosition(a: Instance, b: Instance): number; - getBaseTargetFromProps(props: MotionNodeOptions, key: string): AnyResolvedKeyframe | MotionValue | undefined; - removeValueFromRenderState(key: string, { vars, style }: HTMLRenderState): void; - KeyframeResolver: typeof DOMKeyframesResolver; - childSubscription?: VoidFunction; - handleChildMotionValue(): void; -} - -/** - * Feature base class for extending VisualElement functionality. - * Features are plugins that can be mounted/unmounted to add behavior - * like gestures, animations, or layout tracking. - */ -declare abstract class Feature { - isMounted: boolean; - node: VisualElement; - constructor(node: VisualElement); - abstract mount(): void; - abstract unmount(): void; - update(): void; -} - -declare function renderHTML(element: HTMLElement, { style, vars }: HTMLRenderState, styleProp?: MotionStyle, projection?: any): void; - -declare class HTMLVisualElement extends DOMVisualElement { - type: string; - readValueFromInstance(instance: HTMLElement, key: string): AnyResolvedKeyframe | null | undefined; - measureInstanceViewportBox(instance: HTMLElement, { transformPagePoint }: MotionNodeOptions & Partial): Box; - build(renderState: HTMLRenderState, latestValues: ResolvedValues$1, props: MotionNodeOptions): void; - scrapeMotionValuesFromProps(props: MotionNodeOptions, prevProps: MotionNodeOptions, visualElement: VisualElement): { - [key: string]: any; - }; - renderInstance: typeof renderHTML; -} - -interface ObjectRenderState { - output: ResolvedValues$1; -} -declare class ObjectVisualElement extends VisualElement { - type: string; - readValueFromInstance(instance: Object, key: string): undefined; - getBaseTargetFromProps(): undefined; - removeValueFromRenderState(key: string, renderState: ObjectRenderState): void; - measureInstanceViewportBox(): motion_utils.Box; - build(renderState: ObjectRenderState, latestValues: ResolvedValues$1): void; - renderInstance(instance: Object, { output }: ObjectRenderState): void; - sortInstanceNodePosition(): number; -} - -declare const visualElementStore: WeakMap>; - -declare class SVGVisualElement extends DOMVisualElement { - type: string; - isSVGTag: boolean; - getBaseTargetFromProps(props: MotionNodeOptions, key: string): AnyResolvedKeyframe | MotionValue | undefined; - readValueFromInstance(instance: SVGElement, key: string): any; - measureInstanceViewportBox: () => motion_utils.Box; - scrapeMotionValuesFromProps(props: MotionNodeOptions, prevProps: MotionNodeOptions, visualElement: VisualElement): { - [key: string]: any; - }; - build(renderState: SVGRenderState, latestValues: ResolvedValues$1, props: MotionNodeOptions): void; - renderInstance(instance: SVGElement, renderState: SVGRenderState, styleProp?: MotionStyle | undefined, projection?: any): void; - mount(instance: SVGElement): void; -} - -type VariantStateContext = { - initial?: string | string[]; - animate?: string | string[]; - exit?: string | string[]; - whileHover?: string | string[]; - whileDrag?: string | string[]; - whileFocus?: string | string[]; - whileTap?: string | string[]; -}; -/** - * Get variant context from a visual element's parent chain. - * Uses `any` type for visualElement to avoid circular dependencies. - */ -declare function getVariantContext(visualElement?: any): undefined | VariantStateContext; - -declare function isAnimationControls(v?: unknown): v is LegacyAnimationControls; - -declare function isControllingVariants(props: MotionNodeOptions): boolean; -declare function isVariantNode(props: MotionNodeOptions): boolean; - -/** - * Minimal interface for projection node properties used by scale correctors. - * This avoids circular dependencies with the full IProjectionNode interface. - */ -interface ScaleCorrectionNode { - target?: Box; - treeScale?: Point; - projectionDelta?: Delta; -} -type ScaleCorrector = (latest: AnyResolvedKeyframe, node: ScaleCorrectionNode) => AnyResolvedKeyframe; -interface ScaleCorrectorDefinition { - correct: ScaleCorrector; - applyTo?: string[]; - isCSSVariable?: boolean; -} -interface ScaleCorrectorMap { - [key: string]: ScaleCorrectorDefinition; -} - -declare const scaleCorrectors: ScaleCorrectorMap; -declare function addScaleCorrector(correctors: ScaleCorrectorMap): void; - -declare function isForcedMotionValue(key: string, { layout, layoutId }: MotionNodeOptions): boolean; - -/** - * Decides if the supplied variable is variant label - */ -declare function isVariantLabel(v: unknown): v is string | string[]; - -type MotionStyleLike = Record; -/** - * Updates motion values from props changes. - * Uses `any` type for element to avoid circular dependencies with VisualElement. - */ -declare function updateMotionValuesFromProps(element: any, next: MotionStyleLike, prev: MotionStyleLike): MotionStyleLike; - -/** - * Resolves a variant if it's a variant resolver. - * Uses `any` type for visualElement to avoid circular dependencies. - */ -declare function resolveVariant(visualElement: any, definition?: TargetAndTransition | TargetResolver, custom?: any): TargetAndTransition; -declare function resolveVariant(visualElement: any, definition?: AnimationDefinition, custom?: any): TargetAndTransition | undefined; - -declare function resolveVariantFromProps(props: MotionNodeOptions, definition: TargetAndTransition | TargetResolver, custom?: any, visualElement?: any): TargetAndTransition; -declare function resolveVariantFromProps(props: MotionNodeOptions, definition?: AnimationDefinition, custom?: any, visualElement?: any): undefined | TargetAndTransition; - -declare function setTarget(visualElement: VisualElement, definition: AnimationDefinition): void; - -declare const variantPriorityOrder: AnimationType[]; -declare const variantProps: string[]; - -interface ReducedMotionState { - current: boolean | null; -} -declare const prefersReducedMotion: ReducedMotionState; -declare const hasReducedMotionListener: { - current: boolean; -}; - -declare function initPrefersReducedMotion(): void; - -/** - * Bounding boxes tend to be defined as top, left, right, bottom. For various operations - * it's easier to consider each axis individually. This function returns a bounding box - * as a map of single-axis min/max values. - */ -declare function convertBoundingBoxToBox({ top, left, right, bottom, }: BoundingBox): Box; -declare function convertBoxToBoundingBox({ x, y }: Box): BoundingBox; -/** - * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function - * provided by Framer to allow measured points to be corrected for device scaling. This is used - * when measuring DOM elements and DOM event points. - */ -declare function transformBoxPoints(point: BoundingBox, transformPoint?: TransformPoint): BoundingBox; - -/** - * Reset an axis to the provided origin box. - * - * This is a mutative operation. - */ -declare function copyAxisInto(axis: Axis, originAxis: Axis): void; -/** - * Reset a box to the provided origin box. - * - * This is a mutative operation. - */ -declare function copyBoxInto(box: Box, originBox: Box): void; -/** - * Reset a delta to the provided origin box. - * - * This is a mutative operation. - */ -declare function copyAxisDeltaInto(delta: AxisDelta, originDelta: AxisDelta): void; - -/** - * Scales a point based on a factor and an originPoint - */ -declare function scalePoint(point: number, scale: number, originPoint: number): number; -/** - * Applies a translate/scale delta to a point - */ -declare function applyPointDelta(point: number, translate: number, scale: number, originPoint: number, boxScale?: number): number; -/** - * Applies a translate/scale delta to an axis - */ -declare function applyAxisDelta(axis: Axis, translate: number | undefined, scale: number | undefined, originPoint: number, boxScale?: number): void; -/** - * Applies a translate/scale delta to a box - */ -declare function applyBoxDelta(box: Box, { x, y }: Delta): void; -/** - * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms - * in a tree upon our box before then calculating how to project it into our desired viewport-relative box - * - * This is the final nested loop within updateLayoutDelta for future refactoring - */ -declare function applyTreeDeltas(box: Box, treeScale: Point, treePath: any[], isSharedTransition?: boolean): void; -declare function translateAxis(axis: Axis, distance: number): void; -/** - * Apply a transform to an axis from the latest resolved motion values. - * This function basically acts as a bridge between a flat motion value map - * and applyAxisDelta - */ -declare function transformAxis(axis: Axis, axisTranslate?: number, axisScale?: number, boxScale?: number, axisOrigin?: number): void; -/** - * Apply a transform to a box from the latest resolved motion values. - */ -declare function transformBox(box: Box, transform: ResolvedValues$1, sourceBox?: Box): void; - -declare function calcLength(axis: Axis): number; -declare function isNear(value: number, target: number, maxDistance: number): boolean; -declare function calcAxisDelta(delta: AxisDelta, source: Axis, target: Axis, origin?: number): void; -declare function calcBoxDelta(delta: Delta, source: Box, target: Box, origin?: ResolvedValues$1): void; -declare function calcRelativeAxis(target: Axis, relative: Axis, parent: Axis, anchor?: number): void; -declare function calcRelativeBox(target: Box, relative: Box, parent: Box, anchor?: Point): void; -declare function calcRelativeAxisPosition(target: Axis, layout: Axis, parent: Axis, anchor?: number): void; -declare function calcRelativePosition(target: Box, layout: Box, parent: Box, anchor?: Point): void; - -/** - * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse - */ -declare function removePointDelta(point: number, translate: number, scale: number, originPoint: number, boxScale?: number): number; -/** - * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse - */ -declare function removeAxisDelta(axis: Axis, translate?: number | string, scale?: number, origin?: number, boxScale?: number, originAxis?: Axis, sourceAxis?: Axis): void; -/** - * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ -declare function removeAxisTransforms(axis: Axis, transforms: ResolvedValues$1, [key, scaleKey, originKey]: string[], origin?: Axis, sourceAxis?: Axis): void; -/** - * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ -declare function removeBoxTransforms(box: Box, transforms: ResolvedValues$1, originBox?: Box, sourceBox?: Box): void; - -declare const createAxisDelta: () => AxisDelta; -declare const createDelta: () => Delta; -declare const createAxis: () => Axis; -declare const createBox: () => Box; - -declare function isDeltaZero(delta: Delta): boolean; -declare function axisEquals(a: Axis, b: Axis): boolean; -declare function boxEquals(a: Box, b: Box): boolean; -declare function axisEqualsRounded(a: Axis, b: Axis): boolean; -declare function boxEqualsRounded(a: Box, b: Box): boolean; -declare function aspectRatio(box: Box): number; -declare function axisDeltaEquals(a: AxisDelta, b: AxisDelta): boolean; - -type Callback = (axis: "x" | "y") => void; -declare function eachAxis(callback: Callback): void[]; - -declare function hasScale({ scale, scaleX, scaleY }: ResolvedValues$1): boolean; -declare function hasTransform(values: ResolvedValues$1): true | AnyResolvedKeyframe; -declare function has2DTranslate(values: ResolvedValues$1): boolean | "" | 0 | undefined; - -declare function measureViewportBox(instance: HTMLElement, transformPoint?: TransformPoint): motion_utils.Box; -declare function measurePageBox(element: HTMLElement, rootProjectionNode: any, transformPagePoint?: TransformPoint): motion_utils.Box; - -declare function pixelsToPercent(pixels: number, axis: Axis): number; -/** - * We always correct borderRadius as a percentage rather than pixels to reduce paints. - * For example, if you are projecting a box that is 100px wide with a 10px borderRadius - * into a box that is 200px wide with a 20px borderRadius, that is actually a 10% - * borderRadius in both states. If we animate between the two in pixels that will trigger - * a paint each time. If we animate between the two in percentage we'll avoid a paint. - */ -declare const correctBorderRadius: ScaleCorrectorDefinition; - -declare const correctBoxShadow: ScaleCorrectorDefinition; - -declare function buildProjectionTransform(delta: Delta, treeScale: Point, latestTransform?: ResolvedValues$1): string; - -declare function mixValues(target: ResolvedValues$1, follow: ResolvedValues$1, lead: ResolvedValues$1, progress: number, shouldCrossfadeOpacity: boolean, isOnlyMember: boolean): void; - -declare function animateSingleValue(value: MotionValue | V, keyframes: V | UnresolvedValueKeyframe[], options?: ValueAnimationTransition): AnimationPlaybackControlsWithThen; - -declare function addDomEvent(target: EventTarget, eventName: string, handler: EventListener, options?: AddEventListenerOptions): () => void; - -interface WithDepth { - depth: number; -} -declare const compareByDepth: (a: VisualElement, b: VisualElement) => number; - -declare class FlatTree { - private children; - private isDirty; - add(child: WithDepth): void; - remove(child: WithDepth): void; - forEach(callback: (child: WithDepth) => void): void; -} - -type DelayedFunction = (overshoot: number) => void; -/** - * Timeout defined in ms - */ -declare function delay(callback: DelayedFunction, timeout: number): () => void; -declare function delayInSeconds(callback: DelayedFunction, timeout: number): () => void; - -/** - * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself - */ -declare function resolveMotionValue(value?: AnyResolvedKeyframe | MotionValue): AnyResolvedKeyframe; - -interface Measurements { - animationId: number; - measuredBox: Box; - layoutBox: Box; - latestValues: ResolvedValues$1; - source: number; -} -type Phase = "snapshot" | "measure"; -interface ScrollMeasurements { - animationId: number; - phase: Phase; - offset: Point; - isRoot: boolean; - wasRoot: boolean; -} -type LayoutEvents = "willUpdate" | "didUpdate" | "beforeMeasure" | "measure" | "projectionUpdate" | "animationStart" | "animationComplete"; -interface IProjectionNode { - linkedParentVersion: number; - layoutVersion: number; - id: number; - animationId: number; - animationCommitId: number; - parent?: IProjectionNode; - relativeParent?: IProjectionNode; - root?: IProjectionNode; - children: Set; - path: IProjectionNode[]; - nodes?: FlatTree; - depth: number; - instance: I | undefined; - mount: (node: I, isLayoutDirty?: boolean) => void; - unmount: () => void; - options: ProjectionNodeOptions; - setOptions(options: ProjectionNodeOptions): void; - layout?: Measurements; - snapshot?: Measurements; - target?: Box; - relativeTarget?: Box; - relativeTargetOrigin?: Box; - targetDelta?: Delta; - targetWithTransforms?: Box; - scroll?: ScrollMeasurements; - treeScale?: Point; - projectionDelta?: Delta; - projectionDeltaWithTransform?: Delta; - latestValues: ResolvedValues$1; - isLayoutDirty: boolean; - isProjectionDirty: boolean; - isSharedProjectionDirty: boolean; - isTransformDirty: boolean; - resolvedRelativeTargetAt?: number; - shouldResetTransform: boolean; - prevTransformTemplateValue: string | undefined; - isUpdateBlocked(): boolean; - updateManuallyBlocked: boolean; - updateBlockedByResize: boolean; - blockUpdate(): void; - unblockUpdate(): void; - isUpdating: boolean; - needsReset: boolean; - startUpdate(): void; - willUpdate(notifyListeners?: boolean): void; - didUpdate(): void; - measure(removeTransform?: boolean): Measurements; - measurePageBox(): Box; - updateLayout(): void; - updateSnapshot(): void; - clearSnapshot(): void; - updateScroll(phase?: Phase): void; - scheduleUpdateProjection(): void; - scheduleCheckAfterUnmount(): void; - checkUpdateFailed(): void; - sharedNodes: Map; - registerSharedNode(id: string, node: IProjectionNode): void; - getStack(): NodeStack | undefined; - isVisible: boolean; - hide(): void; - show(): void; - scheduleRender(notifyAll?: boolean): void; - getClosestProjectingParent(): IProjectionNode | undefined; - setTargetDelta(delta: Delta): void; - resetTransform(): void; - resetSkewAndRotation(): void; - applyTransform(box: Box, transformOnly?: boolean, output?: Box): Box; - resolveTargetDelta(force?: boolean): void; - calcProjection(): void; - applyProjectionStyles(targetStyle: CSSStyleDeclaration, styleProp?: MotionStyle): void; - clearMeasurements(): void; - resetTree(): void; - isProjecting(): boolean; - animationValues?: ResolvedValues$1; - currentAnimation?: JSAnimation; - isTreeAnimating?: boolean; - isAnimationBlocked?: boolean; - isTreeAnimationBlocked: () => boolean; - setAnimationOrigin(delta: Delta, hasOnlyRelativeTargetChanged?: boolean, pathFn?: MotionPath): void; - startAnimation(transition: ValueTransition): void; - finishAnimation(): void; - hasCheckedOptimisedAppear: boolean; - isLead(): boolean; - promote(options?: { - needsReset?: boolean; - transition?: Transition; - preserveFollowOpacity?: boolean; - }): void; - relegate(): boolean; - resumeFrom?: IProjectionNode; - resumingFrom?: IProjectionNode; - isPresent?: boolean; - addEventListener(name: LayoutEvents, handler: any): VoidFunction; - notifyListeners(name: LayoutEvents, ...args: any): void; - hasListeners(name: LayoutEvents): boolean; - hasTreeAnimated: boolean; - preserveOpacity?: boolean; -} -interface LayoutUpdateData { - layout: Box; - snapshot: Measurements; - delta: Delta; - layoutDelta: Delta; - hasLayoutChanged: boolean; - hasRelativeLayoutChanged: boolean; -} -type LayoutUpdateHandler = (data: LayoutUpdateData) => void; -interface ProjectionNodeConfig { - defaultParent?: () => IProjectionNode; - attachResizeListener?: (instance: I, notifyResize: VoidFunction) => VoidFunction; - measureScroll: (instance: I) => Point; - checkIsScrollRoot: (instance: I) => boolean; - resetTransform?: (instance: I, value?: string) => void; -} -/** - * Configuration for initial promotion of shared layout elements. - * This was originally in React's SwitchLayoutGroupContext but is now - * framework-agnostic to support vanilla JS usage. - */ -interface InitialPromotionConfig { - /** - * The initial transition to use when the elements in this group mount (and automatically promoted). - * Subsequent updates should provide a transition in the promote method. - */ - transition?: Transition; - /** - * If the follow tree should preserve its opacity when the lead is promoted on mount - */ - shouldPreserveFollowOpacity?: (member: IProjectionNode) => boolean; -} -interface ProjectionNodeOptions { - animate?: boolean; - layoutScroll?: boolean; - layoutRoot?: boolean; - alwaysMeasureLayout?: boolean; - onExitComplete?: VoidFunction; - animationType?: "size" | "position" | "both" | "preserve-aspect" | "x" | "y"; - layoutId?: string; - layout?: boolean | string; - visualElement?: VisualElement; - crossfade?: boolean; - transition?: Transition; - initialPromotionConfig?: InitialPromotionConfig; - layoutDependency?: unknown; - layoutAnchor?: Point | false; -} -type ProjectionEventName = "layoutUpdate" | "projectionUpdate"; - -declare class NodeStack { - lead?: IProjectionNode; - prevLead?: IProjectionNode; - members: IProjectionNode[]; - add(node: IProjectionNode): void; - remove(node: IProjectionNode): void; - relegate(node: IProjectionNode): boolean; - promote(node: IProjectionNode, preserveFollowOpacity?: boolean): void; - exitAnimationComplete(): void; - scheduleRender(): void; - removeLeadSnapshot(): void; -} - -declare function createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }: ProjectionNodeConfig): { - new (latestValues?: ResolvedValues$1, parent?: IProjectionNode | undefined): { - /** - * A unique ID generated for every projection node. - */ - id: number; - /** - * An id that represents a unique session instigated by startUpdate. - */ - animationId: number; - animationCommitId: number; - /** - * A reference to the platform-native node (currently this will be a HTMLElement). - */ - instance: I | undefined; - /** - * A reference to the root projection node. There'll only ever be one tree and one root. - */ - root: IProjectionNode; - /** - * A reference to this node's parent. - */ - parent?: IProjectionNode | undefined; - /** - * A path from this node to the root node. This provides a fast way to iterate - * back up the tree. - */ - path: IProjectionNode[]; - /** - * A Set containing all this component's children. This is used to iterate - * through the children. - * - * TODO: This could be faster to iterate as a flat array stored on the root node. - */ - children: Set>; - /** - * Options for the node. We use this to configure what kind of layout animations - * we should perform (if any). - */ - options: ProjectionNodeOptions; - /** - * A snapshot of the element's state just before the current update. This is - * hydrated when this node's `willUpdate` method is called and scrubbed at the - * end of the tree's `didUpdate` method. - */ - snapshot: Measurements | undefined; - /** - * A box defining the element's layout relative to the page. This will have been - * captured with all parent scrolls and projection transforms unset. - */ - layout: Measurements | undefined; - /** - * The layout used to calculate the previous layout animation. We use this to compare - * layouts between renders and decide whether we need to trigger a new layout animation - * or just let the current one play out. - */ - targetLayout?: Box | undefined; - /** - * A mutable data structure we use to apply all parent transforms currently - * acting on the element's layout. It's from here we can calculate the projectionDelta - * required to get the element from its layout into its calculated target box. - */ - layoutCorrected: Box; - /** - * An ideal projection transform we want to apply to the element. This is calculated, - * usually when an element's layout has changed, and we want the element to look as though - * its in its previous layout on the next frame. From there, we animated it down to 0 - * to animate the element to its new layout. - */ - targetDelta?: Delta | undefined; - /** - * A mutable structure representing the visual bounding box on the page where we want - * and element to appear. This can be set directly but is currently derived once a frame - * from apply targetDelta to layout. - */ - target?: Box | undefined; - /** - * A mutable structure describing a visual bounding box relative to the element's - * projected parent. If defined, target will be derived from this rather than targetDelta. - * If not defined, we'll attempt to calculate on the first layout animation frame - * based on the targets calculated from targetDelta. This will transfer a layout animation - * from viewport-relative to parent-relative. - */ - relativeTarget?: Box | undefined; - relativeTargetOrigin?: Box | undefined; - relativeParent?: IProjectionNode | undefined; - /** - * We use this to detect when its safe to shut down part of a projection tree. - * We have to keep projecting children for scale correction and relative projection - * until all their parents stop performing layout animations. - */ - isTreeAnimating: boolean; - isAnimationBlocked: boolean; - /** - * If true, attempt to resolve relativeTarget. - */ - attemptToResolveRelativeTarget?: boolean | undefined; - /** - * A mutable structure that represents the target as transformed by the element's - * latest user-set transforms (ie scale, x) - */ - targetWithTransforms?: Box | undefined; - /** - * The previous projection delta, which we can compare with the newly calculated - * projection delta to see if we need to render. - */ - prevProjectionDelta?: Delta | undefined; - /** - * A calculated transform that will project an element from its layoutCorrected - * into the target. This will be used by children to calculate their own layoutCorrect boxes. - */ - projectionDelta?: Delta | undefined; - /** - * A calculated transform that will project an element from its layoutCorrected - * into the targetWithTransforms. - */ - projectionDeltaWithTransform?: Delta | undefined; - /** - * If we're tracking the scroll of this element, we store it here. - */ - scroll?: ScrollMeasurements | undefined; - /** - * Flag to true if we think this layout has been changed. We can't always know this, - * currently we set it to true every time a component renders, or if it has a layoutDependency - * if that has changed between renders. Additionally, components can be grouped by LayoutGroup - * and if one node is dirtied, they all are. - */ - isLayoutDirty: boolean; - /** - * Flag to true if we think the projection calculations for this node needs - * recalculating as a result of an updated transform or layout animation. - */ - isProjectionDirty: boolean; - /** - * Flag to true if the layout *or* transform has changed. This then gets propagated - * throughout the projection tree, forcing any element below to recalculate on the next frame. - */ - isSharedProjectionDirty: boolean; - /** - * Flag transform dirty. This gets propagated throughout the whole tree but is only - * respected by shared nodes. - */ - isTransformDirty: boolean; - /** - * Block layout updates for instant layout transitions throughout the tree. - */ - updateManuallyBlocked: boolean; - updateBlockedByResize: boolean; - /** - * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate` - * call. - */ - isUpdating: boolean; - /** - * If this is an SVG element we currently disable projection transforms - */ - isSVG: boolean; - /** - * Flag to true (during promotion) if a node doing an instant layout transition needs to reset - * its projection styles. - */ - needsReset: boolean; - /** - * Flags whether this node should have its transform reset prior to measuring. - */ - shouldResetTransform: boolean; - /** - * Store whether this node has been checked for optimised appear animations. As - * effects fire bottom-up, and we want to look up the tree for appear animations, - * this makes sure we only check each path once, stopping at nodes that - * have already been checked. - */ - hasCheckedOptimisedAppear: boolean; - /** - * An object representing the calculated contextual/accumulated/tree scale. - * This will be used to scale calculcated projection transforms, as these are - * calculated in screen-space but need to be scaled for elements to layoutly - * make it to their calculated destinations. - * - * TODO: Lazy-init - */ - treeScale: Point; - /** - * Is hydrated with a projection node if an element is animating from another. - */ - resumeFrom?: IProjectionNode | undefined; - /** - * Is hydrated with a projection node if an element is animating from another. - */ - resumingFrom?: IProjectionNode | undefined; - /** - * A reference to the element's latest animated values. This is a reference shared - * between the element's VisualElement and the ProjectionNode. - */ - latestValues: ResolvedValues$1; - /** - * - */ - eventHandlers: Map>; - nodes?: FlatTree | undefined; - depth: number; - /** - * If transformTemplate generates a different value before/after the - * update, we need to reset the transform. - */ - prevTransformTemplateValue: string | undefined; - preserveOpacity?: boolean | undefined; - hasTreeAnimated: boolean; - layoutVersion: number; - addEventListener(name: LayoutEvents, handler: any): VoidFunction; - notifyListeners(name: LayoutEvents, ...args: any): void; - hasListeners(name: LayoutEvents): boolean; - /** - * Lifecycles - */ - mount(instance: I): void; - unmount(): void; - blockUpdate(): void; - unblockUpdate(): void; - isUpdateBlocked(): boolean; - isTreeAnimationBlocked(): boolean; - startUpdate(): void; - getTransformTemplate(): TransformTemplate | undefined; - willUpdate(shouldNotifyListeners?: boolean): void; - updateScheduled: boolean; - update(): void; - scheduleUpdate: () => void; - didUpdate(): void; - clearAllSnapshots(): void; - projectionUpdateScheduled: boolean; - scheduleUpdateProjection(): void; - scheduleCheckAfterUnmount(): void; - checkUpdateFailed: () => void; - /** - * This is a multi-step process as shared nodes might be of different depths. Nodes - * are sorted by depth order, so we need to resolve the entire tree before moving to - * the next step. - */ - updateProjection: () => void; - /** - * Update measurements - */ - updateSnapshot(): void; - updateLayout(): void; - updateScroll(phase?: Phase): void; - resetTransform(): void; - measure(removeTransform?: boolean): { - animationId: number; - measuredBox: Box; - layoutBox: Box; - latestValues: {}; - source: number; - }; - measurePageBox(): Box; - removeElementScroll(box: Box): Box; - applyTransform(box: Box, transformOnly?: boolean, output?: Box): Box; - removeTransform(box: Box): Box; - setTargetDelta(delta: Delta): void; - setOptions(options: ProjectionNodeOptions): void; - clearMeasurements(): void; - forceRelativeParentToResolveTarget(): void; - /** - * Frame calculations - */ - resolvedRelativeTargetAt: number; - resolveTargetDelta(forceRecalculation?: boolean): void; - getClosestProjectingParent(): IProjectionNode | undefined; - isProjecting(): boolean; - linkedParentVersion: number; - createRelativeTarget(relativeParent: IProjectionNode, layout: Box, parentLayout: Box): void; - removeRelativeTarget(): void; - hasProjected: boolean; - calcProjection(): void; - isVisible: boolean; - hide(): void; - show(): void; - scheduleRender(notifyAll?: boolean): void; - createProjectionDeltas(): void; - /** - * Animation - */ - animationValues?: ResolvedValues$1 | undefined; - pendingAnimation?: Process | undefined; - currentAnimation?: JSAnimation | undefined; - mixTargetDelta: (progress: number) => void; - animationProgress: number; - setAnimationOrigin(delta: Delta, hasOnlyRelativeTargetChanged?: boolean, pathFn?: MotionPath): void; - motionValue?: MotionValue | undefined; - startAnimation(options: ValueAnimationOptions): void; - completeAnimation(): void; - finishAnimation(): void; - applyTransformsToTarget(): void; - /** - * Shared layout - */ - sharedNodes: Map; - registerSharedNode(layoutId: string, node: IProjectionNode): void; - isLead(): boolean; - getLead(): IProjectionNode | any; - getPrevLead(): IProjectionNode | undefined; - getStack(): NodeStack | undefined; - promote({ needsReset, transition, preserveFollowOpacity, }?: { - needsReset?: boolean | undefined; - transition?: Transition | undefined; - preserveFollowOpacity?: boolean | undefined; - }): void; - relegate(): boolean; - resetSkewAndRotation(): void; - applyProjectionStyles(targetStyle: any, styleProp?: MotionStyle): void; - clearSnapshot(): void; - resetTree(): void; - }; -}; -declare function propagateDirtyNodes(node: IProjectionNode): void; -declare function cleanDirtyNodes(node: IProjectionNode): void; - -declare const DocumentProjectionNode: { - new (latestValues?: ResolvedValues$1, parent?: IProjectionNode | undefined): { - id: number; - animationId: number; - animationCommitId: number; - instance: Window | undefined; - root: IProjectionNode; - parent?: IProjectionNode | undefined; - path: IProjectionNode[]; - children: Set>; - options: ProjectionNodeOptions; - snapshot: Measurements | undefined; - layout: Measurements | undefined; - targetLayout?: motion_utils.Box | undefined; - layoutCorrected: motion_utils.Box; - targetDelta?: motion_utils.Delta | undefined; - target?: motion_utils.Box | undefined; - relativeTarget?: motion_utils.Box | undefined; - relativeTargetOrigin?: motion_utils.Box | undefined; - relativeParent?: IProjectionNode | undefined; - isTreeAnimating: boolean; - isAnimationBlocked: boolean; - attemptToResolveRelativeTarget?: boolean | undefined; - targetWithTransforms?: motion_utils.Box | undefined; - prevProjectionDelta?: motion_utils.Delta | undefined; - projectionDelta?: motion_utils.Delta | undefined; - projectionDeltaWithTransform?: motion_utils.Delta | undefined; - scroll?: ScrollMeasurements | undefined; - isLayoutDirty: boolean; - isProjectionDirty: boolean; - isSharedProjectionDirty: boolean; - isTransformDirty: boolean; - updateManuallyBlocked: boolean; - updateBlockedByResize: boolean; - isUpdating: boolean; - isSVG: boolean; - needsReset: boolean; - shouldResetTransform: boolean; - hasCheckedOptimisedAppear: boolean; - treeScale: motion_utils.Point; - resumeFrom?: IProjectionNode | undefined; - resumingFrom?: IProjectionNode | undefined; - latestValues: ResolvedValues$1; - eventHandlers: Map>; - nodes?: FlatTree | undefined; - depth: number; - prevTransformTemplateValue: string | undefined; - preserveOpacity?: boolean | undefined; - hasTreeAnimated: boolean; - layoutVersion: number; - addEventListener(name: LayoutEvents, handler: any): VoidFunction; - notifyListeners(name: LayoutEvents, ...args: any): void; - hasListeners(name: LayoutEvents): boolean; - mount(instance: Window): void; - unmount(): void; - blockUpdate(): void; - unblockUpdate(): void; - isUpdateBlocked(): boolean; - isTreeAnimationBlocked(): boolean; - startUpdate(): void; - getTransformTemplate(): TransformTemplate | undefined; - willUpdate(shouldNotifyListeners?: boolean): void; - updateScheduled: boolean; - update(): void; - scheduleUpdate: () => void; - didUpdate(): void; - clearAllSnapshots(): void; - projectionUpdateScheduled: boolean; - scheduleUpdateProjection(): void; - scheduleCheckAfterUnmount(): void; - checkUpdateFailed: () => void; - updateProjection: () => void; - updateSnapshot(): void; - updateLayout(): void; - updateScroll(phase?: Phase): void; - resetTransform(): void; - measure(removeTransform?: boolean): { - animationId: number; - measuredBox: motion_utils.Box; - layoutBox: motion_utils.Box; - latestValues: {}; - source: number; - }; - measurePageBox(): motion_utils.Box; - removeElementScroll(box: motion_utils.Box): motion_utils.Box; - applyTransform(box: motion_utils.Box, transformOnly?: boolean, output?: motion_utils.Box | undefined): motion_utils.Box; - removeTransform(box: motion_utils.Box): motion_utils.Box; - setTargetDelta(delta: motion_utils.Delta): void; - setOptions(options: ProjectionNodeOptions): void; - clearMeasurements(): void; - forceRelativeParentToResolveTarget(): void; - resolvedRelativeTargetAt: number; - resolveTargetDelta(forceRecalculation?: boolean): void; - getClosestProjectingParent(): IProjectionNode | undefined; - isProjecting(): boolean; - linkedParentVersion: number; - createRelativeTarget(relativeParent: IProjectionNode, layout: motion_utils.Box, parentLayout: motion_utils.Box): void; - removeRelativeTarget(): void; - hasProjected: boolean; - calcProjection(): void; - isVisible: boolean; - hide(): void; - show(): void; - scheduleRender(notifyAll?: boolean): void; - createProjectionDeltas(): void; - animationValues?: ResolvedValues$1 | undefined; - pendingAnimation?: Process | undefined; - currentAnimation?: JSAnimation | undefined; - mixTargetDelta: (progress: number) => void; - animationProgress: number; - setAnimationOrigin(delta: motion_utils.Delta, hasOnlyRelativeTargetChanged?: boolean, pathFn?: MotionPath | undefined): void; - motionValue?: MotionValue | undefined; - startAnimation(options: ValueAnimationOptions): void; - completeAnimation(): void; - finishAnimation(): void; - applyTransformsToTarget(): void; - sharedNodes: Map; - registerSharedNode(layoutId: string, node: IProjectionNode): void; - isLead(): boolean; - getLead(): IProjectionNode | any; - getPrevLead(): IProjectionNode | undefined; - getStack(): NodeStack | undefined; - promote({ needsReset, transition, preserveFollowOpacity, }?: { - needsReset?: boolean | undefined; - transition?: Transition | undefined; - preserveFollowOpacity?: boolean | undefined; - }): void; - relegate(): boolean; - resetSkewAndRotation(): void; - applyProjectionStyles(targetStyle: any, styleProp?: MotionStyle | undefined): void; - clearSnapshot(): void; - resetTree(): void; - }; -}; - -interface NodeGroup { - add: (node: IProjectionNode) => void; - remove: (node: IProjectionNode) => void; - dirty: VoidFunction; -} -declare function nodeGroup(): NodeGroup; - -declare const rootProjectionNode: { - current: IProjectionNode | undefined; -}; -declare const HTMLProjectionNode: { - new (latestValues?: ResolvedValues$1, parent?: IProjectionNode | undefined): { - id: number; - animationId: number; - animationCommitId: number; - instance: HTMLElement | undefined; - root: IProjectionNode; - parent?: IProjectionNode | undefined; - path: IProjectionNode[]; - children: Set>; - options: ProjectionNodeOptions; - snapshot: Measurements | undefined; - layout: Measurements | undefined; - targetLayout?: motion_utils.Box | undefined; - layoutCorrected: motion_utils.Box; - targetDelta?: motion_utils.Delta | undefined; - target?: motion_utils.Box | undefined; - relativeTarget?: motion_utils.Box | undefined; - relativeTargetOrigin?: motion_utils.Box | undefined; - relativeParent?: IProjectionNode | undefined; - isTreeAnimating: boolean; - isAnimationBlocked: boolean; - attemptToResolveRelativeTarget?: boolean | undefined; - targetWithTransforms?: motion_utils.Box | undefined; - prevProjectionDelta?: motion_utils.Delta | undefined; - projectionDelta?: motion_utils.Delta | undefined; - projectionDeltaWithTransform?: motion_utils.Delta | undefined; - scroll?: ScrollMeasurements | undefined; - isLayoutDirty: boolean; - isProjectionDirty: boolean; - isSharedProjectionDirty: boolean; - isTransformDirty: boolean; - updateManuallyBlocked: boolean; - updateBlockedByResize: boolean; - isUpdating: boolean; - isSVG: boolean; - needsReset: boolean; - shouldResetTransform: boolean; - hasCheckedOptimisedAppear: boolean; - treeScale: motion_utils.Point; - resumeFrom?: IProjectionNode | undefined; - resumingFrom?: IProjectionNode | undefined; - latestValues: ResolvedValues$1; - eventHandlers: Map>; - nodes?: FlatTree | undefined; - depth: number; - prevTransformTemplateValue: string | undefined; - preserveOpacity?: boolean | undefined; - hasTreeAnimated: boolean; - layoutVersion: number; - addEventListener(name: LayoutEvents, handler: any): VoidFunction; - notifyListeners(name: LayoutEvents, ...args: any): void; - hasListeners(name: LayoutEvents): boolean; - mount(instance: HTMLElement): void; - unmount(): void; - blockUpdate(): void; - unblockUpdate(): void; - isUpdateBlocked(): boolean; - isTreeAnimationBlocked(): boolean; - startUpdate(): void; - getTransformTemplate(): TransformTemplate | undefined; - willUpdate(shouldNotifyListeners?: boolean): void; - updateScheduled: boolean; - update(): void; - scheduleUpdate: () => void; - didUpdate(): void; - clearAllSnapshots(): void; - projectionUpdateScheduled: boolean; - scheduleUpdateProjection(): void; - scheduleCheckAfterUnmount(): void; - checkUpdateFailed: () => void; - updateProjection: () => void; - updateSnapshot(): void; - updateLayout(): void; - updateScroll(phase?: Phase): void; - resetTransform(): void; - measure(removeTransform?: boolean): { - animationId: number; - measuredBox: motion_utils.Box; - layoutBox: motion_utils.Box; - latestValues: {}; - source: number; - }; - measurePageBox(): motion_utils.Box; - removeElementScroll(box: motion_utils.Box): motion_utils.Box; - applyTransform(box: motion_utils.Box, transformOnly?: boolean, output?: motion_utils.Box | undefined): motion_utils.Box; - removeTransform(box: motion_utils.Box): motion_utils.Box; - setTargetDelta(delta: motion_utils.Delta): void; - setOptions(options: ProjectionNodeOptions): void; - clearMeasurements(): void; - forceRelativeParentToResolveTarget(): void; - resolvedRelativeTargetAt: number; - resolveTargetDelta(forceRecalculation?: boolean): void; - getClosestProjectingParent(): IProjectionNode | undefined; - isProjecting(): boolean; - linkedParentVersion: number; - createRelativeTarget(relativeParent: IProjectionNode, layout: motion_utils.Box, parentLayout: motion_utils.Box): void; - removeRelativeTarget(): void; - hasProjected: boolean; - calcProjection(): void; - isVisible: boolean; - hide(): void; - show(): void; - scheduleRender(notifyAll?: boolean): void; - createProjectionDeltas(): void; - animationValues?: ResolvedValues$1 | undefined; - pendingAnimation?: Process | undefined; - currentAnimation?: JSAnimation | undefined; - mixTargetDelta: (progress: number) => void; - animationProgress: number; - setAnimationOrigin(delta: motion_utils.Delta, hasOnlyRelativeTargetChanged?: boolean, pathFn?: MotionPath | undefined): void; - motionValue?: MotionValue | undefined; - startAnimation(options: ValueAnimationOptions): void; - completeAnimation(): void; - finishAnimation(): void; - applyTransformsToTarget(): void; - sharedNodes: Map; - registerSharedNode(layoutId: string, node: IProjectionNode): void; - isLead(): boolean; - getLead(): IProjectionNode | any; - getPrevLead(): IProjectionNode | undefined; - getStack(): NodeStack | undefined; - promote({ needsReset, transition, preserveFollowOpacity, }?: { - needsReset?: boolean | undefined; - transition?: Transition | undefined; - preserveFollowOpacity?: boolean | undefined; - }): void; - relegate(): boolean; - resetSkewAndRotation(): void; - applyProjectionStyles(targetStyle: any, styleProp?: MotionStyle | undefined): void; - clearSnapshot(): void; - resetTree(): void; - }; -}; - -/** - * This should only ever be modified on the client otherwise it'll - * persist through server requests. If we need instanced states we - * could lazy-init via root. - */ -declare const globalProjectionState: { - /** - * Global flag as to whether the tree has animated since the last time - * we resized the window - */ - hasAnimatedSinceResize: boolean; - /** - * We set this to true once, on the first update. Any nodes added to the tree beyond that - * update will be given a `data-projection-id` attribute. - */ - hasEverUpdated: boolean; -}; - -declare function camelToDash(str: string): string; - -declare function buildHTMLStyles(state: HTMLRenderState, latestValues: ResolvedValues$1, transformTemplate?: MotionNodeOptions["transformTemplate"]): void; - -/** - * Build a CSS transform style from individual x/y/scale etc properties. - * - * This outputs with a default order of transforms/scales/rotations, this can be customised by - * providing a transformTemplate function. - */ -declare function buildTransform(latestValues: ResolvedValues$1, transform: HTMLRenderState["transform"], transformTemplate?: MotionNodeOptions["transformTemplate"]): string; - -declare function scrapeMotionValuesFromProps$1(props: MotionNodeOptions, prevProps: MotionNodeOptions, visualElement?: VisualElement): { - [key: string]: any; -}; - -/** - * Build SVG visual attributes, like cx and style.transform - */ -declare function buildSVGAttrs(state: SVGRenderState, { attrX, attrY, attrScale, pathLength, pathSpacing, pathOffset, ...latest }: ResolvedValues$1, isSVGTag: boolean, transformTemplate?: MotionNodeOptions["transformTemplate"], styleProp?: Record): void; - -/** - * A set of attribute names that are always read/written as camel case. - */ -declare const camelCaseAttributes: Set; - -declare const isSVGTag: (tag: unknown) => boolean; - -/** - * Build SVG path properties. Uses the path's measured length to convert - * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset - * and stroke-dasharray attributes. - * - * This function is mutative to reduce per-frame GC. - * - * Note: We use unitless values for stroke-dasharray and stroke-dashoffset - * because Safari incorrectly scales px values when the page is zoomed. - */ -declare function buildSVGPath(attrs: ResolvedValues$1, length: number, spacing?: number, offset?: number, useDashCase?: boolean): void; - -declare function renderSVG(element: SVGElement, renderState: SVGRenderState, _styleProp?: MotionStyle, projection?: any): void; - -declare function scrapeMotionValuesFromProps(props: MotionNodeOptions, prevProps: MotionNodeOptions, visualElement?: VisualElement): { - [key: string]: any; -}; - -type LayoutAnimationScope = Element | Document; -type LayoutBuilderResolve = (animation: GroupAnimation) => void; -type LayoutBuilderReject = (error: unknown) => void; -declare class LayoutAnimationBuilder { - private scope; - private updateDom; - private defaultOptions?; - private sharedTransitions; - private notifyReady; - private rejectReady; - private readyPromise; - constructor(scope: LayoutAnimationScope, updateDom: () => void | Promise, defaultOptions?: AnimationOptions); - shared(id: string, transition: AnimationOptions): this; - then(resolve: LayoutBuilderResolve, reject?: LayoutBuilderReject): Promise; - private start; - private buildRecords; - private handleExitingElements; -} -declare function parseAnimateLayoutArgs(scopeOrUpdateDom: ElementOrSelector | (() => void), updateDomOrOptions?: (() => void) | AnimationOptions, options?: AnimationOptions): { - scope: Element | Document; - updateDom: () => void; - defaultOptions?: AnimationOptions; -}; - -/** - * @deprecated - * - * Import as `frame` instead. - */ -declare const sync: Batcher; -/** - * @deprecated - * - * Use cancelFrame(callback) instead. - */ -declare const cancelSync: Record void>; - -export { type AccelerateConfig, type AcceptedAnimations, type ActiveStatsBuffer, type AnimationDefinition, type AnimationGeneratorName, type AnimationGeneratorType, type AnimationList, type AnimationOptions, type AnimationOrchestrationOptions, type AnimationPlaybackControls, type AnimationPlaybackControlsWithThen, type AnimationPlaybackLifecycles, type AnimationPlaybackOptions, type AnimationScope, type AnimationState$1 as AnimationState, type AnimationType, type AnimationTypeState, type AnyResolvedKeyframe, type ArcOptions, AsyncMotionValueAnimation, type Batcher, type CSSStyleDeclarationWithTransform, type CSSVariableName, type CSSVariableToken, type CancelProcess, type Color, type ComplexValueInfo, type ComplexValues, type DOMKeyframesDefinition, DOMKeyframesResolver, type DOMValueAnimationOptions, DOMVisualElement, type DOMVisualElementOptions, type DecayOptions, type DelayedFunction, DocumentProjectionNode, type DragElastic, type DragHandler, type DraggableProps, type DurationSpringOptions, type DynamicOption, type ElementOrSelector, type EventInfo, type EventOptions, Feature, type FeatureClass, FlatTree, type FollowValueOptions, type FrameData, type FrameStats, type GeneratorFactory, type GeneratorFactoryFunction, GroupAnimation, GroupAnimationWithThen, type GroupedAnimations, type HSLA, HTMLProjectionNode, type HTMLRenderState, HTMLVisualElement, type HandoffFunction, type IProjectionNode, type InactiveStatsBuffer, type InertiaOptions, type InitialPromotionConfig, type InterpolateOptions, JSAnimation, type KeyframeGenerator, type KeyframeOptions, KeyframeResolver, LayoutAnimationBuilder, type LayoutEvents, type LayoutLifecycles, type LayoutUpdateData, type LayoutUpdateHandler, type LegacyAnimationControls, type MapInputRange, type Measurements, type Mixer, type MixerFactory, type MotionConfigContextProps, type MotionNodeAdvancedOptions, type MotionNodeAnimationOptions, type MotionNodeDragHandlers, type MotionNodeDraggableOptions, type MotionNodeEventOptions, type MotionNodeFocusHandlers, type MotionNodeHoverHandlers, type MotionNodeLayoutOptions, type MotionNodeOptions, type MotionNodePanHandlers, type MotionNodeTapHandlers, type MotionNodeViewportOptions, type MotionPath, type MotionStyle, MotionValue, type MotionValueEventCallbacks, type MotionValueOptions, type MultiTransformer, NativeAnimation, NativeAnimationExtended, type NativeAnimationOptions, type NativeAnimationOptionsExtended, NativeAnimationWrapper, type NodeGroup, NodeStack, type NumberMap, ObjectVisualElement, type OnHoverEndEvent, type OnHoverStartEvent, type OnKeyframesResolved, type OnPressEndEvent, type OnPressStartEvent, type Owner, type PanHandler, type PanInfo, type PassiveEffect, type PathInterpolator, type PathState, type Phase, type Point2D, type PointerEventOptions, type PresenceContextProps, type PressGestureInfo, type Process, type ProgressTimeline, type ProjectionEventName, type ProjectionNodeConfig, type ProjectionNodeOptions, type PropagateOptions, type RGBA, type ReducedMotionConfig, type RepeatType, type ResolvedConstraints, type ResolvedElastic, type ResolvedKeyframes, type ResolvedValueKeyframe, type ResolvedValues$1 as ResolvedValues, type SVGAttributes, type SVGForcedAttrKeyframesDefinition, type SVGForcedAttrProperties, type SVGForcedAttrTransitions, type SVGKeyframesDefinition, type SVGPathKeyframesDefinition, type SVGPathProperties, type SVGPathTransitions, type SVGRenderState, type SVGTransitions, SVGVisualElement, type ScaleCorrectionNode, type ScaleCorrector, type ScaleCorrectorDefinition, type ScaleCorrectorMap, type Schedule, type ScrapeMotionValuesFromProps, type ScrollMeasurements, type SelectorCache, type SingleTransformer, type Spring, type SpringOptions, type StaggerOptions, type StaggerOrigin, type StartAnimation, type Stats, type StatsBuffer, type StatsRecording, type StatsSummary, type Step, type StepId, type Steps, type StyleKeyframesDefinition, type StyleTransitions, type Subscriber, type Summary, type TapHandlers, type TapInfo, type Target, type TargetAndTransition, type TargetResolver, type TimelineWithFallback, type TransformInputRange, type TransformOptions, type TransformOrigin, type TransformProperties, type TransformTemplate, type Transformer, type Transition, type TransitionWithValueOverrides, type Tween, type UnresolvedKeyframes, type UnresolvedValueKeyframe, type UseRenderState, type ValueAnimationOptions, type ValueAnimationOptionsWithRenderContext, type ValueAnimationTransition, type ValueAnimationWithDynamicDelay, type ValueIndexes, type ValueKeyframe, type ValueKeyframesDefinition, type ValueTransformer, type ValueTransition, type ValueType, type ValueTypeMap, type VariableKeyframesDefinition, type VariableTransitions, type Variant, type VariantLabels, type Variants, type VelocityOptions, type ViewTransitionAnimationDefinition, ViewTransitionBuilder, type ViewTransitionOptions, type ViewTransitionTarget, type ViewTransitionTargetDefinition, type ViewportEventHandler, type ViewportOptions, VisualElement, type VisualElementAnimationOptions, type VisualElementEventCallbacks, type VisualElementOptions, type VisualState, type WillChange, type WithAppearProps, type WithDepth, type WithQuerySelectorAll, acceleratedValues, activeAnimations, addAttrValue, addDomEvent, addScaleCorrector, addStyleValue, addValueToWillChange, alpha, analyseComplexValue, animateMotionValue, animateSingleValue, animateTarget, animateValue, animateVariant, animateView, animateVisualElement, animationMapKey, applyAxisDelta, applyBoxDelta, applyGeneratorOptions, applyPointDelta, applyPxDefaults, applyTreeDeltas, arc, aspectRatio, attachFollow, attachSpring, attrEffect, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, buildHTMLStyles, buildProjectionTransform, buildSVGAttrs, buildSVGPath, buildTransform, calcAxisDelta, calcBoxDelta, calcChildStagger, calcGeneratorDuration, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, camelCaseAttributes, camelToDash, cancelFrame, cancelMicrotask, cancelSync, checkVariantsDidChange, cleanDirtyNodes, collectMotionValues, color, compareByDepth, complex, containsCSSVariable, convertBoundingBoxToBox, convertBoxToBoundingBox, convertOffsetToTimes, copyAxisDeltaInto, copyAxisInto, copyBoxInto, correctBorderRadius, correctBoxShadow, createAnimationState, createAxis, createAxisDelta, createBox, createDelta, createGeneratorEasing, createProjectionNode, createRenderBatcher, cubicBezierAsString, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, delay, delayInSeconds, dimensionValueTypes, eachAxis, fillOffset, fillWildcards, findDimensionValueType, findValueType, flushKeyframeResolvers, followValue, frame, frameData, frameSteps, generateLinearEasing, getAnimatableNone, getAnimationMap, getComputedStyle, getDefaultTransition, getDefaultValueType, getFeatureDefinitions, getFinalKeyframe, getMixer, getOptimisedAppearId, getOriginIndex, getValueAsType, getValueTransition, getVariableValue, getVariantContext, getViewAnimationLayerInfo, getViewAnimations, globalProjectionState, has2DTranslate, hasReducedMotionListener, hasScale, hasTransform, hex, hover, hsla, hslaToRgba, inertia, initPrefersReducedMotion, interpolate, invisibleValues, isAnimationControls, isCSSVariableName, isCSSVariableToken, isControllingVariants, isDeltaZero, isDragActive, isDragging, isElementKeyboardAccessible, isElementTextInput, isForcedMotionValue, isGenerator, isHTMLElement, isKeyframesTarget, isMotionValue, isNear, isNodeOrChild, isPrimaryPointer, isSVGElement, isSVGSVGElement, isSVGTag, isTransitionDefined, isVariantLabel, isVariantNode, isWaapiSupportedEasing, isWillChangeMotionValue, keyframes, makeAnimationInstant, mapEasingToNativeEasing, mapValue, maxGeneratorDuration, measurePageBox, measureViewportBox, microtask, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixValues, mixVisibility, motionValue, nodeGroup, number, numberValueTypes, observeTimeline, optimizedAppearDataAttribute, optimizedAppearDataId, parseAnimateLayoutArgs, parseCSSVariable, parseValueFromTransform, percent, pixelsToPercent, positionalKeys, prefersReducedMotion, press, progressPercentage, propEffect, propagateDirtyNodes, px, readTransformValue, recordStats, removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta, renderHTML, renderSVG, resize, resolveElements, resolveMotionValue, resolveTransition, resolveVariant, resolveVariantFromProps, rgbUnit, rgba, rootProjectionNode, scale, scaleCorrectors, scalePoint, scrapeMotionValuesFromProps$1 as scrapeHTMLMotionValuesFromProps, scrapeMotionValuesFromProps as scrapeSVGMotionValuesFromProps, setDragLock, setFeatureDefinitions, setStyle, setTarget, spring, springValue, stagger, startWaapiAnimation, statsBuffer, styleEffect, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, supportsViewTimeline, svgEffect, sync, testValueType, time, transform, transformAxis, transformBox, transformBoxPoints, transformPropOrder, transformProps, transformValue, transformValueTypes, translateAxis, updateMotionValuesFromProps, variantPriorityOrder, variantProps, vh, visualElementStore, vw }; diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/motion-dom.dev.js b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/motion-dom.dev.js deleted file mode 100644 index 109b84a4..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/motion-dom.dev.js +++ /dev/null @@ -1,10263 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('motion-utils')) : - typeof define === 'function' && define.amd ? define(['exports', 'motion-utils'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.MotionDom = {}, global.MotionUtils)); -})(this, (function (exports, motionUtils) { 'use strict'; - - const stepsOrder = [ - "setup", // Compute - "read", // Read - "resolveKeyframes", // Write/Read/Write/Read - "preUpdate", // Compute - "update", // Compute - "preRender", // Compute - "render", // Write - "postRender", // Compute - ]; - - const statsBuffer = { - value: null, - addProjectionMetrics: null, - }; - - function createRenderStep(runNextFrame, stepName) { - /** - * We create and reuse two queues, one to queue jobs for the current frame - * and one for the next. We reuse to avoid triggering GC after x frames. - */ - let thisFrame = new Set(); - let nextFrame = new Set(); - /** - * Track whether we're currently processing jobs in this step. This way - * we can decide whether to schedule new jobs for this frame or next. - */ - let isProcessing = false; - let flushNextFrame = false; - /** - * A set of processes which were marked keepAlive when scheduled. - */ - const toKeepAlive = new WeakSet(); - let latestFrameData = { - delta: 0.0, - timestamp: 0.0, - isProcessing: false, - }; - let numCalls = 0; - function triggerCallback(callback) { - if (toKeepAlive.has(callback)) { - step.schedule(callback); - runNextFrame(); - } - numCalls++; - callback(latestFrameData); - } - const step = { - /** - * Schedule a process to run on the next frame. - */ - schedule: (callback, keepAlive = false, immediate = false) => { - const addToCurrentFrame = immediate && isProcessing; - const queue = addToCurrentFrame ? thisFrame : nextFrame; - if (keepAlive) - toKeepAlive.add(callback); - queue.add(callback); - return callback; - }, - /** - * Cancel the provided callback from running on the next frame. - */ - cancel: (callback) => { - nextFrame.delete(callback); - toKeepAlive.delete(callback); - }, - /** - * Execute all schedule callbacks. - */ - process: (frameData) => { - latestFrameData = frameData; - /** - * If we're already processing we've probably been triggered by a flushSync - * inside an existing process. Instead of executing, mark flushNextFrame - * as true and ensure we flush the following frame at the end of this one. - */ - if (isProcessing) { - flushNextFrame = true; - return; - } - isProcessing = true; - // Swap this frame and the next to avoid GC - const prevFrame = thisFrame; - thisFrame = nextFrame; - nextFrame = prevFrame; - // Execute this frame - thisFrame.forEach(triggerCallback); - /** - * If we're recording stats then - */ - if (stepName && statsBuffer.value) { - statsBuffer.value.frameloop[stepName].push(numCalls); - } - numCalls = 0; - // Clear the frame so no callbacks remain. This is to avoid - // memory leaks should this render step not run for a while. - thisFrame.clear(); - isProcessing = false; - if (flushNextFrame) { - flushNextFrame = false; - step.process(frameData); - } - }, - }; - return step; - } - - const maxElapsed = 40; - function createRenderBatcher(scheduleNextBatch, allowKeepAlive) { - let runNextFrame = false; - let useDefaultElapsed = true; - const state = { - delta: 0.0, - timestamp: 0.0, - isProcessing: false, - }; - const flagRunNextFrame = () => (runNextFrame = true); - const steps = stepsOrder.reduce((acc, key) => { - acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined); - return acc; - }, {}); - const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps; - const processBatch = () => { - const useManualTiming = motionUtils.MotionGlobalConfig.useManualTiming; - const timestamp = useManualTiming - ? state.timestamp - : performance.now(); - runNextFrame = false; - if (!useManualTiming) { - state.delta = useDefaultElapsed - ? 1000 / 60 - : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1); - } - state.timestamp = timestamp; - state.isProcessing = true; - // Unrolled render loop for better per-frame performance - setup.process(state); - read.process(state); - resolveKeyframes.process(state); - preUpdate.process(state); - update.process(state); - preRender.process(state); - render.process(state); - postRender.process(state); - state.isProcessing = false; - if (runNextFrame && allowKeepAlive) { - useDefaultElapsed = false; - scheduleNextBatch(processBatch); - } - }; - const wake = () => { - runNextFrame = true; - useDefaultElapsed = true; - if (!state.isProcessing) { - scheduleNextBatch(processBatch); - } - }; - const schedule = stepsOrder.reduce((acc, key) => { - const step = steps[key]; - acc[key] = (process, keepAlive = false, immediate = false) => { - if (!runNextFrame) - wake(); - return step.schedule(process, keepAlive, immediate); - }; - return acc; - }, {}); - const cancel = (process) => { - for (let i = 0; i < stepsOrder.length; i++) { - steps[stepsOrder[i]].cancel(process); - } - }; - return { schedule, cancel, state, steps }; - } - - const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : motionUtils.noop, true); - - let now; - function clearTime() { - now = undefined; - } - /** - * An eventloop-synchronous alternative to performance.now(). - * - * Ensures that time measurements remain consistent within a synchronous context. - * Usually calling performance.now() twice within the same synchronous context - * will return different values which isn't useful for animations when we're usually - * trying to sync animations to the same frame. - */ - const time = { - now: () => { - if (now === undefined) { - time.set(frameData.isProcessing || motionUtils.MotionGlobalConfig.useManualTiming - ? frameData.timestamp - : performance.now()); - } - return now; - }, - set: (newTime) => { - now = newTime; - queueMicrotask(clearTime); - }, - }; - - const activeAnimations = { - layout: 0, - mainThread: 0, - waapi: 0, - }; - - const checkStringStartsWith = (token) => (key) => typeof key === "string" && key.startsWith(token); - const isCSSVariableName = - /*@__PURE__*/ checkStringStartsWith("--"); - const startsAsVariableToken = - /*@__PURE__*/ checkStringStartsWith("var(--"); - const isCSSVariableToken = (value) => { - const startsWithToken = startsAsVariableToken(value); - if (!startsWithToken) - return false; - // Ensure any comments are stripped from the value as this can harm performance of the regex. - return singleCssVariableRegex.test(value.split("/*")[0].trim()); - }; - const singleCssVariableRegex = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu; - /** - * Check if a value contains a CSS variable anywhere (e.g. inside calc()). - * Unlike isCSSVariableToken which checks if the value IS a var() token, - * this checks if the value CONTAINS var() somewhere in the string. - */ - function containsCSSVariable(value) { - if (typeof value !== "string") - return false; - // Strip comments to avoid false positives - return value.split("/*")[0].includes("var(--"); - } - - const number = { - test: (v) => typeof v === "number", - parse: parseFloat, - transform: (v) => v, - }; - const alpha = { - ...number, - transform: (v) => motionUtils.clamp(0, 1, v), - }; - const scale = { - ...number, - default: 1, - }; - - // If this number is a decimal, make it just five decimal places - // to avoid exponents - const sanitize = (v) => Math.round(v * 100000) / 100000; - - const floatRegex = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu; - - function isNullish(v) { - return v == null; - } - - const singleColorRegex = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu; - - /** - * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000, - * but false if a number or multiple colors - */ - const isColorString = (type, testProp) => (v) => { - return Boolean((typeof v === "string" && - singleColorRegex.test(v) && - v.startsWith(type)) || - (testProp && - !isNullish(v) && - Object.prototype.hasOwnProperty.call(v, testProp))); - }; - const splitColor = (aName, bName, cName) => (v) => { - if (typeof v !== "string") - return v; - const [a, b, c, alpha] = v.match(floatRegex); - return { - [aName]: parseFloat(a), - [bName]: parseFloat(b), - [cName]: parseFloat(c), - alpha: alpha !== undefined ? parseFloat(alpha) : 1, - }; - }; - - const clampRgbUnit = (v) => motionUtils.clamp(0, 255, v); - const rgbUnit = { - ...number, - transform: (v) => Math.round(clampRgbUnit(v)), - }; - const rgba = { - test: /*@__PURE__*/ isColorString("rgb", "red"), - parse: /*@__PURE__*/ splitColor("red", "green", "blue"), - transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" + - rgbUnit.transform(red) + - ", " + - rgbUnit.transform(green) + - ", " + - rgbUnit.transform(blue) + - ", " + - sanitize(alpha.transform(alpha$1)) + - ")", - }; - - function parseHex(v) { - let r = ""; - let g = ""; - let b = ""; - let a = ""; - // If we have 6 characters, ie #FF0000 - if (v.length > 5) { - r = v.substring(1, 3); - g = v.substring(3, 5); - b = v.substring(5, 7); - a = v.substring(7, 9); - // Or we have 3 characters, ie #F00 - } - else { - r = v.substring(1, 2); - g = v.substring(2, 3); - b = v.substring(3, 4); - a = v.substring(4, 5); - r += r; - g += g; - b += b; - a += a; - } - return { - red: parseInt(r, 16), - green: parseInt(g, 16), - blue: parseInt(b, 16), - alpha: a ? parseInt(a, 16) / 255 : 1, - }; - } - const hex = { - test: /*@__PURE__*/ isColorString("#"), - parse: parseHex, - transform: rgba.transform, - }; - - /*#__NO_SIDE_EFFECTS__*/ - const createUnitType = (unit) => ({ - test: (v) => typeof v === "string" && v.endsWith(unit) && v.split(" ").length === 1, - parse: parseFloat, - transform: (v) => `${v}${unit}`, - }); - const degrees = /*@__PURE__*/ createUnitType("deg"); - const percent = /*@__PURE__*/ createUnitType("%"); - const px = /*@__PURE__*/ createUnitType("px"); - const vh = /*@__PURE__*/ createUnitType("vh"); - const vw = /*@__PURE__*/ createUnitType("vw"); - const progressPercentage = /*@__PURE__*/ (() => ({ - ...percent, - parse: (v) => percent.parse(v) / 100, - transform: (v) => percent.transform(v * 100), - }))(); - - const hsla = { - test: /*@__PURE__*/ isColorString("hsl", "hue"), - parse: /*@__PURE__*/ splitColor("hue", "saturation", "lightness"), - transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => { - return ("hsla(" + - Math.round(hue) + - ", " + - percent.transform(sanitize(saturation)) + - ", " + - percent.transform(sanitize(lightness)) + - ", " + - sanitize(alpha.transform(alpha$1)) + - ")"); - }, - }; - - const color = { - test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v), - parse: (v) => { - if (rgba.test(v)) { - return rgba.parse(v); - } - else if (hsla.test(v)) { - return hsla.parse(v); - } - else { - return hex.parse(v); - } - }, - transform: (v) => { - return typeof v === "string" - ? v - : v.hasOwnProperty("red") - ? rgba.transform(v) - : hsla.transform(v); - }, - getAnimatableNone: (v) => { - const parsed = color.parse(v); - parsed.alpha = 0; - return color.transform(parsed); - }, - }; - - const colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu; - - function test(v) { - return (isNaN(v) && - typeof v === "string" && - (v.match(floatRegex)?.length || 0) + - (v.match(colorRegex)?.length || 0) > - 0); - } - const NUMBER_TOKEN = "number"; - const COLOR_TOKEN = "color"; - const VAR_TOKEN = "var"; - const VAR_FUNCTION_TOKEN = "var("; - const SPLIT_TOKEN = "${}"; - // this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex` - const complexRegex = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu; - function analyseComplexValue(value) { - const originalValue = value.toString(); - const values = []; - const indexes = { - color: [], - number: [], - var: [], - }; - const types = []; - let i = 0; - const tokenised = originalValue.replace(complexRegex, (parsedValue) => { - if (color.test(parsedValue)) { - indexes.color.push(i); - types.push(COLOR_TOKEN); - values.push(color.parse(parsedValue)); - } - else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) { - indexes.var.push(i); - types.push(VAR_TOKEN); - values.push(parsedValue); - } - else { - indexes.number.push(i); - types.push(NUMBER_TOKEN); - values.push(parseFloat(parsedValue)); - } - ++i; - return SPLIT_TOKEN; - }); - const split = tokenised.split(SPLIT_TOKEN); - return { values, split, indexes, types }; - } - function parseComplexValue(v) { - return analyseComplexValue(v).values; - } - function buildTransformer({ split, types }) { - const numSections = split.length; - return (v) => { - let output = ""; - for (let i = 0; i < numSections; i++) { - output += split[i]; - if (v[i] !== undefined) { - const type = types[i]; - if (type === NUMBER_TOKEN) { - output += sanitize(v[i]); - } - else if (type === COLOR_TOKEN) { - output += color.transform(v[i]); - } - else { - output += v[i]; - } - } - } - return output; - }; - } - function createTransformer(source) { - return buildTransformer(analyseComplexValue(source)); - } - const convertNumbersToZero = (v) => typeof v === "number" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v; - /** - * Convert a parsed value to its zero equivalent, but preserve numbers - * that act as divisors in CSS calc() expressions. - * - * analyseComplexValue extracts numbers from CSS strings and puts the - * surrounding text into a `split` template array. For example: - * "calc(var(--gap) / 5)" → values: [var(--gap), 5] - * split: ["calc(", " / ", ")"] - * - * When building a zero-equivalent for animation, naively zeroing all - * numbers turns the divisor into 0 → "calc(var(--gap) / 0)" → NaN. - * We detect this by checking whether the text preceding a number - * (split[i]) ends with "/" — the CSS calc division operator. - */ - const convertToZero = (value, splitBefore) => { - if (typeof value === "number") { - return splitBefore?.trim().endsWith("/") ? value : 0; - } - return convertNumbersToZero(value); - }; - function getAnimatableNone$1(v) { - const info = analyseComplexValue(v); - const transformer = buildTransformer(info); - return transformer(info.values.map((value, i) => convertToZero(value, info.split[i]))); - } - const complex = { - test, - parse: parseComplexValue, - createTransformer, - getAnimatableNone: getAnimatableNone$1, - }; - - // Adapted from https://gist.github.com/mjackson/5311256 - function hueToRgb(p, q, t) { - if (t < 0) - t += 1; - if (t > 1) - t -= 1; - if (t < 1 / 6) - return p + (q - p) * 6 * t; - if (t < 1 / 2) - return q; - if (t < 2 / 3) - return p + (q - p) * (2 / 3 - t) * 6; - return p; - } - function hslaToRgba({ hue, saturation, lightness, alpha }) { - hue /= 360; - saturation /= 100; - lightness /= 100; - let red = 0; - let green = 0; - let blue = 0; - if (!saturation) { - red = green = blue = lightness; - } - else { - const q = lightness < 0.5 - ? lightness * (1 + saturation) - : lightness + saturation - lightness * saturation; - const p = 2 * lightness - q; - red = hueToRgb(p, q, hue + 1 / 3); - green = hueToRgb(p, q, hue); - blue = hueToRgb(p, q, hue - 1 / 3); - } - return { - red: Math.round(red * 255), - green: Math.round(green * 255), - blue: Math.round(blue * 255), - alpha, - }; - } - - function mixImmediate(a, b) { - return (p) => (p > 0 ? b : a); - } - - /* - Value in range from progress - - Given a lower limit and an upper limit, we return the value within - that range as expressed by progress (usually a number from 0 to 1) - - So progress = 0.5 would change - - from -------- to - - to - - from ---- to - - E.g. from = 10, to = 20, progress = 0.5 => 15 - - @param [number]: Lower limit of range - @param [number]: Upper limit of range - @param [number]: The progress between lower and upper limits expressed 0-1 - @return [number]: Value as calculated from progress within range (not limited within range) - */ - const mixNumber$1 = (from, to, progress) => { - return from + (to - from) * progress; - }; - - // Linear color space blending - // Explained https://www.youtube.com/watch?v=LKnqECcg6Gw - // Demonstrated http://codepen.io/osublake/pen/xGVVaN - const mixLinearColor = (from, to, v) => { - const fromExpo = from * from; - const expo = v * (to * to - fromExpo) + fromExpo; - return expo < 0 ? 0 : Math.sqrt(expo); - }; - const colorTypes = [hex, rgba, hsla]; - const getColorType = (v) => colorTypes.find((type) => type.test(v)); - function asRGBA(color) { - const type = getColorType(color); - motionUtils.warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"); - if (!Boolean(type)) - return false; - let model = type.parse(color); - if (type === hsla) { - // TODO Remove this cast - needed since Motion's stricter typing - model = hslaToRgba(model); - } - return model; - } - const mixColor = (from, to) => { - const fromRGBA = asRGBA(from); - const toRGBA = asRGBA(to); - if (!fromRGBA || !toRGBA) { - return mixImmediate(from, to); - } - const blended = { ...fromRGBA }; - return (v) => { - blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v); - blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v); - blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v); - blended.alpha = mixNumber$1(fromRGBA.alpha, toRGBA.alpha, v); - return rgba.transform(blended); - }; - }; - - const invisibleValues = new Set(["none", "hidden"]); - /** - * Returns a function that, when provided a progress value between 0 and 1, - * will return the "none" or "hidden" string only when the progress is that of - * the origin or target. - */ - function mixVisibility(origin, target) { - if (invisibleValues.has(origin)) { - return (p) => (p <= 0 ? origin : target); - } - else { - return (p) => (p >= 1 ? target : origin); - } - } - - function mixNumber(a, b) { - return (p) => mixNumber$1(a, b, p); - } - function getMixer(a) { - if (typeof a === "number") { - return mixNumber; - } - else if (typeof a === "string") { - return isCSSVariableToken(a) - ? mixImmediate - : color.test(a) - ? mixColor - : mixComplex; - } - else if (Array.isArray(a)) { - return mixArray; - } - else if (typeof a === "object") { - return color.test(a) ? mixColor : mixObject; - } - return mixImmediate; - } - function mixArray(a, b) { - const output = [...a]; - const numValues = output.length; - const blendValue = a.map((v, i) => getMixer(v)(v, b[i])); - return (p) => { - for (let i = 0; i < numValues; i++) { - output[i] = blendValue[i](p); - } - return output; - }; - } - function mixObject(a, b) { - const output = { ...a, ...b }; - const blendValue = {}; - for (const key in output) { - if (a[key] !== undefined && b[key] !== undefined) { - blendValue[key] = getMixer(a[key])(a[key], b[key]); - } - } - return (v) => { - for (const key in blendValue) { - output[key] = blendValue[key](v); - } - return output; - }; - } - function matchOrder(origin, target) { - const orderedOrigin = []; - const pointers = { color: 0, var: 0, number: 0 }; - for (let i = 0; i < target.values.length; i++) { - const type = target.types[i]; - const originIndex = origin.indexes[type][pointers[type]]; - const originValue = origin.values[originIndex] ?? 0; - orderedOrigin[i] = originValue; - pointers[type]++; - } - return orderedOrigin; - } - const mixComplex = (origin, target) => { - const template = complex.createTransformer(target); - const originStats = analyseComplexValue(origin); - const targetStats = analyseComplexValue(target); - const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length && - originStats.indexes.color.length === targetStats.indexes.color.length && - originStats.indexes.number.length >= targetStats.indexes.number.length; - if (canInterpolate) { - if ((invisibleValues.has(origin) && - !targetStats.values.length) || - (invisibleValues.has(target) && - !originStats.values.length)) { - return mixVisibility(origin, target); - } - return motionUtils.pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template); - } - else { - motionUtils.warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"); - return mixImmediate(origin, target); - } - }; - - function mix(from, to, p) { - if (typeof from === "number" && - typeof to === "number" && - typeof p === "number") { - return mixNumber$1(from, to, p); - } - const mixer = getMixer(from); - return mixer(from, to); - } - - const frameloopDriver = (update) => { - const passTimestamp = ({ timestamp }) => update(timestamp); - return { - start: (keepAlive = true) => frame.update(passTimestamp, keepAlive), - stop: () => cancelFrame(passTimestamp), - /** - * If we're processing this frame we can use the - * framelocked timestamp to keep things in sync. - */ - now: () => (frameData.isProcessing ? frameData.timestamp : time.now()), - }; - }; - - const generateLinearEasing = (easing, duration, // as milliseconds - resolution = 10 // as milliseconds - ) => { - let points = ""; - const numPoints = Math.max(Math.round(duration / resolution), 2); - for (let i = 0; i < numPoints; i++) { - points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + ", "; - } - return `linear(${points.substring(0, points.length - 2)})`; - }; - - /** - * Implement a practical max duration for keyframe generation - * to prevent infinite loops - */ - const maxGeneratorDuration = 20000; - function calcGeneratorDuration(generator) { - let duration = 0; - const timeStep = 50; - let state = generator.next(duration); - while (!state.done && duration < maxGeneratorDuration) { - duration += timeStep; - state = generator.next(duration); - } - return duration >= maxGeneratorDuration ? Infinity : duration; - } - - /** - * Create a progress => progress easing function from a generator. - */ - function createGeneratorEasing(options, scale = 100, createGenerator) { - const generator = createGenerator({ ...options, keyframes: [0, scale] }); - const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration); - return { - type: "keyframes", - ease: (progress) => { - return generator.next(duration * progress).value / scale; - }, - duration: motionUtils.millisecondsToSeconds(duration), - }; - } - - const springDefaults = { - // Default spring physics - stiffness: 100, - damping: 10, - mass: 1.0, - velocity: 0.0, - // Default duration/bounce-based options - duration: 800, // in ms - bounce: 0.3, - visualDuration: 0.3, // in seconds - // Rest thresholds - restSpeed: { - granular: 0.01, - default: 2, - }, - restDelta: { - granular: 0.005, - default: 0.5, - }, - // Limits - minDuration: 0.01, // in seconds - maxDuration: 10.0, // in seconds - minDamping: 0.05, - maxDamping: 1, - }; - function calcAngularFreq(undampedFreq, dampingRatio) { - return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio); - } - const rootIterations = 12; - function approximateRoot(envelope, derivative, initialGuess) { - let result = initialGuess; - for (let i = 1; i < rootIterations; i++) { - result = result - envelope(result) / derivative(result); - } - return result; - } - /** - * This is ported from the Framer implementation of duration-based spring resolution. - */ - const safeMin = 0.001; - function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) { - let envelope; - let derivative; - motionUtils.warning(duration <= motionUtils.secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit"); - let dampingRatio = 1 - bounce; - /** - * Restrict dampingRatio and duration to within acceptable ranges. - */ - dampingRatio = motionUtils.clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio); - duration = motionUtils.clamp(springDefaults.minDuration, springDefaults.maxDuration, motionUtils.millisecondsToSeconds(duration)); - if (dampingRatio < 1) { - /** - * Underdamped spring - */ - envelope = (undampedFreq) => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const a = exponentialDecay - velocity; - const b = calcAngularFreq(undampedFreq, dampingRatio); - const c = Math.exp(-delta); - return safeMin - (a / b) * c; - }; - derivative = (undampedFreq) => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const d = delta * velocity + velocity; - const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration; - const f = Math.exp(-delta); - const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio); - const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1; - return (factor * ((d - e) * f)) / g; - }; - } - else { - /** - * Critically-damped spring - */ - envelope = (undampedFreq) => { - const a = Math.exp(-undampedFreq * duration); - const b = (undampedFreq - velocity) * duration + 1; - return -safeMin + a * b; - }; - derivative = (undampedFreq) => { - const a = Math.exp(-undampedFreq * duration); - const b = (velocity - undampedFreq) * (duration * duration); - return a * b; - }; - } - const initialGuess = 5 / duration; - const undampedFreq = approximateRoot(envelope, derivative, initialGuess); - duration = motionUtils.secondsToMilliseconds(duration); - if (isNaN(undampedFreq)) { - return { - stiffness: springDefaults.stiffness, - damping: springDefaults.damping, - duration, - }; - } - else { - const stiffness = Math.pow(undampedFreq, 2) * mass; - return { - stiffness, - damping: dampingRatio * 2 * Math.sqrt(mass * stiffness), - duration, - }; - } - } - const durationKeys = ["duration", "bounce"]; - const physicsKeys = ["stiffness", "damping", "mass"]; - function isSpringType(options, keys) { - return keys.some((key) => options[key] !== undefined); - } - function getSpringOptions(options) { - let springOptions = { - velocity: springDefaults.velocity, - stiffness: springDefaults.stiffness, - damping: springDefaults.damping, - mass: springDefaults.mass, - isResolvedFromDuration: false, - ...options, - }; - // stiffness/damping/mass overrides duration/bounce - if (!isSpringType(options, physicsKeys) && - isSpringType(options, durationKeys)) { - // Time-defined springs should ignore inherited velocity. - // Velocity from interrupted animations can cause findSpring() - // to compute wildly different spring parameters, leading to - // massive oscillation on small-range animations. - springOptions.velocity = 0; - if (options.visualDuration) { - const visualDuration = options.visualDuration; - const root = (2 * Math.PI) / (visualDuration * 1.2); - const stiffness = root * root; - const damping = 2 * - motionUtils.clamp(0.05, 1, 1 - (options.bounce || 0)) * - Math.sqrt(stiffness); - springOptions = { - ...springOptions, - mass: springDefaults.mass, - stiffness, - damping, - }; - } - else { - const derived = findSpring({ ...options, velocity: 0 }); - springOptions = { - ...springOptions, - ...derived, - mass: springDefaults.mass, - }; - springOptions.isResolvedFromDuration = true; - } - } - return springOptions; - } - function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) { - const options = typeof optionsOrVisualDuration !== "object" - ? { - visualDuration: optionsOrVisualDuration, - keyframes: [0, 1], - bounce, - } - : optionsOrVisualDuration; - let { restSpeed, restDelta } = options; - const origin = options.keyframes[0]; - const target = options.keyframes[options.keyframes.length - 1]; - /** - * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator - * to reduce GC during animation. - */ - const state = { done: false, value: origin }; - const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({ - ...options, - velocity: -motionUtils.millisecondsToSeconds(options.velocity || 0), - }); - const initialVelocity = velocity || 0.0; - const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass)); - const initialDelta = target - origin; - const undampedAngularFreq = motionUtils.millisecondsToSeconds(Math.sqrt(stiffness / mass)); - /** - * If we're working on a granular scale, use smaller defaults for determining - * when the spring is finished. - * - * These defaults have been selected emprically based on what strikes a good - * ratio between feeling good and finishing as soon as changes are imperceptible. - */ - const isGranularScale = Math.abs(initialDelta) < 5; - restSpeed || (restSpeed = isGranularScale - ? springDefaults.restSpeed.granular - : springDefaults.restSpeed.default); - restDelta || (restDelta = isGranularScale - ? springDefaults.restDelta.granular - : springDefaults.restDelta.default); - let resolveSpring; - let resolveVelocity; - // Underdamped coefficients, hoisted for use in the inlined next() hot path - let angularFreq; - let A; - let sinCoeff; - let cosCoeff; - if (dampingRatio < 1) { - angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio); - A = - (initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) / - angularFreq; - // Underdamped spring - resolveSpring = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return (target - - envelope * - (A * Math.sin(angularFreq * t) + - initialDelta * Math.cos(angularFreq * t))); - }; - // Analytical derivative of underdamped spring (px/ms) - sinCoeff = - dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq; - cosCoeff = - dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq; - resolveVelocity = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return envelope * - (sinCoeff * Math.sin(angularFreq * t) + - cosCoeff * Math.cos(angularFreq * t)); - }; - } - else if (dampingRatio === 1) { - // Critically damped spring - resolveSpring = (t) => target - - Math.exp(-undampedAngularFreq * t) * - (initialDelta + - (initialVelocity + undampedAngularFreq * initialDelta) * t); - // Analytical derivative of critically damped spring (px/ms) - const C = initialVelocity + undampedAngularFreq * initialDelta; - resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) * - (undampedAngularFreq * C * t - initialVelocity); - } - else { - // Overdamped spring - const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1); - resolveSpring = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - // When performing sinh or cosh values can hit Infinity so we cap them here - const freqForT = Math.min(dampedAngularFreq * t, 300); - return (target - - (envelope * - ((initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) * - Math.sinh(freqForT) + - dampedAngularFreq * - initialDelta * - Math.cosh(freqForT))) / - dampedAngularFreq); - }; - // Analytical derivative of overdamped spring (px/ms) - const P = (initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) / - dampedAngularFreq; - const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq; - const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq; - resolveVelocity = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const freqForT = Math.min(dampedAngularFreq * t, 300); - return envelope * - (sinhCoeff * Math.sinh(freqForT) + - coshCoeff * Math.cosh(freqForT)); - }; - } - const generator = { - calculatedDuration: isResolvedFromDuration ? duration || null : null, - velocity: (t) => motionUtils.secondsToMilliseconds(resolveVelocity(t)), - next: (t) => { - /** - * For underdamped physics springs we need both position and - * velocity each tick. Compute shared trig values once to avoid - * duplicate Math.exp/sin/cos calls on the hot path. - */ - if (!isResolvedFromDuration && dampingRatio < 1) { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const sin = Math.sin(angularFreq * t); - const cos = Math.cos(angularFreq * t); - const current = target - - envelope * - (A * sin + initialDelta * cos); - const currentVelocity = motionUtils.secondsToMilliseconds(envelope * - (sinCoeff * sin + cosCoeff * cos)); - state.done = - Math.abs(currentVelocity) <= restSpeed && - Math.abs(target - current) <= restDelta; - state.value = state.done ? target : current; - return state; - } - const current = resolveSpring(t); - if (!isResolvedFromDuration) { - const currentVelocity = motionUtils.secondsToMilliseconds(resolveVelocity(t)); - state.done = - Math.abs(currentVelocity) <= restSpeed && - Math.abs(target - current) <= restDelta; - } - else { - state.done = t >= duration; - } - state.value = state.done ? target : current; - return state; - }, - toString: () => { - const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration); - const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30); - return calculatedDuration + "ms " + easing; - }, - toTransition: () => { }, - }; - return generator; - } - spring.applyToOptions = (options) => { - const generatorOptions = createGeneratorEasing(options, 100, spring); - options.ease = generatorOptions.ease; - options.duration = motionUtils.secondsToMilliseconds(generatorOptions.duration); - options.type = "keyframes"; - return options; - }; - - const velocitySampleDuration = 5; // ms - function getGeneratorVelocity(resolveValue, t, current) { - const prevT = Math.max(t - velocitySampleDuration, 0); - return motionUtils.velocityPerSecond(current - resolveValue(prevT), t - prevT); - } - - function inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) { - const origin = keyframes[0]; - const state = { - done: false, - value: origin, - }; - const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max); - const nearestBoundary = (v) => { - if (min === undefined) - return max; - if (max === undefined) - return min; - return Math.abs(min - v) < Math.abs(max - v) ? min : max; - }; - let amplitude = power * velocity; - const ideal = origin + amplitude; - const target = modifyTarget === undefined ? ideal : modifyTarget(ideal); - /** - * If the target has changed we need to re-calculate the amplitude, otherwise - * the animation will start from the wrong position. - */ - if (target !== ideal) - amplitude = target - origin; - const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant); - const calcLatest = (t) => target + calcDelta(t); - const applyFriction = (t) => { - const delta = calcDelta(t); - const latest = calcLatest(t); - state.done = Math.abs(delta) <= restDelta; - state.value = state.done ? target : latest; - }; - /** - * Ideally this would resolve for t in a stateless way, we could - * do that by always precalculating the animation but as we know - * this will be done anyway we can assume that spring will - * be discovered during that. - */ - let timeReachedBoundary; - let spring$1; - const checkCatchBoundary = (t) => { - if (!isOutOfBounds(state.value)) - return; - timeReachedBoundary = t; - spring$1 = spring({ - keyframes: [state.value, nearestBoundary(state.value)], - velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000 - damping: bounceDamping, - stiffness: bounceStiffness, - restDelta, - restSpeed, - }); - }; - checkCatchBoundary(0); - return { - calculatedDuration: null, - next: (t) => { - /** - * We need to resolve the friction to figure out if we need a - * spring but we don't want to do this twice per frame. So here - * we flag if we updated for this frame and later if we did - * we can skip doing it again. - */ - let hasUpdatedFrame = false; - if (!spring$1 && timeReachedBoundary === undefined) { - hasUpdatedFrame = true; - applyFriction(t); - checkCatchBoundary(t); - } - /** - * If we have a spring and the provided t is beyond the moment the friction - * animation crossed the min/max boundary, use the spring. - */ - if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) { - return spring$1.next(t - timeReachedBoundary); - } - else { - !hasUpdatedFrame && applyFriction(t); - return state; - } - }, - }; - } - - function createMixers(output, ease, customMixer) { - const mixers = []; - const mixerFactory = customMixer || motionUtils.MotionGlobalConfig.mix || mix; - const numMixers = output.length - 1; - for (let i = 0; i < numMixers; i++) { - let mixer = mixerFactory(output[i], output[i + 1]); - if (ease) { - const easingFunction = Array.isArray(ease) ? ease[i] || motionUtils.noop : ease; - mixer = motionUtils.pipe(easingFunction, mixer); - } - mixers.push(mixer); - } - return mixers; - } - /** - * Create a function that maps from a numerical input array to a generic output array. - * - * Accepts: - * - Numbers - * - Colors (hex, hsl, hsla, rgb, rgba) - * - Complex (combinations of one or more numbers or strings) - * - * ```jsx - * const mixColor = interpolate([0, 1], ['#fff', '#000']) - * - * mixColor(0.5) // 'rgba(128, 128, 128, 1)' - * ``` - * - * TODO Revisit this approach once we've moved to data models for values, - * probably not needed to pregenerate mixer functions. - * - * @public - */ - function interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) { - const inputLength = input.length; - motionUtils.invariant(inputLength === output.length, "Both input and output ranges must be the same length", "range-length"); - /** - * If we're only provided a single input, we can just make a function - * that returns the output. - */ - if (inputLength === 1) - return () => output[0]; - if (inputLength === 2 && output[0] === output[1]) - return () => output[1]; - const isZeroDeltaRange = input[0] === input[1]; - // If input runs highest -> lowest, reverse both arrays - if (input[0] > input[inputLength - 1]) { - input = [...input].reverse(); - output = [...output].reverse(); - } - const mixers = createMixers(output, ease, mixer); - const numMixers = mixers.length; - const interpolator = (v) => { - if (isZeroDeltaRange && v < input[0]) - return output[0]; - let i = 0; - if (numMixers > 1) { - for (; i < input.length - 2; i++) { - if (v < input[i + 1]) - break; - } - } - const progressInRange = motionUtils.progress(input[i], input[i + 1], v); - return mixers[i](progressInRange); - }; - return isClamp - ? (v) => interpolator(motionUtils.clamp(input[0], input[inputLength - 1], v)) - : interpolator; - } - - function fillOffset(offset, remaining) { - const min = offset[offset.length - 1]; - for (let i = 1; i <= remaining; i++) { - const offsetProgress = motionUtils.progress(0, remaining, i); - offset.push(mixNumber$1(min, 1, offsetProgress)); - } - } - - function defaultOffset(arr) { - const offset = [0]; - fillOffset(offset, arr.length - 1); - return offset; - } - - function convertOffsetToTimes(offset, duration) { - return offset.map((o) => o * duration); - } - - function defaultEasing(values, easing) { - return values.map(() => easing || motionUtils.easeInOut).splice(0, values.length - 1); - } - function keyframes({ duration = 300, keyframes: keyframeValues, times, ease = "easeInOut", }) { - /** - * Easing functions can be externally defined as strings. Here we convert them - * into actual functions. - */ - const easingFunctions = motionUtils.isEasingArray(ease) - ? ease.map(motionUtils.easingDefinitionToFunction) - : motionUtils.easingDefinitionToFunction(ease); - /** - * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator - * to reduce GC during animation. - */ - const state = { - done: false, - value: keyframeValues[0], - }; - /** - * Create a times array based on the provided 0-1 offsets - */ - const absoluteTimes = convertOffsetToTimes( - // Only use the provided offsets if they're the correct length - // TODO Maybe we should warn here if there's a length mismatch - times && times.length === keyframeValues.length - ? times - : defaultOffset(keyframeValues), duration); - const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, { - ease: Array.isArray(easingFunctions) - ? easingFunctions - : defaultEasing(keyframeValues, easingFunctions), - }); - return { - calculatedDuration: duration, - next: (t) => { - state.value = mapTimeToKeyframe(t); - state.done = t >= duration; - return state; - }, - }; - } - - const isNotNull = (value) => value !== null; - function getFinalKeyframe(keyframes, { repeat, repeatType = "loop" }, finalKeyframe, speed = 1) { - const resolvedKeyframes = keyframes.filter(isNotNull); - const useFirstKeyframe = speed < 0 || (repeat && repeatType !== "loop" && repeat % 2 === 1); - const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1; - return !index || finalKeyframe === undefined - ? resolvedKeyframes[index] - : finalKeyframe; - } - - const transitionTypeMap = { - decay: inertia, - inertia, - tween: keyframes, - keyframes: keyframes, - spring, - }; - function replaceTransitionType(transition) { - if (typeof transition.type === "string") { - transition.type = transitionTypeMap[transition.type]; - } - } - - class WithPromise { - constructor() { - this.updateFinished(); - } - get finished() { - return this._finished; - } - updateFinished() { - this._finished = new Promise((resolve) => { - this.resolve = resolve; - }); - } - notifyFinished() { - this.resolve(); - } - /** - * Allows the animation to be awaited. - * - * @deprecated Use `finished` instead. - */ - then(onResolve, onReject) { - return this.finished.then(onResolve, onReject); - } - } - - const percentToProgress = (percent) => percent / 100; - class JSAnimation extends WithPromise { - constructor(options) { - super(); - this.state = "idle"; - this.startTime = null; - this.isStopped = false; - /** - * The current time of the animation. - */ - this.currentTime = 0; - /** - * The time at which the animation was paused. - */ - this.holdTime = null; - /** - * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed. - */ - this.playbackSpeed = 1; - /** - * Reusable state object for the delay phase to avoid - * allocating a new object every frame. - */ - this.delayState = { - done: false, - value: undefined, - }; - /** - * This method is bound to the instance to fix a pattern where - * animation.stop is returned as a reference from a useEffect. - */ - this.stop = () => { - const { motionValue } = this.options; - if (motionValue && motionValue.updatedAt !== time.now()) { - this.tick(time.now()); - } - this.isStopped = true; - if (this.state === "idle") - return; - this.teardown(); - this.options.onStop?.(); - }; - activeAnimations.mainThread++; - this.options = options; - this.initAnimation(); - this.play(); - if (options.autoplay === false) - this.pause(); - } - initAnimation() { - const { options } = this; - replaceTransitionType(options); - const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options; - let { keyframes: keyframes$1 } = options; - const generatorFactory = type || keyframes; - if (generatorFactory !== keyframes) { - motionUtils.invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, "spring-two-frames"); - } - if (generatorFactory !== keyframes && - typeof keyframes$1[0] !== "number") { - this.mixKeyframes = motionUtils.pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1])); - keyframes$1 = [0, 100]; - } - const generator = generatorFactory({ ...options, keyframes: keyframes$1 }); - /** - * If we have a mirror repeat type we need to create a second generator that outputs the - * mirrored (not reversed) animation and later ping pong between the two generators. - */ - if (repeatType === "mirror") { - this.mirroredGenerator = generatorFactory({ - ...options, - keyframes: [...keyframes$1].reverse(), - velocity: -velocity, - }); - } - /** - * If duration is undefined and we have repeat options, - * we need to calculate a duration from the generator. - * - * We set it to the generator itself to cache the duration. - * Any timeline resolver will need to have already precalculated - * the duration by this step. - */ - if (generator.calculatedDuration === null) { - generator.calculatedDuration = calcGeneratorDuration(generator); - } - const { calculatedDuration } = generator; - this.calculatedDuration = calculatedDuration; - this.resolvedDuration = calculatedDuration + repeatDelay; - this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay; - this.generator = generator; - } - updateTime(timestamp) { - const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed; - // Update currentTime - if (this.holdTime !== null) { - this.currentTime = this.holdTime; - } - else { - // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 = - // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for - // example. - this.currentTime = animationTime; - } - } - tick(timestamp, sample = false) { - const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this; - if (this.startTime === null) - return generator.next(0); - const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options; - /** - * requestAnimationFrame timestamps can come through as lower than - * the startTime as set by performance.now(). Here we prevent this, - * though in the future it could be possible to make setting startTime - * a pending operation that gets resolved here. - */ - if (this.speed > 0) { - this.startTime = Math.min(this.startTime, timestamp); - } - else if (this.speed < 0) { - this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime); - } - if (sample) { - this.currentTime = timestamp; - } - else { - this.updateTime(timestamp); - } - // Rebase on delay - const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1); - const isInDelayPhase = this.playbackSpeed >= 0 - ? timeWithoutDelay < 0 - : timeWithoutDelay > totalDuration; - this.currentTime = Math.max(timeWithoutDelay, 0); - // If this animation has finished, set the current time to the total duration. - if (this.state === "finished" && this.holdTime === null) { - this.currentTime = totalDuration; - } - let elapsed = this.currentTime; - let frameGenerator = generator; - if (repeat) { - /** - * Get the current progress (0-1) of the animation. If t is > - * than duration we'll get values like 2.5 (midway through the - * third iteration) - */ - const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration; - /** - * Get the current iteration (0 indexed). For instance the floor of - * 2.5 is 2. - */ - let currentIteration = Math.floor(progress); - /** - * Get the current progress of the iteration by taking the remainder - * so 2.5 is 0.5 through iteration 2 - */ - let iterationProgress = progress % 1.0; - /** - * If iteration progress is 1 we count that as the end - * of the previous iteration. - */ - if (!iterationProgress && progress >= 1) { - iterationProgress = 1; - } - iterationProgress === 1 && currentIteration--; - currentIteration = Math.min(currentIteration, repeat + 1); - /** - * Reverse progress if we're not running in "normal" direction - */ - const isOddIteration = Boolean(currentIteration % 2); - if (isOddIteration) { - if (repeatType === "reverse") { - iterationProgress = 1 - iterationProgress; - if (repeatDelay) { - iterationProgress -= repeatDelay / resolvedDuration; - } - } - else if (repeatType === "mirror") { - frameGenerator = mirroredGenerator; - } - } - elapsed = motionUtils.clamp(0, 1, iterationProgress) * resolvedDuration; - } - /** - * If we're in negative time, set state as the initial keyframe. - * This prevents delay: x, duration: 0 animations from finishing - * instantly. - */ - let state; - if (isInDelayPhase) { - this.delayState.value = keyframes[0]; - state = this.delayState; - } - else { - state = frameGenerator.next(elapsed); - } - if (mixKeyframes && !isInDelayPhase) { - state.value = mixKeyframes(state.value); - } - let { done } = state; - if (!isInDelayPhase && calculatedDuration !== null) { - done = - this.playbackSpeed >= 0 - ? this.currentTime >= totalDuration - : this.currentTime <= 0; - } - const isAnimationFinished = this.holdTime === null && - (this.state === "finished" || (this.state === "running" && done)); - // TODO: The exception for inertia could be cleaner here - if (isAnimationFinished && type !== inertia) { - state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed); - } - if (onUpdate) { - onUpdate(state.value); - } - if (isAnimationFinished) { - this.finish(); - } - return state; - } - /** - * Allows the returned animation to be awaited or promise-chained. Currently - * resolves when the animation finishes at all but in a future update could/should - * reject if its cancels. - */ - then(resolve, reject) { - return this.finished.then(resolve, reject); - } - get duration() { - return motionUtils.millisecondsToSeconds(this.calculatedDuration); - } - get iterationDuration() { - const { delay = 0 } = this.options || {}; - return this.duration + motionUtils.millisecondsToSeconds(delay); - } - get time() { - return motionUtils.millisecondsToSeconds(this.currentTime); - } - set time(newTime) { - newTime = motionUtils.secondsToMilliseconds(newTime); - this.currentTime = newTime; - if (this.startTime === null || - this.holdTime !== null || - this.playbackSpeed === 0) { - this.holdTime = newTime; - } - else if (this.driver) { - this.startTime = this.driver.now() - newTime / this.playbackSpeed; - } - if (this.driver) { - this.driver.start(false); - } - else { - this.startTime = 0; - this.state = "paused"; - this.holdTime = newTime; - this.tick(newTime); - } - } - /** - * Returns the generator's velocity at the current time in units/second. - * Uses the analytical derivative when available (springs), avoiding - * the MotionValue's frame-dependent velocity estimation. - */ - getGeneratorVelocity() { - const t = this.currentTime; - if (t <= 0) - return this.options.velocity || 0; - if (this.generator.velocity) { - return this.generator.velocity(t); - } - // Fallback: finite difference - const current = this.generator.next(t).value; - return getGeneratorVelocity((s) => this.generator.next(s).value, t, current); - } - get speed() { - return this.playbackSpeed; - } - set speed(newSpeed) { - const hasChanged = this.playbackSpeed !== newSpeed; - if (hasChanged && this.driver) { - this.updateTime(time.now()); - } - this.playbackSpeed = newSpeed; - if (hasChanged && this.driver) { - this.time = motionUtils.millisecondsToSeconds(this.currentTime); - } - } - play() { - if (this.isStopped) - return; - const { driver = frameloopDriver, startTime } = this.options; - if (!this.driver) { - this.driver = driver((timestamp) => this.tick(timestamp)); - } - this.options.onPlay?.(); - const now = this.driver.now(); - if (this.state === "finished") { - this.updateFinished(); - this.startTime = now; - } - else if (this.holdTime !== null) { - this.startTime = now - this.holdTime; - } - else if (!this.startTime) { - this.startTime = startTime ?? now; - } - if (this.state === "finished" && this.speed < 0) { - this.startTime += this.calculatedDuration; - } - this.holdTime = null; - /** - * Set playState to running only after we've used it in - * the previous logic. - */ - this.state = "running"; - this.driver.start(); - } - pause() { - this.state = "paused"; - this.updateTime(time.now()); - this.holdTime = this.currentTime; - } - complete() { - if (this.state !== "running") { - this.play(); - } - this.state = "finished"; - this.holdTime = null; - } - finish() { - this.notifyFinished(); - this.teardown(); - this.state = "finished"; - this.options.onComplete?.(); - } - cancel() { - this.holdTime = null; - this.startTime = 0; - this.tick(0); - this.teardown(); - this.options.onCancel?.(); - } - teardown() { - this.state = "idle"; - this.stopDriver(); - this.startTime = this.holdTime = null; - activeAnimations.mainThread--; - } - stopDriver() { - if (!this.driver) - return; - this.driver.stop(); - this.driver = undefined; - } - sample(sampleTime) { - this.startTime = 0; - return this.tick(sampleTime, true); - } - attachTimeline(timeline) { - if (this.options.allowFlatten) { - this.options.type = "keyframes"; - this.options.ease = "linear"; - this.initAnimation(); - } - this.driver?.stop(); - return timeline.observe(this); - } - } - // Legacy function support - function animateValue(options) { - return new JSAnimation(options); - } - - function fillWildcards(keyframes) { - for (let i = 1; i < keyframes.length; i++) { - keyframes[i] ?? (keyframes[i] = keyframes[i - 1]); - } - } - - const radToDeg = (rad) => (rad * 180) / Math.PI; - const rotate = (v) => { - const angle = radToDeg(Math.atan2(v[1], v[0])); - return rebaseAngle(angle); - }; - const matrix2dParsers = { - x: 4, - y: 5, - translateX: 4, - translateY: 5, - scaleX: 0, - scaleY: 3, - scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2, - rotate, - rotateZ: rotate, - skewX: (v) => radToDeg(Math.atan(v[1])), - skewY: (v) => radToDeg(Math.atan(v[2])), - skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2, - }; - const rebaseAngle = (angle) => { - angle = angle % 360; - if (angle < 0) - angle += 360; - return angle; - }; - const rotateZ = rotate; - const scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]); - const scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]); - const matrix3dParsers = { - x: 12, - y: 13, - z: 14, - translateX: 12, - translateY: 13, - translateZ: 14, - scaleX, - scaleY, - scale: (v) => (scaleX(v) + scaleY(v)) / 2, - rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))), - rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))), - rotateZ, - rotate: rotateZ, - skewX: (v) => radToDeg(Math.atan(v[4])), - skewY: (v) => radToDeg(Math.atan(v[1])), - skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2, - }; - function defaultTransformValue(name) { - return name.includes("scale") ? 1 : 0; - } - function parseValueFromTransform(transform, name) { - if (!transform || transform === "none") { - return defaultTransformValue(name); - } - const matrix3dMatch = transform.match(/^matrix3d\(([-\d.e\s,]+)\)$/u); - let parsers; - let match; - if (matrix3dMatch) { - parsers = matrix3dParsers; - match = matrix3dMatch; - } - else { - const matrix2dMatch = transform.match(/^matrix\(([-\d.e\s,]+)\)$/u); - parsers = matrix2dParsers; - match = matrix2dMatch; - } - if (!match) { - return defaultTransformValue(name); - } - const valueParser = parsers[name]; - const values = match[1].split(",").map(convertTransformToNumber); - return typeof valueParser === "function" - ? valueParser(values) - : values[valueParser]; - } - const readTransformValue = (instance, name) => { - const { transform = "none" } = getComputedStyle(instance); - return parseValueFromTransform(transform, name); - }; - function convertTransformToNumber(value) { - return parseFloat(value.trim()); - } - - /** - * Generate a list of every possible transform key. - */ - const transformPropOrder = [ - "transformPerspective", - "x", - "y", - "z", - "translateX", - "translateY", - "translateZ", - "scale", - "scaleX", - "scaleY", - "rotate", - "rotateX", - "rotateY", - "rotateZ", - "skew", - "skewX", - "skewY", - ]; - /** - * A quick lookup for transform props. - * - * `pathRotation` is a transform for routing purposes (skipped from raw - * style application, wired to the transform composite, flags transform - * dirty) but is intentionally NOT in `transformPropOrder` — it is - * composed onto `rotate` at the build sites, not serialized in its own - * slot, and must stay out of the order-array consumers (parse-transform, - * unit-conversion, keys-position). - */ - const transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, "pathRotation"]))(); - - const isNumOrPxType = (v) => v === number || v === px; - const transformKeys = new Set(["x", "y", "z"]); - const nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key)); - function removeNonTranslationalTransform(visualElement) { - const removedTransforms = []; - nonTranslationalTransformKeys.forEach((key) => { - const value = visualElement.getValue(key); - if (value !== undefined) { - removedTransforms.push([key, value.get()]); - value.set(key.startsWith("scale") ? 1 : 0); - } - }); - return removedTransforms; - } - const positionalValues = { - // Dimensions - width: ({ x }, { paddingLeft = "0", paddingRight = "0", boxSizing }) => { - const width = x.max - x.min; - return boxSizing === "border-box" - ? width - : width - parseFloat(paddingLeft) - parseFloat(paddingRight); - }, - height: ({ y }, { paddingTop = "0", paddingBottom = "0", boxSizing }) => { - const height = y.max - y.min; - return boxSizing === "border-box" - ? height - : height - parseFloat(paddingTop) - parseFloat(paddingBottom); - }, - top: (_bbox, { top }) => parseFloat(top), - left: (_bbox, { left }) => parseFloat(left), - bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min), - right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min), - // Transform - x: (_bbox, { transform }) => parseValueFromTransform(transform, "x"), - y: (_bbox, { transform }) => parseValueFromTransform(transform, "y"), - }; - // Alias translate longform names - positionalValues.translateX = positionalValues.x; - positionalValues.translateY = positionalValues.y; - - const toResolve = new Set(); - let isScheduled = false; - let anyNeedsMeasurement = false; - let isForced = false; - function measureAllKeyframes() { - if (anyNeedsMeasurement) { - const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement); - const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element)); - const transformsToRestore = new Map(); - /** - * Write pass - * If we're measuring elements we want to remove bounding box-changing transforms. - */ - elementsToMeasure.forEach((element) => { - const removedTransforms = removeNonTranslationalTransform(element); - if (!removedTransforms.length) - return; - transformsToRestore.set(element, removedTransforms); - element.render(); - }); - // Read - resolversToMeasure.forEach((resolver) => resolver.measureInitialState()); - // Write - elementsToMeasure.forEach((element) => { - element.render(); - const restore = transformsToRestore.get(element); - if (restore) { - restore.forEach(([key, value]) => { - element.getValue(key)?.set(value); - }); - } - }); - // Read - resolversToMeasure.forEach((resolver) => resolver.measureEndState()); - // Write - resolversToMeasure.forEach((resolver) => { - if (resolver.suspendedScrollY !== undefined) { - window.scrollTo(0, resolver.suspendedScrollY); - } - }); - } - anyNeedsMeasurement = false; - isScheduled = false; - toResolve.forEach((resolver) => resolver.complete(isForced)); - toResolve.clear(); - } - function readAllKeyframes() { - toResolve.forEach((resolver) => { - resolver.readKeyframes(); - if (resolver.needsMeasurement) { - anyNeedsMeasurement = true; - } - }); - } - function flushKeyframeResolvers() { - isForced = true; - readAllKeyframes(); - measureAllKeyframes(); - isForced = false; - } - class KeyframeResolver { - constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) { - this.state = "pending"; - /** - * Track whether this resolver is async. If it is, it'll be added to the - * resolver queue and flushed in the next frame. Resolvers that aren't going - * to trigger read/write thrashing don't need to be async. - */ - this.isAsync = false; - /** - * Track whether this resolver needs to perform a measurement - * to resolve its keyframes. - */ - this.needsMeasurement = false; - this.unresolvedKeyframes = [...unresolvedKeyframes]; - this.onComplete = onComplete; - this.name = name; - this.motionValue = motionValue; - this.element = element; - this.isAsync = isAsync; - } - scheduleResolve() { - this.state = "scheduled"; - if (this.isAsync) { - toResolve.add(this); - if (!isScheduled) { - isScheduled = true; - frame.read(readAllKeyframes); - frame.resolveKeyframes(measureAllKeyframes); - } - } - else { - this.readKeyframes(); - this.complete(); - } - } - readKeyframes() { - const { unresolvedKeyframes, name, element, motionValue } = this; - // If initial keyframe is null we need to read it from the DOM - if (unresolvedKeyframes[0] === null) { - const currentValue = motionValue?.get(); - // TODO: This doesn't work if the final keyframe is a wildcard - const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1]; - if (currentValue !== undefined) { - unresolvedKeyframes[0] = currentValue; - } - else if (element && name) { - const valueAsRead = element.readValue(name, finalKeyframe); - if (valueAsRead !== undefined && valueAsRead !== null) { - unresolvedKeyframes[0] = valueAsRead; - } - } - if (unresolvedKeyframes[0] === undefined) { - unresolvedKeyframes[0] = finalKeyframe; - } - if (motionValue && currentValue === undefined) { - motionValue.set(unresolvedKeyframes[0]); - } - } - fillWildcards(unresolvedKeyframes); - } - setFinalKeyframe() { } - measureInitialState() { } - renderEndStyles() { } - measureEndState() { } - complete(isForcedComplete = false) { - this.state = "complete"; - this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete); - toResolve.delete(this); - } - cancel() { - if (this.state === "scheduled") { - toResolve.delete(this); - this.state = "pending"; - } - } - resume() { - if (this.state === "pending") - this.scheduleResolve(); - } - } - - const isCSSVar = (name) => name.startsWith("--"); - - function setStyle(element, name, value) { - isCSSVar(name) - ? element.style.setProperty(name, value) - : (element.style[name] = value); - } - - /** - * Add the ability for test suites to manually set support flags - * to better test more environments. - */ - const supportsFlags = {}; - - function memoSupports(callback, supportsFlag) { - const memoized = motionUtils.memo(callback); - return () => supportsFlags[supportsFlag] ?? memoized(); - } - - const supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, "scrollTimeline"); - const supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, "viewTimeline"); - - const supportsLinearEasing = /*@__PURE__*/ memoSupports(() => { - try { - document - .createElement("div") - .animate({ opacity: 0 }, { easing: "linear(0, 1)" }); - } - catch (e) { - return false; - } - return true; - }, "linearEasing"); - - const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`; - - const supportedWaapiEasing = { - linear: "linear", - ease: "ease", - easeIn: "ease-in", - easeOut: "ease-out", - easeInOut: "ease-in-out", - circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]), - circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]), - backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]), - backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]), - }; - - function mapEasingToNativeEasing(easing, duration) { - if (!easing) { - return undefined; - } - else if (typeof easing === "function") { - return supportsLinearEasing() - ? generateLinearEasing(easing, duration) - : "ease-out"; - } - else if (motionUtils.isBezierDefinition(easing)) { - return cubicBezierAsString(easing); - } - else if (Array.isArray(easing)) { - return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) || - supportedWaapiEasing.easeOut); - } - else { - return supportedWaapiEasing[easing]; - } - } - - function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = "loop", ease = "easeOut", times, } = {}, pseudoElement = undefined) { - const keyframeOptions = { - [valueName]: keyframes, - }; - if (times) - keyframeOptions.offset = times; - const easing = mapEasingToNativeEasing(ease, duration); - /** - * If this is an easing array, apply to keyframes, not animation as a whole - */ - if (Array.isArray(easing)) - keyframeOptions.easing = easing; - if (statsBuffer.value) { - activeAnimations.waapi++; - } - const options = { - delay, - duration, - easing: !Array.isArray(easing) ? easing : "linear", - fill: "both", - iterations: repeat + 1, - direction: repeatType === "reverse" ? "alternate" : "normal", - }; - if (pseudoElement) - options.pseudoElement = pseudoElement; - const animation = element.animate(keyframeOptions, options); - if (statsBuffer.value) { - animation.finished.finally(() => { - activeAnimations.waapi--; - }); - } - return animation; - } - - function isGenerator(type) { - return typeof type === "function" && "applyToOptions" in type; - } - - function applyGeneratorOptions({ type, ...options }) { - if (isGenerator(type) && supportsLinearEasing()) { - return type.applyToOptions(options); - } - else { - options.duration ?? (options.duration = 300); - options.ease ?? (options.ease = "easeOut"); - } - return options; - } - - /** - * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API. - */ - class NativeAnimation extends WithPromise { - constructor(options) { - super(); - this.finishedTime = null; - this.isStopped = false; - /** - * Tracks a manually-set start time that takes precedence over WAAPI's - * dynamic startTime. This is cleared when play() or time setter is called, - * allowing WAAPI to take over timing. - */ - this.manualStartTime = null; - if (!options) - return; - const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options; - this.isPseudoElement = Boolean(pseudoElement); - this.allowFlatten = allowFlatten; - this.options = options; - motionUtils.invariant(typeof options.type !== "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring"); - const transition = applyGeneratorOptions(options); - this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement); - if (transition.autoplay === false) { - this.animation.pause(); - } - this.animation.onfinish = () => { - this.finishedTime = this.time; - if (!pseudoElement) { - const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed); - if (this.updateMotionValue) { - this.updateMotionValue(keyframe); - } - /** - * If we can, we want to commit the final style as set by the user, - * rather than the computed keyframe value supplied by the animation. - * We always do this, even when a motion value is present, to prevent - * a visual flash in Firefox where the WAAPI animation's fill is removed - * during cancel() before the scheduled render can apply the correct value. - */ - setStyle(element, name, keyframe); - this.animation.cancel(); - } - onComplete?.(); - this.notifyFinished(); - }; - } - play() { - if (this.isStopped) - return; - this.manualStartTime = null; - this.animation.play(); - if (this.state === "finished") { - this.updateFinished(); - } - } - pause() { - this.animation.pause(); - } - complete() { - this.animation.finish?.(); - } - cancel() { - try { - this.animation.cancel(); - } - catch (e) { } - } - stop() { - if (this.isStopped) - return; - this.isStopped = true; - const { state } = this; - if (state === "idle" || state === "finished") { - return; - } - if (this.updateMotionValue) { - this.updateMotionValue(); - } - else { - this.commitStyles(); - } - if (!this.isPseudoElement) - this.cancel(); - } - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * In this method, we commit styles back to the DOM before cancelling - * the animation. - * - * This is designed to be overridden by NativeAnimationExtended, which - * will create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to also correctly calculate velocity for any subsequent animation - * while deferring the commit until the next animation frame. - */ - commitStyles() { - const element = this.options?.element; - if (!this.isPseudoElement && element?.isConnected) { - this.animation.commitStyles?.(); - } - } - get duration() { - const duration = this.animation.effect?.getComputedTiming?.().duration || 0; - return motionUtils.millisecondsToSeconds(Number(duration)); - } - get iterationDuration() { - const { delay = 0 } = this.options || {}; - return this.duration + motionUtils.millisecondsToSeconds(delay); - } - get time() { - return motionUtils.millisecondsToSeconds(Number(this.animation.currentTime) || 0); - } - set time(newTime) { - const wasFinished = this.finishedTime !== null; - this.manualStartTime = null; - this.finishedTime = null; - this.animation.currentTime = motionUtils.secondsToMilliseconds(newTime); - if (wasFinished) { - this.animation.pause(); - } - } - /** - * The playback speed of the animation. - * 1 = normal speed, 2 = double speed, 0.5 = half speed. - */ - get speed() { - return this.animation.playbackRate; - } - set speed(newSpeed) { - // Allow backwards playback after finishing - if (newSpeed < 0) - this.finishedTime = null; - this.animation.playbackRate = newSpeed; - } - get state() { - return this.finishedTime !== null - ? "finished" - : this.animation.playState; - } - get startTime() { - return this.manualStartTime ?? Number(this.animation.startTime); - } - set startTime(newStartTime) { - this.manualStartTime = this.animation.startTime = newStartTime; - } - /** - * Attaches a timeline to the animation, for instance the `ScrollTimeline`. - */ - attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) { - if (this.allowFlatten) { - this.animation.effect?.updateTiming({ easing: "linear" }); - } - this.animation.onfinish = null; - if (timeline && supportsScrollTimeline()) { - this.animation.timeline = timeline; - if (rangeStart) - this.animation.rangeStart = rangeStart; - if (rangeEnd) - this.animation.rangeEnd = rangeEnd; - return motionUtils.noop; - } - else { - return observe(this); - } - } - } - - const unsupportedEasingFunctions = { - anticipate: motionUtils.anticipate, - backInOut: motionUtils.backInOut, - circInOut: motionUtils.circInOut, - }; - function isUnsupportedEase(key) { - return key in unsupportedEasingFunctions; - } - function replaceStringEasing(transition) { - if (typeof transition.ease === "string" && - isUnsupportedEase(transition.ease)) { - transition.ease = unsupportedEasingFunctions[transition.ease]; - } - } - - /** - * 10ms is chosen here as it strikes a balance between smooth - * results (more than one keyframe per frame at 60fps) and - * keyframe quantity. - */ - const sampleDelta = 10; //ms - class NativeAnimationExtended extends NativeAnimation { - constructor(options) { - /** - * The base NativeAnimation function only supports a subset - * of Motion easings, and WAAPI also only supports some - * easing functions via string/cubic-bezier definitions. - * - * This function replaces those unsupported easing functions - * with a JS easing function. This will later get compiled - * to a linear() easing function. - */ - replaceStringEasing(options); - /** - * Ensure we replace the transition type with a generator function - * before passing to WAAPI. - * - * TODO: Does this have a better home? It could be shared with - * JSAnimation. - */ - replaceTransitionType(options); - super(options); - /** - * Only set startTime when the animation should autoplay. - * Setting startTime on a paused WAAPI animation unpauses it - * (per the WAAPI spec), which breaks autoplay: false. - */ - if (options.startTime !== undefined && options.autoplay !== false) { - this.startTime = options.startTime; - } - this.options = options; - } - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * Rather than read committed styles back out of the DOM, we can - * create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to calculate velocity for any subsequent animation. - */ - updateMotionValue(value) { - const { motionValue, onUpdate, onComplete, element, ...options } = this.options; - if (!motionValue) - return; - if (value !== undefined) { - motionValue.set(value); - return; - } - const sampleAnimation = new JSAnimation({ - ...options, - autoplay: false, - }); - /** - * Use wall-clock elapsed time for sampling. - * Under CPU load, WAAPI's currentTime may not reflect actual - * elapsed time, causing incorrect sampling and visual jumps. - */ - const sampleTime = Math.max(sampleDelta, time.now() - this.startTime); - const delta = motionUtils.clamp(0, sampleDelta, sampleTime - sampleDelta); - const current = sampleAnimation.sample(sampleTime).value; - /** - * Write the estimated value to inline style so it persists - * after cancel(), covering the async gap before the next - * animation starts. - */ - const { name } = this.options; - if (element && name) - setStyle(element, name, current); - motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta); - sampleAnimation.stop(); - } - } - - /** - * Check if a value is animatable. Examples: - * - * ✅: 100, "100px", "#fff" - * ❌: "block", "url(2.jpg)" - * @param value - * - * @internal - */ - const isAnimatable = (value, name) => { - // If the list of keys that might be non-animatable grows, replace with Set - if (name === "zIndex") - return false; - // If it's a number or a keyframes array, we can animate it. We might at some point - // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this, - // but for now lets leave it like this for performance reasons - if (typeof value === "number" || Array.isArray(value)) - return true; - if (typeof value === "string" && // It's animatable if we have a string - (complex.test(value) || value === "0") && // And it contains numbers and/or colors - !value.startsWith("url(") // Unless it starts with "url(" - ) { - return true; - } - return false; - }; - - function hasKeyframesChanged(keyframes) { - const current = keyframes[0]; - if (keyframes.length === 1) - return true; - for (let i = 0; i < keyframes.length; i++) { - if (keyframes[i] !== current) - return true; - } - } - function canAnimate(keyframes, name, type, velocity) { - /** - * Check if we're able to animate between the start and end keyframes, - * and throw a warning if we're attempting to animate between one that's - * animatable and another that isn't. - */ - const originKeyframe = keyframes[0]; - if (originKeyframe === null) { - return false; - } - /** - * These aren't traditionally animatable but we do support them. - * In future we could look into making this more generic or replacing - * this function with mix() === mixImmediate - */ - if (name === "display" || name === "visibility") - return true; - const targetKeyframe = keyframes[keyframes.length - 1]; - const isOriginAnimatable = isAnimatable(originKeyframe, name); - const isTargetAnimatable = isAnimatable(targetKeyframe, name); - motionUtils.warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable"); - // Always skip if any of these are true - if (!isOriginAnimatable || !isTargetAnimatable) { - return false; - } - return (hasKeyframesChanged(keyframes) || - ((type === "spring" || isGenerator(type)) && velocity)); - } - - function makeAnimationInstant(options) { - options.duration = 0; - options.type = "keyframes"; - } - - /** - * A list of values that can be hardware-accelerated. - */ - const acceleratedValues = new Set([ - "opacity", - "clipPath", - "filter", - "transform", - // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved - // or until we implement support for linear() easing. - // "background-color" - ]); - - const browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/; - function hasBrowserOnlyColors(keyframes) { - for (let i = 0; i < keyframes.length; i++) { - if (typeof keyframes[i] === "string" && - browserColorFunctions.test(keyframes[i])) { - return true; - } - } - return false; - } - - const colorProperties = new Set([ - "color", - "backgroundColor", - "outlineColor", - "fill", - "stroke", - "borderColor", - "borderTopColor", - "borderRightColor", - "borderBottomColor", - "borderLeftColor", - ]); - const supportsWaapi = /*@__PURE__*/ motionUtils.memo(() => Object.hasOwnProperty.call(Element.prototype, "animate")); - function supportsBrowserAnimation(options) { - const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options; - const subject = motionValue?.owner?.current; - /** - * We use this check instead of isHTMLElement() because we explicitly - * **don't** want elements in different timing contexts (i.e. popups) - * to be accelerated, as it's not possible to sync these animations - * properly with those driven from the main window frameloop. - */ - if (!(subject instanceof HTMLElement)) { - return false; - } - const { onUpdate, transformTemplate } = motionValue.owner.getProps(); - return (supportsWaapi() && - name && - /** - * Force WAAPI for color properties with browser-only color formats - * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse. - */ - (acceleratedValues.has(name) || - (colorProperties.has(name) && - hasBrowserOnlyColors(keyframes))) && - (name !== "transform" || !transformTemplate) && - /** - * If we're outputting values to onUpdate then we can't use WAAPI as there's - * no way to read the value from WAAPI every frame. - */ - !onUpdate && - !repeatDelay && - repeatType !== "mirror" && - damping !== 0 && - type !== "inertia"); - } - - /** - * Maximum time allowed between an animation being created and it being - * resolved for us to use the latter as the start time. - * - * This is to ensure that while we prefer to "start" an animation as soon - * as it's triggered, we also want to avoid a visual jump if there's a big delay - * between these two moments. - */ - const MAX_RESOLVE_DELAY = 40; - class AsyncMotionValueAnimation extends WithPromise { - constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", keyframes, name, motionValue, element, ...options }) { - super(); - /** - * Bound to support return animation.stop pattern - */ - this.stop = () => { - if (this._animation) { - this._animation.stop(); - this.stopTimeline?.(); - } - this.keyframeResolver?.cancel(); - }; - this.createdAt = time.now(); - const optionsWithDefaults = { - autoplay, - delay, - type, - repeat, - repeatDelay, - repeatType, - name, - motionValue, - element, - ...options, - }; - const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver; - this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element); - this.keyframeResolver?.scheduleResolve(); - } - onKeyframesResolved(keyframes, finalKeyframe, options, sync) { - this.keyframeResolver = undefined; - const { name, type, velocity, delay, isHandoff, onUpdate } = options; - this.resolvedAt = time.now(); - /** - * If we can't animate this value with the resolved keyframes - * then we should complete it immediately. - */ - let canAnimateValue = true; - if (!canAnimate(keyframes, name, type, velocity)) { - canAnimateValue = false; - if (motionUtils.MotionGlobalConfig.instantAnimations || !delay) { - onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe)); - } - keyframes[0] = keyframes[keyframes.length - 1]; - makeAnimationInstant(options); - options.repeat = 0; - } - /** - * Resolve startTime for the animation. - * - * This method uses the createdAt and resolvedAt to calculate the - * animation startTime. *Ideally*, we would use the createdAt time as t=0 - * as the following frame would then be the first frame of the animation in - * progress, which would feel snappier. - * - * However, if there's a delay (main thread work) between the creation of - * the animation and the first committed frame, we prefer to use resolvedAt - * to avoid a sudden jump into the animation. - */ - const startTime = sync - ? !this.resolvedAt - ? this.createdAt - : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY - ? this.resolvedAt - : this.createdAt - : undefined; - const resolvedOptions = { - startTime, - finalKeyframe, - ...options, - keyframes, - }; - /** - * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via - * WAAPI. Therefore, this animation must be JS to ensure it runs "under" the - * optimised animation. - * - * Also skip WAAPI when keyframes aren't animatable, as the resolved - * values may not be valid CSS and would trigger browser warnings. - */ - const useWaapi = canAnimateValue && - !isHandoff && - supportsBrowserAnimation(resolvedOptions); - const element = resolvedOptions.motionValue?.owner?.current; - let animation; - if (useWaapi) { - try { - animation = new NativeAnimationExtended({ - ...resolvedOptions, - element, - }); - } - catch { - animation = new JSAnimation(resolvedOptions); - } - } - else { - animation = new JSAnimation(resolvedOptions); - } - animation.finished.then(() => { - this.notifyFinished(); - }).catch(motionUtils.noop); - if (this.pendingTimeline) { - this.stopTimeline = animation.attachTimeline(this.pendingTimeline); - this.pendingTimeline = undefined; - } - this._animation = animation; - } - get finished() { - if (!this._animation) { - return this._finished; - } - else { - return this.animation.finished; - } - } - then(onResolve, _onReject) { - return this.finished.finally(onResolve).then(() => { }); - } - get animation() { - if (!this._animation) { - this.keyframeResolver?.resume(); - flushKeyframeResolvers(); - } - return this._animation; - } - get duration() { - return this.animation.duration; - } - get iterationDuration() { - return this.animation.iterationDuration; - } - get time() { - return this.animation.time; - } - set time(newTime) { - this.animation.time = newTime; - } - get speed() { - return this.animation.speed; - } - get state() { - return this.animation.state; - } - set speed(newSpeed) { - this.animation.speed = newSpeed; - } - get startTime() { - return this.animation.startTime; - } - attachTimeline(timeline) { - if (this._animation) { - this.stopTimeline = this.animation.attachTimeline(timeline); - } - else { - this.pendingTimeline = timeline; - } - return () => this.stop(); - } - play() { - this.animation.play(); - } - pause() { - this.animation.pause(); - } - complete() { - this.animation.complete(); - } - cancel() { - if (this._animation) { - this.animation.cancel(); - } - this.keyframeResolver?.cancel(); - } - } - - class GroupAnimation { - constructor(animations) { - // Bound to accomadate common `return animation.stop` pattern - this.stop = () => this.runAll("stop"); - this.animations = animations.filter(Boolean); - } - get finished() { - return Promise.all(this.animations.map((animation) => animation.finished)); - } - /** - * TODO: Filter out cancelled or stopped animations before returning - */ - getAll(propName) { - return this.animations[0][propName]; - } - setAll(propName, newValue) { - for (let i = 0; i < this.animations.length; i++) { - this.animations[i][propName] = newValue; - } - } - attachTimeline(timeline) { - const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline)); - return () => { - subscriptions.forEach((cancel, i) => { - cancel && cancel(); - this.animations[i].stop(); - }); - }; - } - get time() { - return this.getAll("time"); - } - set time(time) { - this.setAll("time", time); - } - get speed() { - return this.getAll("speed"); - } - set speed(speed) { - this.setAll("speed", speed); - } - get state() { - return this.getAll("state"); - } - get startTime() { - return this.getAll("startTime"); - } - get duration() { - return getMax(this.animations, "duration"); - } - get iterationDuration() { - return getMax(this.animations, "iterationDuration"); - } - runAll(methodName) { - this.animations.forEach((controls) => controls[methodName]()); - } - play() { - this.runAll("play"); - } - pause() { - this.runAll("pause"); - } - cancel() { - this.runAll("cancel"); - } - complete() { - this.runAll("complete"); - } - } - function getMax(animations, propName) { - let max = 0; - for (let i = 0; i < animations.length; i++) { - const value = animations[i][propName]; - if (value !== null && value > max) { - max = value; - } - } - return max; - } - - class GroupAnimationWithThen extends GroupAnimation { - then(onResolve, _onReject) { - return this.finished.finally(onResolve).then(() => { }); - } - } - - class NativeAnimationWrapper extends NativeAnimation { - constructor(animation) { - super(); - this.animation = animation; - animation.onfinish = () => { - this.finishedTime = this.time; - this.notifyFinished(); - }; - } - } - - const animationMaps = new WeakMap(); - const animationMapKey = (name, pseudoElement = "") => `${name}:${pseudoElement}`; - function getAnimationMap(element) { - let map = animationMaps.get(element); - if (!map) { - map = new Map(); - animationMaps.set(element, map); - } - return map; - } - - function calcChildStagger(children, child, delayChildren, staggerChildren = 0, staggerDirection = 1) { - const index = Array.from(children) - .sort((a, b) => a.sortNodePosition(b)) - .indexOf(child); - const numChildren = children.size; - const maxStaggerDuration = (numChildren - 1) * staggerChildren; - const delayIsFunction = typeof delayChildren === "function"; - return delayIsFunction - ? delayChildren(index, numChildren) - : staggerDirection === 1 - ? index * staggerChildren - : maxStaggerDuration - index * staggerChildren; - } - - /** - * Maximum time between the value of two frames, beyond which we - * assume the velocity has since been 0. - */ - const MAX_VELOCITY_DELTA = 30; - const isFloat = (value) => { - return !isNaN(parseFloat(value)); - }; - const collectMotionValues = { - current: undefined, - }; - /** - * `MotionValue` is used to track the state and velocity of motion values. - * - * @public - */ - class MotionValue { - /** - * @param init - The initiating value - * @param config - Optional configuration options - * - * - `transformer`: A function to transform incoming values with. - */ - constructor(init, options = {}) { - /** - * Tracks whether this value can output a velocity. Currently this is only true - * if the value is numerical, but we might be able to widen the scope here and support - * other value types. - * - * @internal - */ - this.canTrackVelocity = null; - /** - * An object containing a SubscriptionManager for each active event. - */ - this.events = {}; - this.updateAndNotify = (v) => { - const currentTime = time.now(); - /** - * If we're updating the value during another frame or eventloop - * than the previous frame, then the we set the previous frame value - * to current. - */ - if (this.updatedAt !== currentTime) { - this.setPrevFrameValue(); - } - this.prev = this.current; - this.setCurrent(v); - // Update update subscribers - if (this.current !== this.prev) { - this.events.change?.notify(this.current); - if (this.dependents) { - for (const dependent of this.dependents) { - dependent.dirty(); - } - } - } - }; - this.hasAnimated = false; - this.setCurrent(init); - this.owner = options.owner; - } - setCurrent(current) { - this.current = current; - this.updatedAt = time.now(); - if (this.canTrackVelocity === null && current !== undefined) { - this.canTrackVelocity = isFloat(this.current); - } - } - setPrevFrameValue(prevFrameValue = this.current) { - this.prevFrameValue = prevFrameValue; - this.prevUpdatedAt = this.updatedAt; - } - /** - * Adds a function that will be notified when the `MotionValue` is updated. - * - * It returns a function that, when called, will cancel the subscription. - * - * When calling `onChange` inside a React component, it should be wrapped with the - * `useEffect` hook. As it returns an unsubscribe function, this should be returned - * from the `useEffect` function to ensure you don't add duplicate subscribers.. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * const y = useMotionValue(0) - * const opacity = useMotionValue(1) - * - * useEffect(() => { - * function updateOpacity() { - * const maxXY = Math.max(x.get(), y.get()) - * const newOpacity = transform(maxXY, [0, 100], [1, 0]) - * opacity.set(newOpacity) - * } - * - * const unsubscribeX = x.on("change", updateOpacity) - * const unsubscribeY = y.on("change", updateOpacity) - * - * return () => { - * unsubscribeX() - * unsubscribeY() - * } - * }, []) - * - * return - * } - * ``` - * - * @param subscriber - A function that receives the latest value. - * @returns A function that, when called, will cancel this subscription. - * - * @deprecated - */ - onChange(subscription) { - { - motionUtils.warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on("change", callback).`); - } - return this.on("change", subscription); - } - on(eventName, callback) { - if (!this.events[eventName]) { - this.events[eventName] = new motionUtils.SubscriptionManager(); - } - const unsubscribe = this.events[eventName].add(callback); - if (eventName === "change") { - return () => { - unsubscribe(); - /** - * If we have no more change listeners by the start - * of the next frame, stop active animations. - */ - frame.read(() => { - if (!this.events.change.getSize()) { - this.stop(); - } - }); - }; - } - return unsubscribe; - } - clearListeners() { - for (const eventManagers in this.events) { - this.events[eventManagers].clear(); - } - } - /** - * Attaches a passive effect to the `MotionValue`. - */ - attach(passiveEffect, stopPassiveEffect) { - this.passiveEffect = passiveEffect; - this.stopPassiveEffect = stopPassiveEffect; - } - /** - * Sets the state of the `MotionValue`. - * - * @remarks - * - * ```jsx - * const x = useMotionValue(0) - * x.set(10) - * ``` - * - * @param latest - Latest value to set. - * @param render - Whether to notify render subscribers. Defaults to `true` - * - * @public - */ - set(v) { - if (!this.passiveEffect) { - this.updateAndNotify(v); - } - else { - this.passiveEffect(v, this.updateAndNotify); - } - } - setWithVelocity(prev, current, delta) { - this.set(current); - this.prev = undefined; - this.prevFrameValue = prev; - this.prevUpdatedAt = this.updatedAt - delta; - } - /** - * Set the state of the `MotionValue`, stopping any active animations, - * effects, and resets velocity to `0`. - */ - jump(v, endAnimation = true) { - this.updateAndNotify(v); - this.prev = v; - this.prevUpdatedAt = this.prevFrameValue = undefined; - endAnimation && this.stop(); - if (this.stopPassiveEffect) - this.stopPassiveEffect(); - } - dirty() { - this.events.change?.notify(this.current); - } - addDependent(dependent) { - if (!this.dependents) { - this.dependents = new Set(); - } - this.dependents.add(dependent); - } - removeDependent(dependent) { - if (this.dependents) { - this.dependents.delete(dependent); - } - } - /** - * Returns the latest state of `MotionValue` - * - * @returns - The latest state of `MotionValue` - * - * @public - */ - get() { - if (collectMotionValues.current) { - collectMotionValues.current.push(this); - } - return this.current; - } - /** - * @public - */ - getPrevious() { - return this.prev; - } - /** - * Returns the latest velocity of `MotionValue` - * - * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical. - * - * @public - */ - getVelocity() { - const currentTime = time.now(); - if (!this.canTrackVelocity || - this.prevFrameValue === undefined || - currentTime - this.updatedAt > MAX_VELOCITY_DELTA) { - return 0; - } - const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA); - // Casts because of parseFloat's poor typing - return motionUtils.velocityPerSecond(parseFloat(this.current) - - parseFloat(this.prevFrameValue), delta); - } - /** - * Registers a new animation to control this `MotionValue`. Only one - * animation can drive a `MotionValue` at one time. - * - * ```jsx - * value.start() - * ``` - * - * @param animation - A function that starts the provided animation - */ - start(startAnimation) { - this.stop(); - return new Promise((resolve) => { - this.hasAnimated = true; - this.animation = startAnimation(resolve); - if (this.events.animationStart) { - this.events.animationStart.notify(); - } - }).then(() => { - if (this.events.animationComplete) { - this.events.animationComplete.notify(); - } - this.clearAnimation(); - }); - } - /** - * Stop the currently active animation. - * - * @public - */ - stop() { - if (this.animation) { - this.animation.stop(); - if (this.events.animationCancel) { - this.events.animationCancel.notify(); - } - } - this.clearAnimation(); - } - /** - * Returns `true` if this value is currently animating. - * - * @public - */ - isAnimating() { - return !!this.animation; - } - clearAnimation() { - delete this.animation; - } - /** - * Destroy and clean up subscribers to this `MotionValue`. - * - * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically - * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually - * created a `MotionValue` via the `motionValue` function. - * - * @public - */ - destroy() { - this.dependents?.clear(); - this.events.destroy?.notify(); - this.clearListeners(); - this.stop(); - if (this.stopPassiveEffect) { - this.stopPassiveEffect(); - } - } - } - function motionValue(init, options) { - return new MotionValue(init, options); - } - - /** - * If `transition` has `inherit: true`, shallow-merge it with - * `parentTransition` (child keys win) and strip the `inherit` key. - * Otherwise return `transition` unchanged. - */ - function resolveTransition(transition, parentTransition) { - if (transition?.inherit && parentTransition) { - const { inherit: _, ...rest } = transition; - return { ...parentTransition, ...rest }; - } - return transition; - } - - function getValueTransition(transition, key) { - const valueTransition = transition?.[key] ?? - transition?.["default"] ?? - transition; - if (valueTransition !== transition) { - return resolveTransition(valueTransition, transition); - } - return valueTransition; - } - - const underDampedSpring = { - type: "spring", - stiffness: 500, - damping: 25, - restSpeed: 10, - }; - const criticallyDampedSpring = (target) => ({ - type: "spring", - stiffness: 550, - damping: target === 0 ? 2 * Math.sqrt(550) : 30, - restSpeed: 10, - }); - const keyframesTransition = { - type: "keyframes", - duration: 0.8, - }; - /** - * Default easing curve is a slightly shallower version of - * the default browser easing curve. - */ - const ease = { - type: "keyframes", - ease: [0.25, 0.1, 0.35, 1], - duration: 0.3, - }; - const getDefaultTransition = (valueKey, { keyframes }) => { - if (keyframes.length > 2) { - return keyframesTransition; - } - else if (transformProps.has(valueKey)) { - return valueKey.startsWith("scale") - ? criticallyDampedSpring(keyframes[1]) - : underDampedSpring; - } - return ease; - }; - - const orchestrationKeys = new Set([ - "when", - "delay", - "delayChildren", - "staggerChildren", - "staggerDirection", - "repeat", - "repeatType", - "repeatDelay", - "from", - "elapsed", - ]); - /** - * Decide whether a transition is defined on a given Transition. - * This filters out orchestration options and returns true - * if any options are left. - */ - function isTransitionDefined(transition) { - for (const key in transition) { - if (!orchestrationKeys.has(key)) - return true; - } - return false; - } - - const animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => { - const valueTransition = getValueTransition(transition, name) || {}; - /** - * Most transition values are currently completely overwritten by value-specific - * transitions. In the future it'd be nicer to blend these transitions. But for now - * delay actually does inherit from the root transition if not value-specific. - */ - const delay = valueTransition.delay || transition.delay || 0; - /** - * Elapsed isn't a public transition option but can be passed through from - * optimized appear effects in milliseconds. - */ - let { elapsed = 0 } = transition; - elapsed = elapsed - motionUtils.secondsToMilliseconds(delay); - const options = { - keyframes: Array.isArray(target) ? target : [null, target], - ease: "easeOut", - velocity: value.getVelocity(), - ...valueTransition, - delay: -elapsed, - onUpdate: (v) => { - value.set(v); - valueTransition.onUpdate && valueTransition.onUpdate(v); - }, - onComplete: () => { - onComplete(); - valueTransition.onComplete && valueTransition.onComplete(); - }, - name, - motionValue: value, - element: isHandoff ? undefined : element, - }; - /** - * If there's no transition defined for this value, we can generate - * unique transition settings for this value. - */ - if (!isTransitionDefined(valueTransition)) { - Object.assign(options, getDefaultTransition(name, options)); - } - /** - * Both WAAPI and our internal animation functions use durations - * as defined by milliseconds, while our external API defines them - * as seconds. - */ - options.duration && (options.duration = motionUtils.secondsToMilliseconds(options.duration)); - options.repeatDelay && (options.repeatDelay = motionUtils.secondsToMilliseconds(options.repeatDelay)); - /** - * Support deprecated way to set initial value. Prefer keyframe syntax. - */ - if (options.from !== undefined) { - options.keyframes[0] = options.from; - } - let shouldSkip = false; - if (options.type === false || - (options.duration === 0 && !options.repeatDelay)) { - makeAnimationInstant(options); - if (options.delay === 0) { - shouldSkip = true; - } - } - if (motionUtils.MotionGlobalConfig.instantAnimations || - motionUtils.MotionGlobalConfig.skipAnimations || - element?.shouldSkipAnimations || - valueTransition.skipAnimations) { - shouldSkip = true; - makeAnimationInstant(options); - options.delay = 0; - } - /** - * If the transition type or easing has been explicitly set by the user - * then we don't want to allow flattening the animation. - */ - options.allowFlatten = !valueTransition.type && !valueTransition.ease; - /** - * If we can or must skip creating the animation, and apply only - * the final keyframe, do so. We also check once keyframes are resolved but - * this early check prevents the need to create an animation at all. - */ - if (shouldSkip && !isHandoff && value.get() !== undefined) { - const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition); - if (finalKeyframe !== undefined) { - frame.update(() => { - options.onUpdate(finalKeyframe); - options.onComplete(); - }); - return; - } - } - return valueTransition.isSync - ? new JSAnimation(options) - : new AsyncMotionValueAnimation(options); - }; - - const MIN_LAYOUT_DISTANCE = 20; - function bezierPoint(t, origin, control, target) { - const inv = 1 - t; - return inv * inv * origin + 2 * inv * t * control + t * t * target; - } - function bezierTangentAngle(t, originX, controlX, targetX, originY, controlY, targetY) { - const dx = 2 * (1 - t) * (controlX - originX) + 2 * t * (targetX - controlX); - const dy = 2 * (1 - t) * (controlY - originY) + 2 * t * (targetY - controlY); - return Math.atan2(dy, dx) * (180 / Math.PI); - } - function computeArcControlPoint(fromX, fromY, toX, toY, strength, peak) { - const deltaX = toX - fromX; - const deltaY = toY - fromY; - const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); - if (distance > 0) { - const normalPerpX = -deltaY / distance; - const normalPerpY = deltaX / distance; - const desiredHeight = strength * distance; - return { - x: fromX + deltaX * peak + normalPerpX * desiredHeight, - y: fromY + deltaY * peak + normalPerpY * desiredHeight, - }; - } - return { x: fromX, y: fromY }; - } - /** - * The pure sampling factory: `(from, to) => (t) => point`. Internal — - * used by {@link arc} and the unit tests. Not part of the public surface. - */ - function createArcPath({ strength = 0.5, peak = 0.5, direction, rotate = false, } = {}) { - const rotationScale = rotate === true ? 1 : typeof rotate === "number" ? rotate : 0; - // Auto-direction only: persists across calls to flip the bulge back - // onto the same screen side when the dominant axis changes between - // calls. Reuse the factory (module scope / useMemo) to keep this alive. - let prevBulgeSign; - const createInterpolator = (from, to) => { - const dx = to.x - from.x; - const dy = to.y - from.y; - let signed; - if (direction === "cw") { - signed = -strength; - } - else if (direction === "ccw") { - signed = strength; - } - else { - const dom = Math.abs(dx) >= Math.abs(dy) ? dx : dy; - signed = dom < 0 ? -strength : strength; - } - let control = computeArcControlPoint(from.x, from.y, to.x, to.y, signed, peak); - if (direction === undefined) { - const isVertical = Math.abs(dx) < Math.abs(dy); - const midX = from.x + dx * peak; - const midY = from.y + dy * peak; - const bulgeSign = isVertical - ? Math.sign(control.x - midX) - : Math.sign(control.y - midY); - if (prevBulgeSign !== undefined && - bulgeSign !== 0 && - bulgeSign !== prevBulgeSign) { - signed = -signed; - control = computeArcControlPoint(from.x, from.y, to.x, to.y, signed, peak); - } - else if (bulgeSign !== 0) { - prevBulgeSign = bulgeSign; - } - } - const tangent0 = rotationScale - ? bezierTangentAngle(0, from.x, control.x, to.x, from.y, control.y, to.y) - : 0; - const tangent1 = rotationScale - ? bezierTangentAngle(1, from.x, control.x, to.x, from.y, control.y, to.y) - : 0; - const tangentDelta = rotationScale - ? motionUtils.wrap(-180, 180, tangent1 - tangent0) - : 0; - return (t) => { - const out = { - x: bezierPoint(t, from.x, control.x, to.x), - y: bezierPoint(t, from.y, control.y, to.y), - }; - if (rotationScale) { - const raw = bezierTangentAngle(t, from.x, control.x, to.x, from.y, control.y, to.y); - const baseline = tangent0 + tangentDelta * t; - out.rotate = motionUtils.wrap(-180, 180, raw - baseline) * rotationScale; - } - return out; - }; - }; - return createInterpolator; - } - /** - * Creates a curved path for `transition.path`: - * - * ```ts - * - * ``` - * - * Reuse the returned value (module scope / useMemo / useRef) so its - * continuity closure survives re-renders — a fresh `arc()` has no memory. - */ - function arc(options = {}) { - const sample = createArcPath(options); - const path = { - interpolateProjection(delta) { - // `from` is the current translate offset (carries any in-flight - // displacement when interrupted); `to` is the new layout origin. - // The distance floor avoids visible wobble on tiny shifts. - const tx = delta.x.translate; - const ty = delta.y.translate; - if (Math.sqrt(tx * tx + ty * ty) < MIN_LAYOUT_DISTANCE) { - return undefined; - } - return sample({ x: tx, y: ty }, { x: 0, y: 0 }); - }, - animateVisualElement(visualElement, target, transition, delay, animations) { - if (!("x" in target || "y" in target)) - return; - const xValue = visualElement.getValue("x", visualElement.latestValues["x"] ?? 0); - const yValue = visualElement.getValue("y", visualElement.latestValues["y"] ?? 0); - const xRaw = target.x; - const yRaw = target.y; - const xFrom = (Array.isArray(xRaw) && xRaw[0] != null - ? xRaw[0] - : xValue?.get()) ?? 0; - const yFrom = (Array.isArray(yRaw) && yRaw[0] != null - ? yRaw[0] - : yValue?.get()) ?? 0; - const xTo = (Array.isArray(xRaw) - ? xRaw[xRaw.length - 1] - : xRaw ?? xFrom); - const yTo = (Array.isArray(yRaw) - ? yRaw[yRaw.length - 1] - : yRaw ?? yFrom); - // Interruption needs no flag: x/y already hold the displaced - // mid-arc position, so xFrom/yFrom carry the continuity geometry. - const interpolate = sample({ x: xFrom, y: yFrom }, { x: xTo, y: yTo }); - // Drive a dedicated `pathRotation` value (composed onto `rotate` - // at the build sites) rather than `rotate` itself, so a - // concurrent rotate animation composes and nothing accumulates - // on interrupt. - const pathRotationValue = interpolate(0).rotate !== undefined - ? visualElement.getValue("pathRotation", 0) - : undefined; - const pathTransition = { - delay, - ...getValueTransition(transition || {}, "x"), - }; - delete pathTransition.path; - const progress = motionValue(0); - progress.start(animateMotionValue("", progress, [0, 1000], { - ...pathTransition, - isSync: true, - velocity: 0, - onUpdate: (latest) => { - const point = interpolate(latest / 1000); - xValue?.set(point.x); - yValue?.set(point.y); - if (pathRotationValue && point.rotate !== undefined) { - pathRotationValue.set(point.rotate); - } - }, - onComplete: () => { - xValue?.set(xTo); - yValue?.set(yTo); - pathRotationValue?.set(0); - }, - // Interrupt/cancel must clear our additive contribution - // so it can't linger on top of the user's `rotate`. - onStop: () => pathRotationValue?.set(0), - onCancel: () => pathRotationValue?.set(0), - })); - if (progress.animation) - animations.push(progress.animation); - delete target.x; - delete target.y; - }, - }; - return path; - } - - /** - * Parse Framer's special CSS variable format into a CSS token and a fallback. - * - * ``` - * `var(--foo, #fff)` => [`--foo`, '#fff'] - * ``` - * - * @param current - */ - const splitCSSVariableRegex = - // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words - /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u; - function parseCSSVariable(current) { - const match = splitCSSVariableRegex.exec(current); - if (!match) - return [,]; - const [, token1, token2, fallback] = match; - return [`--${token1 ?? token2}`, fallback]; - } - const maxDepth = 4; - function getVariableValue(current, element, depth = 1) { - motionUtils.invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth"); - const [token, fallback] = parseCSSVariable(current); - // No CSS variable detected - if (!token) - return; - // Attempt to read this CSS variable off the element - const resolved = window.getComputedStyle(element).getPropertyValue(token); - if (resolved) { - const trimmed = resolved.trim(); - return motionUtils.isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed; - } - return isCSSVariableToken(fallback) - ? getVariableValue(fallback, element, depth + 1) - : fallback; - } - - function getValueState(visualElement) { - const state = [{}, {}]; - visualElement?.values.forEach((value, key) => { - state[0][key] = value.get(); - state[1][key] = value.getVelocity(); - }); - return state; - } - function resolveVariantFromProps(props, definition, custom, visualElement) { - /** - * If the variant definition is a function, resolve. - */ - if (typeof definition === "function") { - const [current, velocity] = getValueState(visualElement); - definition = definition(custom !== undefined ? custom : props.custom, current, velocity); - } - /** - * If the variant definition is a variant label, or - * the function returned a variant label, resolve. - */ - if (typeof definition === "string") { - definition = props.variants && props.variants[definition]; - } - /** - * At this point we've resolved both functions and variant labels, - * but the resolved variant label might itself have been a function. - * If so, resolve. This can only have returned a valid target object. - */ - if (typeof definition === "function") { - const [current, velocity] = getValueState(visualElement); - definition = definition(custom !== undefined ? custom : props.custom, current, velocity); - } - return definition; - } - - function resolveVariant(visualElement, definition, custom) { - const props = visualElement.getProps(); - return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement); - } - - const positionalKeys = new Set([ - "width", - "height", - "top", - "left", - "right", - "bottom", - ...transformPropOrder, - ]); - - const isKeyframesTarget = (v) => { - return Array.isArray(v); - }; - - /** - * Set VisualElement's MotionValue, creating a new MotionValue for it if - * it doesn't exist. - */ - function setMotionValue(visualElement, key, value) { - if (visualElement.hasValue(key)) { - visualElement.getValue(key).set(value); - } - else { - visualElement.addValue(key, motionValue(value)); - } - } - function resolveFinalValueInKeyframes(v) { - // TODO maybe throw if v.length - 1 is placeholder token? - return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v; - } - function setTarget(visualElement, definition) { - const resolved = resolveVariant(visualElement, definition); - let { transitionEnd = {}, transition = {}, ...target } = resolved || {}; - target = { ...target, ...transitionEnd }; - for (const key in target) { - const value = resolveFinalValueInKeyframes(target[key]); - setMotionValue(visualElement, key, value); - } - } - - const isMotionValue = (value) => Boolean(value && value.getVelocity); - - function isWillChangeMotionValue(value) { - return Boolean(isMotionValue(value) && value.add); - } - - function addValueToWillChange(visualElement, key) { - const willChange = visualElement.getValue("willChange"); - /** - * It could be that a user has set willChange to a regular MotionValue, - * in which case we can't add the value to it. - */ - if (isWillChangeMotionValue(willChange)) { - return willChange.add(key); - } - else if (!willChange && motionUtils.MotionGlobalConfig.WillChange) { - const newWillChange = new motionUtils.MotionGlobalConfig.WillChange("auto"); - visualElement.addValue("willChange", newWillChange); - newWillChange.add(key); - } - } - - function camelToDash(str) { - return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`); - } - - const optimizedAppearDataId = "framerAppearId"; - const optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId); - - function getOptimisedAppearId(visualElement) { - return visualElement.props[optimizedAppearDataAttribute]; - } - - /** - * Decide whether we should block this animation. Previously, we achieved this - * just by checking whether the key was listed in protectedKeys, but this - * posed problems if an animation was triggered by afterChildren and protectedKeys - * had been set to true in the meantime. - */ - function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) { - const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true; - needsAnimating[key] = false; - return shouldBlock; - } - function animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) { - let { transition, transitionEnd, ...target } = targetAndTransition; - const defaultTransition = visualElement.getDefaultTransition(); - transition = transition - ? resolveTransition(transition, defaultTransition) - : defaultTransition; - const reduceMotion = transition?.reduceMotion; - const skipAnimations = transition?.skipAnimations; - if (transitionOverride) - transition = transitionOverride; - const animations = []; - const animationTypeState = type && - visualElement.animationState && - visualElement.animationState.getState()[type]; - const path = transition?.path; - if (path) { - // path mutates `target` to claim x/y; loop below skips them. - path.animateVisualElement(visualElement, target, transition, delay, animations); - } - for (const key in target) { - const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null); - const valueTarget = target[key]; - if (valueTarget === undefined || - (animationTypeState && - shouldBlockAnimation(animationTypeState, key))) { - continue; - } - const valueTransition = { - delay, - ...getValueTransition(transition || {}, key), - }; - if (skipAnimations) - valueTransition.skipAnimations = true; - /** - * If the value is already at the defined target, skip the animation. - * We still re-assert the value via frame.update to take precedence - * over any stale transitionEnd callbacks from previous animations. - */ - const currentValue = value.get(); - if (currentValue !== undefined && - !value.isAnimating() && - !Array.isArray(valueTarget) && - valueTarget === currentValue && - !valueTransition.velocity) { - frame.update(() => value.set(valueTarget)); - continue; - } - /** - * If this is the first time a value is being animated, check - * to see if we're handling off from an existing animation. - */ - let isHandoff = false; - if (window.MotionHandoffAnimation) { - const appearId = getOptimisedAppearId(visualElement); - if (appearId) { - const startTime = window.MotionHandoffAnimation(appearId, key, frame); - if (startTime !== null) { - valueTransition.startTime = startTime; - isHandoff = true; - } - } - } - addValueToWillChange(visualElement, key); - const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion; - value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key) - ? { type: false } - : valueTransition, visualElement, isHandoff)); - const animation = value.animation; - if (animation) { - animations.push(animation); - } - } - if (transitionEnd) { - const applyTransitionEnd = () => frame.update(() => { - transitionEnd && setTarget(visualElement, transitionEnd); - }); - if (animations.length) { - Promise.all(animations).then(applyTransitionEnd); - } - else { - applyTransitionEnd(); - } - } - return animations; - } - - function animateVariant(visualElement, variant, options = {}) { - const resolved = resolveVariant(visualElement, variant, options.type === "exit" - ? visualElement.presenceContext?.custom - : undefined); - let { transition = visualElement.getDefaultTransition() || {} } = resolved || {}; - if (options.transitionOverride) { - transition = options.transitionOverride; - } - /** - * If we have a variant, create a callback that runs it as an animation. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - const getAnimation = resolved - ? () => Promise.all(animateTarget(visualElement, resolved, options)) - : () => Promise.resolve(); - /** - * If we have children, create a callback that runs all their animations. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size - ? (forwardDelay = 0) => { - const { delayChildren = 0, staggerChildren, staggerDirection, } = transition; - return animateChildren(visualElement, variant, forwardDelay, delayChildren, staggerChildren, staggerDirection, options); - } - : () => Promise.resolve(); - /** - * If the transition explicitly defines a "when" option, we need to resolve either - * this animation or all children animations before playing the other. - */ - const { when } = transition; - if (when) { - const [first, last] = when === "beforeChildren" - ? [getAnimation, getChildAnimations] - : [getChildAnimations, getAnimation]; - return first().then(() => last()); - } - else { - return Promise.all([getAnimation(), getChildAnimations(options.delay)]); - } - } - function animateChildren(visualElement, variant, delay = 0, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) { - const animations = []; - for (const child of visualElement.variantChildren) { - child.notify("AnimationStart", variant); - animations.push(animateVariant(child, variant, { - ...options, - delay: delay + - (typeof delayChildren === "function" ? 0 : delayChildren) + - calcChildStagger(visualElement.variantChildren, child, delayChildren, staggerChildren, staggerDirection), - }).then(() => child.notify("AnimationComplete", variant))); - } - return Promise.all(animations); - } - - function animateVisualElement(visualElement, definition, options = {}) { - visualElement.notify("AnimationStart", definition); - let animation; - if (Array.isArray(definition)) { - const animations = definition.map((variant) => animateVariant(visualElement, variant, options)); - animation = Promise.all(animations); - } - else if (typeof definition === "string") { - animation = animateVariant(visualElement, definition, options); - } - else { - const resolvedDefinition = typeof definition === "function" - ? resolveVariant(visualElement, definition, options.custom) - : definition; - animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options)); - } - return animation.then(() => { - visualElement.notify("AnimationComplete", definition); - }); - } - - /** - * ValueType for "auto" - */ - const auto = { - test: (v) => v === "auto", - parse: (v) => v, - }; - - /** - * Tests a provided value against a ValueType - */ - const testValueType = (v) => (type) => type.test(v); - - /** - * A list of value types commonly used for dimensions - */ - const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto]; - /** - * Tests a dimensional value against the list of dimension ValueTypes - */ - const findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v)); - - function isNone(value) { - if (typeof value === "number") { - return value === 0; - } - else if (value !== null) { - return value === "none" || value === "0" || motionUtils.isZeroValueString(value); - } - else { - return true; - } - } - - /** - * Properties that should default to 1 or 100% - */ - const maxDefaults = new Set(["brightness", "contrast", "saturate", "opacity"]); - function applyDefaultFilter(v) { - const [name, value] = v.slice(0, -1).split("("); - if (name === "drop-shadow") - return v; - const [number] = value.match(floatRegex) || []; - if (!number) - return v; - const unit = value.replace(number, ""); - let defaultValue = maxDefaults.has(name) ? 1 : 0; - if (number !== value) - defaultValue *= 100; - return name + "(" + defaultValue + unit + ")"; - } - const functionRegex = /\b([a-z-]*)\(.*?\)/gu; - const filter = { - ...complex, - getAnimatableNone: (v) => { - const functions = v.match(functionRegex); - return functions ? functions.map(applyDefaultFilter).join(" ") : v; - }, - }; - - const mask = { - ...complex, - getAnimatableNone: (v) => { - const parsed = complex.parse(v); - const transformer = complex.createTransformer(v); - return transformer(parsed.map((v) => typeof v === "number" ? 0 : typeof v === "object" ? { ...v, alpha: 1 } : v)); - }, - }; - - const int = { - ...number, - transform: Math.round, - }; - - const transformValueTypes = { - rotate: degrees, - /** - * Internal channel for `transition.path` orientToPath. Composed onto - * `rotate` at the transform-build sites so the user's `rotate` is - * never read or overwritten. Not part of `transformPropOrder`. - */ - pathRotation: degrees, - rotateX: degrees, - rotateY: degrees, - rotateZ: degrees, - scale, - scaleX: scale, - scaleY: scale, - scaleZ: scale, - skew: degrees, - skewX: degrees, - skewY: degrees, - distance: px, - translateX: px, - translateY: px, - translateZ: px, - x: px, - y: px, - z: px, - perspective: px, - transformPerspective: px, - opacity: alpha, - originX: progressPercentage, - originY: progressPercentage, - originZ: px, - }; - - const numberValueTypes = { - // Border props - borderWidth: px, - borderTopWidth: px, - borderRightWidth: px, - borderBottomWidth: px, - borderLeftWidth: px, - borderRadius: px, - borderTopLeftRadius: px, - borderTopRightRadius: px, - borderBottomRightRadius: px, - borderBottomLeftRadius: px, - // Positioning props - width: px, - maxWidth: px, - height: px, - maxHeight: px, - top: px, - right: px, - bottom: px, - left: px, - inset: px, - insetBlock: px, - insetBlockStart: px, - insetBlockEnd: px, - insetInline: px, - insetInlineStart: px, - insetInlineEnd: px, - // Spacing props - padding: px, - paddingTop: px, - paddingRight: px, - paddingBottom: px, - paddingLeft: px, - paddingBlock: px, - paddingBlockStart: px, - paddingBlockEnd: px, - paddingInline: px, - paddingInlineStart: px, - paddingInlineEnd: px, - margin: px, - marginTop: px, - marginRight: px, - marginBottom: px, - marginLeft: px, - marginBlock: px, - marginBlockStart: px, - marginBlockEnd: px, - marginInline: px, - marginInlineStart: px, - marginInlineEnd: px, - // Typography - fontSize: px, - // Misc - backgroundPositionX: px, - backgroundPositionY: px, - ...transformValueTypes, - zIndex: int, - // SVG - fillOpacity: alpha, - strokeOpacity: alpha, - numOctaves: int, - }; - - /** - * A map of default value types for common values - */ - const defaultValueTypes = { - ...numberValueTypes, - // Color props - color, - backgroundColor: color, - outlineColor: color, - fill: color, - stroke: color, - // Border props - borderColor: color, - borderTopColor: color, - borderRightColor: color, - borderBottomColor: color, - borderLeftColor: color, - filter, - WebkitFilter: filter, - mask, - WebkitMask: mask, - }; - /** - * Gets the default ValueType for the provided value key - */ - const getDefaultValueType = (key) => defaultValueTypes[key]; - - const customTypes = /*@__PURE__*/ new Set([filter, mask]); - function getAnimatableNone(key, value) { - let defaultValueType = getDefaultValueType(key); - if (!customTypes.has(defaultValueType)) - defaultValueType = complex; - // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target - return defaultValueType.getAnimatableNone - ? defaultValueType.getAnimatableNone(value) - : undefined; - } - - /** - * If we encounter keyframes like "none" or "0" and we also have keyframes like - * "#fff" or "200px 200px" we want to find a keyframe to serve as a template for - * the "none" keyframes. In this case "#fff" or "200px 200px" - then these get turned into - * zero equivalents, i.e. "#fff0" or "0px 0px". - */ - const invalidTemplates = new Set(["auto", "none", "0"]); - function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) { - let i = 0; - let animatableTemplate = undefined; - while (i < unresolvedKeyframes.length && !animatableTemplate) { - const keyframe = unresolvedKeyframes[i]; - if (typeof keyframe === "string" && - !invalidTemplates.has(keyframe) && - analyseComplexValue(keyframe).values.length) { - animatableTemplate = unresolvedKeyframes[i]; - } - i++; - } - if (animatableTemplate && name) { - for (const noneIndex of noneKeyframeIndexes) { - unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate); - } - } - } - - class DOMKeyframesResolver extends KeyframeResolver { - constructor(unresolvedKeyframes, onComplete, name, motionValue, element) { - super(unresolvedKeyframes, onComplete, name, motionValue, element, true); - } - readKeyframes() { - const { unresolvedKeyframes, element, name } = this; - if (!element || !element.current) - return; - super.readKeyframes(); - /** - * If any keyframe is a CSS variable, we need to find its value by sampling the element - */ - for (let i = 0; i < unresolvedKeyframes.length; i++) { - let keyframe = unresolvedKeyframes[i]; - if (typeof keyframe === "string") { - keyframe = keyframe.trim(); - if (isCSSVariableToken(keyframe)) { - const resolved = getVariableValue(keyframe, element.current); - if (resolved !== undefined) { - unresolvedKeyframes[i] = resolved; - } - if (i === unresolvedKeyframes.length - 1) { - this.finalKeyframe = keyframe; - } - } - } - } - /** - * Resolve "none" values. We do this potentially twice - once before and once after measuring keyframes. - * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which - * have a far bigger performance impact. - */ - this.resolveNoneKeyframes(); - /** - * Check to see if unit type has changed. If so schedule jobs that will - * temporarily set styles to the destination keyframes. - * Skip if we have more than two keyframes or this isn't a positional value. - * TODO: We can throw if there are multiple keyframes and the value type changes. - */ - if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) { - return; - } - const [origin, target] = unresolvedKeyframes; - const originType = findDimensionValueType(origin); - const targetType = findDimensionValueType(target); - /** - * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other - * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410. - */ - const originHasVar = containsCSSVariable(origin); - const targetHasVar = containsCSSVariable(target); - if (originHasVar !== targetHasVar && positionalValues[name]) { - this.needsMeasurement = true; - return; - } - /** - * Either we don't recognise these value types or we can animate between them. - */ - if (originType === targetType) - return; - /** - * If both values are numbers or pixels, we can animate between them by - * converting them to numbers. - */ - if (isNumOrPxType(originType) && isNumOrPxType(targetType)) { - for (let i = 0; i < unresolvedKeyframes.length; i++) { - const value = unresolvedKeyframes[i]; - if (typeof value === "string") { - unresolvedKeyframes[i] = parseFloat(value); - } - } - } - else if (positionalValues[name]) { - /** - * Else, the only way to resolve this is by measuring the element. - */ - this.needsMeasurement = true; - } - } - resolveNoneKeyframes() { - const { unresolvedKeyframes, name } = this; - const noneKeyframeIndexes = []; - for (let i = 0; i < unresolvedKeyframes.length; i++) { - if (unresolvedKeyframes[i] === null || - isNone(unresolvedKeyframes[i])) { - noneKeyframeIndexes.push(i); - } - } - if (noneKeyframeIndexes.length) { - makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name); - } - } - measureInitialState() { - const { element, unresolvedKeyframes, name } = this; - if (!element || !element.current) - return; - if (name === "height") { - this.suspendedScrollY = window.pageYOffset; - } - this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current)); - unresolvedKeyframes[0] = this.measuredOrigin; - // Set final key frame to measure after next render - const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1]; - if (measureKeyframe !== undefined) { - element.getValue(name, measureKeyframe).jump(measureKeyframe, false); - } - } - measureEndState() { - const { element, name, unresolvedKeyframes } = this; - if (!element || !element.current) - return; - const value = element.getValue(name); - value && value.jump(this.measuredOrigin, false); - const finalKeyframeIndex = unresolvedKeyframes.length - 1; - const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex]; - unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current)); - if (finalKeyframe !== null && this.finalKeyframe === undefined) { - this.finalKeyframe = finalKeyframe; - } - // If we removed transform values, reapply them before the next render - if (this.removedTransforms?.length) { - this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => { - element - .getValue(unsetTransformName) - .set(unsetTransformValue); - }); - } - this.resolveNoneKeyframes(); - } - } - - const pxValues = new Set([ - // Border props - "borderWidth", - "borderTopWidth", - "borderRightWidth", - "borderBottomWidth", - "borderLeftWidth", - "borderRadius", - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomRightRadius", - "borderBottomLeftRadius", - // Positioning props - "width", - "maxWidth", - "height", - "maxHeight", - "top", - "right", - "bottom", - "left", - "inset", - "insetBlock", - "insetBlockStart", - "insetBlockEnd", - "insetInline", - "insetInlineStart", - "insetInlineEnd", - // Spacing props - "padding", - "paddingTop", - "paddingRight", - "paddingBottom", - "paddingLeft", - "paddingBlock", - "paddingBlockStart", - "paddingBlockEnd", - "paddingInline", - "paddingInlineStart", - "paddingInlineEnd", - "margin", - "marginTop", - "marginRight", - "marginBottom", - "marginLeft", - "marginBlock", - "marginBlockStart", - "marginBlockEnd", - "marginInline", - "marginInlineStart", - "marginInlineEnd", - // Typography - "fontSize", - // Misc - "backgroundPositionX", - "backgroundPositionY", - ]); - - function applyPxDefaults(keyframes, name) { - for (let i = 0; i < keyframes.length; i++) { - if (typeof keyframes[i] === "number" && pxValues.has(name)) { - keyframes[i] = keyframes[i] + "px"; - } - } - } - - function isWaapiSupportedEasing(easing) { - return Boolean((typeof easing === "function" && supportsLinearEasing()) || - !easing || - (typeof easing === "string" && - (easing in supportedWaapiEasing || supportsLinearEasing())) || - motionUtils.isBezierDefinition(easing) || - (Array.isArray(easing) && easing.every(isWaapiSupportedEasing))); - } - - const supportsPartialKeyframes = /*@__PURE__*/ motionUtils.memo(() => { - try { - document.createElement("div").animate({ opacity: [1] }); - } - catch (e) { - return false; - } - return true; - }); - - function resolveElements(elementOrSelector, scope, selectorCache) { - if (elementOrSelector == null) { - return []; - } - if (elementOrSelector instanceof EventTarget) { - return [elementOrSelector]; - } - else if (typeof elementOrSelector === "string") { - let root = document; - if (scope) { - root = scope.current; - } - const elements = selectorCache?.[elementOrSelector] ?? - root.querySelectorAll(elementOrSelector); - return elements ? Array.from(elements) : []; - } - return Array.from(elementOrSelector).filter((element) => element != null); - } - - function createSelectorEffect(subjectEffect) { - return (subject, values) => { - const elements = resolveElements(subject); - const subscriptions = []; - for (const element of elements) { - const remove = subjectEffect(element, values); - subscriptions.push(remove); - } - return () => { - for (const remove of subscriptions) - remove(); - }; - }; - } - - /** - * Provided a value and a ValueType, returns the value as that value type. - */ - const getValueAsType = (value, type) => { - return type && typeof value === "number" - ? type.transform(value) - : value; - }; - - class MotionValueState { - constructor() { - this.latest = {}; - this.values = new Map(); - } - set(name, value, render, computed, useDefaultValueType = true) { - const existingValue = this.values.get(name); - if (existingValue) { - existingValue.onRemove(); - } - const onChange = () => { - const v = value.get(); - if (useDefaultValueType) { - this.latest[name] = getValueAsType(v, numberValueTypes[name]); - } - else { - this.latest[name] = v; - } - render && frame.render(render); - }; - onChange(); - const cancelOnChange = value.on("change", onChange); - computed && value.addDependent(computed); - const remove = () => { - cancelOnChange(); - render && cancelFrame(render); - this.values.delete(name); - computed && value.removeDependent(computed); - }; - this.values.set(name, { value, onRemove: remove }); - return remove; - } - get(name) { - return this.values.get(name)?.value; - } - } - - function createEffect(addValue) { - const stateCache = new WeakMap(); - return (subject, values) => { - const state = stateCache.get(subject) ?? new MotionValueState(); - stateCache.set(subject, state); - const subscriptions = []; - for (const key in values) { - const value = values[key]; - const remove = addValue(subject, state, key, value); - subscriptions.push(remove); - } - return () => { - for (const cancel of subscriptions) - cancel(); - }; - }; - } - - function canSetAsProperty(element, name) { - if (!(name in element)) - return false; - const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) || - Object.getOwnPropertyDescriptor(element, name); - // Check if it has a setter - return descriptor && typeof descriptor.set === "function"; - } - const addAttrValue = (element, state, key, value) => { - const isProp = canSetAsProperty(element, key); - const name = isProp - ? key - : key.startsWith("data") || key.startsWith("aria") - ? camelToDash(key) - : key; - /** - * Set attribute directly via property if available - */ - const render = isProp - ? () => { - element[name] = state.latest[key]; - } - : () => { - const v = state.latest[key]; - if (v === null || v === undefined) { - element.removeAttribute(name); - } - else { - element.setAttribute(name, String(v)); - } - }; - return state.set(key, value, render); - }; - const attrEffect = /*@__PURE__*/ createSelectorEffect( - /*@__PURE__*/ createEffect(addAttrValue)); - - const propEffect = /*@__PURE__*/ createEffect((subject, state, key, value) => { - return state.set(key, value, () => { - subject[key] = state.latest[key]; - }, undefined, false); - }); - - /** - * Checks if an element is an HTML element in a way - * that works across iframes - */ - function isHTMLElement(element) { - return (motionUtils.isObject(element) && - "offsetHeight" in element && - !("ownerSVGElement" in element)); - } - - const translateAlias$1 = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective", - }; - function buildTransform$1(state) { - let transform = ""; - let transformIsDefault = true; - /** - * Loop over all possible transforms in order, adding the ones that - * are present to the transform string. - */ - for (let i = 0; i < transformPropOrder.length; i++) { - const key = transformPropOrder[i]; - const value = state.latest[key]; - if (value === undefined) - continue; - let valueIsDefault = true; - if (typeof value === "number") { - valueIsDefault = value === (key.startsWith("scale") ? 1 : 0); - } - else { - const parsed = parseFloat(value); - valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0; - } - if (!valueIsDefault) { - transformIsDefault = false; - const transformName = translateAlias$1[key] || key; - transform += `${transformName}(${value}) `; - } - } - // See build-transform.ts: additive `rotate()` so user `rotate` isn't - // clobbered. Not a `transformPropOrder` slot. - const pathRotation = state.latest.pathRotation; - if (pathRotation) { - transformIsDefault = false; - transform += `rotate(${typeof pathRotation === "number" - ? `${pathRotation}deg` - : pathRotation}) `; - } - return transformIsDefault ? "none" : transform.trim(); - } - - const originProps = new Set(["originX", "originY", "originZ"]); - const addStyleValue = (element, state, key, value) => { - let render = undefined; - let computed = undefined; - if (transformProps.has(key)) { - if (!state.get("transform")) { - // If this is an HTML element, we need to set the transform-box to fill-box - // to normalise the transform relative to the element's bounding box - if (!isHTMLElement(element) && !state.get("transformBox")) { - addStyleValue(element, state, "transformBox", new MotionValue("fill-box")); - } - state.set("transform", new MotionValue("none"), () => { - element.style.transform = buildTransform$1(state); - }); - } - computed = state.get("transform"); - } - else if (originProps.has(key)) { - if (!state.get("transformOrigin")) { - state.set("transformOrigin", new MotionValue(""), () => { - const originX = state.latest.originX ?? "50%"; - const originY = state.latest.originY ?? "50%"; - const originZ = state.latest.originZ ?? 0; - element.style.transformOrigin = `${originX} ${originY} ${originZ}`; - }); - } - computed = state.get("transformOrigin"); - } - else if (isCSSVar(key)) { - render = () => { - element.style.setProperty(key, state.latest[key]); - }; - } - else { - render = () => { - element.style[key] = state.latest[key]; - }; - } - return state.set(key, value, render, computed); - }; - const styleEffect = /*@__PURE__*/ createSelectorEffect( - /*@__PURE__*/ createEffect(addStyleValue)); - - function addSVGPathValue(element, state, key, value) { - frame.render(() => element.setAttribute("pathLength", "1")); - if (key === "pathOffset") { - return state.set(key, value, () => { - // Use unitless value to avoid Safari zoom bug - const offset = state.latest[key]; - element.setAttribute("stroke-dashoffset", `${-offset}`); - }); - } - else { - if (!state.get("stroke-dasharray")) { - state.set("stroke-dasharray", new MotionValue("1 1"), () => { - const { pathLength = 1, pathSpacing } = state.latest; - // Use unitless values to avoid Safari zoom bug - element.setAttribute("stroke-dasharray", `${pathLength} ${pathSpacing ?? 1 - Number(pathLength)}`); - }); - } - return state.set(key, value, undefined, state.get("stroke-dasharray")); - } - } - const addSVGValue = (element, state, key, value) => { - if (key.startsWith("path")) { - return addSVGPathValue(element, state, key, value); - } - else if (key.startsWith("attr")) { - return addAttrValue(element, state, convertAttrKey(key), value); - } - const handler = key in element.style ? addStyleValue : addAttrValue; - return handler(element, state, key, value); - }; - const svgEffect = /*@__PURE__*/ createSelectorEffect( - /*@__PURE__*/ createEffect(addSVGValue)); - function convertAttrKey(key) { - return key.replace(/^attr([A-Z])/, (_, firstChar) => firstChar.toLowerCase()); - } - - const { schedule: microtask, cancel: cancelMicrotask } = - /* @__PURE__ */ createRenderBatcher(queueMicrotask, false); - - const isDragging = { - x: false, - y: false, - }; - function isDragActive() { - return isDragging.x || isDragging.y; - } - - function setDragLock(axis) { - if (axis === "x" || axis === "y") { - if (isDragging[axis]) { - return null; - } - else { - isDragging[axis] = true; - return () => { - isDragging[axis] = false; - }; - } - } - else { - if (isDragging.x || isDragging.y) { - return null; - } - else { - isDragging.x = isDragging.y = true; - return () => { - isDragging.x = isDragging.y = false; - }; - } - } - } - - function setupGesture(elementOrSelector, options) { - const elements = resolveElements(elementOrSelector); - const gestureAbortController = new AbortController(); - const eventOptions = { - passive: true, - ...options, - signal: gestureAbortController.signal, - }; - const cancel = () => gestureAbortController.abort(); - return [elements, eventOptions, cancel]; - } - - function isValidHover(event) { - return !(event.pointerType === "touch" || isDragActive()); - } - /** - * Create a hover gesture. hover() is different to .addEventListener("pointerenter") - * in that it has an easier syntax, filters out polyfilled touch events, interoperates - * with drag gestures, and automatically removes the "pointerennd" event listener when the hover ends. - * - * @public - */ - function hover(elementOrSelector, onHoverStart, options = {}) { - const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options); - elements.forEach((element) => { - let isPressed = false; - let deferredHoverEnd = false; - let hoverEndCallback; - const removePointerLeave = () => { - element.removeEventListener("pointerleave", onPointerLeave); - }; - const endHover = (event) => { - if (hoverEndCallback) { - hoverEndCallback(event); - hoverEndCallback = undefined; - } - removePointerLeave(); - }; - const onPointerUp = (event) => { - isPressed = false; - window.removeEventListener("pointerup", onPointerUp); - window.removeEventListener("pointercancel", onPointerUp); - if (deferredHoverEnd) { - deferredHoverEnd = false; - endHover(event); - } - }; - const onPointerDown = () => { - isPressed = true; - window.addEventListener("pointerup", onPointerUp, eventOptions); - window.addEventListener("pointercancel", onPointerUp, eventOptions); - }; - const onPointerLeave = (leaveEvent) => { - if (leaveEvent.pointerType === "touch") - return; - if (isPressed) { - deferredHoverEnd = true; - return; - } - endHover(leaveEvent); - }; - const onPointerEnter = (enterEvent) => { - if (!isValidHover(enterEvent)) - return; - deferredHoverEnd = false; - const onHoverEnd = onHoverStart(element, enterEvent); - if (typeof onHoverEnd !== "function") - return; - hoverEndCallback = onHoverEnd; - element.addEventListener("pointerleave", onPointerLeave, eventOptions); - }; - element.addEventListener("pointerenter", onPointerEnter, eventOptions); - element.addEventListener("pointerdown", onPointerDown, eventOptions); - }); - return cancel; - } - - /** - * Recursively traverse up the tree to check whether the provided child node - * is the parent or a descendant of it. - * - * @param parent - Element to find - * @param child - Element to test against parent - */ - const isNodeOrChild = (parent, child) => { - if (!child) { - return false; - } - else if (parent === child) { - return true; - } - else { - return isNodeOrChild(parent, child.parentElement); - } - }; - - const isPrimaryPointer = (event) => { - if (event.pointerType === "mouse") { - return typeof event.button !== "number" || event.button <= 0; - } - else { - /** - * isPrimary is true for all mice buttons, whereas every touch point - * is regarded as its own input. So subsequent concurrent touch points - * will be false. - * - * Specifically match against false here as incomplete versions of - * PointerEvents in very old browser might have it set as undefined. - */ - return event.isPrimary !== false; - } - }; - - const keyboardAccessibleElements = new Set([ - "BUTTON", - "INPUT", - "SELECT", - "TEXTAREA", - "A", - ]); - /** - * Checks if an element is natively keyboard accessible (focusable). - * Used by the press gesture to determine if we need to add tabIndex. - */ - function isElementKeyboardAccessible(element) { - return (keyboardAccessibleElements.has(element.tagName) || - element.isContentEditable === true); - } - const textInputElements = new Set(["INPUT", "SELECT", "TEXTAREA"]); - /** - * Checks if an element has text selection or direct interaction behavior - * that should block drag gestures from starting. - * - * This specifically targets form controls where the user might want to select - * text or interact with the control (e.g., sliders, dropdowns). - * - * Buttons and links are NOT included because they don't have click-and-move - * actions of their own - they only respond to click events, so dragging - * should still work when initiated from these elements. - */ - function isElementTextInput(element) { - return (textInputElements.has(element.tagName) || - element.isContentEditable === true); - } - - const isPressing = new WeakSet(); - - /** - * Filter out events that are not "Enter" keys. - */ - function filterEvents(callback) { - return (event) => { - if (event.key !== "Enter") - return; - callback(event); - }; - } - function firePointerEvent(target, type) { - target.dispatchEvent(new PointerEvent("pointer" + type, { isPrimary: true, bubbles: true })); - } - const enableKeyboardPress = (focusEvent, eventOptions) => { - const element = focusEvent.currentTarget; - if (!element) - return; - const handleKeydown = filterEvents(() => { - if (isPressing.has(element)) - return; - firePointerEvent(element, "down"); - const handleKeyup = filterEvents(() => { - firePointerEvent(element, "up"); - }); - const handleBlur = () => firePointerEvent(element, "cancel"); - element.addEventListener("keyup", handleKeyup, eventOptions); - element.addEventListener("blur", handleBlur, eventOptions); - }); - element.addEventListener("keydown", handleKeydown, eventOptions); - /** - * Add an event listener that fires on blur to remove the keydown events. - */ - element.addEventListener("blur", () => element.removeEventListener("keydown", handleKeydown), eventOptions); - }; - - /** - * Filter out events that are not primary pointer events, or are triggering - * while a Motion gesture is active. - */ - function isValidPressEvent(event) { - return isPrimaryPointer(event) && !isDragActive(); - } - const claimedPointerDownEvents = new WeakSet(); - /** - * Create a press gesture. - * - * Press is different to `"pointerdown"`, `"pointerup"` in that it - * automatically filters out secondary pointer events like right - * click and multitouch. - * - * It also adds accessibility support for keyboards, where - * an element with a press gesture will receive focus and - * trigger on Enter `"keydown"` and `"keyup"` events. - * - * This is different to a browser's `"click"` event, which does - * respond to keyboards but only for the `"click"` itself, rather - * than the press start and end/cancel. The element also needs - * to be focusable for this to work, whereas a press gesture will - * make an element focusable by default. - * - * @public - */ - function press(targetOrSelector, onPressStart, options = {}) { - const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options); - const startPress = (startEvent) => { - const target = startEvent.currentTarget; - if (!isValidPressEvent(startEvent)) - return; - if (claimedPointerDownEvents.has(startEvent)) - return; - isPressing.add(target); - if (options.stopPropagation) { - claimedPointerDownEvents.add(startEvent); - } - const onPressEnd = onPressStart(target, startEvent); - const onPointerEnd = (endEvent, success) => { - window.removeEventListener("pointerup", onPointerUp); - window.removeEventListener("pointercancel", onPointerCancel); - if (isPressing.has(target)) { - isPressing.delete(target); - } - if (!isValidPressEvent(endEvent)) { - return; - } - if (typeof onPressEnd === "function") { - onPressEnd(endEvent, { success }); - } - }; - const onPointerUp = (upEvent) => { - onPointerEnd(upEvent, target === window || - target === document || - options.useGlobalTarget || - isNodeOrChild(target, upEvent.target)); - }; - const onPointerCancel = (cancelEvent) => { - onPointerEnd(cancelEvent, false); - }; - window.addEventListener("pointerup", onPointerUp, eventOptions); - window.addEventListener("pointercancel", onPointerCancel, eventOptions); - }; - targets.forEach((target) => { - const pointerDownTarget = options.useGlobalTarget ? window : target; - pointerDownTarget.addEventListener("pointerdown", startPress, eventOptions); - if (isHTMLElement(target)) { - target.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions)); - if (!isElementKeyboardAccessible(target) && - !target.hasAttribute("tabindex")) { - target.tabIndex = 0; - } - } - }); - return cancelEvents; - } - - function getComputedStyle$2(element, name) { - const computedStyle = window.getComputedStyle(element); - return isCSSVar(name) - ? computedStyle.getPropertyValue(name) - : computedStyle[name]; - } - - /** - * Checks if an element is an SVG element in a way - * that works across iframes - */ - function isSVGElement(element) { - return motionUtils.isObject(element) && "ownerSVGElement" in element; - } - - const resizeHandlers = new WeakMap(); - let observer; - const getSize = (borderBoxAxis, svgAxis, htmlAxis) => (target, borderBoxSize) => { - if (borderBoxSize && borderBoxSize[0]) { - return borderBoxSize[0][(borderBoxAxis + "Size")]; - } - else if (isSVGElement(target) && "getBBox" in target) { - return target.getBBox()[svgAxis]; - } - else { - return target[htmlAxis]; - } - }; - const getWidth = /*@__PURE__*/ getSize("inline", "width", "offsetWidth"); - const getHeight = /*@__PURE__*/ getSize("block", "height", "offsetHeight"); - function notifyTarget({ target, borderBoxSize }) { - resizeHandlers.get(target)?.forEach((handler) => { - handler(target, { - get width() { - return getWidth(target, borderBoxSize); - }, - get height() { - return getHeight(target, borderBoxSize); - }, - }); - }); - } - function notifyAll(entries) { - entries.forEach(notifyTarget); - } - function createResizeObserver() { - if (typeof ResizeObserver === "undefined") - return; - observer = new ResizeObserver(notifyAll); - } - function resizeElement(target, handler) { - if (!observer) - createResizeObserver(); - const elements = resolveElements(target); - elements.forEach((element) => { - let elementHandlers = resizeHandlers.get(element); - if (!elementHandlers) { - elementHandlers = new Set(); - resizeHandlers.set(element, elementHandlers); - } - elementHandlers.add(handler); - observer?.observe(element); - }); - return () => { - elements.forEach((element) => { - const elementHandlers = resizeHandlers.get(element); - elementHandlers?.delete(handler); - if (!elementHandlers?.size) { - observer?.unobserve(element); - } - }); - }; - } - - const windowCallbacks = new Set(); - let windowResizeHandler; - function createWindowResizeHandler() { - windowResizeHandler = () => { - const info = { - get width() { - return window.innerWidth; - }, - get height() { - return window.innerHeight; - }, - }; - windowCallbacks.forEach((callback) => callback(info)); - }; - window.addEventListener("resize", windowResizeHandler); - } - function resizeWindow(callback) { - windowCallbacks.add(callback); - if (!windowResizeHandler) - createWindowResizeHandler(); - return () => { - windowCallbacks.delete(callback); - if (!windowCallbacks.size && - typeof windowResizeHandler === "function") { - window.removeEventListener("resize", windowResizeHandler); - windowResizeHandler = undefined; - } - }; - } - - function resize(a, b) { - return typeof a === "function" ? resizeWindow(a) : resizeElement(a, b); - } - - function observeTimeline(update, timeline) { - let prevProgress; - const onFrame = () => { - const { currentTime } = timeline; - const percentage = currentTime === null ? 0 : currentTime.value; - const progress = percentage / 100; - if (prevProgress !== progress) { - update(progress); - } - prevProgress = progress; - }; - frame.preUpdate(onFrame, true); - return () => cancelFrame(onFrame); - } - - function record() { - const { value } = statsBuffer; - if (value === null) { - cancelFrame(record); - return; - } - value.frameloop.rate.push(frameData.delta); - value.animations.mainThread.push(activeAnimations.mainThread); - value.animations.waapi.push(activeAnimations.waapi); - value.animations.layout.push(activeAnimations.layout); - } - function mean(values) { - return values.reduce((acc, value) => acc + value, 0) / values.length; - } - function summarise(values, calcAverage = mean) { - if (values.length === 0) { - return { - min: 0, - max: 0, - avg: 0, - }; - } - return { - min: Math.min(...values), - max: Math.max(...values), - avg: calcAverage(values), - }; - } - const msToFps = (ms) => Math.round(1000 / ms); - function clearStatsBuffer() { - statsBuffer.value = null; - statsBuffer.addProjectionMetrics = null; - } - function reportStats() { - const { value } = statsBuffer; - if (!value) { - throw new Error("Stats are not being measured"); - } - clearStatsBuffer(); - cancelFrame(record); - const summary = { - frameloop: { - setup: summarise(value.frameloop.setup), - rate: summarise(value.frameloop.rate), - read: summarise(value.frameloop.read), - resolveKeyframes: summarise(value.frameloop.resolveKeyframes), - preUpdate: summarise(value.frameloop.preUpdate), - update: summarise(value.frameloop.update), - preRender: summarise(value.frameloop.preRender), - render: summarise(value.frameloop.render), - postRender: summarise(value.frameloop.postRender), - }, - animations: { - mainThread: summarise(value.animations.mainThread), - waapi: summarise(value.animations.waapi), - layout: summarise(value.animations.layout), - }, - layoutProjection: { - nodes: summarise(value.layoutProjection.nodes), - calculatedTargetDeltas: summarise(value.layoutProjection.calculatedTargetDeltas), - calculatedProjections: summarise(value.layoutProjection.calculatedProjections), - }, - }; - /** - * Convert the rate to FPS - */ - const { rate } = summary.frameloop; - rate.min = msToFps(rate.min); - rate.max = msToFps(rate.max); - rate.avg = msToFps(rate.avg); - [rate.min, rate.max] = [rate.max, rate.min]; - return summary; - } - function recordStats() { - if (statsBuffer.value) { - clearStatsBuffer(); - throw new Error("Stats are already being measured"); - } - const newStatsBuffer = statsBuffer; - newStatsBuffer.value = { - frameloop: { - setup: [], - rate: [], - read: [], - resolveKeyframes: [], - preUpdate: [], - update: [], - preRender: [], - render: [], - postRender: [], - }, - animations: { - mainThread: [], - waapi: [], - layout: [], - }, - layoutProjection: { - nodes: [], - calculatedTargetDeltas: [], - calculatedProjections: [], - }, - }; - newStatsBuffer.addProjectionMetrics = (metrics) => { - const { layoutProjection } = newStatsBuffer.value; - layoutProjection.nodes.push(metrics.nodes); - layoutProjection.calculatedTargetDeltas.push(metrics.calculatedTargetDeltas); - layoutProjection.calculatedProjections.push(metrics.calculatedProjections); - }; - frame.postRender(record, true); - return reportStats; - } - - /** - * Checks if an element is specifically an SVGSVGElement (the root SVG element) - * in a way that works across iframes - */ - function isSVGSVGElement(element) { - return isSVGElement(element) && element.tagName === "svg"; - } - - function getOriginIndex(from, total) { - if (from === "first") { - return 0; - } - else { - const lastIndex = total - 1; - return from === "last" ? lastIndex : lastIndex / 2; - } - } - function stagger(duration = 0.1, { startDelay = 0, from = 0, ease } = {}) { - return (i, total) => { - const fromIndex = typeof from === "number" ? from : getOriginIndex(from, total); - const distance = Math.abs(fromIndex - i); - let delay = duration * distance; - if (ease) { - const maxDelay = total * duration; - const easingFunction = motionUtils.easingDefinitionToFunction(ease); - delay = easingFunction(delay / maxDelay) * maxDelay; - } - return startDelay + delay; - }; - } - - function transform(...args) { - const useImmediate = !Array.isArray(args[0]); - const argOffset = useImmediate ? 0 : -1; - const inputValue = args[0 + argOffset]; - const inputRange = args[1 + argOffset]; - const outputRange = args[2 + argOffset]; - const options = args[3 + argOffset]; - const interpolator = interpolate(inputRange, outputRange, options); - return useImmediate ? interpolator(inputValue) : interpolator; - } - - /** - * Create a `MotionValue` that animates to its latest value using any transition type. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = followValue(x, { type: "spring", stiffness: 300 }) - * // or with tween - * const z = followValue(x, { type: "tween", duration: 0.5, ease: "easeOut" }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns `MotionValue` - * - * @public - */ - function followValue(source, options) { - const initialValue = isMotionValue(source) ? source.get() : source; - const value = motionValue(initialValue); - attachFollow(value, source, options); - return value; - } - /** - * Attach an animation to a MotionValue that will animate whenever the value changes. - * Similar to attachSpring but supports any transition type (spring, tween, inertia, etc.) - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns Cleanup function - * - * @public - */ - function attachFollow(value, source, options = {}) { - const initialValue = value.get(); - let activeAnimation = null; - let latestValue = initialValue; - let latestSetter; - const unit = typeof initialValue === "string" - ? initialValue.replace(/[\d.-]/g, "") - : undefined; - const stopAnimation = () => { - if (activeAnimation) { - activeAnimation.stop(); - activeAnimation = null; - } - value.animation = undefined; - }; - const startAnimation = () => { - const currentValue = asNumber$1(value.get()); - const targetValue = asNumber$1(latestValue); - // Don't animate if we're already at the target - if (currentValue === targetValue) { - stopAnimation(); - return; - } - // Use the running animation's analytical velocity for accuracy, - // falling back to the MotionValue's velocity for the initial animation. - // This prevents systematic velocity loss at high frame rates (240hz+). - const velocity = activeAnimation - ? activeAnimation.getGeneratorVelocity() - : value.getVelocity(); - stopAnimation(); - activeAnimation = new JSAnimation({ - keyframes: [currentValue, targetValue], - velocity, - // Default to spring if no type specified (matches useSpring behavior) - type: "spring", - restDelta: 0.001, - restSpeed: 0.01, - ...options, - onUpdate: latestSetter, - }); - }; - // Use a stable function reference so the frame loop Set deduplicates - // multiple calls within the same frame (e.g. rapid mouse events) - const scheduleAnimation = () => { - startAnimation(); - value.animation = activeAnimation ?? undefined; - value["events"].animationStart?.notify(); - activeAnimation?.then(() => { - value.animation = undefined; - value["events"].animationComplete?.notify(); - }); - }; - value.attach((v, set) => { - latestValue = v; - latestSetter = (latest) => set(parseValue(latest, unit)); - frame.postRender(scheduleAnimation); - }, stopAnimation); - if (isMotionValue(source)) { - let skipNextAnimation = options.skipInitialAnimation === true; - const removeSourceOnChange = source.on("change", (v) => { - if (skipNextAnimation) { - skipNextAnimation = false; - value.jump(parseValue(v, unit), false); - } - else { - value.set(parseValue(v, unit)); - } - }); - const removeValueOnDestroy = value.on("destroy", removeSourceOnChange); - return () => { - removeSourceOnChange(); - removeValueOnDestroy(); - }; - } - return stopAnimation; - } - function parseValue(v, unit) { - return unit ? v + unit : v; - } - function asNumber$1(v) { - return typeof v === "number" ? v : parseFloat(v); - } - - function subscribeValue(inputValues, outputValue, getLatest) { - const update = () => outputValue.set(getLatest()); - const scheduleUpdate = () => frame.preRender(update, false, true); - const subscriptions = inputValues.map((v) => v.on("change", scheduleUpdate)); - outputValue.on("destroy", () => { - subscriptions.forEach((unsubscribe) => unsubscribe()); - cancelFrame(update); - }); - } - - /** - * Create a `MotionValue` that transforms the output of other `MotionValue`s by - * passing their latest values through a transform function. - * - * Whenever a `MotionValue` referred to in the provided function is updated, - * it will be re-evaluated. - * - * ```jsx - * const x = motionValue(0) - * const y = transformValue(() => x.get() * 2) // double x - * ``` - * - * @param transformer - A transform function. This function must be pure with no side-effects or conditional statements. - * @returns `MotionValue` - * - * @public - */ - function transformValue(transform) { - const collectedValues = []; - /** - * Open session of collectMotionValues. Any MotionValue that calls get() - * inside transform will be saved into this array. - */ - collectMotionValues.current = collectedValues; - const initialValue = transform(); - collectMotionValues.current = undefined; - const value = motionValue(initialValue); - subscribeValue(collectedValues, value, transform); - return value; - } - - /** - * Create a `MotionValue` that maps the output of another `MotionValue` by - * mapping it from one range of values into another. - * - * @remarks - * - * Given an input range of `[-200, -100, 100, 200]` and an output range of - * `[0, 1, 1, 0]`, the returned `MotionValue` will: - * - * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`. - * - When provided a value between `-100` and `100`, will return `1`. - * - When provided a value between `100` and `200`, will return a value between `1` and `0` - * - * The input range must be a linear series of numbers. The output range - * can be any value type supported by Motion: numbers, colors, shadows, etc. - * - * Every value in the output range must be of the same type and in the same format. - * - * ```jsx - * const x = motionValue(0) - * const xRange = [-200, -100, 100, 200] - * const opacityRange = [0, 1, 1, 0] - * const opacity = mapValue(x, xRange, opacityRange) - * ``` - * - * @param inputValue - `MotionValue` - * @param inputRange - A linear series of numbers (either all increasing or decreasing) - * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`. - * @param options - - * - * - clamp: boolean. Clamp values to within the given range. Defaults to `true` - * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each. - * - * @returns `MotionValue` - * - * @public - */ - function mapValue(inputValue, inputRange, outputRange, options) { - const map = transform(inputRange, outputRange, options); - return transformValue(() => map(inputValue.get())); - } - - /** - * Create a `MotionValue` that animates to its latest value using a spring. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = springValue(x, { stiffness: 300 }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns `MotionValue` - * - * @public - */ - function springValue(source, options) { - return followValue(source, { type: "spring", ...options }); - } - /** - * Attach a spring animation to a MotionValue that will animate whenever the value changes. - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns Cleanup function - * - * @public - */ - function attachSpring(value, source, options) { - return attachFollow(value, source, { type: "spring", ...options }); - } - - /** - * A list of all ValueTypes - */ - const valueTypes = [...dimensionValueTypes, color, complex]; - /** - * Tests a value against the list of ValueTypes - */ - const findValueType = (v) => valueTypes.find(testValueType(v)); - - function chooseLayerType(valueName) { - if (valueName === "layout") - return "group"; - if (valueName === "enter" || valueName === "new") - return "new"; - if (valueName === "exit" || valueName === "old") - return "old"; - return "group"; - } - - let pendingRules = {}; - let style = null; - const css = { - set: (selector, values) => { - pendingRules[selector] = values; - }, - commit: () => { - if (!style) { - style = document.createElement("style"); - style.id = "motion-view"; - } - let cssText = ""; - for (const selector in pendingRules) { - const rule = pendingRules[selector]; - cssText += `${selector} {\n`; - for (const [property, value] of Object.entries(rule)) { - cssText += ` ${property}: ${value};\n`; - } - cssText += "}\n"; - } - style.textContent = cssText; - document.head.appendChild(style); - pendingRules = {}; - }, - remove: () => { - if (style && style.parentElement) { - style.parentElement.removeChild(style); - } - }, - }; - - function getViewAnimationLayerInfo(pseudoElement) { - const match = pseudoElement.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/); - if (!match) - return null; - return { layer: match[2], type: match[1] }; - } - - function filterViewAnimations(animation) { - const { effect } = animation; - if (!effect) - return false; - return (effect.target === document.documentElement && - effect.pseudoElement?.startsWith("::view-transition")); - } - function getViewAnimations() { - return document.getAnimations().filter(filterViewAnimations); - } - - function hasTarget(target, targets) { - return targets.has(target) && Object.keys(targets.get(target)).length > 0; - } - - const definitionNames = ["layout", "enter", "exit", "new", "old"]; - function startViewAnimation(builder) { - const { update, targets, options: defaultOptions } = builder; - if (!document.startViewTransition) { - return new Promise(async (resolve) => { - await update(); - resolve(new GroupAnimation([])); - }); - } - // TODO: Go over existing targets and ensure they all have ids - /** - * If we don't have any animations defined for the root target, - * remove it from being captured. - */ - if (!hasTarget("root", targets)) { - css.set(":root", { - "view-transition-name": "none", - }); - } - /** - * Set the timing curve to linear for all view transition layers. - * This gets baked into the keyframes, which can't be changed - * without breaking the generated animation. - * - * This allows us to set easing via updateTiming - which can be changed. - */ - css.set("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)", { "animation-timing-function": "linear !important" }); - css.commit(); // Write - const transition = document.startViewTransition(async () => { - await update(); - // TODO: Go over new targets and ensure they all have ids - }); - transition.finished.finally(() => { - css.remove(); // Write - }); - return new Promise((resolve) => { - transition.ready.then(() => { - const generatedViewAnimations = getViewAnimations(); - const animations = []; - /** - * Create animations for each of our explicitly-defined subjects. - */ - targets.forEach((definition, target) => { - // TODO: If target is not "root", resolve elements - // and iterate over each - for (const key of definitionNames) { - if (!definition[key]) - continue; - const { keyframes, options } = definition[key]; - for (let [valueName, valueKeyframes] of Object.entries(keyframes)) { - if (!valueKeyframes) - continue; - const valueOptions = { - ...getValueTransition(defaultOptions, valueName), - ...getValueTransition(options, valueName), - }; - const type = chooseLayerType(key); - /** - * If this is an opacity animation, and keyframes are not an array, - * we need to convert them into an array and set an initial value. - */ - if (valueName === "opacity" && - !Array.isArray(valueKeyframes)) { - const initialValue = type === "new" ? 0 : 1; - valueKeyframes = [initialValue, valueKeyframes]; - } - /** - * Resolve stagger function if provided. - */ - if (typeof valueOptions.delay === "function") { - valueOptions.delay = valueOptions.delay(0, 1); - } - valueOptions.duration && (valueOptions.duration = motionUtils.secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = motionUtils.secondsToMilliseconds(valueOptions.delay)); - const animation = new NativeAnimation({ - ...valueOptions, - element: document.documentElement, - name: valueName, - pseudoElement: `::view-transition-${type}(${target})`, - keyframes: valueKeyframes, - }); - animations.push(animation); - } - } - }); - /** - * Handle browser generated animations - */ - for (const animation of generatedViewAnimations) { - if (animation.playState === "finished") - continue; - const { effect } = animation; - if (!effect || !(effect instanceof KeyframeEffect)) - continue; - const { pseudoElement } = effect; - if (!pseudoElement) - continue; - const name = getViewAnimationLayerInfo(pseudoElement); - if (!name) - continue; - const targetDefinition = targets.get(name.layer); - if (!targetDefinition) { - /** - * If transition name is group then update the timing of the animation - * whereas if it's old or new then we could possibly replace it using - * the above method. - */ - const transitionName = name.type === "group" ? "layout" : ""; - let animationTransition = { - ...getValueTransition(defaultOptions, transitionName), - }; - animationTransition.duration && (animationTransition.duration = motionUtils.secondsToMilliseconds(animationTransition.duration)); - animationTransition = - applyGeneratorOptions(animationTransition); - const easing = mapEasingToNativeEasing(animationTransition.ease, animationTransition.duration); - effect.updateTiming({ - delay: motionUtils.secondsToMilliseconds(animationTransition.delay ?? 0), - duration: animationTransition.duration, - easing, - }); - animations.push(new NativeAnimationWrapper(animation)); - } - else if (hasOpacity(targetDefinition, "enter") && - hasOpacity(targetDefinition, "exit") && - effect - .getKeyframes() - .some((keyframe) => keyframe.mixBlendMode)) { - animations.push(new NativeAnimationWrapper(animation)); - } - else { - animation.cancel(); - } - } - resolve(new GroupAnimation(animations)); - }); - }); - } - function hasOpacity(target, key) { - return target?.[key]?.keyframes.opacity; - } - - let builders = []; - let current = null; - function next() { - current = null; - const [nextBuilder] = builders; - if (nextBuilder) - start(nextBuilder); - } - function start(builder) { - motionUtils.removeItem(builders, builder); - current = builder; - startViewAnimation(builder).then((animation) => { - builder.notifyReady(animation); - animation.finished.finally(next); - }); - } - function processQueue() { - /** - * Iterate backwards over the builders array. We can ignore the - * "wait" animations. If we have an interrupting animation in the - * queue then we need to batch all preceeding animations into it. - * Currently this only batches the update functions but will also - * need to batch the targets. - */ - for (let i = builders.length - 1; i >= 0; i--) { - const builder = builders[i]; - const { interrupt } = builder.options; - if (interrupt === "immediate") { - const batchedUpdates = builders.slice(0, i + 1).map((b) => b.update); - const remaining = builders.slice(i + 1); - builder.update = () => { - batchedUpdates.forEach((update) => update()); - }; - // Put the current builder at the front, followed by any "wait" builders - builders = [builder, ...remaining]; - break; - } - } - if (!current || builders[0]?.options.interrupt === "immediate") { - next(); - } - } - function addToQueue(builder) { - builders.push(builder); - microtask.render(processQueue); - } - - class ViewTransitionBuilder { - constructor(update, options = {}) { - this.currentSubject = "root"; - this.targets = new Map(); - this.notifyReady = motionUtils.noop; - this.readyPromise = new Promise((resolve) => { - this.notifyReady = resolve; - }); - this.update = update; - this.options = { - interrupt: "wait", - ...options, - }; - addToQueue(this); - } - get(subject) { - this.currentSubject = subject; - return this; - } - layout(keyframes, options) { - this.updateTarget("layout", keyframes, options); - return this; - } - new(keyframes, options) { - this.updateTarget("new", keyframes, options); - return this; - } - old(keyframes, options) { - this.updateTarget("old", keyframes, options); - return this; - } - enter(keyframes, options) { - this.updateTarget("enter", keyframes, options); - return this; - } - exit(keyframes, options) { - this.updateTarget("exit", keyframes, options); - return this; - } - crossfade(options) { - this.updateTarget("enter", { opacity: 1 }, options); - this.updateTarget("exit", { opacity: 0 }, options); - return this; - } - updateTarget(target, keyframes, options = {}) { - const { currentSubject, targets } = this; - if (!targets.has(currentSubject)) { - targets.set(currentSubject, {}); - } - const targetData = targets.get(currentSubject); - targetData[target] = { keyframes, options }; - } - then(resolve, reject) { - return this.readyPromise.then(resolve, reject); - } - } - function animateView(update, defaultOptions = {}) { - return new ViewTransitionBuilder(update, defaultOptions); - } - - const createAxisDelta = () => ({ - translate: 0, - scale: 1, - origin: 0, - originPoint: 0, - }); - const createDelta = () => ({ - x: createAxisDelta(), - y: createAxisDelta(), - }); - const createAxis = () => ({ min: 0, max: 0 }); - const createBox = () => ({ - x: createAxis(), - y: createAxis(), - }); - - const visualElementStore = new WeakMap(); - - function isAnimationControls(v) { - return (v !== null && - typeof v === "object" && - typeof v.start === "function"); - } - - /** - * Decides if the supplied variable is variant label - */ - function isVariantLabel(v) { - return typeof v === "string" || Array.isArray(v); - } - - const variantPriorityOrder = [ - "animate", - "whileInView", - "whileFocus", - "whileHover", - "whileTap", - "whileDrag", - "exit", - ]; - const variantProps = ["initial", ...variantPriorityOrder]; - - function isControllingVariants(props) { - return (isAnimationControls(props.animate) || - variantProps.some((name) => isVariantLabel(props[name]))); - } - function isVariantNode(props) { - return Boolean(isControllingVariants(props) || props.variants); - } - - /** - * Updates motion values from props changes. - * Uses `any` type for element to avoid circular dependencies with VisualElement. - */ - function updateMotionValuesFromProps(element, next, prev) { - for (const key in next) { - const nextValue = next[key]; - const prevValue = prev[key]; - if (isMotionValue(nextValue)) { - /** - * If this is a motion value found in props or style, we want to add it - * to our visual element's motion value map. - */ - element.addValue(key, nextValue); - } - else if (isMotionValue(prevValue)) { - /** - * If we're swapping from a motion value to a static value, - * create a new motion value from that - */ - element.addValue(key, motionValue(nextValue, { owner: element })); - } - else if (prevValue !== nextValue) { - /** - * If this is a flat value that has changed, update the motion value - * or create one if it doesn't exist. We only want to do this if we're - * not handling the value with our animation state. - */ - if (element.hasValue(key)) { - const existingValue = element.getValue(key); - if (existingValue.liveStyle === true) { - existingValue.jump(nextValue); - } - else if (!existingValue.hasAnimated) { - existingValue.set(nextValue); - } - } - else { - const latestValue = element.getStaticValue(key); - element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element })); - } - } - } - // Handle removed values - for (const key in prev) { - if (next[key] === undefined) - element.removeValue(key); - } - return next; - } - - // Does this device prefer reduced motion? Returns `null` server-side. - const prefersReducedMotion = { current: null }; - const hasReducedMotionListener = { current: false }; - - const isBrowser = typeof window !== "undefined"; - function initPrefersReducedMotion() { - hasReducedMotionListener.current = true; - if (!isBrowser) - return; - if (window.matchMedia) { - const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)"); - const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches); - motionMediaQuery.addEventListener("change", setReducedMotionPreferences); - setReducedMotionPreferences(); - } - else { - prefersReducedMotion.current = false; - } - } - - const propEventHandlers = [ - "AnimationStart", - "AnimationComplete", - "Update", - "BeforeLayoutMeasure", - "LayoutMeasure", - "LayoutAnimationStart", - "LayoutAnimationComplete", - ]; - /** - * Static feature definitions - can be injected by framework layer - */ - let featureDefinitions = {}; - /** - * Set feature definitions for all VisualElements. - * This should be called by the framework layer (e.g., framer-motion) during initialization. - */ - function setFeatureDefinitions(definitions) { - featureDefinitions = definitions; - } - /** - * Get the current feature definitions - */ - function getFeatureDefinitions() { - return featureDefinitions; - } - /** - * A VisualElement is an imperative abstraction around UI elements such as - * HTMLElement, SVGElement, Three.Object3D etc. - */ - class VisualElement { - /** - * This method takes React props and returns found MotionValues. For example, HTML - * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays. - * - * This isn't an abstract method as it needs calling in the constructor, but it is - * intended to be one. - */ - scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) { - return {}; - } - constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) { - /** - * A reference to the current underlying Instance, e.g. a HTMLElement - * or Three.Mesh etc. - */ - this.current = null; - /** - * A set containing references to this VisualElement's children. - */ - this.children = new Set(); - /** - * Determine what role this visual element should take in the variant tree. - */ - this.isVariantNode = false; - this.isControllingVariants = false; - /** - * Decides whether this VisualElement should animate in reduced motion - * mode. - * - * TODO: This is currently set on every individual VisualElement but feels - * like it could be set globally. - */ - this.shouldReduceMotion = null; - /** - * Decides whether animations should be skipped for this VisualElement. - * Useful for E2E tests and visual regression testing. - */ - this.shouldSkipAnimations = false; - /** - * A map of all motion values attached to this visual element. Motion - * values are source of truth for any given animated value. A motion - * value might be provided externally by the component via props. - */ - this.values = new Map(); - this.KeyframeResolver = KeyframeResolver; - /** - * Cleanup functions for active features (hover/tap/exit etc) - */ - this.features = {}; - /** - * A map of every subscription that binds the provided or generated - * motion values onChange listeners to this visual element. - */ - this.valueSubscriptions = new Map(); - /** - * A reference to the previously-provided motion values as returned - * from scrapeMotionValuesFromProps. We use the keys in here to determine - * if any motion values need to be removed after props are updated. - */ - this.prevMotionValues = {}; - /** - * Track whether this element has been mounted before, to detect - * remounts after Suspense unmount/remount cycles. - */ - this.hasBeenMounted = false; - /** - * An object containing a SubscriptionManager for each active event. - */ - this.events = {}; - /** - * An object containing an unsubscribe function for each prop event subscription. - * For example, every "Update" event can have multiple subscribers via - * VisualElement.on(), but only one of those can be defined via the onUpdate prop. - */ - this.propEventSubscriptions = {}; - this.notifyUpdate = () => this.notify("Update", this.latestValues); - this.render = () => { - if (!this.current) - return; - this.triggerBuild(); - this.renderInstance(this.current, this.renderState, this.props.style, this.projection); - }; - this.renderScheduledAt = 0.0; - this.scheduleRender = () => { - const now = time.now(); - if (this.renderScheduledAt < now) { - this.renderScheduledAt = now; - frame.render(this.render, false, true); - } - }; - const { latestValues, renderState } = visualState; - this.latestValues = latestValues; - this.baseTarget = { ...latestValues }; - this.initialValues = props.initial ? { ...latestValues } : {}; - this.renderState = renderState; - this.parent = parent; - this.props = props; - this.presenceContext = presenceContext; - this.depth = parent ? parent.depth + 1 : 0; - this.reducedMotionConfig = reducedMotionConfig; - this.skipAnimationsConfig = skipAnimations; - this.options = options; - this.blockInitialAnimation = Boolean(blockInitialAnimation); - this.isControllingVariants = isControllingVariants(props); - this.isVariantNode = isVariantNode(props); - if (this.isVariantNode) { - this.variantChildren = new Set(); - } - this.manuallyAnimateOnMount = Boolean(parent && parent.current); - /** - * Any motion values that are provided to the element when created - * aren't yet bound to the element, as this would technically be impure. - * However, we iterate through the motion values and set them to the - * initial values for this component. - * - * TODO: This is impure and we should look at changing this to run on mount. - * Doing so will break some tests but this isn't necessarily a breaking change, - * more a reflection of the test. - */ - const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this); - for (const key in initialMotionValues) { - const value = initialMotionValues[key]; - if (latestValues[key] !== undefined && isMotionValue(value)) { - value.set(latestValues[key]); - } - } - } - mount(instance) { - /** - * If this element has been mounted before (e.g. after a Suspense - * unmount/remount), reset motion values to their initial state - * so animations replay correctly from initial → animate. - */ - if (this.hasBeenMounted) { - for (const key in this.initialValues) { - this.values.get(key)?.jump(this.initialValues[key]); - this.latestValues[key] = this.initialValues[key]; - } - } - this.current = instance; - visualElementStore.set(instance, this); - if (this.projection && !this.projection.instance) { - this.projection.mount(instance); - } - if (this.parent && this.isVariantNode && !this.isControllingVariants) { - this.removeFromVariantTree = this.parent.addVariantChild(this); - } - this.values.forEach((value, key) => this.bindToMotionValue(key, value)); - /** - * Determine reduced motion preference. Only initialize the matchMedia - * listener if we actually need the dynamic value (i.e., when config - * is neither "never" nor "always"). - */ - if (this.reducedMotionConfig === "never") { - this.shouldReduceMotion = false; - } - else if (this.reducedMotionConfig === "always") { - this.shouldReduceMotion = true; - } - else { - if (!hasReducedMotionListener.current) { - initPrefersReducedMotion(); - } - this.shouldReduceMotion = prefersReducedMotion.current; - } - { - motionUtils.warnOnce(this.shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"); - } - /** - * Set whether animations should be skipped based on the config. - */ - this.shouldSkipAnimations = this.skipAnimationsConfig ?? false; - this.parent?.addChild(this); - this.update(this.props, this.presenceContext); - this.hasBeenMounted = true; - } - unmount() { - this.projection && this.projection.unmount(); - cancelFrame(this.notifyUpdate); - cancelFrame(this.render); - this.valueSubscriptions.forEach((remove) => remove()); - this.valueSubscriptions.clear(); - this.removeFromVariantTree && this.removeFromVariantTree(); - this.parent?.removeChild(this); - for (const key in this.events) { - this.events[key].clear(); - } - for (const key in this.features) { - const feature = this.features[key]; - if (feature) { - feature.unmount(); - feature.isMounted = false; - } - } - this.current = null; - } - addChild(child) { - this.children.add(child); - this.enteringChildren ?? (this.enteringChildren = new Set()); - this.enteringChildren.add(child); - } - removeChild(child) { - this.children.delete(child); - this.enteringChildren && this.enteringChildren.delete(child); - } - bindToMotionValue(key, value) { - if (this.valueSubscriptions.has(key)) { - this.valueSubscriptions.get(key)(); - } - if (value.accelerate && - acceleratedValues.has(key) && - this.current instanceof HTMLElement) { - const { factory, keyframes, times, ease, duration } = value.accelerate; - const animation = new NativeAnimation({ - element: this.current, - name: key, - keyframes, - times, - ease, - duration: motionUtils.secondsToMilliseconds(duration), - }); - const cleanup = factory(animation); - this.valueSubscriptions.set(key, () => { - cleanup(); - animation.cancel(); - }); - return; - } - const valueIsTransform = transformProps.has(key); - if (valueIsTransform && this.onBindTransform) { - this.onBindTransform(); - } - const removeOnChange = value.on("change", (latestValue) => { - this.latestValues[key] = latestValue; - this.props.onUpdate && frame.preRender(this.notifyUpdate); - if (valueIsTransform && this.projection) { - this.projection.isTransformDirty = true; - } - this.scheduleRender(); - }); - let removeSyncCheck; - if (typeof window !== "undefined" && - window.MotionCheckAppearSync) { - removeSyncCheck = window.MotionCheckAppearSync(this, key, value); - } - this.valueSubscriptions.set(key, () => { - removeOnChange(); - if (removeSyncCheck) - removeSyncCheck(); - // Defer to MotionValue.on("change") auto-stop so React 19 remounts - // can resubscribe before the animation is cancelled (#3315). - }); - } - sortNodePosition(other) { - /** - * If these nodes aren't even of the same type we can't compare their depth. - */ - if (!this.current || - !this.sortInstanceNodePosition || - this.type !== other.type) { - return 0; - } - return this.sortInstanceNodePosition(this.current, other.current); - } - updateFeatures() { - let key = "animation"; - for (key in featureDefinitions) { - const featureDefinition = featureDefinitions[key]; - if (!featureDefinition) - continue; - const { isEnabled, Feature: FeatureConstructor } = featureDefinition; - /** - * If this feature is enabled but not active, make a new instance. - */ - if (!this.features[key] && - FeatureConstructor && - isEnabled(this.props)) { - this.features[key] = new FeatureConstructor(this); - } - /** - * If we have a feature, mount or update it. - */ - if (this.features[key]) { - const feature = this.features[key]; - if (feature.isMounted) { - feature.update(); - } - else { - feature.mount(); - feature.isMounted = true; - } - } - } - } - triggerBuild() { - this.build(this.renderState, this.latestValues, this.props); - } - /** - * Measure the current viewport box with or without transforms. - * Only measures axis-aligned boxes, rotate and skew must be manually - * removed with a re-render to work. - */ - measureViewportBox() { - return this.current - ? this.measureInstanceViewportBox(this.current, this.props) - : createBox(); - } - getStaticValue(key) { - return this.latestValues[key]; - } - setStaticValue(key, value) { - this.latestValues[key] = value; - } - /** - * Update the provided props. Ensure any newly-added motion values are - * added to our map, old ones removed, and listeners updated. - */ - update(props, presenceContext) { - if (props.transformTemplate || this.props.transformTemplate) { - this.scheduleRender(); - } - this.prevProps = this.props; - this.props = props; - this.prevPresenceContext = this.presenceContext; - this.presenceContext = presenceContext; - /** - * Update prop event handlers ie onAnimationStart, onAnimationComplete - */ - for (let i = 0; i < propEventHandlers.length; i++) { - const key = propEventHandlers[i]; - if (this.propEventSubscriptions[key]) { - this.propEventSubscriptions[key](); - delete this.propEventSubscriptions[key]; - } - const listenerName = ("on" + key); - const listener = props[listenerName]; - if (listener) { - this.propEventSubscriptions[key] = this.on(key, listener); - } - } - this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues); - if (this.handleChildMotionValue) { - this.handleChildMotionValue(); - } - } - getProps() { - return this.props; - } - /** - * Returns the variant definition with a given name. - */ - getVariant(name) { - return this.props.variants ? this.props.variants[name] : undefined; - } - /** - * Returns the defined default transition on this component. - */ - getDefaultTransition() { - return this.props.transition; - } - getTransformPagePoint() { - return this.props.transformPagePoint; - } - getClosestVariantNode() { - return this.isVariantNode - ? this - : this.parent - ? this.parent.getClosestVariantNode() - : undefined; - } - /** - * Add a child visual element to our set of children. - */ - addVariantChild(child) { - const closestVariantNode = this.getClosestVariantNode(); - if (closestVariantNode) { - closestVariantNode.variantChildren && - closestVariantNode.variantChildren.add(child); - return () => closestVariantNode.variantChildren.delete(child); - } - } - /** - * Add a motion value and bind it to this visual element. - */ - addValue(key, value) { - // Remove existing value if it exists - const existingValue = this.values.get(key); - if (value !== existingValue) { - if (existingValue) - this.removeValue(key); - this.bindToMotionValue(key, value); - this.values.set(key, value); - this.latestValues[key] = value.get(); - } - } - /** - * Remove a motion value and unbind any active subscriptions. - */ - removeValue(key) { - this.values.delete(key); - const unsubscribe = this.valueSubscriptions.get(key); - if (unsubscribe) { - unsubscribe(); - this.valueSubscriptions.delete(key); - } - delete this.latestValues[key]; - this.removeValueFromRenderState(key, this.renderState); - } - /** - * Check whether we have a motion value for this key - */ - hasValue(key) { - return this.values.has(key); - } - getValue(key, defaultValue) { - if (this.props.values && this.props.values[key]) { - return this.props.values[key]; - } - let value = this.values.get(key); - if (value === undefined && defaultValue !== undefined) { - value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this }); - this.addValue(key, value); - } - return value; - } - /** - * If we're trying to animate to a previously unencountered value, - * we need to check for it in our state and as a last resort read it - * directly from the instance (which might have performance implications). - */ - readValue(key, target) { - let value = this.latestValues[key] !== undefined || !this.current - ? this.latestValues[key] - : this.getBaseTargetFromProps(this.props, key) ?? - this.readValueFromInstance(this.current, key, this.options); - if (value !== undefined && value !== null) { - if (typeof value === "string" && - (motionUtils.isNumericalString(value) || motionUtils.isZeroValueString(value))) { - // If this is a number read as a string, ie "0" or "200", convert it to a number - value = parseFloat(value); - } - else if (!findValueType(value) && complex.test(target)) { - value = getAnimatableNone(key, target); - } - this.setBaseTarget(key, isMotionValue(value) ? value.get() : value); - } - return isMotionValue(value) ? value.get() : value; - } - /** - * Set the base target to later animate back to. This is currently - * only hydrated on creation and when we first read a value. - */ - setBaseTarget(key, value) { - this.baseTarget[key] = value; - } - /** - * Find the base target for a value thats been removed from all animation - * props. - */ - getBaseTarget(key) { - const { initial } = this.props; - let valueFromInitial; - if (typeof initial === "string" || typeof initial === "object") { - const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom); - if (variant) { - valueFromInitial = variant[key]; - } - } - /** - * If this value still exists in the current initial variant, read that. - */ - if (initial && valueFromInitial !== undefined) { - return valueFromInitial; - } - /** - * Alternatively, if this VisualElement config has defined a getBaseTarget - * so we can read the value from an alternative source, try that. - */ - const target = this.getBaseTargetFromProps(this.props, key); - if (target !== undefined && !isMotionValue(target)) - return target; - /** - * If the value was initially defined on initial, but it doesn't any more, - * return undefined. Otherwise return the value as initially read from the DOM. - */ - return this.initialValues[key] !== undefined && - valueFromInitial === undefined - ? undefined - : this.baseTarget[key]; - } - on(eventName, callback) { - if (!this.events[eventName]) { - this.events[eventName] = new motionUtils.SubscriptionManager(); - } - return this.events[eventName].add(callback); - } - notify(eventName, ...args) { - if (this.events[eventName]) { - this.events[eventName].notify(...args); - } - } - scheduleRenderMicrotask() { - microtask.render(this.render); - } - } - - class DOMVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.KeyframeResolver = DOMKeyframesResolver; - } - sortInstanceNodePosition(a, b) { - /** - * compareDocumentPosition returns a bitmask, by using the bitwise & - * we're returning true if 2 in that bitmask is set to true. 2 is set - * to true if b preceeds a. - */ - return a.compareDocumentPosition(b) & 2 ? 1 : -1; - } - getBaseTargetFromProps(props, key) { - const style = props.style; - return style ? style[key] : undefined; - } - removeValueFromRenderState(key, { vars, style }) { - delete vars[key]; - delete style[key]; - } - handleChildMotionValue() { - if (this.childSubscription) { - this.childSubscription(); - delete this.childSubscription; - } - const { children } = this.props; - if (isMotionValue(children)) { - this.childSubscription = children.on("change", (latest) => { - if (this.current) { - this.current.textContent = `${latest}`; - } - }); - } - } - } - - /** - * Feature base class for extending VisualElement functionality. - * Features are plugins that can be mounted/unmounted to add behavior - * like gestures, animations, or layout tracking. - */ - class Feature { - constructor(node) { - this.isMounted = false; - this.node = node; - } - update() { } - } - - /** - * Bounding boxes tend to be defined as top, left, right, bottom. For various operations - * it's easier to consider each axis individually. This function returns a bounding box - * as a map of single-axis min/max values. - */ - function convertBoundingBoxToBox({ top, left, right, bottom, }) { - return { - x: { min: left, max: right }, - y: { min: top, max: bottom }, - }; - } - function convertBoxToBoundingBox({ x, y }) { - return { top: y.min, right: x.max, bottom: y.max, left: x.min }; - } - /** - * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function - * provided by Framer to allow measured points to be corrected for device scaling. This is used - * when measuring DOM elements and DOM event points. - */ - function transformBoxPoints(point, transformPoint) { - if (!transformPoint) - return point; - const topLeft = transformPoint({ x: point.left, y: point.top }); - const bottomRight = transformPoint({ x: point.right, y: point.bottom }); - return { - top: topLeft.y, - left: topLeft.x, - bottom: bottomRight.y, - right: bottomRight.x, - }; - } - - function isIdentityScale(scale) { - return scale === undefined || scale === 1; - } - function hasScale({ scale, scaleX, scaleY }) { - return (!isIdentityScale(scale) || - !isIdentityScale(scaleX) || - !isIdentityScale(scaleY)); - } - function hasTransform(values) { - return (hasScale(values) || - has2DTranslate(values) || - values.z || - values.rotate || - values.rotateX || - values.rotateY || - values.skewX || - values.skewY); - } - function has2DTranslate(values) { - return is2DTranslate(values.x) || is2DTranslate(values.y); - } - function is2DTranslate(value) { - return value && value !== "0%"; - } - - /** - * Scales a point based on a factor and an originPoint - */ - function scalePoint(point, scale, originPoint) { - const distanceFromOrigin = point - originPoint; - const scaled = scale * distanceFromOrigin; - return originPoint + scaled; - } - /** - * Applies a translate/scale delta to a point - */ - function applyPointDelta(point, translate, scale, originPoint, boxScale) { - if (boxScale !== undefined) { - point = scalePoint(point, boxScale, originPoint); - } - return scalePoint(point, scale, originPoint) + translate; - } - /** - * Applies a translate/scale delta to an axis - */ - function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) { - axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale); - axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale); - } - /** - * Applies a translate/scale delta to a box - */ - function applyBoxDelta(box, { x, y }) { - applyAxisDelta(box.x, x.translate, x.scale, x.originPoint); - applyAxisDelta(box.y, y.translate, y.scale, y.originPoint); - } - const TREE_SCALE_SNAP_MIN = 0.999999999999; - const TREE_SCALE_SNAP_MAX = 1.0000000000001; - /** - * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms - * in a tree upon our box before then calculating how to project it into our desired viewport-relative box - * - * This is the final nested loop within updateLayoutDelta for future refactoring - */ - function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) { - const treeLength = treePath.length; - if (!treeLength) - return; - // Reset the treeScale - treeScale.x = treeScale.y = 1; - let node; - let delta; - for (let i = 0; i < treeLength; i++) { - node = treePath[i]; - delta = node.projectionDelta; - /** - * TODO: Prefer to remove this, but currently we have motion components with - * display: contents in Framer. - */ - const { visualElement } = node.options; - if (visualElement && - visualElement.props.style && - visualElement.props.style.display === "contents") { - continue; - } - if (isSharedTransition && - node.options.layoutScroll && - node.scroll && - node !== node.root) { - translateAxis(box.x, -node.scroll.offset.x); - translateAxis(box.y, -node.scroll.offset.y); - } - if (delta) { - // Incoporate each ancestor's scale into a cumulative treeScale for this component - treeScale.x *= delta.x.scale; - treeScale.y *= delta.y.scale; - // Apply each ancestor's calculated delta into this component's recorded layout box - applyBoxDelta(box, delta); - } - if (isSharedTransition && hasTransform(node.latestValues)) { - transformBox(box, node.latestValues, node.layout?.layoutBox); - } - } - /** - * Snap tree scale back to 1 if it's within a non-perceivable threshold. - * This will help reduce useless scales getting rendered. - */ - if (treeScale.x < TREE_SCALE_SNAP_MAX && - treeScale.x > TREE_SCALE_SNAP_MIN) { - treeScale.x = 1.0; - } - if (treeScale.y < TREE_SCALE_SNAP_MAX && - treeScale.y > TREE_SCALE_SNAP_MIN) { - treeScale.y = 1.0; - } - } - function translateAxis(axis, distance) { - axis.min += distance; - axis.max += distance; - } - /** - * Apply a transform to an axis from the latest resolved motion values. - * This function basically acts as a bridge between a flat motion value map - * and applyAxisDelta - */ - function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) { - const originPoint = mixNumber$1(axis.min, axis.max, axisOrigin); - // Apply the axis delta to the final axis - applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale); - } - function resolveAxisTranslate(value, axis) { - if (typeof value === "string") { - return (parseFloat(value) / 100) * (axis.max - axis.min); - } - return value; - } - /** - * Apply a transform to a box from the latest resolved motion values. - */ - function transformBox(box, transform, sourceBox) { - const resolveBox = sourceBox ?? box; - transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX); - transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY); - } - - function measureViewportBox(instance, transformPoint) { - return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint)); - } - function measurePageBox(element, rootProjectionNode, transformPagePoint) { - const viewportBox = measureViewportBox(element, transformPagePoint); - const { scroll } = rootProjectionNode; - if (scroll) { - translateAxis(viewportBox.x, scroll.offset.x); - translateAxis(viewportBox.y, scroll.offset.y); - } - return viewportBox; - } - - const translateAlias = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective", - }; - const numTransforms = transformPropOrder.length; - /** - * Build a CSS transform style from individual x/y/scale etc properties. - * - * This outputs with a default order of transforms/scales/rotations, this can be customised by - * providing a transformTemplate function. - */ - function buildTransform(latestValues, transform, transformTemplate) { - // The transform string we're going to build into. - let transformString = ""; - let transformIsDefault = true; - /** - * Loop over all possible transforms in order, adding the ones that - * are present to the transform string. - */ - for (let i = 0; i < numTransforms; i++) { - const key = transformPropOrder[i]; - const value = latestValues[key]; - if (value === undefined) - continue; - let valueIsDefault = true; - if (typeof value === "number") { - valueIsDefault = value === (key.startsWith("scale") ? 1 : 0); - } - else { - const parsed = parseFloat(value); - valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0; - } - if (!valueIsDefault || transformTemplate) { - const valueAsType = getValueAsType(value, numberValueTypes[key]); - if (!valueIsDefault) { - transformIsDefault = false; - const transformName = translateAlias[key] || key; - transformString += `${transformName}(${valueAsType}) `; - } - if (transformTemplate) { - transform[key] = valueAsType; - } - } - } - // `pathRotation` composes onto `rotate` as a separate additive term so - // the user's `rotate` is never clobbered. Deliberately not a slot in - // `transformPropOrder`. - const pathRotation = latestValues.pathRotation; - if (pathRotation) { - transformIsDefault = false; - transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `; - } - transformString = transformString.trim(); - // If we have a custom `transform` template, pass our transform values and - // generated transformString to that before returning - if (transformTemplate) { - transformString = transformTemplate(transform, transformIsDefault ? "" : transformString); - } - else if (transformIsDefault) { - transformString = "none"; - } - return transformString; - } - - function buildHTMLStyles(state, latestValues, transformTemplate) { - const { style, vars, transformOrigin } = state; - // Track whether we encounter any transform or transformOrigin values. - let hasTransform = false; - let hasTransformOrigin = false; - /** - * Loop over all our latest animated values and decide whether to handle them - * as a style or CSS variable. - * - * Transforms and transform origins are kept separately for further processing. - */ - for (const key in latestValues) { - const value = latestValues[key]; - if (transformProps.has(key)) { - // If this is a transform, flag to enable further transform processing - hasTransform = true; - continue; - } - else if (isCSSVariableName(key)) { - vars[key] = value; - continue; - } - else { - // Convert the value to its default value type, ie 0 -> "0px" - const valueAsType = getValueAsType(value, numberValueTypes[key]); - if (key.startsWith("origin")) { - // If this is a transform origin, flag and enable further transform-origin processing - hasTransformOrigin = true; - transformOrigin[key] = - valueAsType; - } - else { - style[key] = valueAsType; - } - } - } - if (!latestValues.transform) { - if (hasTransform || transformTemplate) { - style.transform = buildTransform(latestValues, state.transform, transformTemplate); - } - else if (style.transform) { - /** - * If we have previously created a transform but currently don't have any, - * reset transform style to none. - */ - style.transform = "none"; - } - } - /** - * Build a transformOrigin style. Uses the same defaults as the browser for - * undefined origins. - */ - if (hasTransformOrigin) { - const { originX = "50%", originY = "50%", originZ = 0, } = transformOrigin; - style.transformOrigin = `${originX} ${originY} ${originZ}`; - } - } - - function renderHTML(element, { style, vars }, styleProp, projection) { - const elementStyle = element.style; - let key; - for (key in style) { - // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type. - elementStyle[key] = style[key]; - } - // Write projection styles directly to element style - projection?.applyProjectionStyles(elementStyle, styleProp); - for (key in vars) { - // Loop over any CSS variables and assign those. - // They can only be assigned using `setProperty`. - elementStyle.setProperty(key, vars[key]); - } - } - - function pixelsToPercent(pixels, axis) { - if (axis.max === axis.min) - return 0; - return (pixels / (axis.max - axis.min)) * 100; - } - /** - * We always correct borderRadius as a percentage rather than pixels to reduce paints. - * For example, if you are projecting a box that is 100px wide with a 10px borderRadius - * into a box that is 200px wide with a 20px borderRadius, that is actually a 10% - * borderRadius in both states. If we animate between the two in pixels that will trigger - * a paint each time. If we animate between the two in percentage we'll avoid a paint. - */ - const correctBorderRadius = { - correct: (latest, node) => { - if (!node.target) - return latest; - /** - * If latest is a string, if it's a percentage we can return immediately as it's - * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number. - */ - if (typeof latest === "string") { - if (px.test(latest)) { - latest = parseFloat(latest); - } - else { - return latest; - } - } - /** - * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that - * pixel value as a percentage of each axis - */ - const x = pixelsToPercent(latest, node.target.x); - const y = pixelsToPercent(latest, node.target.y); - return `${x}% ${y}%`; - }, - }; - - const correctBoxShadow = { - correct: (latest, { treeScale, projectionDelta }) => { - const original = latest; - const shadow = complex.parse(latest); - // TODO: Doesn't support multiple shadows - if (shadow.length > 5) - return original; - const template = complex.createTransformer(latest); - const offset = typeof shadow[0] !== "number" ? 1 : 0; - // Calculate the overall context scale - const xScale = projectionDelta.x.scale * treeScale.x; - const yScale = projectionDelta.y.scale * treeScale.y; - shadow[0 + offset] /= xScale; - shadow[1 + offset] /= yScale; - /** - * Ideally we'd correct x and y scales individually, but because blur and - * spread apply to both we have to take a scale average and apply that instead. - * We could potentially improve the outcome of this by incorporating the ratio between - * the two scales. - */ - const averageScale = mixNumber$1(xScale, yScale, 0.5); - // Blur - if (typeof shadow[2 + offset] === "number") - shadow[2 + offset] /= averageScale; - // Spread - if (typeof shadow[3 + offset] === "number") - shadow[3 + offset] /= averageScale; - return template(shadow); - }, - }; - - const scaleCorrectors = { - borderRadius: { - ...correctBorderRadius, - applyTo: [ - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomLeftRadius", - "borderBottomRightRadius", - ], - }, - borderTopLeftRadius: correctBorderRadius, - borderTopRightRadius: correctBorderRadius, - borderBottomLeftRadius: correctBorderRadius, - borderBottomRightRadius: correctBorderRadius, - boxShadow: correctBoxShadow, - }; - function addScaleCorrector(correctors) { - for (const key in correctors) { - scaleCorrectors[key] = correctors[key]; - if (isCSSVariableName(key)) { - scaleCorrectors[key].isCSSVariable = true; - } - } - } - - function isForcedMotionValue(key, { layout, layoutId }) { - return (transformProps.has(key) || - key.startsWith("origin") || - ((layout || layoutId !== undefined) && - (!!scaleCorrectors[key] || key === "opacity"))); - } - - function scrapeMotionValuesFromProps$1(props, prevProps, visualElement) { - const style = props.style; - const prevStyle = prevProps?.style; - const newValues = {}; - if (!style) - return newValues; - for (const key in style) { - if (isMotionValue(style[key]) || - (prevStyle && isMotionValue(prevStyle[key])) || - isForcedMotionValue(key, props) || - visualElement?.getValue(key)?.liveStyle !== undefined) { - newValues[key] = style[key]; - } - } - return newValues; - } - - function getComputedStyle$1(element) { - return window.getComputedStyle(element); - } - class HTMLVisualElement extends DOMVisualElement { - constructor() { - super(...arguments); - this.type = "html"; - this.renderInstance = renderHTML; - } - readValueFromInstance(instance, key) { - if (transformProps.has(key)) { - return this.projection?.isProjecting - ? defaultTransformValue(key) - : readTransformValue(instance, key); - } - else { - const computedStyle = getComputedStyle$1(instance); - const value = (isCSSVariableName(key) - ? computedStyle.getPropertyValue(key) - : computedStyle[key]) || 0; - return typeof value === "string" ? value.trim() : value; - } - } - measureInstanceViewportBox(instance, { transformPagePoint }) { - return measureViewportBox(instance, transformPagePoint); - } - build(renderState, latestValues, props) { - buildHTMLStyles(renderState, latestValues, props.transformTemplate); - } - scrapeMotionValuesFromProps(props, prevProps, visualElement) { - return scrapeMotionValuesFromProps$1(props, prevProps, visualElement); - } - } - - function isObjectKey(key, object) { - return key in object; - } - class ObjectVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.type = "object"; - } - readValueFromInstance(instance, key) { - if (isObjectKey(key, instance)) { - const value = instance[key]; - if (typeof value === "string" || typeof value === "number") { - return value; - } - } - return undefined; - } - getBaseTargetFromProps() { - return undefined; - } - removeValueFromRenderState(key, renderState) { - delete renderState.output[key]; - } - measureInstanceViewportBox() { - return createBox(); - } - build(renderState, latestValues) { - Object.assign(renderState.output, latestValues); - } - renderInstance(instance, { output }) { - Object.assign(instance, output); - } - sortInstanceNodePosition() { - return 0; - } - } - - const dashKeys = { - offset: "stroke-dashoffset", - array: "stroke-dasharray", - }; - const camelKeys = { - offset: "strokeDashoffset", - array: "strokeDasharray", - }; - /** - * Build SVG path properties. Uses the path's measured length to convert - * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset - * and stroke-dasharray attributes. - * - * This function is mutative to reduce per-frame GC. - * - * Note: We use unitless values for stroke-dasharray and stroke-dashoffset - * because Safari incorrectly scales px values when the page is zoomed. - */ - function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) { - // Normalise path length by setting SVG attribute pathLength to 1 - attrs.pathLength = 1; - // We use dash case when setting attributes directly to the DOM node and camel case - // when defining props on a React component. - const keys = useDashCase ? dashKeys : camelKeys; - // Build the dash offset (unitless to avoid Safari zoom bug) - attrs[keys.offset] = `${-offset}`; - // Build the dash array (unitless to avoid Safari zoom bug) - attrs[keys.array] = `${length} ${spacing}`; - } - - /** - * CSS Motion Path properties that should remain as CSS styles on SVG elements. - */ - const cssMotionPathProperties = [ - "offsetDistance", - "offsetPath", - "offsetRotate", - "offsetAnchor", - ]; - /** - * Build SVG visual attributes, like cx and style.transform - */ - function buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, - // This is object creation, which we try to avoid per-frame. - ...latest }, isSVGTag, transformTemplate, styleProp) { - buildHTMLStyles(state, latest, transformTemplate); - /** - * For svg tags we just want to make sure viewBox is animatable and treat all the styles - * as normal HTML tags. - */ - if (isSVGTag) { - if (state.style.viewBox) { - state.attrs.viewBox = state.style.viewBox; - } - return; - } - state.attrs = state.style; - state.style = {}; - const { attrs, style } = state; - /** - * However, we apply transforms as CSS transforms. - * So if we detect a transform, transformOrigin we take it from attrs and copy it into style. - */ - if (attrs.transform) { - style.transform = attrs.transform; - delete attrs.transform; - } - if (style.transform || attrs.transformOrigin) { - style.transformOrigin = attrs.transformOrigin ?? "50% 50%"; - delete attrs.transformOrigin; - } - if (style.transform) { - /** - * SVG's element transform-origin uses its own median as a reference. - * Therefore, transformBox becomes a fill-box - */ - style.transformBox = styleProp?.transformBox ?? "fill-box"; - delete attrs.transformBox; - } - for (const key of cssMotionPathProperties) { - if (attrs[key] !== undefined) { - style[key] = attrs[key]; - delete attrs[key]; - } - } - // Render attrX/attrY/attrScale as attributes - if (attrX !== undefined) - attrs.x = attrX; - if (attrY !== undefined) - attrs.y = attrY; - if (attrScale !== undefined) - attrs.scale = attrScale; - // Build SVG path if one has been defined - if (pathLength !== undefined) { - buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false); - } - } - - /** - * A set of attribute names that are always read/written as camel case. - */ - const camelCaseAttributes = new Set([ - "baseFrequency", - "diffuseConstant", - "kernelMatrix", - "kernelUnitLength", - "keySplines", - "keyTimes", - "limitingConeAngle", - "markerHeight", - "markerWidth", - "numOctaves", - "targetX", - "targetY", - "surfaceScale", - "specularConstant", - "specularExponent", - "stdDeviation", - "tableValues", - "viewBox", - "gradientTransform", - "pathLength", - "startOffset", - "textLength", - "lengthAdjust", - ]); - - const isSVGTag = (tag) => typeof tag === "string" && tag.toLowerCase() === "svg"; - - function renderSVG(element, renderState, _styleProp, projection) { - renderHTML(element, renderState, undefined, projection); - for (const key in renderState.attrs) { - element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]); - } - } - - function scrapeMotionValuesFromProps(props, prevProps, visualElement) { - const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement); - for (const key in props) { - if (isMotionValue(props[key]) || - isMotionValue(prevProps[key])) { - const targetKey = transformPropOrder.indexOf(key) !== -1 - ? "attr" + key.charAt(0).toUpperCase() + key.substring(1) - : key; - newValues[targetKey] = props[key]; - } - } - return newValues; - } - - class SVGVisualElement extends DOMVisualElement { - constructor() { - super(...arguments); - this.type = "svg"; - this.isSVGTag = false; - this.measureInstanceViewportBox = createBox; - } - getBaseTargetFromProps(props, key) { - return props[key]; - } - readValueFromInstance(instance, key) { - if (transformProps.has(key)) { - const defaultType = getDefaultValueType(key); - return defaultType ? defaultType.default || 0 : 0; - } - key = !camelCaseAttributes.has(key) ? camelToDash(key) : key; - return instance.getAttribute(key); - } - scrapeMotionValuesFromProps(props, prevProps, visualElement) { - return scrapeMotionValuesFromProps(props, prevProps, visualElement); - } - build(renderState, latestValues, props) { - buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style); - } - renderInstance(instance, renderState, styleProp, projection) { - renderSVG(instance, renderState, styleProp, projection); - } - mount(instance) { - this.isSVGTag = isSVGTag(instance.tagName); - super.mount(instance); - } - } - - const numVariantProps = variantProps.length; - /** - * Get variant context from a visual element's parent chain. - * Uses `any` type for visualElement to avoid circular dependencies. - */ - function getVariantContext(visualElement) { - if (!visualElement) - return undefined; - if (!visualElement.isControllingVariants) { - const context = visualElement.parent - ? getVariantContext(visualElement.parent) || {} - : {}; - if (visualElement.props.initial !== undefined) { - context.initial = visualElement.props.initial; - } - return context; - } - const context = {}; - for (let i = 0; i < numVariantProps; i++) { - const name = variantProps[i]; - const prop = visualElement.props[name]; - if (isVariantLabel(prop) || prop === false) { - context[name] = prop; - } - } - return context; - } - - function shallowCompare(next, prev) { - if (!Array.isArray(prev)) - return false; - const prevLength = prev.length; - if (prevLength !== next.length) - return false; - for (let i = 0; i < prevLength; i++) { - if (prev[i] !== next[i]) - return false; - } - return true; - } - - const reversePriorityOrder = [...variantPriorityOrder].reverse(); - const numAnimationTypes = variantPriorityOrder.length; - function createAnimateFunction(visualElement) { - return (animations) => { - return Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options))); - }; - } - function createAnimationState(visualElement) { - let animate = createAnimateFunction(visualElement); - let state = createState(); - let isInitialRender = true; - /** - * Track whether the animation state has been reset (e.g. via StrictMode - * double-invocation or Suspense unmount/remount). On the first - * animateChanges() call after a reset we need to behave like the initial - * render for variant-inheritance checks, even though isInitialRender is - * already false. - */ - let wasReset = false; - /** - * This function will be used to reduce the animation definitions for - * each active animation type into an object of resolved values for it. - */ - const buildResolvedTypeValues = (type) => (acc, definition) => { - const resolved = resolveVariant(visualElement, definition, type === "exit" - ? visualElement.presenceContext?.custom - : undefined); - if (resolved) { - const { transition, transitionEnd, ...target } = resolved; - acc = { ...acc, ...target, ...transitionEnd }; - } - return acc; - }; - /** - * This just allows us to inject mocked animation functions - * @internal - */ - function setAnimateFunction(makeAnimator) { - animate = makeAnimator(visualElement); - } - /** - * When we receive new props, we need to: - * 1. Create a list of protected keys for each type. This is a directory of - * value keys that are currently being "handled" by types of a higher priority - * so that whenever an animation is played of a given type, these values are - * protected from being animated. - * 2. Determine if an animation type needs animating. - * 3. Determine if any values have been removed from a type and figure out - * what to animate those to. - */ - function animateChanges(changedActiveType) { - const { props } = visualElement; - const context = getVariantContext(visualElement.parent) || {}; - /** - * A list of animations that we'll build into as we iterate through the animation - * types. This will get executed at the end of the function. - */ - const animations = []; - /** - * Keep track of which values have been removed. Then, as we hit lower priority - * animation types, we can check if they contain removed values and animate to that. - */ - const removedKeys = new Set(); - /** - * A dictionary of all encountered keys. This is an object to let us build into and - * copy it without iteration. Each time we hit an animation type we set its protected - * keys - the keys its not allowed to animate - to the latest version of this object. - */ - let encounteredKeys = {}; - /** - * If a variant has been removed at a given index, and this component is controlling - * variant animations, we want to ensure lower-priority variants are forced to animate. - */ - let removedVariantIndex = Infinity; - /** - * Iterate through all animation types in reverse priority order. For each, we want to - * detect which values it's handling and whether or not they've changed (and therefore - * need to be animated). If any values have been removed, we want to detect those in - * lower priority props and flag for animation. - */ - for (let i = 0; i < numAnimationTypes; i++) { - const type = reversePriorityOrder[i]; - const typeState = state[type]; - const prop = props[type] !== undefined - ? props[type] - : context[type]; - const propIsVariant = isVariantLabel(prop); - /** - * If this type has *just* changed isActive status, set activeDelta - * to that status. Otherwise set to null. - */ - const activeDelta = type === changedActiveType ? typeState.isActive : null; - if (activeDelta === false) - removedVariantIndex = i; - /** - * If this prop is an inherited variant, rather than been set directly on the - * component itself, we want to make sure we allow the parent to trigger animations. - * - * TODO: Can probably change this to a !isControllingVariants check - */ - let isInherited = prop === context[type] && - prop !== props[type] && - propIsVariant; - if (isInherited && - (isInitialRender || wasReset) && - visualElement.manuallyAnimateOnMount) { - isInherited = false; - } - /** - * Set all encountered keys so far as the protected keys for this type. This will - * be any key that has been animated or otherwise handled by active, higher-priortiy types. - */ - typeState.protectedKeys = { ...encounteredKeys }; - // Check if we can skip analysing this prop early - if ( - // If it isn't active and hasn't *just* been set as inactive - (!typeState.isActive && activeDelta === null) || - // If we didn't and don't have any defined prop for this animation type - (!prop && !typeState.prevProp) || - // Or if the prop doesn't define an animation - isAnimationControls(prop) || - typeof prop === "boolean") { - continue; - } - /** - * If exit is already active and wasn't just activated, skip - * re-processing to prevent interrupting running exit animations. - * Re-resolving exit with a changed custom value can start new - * value animations that stop the originals, leaving the exit - * animation promise unresolved and the component stuck in the DOM. - */ - if (type === "exit" && typeState.isActive && activeDelta !== true) { - if (typeState.prevResolvedValues) { - encounteredKeys = { - ...encounteredKeys, - ...typeState.prevResolvedValues, - }; - } - continue; - } - /** - * As we go look through the values defined on this type, if we detect - * a changed value or a value that was removed in a higher priority, we set - * this to true and add this prop to the animation list. - */ - const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop); - let shouldAnimateType = variantDidChange || - // If we're making this variant active, we want to always make it active - (type === changedActiveType && - typeState.isActive && - !isInherited && - propIsVariant) || - // If we removed a higher-priority variant (i is in reverse order) - (i > removedVariantIndex && propIsVariant); - let handledRemovedValues = false; - /** - * As animations can be set as variant lists, variants or target objects, we - * coerce everything to an array if it isn't one already - */ - const definitionList = Array.isArray(prop) ? prop : [prop]; - /** - * Build an object of all the resolved values. We'll use this in the subsequent - * animateChanges calls to determine whether a value has changed. - */ - let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {}); - if (activeDelta === false) - resolvedValues = {}; - /** - * Now we need to loop through all the keys in the prev prop and this prop, - * and decide: - * 1. If the value has changed, and needs animating - * 2. If it has been removed, and needs adding to the removedKeys set - * 3. If it has been removed in a higher priority type and needs animating - * 4. If it hasn't been removed in a higher priority but hasn't changed, and - * needs adding to the type's protectedKeys list. - */ - const { prevResolvedValues = {} } = typeState; - const allKeys = { - ...prevResolvedValues, - ...resolvedValues, - }; - const markToAnimate = (key) => { - shouldAnimateType = true; - if (removedKeys.has(key)) { - handledRemovedValues = true; - removedKeys.delete(key); - } - typeState.needsAnimating[key] = true; - const motionValue = visualElement.getValue(key); - if (motionValue) - motionValue.liveStyle = false; - }; - for (const key in allKeys) { - const next = resolvedValues[key]; - const prev = prevResolvedValues[key]; - // If we've already handled this we can just skip ahead - if (encounteredKeys.hasOwnProperty(key)) - continue; - /** - * If the value has changed, we probably want to animate it. - */ - let valueHasChanged = false; - if (isKeyframesTarget(next) && isKeyframesTarget(prev)) { - valueHasChanged = - !shallowCompare(next, prev) || variantDidChange; - } - else { - valueHasChanged = next !== prev; - } - if (valueHasChanged) { - if (next !== undefined && next !== null) { - // If next is defined and doesn't equal prev, it needs animating - markToAnimate(key); - } - else { - // If it's undefined, it's been removed. - removedKeys.add(key); - } - } - else if (next !== undefined && removedKeys.has(key)) { - /** - * If next hasn't changed and it isn't undefined, we want to check if it's - * been removed by a higher priority - */ - markToAnimate(key); - } - else { - /** - * If it hasn't changed, we add it to the list of protected values - * to ensure it doesn't get animated. - */ - typeState.protectedKeys[key] = true; - } - } - /** - * Update the typeState so next time animateChanges is called we can compare the - * latest prop and resolvedValues to these. - */ - typeState.prevProp = prop; - typeState.prevResolvedValues = resolvedValues; - if (typeState.isActive) { - encounteredKeys = { ...encounteredKeys, ...resolvedValues }; - } - if ((isInitialRender || wasReset) && - visualElement.blockInitialAnimation) { - shouldAnimateType = false; - } - /** - * If this is an inherited prop we want to skip this animation - * unless the inherited variants haven't changed on this render. - */ - const willAnimateViaParent = isInherited && variantDidChange; - const needsAnimating = !willAnimateViaParent || handledRemovedValues; - if (shouldAnimateType && needsAnimating) { - animations.push(...definitionList.map((animation) => { - const options = { type }; - /** - * If we're performing the initial animation, but we're not - * rendering at the same time as the variant-controlling parent, - * we want to use the parent's transition to calculate the stagger. - */ - if (typeof animation === "string" && - (isInitialRender || wasReset) && - !willAnimateViaParent && - visualElement.manuallyAnimateOnMount && - visualElement.parent) { - const { parent } = visualElement; - const parentVariant = resolveVariant(parent, animation); - if (parent.enteringChildren && parentVariant) { - const { delayChildren } = parentVariant.transition || {}; - options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren); - } - } - return { - animation: animation, - options, - }; - })); - } - } - /** - * If there are some removed value that haven't been dealt with, - * we need to create a new animation that falls back either to the value - * defined in the style prop, or the last read value. - */ - if (removedKeys.size) { - const fallbackAnimation = {}; - /** - * If the initial prop contains a transition we can use that, otherwise - * allow the animation function to use the visual element's default. - */ - if (typeof props.initial !== "boolean") { - const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial) - ? props.initial[0] - : props.initial); - if (initialTransition && initialTransition.transition) { - fallbackAnimation.transition = initialTransition.transition; - } - } - removedKeys.forEach((key) => { - const fallbackTarget = visualElement.getBaseTarget(key); - const motionValue = visualElement.getValue(key); - if (motionValue) - motionValue.liveStyle = true; - // @ts-expect-error - @mattgperry to figure if we should do something here - fallbackAnimation[key] = fallbackTarget ?? null; - }); - animations.push({ animation: fallbackAnimation }); - } - let shouldAnimate = Boolean(animations.length); - if (isInitialRender && - (props.initial === false || props.initial === props.animate) && - !visualElement.manuallyAnimateOnMount) { - shouldAnimate = false; - } - isInitialRender = false; - wasReset = false; - return shouldAnimate ? animate(animations) : Promise.resolve(); - } - /** - * Change whether a certain animation type is active. - */ - function setActive(type, isActive) { - // If the active state hasn't changed, we can safely do nothing here - if (state[type].isActive === isActive) - return Promise.resolve(); - // Propagate active change to children - visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive)); - state[type].isActive = isActive; - const animations = animateChanges(type); - for (const key in state) { - state[key].protectedKeys = {}; - } - return animations; - } - return { - animateChanges, - setActive, - setAnimateFunction, - getState: () => state, - reset: () => { - state = createState(); - wasReset = true; - }, - }; - } - function checkVariantsDidChange(prev, next) { - if (typeof next === "string") { - return next !== prev; - } - else if (Array.isArray(next)) { - return !shallowCompare(next, prev); - } - return false; - } - function createTypeState(isActive = false) { - return { - isActive, - protectedKeys: {}, - needsAnimating: {}, - prevResolvedValues: {}, - }; - } - function createState() { - return { - animate: createTypeState(true), - whileInView: createTypeState(), - whileHover: createTypeState(), - whileTap: createTypeState(), - whileDrag: createTypeState(), - whileFocus: createTypeState(), - exit: createTypeState(), - }; - } - - /** - * Reset an axis to the provided origin box. - * - * This is a mutative operation. - */ - function copyAxisInto(axis, originAxis) { - axis.min = originAxis.min; - axis.max = originAxis.max; - } - /** - * Reset a box to the provided origin box. - * - * This is a mutative operation. - */ - function copyBoxInto(box, originBox) { - copyAxisInto(box.x, originBox.x); - copyAxisInto(box.y, originBox.y); - } - /** - * Reset a delta to the provided origin box. - * - * This is a mutative operation. - */ - function copyAxisDeltaInto(delta, originDelta) { - delta.translate = originDelta.translate; - delta.scale = originDelta.scale; - delta.originPoint = originDelta.originPoint; - delta.origin = originDelta.origin; - } - - const SCALE_PRECISION = 0.0001; - const SCALE_MIN = 1 - SCALE_PRECISION; - const SCALE_MAX = 1 + SCALE_PRECISION; - const TRANSLATE_PRECISION = 0.01; - const TRANSLATE_MIN = 0 - TRANSLATE_PRECISION; - const TRANSLATE_MAX = 0 + TRANSLATE_PRECISION; - function calcLength(axis) { - return axis.max - axis.min; - } - function isNear(value, target, maxDistance) { - return Math.abs(value - target) <= maxDistance; - } - function calcAxisDelta(delta, source, target, origin = 0.5) { - delta.origin = origin; - delta.originPoint = mixNumber$1(source.min, source.max, delta.origin); - delta.scale = calcLength(target) / calcLength(source); - delta.translate = - mixNumber$1(target.min, target.max, delta.origin) - delta.originPoint; - if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) || - isNaN(delta.scale)) { - delta.scale = 1.0; - } - if ((delta.translate >= TRANSLATE_MIN && - delta.translate <= TRANSLATE_MAX) || - isNaN(delta.translate)) { - delta.translate = 0.0; - } - } - function calcBoxDelta(delta, source, target, origin) { - calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined); - calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined); - } - function calcRelativeAxis(target, relative, parent, anchor = 0) { - const anchorPoint = anchor - ? mixNumber$1(parent.min, parent.max, anchor) - : parent.min; - target.min = anchorPoint + relative.min; - target.max = target.min + calcLength(relative); - } - function calcRelativeBox(target, relative, parent, anchor) { - calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x); - calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y); - } - function calcRelativeAxisPosition(target, layout, parent, anchor = 0) { - const anchorPoint = anchor - ? mixNumber$1(parent.min, parent.max, anchor) - : parent.min; - target.min = layout.min - anchorPoint; - target.max = target.min + calcLength(layout); - } - function calcRelativePosition(target, layout, parent, anchor) { - calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x); - calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y); - } - - /** - * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse - */ - function removePointDelta(point, translate, scale, originPoint, boxScale) { - point -= translate; - point = scalePoint(point, 1 / scale, originPoint); - if (boxScale !== undefined) { - point = scalePoint(point, 1 / boxScale, originPoint); - } - return point; - } - /** - * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse - */ - function removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) { - if (percent.test(translate)) { - translate = parseFloat(translate); - const relativeProgress = mixNumber$1(sourceAxis.min, sourceAxis.max, translate / 100); - translate = relativeProgress - sourceAxis.min; - } - if (typeof translate !== "number") - return; - let originPoint = mixNumber$1(originAxis.min, originAxis.max, origin); - if (axis === originAxis) - originPoint -= translate; - axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale); - axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale); - } - /** - * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ - function removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) { - removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis); - } - /** - * The names of the motion values we want to apply as translation, scale and origin. - */ - const xKeys = ["x", "scaleX", "originX"]; - const yKeys = ["y", "scaleY", "originY"]; - /** - * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ - function removeBoxTransforms(box, transforms, originBox, sourceBox) { - removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined); - removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined); - } - - function isAxisDeltaZero(delta) { - return delta.translate === 0 && delta.scale === 1; - } - function isDeltaZero(delta) { - return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y); - } - function axisEquals(a, b) { - return a.min === b.min && a.max === b.max; - } - function boxEquals(a, b) { - return axisEquals(a.x, b.x) && axisEquals(a.y, b.y); - } - function axisEqualsRounded(a, b) { - return (Math.round(a.min) === Math.round(b.min) && - Math.round(a.max) === Math.round(b.max)); - } - function boxEqualsRounded(a, b) { - return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y); - } - function aspectRatio(box) { - return calcLength(box.x) / calcLength(box.y); - } - function axisDeltaEquals(a, b) { - return (a.translate === b.translate && - a.scale === b.scale && - a.originPoint === b.originPoint); - } - - function eachAxis(callback) { - return [callback("x"), callback("y")]; - } - - function buildProjectionTransform(delta, treeScale, latestTransform) { - let transform = ""; - /** - * The translations we use to calculate are always relative to the viewport coordinate space. - * But when we apply scales, we also scale the coordinate space of an element and its children. - * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need - * to move an element 100 pixels, we actually need to move it 200 in within that scaled space. - */ - const xTranslate = delta.x.translate / treeScale.x; - const yTranslate = delta.y.translate / treeScale.y; - const zTranslate = latestTransform?.z || 0; - if (xTranslate || yTranslate || zTranslate) { - transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `; - } - /** - * Apply scale correction for the tree transform. - * This will apply scale to the screen-orientated axes. - */ - if (treeScale.x !== 1 || treeScale.y !== 1) { - transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `; - } - if (latestTransform) { - const { transformPerspective, rotate, pathRotation, rotateX, rotateY, skewX, skewY, } = latestTransform; - if (transformPerspective) - transform = `perspective(${transformPerspective}px) ${transform}`; - if (rotate) - transform += `rotate(${rotate}deg) `; - // Additive `rotate()` so user `rotate` isn't clobbered. - if (pathRotation) - transform += `rotate(${pathRotation}deg) `; - if (rotateX) - transform += `rotateX(${rotateX}deg) `; - if (rotateY) - transform += `rotateY(${rotateY}deg) `; - if (skewX) - transform += `skewX(${skewX}deg) `; - if (skewY) - transform += `skewY(${skewY}deg) `; - } - /** - * Apply scale to match the size of the element to the size we want it. - * This will apply scale to the element-orientated axes. - */ - const elementScaleX = delta.x.scale * treeScale.x; - const elementScaleY = delta.y.scale * treeScale.y; - if (elementScaleX !== 1 || elementScaleY !== 1) { - transform += `scale(${elementScaleX}, ${elementScaleY})`; - } - return transform || "none"; - } - - const borderLabels = [ - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomLeftRadius", - "borderBottomRightRadius", - ]; - const numBorders = borderLabels.length; - const asNumber = (value) => typeof value === "string" ? parseFloat(value) : value; - const isPx = (value) => typeof value === "number" || px.test(value); - function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) { - if (shouldCrossfadeOpacity) { - target.opacity = mixNumber$1(0, lead.opacity ?? 1, easeCrossfadeIn(progress)); - target.opacityExit = mixNumber$1(follow.opacity ?? 1, 0, easeCrossfadeOut(progress)); - } - else if (isOnlyMember) { - target.opacity = mixNumber$1(follow.opacity ?? 1, lead.opacity ?? 1, progress); - } - /** - * Mix border radius - */ - for (let i = 0; i < numBorders; i++) { - const borderLabel = borderLabels[i]; - let followRadius = getRadius(follow, borderLabel); - let leadRadius = getRadius(lead, borderLabel); - if (followRadius === undefined && leadRadius === undefined) - continue; - followRadius || (followRadius = 0); - leadRadius || (leadRadius = 0); - const canMix = followRadius === 0 || - leadRadius === 0 || - isPx(followRadius) === isPx(leadRadius); - if (canMix) { - target[borderLabel] = Math.max(mixNumber$1(asNumber(followRadius), asNumber(leadRadius), progress), 0); - if (percent.test(leadRadius) || percent.test(followRadius)) { - target[borderLabel] += "%"; - } - } - else { - target[borderLabel] = leadRadius; - } - } - /** - * Mix rotation - */ - if (follow.rotate || lead.rotate) { - target.rotate = mixNumber$1(follow.rotate || 0, lead.rotate || 0, progress); - } - } - function getRadius(values, radiusName) { - return values[radiusName] !== undefined - ? values[radiusName] - : values.borderRadius; - } - const easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, motionUtils.circOut); - const easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, motionUtils.noop); - function compress(min, max, easing) { - return (p) => { - // Could replace ifs with clamp - if (p < min) - return 0; - if (p > max) - return 1; - return easing(motionUtils.progress(min, max, p)); - }; - } - - function animateSingleValue(value, keyframes, options) { - const motionValue$1 = isMotionValue(value) ? value : motionValue(value); - motionValue$1.start(animateMotionValue("", motionValue$1, keyframes, options)); - return motionValue$1.animation; - } - - function addDomEvent(target, eventName, handler, options = { passive: true }) { - target.addEventListener(eventName, handler, options); - return () => target.removeEventListener(eventName, handler); - } - - const compareByDepth = (a, b) => a.depth - b.depth; - - class FlatTree { - constructor() { - this.children = []; - this.isDirty = false; - } - add(child) { - motionUtils.addUniqueItem(this.children, child); - this.isDirty = true; - } - remove(child) { - motionUtils.removeItem(this.children, child); - this.isDirty = true; - } - forEach(callback) { - this.isDirty && this.children.sort(compareByDepth); - this.isDirty = false; - this.children.forEach(callback); - } - } - - /** - * Timeout defined in ms - */ - function delay(callback, timeout) { - const start = time.now(); - const checkElapsed = ({ timestamp }) => { - const elapsed = timestamp - start; - if (elapsed >= timeout) { - cancelFrame(checkElapsed); - callback(elapsed - timeout); - } - }; - frame.setup(checkElapsed, true); - return () => cancelFrame(checkElapsed); - } - function delayInSeconds(callback, timeout) { - return delay(callback, motionUtils.secondsToMilliseconds(timeout)); - } - - /** - * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself - */ - function resolveMotionValue(value) { - return isMotionValue(value) ? value.get() : value; - } - - class NodeStack { - constructor() { - this.members = []; - } - add(node) { - motionUtils.addUniqueItem(this.members, node); - for (let i = this.members.length - 1; i >= 0; i--) { - const member = this.members[i]; - if (member === node || member === this.lead || member === this.prevLead) - continue; - const inst = member.instance; - if ((!inst || inst.isConnected === false) && !member.snapshot) { - motionUtils.removeItem(this.members, member); - member.unmount(); - } - } - node.scheduleRender(); - } - remove(node) { - motionUtils.removeItem(this.members, node); - if (node === this.prevLead) - this.prevLead = undefined; - if (node === this.lead) { - const prevLead = this.members[this.members.length - 1]; - if (prevLead) - this.promote(prevLead); - } - } - relegate(node) { - for (let i = this.members.indexOf(node) - 1; i >= 0; i--) { - const member = this.members[i]; - if (member.isPresent !== false && member.instance?.isConnected !== false) { - this.promote(member); - return true; - } - } - return false; - } - promote(node, preserveFollowOpacity) { - const prevLead = this.lead; - if (node === prevLead) - return; - this.prevLead = prevLead; - this.lead = node; - node.show(); - if (prevLead) { - prevLead.updateSnapshot(); - node.scheduleRender(); - const { layoutDependency: prevDep } = prevLead.options; - const { layoutDependency: nextDep } = node.options; - if (prevDep === undefined || prevDep !== nextDep) { - node.resumeFrom = prevLead; - if (preserveFollowOpacity) - prevLead.preserveOpacity = true; - if (prevLead.snapshot) { - node.snapshot = prevLead.snapshot; - node.snapshot.latestValues = - prevLead.animationValues || prevLead.latestValues; - } - if (node.root?.isUpdating) - node.isLayoutDirty = true; - } - if (node.options.crossfade === false) - prevLead.hide(); - } - } - exitAnimationComplete() { - this.members.forEach((member) => { - member.options.onExitComplete?.(); - member.resumingFrom?.options.onExitComplete?.(); - }); - } - scheduleRender() { - this.members.forEach((member) => member.instance && member.scheduleRender(false)); - } - removeLeadSnapshot() { - if (this.lead?.snapshot) - this.lead.snapshot = undefined; - } - } - - /** - * This should only ever be modified on the client otherwise it'll - * persist through server requests. If we need instanced states we - * could lazy-init via root. - */ - const globalProjectionState = { - /** - * Global flag as to whether the tree has animated since the last time - * we resized the window - */ - hasAnimatedSinceResize: true, - /** - * We set this to true once, on the first update. Any nodes added to the tree beyond that - * update will be given a `data-projection-id` attribute. - */ - hasEverUpdated: false, - }; - - const metrics = { - nodes: 0, - calculatedTargetDeltas: 0, - calculatedProjections: 0, - }; - const transformAxes = ["", "X", "Y", "Z"]; - /** - * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1 - * which has a noticeable difference in spring animations - */ - const animationTarget = 1000; - let id = 0; - function resetDistortingTransform(key, visualElement, values, sharedAnimationValues) { - const { latestValues } = visualElement; - // Record the distorting transform and then temporarily set it to 0 - if (latestValues[key]) { - values[key] = latestValues[key]; - visualElement.setStaticValue(key, 0); - if (sharedAnimationValues) { - sharedAnimationValues[key] = 0; - } - } - } - function cancelTreeOptimisedTransformAnimations(projectionNode) { - projectionNode.hasCheckedOptimisedAppear = true; - if (projectionNode.root === projectionNode) - return; - const { visualElement } = projectionNode.options; - if (!visualElement) - return; - const appearId = getOptimisedAppearId(visualElement); - if (window.MotionHasOptimisedAnimation(appearId, "transform")) { - const { layout, layoutId } = projectionNode.options; - window.MotionCancelOptimisedAnimation(appearId, "transform", frame, !(layout || layoutId)); - } - const { parent } = projectionNode; - if (parent && !parent.hasCheckedOptimisedAppear) { - cancelTreeOptimisedTransformAnimations(parent); - } - } - function createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) { - return class ProjectionNode { - constructor(latestValues = {}, parent = defaultParent?.()) { - /** - * A unique ID generated for every projection node. - */ - this.id = id++; - /** - * An id that represents a unique session instigated by startUpdate. - */ - this.animationId = 0; - this.animationCommitId = 0; - /** - * A Set containing all this component's children. This is used to iterate - * through the children. - * - * TODO: This could be faster to iterate as a flat array stored on the root node. - */ - this.children = new Set(); - /** - * Options for the node. We use this to configure what kind of layout animations - * we should perform (if any). - */ - this.options = {}; - /** - * We use this to detect when its safe to shut down part of a projection tree. - * We have to keep projecting children for scale correction and relative projection - * until all their parents stop performing layout animations. - */ - this.isTreeAnimating = false; - this.isAnimationBlocked = false; - /** - * Flag to true if we think this layout has been changed. We can't always know this, - * currently we set it to true every time a component renders, or if it has a layoutDependency - * if that has changed between renders. Additionally, components can be grouped by LayoutGroup - * and if one node is dirtied, they all are. - */ - this.isLayoutDirty = false; - /** - * Flag to true if we think the projection calculations for this node needs - * recalculating as a result of an updated transform or layout animation. - */ - this.isProjectionDirty = false; - /** - * Flag to true if the layout *or* transform has changed. This then gets propagated - * throughout the projection tree, forcing any element below to recalculate on the next frame. - */ - this.isSharedProjectionDirty = false; - /** - * Flag transform dirty. This gets propagated throughout the whole tree but is only - * respected by shared nodes. - */ - this.isTransformDirty = false; - /** - * Block layout updates for instant layout transitions throughout the tree. - */ - this.updateManuallyBlocked = false; - this.updateBlockedByResize = false; - /** - * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate` - * call. - */ - this.isUpdating = false; - /** - * If this is an SVG element we currently disable projection transforms - */ - this.isSVG = false; - /** - * Flag to true (during promotion) if a node doing an instant layout transition needs to reset - * its projection styles. - */ - this.needsReset = false; - /** - * Flags whether this node should have its transform reset prior to measuring. - */ - this.shouldResetTransform = false; - /** - * Store whether this node has been checked for optimised appear animations. As - * effects fire bottom-up, and we want to look up the tree for appear animations, - * this makes sure we only check each path once, stopping at nodes that - * have already been checked. - */ - this.hasCheckedOptimisedAppear = false; - /** - * An object representing the calculated contextual/accumulated/tree scale. - * This will be used to scale calculcated projection transforms, as these are - * calculated in screen-space but need to be scaled for elements to layoutly - * make it to their calculated destinations. - * - * TODO: Lazy-init - */ - this.treeScale = { x: 1, y: 1 }; - /** - * - */ - this.eventHandlers = new Map(); - this.hasTreeAnimated = false; - this.layoutVersion = 0; - // Note: Currently only running on root node - this.updateScheduled = false; - this.scheduleUpdate = () => this.update(); - this.projectionUpdateScheduled = false; - this.checkUpdateFailed = () => { - if (this.isUpdating) { - this.isUpdating = false; - this.clearAllSnapshots(); - } - }; - /** - * This is a multi-step process as shared nodes might be of different depths. Nodes - * are sorted by depth order, so we need to resolve the entire tree before moving to - * the next step. - */ - this.updateProjection = () => { - this.projectionUpdateScheduled = false; - /** - * Reset debug counts. Manually resetting rather than creating a new - * object each frame. - */ - if (statsBuffer.value) { - metrics.nodes = - metrics.calculatedTargetDeltas = - metrics.calculatedProjections = - 0; - } - this.nodes.forEach(propagateDirtyNodes); - this.nodes.forEach(resolveTargetDelta); - this.nodes.forEach(calcProjection); - this.nodes.forEach(cleanDirtyNodes); - if (statsBuffer.addProjectionMetrics) { - statsBuffer.addProjectionMetrics(metrics); - } - }; - /** - * Frame calculations - */ - this.resolvedRelativeTargetAt = 0.0; - this.linkedParentVersion = 0; - this.hasProjected = false; - this.isVisible = true; - this.animationProgress = 0; - /** - * Shared layout - */ - // TODO Only running on root node - this.sharedNodes = new Map(); - this.latestValues = latestValues; - this.root = parent ? parent.root || parent : this; - this.path = parent ? [...parent.path, parent] : []; - this.parent = parent; - this.depth = parent ? parent.depth + 1 : 0; - for (let i = 0; i < this.path.length; i++) { - this.path[i].shouldResetTransform = true; - } - if (this.root === this) - this.nodes = new FlatTree(); - } - addEventListener(name, handler) { - if (!this.eventHandlers.has(name)) { - this.eventHandlers.set(name, new motionUtils.SubscriptionManager()); - } - return this.eventHandlers.get(name).add(handler); - } - notifyListeners(name, ...args) { - const subscriptionManager = this.eventHandlers.get(name); - subscriptionManager && subscriptionManager.notify(...args); - } - hasListeners(name) { - return this.eventHandlers.has(name); - } - /** - * Lifecycles - */ - mount(instance) { - if (this.instance) - return; - this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance); - this.instance = instance; - const { layoutId, layout, visualElement } = this.options; - if (visualElement && !visualElement.current) { - visualElement.mount(instance); - } - this.root.nodes.add(this); - this.parent && this.parent.children.add(this); - if (this.root.hasTreeAnimated && (layout || layoutId)) { - this.isLayoutDirty = true; - } - if (attachResizeListener) { - let cancelDelay; - let innerWidth = 0; - const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false); - // Set initial innerWidth in a frame.read callback to batch the read - frame.read(() => { - innerWidth = window.innerWidth; - }); - attachResizeListener(instance, () => { - const newInnerWidth = window.innerWidth; - if (newInnerWidth === innerWidth) - return; - innerWidth = newInnerWidth; - this.root.updateBlockedByResize = true; - cancelDelay && cancelDelay(); - cancelDelay = delay(resizeUnblockUpdate, 250); - if (globalProjectionState.hasAnimatedSinceResize) { - globalProjectionState.hasAnimatedSinceResize = false; - this.nodes.forEach(finishAnimation); - } - }); - } - if (layoutId) { - this.root.registerSharedNode(layoutId, this); - } - // Only register the handler if it requires layout animation - if (this.options.animate !== false && - visualElement && - (layoutId || layout)) { - this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout, }) => { - if (this.isTreeAnimationBlocked()) { - this.target = undefined; - this.relativeTarget = undefined; - return; - } - // TODO: Check here if an animation exists - const layoutTransition = this.options.transition || - visualElement.getDefaultTransition() || - defaultLayoutTransition; - const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps(); - /** - * The target layout of the element might stay the same, - * but its position relative to its parent has changed. - */ - const hasTargetChanged = !this.targetLayout || - !boxEqualsRounded(this.targetLayout, newLayout); - /* - * Note: Disabled to fix relative animations always triggering new - * layout animations. If this causes further issues, we can try - * a different approach to detecting relative target changes. - */ - // || hasRelativeLayoutChanged - /** - * If the layout hasn't seemed to have changed, it might be that the - * element is visually in the same place in the document but its position - * relative to its parent has indeed changed. So here we check for that. - */ - const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged; - if (this.options.layoutRoot || - this.resumeFrom || - hasOnlyRelativeTargetChanged || - (hasLayoutChanged && - (hasTargetChanged || !this.currentAnimation))) { - if (this.resumeFrom) { - this.resumingFrom = this.resumeFrom; - this.resumingFrom.resumingFrom = undefined; - } - const animationOptions = { - ...getValueTransition(layoutTransition, "layout"), - onPlay: onLayoutAnimationStart, - onComplete: onLayoutAnimationComplete, - }; - if (visualElement.shouldReduceMotion || - this.options.layoutRoot) { - animationOptions.delay = 0; - animationOptions.type = false; - } - this.startAnimation(animationOptions); - /** - * Set animation origin after starting animation to avoid layout jump - * caused by stopping previous layout animation - */ - this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged, animationOptions - .path); - } - else { - /** - * If the layout hasn't changed and we have an animation that hasn't started yet, - * finish it immediately. Otherwise it will be animating from a location - * that was probably never committed to screen and look like a jumpy box. - */ - if (!hasLayoutChanged) { - finishAnimation(this); - } - if (this.isLead() && this.options.onExitComplete) { - this.options.onExitComplete(); - } - } - this.targetLayout = newLayout; - }); - } - } - unmount() { - this.options.layoutId && this.willUpdate(); - this.root.nodes.remove(this); - const stack = this.getStack(); - stack && stack.remove(this); - this.parent && this.parent.children.delete(this); - this.instance = undefined; - this.eventHandlers.clear(); - cancelFrame(this.updateProjection); - } - // only on the root - blockUpdate() { - this.updateManuallyBlocked = true; - } - unblockUpdate() { - this.updateManuallyBlocked = false; - } - isUpdateBlocked() { - return this.updateManuallyBlocked || this.updateBlockedByResize; - } - isTreeAnimationBlocked() { - return (this.isAnimationBlocked || - (this.parent && this.parent.isTreeAnimationBlocked()) || - false); - } - // Note: currently only running on root node - startUpdate() { - if (this.isUpdateBlocked()) - return; - this.isUpdating = true; - this.nodes && this.nodes.forEach(resetSkewAndRotation); - this.animationId++; - } - getTransformTemplate() { - const { visualElement } = this.options; - return visualElement && visualElement.getProps().transformTemplate; - } - willUpdate(shouldNotifyListeners = true) { - this.root.hasTreeAnimated = true; - if (this.root.isUpdateBlocked()) { - this.options.onExitComplete && this.options.onExitComplete(); - return; - } - /** - * If we're running optimised appear animations then these must be - * cancelled before measuring the DOM. This is so we can measure - * the true layout of the element rather than the WAAPI animation - * which will be unaffected by the resetSkewAndRotate step. - * - * Note: This is a DOM write. Worst case scenario is this is sandwiched - * between other snapshot reads which will cause unnecessary style recalculations. - * This has to happen here though, as we don't yet know which nodes will need - * snapshots in startUpdate(), but we only want to cancel optimised animations - * if a layout animation measurement is actually going to be affected by them. - */ - if (window.MotionCancelOptimisedAnimation && - !this.hasCheckedOptimisedAppear) { - cancelTreeOptimisedTransformAnimations(this); - } - !this.root.isUpdating && this.root.startUpdate(); - if (this.isLayoutDirty) - return; - this.isLayoutDirty = true; - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - node.shouldResetTransform = true; - /** - * Percentage translates resolve against layoutBox dimensions, - * so ancestors with them must be re-measured after transform reset. - */ - if (typeof node.latestValues.x === "string" || - typeof node.latestValues.y === "string") { - node.isLayoutDirty = true; - } - node.updateScroll("snapshot"); - if (node.options.layoutRoot) { - node.willUpdate(false); - } - } - const { layoutId, layout } = this.options; - if (layoutId === undefined && !layout) - return; - const transformTemplate = this.getTransformTemplate(); - this.prevTransformTemplateValue = transformTemplate - ? transformTemplate(this.latestValues, "") - : undefined; - this.updateSnapshot(); - shouldNotifyListeners && this.notifyListeners("willUpdate"); - } - update() { - this.updateScheduled = false; - const updateWasBlocked = this.isUpdateBlocked(); - // When doing an instant transition, we skip the layout update, - // but should still clean up the measurements so that the next - // snapshot could be taken correctly. - if (updateWasBlocked) { - const wasBlockedByResize = this.updateBlockedByResize; - this.unblockUpdate(); - this.updateBlockedByResize = false; - this.clearAllSnapshots(); - /** - * When blocked by resize, still measure layouts so - * callbacks like onLayoutMeasure fire (e.g. Reorder). - * Skip notifyLayoutUpdate to prevent animations. - */ - if (wasBlockedByResize) { - this.nodes.forEach(forceLayoutMeasure); - } - this.nodes.forEach(clearMeasurements); - return; - } - /** - * If this is a repeat of didUpdate then ignore the animation. - */ - if (this.animationId <= this.animationCommitId) { - this.nodes.forEach(clearIsLayoutDirty); - return; - } - this.animationCommitId = this.animationId; - if (!this.isUpdating) { - this.nodes.forEach(clearIsLayoutDirty); - } - else { - this.isUpdating = false; - /** - * Ensure animation-blocked nodes (e.g. during drag) - * get measured even when memoized (willUpdate skipped). - */ - this.nodes.forEach(ensureDraggedNodesSnapshotted); - /** - * Write - */ - this.nodes.forEach(resetTransformStyle); - /** - * Read ================== - */ - // Update layout measurements of updated children - this.nodes.forEach(updateLayout); - /** - * Write - */ - // Notify listeners that the layout is updated - this.nodes.forEach(notifyLayoutUpdate); - } - this.clearAllSnapshots(); - /** - * Manually flush any pending updates. Ideally - * we could leave this to the following requestAnimationFrame but this seems - * to leave a flash of incorrectly styled content. - */ - const now = time.now(); - frameData.delta = motionUtils.clamp(0, 1000 / 60, now - frameData.timestamp); - frameData.timestamp = now; - frameData.isProcessing = true; - frameSteps.update.process(frameData); - frameSteps.preRender.process(frameData); - frameSteps.render.process(frameData); - frameData.isProcessing = false; - } - didUpdate() { - if (!this.updateScheduled) { - this.updateScheduled = true; - microtask.read(this.scheduleUpdate); - } - } - clearAllSnapshots() { - this.nodes.forEach(clearSnapshot); - this.sharedNodes.forEach(removeLeadSnapshots); - } - scheduleUpdateProjection() { - if (!this.projectionUpdateScheduled) { - this.projectionUpdateScheduled = true; - frame.preRender(this.updateProjection, false, true); - } - } - scheduleCheckAfterUnmount() { - /** - * If the unmounting node is in a layoutGroup and did trigger a willUpdate, - * we manually call didUpdate to give a chance to the siblings to animate. - * Otherwise, cleanup all snapshots to prevents future nodes from reusing them. - */ - frame.postRender(() => { - if (this.isLayoutDirty) { - this.root.didUpdate(); - } - else { - this.root.checkUpdateFailed(); - } - }); - } - /** - * Update measurements - */ - updateSnapshot() { - if (this.snapshot || !this.instance) - return; - this.snapshot = this.measure(); - if (this.snapshot && - !calcLength(this.snapshot.measuredBox.x) && - !calcLength(this.snapshot.measuredBox.y)) { - this.snapshot = undefined; - } - } - updateLayout() { - if (!this.instance) - return; - this.updateScroll(); - if (!(this.options.alwaysMeasureLayout && this.isLead()) && - !this.isLayoutDirty) { - return; - } - /** - * When a node is mounted, it simply resumes from the prevLead's - * snapshot instead of taking a new one, but the ancestors scroll - * might have updated while the prevLead is unmounted. We need to - * update the scroll again to make sure the layout we measure is - * up to date. - */ - if (this.resumeFrom && !this.resumeFrom.instance) { - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - node.updateScroll(); - } - } - const prevLayout = this.layout; - this.layout = this.measure(false); - this.layoutVersion++; - if (!this.layoutCorrected) - this.layoutCorrected = createBox(); - this.isLayoutDirty = false; - this.projectionDelta = undefined; - this.notifyListeners("measure", this.layout.layoutBox); - const { visualElement } = this.options; - visualElement && - visualElement.notify("LayoutMeasure", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined); - } - updateScroll(phase = "measure") { - let needsMeasurement = Boolean(this.options.layoutScroll && this.instance); - if (this.scroll && - this.scroll.animationId === this.root.animationId && - this.scroll.phase === phase) { - needsMeasurement = false; - } - if (needsMeasurement && this.instance) { - const isRoot = checkIsScrollRoot(this.instance); - this.scroll = { - animationId: this.root.animationId, - phase, - isRoot, - offset: measureScroll(this.instance), - wasRoot: this.scroll ? this.scroll.isRoot : isRoot, - }; - } - } - resetTransform() { - if (!resetTransform) - return; - const isResetRequested = this.isLayoutDirty || - this.shouldResetTransform || - this.options.alwaysMeasureLayout; - const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta); - const transformTemplate = this.getTransformTemplate(); - const transformTemplateValue = transformTemplate - ? transformTemplate(this.latestValues, "") - : undefined; - const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue; - if (isResetRequested && - this.instance && - (hasProjection || - hasTransform(this.latestValues) || - transformTemplateHasChanged)) { - resetTransform(this.instance, transformTemplateValue); - this.shouldResetTransform = false; - this.scheduleRender(); - } - } - measure(removeTransform = true) { - const pageBox = this.measurePageBox(); - let layoutBox = this.removeElementScroll(pageBox); - /** - * Measurements taken during the pre-render stage - * still have transforms applied so we remove them - * via calculation. - */ - if (removeTransform) { - layoutBox = this.removeTransform(layoutBox); - } - roundBox(layoutBox); - return { - animationId: this.root.animationId, - measuredBox: pageBox, - layoutBox, - latestValues: {}, - source: this.id, - }; - } - measurePageBox() { - const { visualElement } = this.options; - if (!visualElement) - return createBox(); - const box = visualElement.measureViewportBox(); - const wasInScrollRoot = this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot); - if (!wasInScrollRoot) { - // Remove viewport scroll to give page-relative coordinates - const { scroll } = this.root; - if (scroll) { - translateAxis(box.x, scroll.offset.x); - translateAxis(box.y, scroll.offset.y); - } - } - return box; - } - removeElementScroll(box) { - const boxWithoutScroll = createBox(); - copyBoxInto(boxWithoutScroll, box); - if (this.scroll?.wasRoot) { - return boxWithoutScroll; - } - /** - * Performance TODO: Keep a cumulative scroll offset down the tree - * rather than loop back up the path. - */ - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - const { scroll, options } = node; - if (node !== this.root && scroll && options.layoutScroll) { - /** - * If this is a new scroll root, we want to remove all previous scrolls - * from the viewport box. - */ - if (scroll.wasRoot) { - copyBoxInto(boxWithoutScroll, box); - } - translateAxis(boxWithoutScroll.x, scroll.offset.x); - translateAxis(boxWithoutScroll.y, scroll.offset.y); - } - } - return boxWithoutScroll; - } - applyTransform(box, transformOnly = false, output) { - const withTransforms = output || createBox(); - copyBoxInto(withTransforms, box); - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - if (!transformOnly && - node.options.layoutScroll && - node.scroll && - node !== node.root) { - translateAxis(withTransforms.x, -node.scroll.offset.x); - translateAxis(withTransforms.y, -node.scroll.offset.y); - } - if (!hasTransform(node.latestValues)) - continue; - transformBox(withTransforms, node.latestValues, node.layout?.layoutBox); - } - if (hasTransform(this.latestValues)) { - transformBox(withTransforms, this.latestValues, this.layout?.layoutBox); - } - return withTransforms; - } - removeTransform(box) { - const boxWithoutTransform = createBox(); - copyBoxInto(boxWithoutTransform, box); - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - if (!hasTransform(node.latestValues)) - continue; - let sourceBox; - if (node.instance) { - hasScale(node.latestValues) && node.updateSnapshot(); - sourceBox = createBox(); - copyBoxInto(sourceBox, node.measurePageBox()); - } - removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot?.layoutBox, sourceBox); - } - if (hasTransform(this.latestValues)) { - removeBoxTransforms(boxWithoutTransform, this.latestValues); - } - return boxWithoutTransform; - } - setTargetDelta(delta) { - this.targetDelta = delta; - this.root.scheduleUpdateProjection(); - this.isProjectionDirty = true; - } - setOptions(options) { - this.options = { - ...this.options, - ...options, - crossfade: options.crossfade !== undefined ? options.crossfade : true, - }; - } - clearMeasurements() { - this.scroll = undefined; - this.layout = undefined; - this.snapshot = undefined; - this.prevTransformTemplateValue = undefined; - this.targetDelta = undefined; - this.target = undefined; - this.isLayoutDirty = false; - } - forceRelativeParentToResolveTarget() { - if (!this.relativeParent) - return; - /** - * If the parent target isn't up-to-date, force it to update. - * This is an unfortunate de-optimisation as it means any updating relative - * projection will cause all the relative parents to recalculate back - * up the tree. - */ - if (this.relativeParent.resolvedRelativeTargetAt !== - frameData.timestamp) { - this.relativeParent.resolveTargetDelta(true); - } - } - resolveTargetDelta(forceRecalculation = false) { - /** - * Once the dirty status of nodes has been spread through the tree, we also - * need to check if we have a shared node of a different depth that has itself - * been dirtied. - */ - const lead = this.getLead(); - this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty); - this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty); - this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty); - const isShared = Boolean(this.resumingFrom) || this !== lead; - /** - * We don't use transform for this step of processing so we don't - * need to check whether any nodes have changed transform. - */ - const canSkip = !(forceRecalculation || - (isShared && this.isSharedProjectionDirty) || - this.isProjectionDirty || - this.parent?.isProjectionDirty || - this.attemptToResolveRelativeTarget || - this.root.updateBlockedByResize); - if (canSkip) - return; - const { layout, layoutId } = this.options; - /** - * If we have no layout, we can't perform projection, so early return - */ - if (!this.layout || !(layout || layoutId)) - return; - this.resolvedRelativeTargetAt = frameData.timestamp; - const relativeParent = this.getClosestProjectingParent(); - if (relativeParent && - this.linkedParentVersion !== relativeParent.layoutVersion && - !relativeParent.options.layoutRoot) { - this.removeRelativeTarget(); - } - /** - * If we don't have a targetDelta but do have a layout, we can attempt to resolve - * a relativeParent. This will allow a component to perform scale correction - * even if no animation has started. - */ - if (!this.targetDelta && !this.relativeTarget) { - if (this.options.layoutAnchor !== false && - relativeParent && - relativeParent.layout) { - this.createRelativeTarget(relativeParent, this.layout.layoutBox, relativeParent.layout.layoutBox); - } - else { - this.removeRelativeTarget(); - } - } - /** - * If we have no relative target or no target delta our target isn't valid - * for this frame. - */ - if (!this.relativeTarget && !this.targetDelta) - return; - /** - * Lazy-init target data structure - */ - if (!this.target) { - this.target = createBox(); - this.targetWithTransforms = createBox(); - } - /** - * If we've got a relative box for this component, resolve it into a target relative to the parent. - */ - if (this.relativeTarget && - this.relativeTargetOrigin && - this.relativeParent && - this.relativeParent.target) { - this.forceRelativeParentToResolveTarget(); - calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || undefined); - /** - * If we've only got a targetDelta, resolve it into a target - */ - } - else if (this.targetDelta) { - if (Boolean(this.resumingFrom)) { - this.applyTransform(this.layout.layoutBox, false, this.target); - } - else { - copyBoxInto(this.target, this.layout.layoutBox); - } - applyBoxDelta(this.target, this.targetDelta); - } - else { - /** - * If no target, use own layout as target - */ - copyBoxInto(this.target, this.layout.layoutBox); - } - /** - * If we've been told to attempt to resolve a relative target, do so. - */ - if (this.attemptToResolveRelativeTarget) { - this.attemptToResolveRelativeTarget = false; - if (this.options.layoutAnchor !== false && - relativeParent && - Boolean(relativeParent.resumingFrom) === - Boolean(this.resumingFrom) && - !relativeParent.options.layoutScroll && - relativeParent.target && - this.animationProgress !== 1) { - this.createRelativeTarget(relativeParent, this.target, relativeParent.target); - } - else { - this.relativeParent = this.relativeTarget = undefined; - } - } - /** - * Increase debug counter for resolved target deltas - */ - if (statsBuffer.value) { - metrics.calculatedTargetDeltas++; - } - } - getClosestProjectingParent() { - if (!this.parent || - hasScale(this.parent.latestValues) || - has2DTranslate(this.parent.latestValues)) { - return undefined; - } - if (this.parent.isProjecting()) { - return this.parent; - } - else { - return this.parent.getClosestProjectingParent(); - } - } - isProjecting() { - return Boolean((this.relativeTarget || - this.targetDelta || - this.options.layoutRoot) && - this.layout); - } - createRelativeTarget(relativeParent, layout, parentLayout) { - this.relativeParent = relativeParent; - this.linkedParentVersion = relativeParent.layoutVersion; - this.forceRelativeParentToResolveTarget(); - this.relativeTarget = createBox(); - this.relativeTargetOrigin = createBox(); - calcRelativePosition(this.relativeTargetOrigin, layout, parentLayout, this.options.layoutAnchor || undefined); - copyBoxInto(this.relativeTarget, this.relativeTargetOrigin); - } - removeRelativeTarget() { - this.relativeParent = this.relativeTarget = undefined; - } - calcProjection() { - const lead = this.getLead(); - const isShared = Boolean(this.resumingFrom) || this !== lead; - let canSkip = true; - /** - * If this is a normal layout animation and neither this node nor its nearest projecting - * is dirty then we can't skip. - */ - if (this.isProjectionDirty || this.parent?.isProjectionDirty) { - canSkip = false; - } - /** - * If this is a shared layout animation and this node's shared projection is dirty then - * we can't skip. - */ - if (isShared && - (this.isSharedProjectionDirty || this.isTransformDirty)) { - canSkip = false; - } - /** - * If we have resolved the target this frame we must recalculate the - * projection to ensure it visually represents the internal calculations. - */ - if (this.resolvedRelativeTargetAt === frameData.timestamp) { - canSkip = false; - } - if (canSkip) - return; - const { layout, layoutId } = this.options; - /** - * If this section of the tree isn't animating we can - * delete our target sources for the following frame. - */ - this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) || - this.currentAnimation || - this.pendingAnimation); - if (!this.isTreeAnimating) { - this.targetDelta = this.relativeTarget = undefined; - } - if (!this.layout || !(layout || layoutId)) - return; - /** - * Reset the corrected box with the latest values from box, as we're then going - * to perform mutative operations on it. - */ - copyBoxInto(this.layoutCorrected, this.layout.layoutBox); - /** - * Record previous tree scales before updating. - */ - const prevTreeScaleX = this.treeScale.x; - const prevTreeScaleY = this.treeScale.y; - /** - * Apply all the parent deltas to this box to produce the corrected box. This - * is the layout box, as it will appear on screen as a result of the transforms of its parents. - */ - applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared); - /** - * If this layer needs to perform scale correction but doesn't have a target, - * use the layout as the target. - */ - if (lead.layout && - !lead.target && - (this.treeScale.x !== 1 || this.treeScale.y !== 1)) { - lead.target = lead.layout.layoutBox; - lead.targetWithTransforms = createBox(); - } - const { target } = lead; - if (!target) { - /** - * If we don't have a target to project into, but we were previously - * projecting, we want to remove the stored transform and schedule - * a render to ensure the elements reflect the removed transform. - */ - if (this.prevProjectionDelta) { - this.createProjectionDeltas(); - this.scheduleRender(); - } - return; - } - if (!this.projectionDelta || !this.prevProjectionDelta) { - this.createProjectionDeltas(); - } - else { - copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x); - copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y); - } - /** - * Update the delta between the corrected box and the target box before user-set transforms were applied. - * This will allow us to calculate the corrected borderRadius and boxShadow to compensate - * for our layout reprojection, but still allow them to be scaled correctly by the user. - * It might be that to simplify this we may want to accept that user-set scale is also corrected - * and we wouldn't have to keep and calc both deltas, OR we could support a user setting - * to allow people to choose whether these styles are corrected based on just the - * layout reprojection or the final bounding box. - */ - calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues); - if (this.treeScale.x !== prevTreeScaleX || - this.treeScale.y !== prevTreeScaleY || - !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) || - !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) { - this.hasProjected = true; - this.scheduleRender(); - this.notifyListeners("projectionUpdate", target); - } - /** - * Increase debug counter for recalculated projections - */ - if (statsBuffer.value) { - metrics.calculatedProjections++; - } - } - hide() { - this.isVisible = false; - // TODO: Schedule render - } - show() { - this.isVisible = true; - // TODO: Schedule render - } - scheduleRender(notifyAll = true) { - this.options.visualElement?.scheduleRender(); - if (notifyAll) { - const stack = this.getStack(); - stack && stack.scheduleRender(); - } - if (this.resumingFrom && !this.resumingFrom.instance) { - this.resumingFrom = undefined; - } - } - createProjectionDeltas() { - this.prevProjectionDelta = createDelta(); - this.projectionDelta = createDelta(); - this.projectionDeltaWithTransform = createDelta(); - } - setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false, pathFn) { - const snapshot = this.snapshot; - const snapshotLatestValues = snapshot ? snapshot.latestValues : {}; - const mixedValues = { ...this.latestValues }; - const targetDelta = createDelta(); - if (!this.relativeParent || - !this.relativeParent.options.layoutRoot) { - this.relativeTarget = this.relativeTargetOrigin = undefined; - } - this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged; - const relativeLayout = createBox(); - const snapshotSource = snapshot ? snapshot.source : undefined; - const layoutSource = this.layout ? this.layout.source : undefined; - const isSharedLayoutAnimation = snapshotSource !== layoutSource; - const stack = this.getStack(); - const isOnlyMember = !stack || stack.members.length <= 1; - const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && - !isOnlyMember && - this.options.crossfade === true && - !this.path.some(hasOpacityCrossfade)); - this.animationProgress = 0; - let prevRelativeTarget; - // The path decides whether the layout shift is worth curving - // (distance floor) and resolves the interpolator from the delta. - const interpolate = pathFn?.interpolateProjection(delta); - this.mixTargetDelta = (latest) => { - const progress = latest / 1000; - const point = interpolate?.(progress); - if (point) { - targetDelta.x.translate = point.x; - targetDelta.x.scale = mixNumber$1(delta.x.scale, 1, progress); - targetDelta.x.origin = delta.x.origin; - targetDelta.x.originPoint = delta.x.originPoint; - targetDelta.y.translate = point.y; - targetDelta.y.scale = mixNumber$1(delta.y.scale, 1, progress); - targetDelta.y.origin = delta.y.origin; - targetDelta.y.originPoint = delta.y.originPoint; - } - else { - mixAxisDeltaLinear(targetDelta.x, delta.x, progress); - mixAxisDeltaLinear(targetDelta.y, delta.y, progress); - } - this.setTargetDelta(targetDelta); - if (this.relativeTarget && - this.relativeTargetOrigin && - this.layout && - this.relativeParent && - this.relativeParent.layout) { - calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || undefined); - mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress); - /** - * If this is an unchanged relative target we can consider the - * projection not dirty. - */ - if (prevRelativeTarget && - boxEquals(this.relativeTarget, prevRelativeTarget)) { - this.isProjectionDirty = false; - } - if (!prevRelativeTarget) - prevRelativeTarget = createBox(); - copyBoxInto(prevRelativeTarget, this.relativeTarget); - } - if (isSharedLayoutAnimation) { - this.animationValues = mixedValues; - mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember); - } - if (point && point.rotate !== undefined) { - // Dedicated `pathRotation` channel, not `rotate`, so an - // animating `rotate` is composed with, never clobbered. - if (!this.animationValues) - this.animationValues = mixedValues; - this.animationValues.pathRotation = point.rotate; - } - this.root.scheduleUpdateProjection(); - this.scheduleRender(); - this.animationProgress = progress; - }; - this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0); - } - startAnimation(options) { - this.notifyListeners("animationStart"); - this.currentAnimation?.stop(); - this.resumingFrom?.currentAnimation?.stop(); - if (this.pendingAnimation) { - cancelFrame(this.pendingAnimation); - this.pendingAnimation = undefined; - } - /** - * Start the animation in the next frame to have a frame with progress 0, - * where the target is the same as when the animation started, so we can - * calculate the relative positions correctly for instant transitions. - */ - this.pendingAnimation = frame.update(() => { - globalProjectionState.hasAnimatedSinceResize = true; - activeAnimations.layout++; - this.motionValue || (this.motionValue = motionValue(0)); - this.motionValue.jump(0, false); - this.currentAnimation = animateSingleValue(this.motionValue, [0, 1000], { - ...options, - velocity: 0, - isSync: true, - onUpdate: (latest) => { - this.mixTargetDelta(latest); - options.onUpdate && options.onUpdate(latest); - }, - onStop: () => { - activeAnimations.layout--; - }, - onComplete: () => { - activeAnimations.layout--; - options.onComplete && options.onComplete(); - this.completeAnimation(); - }, - }); - if (this.resumingFrom) { - this.resumingFrom.currentAnimation = this.currentAnimation; - } - this.pendingAnimation = undefined; - }); - } - completeAnimation() { - if (this.resumingFrom) { - this.resumingFrom.currentAnimation = undefined; - this.resumingFrom.preserveOpacity = undefined; - } - const stack = this.getStack(); - stack && stack.exitAnimationComplete(); - this.resumingFrom = - this.currentAnimation = - this.animationValues = - undefined; - this.notifyListeners("animationComplete"); - } - finishAnimation() { - if (this.currentAnimation) { - this.mixTargetDelta && this.mixTargetDelta(animationTarget); - this.currentAnimation.stop(); - } - this.completeAnimation(); - } - applyTransformsToTarget() { - const lead = this.getLead(); - let { targetWithTransforms, target, layout, latestValues } = lead; - if (!targetWithTransforms || !target || !layout) - return; - /** - * If we're only animating position, and this element isn't the lead element, - * then instead of projecting into the lead box we instead want to calculate - * a new target that aligns the two boxes but maintains the layout shape. - */ - if (this !== lead && - this.layout && - layout && - shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) { - target = this.target || createBox(); - const xLength = calcLength(this.layout.layoutBox.x); - target.x.min = lead.target.x.min; - target.x.max = target.x.min + xLength; - const yLength = calcLength(this.layout.layoutBox.y); - target.y.min = lead.target.y.min; - target.y.max = target.y.min + yLength; - } - copyBoxInto(targetWithTransforms, target); - /** - * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal. - * This is the final box that we will then project into by calculating a transform delta and - * applying it to the corrected box. - */ - transformBox(targetWithTransforms, latestValues); - /** - * Update the delta between the corrected box and the final target box, after - * user-set transforms are applied to it. This will be used by the renderer to - * create a transform style that will reproject the element from its layout layout - * into the desired bounding box. - */ - calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues); - } - registerSharedNode(layoutId, node) { - if (!this.sharedNodes.has(layoutId)) { - this.sharedNodes.set(layoutId, new NodeStack()); - } - const stack = this.sharedNodes.get(layoutId); - stack.add(node); - const config = node.options.initialPromotionConfig; - node.promote({ - transition: config ? config.transition : undefined, - preserveFollowOpacity: config && config.shouldPreserveFollowOpacity - ? config.shouldPreserveFollowOpacity(node) - : undefined, - }); - } - isLead() { - const stack = this.getStack(); - return stack ? stack.lead === this : true; - } - getLead() { - const { layoutId } = this.options; - return layoutId ? this.getStack()?.lead || this : this; - } - getPrevLead() { - const { layoutId } = this.options; - return layoutId ? this.getStack()?.prevLead : undefined; - } - getStack() { - const { layoutId } = this.options; - if (layoutId) - return this.root.sharedNodes.get(layoutId); - } - promote({ needsReset, transition, preserveFollowOpacity, } = {}) { - const stack = this.getStack(); - if (stack) - stack.promote(this, preserveFollowOpacity); - if (needsReset) { - this.projectionDelta = undefined; - this.needsReset = true; - } - if (transition) - this.setOptions({ transition }); - } - relegate() { - const stack = this.getStack(); - if (stack) { - return stack.relegate(this); - } - else { - return false; - } - } - resetSkewAndRotation() { - const { visualElement } = this.options; - if (!visualElement) - return; - // If there's no detected skew or rotation values, we can early return without a forced render. - let hasDistortingTransform = false; - /** - * An unrolled check for rotation values. Most elements don't have any rotation and - * skipping the nested loop and new object creation is 50% faster. - */ - const { latestValues } = visualElement; - if (latestValues.z || - latestValues.rotate || - latestValues.rotateX || - latestValues.rotateY || - latestValues.rotateZ || - latestValues.skewX || - latestValues.skewY) { - hasDistortingTransform = true; - } - // If there's no distorting values, we don't need to do any more. - if (!hasDistortingTransform) - return; - const resetValues = {}; - if (latestValues.z) { - resetDistortingTransform("z", visualElement, resetValues, this.animationValues); - } - // Check the skew and rotate value of all axes and reset to 0 - for (let i = 0; i < transformAxes.length; i++) { - resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues); - resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues); - } - // Force a render of this element to apply the transform with all skews and rotations - // set to 0. - visualElement.render(); - // Put back all the values we reset - for (const key in resetValues) { - visualElement.setStaticValue(key, resetValues[key]); - if (this.animationValues) { - this.animationValues[key] = resetValues[key]; - } - } - // Schedule a render for the next frame. This ensures we won't visually - // see the element with the reset rotate value applied. - visualElement.scheduleRender(); - } - applyProjectionStyles(targetStyle, // CSSStyleDeclaration - doesn't allow numbers to be assigned to properties - styleProp) { - if (!this.instance || this.isSVG) - return; - if (!this.isVisible) { - targetStyle.visibility = "hidden"; - return; - } - const transformTemplate = this.getTransformTemplate(); - if (this.needsReset) { - this.needsReset = false; - targetStyle.visibility = ""; - targetStyle.opacity = ""; - targetStyle.pointerEvents = - resolveMotionValue(styleProp?.pointerEvents) || ""; - targetStyle.transform = transformTemplate - ? transformTemplate(this.latestValues, "") - : "none"; - return; - } - const lead = this.getLead(); - if (!this.projectionDelta || !this.layout || !lead.target) { - if (this.options.layoutId) { - targetStyle.opacity = - this.latestValues.opacity !== undefined - ? this.latestValues.opacity - : 1; - targetStyle.pointerEvents = - resolveMotionValue(styleProp?.pointerEvents) || ""; - } - if (this.hasProjected && !hasTransform(this.latestValues)) { - targetStyle.transform = transformTemplate - ? transformTemplate({}, "") - : "none"; - this.hasProjected = false; - } - return; - } - targetStyle.visibility = ""; - const valuesToRender = lead.animationValues || lead.latestValues; - this.applyTransformsToTarget(); - let transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender); - if (transformTemplate) { - transform = transformTemplate(valuesToRender, transform); - } - targetStyle.transform = transform; - const { x, y } = this.projectionDelta; - targetStyle.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`; - if (lead.animationValues) { - /** - * If the lead component is animating, assign this either the entering/leaving - * opacity - */ - targetStyle.opacity = - lead === this - ? valuesToRender.opacity ?? - this.latestValues.opacity ?? - 1 - : this.preserveOpacity - ? this.latestValues.opacity - : valuesToRender.opacityExit; - } - else { - /** - * Or we're not animating at all, set the lead component to its layout - * opacity and other components to hidden. - */ - targetStyle.opacity = - lead === this - ? valuesToRender.opacity !== undefined - ? valuesToRender.opacity - : "" - : valuesToRender.opacityExit !== undefined - ? valuesToRender.opacityExit - : 0; - } - /** - * Apply scale correction - */ - for (const key in scaleCorrectors) { - if (valuesToRender[key] === undefined) - continue; - const { correct, applyTo, isCSSVariable } = scaleCorrectors[key]; - /** - * Only apply scale correction to the value if we have an - * active projection transform. Otherwise these values become - * vulnerable to distortion if the element changes size without - * a corresponding layout animation. - */ - const corrected = transform === "none" - ? valuesToRender[key] - : correct(valuesToRender[key], lead); - if (applyTo) { - const num = applyTo.length; - for (let i = 0; i < num; i++) { - targetStyle[applyTo[i]] = corrected; - } - } - else { - // If this is a CSS variable, set it directly on the instance. - // Replacing this function from creating styles to setting them - // would be a good place to remove per frame object creation - if (isCSSVariable) { - this.options.visualElement.renderState.vars[key] = corrected; - } - else { - targetStyle[key] = corrected; - } - } - } - /** - * Disable pointer events on follow components. This is to ensure - * that if a follow component covers a lead component it doesn't block - * pointer events on the lead. - */ - if (this.options.layoutId) { - targetStyle.pointerEvents = - lead === this - ? resolveMotionValue(styleProp?.pointerEvents) || "" - : "none"; - } - } - clearSnapshot() { - this.resumeFrom = this.snapshot = undefined; - } - // Only run on root - resetTree() { - this.root.nodes.forEach((node) => node.currentAnimation?.stop()); - this.root.nodes.forEach(clearMeasurements); - this.root.sharedNodes.clear(); - } - }; - } - function updateLayout(node) { - node.updateLayout(); - } - function notifyLayoutUpdate(node) { - const snapshot = node.resumeFrom?.snapshot || node.snapshot; - if (node.isLead() && - node.layout && - snapshot && - node.hasListeners("didUpdate")) { - const { layoutBox: layout, measuredBox: measuredLayout } = node.layout; - const { animationType } = node.options; - const isShared = snapshot.source !== node.layout.source; - // TODO Maybe we want to also resize the layout snapshot so we don't trigger - // animations for instance if layout="size" and an element has only changed position - if (animationType === "size") { - eachAxis((axis) => { - const axisSnapshot = isShared - ? snapshot.measuredBox[axis] - : snapshot.layoutBox[axis]; - const length = calcLength(axisSnapshot); - axisSnapshot.min = layout[axis].min; - axisSnapshot.max = axisSnapshot.min + length; - }); - } - else if (animationType === "x" || animationType === "y") { - const snapAxis = animationType === "x" ? "y" : "x"; - copyAxisInto(isShared - ? snapshot.measuredBox[snapAxis] - : snapshot.layoutBox[snapAxis], layout[snapAxis]); - } - else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) { - eachAxis((axis) => { - const axisSnapshot = isShared - ? snapshot.measuredBox[axis] - : snapshot.layoutBox[axis]; - const length = calcLength(layout[axis]); - axisSnapshot.max = axisSnapshot.min + length; - /** - * Ensure relative target gets resized and rerendererd - */ - if (node.relativeTarget && !node.currentAnimation) { - node.isProjectionDirty = true; - node.relativeTarget[axis].max = - node.relativeTarget[axis].min + length; - } - }); - } - const layoutDelta = createDelta(); - calcBoxDelta(layoutDelta, layout, snapshot.layoutBox); - const visualDelta = createDelta(); - if (isShared) { - calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox); - } - else { - calcBoxDelta(visualDelta, layout, snapshot.layoutBox); - } - const hasLayoutChanged = !isDeltaZero(layoutDelta); - let hasRelativeLayoutChanged = false; - if (!node.resumeFrom) { - const relativeParent = node.getClosestProjectingParent(); - /** - * If the relativeParent is itself resuming from a different element then - * the relative snapshot is not relavent - */ - if (relativeParent && !relativeParent.resumeFrom) { - const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent; - if (parentSnapshot && parentLayout) { - const anchor = node.options.layoutAnchor || undefined; - const relativeSnapshot = createBox(); - calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox, anchor); - const relativeLayout = createBox(); - calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox, anchor); - if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) { - hasRelativeLayoutChanged = true; - } - if (relativeParent.options.layoutRoot) { - node.relativeTarget = relativeLayout; - node.relativeTargetOrigin = relativeSnapshot; - node.relativeParent = relativeParent; - } - } - } - } - node.notifyListeners("didUpdate", { - layout, - snapshot, - delta: visualDelta, - layoutDelta, - hasLayoutChanged, - hasRelativeLayoutChanged, - }); - } - else if (node.isLead()) { - const { onExitComplete } = node.options; - onExitComplete && onExitComplete(); - } - /** - * Clearing transition - * TODO: Investigate why this transition is being passed in as {type: false } from Framer - * and why we need it at all - */ - node.options.transition = undefined; - } - function propagateDirtyNodes(node) { - /** - * Increase debug counter for nodes encountered this frame - */ - if (statsBuffer.value) { - metrics.nodes++; - } - if (!node.parent) - return; - /** - * If this node isn't projecting, propagate isProjectionDirty. It will have - * no performance impact but it will allow the next child that *is* projecting - * but *isn't* dirty to just check its parent to see if *any* ancestor needs - * correcting. - */ - if (!node.isProjecting()) { - node.isProjectionDirty = node.parent.isProjectionDirty; - } - /** - * Propagate isSharedProjectionDirty and isTransformDirty - * throughout the whole tree. A future revision can take another look at - * this but for safety we still recalcualte shared nodes. - */ - node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty || - node.parent.isProjectionDirty || - node.parent.isSharedProjectionDirty)); - node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty); - } - function cleanDirtyNodes(node) { - node.isProjectionDirty = - node.isSharedProjectionDirty = - node.isTransformDirty = - false; - } - function clearSnapshot(node) { - node.clearSnapshot(); - } - function clearMeasurements(node) { - node.clearMeasurements(); - } - function forceLayoutMeasure(node) { - node.isLayoutDirty = true; - node.updateLayout(); - } - function clearIsLayoutDirty(node) { - node.isLayoutDirty = false; - } - /** - * When a node is animation-blocked (e.g. during drag) and its component - * didn't re-render (memoized), willUpdate() is never called so there's - * no snapshot. Use the previous layout as a snapshot and mark dirty so - * resetTransform/updateLayout/notifyLayoutUpdate process it normally. - */ - function ensureDraggedNodesSnapshotted(node) { - if (node.isAnimationBlocked && node.layout && !node.isLayoutDirty) { - node.snapshot = node.layout; - node.isLayoutDirty = true; - } - } - function resetTransformStyle(node) { - const { visualElement } = node.options; - if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) { - visualElement.notify("BeforeLayoutMeasure"); - } - node.resetTransform(); - } - function finishAnimation(node) { - node.finishAnimation(); - node.targetDelta = node.relativeTarget = node.target = undefined; - node.isProjectionDirty = true; - } - function resolveTargetDelta(node) { - node.resolveTargetDelta(); - } - function calcProjection(node) { - node.calcProjection(); - } - function resetSkewAndRotation(node) { - node.resetSkewAndRotation(); - } - function removeLeadSnapshots(stack) { - stack.removeLeadSnapshot(); - } - function mixAxisDeltaLinear(output, delta, p) { - output.translate = mixNumber$1(delta.translate, 0, p); - output.scale = mixNumber$1(delta.scale, 1, p); - output.origin = delta.origin; - output.originPoint = delta.originPoint; - } - function mixAxis(output, from, to, p) { - output.min = mixNumber$1(from.min, to.min, p); - output.max = mixNumber$1(from.max, to.max, p); - } - function mixBox(output, from, to, p) { - mixAxis(output.x, from.x, to.x, p); - mixAxis(output.y, from.y, to.y, p); - } - function hasOpacityCrossfade(node) { - return (node.animationValues && node.animationValues.opacityExit !== undefined); - } - const defaultLayoutTransition = { - duration: 0.45, - ease: [0.4, 0, 0.1, 1], - }; - const userAgentContains = (string) => typeof navigator !== "undefined" && - navigator.userAgent && - navigator.userAgent.toLowerCase().includes(string); - /** - * Measured bounding boxes must be rounded in Safari and - * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements - * can appear to jump. - */ - const roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/") - ? Math.round - : motionUtils.noop; - function roundAxis(axis) { - // Round to the nearest .5 pixels to support subpixel layouts - axis.min = roundPoint(axis.min); - axis.max = roundPoint(axis.max); - } - function roundBox(box) { - roundAxis(box.x); - roundAxis(box.y); - } - function shouldAnimatePositionOnly(animationType, snapshot, layout) { - return (animationType === "position" || - (animationType === "preserve-aspect" && - !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2))); - } - function checkNodeWasScrollRoot(node) { - return node !== node.root && node.scroll?.wasRoot; - } - - const DocumentProjectionNode = createProjectionNode({ - attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify), - measureScroll: () => ({ - x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0, - y: document.documentElement.scrollTop || document.body?.scrollTop || 0, - }), - checkIsScrollRoot: () => true, - }); - - const notify = (node) => !node.isLayoutDirty && node.willUpdate(false); - function nodeGroup() { - const nodes = new Set(); - const subscriptions = new WeakMap(); - const dirtyAll = () => nodes.forEach(notify); - return { - add: (node) => { - nodes.add(node); - subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll)); - }, - remove: (node) => { - nodes.delete(node); - const unsubscribe = subscriptions.get(node); - if (unsubscribe) { - unsubscribe(); - subscriptions.delete(node); - } - dirtyAll(); - }, - dirty: dirtyAll, - }; - } - - const rootProjectionNode = { - current: undefined, - }; - const HTMLProjectionNode = createProjectionNode({ - measureScroll: (instance) => ({ - x: instance.scrollLeft, - y: instance.scrollTop, - }), - defaultParent: () => { - if (!rootProjectionNode.current) { - const documentNode = new DocumentProjectionNode({}); - documentNode.mount(window); - documentNode.setOptions({ layoutScroll: true }); - rootProjectionNode.current = documentNode; - } - return rootProjectionNode.current; - }, - resetTransform: (instance, value) => { - instance.style.transform = value !== undefined ? value : "none"; - }, - checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed"), - }); - - const layoutSelector = "[data-layout], [data-layout-id]"; - const noop = () => { }; - function snapshotFromTarget(projection) { - const target = projection.targetWithTransforms || projection.target; - if (!target) - return undefined; - const measuredBox = createBox(); - const layoutBox = createBox(); - copyBoxInto(measuredBox, target); - copyBoxInto(layoutBox, target); - return { - animationId: projection.root?.animationId ?? 0, - measuredBox, - layoutBox, - latestValues: projection.animationValues || projection.latestValues || {}, - source: projection.id, - }; - } - class LayoutAnimationBuilder { - constructor(scope, updateDom, defaultOptions) { - this.sharedTransitions = new Map(); - this.notifyReady = noop; - this.rejectReady = noop; - this.scope = scope; - this.updateDom = updateDom; - this.defaultOptions = defaultOptions; - this.readyPromise = new Promise((resolve, reject) => { - this.notifyReady = resolve; - this.rejectReady = reject; - }); - frame.postRender(() => { - this.start().then(this.notifyReady).catch(this.rejectReady); - }); - } - shared(id, transition) { - this.sharedTransitions.set(id, transition); - return this; - } - then(resolve, reject) { - return this.readyPromise.then(resolve, reject); - } - async start() { - const beforeElements = collectLayoutElements(this.scope); - const beforeRecords = this.buildRecords(beforeElements); - beforeRecords.forEach(({ projection }) => { - const hasCurrentAnimation = Boolean(projection.currentAnimation); - const isSharedLayout = Boolean(projection.options.layoutId); - if (hasCurrentAnimation && isSharedLayout) { - const snapshot = snapshotFromTarget(projection); - if (snapshot) { - projection.snapshot = snapshot; - } - else if (projection.snapshot) { - projection.snapshot = undefined; - } - } - else if (projection.snapshot && - (projection.currentAnimation || projection.isProjecting())) { - projection.snapshot = undefined; - } - projection.isPresent = true; - projection.willUpdate(); - }); - await this.updateDom(); - const afterElements = collectLayoutElements(this.scope); - const afterRecords = this.buildRecords(afterElements); - this.handleExitingElements(beforeRecords, afterRecords); - afterRecords.forEach(({ projection }) => { - const instance = projection.instance; - const resumeFromInstance = projection.resumeFrom - ?.instance; - if (!instance || !resumeFromInstance) - return; - if (!("style" in instance)) - return; - const currentTransform = instance.style.transform; - const resumeFromTransform = resumeFromInstance.style.transform; - if (currentTransform && - resumeFromTransform && - currentTransform === resumeFromTransform) { - instance.style.transform = ""; - instance.style.transformOrigin = ""; - } - }); - afterRecords.forEach(({ projection }) => { - projection.isPresent = true; - }); - const root = getProjectionRoot(afterRecords, beforeRecords); - root?.didUpdate(); - await new Promise((resolve) => { - frame.postRender(() => resolve()); - }); - const animations = collectAnimations(afterRecords); - const animation = new GroupAnimation(animations); - return animation; - } - buildRecords(elements) { - const records = []; - const recordMap = new Map(); - for (const element of elements) { - const parentRecord = findParentRecord(element, recordMap, this.scope); - const { layout, layoutId } = readLayoutAttributes(element); - const override = layoutId - ? this.sharedTransitions.get(layoutId) - : undefined; - const transition = override || this.defaultOptions; - const record = getOrCreateRecord(element, parentRecord?.projection, { - layout, - layoutId, - animationType: typeof layout === "string" ? layout : "both", - transition: transition, - }); - recordMap.set(element, record); - records.push(record); - } - return records; - } - handleExitingElements(beforeRecords, afterRecords) { - const afterElementsSet = new Set(afterRecords.map((record) => record.element)); - beforeRecords.forEach((record) => { - if (afterElementsSet.has(record.element)) - return; - // For shared layout elements, relegate to set up resumeFrom - // so the remaining element animates from this position - if (record.projection.options.layoutId) { - record.projection.isPresent = false; - record.projection.relegate(); - } - record.visualElement.unmount(); - visualElementStore.delete(record.element); - }); - // Clear resumeFrom on EXISTING nodes that point to unmounted projections - // This prevents crossfade animation when the source element was removed entirely - // But preserve resumeFrom for NEW nodes so they can animate from the old position - // Also preserve resumeFrom for lead nodes that were just promoted via relegate - const beforeElementsSet = new Set(beforeRecords.map((record) => record.element)); - afterRecords.forEach(({ element, projection }) => { - if (beforeElementsSet.has(element) && - projection.resumeFrom && - !projection.resumeFrom.instance && - !projection.isLead()) { - projection.resumeFrom = undefined; - projection.snapshot = undefined; - } - }); - } - } - function parseAnimateLayoutArgs(scopeOrUpdateDom, updateDomOrOptions, options) { - // animateLayout(updateDom) - if (typeof scopeOrUpdateDom === "function") { - return { - scope: document, - updateDom: scopeOrUpdateDom, - defaultOptions: updateDomOrOptions, - }; - } - // animateLayout(scope, updateDom, options?) - const elements = resolveElements(scopeOrUpdateDom); - const scope = elements[0] || document; - return { - scope, - updateDom: updateDomOrOptions, - defaultOptions: options, - }; - } - function collectLayoutElements(scope) { - const elements = Array.from(scope.querySelectorAll(layoutSelector)); - if (scope instanceof Element && scope.matches(layoutSelector)) { - if (!elements.includes(scope)) { - elements.unshift(scope); - } - } - return elements; - } - function readLayoutAttributes(element) { - const layoutId = element.getAttribute("data-layout-id") || undefined; - const rawLayout = element.getAttribute("data-layout"); - let layout; - if (rawLayout === "" || rawLayout === "true") { - layout = true; - } - else if (rawLayout) { - layout = rawLayout; - } - return { - layout, - layoutId, - }; - } - function createVisualState() { - return { - latestValues: {}, - renderState: { - transform: {}, - transformOrigin: {}, - style: {}, - vars: {}, - }, - }; - } - function getOrCreateRecord(element, parentProjection, projectionOptions) { - const existing = visualElementStore.get(element); - const visualElement = existing ?? - new HTMLVisualElement({ - props: {}, - presenceContext: null, - visualState: createVisualState(), - }, { allowProjection: true }); - if (!existing || !visualElement.projection) { - visualElement.projection = new HTMLProjectionNode(visualElement.latestValues, parentProjection); - } - visualElement.projection.setOptions({ - ...projectionOptions, - visualElement, - }); - if (!visualElement.current) { - visualElement.mount(element); - } - else if (!visualElement.projection.instance) { - // Mount projection if VisualElement is already mounted but projection isn't - // This happens when animate() was called before animateLayout() - visualElement.projection.mount(element); - } - if (!existing) { - visualElementStore.set(element, visualElement); - } - return { - element, - visualElement, - projection: visualElement.projection, - }; - } - function findParentRecord(element, recordMap, scope) { - let parent = element.parentElement; - while (parent) { - const record = recordMap.get(parent); - if (record) - return record; - if (parent === scope) - break; - parent = parent.parentElement; - } - return undefined; - } - function getProjectionRoot(afterRecords, beforeRecords) { - const record = afterRecords[0] || beforeRecords[0]; - return record?.projection.root; - } - function collectAnimations(afterRecords) { - const animations = new Set(); - afterRecords.forEach((record) => { - const animation = record.projection.currentAnimation; - if (animation) - animations.add(animation); - }); - return Array.from(animations); - } - - /** - * @deprecated - * - * Import as `frame` instead. - */ - const sync = frame; - /** - * @deprecated - * - * Use cancelFrame(callback) instead. - */ - const cancelSync = stepsOrder.reduce((acc, key) => { - acc[key] = (process) => cancelFrame(process); - return acc; - }, {}); - - exports.AsyncMotionValueAnimation = AsyncMotionValueAnimation; - exports.DOMKeyframesResolver = DOMKeyframesResolver; - exports.DOMVisualElement = DOMVisualElement; - exports.DocumentProjectionNode = DocumentProjectionNode; - exports.Feature = Feature; - exports.FlatTree = FlatTree; - exports.GroupAnimation = GroupAnimation; - exports.GroupAnimationWithThen = GroupAnimationWithThen; - exports.HTMLProjectionNode = HTMLProjectionNode; - exports.HTMLVisualElement = HTMLVisualElement; - exports.JSAnimation = JSAnimation; - exports.KeyframeResolver = KeyframeResolver; - exports.LayoutAnimationBuilder = LayoutAnimationBuilder; - exports.MotionValue = MotionValue; - exports.NativeAnimation = NativeAnimation; - exports.NativeAnimationExtended = NativeAnimationExtended; - exports.NativeAnimationWrapper = NativeAnimationWrapper; - exports.NodeStack = NodeStack; - exports.ObjectVisualElement = ObjectVisualElement; - exports.SVGVisualElement = SVGVisualElement; - exports.ViewTransitionBuilder = ViewTransitionBuilder; - exports.VisualElement = VisualElement; - exports.acceleratedValues = acceleratedValues; - exports.activeAnimations = activeAnimations; - exports.addAttrValue = addAttrValue; - exports.addDomEvent = addDomEvent; - exports.addScaleCorrector = addScaleCorrector; - exports.addStyleValue = addStyleValue; - exports.addValueToWillChange = addValueToWillChange; - exports.alpha = alpha; - exports.analyseComplexValue = analyseComplexValue; - exports.animateMotionValue = animateMotionValue; - exports.animateSingleValue = animateSingleValue; - exports.animateTarget = animateTarget; - exports.animateValue = animateValue; - exports.animateVariant = animateVariant; - exports.animateView = animateView; - exports.animateVisualElement = animateVisualElement; - exports.animationMapKey = animationMapKey; - exports.applyAxisDelta = applyAxisDelta; - exports.applyBoxDelta = applyBoxDelta; - exports.applyGeneratorOptions = applyGeneratorOptions; - exports.applyPointDelta = applyPointDelta; - exports.applyPxDefaults = applyPxDefaults; - exports.applyTreeDeltas = applyTreeDeltas; - exports.arc = arc; - exports.aspectRatio = aspectRatio; - exports.attachFollow = attachFollow; - exports.attachSpring = attachSpring; - exports.attrEffect = attrEffect; - exports.axisDeltaEquals = axisDeltaEquals; - exports.axisEquals = axisEquals; - exports.axisEqualsRounded = axisEqualsRounded; - exports.boxEquals = boxEquals; - exports.boxEqualsRounded = boxEqualsRounded; - exports.buildHTMLStyles = buildHTMLStyles; - exports.buildProjectionTransform = buildProjectionTransform; - exports.buildSVGAttrs = buildSVGAttrs; - exports.buildSVGPath = buildSVGPath; - exports.buildTransform = buildTransform; - exports.calcAxisDelta = calcAxisDelta; - exports.calcBoxDelta = calcBoxDelta; - exports.calcChildStagger = calcChildStagger; - exports.calcGeneratorDuration = calcGeneratorDuration; - exports.calcLength = calcLength; - exports.calcRelativeAxis = calcRelativeAxis; - exports.calcRelativeAxisPosition = calcRelativeAxisPosition; - exports.calcRelativeBox = calcRelativeBox; - exports.calcRelativePosition = calcRelativePosition; - exports.camelCaseAttributes = camelCaseAttributes; - exports.camelToDash = camelToDash; - exports.cancelFrame = cancelFrame; - exports.cancelMicrotask = cancelMicrotask; - exports.cancelSync = cancelSync; - exports.checkVariantsDidChange = checkVariantsDidChange; - exports.cleanDirtyNodes = cleanDirtyNodes; - exports.collectMotionValues = collectMotionValues; - exports.color = color; - exports.compareByDepth = compareByDepth; - exports.complex = complex; - exports.containsCSSVariable = containsCSSVariable; - exports.convertBoundingBoxToBox = convertBoundingBoxToBox; - exports.convertBoxToBoundingBox = convertBoxToBoundingBox; - exports.convertOffsetToTimes = convertOffsetToTimes; - exports.copyAxisDeltaInto = copyAxisDeltaInto; - exports.copyAxisInto = copyAxisInto; - exports.copyBoxInto = copyBoxInto; - exports.correctBorderRadius = correctBorderRadius; - exports.correctBoxShadow = correctBoxShadow; - exports.createAnimationState = createAnimationState; - exports.createAxis = createAxis; - exports.createAxisDelta = createAxisDelta; - exports.createBox = createBox; - exports.createDelta = createDelta; - exports.createGeneratorEasing = createGeneratorEasing; - exports.createProjectionNode = createProjectionNode; - exports.createRenderBatcher = createRenderBatcher; - exports.cubicBezierAsString = cubicBezierAsString; - exports.defaultEasing = defaultEasing; - exports.defaultOffset = defaultOffset; - exports.defaultTransformValue = defaultTransformValue; - exports.defaultValueTypes = defaultValueTypes; - exports.degrees = degrees; - exports.delay = delay; - exports.delayInSeconds = delayInSeconds; - exports.dimensionValueTypes = dimensionValueTypes; - exports.eachAxis = eachAxis; - exports.fillOffset = fillOffset; - exports.fillWildcards = fillWildcards; - exports.findDimensionValueType = findDimensionValueType; - exports.findValueType = findValueType; - exports.flushKeyframeResolvers = flushKeyframeResolvers; - exports.followValue = followValue; - exports.frame = frame; - exports.frameData = frameData; - exports.frameSteps = frameSteps; - exports.generateLinearEasing = generateLinearEasing; - exports.getAnimatableNone = getAnimatableNone; - exports.getAnimationMap = getAnimationMap; - exports.getComputedStyle = getComputedStyle$2; - exports.getDefaultTransition = getDefaultTransition; - exports.getDefaultValueType = getDefaultValueType; - exports.getFeatureDefinitions = getFeatureDefinitions; - exports.getFinalKeyframe = getFinalKeyframe; - exports.getMixer = getMixer; - exports.getOptimisedAppearId = getOptimisedAppearId; - exports.getOriginIndex = getOriginIndex; - exports.getValueAsType = getValueAsType; - exports.getValueTransition = getValueTransition; - exports.getVariableValue = getVariableValue; - exports.getVariantContext = getVariantContext; - exports.getViewAnimationLayerInfo = getViewAnimationLayerInfo; - exports.getViewAnimations = getViewAnimations; - exports.globalProjectionState = globalProjectionState; - exports.has2DTranslate = has2DTranslate; - exports.hasReducedMotionListener = hasReducedMotionListener; - exports.hasScale = hasScale; - exports.hasTransform = hasTransform; - exports.hex = hex; - exports.hover = hover; - exports.hsla = hsla; - exports.hslaToRgba = hslaToRgba; - exports.inertia = inertia; - exports.initPrefersReducedMotion = initPrefersReducedMotion; - exports.interpolate = interpolate; - exports.invisibleValues = invisibleValues; - exports.isAnimationControls = isAnimationControls; - exports.isCSSVariableName = isCSSVariableName; - exports.isCSSVariableToken = isCSSVariableToken; - exports.isControllingVariants = isControllingVariants; - exports.isDeltaZero = isDeltaZero; - exports.isDragActive = isDragActive; - exports.isDragging = isDragging; - exports.isElementKeyboardAccessible = isElementKeyboardAccessible; - exports.isElementTextInput = isElementTextInput; - exports.isForcedMotionValue = isForcedMotionValue; - exports.isGenerator = isGenerator; - exports.isHTMLElement = isHTMLElement; - exports.isKeyframesTarget = isKeyframesTarget; - exports.isMotionValue = isMotionValue; - exports.isNear = isNear; - exports.isNodeOrChild = isNodeOrChild; - exports.isPrimaryPointer = isPrimaryPointer; - exports.isSVGElement = isSVGElement; - exports.isSVGSVGElement = isSVGSVGElement; - exports.isSVGTag = isSVGTag; - exports.isTransitionDefined = isTransitionDefined; - exports.isVariantLabel = isVariantLabel; - exports.isVariantNode = isVariantNode; - exports.isWaapiSupportedEasing = isWaapiSupportedEasing; - exports.isWillChangeMotionValue = isWillChangeMotionValue; - exports.keyframes = keyframes; - exports.makeAnimationInstant = makeAnimationInstant; - exports.mapEasingToNativeEasing = mapEasingToNativeEasing; - exports.mapValue = mapValue; - exports.maxGeneratorDuration = maxGeneratorDuration; - exports.measurePageBox = measurePageBox; - exports.measureViewportBox = measureViewportBox; - exports.microtask = microtask; - exports.mix = mix; - exports.mixArray = mixArray; - exports.mixColor = mixColor; - exports.mixComplex = mixComplex; - exports.mixImmediate = mixImmediate; - exports.mixLinearColor = mixLinearColor; - exports.mixNumber = mixNumber$1; - exports.mixObject = mixObject; - exports.mixValues = mixValues; - exports.mixVisibility = mixVisibility; - exports.motionValue = motionValue; - exports.nodeGroup = nodeGroup; - exports.number = number; - exports.numberValueTypes = numberValueTypes; - exports.observeTimeline = observeTimeline; - exports.optimizedAppearDataAttribute = optimizedAppearDataAttribute; - exports.optimizedAppearDataId = optimizedAppearDataId; - exports.parseAnimateLayoutArgs = parseAnimateLayoutArgs; - exports.parseCSSVariable = parseCSSVariable; - exports.parseValueFromTransform = parseValueFromTransform; - exports.percent = percent; - exports.pixelsToPercent = pixelsToPercent; - exports.positionalKeys = positionalKeys; - exports.prefersReducedMotion = prefersReducedMotion; - exports.press = press; - exports.progressPercentage = progressPercentage; - exports.propEffect = propEffect; - exports.propagateDirtyNodes = propagateDirtyNodes; - exports.px = px; - exports.readTransformValue = readTransformValue; - exports.recordStats = recordStats; - exports.removeAxisDelta = removeAxisDelta; - exports.removeAxisTransforms = removeAxisTransforms; - exports.removeBoxTransforms = removeBoxTransforms; - exports.removePointDelta = removePointDelta; - exports.renderHTML = renderHTML; - exports.renderSVG = renderSVG; - exports.resize = resize; - exports.resolveElements = resolveElements; - exports.resolveMotionValue = resolveMotionValue; - exports.resolveTransition = resolveTransition; - exports.resolveVariant = resolveVariant; - exports.resolveVariantFromProps = resolveVariantFromProps; - exports.rgbUnit = rgbUnit; - exports.rgba = rgba; - exports.rootProjectionNode = rootProjectionNode; - exports.scale = scale; - exports.scaleCorrectors = scaleCorrectors; - exports.scalePoint = scalePoint; - exports.scrapeHTMLMotionValuesFromProps = scrapeMotionValuesFromProps$1; - exports.scrapeSVGMotionValuesFromProps = scrapeMotionValuesFromProps; - exports.setDragLock = setDragLock; - exports.setFeatureDefinitions = setFeatureDefinitions; - exports.setStyle = setStyle; - exports.setTarget = setTarget; - exports.spring = spring; - exports.springValue = springValue; - exports.stagger = stagger; - exports.startWaapiAnimation = startWaapiAnimation; - exports.statsBuffer = statsBuffer; - exports.styleEffect = styleEffect; - exports.supportedWaapiEasing = supportedWaapiEasing; - exports.supportsBrowserAnimation = supportsBrowserAnimation; - exports.supportsFlags = supportsFlags; - exports.supportsLinearEasing = supportsLinearEasing; - exports.supportsPartialKeyframes = supportsPartialKeyframes; - exports.supportsScrollTimeline = supportsScrollTimeline; - exports.supportsViewTimeline = supportsViewTimeline; - exports.svgEffect = svgEffect; - exports.sync = sync; - exports.testValueType = testValueType; - exports.time = time; - exports.transform = transform; - exports.transformAxis = transformAxis; - exports.transformBox = transformBox; - exports.transformBoxPoints = transformBoxPoints; - exports.transformPropOrder = transformPropOrder; - exports.transformProps = transformProps; - exports.transformValue = transformValue; - exports.transformValueTypes = transformValueTypes; - exports.translateAxis = translateAxis; - exports.updateMotionValuesFromProps = updateMotionValuesFromProps; - exports.variantPriorityOrder = variantPriorityOrder; - exports.variantProps = variantProps; - exports.vh = vh; - exports.visualElementStore = visualElementStore; - exports.vw = vw; - -})); diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/motion-dom.js b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/motion-dom.js deleted file mode 100644 index 22884582..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/motion-dom.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("motion-utils")):"function"==typeof define&&define.amd?define(["exports","motion-utils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MotionDom={},t.MotionUtils)}(this,function(t,e){"use strict";const n=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],i={value:null,addProjectionMetrics:null};function s(t,s){let o=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},l=()=>o=!0,c=n.reduce((t,e)=>(t[e]=function(t,e){let n=new Set,s=new Set,o=!1,r=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(e){a.has(e)&&(h.schedule(e),t()),c++,e(l)}const h={schedule:(t,e=!1,i=!1)=>{const r=i&&o?n:s;return e&&a.add(t),r.add(t),t},cancel:t=>{s.delete(t),a.delete(t)},process:t=>{if(l=t,o)return void(r=!0);o=!0;const a=n;n=s,s=a,n.forEach(u),e&&i.value&&i.value.frameloop[e].push(c),c=0,n.clear(),o=!1,r&&(r=!1,h.process(t))}};return h}(l,s?e:void 0),t),{}),{setup:u,read:h,resolveKeyframes:d,preUpdate:p,update:m,preRender:f,render:y,postRender:g}=c,v=()=>{const n=e.MotionGlobalConfig.useManualTiming,i=n?a.timestamp:performance.now();o=!1,n||(a.delta=r?1e3/60:Math.max(Math.min(i-a.timestamp,40),1)),a.timestamp=i,a.isProcessing=!0,u.process(a),h.process(a),d.process(a),p.process(a),m.process(a),f.process(a),y.process(a),g.process(a),a.isProcessing=!1,o&&s&&(r=!1,t(v))};return{schedule:n.reduce((e,n)=>{const i=c[n];return e[n]=(e,n=!1,s=!1)=>(o||(o=!0,r=!0,a.isProcessing||t(v)),i.schedule(e,n,s)),e},{}),cancel:t=>{for(let e=0;e(void 0===c&&h.set(a.isProcessing||e.MotionGlobalConfig.useManualTiming?a.timestamp:performance.now()),c),set:t=>{c=t,queueMicrotask(u)}},d={layout:0,mainThread:0,waapi:0},p=t=>e=>"string"==typeof e&&e.startsWith(t),m=p("--"),f=p("var(--"),y=t=>!!f(t)&&g.test(t.split("/*")[0].trim()),g=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function v(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const x={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},T={...x,transform:t=>e.clamp(0,1,t)},w={...x,default:1},b=t=>Math.round(1e5*t)/1e5,S=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const V=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,A=(t,e)=>n=>Boolean("string"==typeof n&&V.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),P=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(S);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},M={...x,transform:t=>Math.round((t=>e.clamp(0,255,t))(t))},E={test:A("rgb","red"),parse:P("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+M.transform(t)+", "+M.transform(e)+", "+M.transform(n)+", "+b(T.transform(i))+")"};const k={test:A("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:E.transform},D=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),R=D("deg"),B=D("%"),C=D("px"),j=D("vh"),L=D("vw"),F=(()=>({...B,parse:t=>B.parse(t)/100,transform:t=>B.transform(100*t)}))(),O={test:A("hsl","hue"),parse:P("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+B.transform(b(e))+", "+B.transform(b(n))+", "+b(T.transform(i))+")"},I={test:t=>E.test(t)||k.test(t)||O.test(t),parse:t=>E.test(t)?E.parse(t):O.test(t)?O.parse(t):k.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?E.transform(t):O.transform(t),getAnimatableNone:t=>{const e=I.parse(t);return e.alpha=0,I.transform(e)}},U=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const N="number",$="color",W=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function z(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(W,t=>(I.test(t)?(i.color.push(o),s.push($),n.push(I.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(N),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function K({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:I.test(n)?I.getAnimatableNone(n):n;var n};const X={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(S)?.length||0)+(t.match(U)?.length||0)>0},parse:function(t){return z(t).values},createTransformer:function(t){return K(z(t))},getAnimatableNone:function(t){const e=z(t);return K(e)(e.values.map((t,n)=>Y(t,e.split[n])))}};function G(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function q({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=G(a,i,t+1/3),o=G(a,i,t),r=G(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function H(t,e){return n=>n>0?e:t}const Z=(t,e,n)=>t+(e-t)*n,_=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},J=[k,E,O];function Q(t){const n=(i=t,J.find(t=>t.test(i)));var i;if(e.warning(Boolean(n),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(t);return n===O&&(s=q(s)),s}const tt=(t,e)=>{const n=Q(t),i=Q(e);if(!n||!i)return H(t,e);const s={...n};return t=>(s.red=_(n.red,i.red,t),s.green=_(n.green,i.green,t),s.blue=_(n.blue,i.blue,t),s.alpha=Z(n.alpha,i.alpha,t),E.transform(s))},et=new Set(["none","hidden"]);function nt(t,e){return et.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function it(t,e){return n=>Z(t,e,n)}function st(t){return"number"==typeof t?it:"string"==typeof t?y(t)?H:I.test(t)?tt:at:Array.isArray(t)?ot:"object"==typeof t?I.test(t)?tt:rt:H}function ot(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>st(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in i)n[e]=i[e](t);return n}}const at=(t,n)=>{const i=X.createTransformer(n),s=z(t),o=z(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?et.has(t)&&!o.values.length||et.has(n)&&!s.values.length?nt(t,n):e.pipe(ot(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>o.update(e,t),stop:()=>r(e),now:()=>a.isProcessing?a.timestamp:h.now()}},ut=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e=ht?1/0:e}function pt(t,n=100,i){const s=i({...t,keyframes:[0,n]}),o=Math.min(dt(s),ht);return{type:"keyframes",ease:t=>s.next(o*t).value/n,duration:e.millisecondsToSeconds(o)}}const mt=100,ft=10,yt=1,gt=0,vt=800,xt=.3,Tt=.3,wt={granular:.01,default:2},bt={granular:.005,default:.5},St=.01,Vt=10,At=.05,Pt=1;function Mt(t,e){return t*Math.sqrt(1-e*e)}const Et=.001;const kt=["duration","bounce"],Dt=["stiffness","damping","mass"];function Rt(t,e){return e.some(e=>void 0!==t[e])}function Bt(t){let n={velocity:gt,stiffness:mt,damping:ft,mass:yt,isResolvedFromDuration:!1,...t};if(!Rt(t,Dt)&&Rt(t,kt))if(n.velocity=0,t.visualDuration){const i=t.visualDuration,s=2*Math.PI/(1.2*i),o=s*s,r=2*e.clamp(.05,1,1-(t.bounce||0))*Math.sqrt(o);n={...n,mass:yt,stiffness:o,damping:r}}else{const i=function({duration:t=vt,bounce:n=xt,velocity:i=gt,mass:s=yt}){let o,r;e.warning(t<=e.secondsToMilliseconds(Vt),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-n;a=e.clamp(At,Pt,a),t=e.clamp(St,Vt,e.millisecondsToSeconds(t)),a<1?(o=e=>{const n=e*a,s=n*t,o=n-i,r=Mt(e,a),l=Math.exp(-s);return Et-o/r*l},r=e=>{const n=e*a*t,s=n*i+i,r=Math.pow(a,2)*Math.pow(e,2)*t,l=Math.exp(-n),c=Mt(Math.pow(e,2),a);return(-o(e)+Et>0?-1:1)*((s-r)*l)/c}):(o=e=>Math.exp(-e*t)*((e-i)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(i-e)));const l=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(o,r,5/t);if(t=e.secondsToMilliseconds(t),isNaN(l))return{stiffness:mt,damping:ft,duration:t};{const e=Math.pow(l,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}({...t,velocity:0});n={...n,...i,mass:yt},n.isResolvedFromDuration=!0}return n}function Ct(t=Tt,n=xt){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:n}:t;let{restSpeed:s,restDelta:o}=i;const r=i.keyframes[0],a=i.keyframes[i.keyframes.length-1],l={done:!1,value:r},{stiffness:c,damping:u,mass:h,duration:d,velocity:p,isResolvedFromDuration:m}=Bt({...i,velocity:-e.millisecondsToSeconds(i.velocity||0)}),f=p||0,y=u/(2*Math.sqrt(c*h)),g=a-r,v=e.millisecondsToSeconds(Math.sqrt(c/h)),x=Math.abs(g)<5;let T,w,b,S,V,A;if(s||(s=x?wt.granular:wt.default),o||(o=x?bt.granular:bt.default),y<1)b=Mt(v,y),S=(f+y*v*g)/b,T=t=>{const e=Math.exp(-y*v*t);return a-e*(S*Math.sin(b*t)+g*Math.cos(b*t))},V=y*v*S+g*b,A=y*v*g-S*b,w=t=>Math.exp(-y*v*t)*(V*Math.sin(b*t)+A*Math.cos(b*t));else if(1===y){T=t=>a-Math.exp(-v*t)*(g+(f+v*g)*t);const t=f+v*g;w=e=>Math.exp(-v*e)*(v*t*e-f)}else{const t=v*Math.sqrt(y*y-1);T=e=>{const n=Math.exp(-y*v*e),i=Math.min(t*e,300);return a-n*((f+y*v*g)*Math.sinh(i)+t*g*Math.cosh(i))/t};const e=(f+y*v*g)/t,n=y*v*e-g*t,i=y*v*g-e*t;w=e=>{const s=Math.exp(-y*v*e),o=Math.min(t*e,300);return s*(n*Math.sinh(o)+i*Math.cosh(o))}}const P={calculatedDuration:m&&d||null,velocity:t=>e.secondsToMilliseconds(w(t)),next:t=>{if(!m&&y<1){const n=Math.exp(-y*v*t),i=Math.sin(b*t),r=Math.cos(b*t),c=a-n*(S*i+g*r),u=e.secondsToMilliseconds(n*(V*i+A*r));return l.done=Math.abs(u)<=s&&Math.abs(a-c)<=o,l.value=l.done?a:c,l}const n=T(t);if(m)l.done=t>=d;else{const i=e.secondsToMilliseconds(w(t));l.done=Math.abs(i)<=s&&Math.abs(a-n)<=o}return l.value=l.done?a:n,l},toString:()=>{const t=Math.min(dt(P),ht),e=ut(e=>P.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return P}Ct.applyToOptions=t=>{const n=pt(t,100,Ct);return t.ease=n.ease,t.duration=e.secondsToMilliseconds(n.duration),t.type="keyframes",t};function jt(t,n,i){const s=Math.max(n-5,0);return e.velocityPerSecond(i-t(s),n-s)}function Lt({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?y:n};let T,w;const b=t=>{var e;(e=d.value,void 0!==a&&el)&&(T=t,w=Ct({keyframes:[d.value,p(d.value)],velocity:jt(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==T||(e=!0,x(t),b(t)),void 0!==T&&t>=T?w.next(t-T):(!e&&x(t),d)}}}function Ft(t,n,{clamp:i=!0,ease:s,mixer:o}={}){const r=t.length;if(e.invariant(r===n.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),n=[...n].reverse());const l=function(t,n,i){const s=[],o=i||e.MotionGlobalConfig.mix||lt,r=t.length-1;for(let i=0;i{if(a&&i1)for(;su(e.clamp(t[0],t[r-1],n)):u}function Ot(t,n){const i=t[t.length-1];for(let s=1;s<=n;s++){const o=e.progress(0,n,s);t.push(Z(i,1,o))}}function It(t){const e=[0];return Ot(e,t.length-1),e}function Ut(t,e){return t.map(t=>t*e)}function Nt(t,n){return t.map(()=>n||e.easeInOut).splice(0,t.length-1)}function $t({duration:t=300,keyframes:n,times:i,ease:s="easeInOut"}){const o=e.isEasingArray(s)?s.map(e.easingDefinitionToFunction):e.easingDefinitionToFunction(s),r={done:!1,value:n[0]},a=Ft(Ut(i&&i.length===n.length?i:It(n),t),n,{ease:Array.isArray(o)?o:Nt(n,o)});return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}const Wt=t=>null!==t;function zt(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Wt),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Kt={decay:Lt,inertia:Lt,tween:$t,keyframes:$t,spring:Ct};function Yt(t){"string"==typeof t.type&&(t.type=Kt[t.type])}class Xt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Gt=t=>t/100;class qt extends Xt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==h.now()&&this.tick(h.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},d.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Yt(t);const{type:n=$t,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||$t;l!==$t&&"number"!=typeof a[0]&&(this.mixKeyframes=e.pipe(Gt,lt(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});"mirror"===o&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),null===c.calculatedDuration&&(c.calculatedDuration=dt(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x,T=this.currentTime,w=i;if(h){const t=Math.min(this.currentTime,s)/a;let n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&n--,n=Math.min(n,h+1);Boolean(n%2)&&("reverse"===d?(i=1-i,p&&(i-=p/a)):"mirror"===d&&(w=r)),T=e.clamp(0,1,i)*a}v?(this.delayState.value=u[0],x=this.delayState):x=w.next(T),o&&!v&&(x.value=o(x.value));let{done:b}=x;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==Lt&&(x.value=zt(u,this.options,y,this.speed)),f&&f(x.value),S&&this.finish(),x}then(t,e){return this.finished.then(t,e)}get duration(){return e.millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(this.currentTime)}set time(t){t=e.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return jt(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(h.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=e.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ct,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(h.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,d.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Ht(t){for(let e=1;e180*t/Math.PI,_t=t=>{const e=Zt(Math.atan2(t[1],t[0]));return Qt(e)},Jt={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:_t,rotateZ:_t,skewX:t=>Zt(Math.atan(t[1])),skewY:t=>Zt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Qt=t=>((t%=360)<0&&(t+=360),t),te=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ee=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),ne={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:te,scaleY:ee,scale:t=>(te(t)+ee(t))/2,rotateX:t=>Qt(Zt(Math.atan2(t[6],t[5]))),rotateY:t=>Qt(Zt(Math.atan2(-t[2],t[0]))),rotateZ:_t,rotate:_t,skewX:t=>Zt(Math.atan(t[4])),skewY:t=>Zt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ie(t){return t.includes("scale")?1:0}function se(t,e){if(!t||"none"===t)return ie(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=ne,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Jt,s=e}if(!s)return ie(e);const o=i[e],r=s[1].split(",").map(re);return"function"==typeof o?o(r):r[o]}const oe=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return se(n,e)};function re(t){return parseFloat(t.trim())}const ae=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],le=(()=>new Set([...ae,"pathRotation"]))(),ce=t=>t===x||t===C,ue=new Set(["x","y","z"]),he=ae.filter(t=>!ue.has(t));const de={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>se(e,"x"),y:(t,{transform:e})=>se(e,"y")};de.translateX=de.x,de.translateY=de.y;const pe=new Set;let me=!1,fe=!1,ye=!1;function ge(){if(fe){const t=Array.from(pe).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return he.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}fe=!1,me=!1,pe.forEach(t=>t.complete(ye)),pe.clear()}function ve(){pe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(fe=!0)})}function xe(){ye=!0,ve(),ge(),ye=!1}class Te{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(pe.add(this),me||(me=!0,o.read(ve),o.resolveKeyframes(ge))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}Ht(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pe.delete(this)}cancel(){"scheduled"===this.state&&(pe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const we=t=>t.startsWith("--");function be(t,e,n){we(e)?t.style.setProperty(e,n):t.style[e]=n}const Se={};function Ve(t,n){const i=e.memo(t);return()=>Se[n]??i()}const Ae=Ve(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Pe=Ve(()=>void 0!==window.ViewTimeline,"viewTimeline"),Me=Ve(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Ee=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,ke={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ee([0,.65,.55,1]),circOut:Ee([.55,0,1,.45]),backIn:Ee([.31,.01,.66,-.59]),backOut:Ee([.33,1.53,.69,.99])};function De(t,n){return t?"function"==typeof t?Me()?ut(t,n):"ease-out":e.isBezierDefinition(t)?Ee(t):Array.isArray(t)?t.map(t=>De(t,n)||ke.easeOut):ke[t]:void 0}function Re(t,e,n,{delay:s=0,duration:o=300,repeat:r=0,repeatType:a="loop",ease:l="easeOut",times:c}={},u=void 0){const h={[e]:n};c&&(h.offset=c);const p=De(l,o);Array.isArray(p)&&(h.easing=p),i.value&&d.waapi++;const m={delay:s,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};u&&(m.pseudoElement=u);const f=t.animate(h,m);return i.value&&f.finished.finally(()=>{d.waapi--}),f}function Be(t){return"function"==typeof t&&"applyToOptions"in t}function Ce({type:t,...e}){return Be(t)&&Me()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class je extends Xt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=t,e.invariant("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=Ce(t);this.animation=Re(n,i,s,c,o),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=zt(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t),be(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return e.millisecondsToSeconds(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(t){const n=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=e.secondsToMilliseconds(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Ae()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),e.noop):s(this)}}const Le={anticipate:e.anticipate,backInOut:e.backInOut,circInOut:e.circInOut};function Fe(t){"string"==typeof t.ease&&t.ease in Le&&(t.ease=Le[t.ease])}class Oe extends je{constructor(t){Fe(t),Yt(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(void 0!==t)return void n.set(t);const a=new qt({...r,autoplay:!1}),l=Math.max(10,h.now()-this.startTime),c=e.clamp(0,10,l-10),u=a.sample(l).value,{name:d}=this.options;o&&d&&be(o,d,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const Ie=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!X.test(t)&&"0"!==t||t.startsWith("url(")));function Ue(t){t.duration=0,t.type="keyframes"}const Ne=new Set(["opacity","clipPath","filter","transform"]),$e=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const We=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),ze=e.memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ke(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return ze()&&n&&(Ne.has(n)||We.has(n)&&function(t){for(let e=0;e{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=h.now();const d={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...u},p=c?.KeyframeResolver||Te;this.keyframeResolver=new p(r,(t,e,n)=>this.onKeyframesResolved(t,e,d,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=h.now();let d=!0;(function(t,n,i,s){const o=t[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=t[t.length-1],a=Ie(o,n),l=Ie(r,n);return e.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},m=d&&!c&&Ke(p),f=p.motionValue?.owner?.current;let y;if(m)try{y=new Oe({...p,element:f})}catch{y=new qt(p)}else y=new qt(p);y.finished.then(()=>{this.notifyFinished()}).catch(e.noop),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),xe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Xe{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Ge(this.animations,"duration")}get iterationDuration(){return Ge(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Ge(t,e){let n=0;for(let i=0;in&&(n=s)}return n}class qe extends je{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const He=new WeakMap;function Ze(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const _e={current:void 0};class Je{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=h.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=h.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new e.SubscriptionManager);const i=this.events[t].add(n);return"change"===t?()=>{i(),o.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return _e.current&&_e.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=h.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qe(t,e){return new Je(t,e)}function tn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function en(t,e){const n=t?.[e]??t?.default??t;return n!==t?tn(n,t):n}const nn={type:"spring",stiffness:500,damping:25,restSpeed:10},sn={type:"keyframes",duration:.8},on={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rn=(t,{keyframes:e})=>e.length>2?sn:le.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:nn:on,an=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function ln(t){for(const e in t)if(!an.has(e))return!0;return!1}const cn=(t,n,i,s={},r,a)=>l=>{const c=en(s,t)||{},u=c.delay||s.delay||0;let{elapsed:h=0}=s;h-=e.secondsToMilliseconds(u);const d={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:n.getVelocity(),...c,delay:-h,onUpdate:t=>{n.set(t),c.onUpdate&&c.onUpdate(t)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:t,motionValue:n,element:a?void 0:r};ln(c)||Object.assign(d,rn(t,d)),d.duration&&(d.duration=e.secondsToMilliseconds(d.duration)),d.repeatDelay&&(d.repeatDelay=e.secondsToMilliseconds(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let p=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(Ue(d),0===d.delay&&(p=!0)),(e.MotionGlobalConfig.instantAnimations||e.MotionGlobalConfig.skipAnimations||r?.shouldSkipAnimations||c.skipAnimations)&&(p=!0,Ue(d),d.delay=0),d.allowFlatten=!c.type&&!c.ease,p&&!a&&void 0!==n.get()){const t=zt(d.keyframes,c);if(void 0!==t)return void o.update(()=>{d.onUpdate(t),d.onComplete()})}return c.isSync?new qt(d):new Ye(d)};function un(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function hn(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function dn(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const pn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function mn(t){const e=pn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function fn(t,n,i=1){e.invariant(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=mn(t);if(!s)return;const r=window.getComputedStyle(n).getPropertyValue(s);if(r){const t=r.trim();return e.isNumericalString(t)?parseFloat(t):t}return y(o)?fn(o,n,i+1):o}function yn(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function gn(t,e,n,i){if("function"==typeof e){const[s,o]=yn(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=yn(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function vn(t,e,n){const i=t.getProps();return gn(i,e,void 0!==n?n:i.custom,t)}const xn=new Set(["width","height","top","left","right","bottom",...ae]),Tn=t=>Array.isArray(t);function wn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Qe(n))}function bn(t){return Tn(t)?t[t.length-1]||0:t}function Sn(t,e){const n=vn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){wn(t,e,bn(o[e]))}}const Vn=t=>Boolean(t&&t.getVelocity);function An(t){return Boolean(Vn(t)&&t.add)}function Pn(t,n){const i=t.getValue("willChange");if(An(i))return i.add(n);if(!i&&e.MotionGlobalConfig.WillChange){const i=new e.MotionGlobalConfig.WillChange("auto");t.addValue("willChange",i),i.add(n)}}function Mn(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const En="framerAppearId",kn="data-"+Mn(En);function Dn(t){return t.props[kn]}function Rn({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Bn(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:a,...l}=e;const c=t.getDefaultTransition();r=r?tn(r,c):c;const u=r?.reduceMotion,h=r?.skipAnimations;i&&(r=i);const d=[],p=s&&t.animationState&&t.animationState.getState()[s],m=r?.path;m&&m.animateVisualElement(t,l,r,n,d);for(const e in l){const i=t.getValue(e,t.latestValues[e]??null),s=l[e];if(void 0===s||p&&Rn(p,e))continue;const a={delay:n,...en(r||{},e)};h&&(a.skipAnimations=!0);const c=i.get();if(void 0!==c&&!i.isAnimating()&&!Array.isArray(s)&&s===c&&!a.velocity){o.update(()=>i.set(s));continue}let m=!1;if(window.MotionHandoffAnimation){const n=Dn(t);if(n){const t=window.MotionHandoffAnimation(n,e,o);null!==t&&(a.startTime=t,m=!0)}}Pn(t,e);const f=u??t.shouldReduceMotion;i.start(cn(e,i,s,f&&xn.has(e)?{type:!1}:a,t,m));const y=i.animation;y&&d.push(y)}if(a){const e=()=>o.update(()=>{a&&Sn(t,a)});d.length?Promise.all(d).then(e):e()}return d}function Cn(t,e,n={}){const i=vn(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Bn(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Cn(l,e,{...r,delay:n+("function"==typeof i?0:i)+Ze(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function jn(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Cn(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Cn(t,e,n);else{const s="function"==typeof e?vn(t,e,n.custom):e;i=Promise.all(Bn(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Ln=t=>e=>e.test(t),Fn=[x,C,B,R,L,j,{test:t=>"auto"===t,parse:t=>t}],On=t=>Fn.find(Ln(t));function In(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||e.isZeroValueString(t))}const Un=new Set(["brightness","contrast","saturate","opacity"]);function Nn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(S)||[];if(!i)return t;const s=n.replace(i,"");let o=Un.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const $n=/\b([a-z-]*)\(.*?\)/gu,Wn={...X,getAnimatableNone:t=>{const e=t.match($n);return e?e.map(Nn).join(" "):t}},zn={...X,getAnimatableNone:t=>{const e=X.parse(t);return X.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Kn={...x,transform:Math.round},Yn={rotate:R,pathRotation:R,rotateX:R,rotateY:R,rotateZ:R,scale:w,scaleX:w,scaleY:w,scaleZ:w,skew:R,skewX:R,skewY:R,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:T,originX:F,originY:F,originZ:C},Xn={borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,top:C,right:C,bottom:C,left:C,inset:C,insetBlock:C,insetBlockStart:C,insetBlockEnd:C,insetInline:C,insetInlineStart:C,insetInlineEnd:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,paddingBlock:C,paddingBlockStart:C,paddingBlockEnd:C,paddingInline:C,paddingInlineStart:C,paddingInlineEnd:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,marginBlock:C,marginBlockStart:C,marginBlockEnd:C,marginInline:C,marginInlineStart:C,marginInlineEnd:C,fontSize:C,backgroundPositionX:C,backgroundPositionY:C,...Yn,zIndex:Kn,fillOpacity:T,strokeOpacity:T,numOctaves:Kn},Gn={...Xn,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:Wn,WebkitFilter:Wn,mask:zn,WebkitMask:zn},qn=t=>Gn[t],Hn=new Set([Wn,zn]);function Zn(t,e){let n=qn(t);return Hn.has(n)||(n=X),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const _n=new Set(["auto","none","0"]);class Jn extends Te{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Qn=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);const ti=e.memo(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0});function ei(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function ni(t){return(e,n)=>{const i=ei(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const ii=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class si{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const a=this.values.get(t);a&&a.onRemove();const l=()=>{const i=e.get();this.latest[t]=s?ii(i,Xn[t]):i,n&&o.render(n)};l();const c=e.on("change",l);i&&e.addDependent(i);const u=()=>{c(),n&&r(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:u}),u}get(t){return this.values.get(t)?.value}}function oi(t){const e=new WeakMap;return(n,i)=>{const s=e.get(n)??new si;e.set(n,s);const o=[];for(const e in i){const r=i[e],a=t(n,s,e,r);o.push(a)}return()=>{for(const t of o)t()}}}const ri=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?Mn(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},ai=ni(oi(ri)),li=oi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function ci(t){return e.isObject(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const ui={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const hi=new Set(["originX","originY","originZ"]),di=(t,e,n,i)=>{let s,o;return le.has(n)?(e.get("transform")||(ci(t)||e.get("transformBox")||di(t,e,"transformBox",new Je("fill-box")),e.set("transform",new Je("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=we(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},pi=ni(oi(di));const mi=ni(oi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return o.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new Je("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return ri(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?di:ri)(t,e,n,i)}));const{schedule:fi,cancel:yi}=s(queueMicrotask,!1),gi={x:!1,y:!1};function vi(){return gi.x||gi.y}function xi(t,e){const n=ei(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const Ti=(t,e)=>!!e&&(t===e||Ti(t,e.parentElement)),wi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,bi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Si(t){return bi.has(t.tagName)||!0===t.isContentEditable}const Vi=new Set(["INPUT","SELECT","TEXTAREA"]);const Ai=new WeakSet;function Pi(t){return e=>{"Enter"===e.key&&t(e)}}function Mi(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ei(t){return wi(t)&&!vi()}const ki=new WeakSet;function Di(t){return e.isObject(t)&&"ownerSVGElement"in t}const Ri=new WeakMap;let Bi;const Ci=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Di(i)&&"getBBox"in i?i.getBBox()[e]:i[n],ji=Ci("inline","width","offsetWidth"),Li=Ci("block","height","offsetHeight");function Fi({target:t,borderBoxSize:e}){Ri.get(t)?.forEach(n=>{n(t,{get width(){return ji(t,e)},get height(){return Li(t,e)}})})}function Oi(t){t.forEach(Fi)}function Ii(t,e){Bi||"undefined"!=typeof ResizeObserver&&(Bi=new ResizeObserver(Oi));const n=ei(t);return n.forEach(t=>{let n=Ri.get(t);n||(n=new Set,Ri.set(t,n)),n.add(e),Bi?.observe(t)}),()=>{n.forEach(t=>{const n=Ri.get(t);n?.delete(e),n?.size||Bi?.unobserve(t)})}}const Ui=new Set;let Ni;function $i(t){return Ui.add(t),Ni||(Ni=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ui.forEach(e=>e(t))},window.addEventListener("resize",Ni)),()=>{Ui.delete(t),Ui.size||"function"!=typeof Ni||(window.removeEventListener("resize",Ni),Ni=void 0)}}function Wi(){const{value:t}=i;null!==t?(t.frameloop.rate.push(a.delta),t.animations.mainThread.push(d.mainThread),t.animations.waapi.push(d.waapi),t.animations.layout.push(d.layout)):r(Wi)}function zi(t){return t.reduce((t,e)=>t+e,0)/t.length}function Ki(t,e=zi){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Yi=t=>Math.round(1e3/t);function Xi(){i.value=null,i.addProjectionMetrics=null}function Gi(){const{value:t}=i;if(!t)throw new Error("Stats are not being measured");Xi(),r(Wi);const e={frameloop:{setup:Ki(t.frameloop.setup),rate:Ki(t.frameloop.rate),read:Ki(t.frameloop.read),resolveKeyframes:Ki(t.frameloop.resolveKeyframes),preUpdate:Ki(t.frameloop.preUpdate),update:Ki(t.frameloop.update),preRender:Ki(t.frameloop.preRender),render:Ki(t.frameloop.render),postRender:Ki(t.frameloop.postRender)},animations:{mainThread:Ki(t.animations.mainThread),waapi:Ki(t.animations.waapi),layout:Ki(t.animations.layout)},layoutProjection:{nodes:Ki(t.layoutProjection.nodes),calculatedTargetDeltas:Ki(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Ki(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Yi(n.min),n.max=Yi(n.max),n.avg=Yi(n.avg),[n.min,n.max]=[n.max,n.min],e}function qi(t){return Di(t)&&"svg"===t.tagName}function Hi(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Zi(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=Ft(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function _i(t,e){const n=Qe(Vn(t)?t.get():t);return Ji(n,t,e),n}function Ji(t,e,n={}){const i=t.get();let s,r=null,a=i;const l="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,c=()=>{r&&(r.stop(),r=null),t.animation=void 0},u=()=>{(()=>{const e=ts(t.get()),i=ts(a);if(e===i)return void c();const o=r?r.getGeneratorVelocity():t.getVelocity();c(),r=new qt({keyframes:[e,i],velocity:o,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s})})(),t.animation=r??void 0,t.events.animationStart?.notify(),r?.then(()=>{t.animation=void 0,t.events.animationComplete?.notify()})};if(t.attach((t,e)=>{a=t,s=t=>e(Qi(t,l)),o.postRender(u)},c),Vn(e)){let i=!0===n.skipInitialAnimation;const s=e.on("change",e=>{i?(i=!1,t.jump(Qi(e,l),!1)):t.set(Qi(e,l))}),o=t.on("destroy",s);return()=>{s(),o()}}return c}function Qi(t,e){return e?t+e:t}function ts(t){return"number"==typeof t?t:parseFloat(t)}function es(t){const e=[];_e.current=e;const n=t();_e.current=void 0;const i=Qe(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>o.preRender(i,!1,!0),a=t.map(t=>t.on("change",s));e.on("destroy",()=>{a.forEach(t=>t()),r(i)})}(e,i,t),i}const ns=[...Fn,I,X],is=t=>ns.find(Ln(t));function ss(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let os={},rs=null;const as=(t,e)=>{os[t]=e},ls=()=>{rs||(rs=document.createElement("style"),rs.id="motion-view");let t="";for(const e in os){const n=os[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}rs.textContent=t,document.head.appendChild(rs),os={}},cs=()=>{rs&&rs.parentElement&&rs.parentElement.removeChild(rs)};function us(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function hs(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function ds(){return document.getAnimations().filter(hs)}const ps=["layout","enter","exit","new","old"];function ms(t){const{update:n,targets:i,options:s}=t;if(!document.startViewTransition)return new Promise(async t=>{await n(),t(new Xe([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",i)||as(":root",{"view-transition-name":"none"}),as("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),ls();const o=document.startViewTransition(async()=>{await n()});return o.finished.finally(()=>{cs()}),new Promise(t=>{o.ready.then(()=>{const n=ds(),o=[];i.forEach((t,n)=>{for(const i of ps){if(!t[i])continue;const{keyframes:r,options:a}=t[i];for(let[t,l]of Object.entries(r)){if(!l)continue;const r={...en(s,t),...en(a,t)},c=ss(i);if("opacity"===t&&!Array.isArray(l)){l=["new"===c?0:1,l]}"function"==typeof r.delay&&(r.delay=r.delay(0,1)),r.duration&&(r.duration=e.secondsToMilliseconds(r.duration)),r.delay&&(r.delay=e.secondsToMilliseconds(r.delay));const u=new je({...r,element:document.documentElement,name:t,pseudoElement:`::view-transition-${c}(${n})`,keyframes:l});o.push(u)}}});for(const t of n){if("finished"===t.playState)continue;const{effect:n}=t;if(!(n&&n instanceof KeyframeEffect))continue;const{pseudoElement:r}=n;if(!r)continue;const a=us(r);if(!a)continue;const l=i.get(a.layer);if(l)fs(l,"enter")&&fs(l,"exit")&&n.getKeyframes().some(t=>t.mixBlendMode)?o.push(new qe(t)):t.cancel();else{const i="group"===a.type?"layout":"";let r={...en(s,i)};r.duration&&(r.duration=e.secondsToMilliseconds(r.duration)),r=Ce(r);const l=De(r.ease,r.duration);n.updateTiming({delay:e.secondsToMilliseconds(r.delay??0),duration:r.duration,easing:l}),o.push(new qe(t))}}t(new Xe(o))})})}function fs(t,e){return t?.[e]?.keyframes.opacity}let ys=[],gs=null;function vs(){gs=null;const[t]=ys;var n;t&&(n=t,e.removeItem(ys,n),gs=n,ms(n).then(t=>{n.notifyReady(t),t.finished.finally(vs)}))}function xs(){for(let t=ys.length-1;t>=0;t--){const e=ys[t],{interrupt:n}=e.options;if("immediate"===n){const n=ys.slice(0,t+1).map(t=>t.update),i=ys.slice(t+1);e.update=()=>{n.forEach(t=>t())},ys=[e,...i];break}}gs&&"immediate"!==ys[0]?.options.interrupt||vs()}class Ts{constructor(t,n={}){var i;this.currentSubject="root",this.targets=new Map,this.notifyReady=e.noop,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...n},i=this,ys.push(i),fi.render(xs)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const ws=()=>({translate:0,scale:1,origin:0,originPoint:0}),bs=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Ss=()=>({min:0,max:0}),Vs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),As=new WeakMap;function Ps(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Ms(t){return"string"==typeof t||Array.isArray(t)}const Es=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ks=["initial",...Es];function Ds(t){return Ps(t.animate)||ks.some(e=>Ms(t[e]))}function Rs(t){return Boolean(Ds(t)||t.variants)}function Bs(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Vn(s))t.addValue(i,s);else if(Vn(o))t.addValue(i,Qe(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Qe(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Cs={current:null},js={current:!1},Ls="undefined"!=typeof window;function Fs(){if(js.current=!0,Ls)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Cs.current=t.matches;t.addEventListener("change",e),e()}else Cs.current=!1}const Os=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Is={};class Us{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:r,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Te,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=h.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(js.current||Fs(),this.shouldReduceMotion=Cs.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),r(this.notifyUpdate),r(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Ne.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:s,times:o,ease:r,duration:a}=n.accelerate,l=new je({element:this.current,name:t,keyframes:s,times:o,ease:r,duration:e.secondsToMilliseconds(a)}),c=i(l);return void this.valueSubscriptions.set(t,()=>{c(),l.cancel()})}const i=le.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&o.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),r&&r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Is){const e=Is[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Qe(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,n){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(e.isNumericalString(i)||e.isZeroValueString(i))?i=parseFloat(i):!is(i)&&X.test(n)&&(i=Zn(t,n)),this.setBaseTarget(t,Vn(i)?i.get():i)),Vn(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=gn(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Vn(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,n){return this.events[t]||(this.events[t]=new e.SubscriptionManager),this.events[t].add(n)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){fi.render(this.render)}}class Ns extends Us{constructor(){super(...arguments),this.KeyframeResolver=Jn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Vn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function $s({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ws(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function zs(t){return void 0===t||1===t}function Ks({scale:t,scaleX:e,scaleY:n}){return!zs(t)||!zs(e)||!zs(n)}function Ys(t){return Ks(t)||Xs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Xs(t){return Gs(t.x)||Gs(t.y)}function Gs(t){return t&&"0%"!==t}function qs(t,e,n){return n+e*(t-n)}function Hs(t,e,n,i,s){return void 0!==s&&(t=qs(t,s,i)),qs(t,n,i)+e}function Zs(t,e=0,n=1,i,s){t.min=Hs(t.min,e,n,i,s),t.max=Hs(t.max,e,n,i,s)}function _s(t,{x:e,y:n}){Zs(t.x,e.translate,e.scale,e.originPoint),Zs(t.y,n.translate,n.scale,n.originPoint)}const Js=.999999999999,Qs=1.0000000000001;function to(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;aJs&&(e.x=1),e.yJs&&(e.y=1)}function eo(t,e){t.min+=e,t.max+=e}function no(t,e,n,i,s=.5){Zs(t,e,n,Z(t.min,t.max,s),i)}function io(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function so(t,e,n){const i=n??t;no(t.x,io(e.x,i.x),e.scaleX,e.scale,e.originX),no(t.y,io(e.y,i.y),e.scaleY,e.scale,e.originY)}function oo(t,e){return $s(Ws(t.getBoundingClientRect(),e))}const ro={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ao=ae.length;function lo(t,e,n){let i="",s=!0;for(let o=0;o{if(!e.target)return t;if("string"==typeof t){if(!C.test(t))return t;t=parseFloat(t)}return`${ho(t,e.target.x)}% ${ho(t,e.target.y)}%`}},mo={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=X.parse(t);if(s.length>5)return i;const o=X.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Z(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},fo={borderRadius:{...po,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:po,borderTopRightRadius:po,borderBottomLeftRadius:po,borderBottomRightRadius:po,boxShadow:mo};function yo(t,{layout:e,layoutId:n}){return le.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!fo[t]||"opacity"===t)}function go(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Vn(i[e])||s&&Vn(s[e])||yo(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class vo extends Ns{constructor(){super(...arguments),this.type="html",this.renderInstance=uo}readValueFromInstance(t,e){if(le.has(e))return this.projection?.isProjecting?ie(e):oe(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(m(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return oo(t,e)}build(t,e,n){co(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return go(t,e,n)}}const xo={offset:"stroke-dashoffset",array:"stroke-dasharray"},To={offset:"strokeDashoffset",array:"strokeDasharray"};function wo(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?xo:To;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const bo=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function So(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(co(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const t of bo)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&wo(h,s,o,r,!1)}const Vo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Ao=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Po(t,e,n,i){uo(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Vo.has(n)?n:Mn(n),e.attrs[n])}function Mo(t,e,n){const i=go(t,e,n);for(const n in t)if(Vn(t[n])||Vn(e[n])){i[-1!==ae.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Eo=ks.length;function ko(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&ko(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Wo(t,e,n,i){$o(t.x,e.x,n.x,i?i.originX:void 0),$o(t.y,e.y,n.y,i?i.originY:void 0)}function zo(t,e,n,i=0){const s=i?Z(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Uo(e)}function Ko(t,e,n,i){zo(t.x,e.x,n.x,i?.x),zo(t.y,e.y,n.y,i?.y)}function Yo(t,e,n,i=0){const s=i?Z(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Uo(e)}function Xo(t,e,n,i){Yo(t.x,e.x,n.x,i?.x),Yo(t.y,e.y,n.y,i?.y)}function Go(t,e,n,i,s){return t=qs(t-=e,1/n,i),void 0!==s&&(t=qs(t,1/s,i)),t}function qo(t,e=0,n=1,i=.5,s,o=t,r=t){if(B.test(e)){e=parseFloat(e);e=Z(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Z(o.min,o.max,i);t===o&&(a-=e),t.min=Go(t.min,e,n,a,s),t.max=Go(t.max,e,n,a,s)}function Ho(t,e,[n,i,s],o,r){qo(t,e[n],e[i],e[s],e.scale,o,r)}const Zo=["x","scaleX","originX"],_o=["y","scaleY","originY"];function Jo(t,e,n,i){Ho(t.x,e,Zo,n?n.x:void 0,i?i.x:void 0),Ho(t.y,e,_o,n?n.y:void 0,i?i.y:void 0)}function Qo(t){return 0===t.translate&&1===t.scale}function tr(t){return Qo(t.x)&&Qo(t.y)}function er(t,e){return t.min===e.min&&t.max===e.max}function nr(t,e){return er(t.x,e.x)&&er(t.y,e.y)}function ir(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function sr(t,e){return ir(t.x,e.x)&&ir(t.y,e.y)}function or(t){return Uo(t.x)/Uo(t.y)}function rr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function ar(t){return[t("x"),t("y")]}function lr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,pathRotation:s,rotateX:o,rotateY:r,skewX:a,skewY:l}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotate(${s}deg) `),o&&(i+=`rotateX(${o}deg) `),r&&(i+=`rotateY(${r}deg) `),a&&(i+=`skewX(${a}deg) `),l&&(i+=`skewY(${l}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const cr=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ur=cr.length,hr=t=>"string"==typeof t?parseFloat(t):t,dr=t=>"number"==typeof t||C.test(t);function pr(t,e,n,i,s,o){s?(t.opacity=Z(0,n.opacity??1,fr(i)),t.opacityExit=Z(e.opacity??1,0,yr(i))):o&&(t.opacity=Z(e.opacity??1,n.opacity??1,i));for(let s=0;ssn?1:i(e.progress(t,n,s))}function vr(t,e,n){const i=Vn(t)?t:Qe(t);return i.start(cn("",i,e,n)),i.animation}function xr(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Tr=(t,e)=>t.depth-e.depth;class wr{constructor(){this.children=[],this.isDirty=!1}add(t){e.addUniqueItem(this.children,t),this.isDirty=!0}remove(t){e.removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Tr),this.isDirty=!1,this.children.forEach(t)}}function br(t,e){const n=h.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(r(i),t(o-e))};return o.setup(i,!0),()=>r(i)}function Sr(t){return Vn(t)?t.get():t}class Vr{constructor(){this.members=[]}add(t){e.addUniqueItem(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(e.removeItem(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(e.removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Ar={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Pr={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Mr=["","X","Y","Z"];let Er=0;function kr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Dr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Dn(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",o,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Dr(i)}function Rr({attachResizeListener:t,defaultParent:n,measureScroll:s,checkIsScrollRoot:c,resetTransform:u}){return class{constructor(t={},e=n?.()){this.id=Er++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,i.value&&(Pr.nodes=Pr.calculatedTargetDeltas=Pr.calculatedProjections=0),this.nodes.forEach(jr),this.nodes.forEach(zr),this.nodes.forEach(Kr),this.nodes.forEach(Lr),i.addProjectionMetrics&&i.addProjectionMetrics(Pr)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;o.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=br(s,250),Ar.hasAnimatedSinceResize&&(Ar.hasAnimatedSinceResize=!1,this.nodes.forEach(Wr)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Zr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!sr(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...en(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||Wr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),r(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Yr),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Dr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Uo(this.snapshot.measuredBox.x)||Uo(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t{const n=e/1e3,i=p?.(n);var c,m,f,y;i?(r.x.translate=i.x,r.x.scale=Z(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Z(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(Gr(r.x,t.x,n),Gr(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xo(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,y=n,qr(c.x,m.x,f.x,y),qr(c.y,m.y,f.y,y),d&&nr(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Oo(d,this.relativeTarget)),l&&(this.animationValues=o,pr(o,s,this.latestValues,n,h,u)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(r(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=o.update(()=>{Ar.hasAnimatedSinceResize=!0,d.layout++,this.motionValue||(this.motionValue=Qe(0)),this.motionValue.jump(0,!1),this.currentAnimation=vr(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{d.layout--},onComplete:()=>{d.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&ta(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Uo(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Uo(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Oo(e,n),so(e,s),Wo(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Vr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&kr("z",t,i,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(Or),this.root.sharedNodes.clear()}}}function Br(t){t.updateLayout()}function Cr(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)ar(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Uo(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";Fo(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else ta(s,e.layoutBox,n)&&ar(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Uo(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Wo(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Wo(a,t.applyTransform(i,!0),e.measuredBox):Wo(a,n,e.layoutBox);const l=!tr(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};Xo(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};Xo(l,n,o.layoutBox,r),sr(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function jr(t){i.value&&Pr.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Lr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Fr(t){t.clearSnapshot()}function Or(t){t.clearMeasurements()}function Ir(t){t.isLayoutDirty=!0,t.updateLayout()}function Ur(t){t.isLayoutDirty=!1}function Nr(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function $r(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Wr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function zr(t){t.resolveTargetDelta()}function Kr(t){t.calcProjection()}function Yr(t){t.resetSkewAndRotation()}function Xr(t){t.removeLeadSnapshot()}function Gr(t,e,n){t.translate=Z(e.translate,0,n),t.scale=Z(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function qr(t,e,n,i){t.min=Z(e.min,n.min,i),t.max=Z(e.max,n.max,i)}function Hr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Zr={duration:.45,ease:[.4,0,.1,1]},_r=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Jr=_r("applewebkit/")&&!_r("chrome/")?Math.round:e.noop;function Qr(t){t.min=Jr(t.min),t.max=Jr(t.max)}function ta(t,e,n){return"position"===t||"preserve-aspect"===t&&!No(or(e),or(n),.2)}function ea(t){return t!==t.root&&t.scroll?.wasRoot}const na=Rr({attachResizeListener:(t,e)=>xr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ia=t=>!t.isLayoutDirty&&t.willUpdate(!1);const sa={current:void 0},oa=Rr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!sa.current){const t=new na({});t.mount(window),t.setOptions({layoutScroll:!0}),sa.current=t}return sa.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),ra="[data-layout], [data-layout-id]",aa=()=>{};function la(t){const e=Array.from(t.querySelectorAll(ra));return t instanceof Element&&t.matches(ra)&&(e.includes(t)||e.unshift(t)),e}function ca(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e}}function ua(t,e,n){const i=As.get(t),s=i??new vo({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&s.projection||(s.projection=new oa(s.latestValues,e)),s.projection.setOptions({...n,visualElement:s}),s.current?s.projection.instance||s.projection.mount(t):s.mount(t),i||As.set(t,s),{element:t,visualElement:s,projection:s.projection}}function ha(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const da=o,pa=n.reduce((t,e)=>(t[e]=t=>r(t),t),{});t.AsyncMotionValueAnimation=Ye,t.DOMKeyframesResolver=Jn,t.DOMVisualElement=Ns,t.DocumentProjectionNode=na,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=wr,t.GroupAnimation=Xe,t.GroupAnimationWithThen=class extends Xe{then(t,e){return this.finished.finally(t).then(()=>{})}},t.HTMLProjectionNode=oa,t.HTMLVisualElement=vo,t.JSAnimation=qt,t.KeyframeResolver=Te,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=aa,this.rejectReady=aa,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),o.postRender(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=la(this.scope),e=this.buildRecords(t);e.forEach(({projection:t})=>{const e=Boolean(t.currentAnimation),n=Boolean(t.options.layoutId);if(e&&n){const e=function(t){const e=t.targetWithTransforms||t.target;if(!e)return;const n={x:{min:0,max:0},y:{min:0,max:0}},i={x:{min:0,max:0},y:{min:0,max:0}};return Oo(n,e),Oo(i,e),{animationId:t.root?.animationId??0,measuredBox:n,layoutBox:i,latestValues:t.animationValues||t.latestValues||{},source:t.id}}(t);e?t.snapshot=e:t.snapshot&&(t.snapshot=void 0)}else t.snapshot&&(t.currentAnimation||t.isProjecting())&&(t.snapshot=void 0);t.isPresent=!0,t.willUpdate()}),await this.updateDom();const n=la(this.scope),i=this.buildRecords(n);this.handleExitingElements(e,i),i.forEach(({projection:t})=>{const e=t.instance,n=t.resumeFrom?.instance;if(!e||!n)return;if(!("style"in e))return;const i=e.style.transform,s=n.style.transform;i&&s&&i===s&&(e.style.transform="",e.style.transformOrigin="")}),i.forEach(({projection:t})=>{t.isPresent=!0});const s=function(t,e){const n=t[0]||e[0];return n?.projection.root}(i,e);s?.didUpdate(),await new Promise(t=>{o.postRender(()=>t())});const r=function(t){const e=new Set;return t.forEach(t=>{const n=t.projection.currentAnimation;n&&e.add(n)}),Array.from(e)}(i);return new Xe(r)}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=ha(i,n,this.scope),{layout:s,layoutId:o}=ca(i),r=(o?this.sharedTransitions.get(o):void 0)||this.defaultOptions,a=ua(i,t?.projection,{layout:s,layoutId:o,animationType:"string"==typeof s?s:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e){const n=new Set(e.map(t=>t.element));t.forEach(t=>{n.has(t.element)||(t.projection.options.layoutId&&(t.projection.isPresent=!1,t.projection.relegate()),t.visualElement.unmount(),As.delete(t.element))});const i=new Set(t.map(t=>t.element));e.forEach(({element:t,projection:e})=>{i.has(t)&&e.resumeFrom&&!e.resumeFrom.instance&&!e.isLead()&&(e.resumeFrom=void 0,e.snapshot=void 0)})}},t.MotionValue=Je,t.NativeAnimation=je,t.NativeAnimationExtended=Oe,t.NativeAnimationWrapper=qe,t.NodeStack=Vr,t.ObjectVisualElement=class extends Us{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.SVGVisualElement=class extends Ns{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Vs}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(le.has(e)){const t=qn(e);return t&&t.default||0}return e=Vo.has(e)?e:Mn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Mo(t,e,n)}build(t,e,n){So(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){Po(t,e,0,i)}mount(t){this.isSVGTag=Ao(t.tagName),super.mount(t)}},t.ViewTransitionBuilder=Ts,t.VisualElement=Us,t.acceleratedValues=Ne,t.activeAnimations=d,t.addAttrValue=ri,t.addDomEvent=xr,t.addScaleCorrector=function(t){for(const e in t)fo[e]=t[e],m(e)&&(fo[e].isCSSVariable=!0)},t.addStyleValue=di,t.addValueToWillChange=Pn,t.alpha=T,t.analyseComplexValue=z,t.animateMotionValue=cn,t.animateSingleValue=vr,t.animateTarget=Bn,t.animateValue=function(t){return new qt(t)},t.animateVariant=Cn,t.animateView=function(t,e={}){return new Ts(t,e)},t.animateVisualElement=jn,t.animationMapKey=(t,e="")=>`${t}:${e}`,t.applyAxisDelta=Zs,t.applyBoxDelta=_s,t.applyGeneratorOptions=Ce,t.applyPointDelta=Hs,t.applyPxDefaults=function(t,e){for(let n=0;n{const l=a.x-s.x,c=a.y-s.y;let u;u="cw"===i?-t:"ccw"===i?t:(Math.abs(l)>=Math.abs(c)?l:c)<0?-t:t;let h=dn(s.x,s.y,a.x,a.y,u,n);if(void 0===i){const t=Math.abs(l){const n={x:un(t,s.x,h.x,a.x),y:un(t,s.y,h.y,a.y)};if(o){const i=hn(t,s.x,h.x,a.x,s.y,h.y,a.y),r=d+m*t;n.rotate=e.wrap(-180,180,i-r)*o}return n}}}(t),i={interpolateProjection(t){const e=t.x.translate,i=t.y.translate;if(!(Math.sqrt(e*e+i*i)<20))return n({x:e,y:i},{x:0,y:0})},animateVisualElement(t,e,i,s,o){if(!("x"in e)&&!("y"in e))return;const r=t.getValue("x",t.latestValues.x??0),a=t.getValue("y",t.latestValues.y??0),l=e.x,c=e.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=n({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t.getValue("pathRotation",0):void 0,y={delay:s,...en(i||{},"x")};delete y.path;const g=Qe(0);g.start(cn("",g,[0,1e3],{...y,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),g.animation&&o.push(g.animation),delete e.x,delete e.y}};return i},t.aspectRatio=or,t.attachFollow=Ji,t.attachSpring=function(t,e,n){return Ji(t,e,{type:"spring",...n})},t.attrEffect=ai,t.axisDeltaEquals=rr,t.axisEquals=er,t.axisEqualsRounded=ir,t.boxEquals=nr,t.boxEqualsRounded=sr,t.buildHTMLStyles=co,t.buildProjectionTransform=lr,t.buildSVGAttrs=So,t.buildSVGPath=wo,t.buildTransform=lo,t.calcAxisDelta=$o,t.calcBoxDelta=Wo,t.calcChildStagger=Ze,t.calcGeneratorDuration=dt,t.calcLength=Uo,t.calcRelativeAxis=zo,t.calcRelativeAxisPosition=Yo,t.calcRelativeBox=Ko,t.calcRelativePosition=Xo,t.camelCaseAttributes=Vo,t.camelToDash=Mn,t.cancelFrame=r,t.cancelMicrotask=yi,t.cancelSync=pa,t.checkVariantsDidChange=Co,t.cleanDirtyNodes=Lr,t.collectMotionValues=_e,t.color=I,t.compareByDepth=Tr,t.complex=X,t.containsCSSVariable=v,t.convertBoundingBoxToBox=$s,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=Ut,t.copyAxisDeltaInto=Io,t.copyAxisInto=Fo,t.copyBoxInto=Oo,t.correctBorderRadius=po,t.correctBoxShadow=mo,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>jn(t,e,n)))}(t),n=Lo(),i=!0,s=!1;const o=e=>(n,i)=>{const s=vn(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=ko(t.parent)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;ed&&y,w=!1;const b=Array.isArray(f)?f:[f];let S=b.reduce(o(p),{});!1===g&&(S={});const{prevResolvedValues:V={}}=m,A={...V,...S},P=e=>{T=!0,u.has(e)&&(w=!0,u.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in A){const e=S[t],n=V[t];if(h.hasOwnProperty(t))continue;let i=!1;i=Tn(e)&&Tn(n)?!Do(e,n)||x:e!==n,i?null!=e?P(t):u.add(t):void 0!==e&&u.has(t)?P(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=S,m.isActive&&(h={...h,...S}),(i||s)&&t.blockInitialAnimation&&(T=!1);const M=v&&x;T&&(!M||w)&&c.push(...b.map(e=>{const n={type:p};if("string"==typeof e&&(i||s)&&!M&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=vn(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=Ze(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof a.initial){const n=vn(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let p=Boolean(c.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,s=!1,p?e(c):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Lo(),s=!0}}},t.createAxis=Ss,t.createAxisDelta=ws,t.createBox=Vs,t.createDelta=bs,t.createGeneratorEasing=pt,t.createProjectionNode=Rr,t.createRenderBatcher=s,t.cubicBezierAsString=Ee,t.defaultEasing=Nt,t.defaultOffset=It,t.defaultTransformValue=ie,t.defaultValueTypes=Gn,t.degrees=R,t.delay=br,t.delayInSeconds=function(t,n){return br(t,e.secondsToMilliseconds(n))},t.dimensionValueTypes=Fn,t.eachAxis=ar,t.fillOffset=Ot,t.fillWildcards=Ht,t.findDimensionValueType=On,t.findValueType=is,t.flushKeyframeResolvers=xe,t.followValue=_i,t.frame=o,t.frameData=a,t.frameSteps=l,t.generateLinearEasing=ut,t.getAnimatableNone=Zn,t.getAnimationMap=function(t){let e=He.get(t);return e||(e=new Map,He.set(t,e)),e},t.getComputedStyle=function(t,e){const n=window.getComputedStyle(t);return we(e)?n.getPropertyValue(e):n[e]},t.getDefaultTransition=rn,t.getDefaultValueType=qn,t.getFeatureDefinitions=function(){return Is},t.getFinalKeyframe=zt,t.getMixer=st,t.getOptimisedAppearId=Dn,t.getOriginIndex=Hi,t.getValueAsType=ii,t.getValueTransition=en,t.getVariableValue=fn,t.getVariantContext=ko,t.getViewAnimationLayerInfo=us,t.getViewAnimations=ds,t.globalProjectionState=Ar,t.has2DTranslate=Xs,t.hasReducedMotionListener=js,t.hasScale=Ks,t.hasTransform=Ys,t.hex=k,t.hover=function(t,e,n={}){const[i,s,o]=xi(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||vi())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=O,t.hslaToRgba=q,t.inertia=Lt,t.initPrefersReducedMotion=Fs,t.interpolate=Ft,t.invisibleValues=et,t.isAnimationControls=Ps,t.isCSSVariableName=m,t.isCSSVariableToken=y,t.isControllingVariants=Ds,t.isDeltaZero=tr,t.isDragActive=vi,t.isDragging=gi,t.isElementKeyboardAccessible=Si,t.isElementTextInput=function(t){return Vi.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=yo,t.isGenerator=Be,t.isHTMLElement=ci,t.isKeyframesTarget=Tn,t.isMotionValue=Vn,t.isNear=No,t.isNodeOrChild=Ti,t.isPrimaryPointer=wi,t.isSVGElement=Di,t.isSVGSVGElement=qi,t.isSVGTag=Ao,t.isTransitionDefined=ln,t.isVariantLabel=Ms,t.isVariantNode=Rs,t.isWaapiSupportedEasing=function t(n){return Boolean("function"==typeof n&&Me()||!n||"string"==typeof n&&(n in ke||Me())||e.isBezierDefinition(n)||Array.isArray(n)&&n.every(t))},t.isWillChangeMotionValue=An,t.keyframes=$t,t.makeAnimationInstant=Ue,t.mapEasingToNativeEasing=De,t.mapValue=function(t,e,n,i){const s=Zi(e,n,i);return es(()=>s(t.get()))},t.maxGeneratorDuration=ht,t.measurePageBox=function(t,e,n){const i=oo(t,n),{scroll:s}=e;return s&&(eo(i.x,s.offset.x),eo(i.y,s.offset.y)),i},t.measureViewportBox=oo,t.microtask=fi,t.mix=lt,t.mixArray=ot,t.mixColor=tt,t.mixComplex=at,t.mixImmediate=H,t.mixLinearColor=_,t.mixNumber=Z,t.mixObject=rt,t.mixValues=pr,t.mixVisibility=nt,t.motionValue=Qe,t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(ia);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.number=x,t.numberValueTypes=Xn,t.observeTimeline=function(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return o.preUpdate(i,!0),()=>r(i)},t.optimizedAppearDataAttribute=kn,t.optimizedAppearDataId=En,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:ei(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=mn,t.parseValueFromTransform=se,t.percent=B,t.pixelsToPercent=ho,t.positionalKeys=xn,t.prefersReducedMotion=Cs,t.press=function(t,e,n={}){const[i,s,o]=xi(t,n),r=t=>{const i=t.currentTarget;if(!Ei(t))return;if(ki.has(t))return;Ai.add(i),n.stopPropagation&&ki.add(t);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Ai.has(i)&&Ai.delete(i),Ei(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Ti(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),ci(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Pi(()=>{if(Ai.has(n))return;Mi(n,"down");const t=Pi(()=>{Mi(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Mi(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),Si(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progressPercentage=F,t.propEffect=li,t.propagateDirtyNodes=jr,t.px=C,t.readTransformValue=oe,t.recordStats=function(){if(i.value)throw Xi(),new Error("Stats are already being measured");const t=i;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},o.postRender(Wi,!0),Gi},t.removeAxisDelta=qo,t.removeAxisTransforms=Ho,t.removeBoxTransforms=Jo,t.removePointDelta=Go,t.renderHTML=uo,t.renderSVG=Po,t.resize=function(t,e){return"function"==typeof t?$i(t):Ii(t,e)},t.resolveElements=ei,t.resolveMotionValue=Sr,t.resolveTransition=tn,t.resolveVariant=vn,t.resolveVariantFromProps=gn,t.rgbUnit=M,t.rgba=E,t.rootProjectionNode=sa,t.scale=w,t.scaleCorrectors=fo,t.scalePoint=qs,t.scrapeHTMLMotionValuesFromProps=go,t.scrapeSVGMotionValuesFromProps=Mo,t.setDragLock=function(t){return"x"===t||"y"===t?gi[t]?null:(gi[t]=!0,()=>{gi[t]=!1}):gi.x||gi.y?null:(gi.x=gi.y=!0,()=>{gi.x=gi.y=!1})},t.setFeatureDefinitions=function(t){Is=t},t.setStyle=be,t.setTarget=Sn,t.spring=Ct,t.springValue=function(t,e){return _i(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:n=0,from:i=0,ease:s}={}){return(o,r)=>{const a="number"==typeof i?i:Hi(i,r),l=Math.abs(a-o);let c=t*l;if(s){const n=r*t;c=e.easingDefinitionToFunction(s)(c/n)*n}return n+c}},t.startWaapiAnimation=Re,t.statsBuffer=i,t.styleEffect=pi,t.supportedWaapiEasing=ke,t.supportsBrowserAnimation=Ke,t.supportsFlags=Se,t.supportsLinearEasing=Me,t.supportsPartialKeyframes=ti,t.supportsScrollTimeline=Ae,t.supportsViewTimeline=Pe,t.svgEffect=mi,t.sync=da,t.testValueType=Ln,t.time=h,t.transform=Zi,t.transformAxis=no,t.transformBox=so,t.transformBoxPoints=Ws,t.transformPropOrder=ae,t.transformProps=le,t.transformValue=es,t.transformValueTypes=Yn,t.translateAxis=eo,t.updateMotionValuesFromProps=Bs,t.variantPriorityOrder=Es,t.variantProps=ks,t.vh=j,t.visualElementStore=As,t.vw=L}); diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-motion-value.js b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-motion-value.js deleted file mode 100644 index 9ecc6402..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-motion-value.js +++ /dev/null @@ -1,2 +0,0 @@ -const t={};class e{constructor(){this.subscriptions=[]}add(t){var e,s;return e=this.subscriptions,s=t,-1===e.indexOf(s)&&e.push(s),()=>function(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}(this.subscriptions,t)}notify(t,e,s){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,s);else for(let n=0;nn=!0,c=s.reduce((t,e)=>(t[e]=function(t){let e=new Set,s=new Set,i=!1,n=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function o(e){r.has(e)&&(c.schedule(e),t()),e(a)}const c={schedule:(t,n=!1,a=!1)=>{const o=a&&i?e:s;return n&&r.add(t),o.add(t),t},cancel:t=>{s.delete(t),r.delete(t)},process:t=>{if(a=t,i)return void(n=!0);i=!0;const r=e;e=s,s=r,e.forEach(o),e.clear(),i=!1,n&&(n=!1,c.process(t))}};return c}(o),t),{}),{setup:h,read:d,resolveKeyframes:p,preUpdate:u,update:l,preRender:v,render:m,postRender:f}=c,g=()=>{const s=t.useManualTiming,o=s?a.timestamp:performance.now();n=!1,s||(a.delta=r?1e3/60:Math.max(Math.min(o-a.timestamp,40),1)),a.timestamp=o,a.isProcessing=!0,h.process(a),d.process(a),p.process(a),u.process(a),l.process(a),v.process(a),m.process(a),f.process(a),a.isProcessing=!1,n&&i&&(r=!1,e(g))};return{schedule:s.reduce((t,s)=>{const i=c[s];return t[s]=(t,s=!1,o=!1)=>(n||(n=!0,r=!0,a.isProcessing||e(g)),i.schedule(t,s,o)),t},{}),cancel:t=>{for(let e=0;et,!0);let a;function o(){a=void 0}const c={now:()=>(void 0===a&&c.set(r.isProcessing||t.useManualTiming?r.timestamp:performance.now()),a),set:t=>{a=t,queueMicrotask(o)}},h={current:void 0};class d{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=c.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=c.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new e);const i=this.events[t].add(s);return"change"===t?()=>{i(),n.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return h.current&&h.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=c.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return s=parseFloat(this.current)-parseFloat(this.prevFrameValue),(i=e)?s*(1e3/i):0;var s,i}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function p(t,e){return new d(t,e)}export{d as MotionValue,h as collectMotionValues,p as motionValue}; -//# sourceMappingURL=size-rollup-motion-value.js.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-motion-value.js.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-motion-value.js.map deleted file mode 100644 index 247165fa..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-motion-value.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"size-rollup-motion-value.js","sources":["../../motion-utils/dist/es/global-config.mjs","../../motion-utils/dist/es/subscription-manager.mjs","../../motion-utils/dist/es/array.mjs","../../motion-utils/dist/es/velocity-per-second.mjs","../lib/frameloop/order.js","../lib/frameloop/batcher.js","../lib/frameloop/render-step.js","../lib/frameloop/frame.js","../../motion-utils/dist/es/noop.mjs","../lib/frameloop/sync-time.js","../lib/value/index.js"],"sourcesContent":["const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n//# sourceMappingURL=global-config.mjs.map\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n//# sourceMappingURL=subscription-manager.mjs.map\n","function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n//# sourceMappingURL=array.mjs.map\n","/*\n Convert velocity into velocity per second\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0;\n\nexport { velocityPerSecond };\n//# sourceMappingURL=velocity-per-second.mjs.map\n","export const stepsOrder = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n//# sourceMappingURL=order.js.map","import { MotionGlobalConfig } from \"motion-utils\";\nimport { stepsOrder } from \"./order\";\nimport { createRenderStep } from \"./render-step\";\nconst maxElapsed = 40;\nexport function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming;\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n//# sourceMappingURL=batcher.js.map","import { statsBuffer } from \"../stats/buffer\";\nexport function createRenderStep(runNextFrame, stepName) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n let numCalls = 0;\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n numCalls++;\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame;\n thisFrame = nextFrame;\n nextFrame = prevFrame;\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n /**\n * If we're recording stats then\n */\n if (stepName && statsBuffer.value) {\n statsBuffer.value.frameloop[stepName].push(numCalls);\n }\n numCalls = 0;\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n//# sourceMappingURL=render-step.js.map","import { noop } from \"motion-utils\";\nimport { createRenderBatcher } from \"./batcher\";\nexport const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n//# sourceMappingURL=frame.js.map","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n//# sourceMappingURL=noop.mjs.map\n","import { MotionGlobalConfig } from \"motion-utils\";\nimport { frameData } from \"./frame\";\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nexport const time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n//# sourceMappingURL=sync-time.js.map","import { SubscriptionManager, velocityPerSecond, warnOnce, } from \"motion-utils\";\nimport { frame } from \"../frameloop\";\nimport { time } from \"../frameloop/sync-time\";\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nexport const collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nexport class MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init, options = {}) {\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.events.change?.notify(this.current);\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return \n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n dirty() {\n this.events.change?.notify(this.current);\n }\n addDependent(dependent) {\n if (!this.dependents) {\n this.dependents = new Set();\n }\n this.dependents.add(dependent);\n }\n removeDependent(dependent) {\n if (this.dependents) {\n this.dependents.delete(dependent);\n }\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nexport function motionValue(init, options) {\n return new MotionValue(init, options);\n}\n//# sourceMappingURL=index.js.map"],"names":["MotionGlobalConfig","SubscriptionManager","constructor","this","subscriptions","add","handler","arr","item","indexOf","push","index","splice","removeItem","notify","a","b","c","numSubscriptions","length","i","getSize","clear","stepsOrder","createRenderBatcher","scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","state","delta","timestamp","isProcessing","flagRunNextFrame","steps","reduce","acc","key","thisFrame","Set","nextFrame","flushNextFrame","toKeepAlive","WeakSet","latestFrameData","triggerCallback","callback","has","step","schedule","keepAlive","immediate","queue","cancel","delete","process","frameData","prevFrame","forEach","createRenderStep","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","useManualTiming","performance","now","Math","max","min","frame","requestAnimationFrame","any","clearTime","undefined","time","set","newTime","queueMicrotask","collectMotionValues","current","MotionValue","init","options","canTrackVelocity","events","updateAndNotify","v","currentTime","updatedAt","setPrevFrameValue","prev","setCurrent","change","dependents","dependent","dirty","hasAnimated","owner","value","isNaN","parseFloat","prevFrameValue","prevUpdatedAt","onChange","subscription","on","eventName","unsubscribe","stop","clearListeners","eventManagers","attach","passiveEffect","stopPassiveEffect","setWithVelocity","jump","endAnimation","addDependent","removeDependent","get","getPrevious","getVelocity","velocity","frameDuration","start","startAnimation","Promise","resolve","animation","animationStart","then","animationComplete","clearAnimation","animationCancel","isAnimating","destroy","motionValue"],"mappings":"AAAA,MAAMA,EAAqB,CAAA,ECE3B,MAAMC,EACF,WAAAC,GACIC,KAAKC,cAAgB,EACzB,CACA,GAAAC,CAAIC,GCNR,IAAuBC,EAAKC,EDQpB,OCReD,EDODJ,KAAKC,cCPCI,EDOcF,GCNZ,IAAtBC,EAAIE,QAAQD,IACZD,EAAIG,KAAKF,GDMF,ICJf,SAAoBD,EAAKC,GACrB,MAAMG,EAAQJ,EAAIE,QAAQD,GACtBG,GAAQ,GACRJ,EAAIK,OAAOD,EAAO,EAC1B,CDAqBE,CAAWV,KAAKC,cAAeE,EAChD,CACA,MAAAQ,CAAOC,EAAGC,EAAGC,GACT,MAAMC,EAAmBf,KAAKC,cAAce,OAC5C,GAAKD,EAEL,GAAyB,IAArBA,EAIAf,KAAKC,cAAc,GAAGW,EAAGC,EAAGC,QAG5B,IAAK,IAAIG,EAAI,EAAGA,EAAIF,EAAkBE,IAAK,CAKvC,MAAMd,EAAUH,KAAKC,cAAcgB,GACnCd,GAAWA,EAAQS,EAAGC,EAAGC,EAC7B,CAER,CACA,OAAAI,GACI,OAAOlB,KAAKC,cAAce,MAC9B,CACA,KAAAG,GACInB,KAAKC,cAAce,OAAS,CAChC,EEhCJ,MCJaI,EAAa,CACtB,QACA,OACA,mBACA,YACA,SACA,YACA,SACA,cCJG,SAASC,EAAoBC,EAAmBC,GACnD,IAAIC,GAAe,EACfC,GAAoB,EACxB,MAAMC,EAAQ,CACVC,MAAO,EACPC,UAAW,EACXC,cAAc,GAEZC,EAAmB,IAAON,GAAe,EACzCO,EAAQX,EAA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KACArI,KAAKuF,OAAO+C,mBACZtI,KAAKuF,OAAO+C,kBAAkB3H,SAElCX,KAAKuI,kBAEb,CAMA,IAAAxB,GACQ/G,KAAKmI,YACLnI,KAAKmI,UAAUpB,OACX/G,KAAKuF,OAAOiD,iBACZxI,KAAKuF,OAAOiD,gBAAgB7H,UAGpCX,KAAKuI,gBACT,CAMA,WAAAE,GACI,QAASzI,KAAKmI,SAClB,CACA,cAAAI,UACWvI,KAAKmI,SAChB,CAUA,OAAAO,GACI1I,KAAKgG,YAAY7E,QACjBnB,KAAKuF,OAAOmD,SAAS/H,SACrBX,KAAKgH,iBACLhH,KAAK+G,OACD/G,KAAKoH,mBACLpH,KAAKoH,mBAEb,EAEG,SAASuB,EAAYvD,EAAMC,GAC9B,OAAO,IAAIF,EAAYC,EAAMC,EACjC"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-style-effect.js b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-style-effect.js deleted file mode 100644 index 0ec672ea..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-style-effect.js +++ /dev/null @@ -1,2 +0,0 @@ -const t=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],e=(()=>new Set([...t,"pathRotation"]))();const s={};class n{constructor(){this.subscriptions=[]}add(t){var e,s;return e=this.subscriptions,s=t,-1===e.indexOf(s)&&e.push(s),()=>function(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}(this.subscriptions,t)}notify(t,e,s){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,s);else for(let i=0;in=!0,c=i.reduce((t,e)=>(t[e]=function(t){let e=new Set,s=new Set,n=!1,i=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function o(e){r.has(e)&&(c.schedule(e),t()),e(a)}const c={schedule:(t,i=!1,a=!1)=>{const o=a&&n?e:s;return i&&r.add(t),o.add(t),t},cancel:t=>{s.delete(t),r.delete(t)},process:t=>{if(a=t,n)return void(i=!0);n=!0;const r=e;e=s,s=r,e.forEach(o),e.clear(),n=!1,i&&(i=!1,c.process(t))}};return c}(o),t),{}),{setup:d,read:h,resolveKeyframes:p,preUpdate:l,update:u,preRender:f,render:m,postRender:g}=c,v=()=>{const i=s.useManualTiming,o=i?a.timestamp:performance.now();n=!1,i||(a.delta=r?1e3/60:Math.max(Math.min(o-a.timestamp,40),1)),a.timestamp=o,a.isProcessing=!0,d.process(a),h.process(a),p.process(a),l.process(a),u.process(a),f.process(a),m.process(a),g.process(a),a.isProcessing=!1,n&&e&&(r=!1,t(v))};return{schedule:i.reduce((e,s)=>{const i=c[s];return e[s]=(e,s=!1,o=!1)=>(n||(n=!0,r=!0,a.isProcessing||t(v)),i.schedule(e,s,o)),e},{}),cancel:t=>{for(let e=0;et,!0);let d;function h(){d=void 0}const p={now:()=>(void 0===d&&p.set(c.isProcessing||s.useManualTiming?c.timestamp:performance.now()),d),set:t=>{d=t,queueMicrotask(h)}};class l{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=p.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=p.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new n);const s=this.events[t].add(e);return"change"===t?()=>{s(),a.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=p.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return s=parseFloat(this.current)-parseFloat(this.prevFrameValue),(n=e)?s*(1e3/n):0;var s,n}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function u(t){return(e,s)=>{const n=function(t){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){const e=document.querySelectorAll(t);return e?Array.from(e):[]}return Array.from(t).filter(t=>null!=t)}(e),i=[];for(const e of n){const n=t(e,s);i.push(n)}return()=>{for(const t of i)t()}}}const f={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},m={...f,transform:t=>((t,e,s)=>s>e?e:s({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),w=y("deg"),b=y("%"),k=y("px"),A=(()=>({...b,parse:t=>b.parse(t)/100,transform:t=>b.transform(100*t)}))(),P={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,inset:k,insetBlock:k,insetBlockStart:k,insetBlockEnd:k,insetInline:k,insetInlineStart:k,insetInlineEnd:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,paddingBlock:k,paddingBlockStart:k,paddingBlockEnd:k,paddingInline:k,paddingInlineStart:k,paddingInlineEnd:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,marginBlock:k,marginBlockStart:k,marginBlockEnd:k,marginInline:k,marginInlineStart:k,marginInlineEnd:k,fontSize:k,backgroundPositionX:k,backgroundPositionY:k,...{rotate:w,pathRotation:w,rotateX:w,rotateY:w,rotateZ:w,scale:g,scaleX:g,scaleY:g,scaleZ:g,skew:w,skewX:w,skewY:w,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:m,originX:A,originY:A,originZ:k},zIndex:v,fillOpacity:m,strokeOpacity:m,numOctaves:v};class R{constructor(){this.latest={},this.values=new Map}set(t,e,s,n,i=!0){const r=this.values.get(t);r&&r.onRemove();const c=()=>{const n=e.get();this.latest[t]=i?((t,e)=>e&&"number"==typeof t?e.transform(t):t)(n,P[t]):n,s&&a.render(s)};c();const d=e.on("change",c);n&&e.addDependent(n);const h=()=>{d(),s&&o(s),this.values.delete(t),n&&e.removeDependent(n)};return this.values.set(t,{value:e,onRemove:h}),h}get(t){return this.values.get(t)?.value}}function S(t){const e=new WeakMap;return(s,n)=>{const i=e.get(s)??new R;e.set(s,i);const r=[];for(const e in n){const a=n[e],o=t(s,i,e,a);r.push(o)}return()=>{for(const t of r)t()}}}const E={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const B=new Set(["originX","originY","originZ"]),F=(s,n,i,r)=>{let a,o;return e.has(i)?(n.get("transform")||(function(t){return"object"==typeof(e=t)&&null!==e&&"offsetHeight"in t&&!("ownerSVGElement"in t);var e}(s)||n.get("transformBox")||F(s,n,"transformBox",new l("fill-box")),n.set("transform",new l("none"),()=>{s.style.transform=function(e){let s="",n=!0;for(let i=0;i{const t=n.latest.originX??"50%",e=n.latest.originY??"50%",i=n.latest.originZ??0;s.style.transformOrigin=`${t} ${e} ${i}`}),o=n.get("transformOrigin")):a=i.startsWith("--")?()=>{s.style.setProperty(i,n.latest[i])}:()=>{s.style[i]=n.latest[i]},n.set(i,r,a,o)},x=u(S(F));export{F as addStyleValue,x as styleEffect}; -//# sourceMappingURL=size-rollup-style-effect.js.map diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-style-effect.js.map b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-style-effect.js.map deleted file mode 100644 index fd605350..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/dist/size-rollup-style-effect.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"size-rollup-style-effect.js","sources":["../lib/render/dom/is-css-var.js","../lib/render/utils/keys-transform.js","../../motion-utils/dist/es/clamp.mjs","../../motion-utils/dist/es/global-config.mjs","../../motion-utils/dist/es/subscription-manager.mjs","../../motion-utils/dist/es/array.mjs","../lib/frameloop/order.js","../lib/frameloop/batcher.js","../lib/frameloop/render-step.js","../lib/frameloop/frame.js","../../motion-utils/dist/es/noop.mjs","../lib/frameloop/sync-time.js","../lib/value/index.js","../../motion-utils/dist/es/velocity-per-second.mjs","../lib/effects/utils/create-dom-effect.js","../lib/utils/resolve-elements.js","../lib/value/types/numbers/index.js","../lib/value/types/int.js","../lib/value/types/numbers/units.js","../lib/value/types/maps/number.js","../lib/value/types/maps/transform.js","../lib/effects/MotionValueState.js","../lib/value/types/utils/get-as-type.js","../lib/effects/utils/create-effect.js","../lib/effects/style/transform.js","../lib/effects/style/index.js","../lib/utils/is-html-element.js","../../motion-utils/dist/es/is-object.mjs"],"sourcesContent":["export const isCSSVar = (name) => name.startsWith(\"--\");\n//# sourceMappingURL=is-css-var.js.map","/**\n * Generate a list of every possible transform key.\n */\nexport const transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n *\n * `pathRotation` is a transform for routing purposes (skipped from raw\n * style application, wired to the transform composite, flags transform\n * dirty) but is intentionally NOT in `transformPropOrder` — it is\n * composed onto `rotate` at the build sites, not serialized in its own\n * slot, and must stay out of the order-array consumers (parse-transform,\n * unit-conversion, keys-position).\n */\nexport const transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, \"pathRotation\"]))();\n//# sourceMappingURL=keys-transform.js.map","const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n//# sourceMappingURL=clamp.mjs.map\n","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n//# sourceMappingURL=global-config.mjs.map\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n//# sourceMappingURL=subscription-manager.mjs.map\n","function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n//# sourceMappingURL=array.mjs.map\n","export const stepsOrder = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n//# sourceMappingURL=order.js.map","import { MotionGlobalConfig } from \"motion-utils\";\nimport { stepsOrder } from \"./order\";\nimport { createRenderStep } from \"./render-step\";\nconst maxElapsed = 40;\nexport function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming;\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n//# sourceMappingURL=batcher.js.map","import { statsBuffer } from \"../stats/buffer\";\nexport function createRenderStep(runNextFrame, stepName) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n let numCalls = 0;\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n numCalls++;\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame;\n thisFrame = nextFrame;\n nextFrame = prevFrame;\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n /**\n * If we're recording stats then\n */\n if (stepName && statsBuffer.value) {\n statsBuffer.value.frameloop[stepName].push(numCalls);\n }\n numCalls = 0;\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n//# sourceMappingURL=render-step.js.map","import { noop } from \"motion-utils\";\nimport { createRenderBatcher } from \"./batcher\";\nexport const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n//# sourceMappingURL=frame.js.map","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n//# sourceMappingURL=noop.mjs.map\n","import { MotionGlobalConfig } from \"motion-utils\";\nimport { frameData } from \"./frame\";\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nexport const time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n//# sourceMappingURL=sync-time.js.map","import { SubscriptionManager, velocityPerSecond, warnOnce, } from \"motion-utils\";\nimport { frame } from \"../frameloop\";\nimport { time } from \"../frameloop/sync-time\";\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nexport const collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nexport class MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init, options = {}) {\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.events.change?.notify(this.current);\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return \n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n dirty() {\n this.events.change?.notify(this.current);\n }\n addDependent(dependent) {\n if (!this.dependents) {\n this.dependents = new Set();\n }\n this.dependents.add(dependent);\n }\n removeDependent(dependent) {\n if (this.dependents) {\n this.dependents.delete(dependent);\n }\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nexport function motionValue(init, options) {\n return new MotionValue(init, options);\n}\n//# sourceMappingURL=index.js.map","/*\n Convert velocity into velocity per second\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0;\n\nexport { velocityPerSecond };\n//# sourceMappingURL=velocity-per-second.mjs.map\n","import { resolveElements, } from \"../../utils/resolve-elements\";\nexport function createSelectorEffect(subjectEffect) {\n return (subject, values) => {\n const elements = resolveElements(subject);\n const subscriptions = [];\n for (const element of elements) {\n const remove = subjectEffect(element, values);\n subscriptions.push(remove);\n }\n return () => {\n for (const remove of subscriptions)\n remove();\n };\n };\n}\n//# sourceMappingURL=create-dom-effect.js.map","export function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector == null) {\n return [];\n }\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector).filter((element) => element != null);\n}\n//# sourceMappingURL=resolve-elements.js.map","import { clamp } from \"motion-utils\";\nexport const number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nexport const alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nexport const scale = {\n ...number,\n default: 1,\n};\n//# sourceMappingURL=index.js.map","import { number } from \"./numbers\";\nexport const int = {\n ...number,\n transform: Math.round,\n};\n//# sourceMappingURL=int.js.map","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nexport const degrees = /*@__PURE__*/ createUnitType(\"deg\");\nexport const percent = /*@__PURE__*/ createUnitType(\"%\");\nexport const px = /*@__PURE__*/ createUnitType(\"px\");\nexport const vh = /*@__PURE__*/ createUnitType(\"vh\");\nexport const vw = /*@__PURE__*/ createUnitType(\"vw\");\nexport const progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n}))();\n//# sourceMappingURL=units.js.map","import { int } from \"../int\";\nimport { alpha } from \"../numbers\";\nimport { px } from \"../numbers/units\";\nimport { transformValueTypes } from \"./transform\";\nexport const numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n inset: px,\n insetBlock: px,\n insetBlockStart: px,\n insetBlockEnd: px,\n insetInline: px,\n insetInlineStart: px,\n insetInlineEnd: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n paddingBlock: px,\n paddingBlockStart: px,\n paddingBlockEnd: px,\n paddingInline: px,\n paddingInlineStart: px,\n paddingInlineEnd: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n marginBlock: px,\n marginBlockStart: px,\n marginBlockEnd: px,\n marginInline: px,\n marginInlineStart: px,\n marginInlineEnd: px,\n // Typography\n fontSize: px,\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n ...transformValueTypes,\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n//# sourceMappingURL=number.js.map","import { alpha, scale } from \"../numbers\";\nimport { degrees, progressPercentage, px } from \"../numbers/units\";\nexport const transformValueTypes = {\n rotate: degrees,\n /**\n * Internal channel for `transition.path` orientToPath. Composed onto\n * `rotate` at the transform-build sites so the user's `rotate` is\n * never read or overwritten. Not part of `transformPropOrder`.\n */\n pathRotation: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n};\n//# sourceMappingURL=transform.js.map","import { cancelFrame, frame } from \"../frameloop/frame\";\nimport { numberValueTypes } from \"../value/types/maps/number\";\nimport { getValueAsType } from \"../value/types/utils/get-as-type\";\nexport class MotionValueState {\n constructor() {\n this.latest = {};\n this.values = new Map();\n }\n set(name, value, render, computed, useDefaultValueType = true) {\n const existingValue = this.values.get(name);\n if (existingValue) {\n existingValue.onRemove();\n }\n const onChange = () => {\n const v = value.get();\n if (useDefaultValueType) {\n this.latest[name] = getValueAsType(v, numberValueTypes[name]);\n }\n else {\n this.latest[name] = v;\n }\n render && frame.render(render);\n };\n onChange();\n const cancelOnChange = value.on(\"change\", onChange);\n computed && value.addDependent(computed);\n const remove = () => {\n cancelOnChange();\n render && cancelFrame(render);\n this.values.delete(name);\n computed && value.removeDependent(computed);\n };\n this.values.set(name, { value, onRemove: remove });\n return remove;\n }\n get(name) {\n return this.values.get(name)?.value;\n }\n}\n//# sourceMappingURL=MotionValueState.js.map","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nexport const getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n//# sourceMappingURL=get-as-type.js.map","import { MotionValueState } from \"../MotionValueState\";\nexport function createEffect(addValue) {\n const stateCache = new WeakMap();\n return (subject, values) => {\n const state = stateCache.get(subject) ?? new MotionValueState();\n stateCache.set(subject, state);\n const subscriptions = [];\n for (const key in values) {\n const value = values[key];\n const remove = addValue(subject, state, key, value);\n subscriptions.push(remove);\n }\n return () => {\n for (const cancel of subscriptions)\n cancel();\n };\n };\n}\n//# sourceMappingURL=create-effect.js.map","import { transformPropOrder } from \"../../render/utils/keys-transform\";\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nexport function buildTransform(state) {\n let transform = \"\";\n let transformIsDefault = true;\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < transformPropOrder.length; i++) {\n const key = transformPropOrder[i];\n const value = state.latest[key];\n if (value === undefined)\n continue;\n let valueIsDefault = true;\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n }\n else {\n const parsed = parseFloat(value);\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0;\n }\n if (!valueIsDefault) {\n transformIsDefault = false;\n const transformName = translateAlias[key] || key;\n transform += `${transformName}(${value}) `;\n }\n }\n // See build-transform.ts: additive `rotate()` so user `rotate` isn't\n // clobbered. Not a `transformPropOrder` slot.\n const pathRotation = state.latest.pathRotation;\n if (pathRotation) {\n transformIsDefault = false;\n transform += `rotate(${typeof pathRotation === \"number\"\n ? `${pathRotation}deg`\n : pathRotation}) `;\n }\n return transformIsDefault ? \"none\" : transform.trim();\n}\n//# sourceMappingURL=transform.js.map","import { isCSSVar } from \"../../render/dom/is-css-var\";\nimport { transformProps } from \"../../render/utils/keys-transform\";\nimport { isHTMLElement } from \"../../utils/is-html-element\";\nimport { MotionValue } from \"../../value\";\nimport { createSelectorEffect } from \"../utils/create-dom-effect\";\nimport { createEffect } from \"../utils/create-effect\";\nimport { buildTransform } from \"./transform\";\nconst originProps = new Set([\"originX\", \"originY\", \"originZ\"]);\nexport const addStyleValue = (element, state, key, value) => {\n let render = undefined;\n let computed = undefined;\n if (transformProps.has(key)) {\n if (!state.get(\"transform\")) {\n // If this is an HTML element, we need to set the transform-box to fill-box\n // to normalise the transform relative to the element's bounding box\n if (!isHTMLElement(element) && !state.get(\"transformBox\")) {\n addStyleValue(element, state, \"transformBox\", new MotionValue(\"fill-box\"));\n }\n state.set(\"transform\", new MotionValue(\"none\"), () => {\n element.style.transform = buildTransform(state);\n });\n }\n computed = state.get(\"transform\");\n }\n else if (originProps.has(key)) {\n if (!state.get(\"transformOrigin\")) {\n state.set(\"transformOrigin\", new MotionValue(\"\"), () => {\n const originX = state.latest.originX ?? \"50%\";\n const originY = state.latest.originY ?? \"50%\";\n const originZ = state.latest.originZ ?? 0;\n element.style.transformOrigin = `${originX} ${originY} ${originZ}`;\n });\n }\n computed = state.get(\"transformOrigin\");\n }\n else if (isCSSVar(key)) {\n render = () => {\n element.style.setProperty(key, state.latest[key]);\n };\n }\n else {\n render = () => {\n element.style[key] = state.latest[key];\n };\n }\n return state.set(key, value, render, computed);\n};\nexport const styleEffect = /*@__PURE__*/ createSelectorEffect(\n/*@__PURE__*/ createEffect(addStyleValue));\n//# sourceMappingURL=index.js.map","import { isObject } from \"motion-utils\";\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nexport function isHTMLElement(element) {\n return (isObject(element) &&\n \"offsetHeight\" in element &&\n !(\"ownerSVGElement\" in element));\n}\n//# sourceMappingURL=is-html-element.js.map","const isObject = (value) => typeof value === \"object\" && value !== null;\n\nexport { isObject };\n//# sourceMappingURL=is-object.mjs.map\n"],"names":["transformPropOrder","transformProps","Set","MotionGlobalConfig","SubscriptionManager","constructor","this","subscriptions","add","handler","arr","item","indexOf","push","index","splice","removeItem","notify","a","b","c","numSubscriptions","length","i","getSize","clear","stepsOrder","createRenderBatcher","scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","state","delta","timestamp","isProcessing","flagRunNextFrame","steps","reduce","acc","key","thisFrame","nextFrame","flushNextFrame","toKeepAlive","WeakSet","latestFrameData","triggerCallback","callback","has","step","schedule","keepAlive","immediate","queue","cancel","delete","process","frameData","prevFrame","forEach","createRenderStep","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","useManualTiming","performance","now","Math","max","min","frame","cancelFrame","requestAnimationFrame","any","clearTime","undefined","time","set","newTime","queueMicrotask","MotionValue","init","options","canTrackVelocity","events","updateAndNotify","v","currentTime","updatedAt","setPrevFrameValue","prev","current","setCurrent","change","dependents","dependent","dirty","hasAnimated","owner","value","isNaN","parseFloat","prevFrameValue","prevUpdatedAt","onChange","subscription","on","eventName","unsubscribe","stop","clearListeners","eventManagers","attach","passiveEffect","stopPassiveEffect","setWithVelocity","jump","endAnimation","addDependent","removeDependent","get","getPrevious","getVelocity","velocity","frameDuration","start","startAnimation","Promise","resolve","animation","animationStart","then","animationComplete","clearAnimation","animationCancel","isAnimating","destroy","createSelectorEffect","subjectEffect","subject","values","elements","elementOrSelector","EventTarget","document","querySelectorAll","Array","from","filter","element","resolveElements","remove","number","test","parse","transform","alpha","clamp","scale","default","int","round","createUnitType","unit","endsWith","split","degrees","percent","px","progressPercentage","numberValueTypes","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY","rotate","pathRotation","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ","skew","skewX","skewY","distance","translateX","translateY","translateZ","x","y","z","perspective","transformPerspective","opacity","originX","originY","originZ","zIndex","fillOpacity","strokeOpacity","numOctaves","MotionValueState","latest","Map","name","computed","useDefaultValueType","existingValue","onRemove","type","getValueAsType","cancelOnChange","createEffect","addValue","stateCache","WeakMap","translateAlias","originProps","addStyleValue","isHTMLElement","style","transformIsDefault","valueIsDefault","startsWith","parsed","trim","buildTransform","transformOrigin","setProperty","styleEffect"],"mappings":"AAAO,MCGMA,EAAqB,CAC9B,uBACA,IACA,IACA,IACA,aACA,aACA,aACA,QACA,SACA,SACA,SACA,UACA,UACA,UACA,OACA,QACA,SAYSC,EAA+B,KAAO,IAAIC,IAAI,IAAIF,EAAoB,iBAAvC,GChC5C,MCAMG,EAAqB,CAAA,ECE3B,MAAMC,EACF,WAAAC,GACIC,KAAKC,cAAgB,EACzB,CACA,GAAAC,CAAIC,GCNR,IAAuBC,EAAKC,EDQpB,OCReD,EDODJ,KAAKC,cCPCI,EDOcF,GCNZ,IAAtBC,EAAIE,QAAQD,IACZD,EAAIG,KAAKF,GDMF,ICJf,SAAoBD,EAAKC,GACrB,MAAMG,EAAQJ,EAAIE,QAA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AMiO,OAAOP,SAAW,MAClCC,EAAU3N,EAAMiO,OAAON,SAAW,EACxC/F,EAAQuH,MAAMO,gBAAkB,GAAGjC,KAAWC,KAAWC,MAGjES,EAAWpO,EAAM+F,IAAI,oBAGrB3D,EADc5B,EzBnCiB8O,WAAW,MyBoCjC,KACL1H,EAAQuH,MAAMQ,YAAYnP,EAAKR,EAAMiO,OAAOzN,KAIvC,KACLoH,EAAQuH,MAAM3O,GAAOR,EAAMiO,OAAOzN,IAGnCR,EAAMoD,IAAI5C,EAAKkE,EAAOtC,EAAQgM,IAE5BwB,EAA4B5I,EAC3B2H,EAAaM"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/package.json b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/package.json deleted file mode 100644 index b0685eec..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-dom/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "motion-dom", - "version": "12.40.0", - "author": "Matt Perry", - "license": "MIT", - "repository": "https://github.com/motiondivision/motion", - "main": "./dist/cjs/index.js", - "types": "./dist/index.d.ts", - "module": "./dist/es/index.mjs", - "sideEffects": false, - "exports": { - ".": { - "types": "./dist/index.d.ts", - "require": "./dist/cjs/index.js", - "import": "./dist/es/index.mjs", - "default": "./dist/cjs/index.js" - } - }, - "dependencies": { - "motion-utils": "^12.39.0" - }, - "scripts": { - "clean": "rm -rf types dist lib", - "build": "yarn clean && tsc -p . && rollup -c && node ./scripts/check-bundle.js", - "dev": "concurrently -c blue,red -n tsc,rollup --kill-others \"tsc --watch -p . --preserveWatchOutput\" \"rollup --config --watch --no-watch.clearScreen\"", - "test": "jest --config jest.config.json --max-workers=2", - "measure": "rollup -c ./rollup.size.config.mjs" - }, - "bundlesize": [ - { - "path": "./dist/size-rollup-style-effect.js", - "maxSize": "2.9 kB" - }, - { - "path": "./dist/size-rollup-motion-value.js", - "maxSize": "1.8 kB" - } - ], - "gitHead": "38ebb9480e5b25a51e09e2ec866c101d01d82c60" -} diff --git a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-utils b/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-utils deleted file mode 120000 index 4c7f631d..00000000 --- a/node_modules/.pnpm/motion-dom@12.40.0/node_modules/motion-utils +++ /dev/null @@ -1 +0,0 @@ -../../motion-utils@12.39.0/node_modules/motion-utils \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/LICENSE.md b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/LICENSE.md deleted file mode 100644 index 81110442..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2024 [Motion](https://motion.dev) B.V. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/cjs/index.js b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/cjs/index.js deleted file mode 100644 index a33f3dd6..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/cjs/index.js +++ /dev/null @@ -1,345 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function addUniqueItem(arr, item) { - if (arr.indexOf(item) === -1) - arr.push(item); -} -function removeItem(arr, item) { - const index = arr.indexOf(item); - if (index > -1) - arr.splice(index, 1); -} -// Adapted from array-move -function moveItem([...arr], fromIndex, toIndex) { - const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex; - if (startIndex >= 0 && startIndex < arr.length) { - const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex; - const [item] = arr.splice(fromIndex, 1); - arr.splice(endIndex, 0, item); - } - return arr; -} - -const clamp = (min, max, v) => { - if (v > max) - return max; - if (v < min) - return min; - return v; -}; - -function formatErrorMessage(message, errorCode) { - return errorCode - ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}` - : message; -} - -exports.warning = () => { }; -exports.invariant = () => { }; -if (typeof process !== "undefined" && - process.env?.NODE_ENV !== "production") { - exports.warning = (check, message, errorCode) => { - if (!check && typeof console !== "undefined") { - console.warn(formatErrorMessage(message, errorCode)); - } - }; - exports.invariant = (check, message, errorCode) => { - if (!check) { - throw new Error(formatErrorMessage(message, errorCode)); - } - }; -} - -const MotionGlobalConfig = {}; - -/** - * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1" - */ -const isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v); - -const isObject = (value) => typeof value === "object" && value !== null; - -/** - * Check if the value is a zero value string like "0px" or "0%" - */ -const isZeroValueString = (v) => /^0[^.\s]+$/u.test(v); - -/*#__NO_SIDE_EFFECTS__*/ -function memo(callback) { - let result; - return () => { - if (result === undefined) - result = callback(); - return result; - }; -} - -/*#__NO_SIDE_EFFECTS__*/ -const noop = (any) => any; - -/** - * Pipe - * Compose other transformers to run linearily - * pipe(min(20), max(40)) - * @param {...functions} transformers - * @return {function} - */ -const pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v))); - -/* - Progress within given range - - Given a lower limit and an upper limit, we return the progress - (expressed as a number 0-1) represented by the given value, and - limit that progress to within 0-1. -*/ -/*#__NO_SIDE_EFFECTS__*/ -const progress = (from, to, value) => { - const range = to - from; - return range ? (value - from) / range : 1; -}; - -class SubscriptionManager { - constructor() { - this.subscriptions = []; - } - add(handler) { - addUniqueItem(this.subscriptions, handler); - return () => removeItem(this.subscriptions, handler); - } - notify(a, b, c) { - const numSubscriptions = this.subscriptions.length; - if (!numSubscriptions) - return; - if (numSubscriptions === 1) { - /** - * If there's only a single handler we can just call it without invoking a loop. - */ - this.subscriptions[0](a, b, c); - } - else { - for (let i = 0; i < numSubscriptions; i++) { - /** - * Check whether the handler exists before firing as it's possible - * the subscriptions were modified during this loop running. - */ - const handler = this.subscriptions[i]; - handler && handler(a, b, c); - } - } - } - getSize() { - return this.subscriptions.length; - } - clear() { - this.subscriptions.length = 0; - } -} - -/** - * Converts seconds to milliseconds - * - * @param seconds - Time in seconds. - * @return milliseconds - Converted time in milliseconds. - */ -/*#__NO_SIDE_EFFECTS__*/ -const secondsToMilliseconds = (seconds) => seconds * 1000; -/*#__NO_SIDE_EFFECTS__*/ -const millisecondsToSeconds = (milliseconds) => milliseconds / 1000; - -/* - Convert velocity into velocity per second -*/ -/*#__NO_SIDE_EFFECTS__*/ -const velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0; - -const warned = new Set(); -function hasWarned(message) { - return warned.has(message); -} -function warnOnce(condition, message, errorCode) { - if (condition || warned.has(message)) - return; - console.warn(formatErrorMessage(message, errorCode)); - warned.add(message); -} - -const wrap = (min, max, v) => { - const rangeSize = max - min; - return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min; -}; - -/* - Bezier function generator - This has been modified from Gaëtan Renaudeau's BezierEasing - https://github.com/gre/bezier-easing/blob/master/src/index.js - https://github.com/gre/bezier-easing/blob/master/LICENSE - - I've removed the newtonRaphsonIterate algo because in benchmarking it - wasn't noticeably faster than binarySubdivision, indeed removing it - usually improved times, depending on the curve. - I also removed the lookup table, as for the added bundle size and loop we're - only cutting ~4 or so subdivision iterations. I bumped the max iterations up - to 12 to compensate and this still tended to be faster for no perceivable - loss in accuracy. - Usage - const easeOut = cubicBezier(.17,.67,.83,.67); - const x = easeOut(0.5); // returns 0.627... -*/ -// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. -const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * - t; -const subdivisionPrecision = 0.0000001; -const subdivisionMaxIterations = 12; -function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) { - let currentX; - let currentT; - let i = 0; - do { - currentT = lowerBound + (upperBound - lowerBound) / 2.0; - currentX = calcBezier(currentT, mX1, mX2) - x; - if (currentX > 0.0) { - upperBound = currentT; - } - else { - lowerBound = currentT; - } - } while (Math.abs(currentX) > subdivisionPrecision && - ++i < subdivisionMaxIterations); - return currentT; -} -/*#__NO_SIDE_EFFECTS__*/ -function cubicBezier(mX1, mY1, mX2, mY2) { - // If this is a linear gradient, return linear easing - if (mX1 === mY1 && mX2 === mY2) - return noop; - const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2); - // If animation is at start/end, return t without easing - return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2); -} - -// Accepts an easing function and returns a new one that outputs mirrored values for -// the second half of the animation. Turns easeIn into easeInOut. -/*#__NO_SIDE_EFFECTS__*/ -const mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2; - -// Accepts an easing function and returns a new one that outputs reversed values. -// Turns easeIn into easeOut. -/*#__NO_SIDE_EFFECTS__*/ -const reverseEasing = (easing) => (p) => 1 - easing(1 - p); - -const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99); -const backIn = /*@__PURE__*/ reverseEasing(backOut); -const backInOut = /*@__PURE__*/ mirrorEasing(backIn); - -const anticipate = (p) => p >= 1 - ? 1 - : (p *= 2) < 1 - ? 0.5 * backIn(p) - : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); - -const circIn = (p) => 1 - Math.sin(Math.acos(p)); -const circOut = reverseEasing(circIn); -const circInOut = mirrorEasing(circIn); - -const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1); -const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1); -const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1); - -/*#__NO_SIDE_EFFECTS__*/ -function steps(numSteps, direction = "end") { - return (progress) => { - progress = - direction === "end" - ? Math.min(progress, 0.999) - : Math.max(progress, 0.001); - const expanded = progress * numSteps; - const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded); - return clamp(0, 1, rounded / numSteps); - }; -} - -/*#__NO_SIDE_EFFECTS__*/ -const isEasingArray = (ease) => { - return Array.isArray(ease) && typeof ease[0] !== "number"; -}; - -/*#__NO_SIDE_EFFECTS__*/ -function getEasingForSegment(easing, i) { - return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing; -} - -/*#__NO_SIDE_EFFECTS__*/ -const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number"; - -const easingLookup = { - linear: noop, - easeIn, - easeInOut, - easeOut, - circIn, - circInOut, - circOut, - backIn, - backInOut, - backOut, - anticipate, -}; -const isValidEasing = (easing) => { - return typeof easing === "string"; -}; -const easingDefinitionToFunction = (definition) => { - if (isBezierDefinition(definition)) { - // If cubic bezier definition, create bezier curve - exports.invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length"); - const [x1, y1, x2, y2] = definition; - return cubicBezier(x1, y1, x2, y2); - } - else if (isValidEasing(definition)) { - // Else lookup from table - exports.invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, "invalid-easing-type"); - return easingLookup[definition]; - } - return definition; -}; - -exports.MotionGlobalConfig = MotionGlobalConfig; -exports.SubscriptionManager = SubscriptionManager; -exports.addUniqueItem = addUniqueItem; -exports.anticipate = anticipate; -exports.backIn = backIn; -exports.backInOut = backInOut; -exports.backOut = backOut; -exports.circIn = circIn; -exports.circInOut = circInOut; -exports.circOut = circOut; -exports.clamp = clamp; -exports.cubicBezier = cubicBezier; -exports.easeIn = easeIn; -exports.easeInOut = easeInOut; -exports.easeOut = easeOut; -exports.easingDefinitionToFunction = easingDefinitionToFunction; -exports.getEasingForSegment = getEasingForSegment; -exports.hasWarned = hasWarned; -exports.isBezierDefinition = isBezierDefinition; -exports.isEasingArray = isEasingArray; -exports.isNumericalString = isNumericalString; -exports.isObject = isObject; -exports.isZeroValueString = isZeroValueString; -exports.memo = memo; -exports.millisecondsToSeconds = millisecondsToSeconds; -exports.mirrorEasing = mirrorEasing; -exports.moveItem = moveItem; -exports.noop = noop; -exports.pipe = pipe; -exports.progress = progress; -exports.removeItem = removeItem; -exports.reverseEasing = reverseEasing; -exports.secondsToMilliseconds = secondsToMilliseconds; -exports.steps = steps; -exports.velocityPerSecond = velocityPerSecond; -exports.warnOnce = warnOnce; -exports.wrap = wrap; -//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/cjs/index.js.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/cjs/index.js.map deleted file mode 100644 index 660d2130..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/cjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../../src/array.ts","../../src/clamp.ts","../../src/format-error-message.ts","../../src/errors.ts","../../src/global-config.ts","../../src/is-numerical-string.ts","../../src/is-object.ts","../../src/is-zero-value-string.ts","../../src/memo.ts","../../src/noop.ts","../../src/pipe.ts","../../src/progress.ts","../../src/subscription-manager.ts","../../src/time-conversion.ts","../../src/velocity-per-second.ts","../../src/warn-once.ts","../../src/wrap.ts","../../src/easing/cubic-bezier.ts","../../src/easing/modifiers/mirror.ts","../../src/easing/modifiers/reverse.ts","../../src/easing/back.ts","../../src/easing/anticipate.ts","../../src/easing/circ.ts","../../src/easing/ease.ts","../../src/easing/steps.ts","../../src/easing/utils/is-easing-array.ts","../../src/easing/utils/get-easing-for-segment.ts","../../src/easing/utils/is-bezier-definition.ts","../../src/easing/utils/map.ts"],"sourcesContent":["export function addUniqueItem(arr: T[], item: T) {\n if (arr.indexOf(item) === -1) arr.push(item)\n}\n\nexport function removeItem(arr: T[], item: T) {\n const index = arr.indexOf(item)\n if (index > -1) arr.splice(index, 1)\n}\n\n// Adapted from array-move\nexport function moveItem([...arr]: T[], fromIndex: number, toIndex: number) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex\n\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex\n\n const [item] = arr.splice(fromIndex, 1)\n arr.splice(endIndex, 0, item)\n }\n\n return arr\n}\n","export const clamp = (min: number, max: number, v: number) => {\n if (v > max) return max\n if (v < min) return min\n return v\n}\n","export function formatErrorMessage(message: string, errorCode?: string) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message\n}\n","import { formatErrorMessage } from \"./format-error-message\"\n\nexport type DevMessage = (\n check: boolean,\n message: string,\n errorCode?: string\n) => void\n\nlet warning: DevMessage = () => {}\nlet invariant: DevMessage = () => {}\n\nif (\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n) {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode))\n }\n }\n\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode))\n }\n }\n}\n\nexport { invariant, warning }\n","export const MotionGlobalConfig: {\n skipAnimations?: boolean\n instantAnimations?: boolean\n useManualTiming?: boolean\n WillChange?: any\n mix?: (a: T, b: T) => (p: number) => T\n} = {}\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nexport const isNumericalString = (v: string) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v)\n","export const isObject = (value: unknown): value is object =>\n typeof value === \"object\" && value !== null\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nexport const isZeroValueString = (v: string) => /^0[^.\\s]+$/u.test(v)\n","/*#__NO_SIDE_EFFECTS__*/\nexport function memo(callback: () => T) {\n let result: T | undefined\n\n return () => {\n if (result === undefined) result = callback()\n return result\n }\n}\n","/*#__NO_SIDE_EFFECTS__*/\nexport const noop = (any: T): T => any\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nexport const pipe = (...transformers: Function[]) =>\n transformers.reduce((a, b) => (v: any) => b(a(v)))\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n*/\n/*#__NO_SIDE_EFFECTS__*/\nexport const progress = (from: number, to: number, value: number) => {\n const range = to - from\n return range ? (value - from) / range : 1\n}\n","import { addUniqueItem, removeItem } from \"./array\"\n\ntype GenericHandler = (...args: any) => void\n\nexport class SubscriptionManager {\n private subscriptions: Handler[] = []\n\n add(handler: Handler): VoidFunction {\n addUniqueItem(this.subscriptions, handler)\n return () => removeItem(this.subscriptions, handler)\n }\n\n notify(\n a?: Parameters[0],\n b?: Parameters[1],\n c?: Parameters[2]\n ) {\n const numSubscriptions = this.subscriptions.length\n\n if (!numSubscriptions) return\n\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c)\n } else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i]\n handler && handler(a, b, c)\n }\n }\n }\n\n getSize() {\n return this.subscriptions.length\n }\n\n clear() {\n this.subscriptions.length = 0\n }\n}\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const secondsToMilliseconds = (seconds: number) => seconds * 1000\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const millisecondsToSeconds = (milliseconds: number) =>\n milliseconds / 1000\n","/*\n Convert velocity into velocity per second\n*/\n/*#__NO_SIDE_EFFECTS__*/\nexport const velocityPerSecond = (velocity: number, frameDuration: number) =>\n frameDuration ? velocity * (1000 / frameDuration) : 0\n","import { formatErrorMessage } from \"./format-error-message\"\n\nconst warned = new Set()\n\nexport function hasWarned(message: string) {\n return warned.has(message)\n}\n\nexport function warnOnce(\n condition: boolean,\n message: string,\n errorCode?: string\n) {\n if (condition || warned.has(message)) return\n\n console.warn(formatErrorMessage(message, errorCode))\n warned.add(message)\n}\n","export const wrap = (min: number, max: number, v: number) => {\n const rangeSize = max - min\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min\n}\n","/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticeably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n\nimport { noop } from \"../noop\"\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t: number, a1: number, a2: number) =>\n (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t\n\nconst subdivisionPrecision = 0.0000001\nconst subdivisionMaxIterations = 12\n\nfunction binarySubdivide(\n x: number,\n lowerBound: number,\n upperBound: number,\n mX1: number,\n mX2: number\n) {\n let currentX: number\n let currentT: number\n let i: number = 0\n\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0\n currentX = calcBezier(currentT, mX1, mX2) - x\n if (currentX > 0.0) {\n upperBound = currentT\n } else {\n lowerBound = currentT\n }\n } while (\n Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations\n )\n\n return currentT\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nexport function cubicBezier(\n mX1: number,\n mY1: number,\n mX2: number,\n mY2: number\n) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2) return noop\n\n const getTForX = (aX: number) => binarySubdivide(aX, 0, 1, mX1, mX2)\n\n // If animation is at start/end, return t without easing\n return (t: number) =>\n t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2)\n}\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n\nimport { EasingModifier } from \"../types\"\n\n// the second half of the animation. Turns easeIn into easeInOut.\n/*#__NO_SIDE_EFFECTS__*/\nexport const mirrorEasing: EasingModifier = (easing) => (p) =>\n p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2\n","// Accepts an easing function and returns a new one that outputs reversed values.\n\nimport { EasingModifier } from \"../types\"\n\n// Turns easeIn into easeOut.\n/*#__NO_SIDE_EFFECTS__*/\nexport const reverseEasing: EasingModifier = (easing) => (p) =>\n 1 - easing(1 - p)\n","import { cubicBezier } from \"./cubic-bezier\"\nimport { mirrorEasing } from \"./modifiers/mirror\"\nimport { reverseEasing } from \"./modifiers/reverse\"\n\nexport const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99)\nexport const backIn = /*@__PURE__*/ reverseEasing(backOut)\nexport const backInOut = /*@__PURE__*/ mirrorEasing(backIn)\n","import { backIn } from \"./back\"\n\nexport const anticipate = (p: number) =>\n p >= 1\n ? 1\n : (p *= 2) < 1\n ? 0.5 * backIn(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)))\n","import { mirrorEasing } from \"./modifiers/mirror\"\nimport { reverseEasing } from \"./modifiers/reverse\"\nimport { EasingFunction } from \"./types\"\n\nexport const circIn: EasingFunction = (p) => 1 - Math.sin(Math.acos(p))\nexport const circOut = reverseEasing(circIn)\nexport const circInOut = mirrorEasing(circIn)\n","import { cubicBezier } from \"./cubic-bezier\"\n\nexport const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1)\nexport const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1)\nexport const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1)\n","import { clamp } from \"../clamp\"\nimport type { EasingFunction } from \"./types\"\n\n/*\n Create stepped version of 0-1 progress\n\n @param [int]: Number of steps\n @param [number]: Current value\n @return [number]: Stepped value\n*/\nexport type Direction = \"start\" | \"end\"\n\n/*#__NO_SIDE_EFFECTS__*/\nexport function steps(\n numSteps: number,\n direction: Direction = \"end\"\n): EasingFunction {\n return (progress: number) => {\n progress =\n direction === \"end\"\n ? Math.min(progress, 0.999)\n : Math.max(progress, 0.001)\n const expanded = progress * numSteps\n const rounded =\n direction === \"end\" ? Math.floor(expanded) : Math.ceil(expanded)\n\n return clamp(0, 1, rounded / numSteps)\n }\n}\n","import { Easing } from \"../types\"\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const isEasingArray = (ease: any): ease is Easing[] => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\"\n}\n","import { wrap } from \"../../wrap\"\nimport { Easing } from \"../types\"\nimport { isEasingArray } from \"./is-easing-array\"\n\n/*#__NO_SIDE_EFFECTS__*/\nexport function getEasingForSegment(\n easing: Easing | Easing[],\n i: number\n): Easing {\n return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing\n}\n","import { BezierDefinition, Easing } from \"../types\"\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const isBezierDefinition = (\n easing: Easing | Easing[]\n): easing is BezierDefinition =>\n Array.isArray(easing) && typeof easing[0] === \"number\"\n","import { invariant } from \"../../errors\"\nimport { noop } from \"../../noop\"\nimport { anticipate } from \"../anticipate\"\nimport { backIn, backInOut, backOut } from \"../back\"\nimport { circIn, circInOut, circOut } from \"../circ\"\nimport { cubicBezier } from \"../cubic-bezier\"\nimport { easeIn, easeInOut, easeOut } from \"../ease\"\nimport { Easing, EasingFunction } from \"../types\"\nimport { isBezierDefinition } from \"./is-bezier-definition\"\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n}\n\nconst isValidEasing = (easing: Easing): easing is keyof typeof easingLookup => {\n return typeof easing === \"string\"\n}\n\nexport const easingDefinitionToFunction = (\n definition: Easing\n): EasingFunction => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(\n definition.length === 4,\n `Cubic bezier arrays must contain four numerical values.`,\n \"cubic-bezier-length\"\n )\n\n const [x1, y1, x2, y2] = definition\n return cubicBezier(x1, y1, x2, y2)\n } else if (isValidEasing(definition)) {\n // Else lookup from table\n invariant(\n easingLookup[definition] !== undefined,\n `Invalid easing type '${definition}'`,\n \"invalid-easing-type\"\n )\n return easingLookup[definition]\n }\n\n return definition\n}\n"],"names":["warning","invariant"],"mappings":";;;;AAAM,SAAU,aAAa,CAAI,GAAQ,EAAE,IAAO,EAAA;IAC9C,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;AAAE,QAAA,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AAChD;AAEM,SAAU,UAAU,CAAI,GAAQ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E,EAAE,EAAE,EAAE,CAAC,GAAG,UAAU;QACnC,OAAO,WAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACtC;AAAO,SAAA,IAAI,aAAa,CAAC,UAAU,CAAC,EAAE;;AAElC,QAAAA,iBAAS,CACL,YAAY,CAAC,UAAU,CAAC,KAAK,SAAS,EACtC,CAAA,qBAAA,EAAwB,UAAU,CAAA,CAAA,CAAG,EACrC,qBAAqB,CACxB;AACD,QAAA,OAAO,YAAY,CAAC,UAAU,CAAC;IACnC;AAEA,IAAA,OAAO,UAAU;AACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/array.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/array.mjs deleted file mode 100644 index 773d47a1..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/array.mjs +++ /dev/null @@ -1,22 +0,0 @@ -function addUniqueItem(arr, item) { - if (arr.indexOf(item) === -1) - arr.push(item); -} -function removeItem(arr, item) { - const index = arr.indexOf(item); - if (index > -1) - arr.splice(index, 1); -} -// Adapted from array-move -function moveItem([...arr], fromIndex, toIndex) { - const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex; - if (startIndex >= 0 && startIndex < arr.length) { - const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex; - const [item] = arr.splice(fromIndex, 1); - arr.splice(endIndex, 0, item); - } - return arr; -} - -export { addUniqueItem, moveItem, removeItem }; -//# sourceMappingURL=array.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/array.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/array.mjs.map deleted file mode 100644 index aaad1adc..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/array.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"array.mjs","sources":["../../src/array.ts"],"sourcesContent":["export function addUniqueItem(arr: T[], item: T) {\n if (arr.indexOf(item) === -1) arr.push(item)\n}\n\nexport function removeItem(arr: T[], item: T) {\n const index = arr.indexOf(item)\n if (index > -1) arr.splice(index, 1)\n}\n\n// Adapted from array-move\nexport function moveItem([...arr]: T[], fromIndex: number, toIndex: number) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex\n\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex\n\n const [item] = arr.splice(fromIndex, 1)\n arr.splice(endIndex, 0, item)\n }\n\n return arr\n}\n"],"names":[],"mappings":"AAAM,SAAU,aAAa,CAAI,GAAQ,EAAE,IAAO,EAAA;IAC9C,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;AAAE,QAAA,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AAChD;AAEM,SAAU,UAAU,CAAI,GAAQ,EAAE,IAAO,EAAA;IAC3C,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;IAC/B,IAAI,KAAK,GAAG,EAAE;AAAE,QAAA,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AACxC;AAEA;AACM,SAAU,QAAQ,CAAI,CAAC,GAAG,GAAG,CAAM,EAAE,SAAiB,EAAE,OAAe,EAAA;AACzE,IAAA,MAAM,UAAU,GAAG,SAAS,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,SAAS,GAAG,SAAS;IAErE,IAAI,UAAU,IAAI,CAAC,IAAI,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE;AAC5C,QAAA,MAAM,QAAQ,GAAG,OAAO,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,OAAO,GAAG,OAAO;AAE7D,QAAA,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;QACvC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC;IACjC;AAEA,IAAA,OAAO,GAAG;AACd;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/clamp.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/clamp.mjs deleted file mode 100644 index 1cfe2372..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/clamp.mjs +++ /dev/null @@ -1,10 +0,0 @@ -const clamp = (min, max, v) => { - if (v > max) - return max; - if (v < min) - return min; - return v; -}; - -export { clamp }; -//# sourceMappingURL=clamp.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/clamp.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/clamp.mjs.map deleted file mode 100644 index 1613330a..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/clamp.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"clamp.mjs","sources":["../../src/clamp.ts"],"sourcesContent":["export const clamp = (min: number, max: number, v: number) => {\n if (v > max) return max\n if (v < min) return min\n return v\n}\n"],"names":[],"mappings":"AAAO,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,CAAS,KAAI;IACzD,IAAI,CAAC,GAAG,GAAG;AAAE,QAAA,OAAO,GAAG;IACvB,IAAI,CAAC,GAAG,GAAG;AAAE,QAAA,OAAO,GAAG;AACvB,IAAA,OAAO,CAAC;AACZ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/anticipate.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/anticipate.mjs deleted file mode 100644 index 0367d407..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/anticipate.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { backIn } from './back.mjs'; - -const anticipate = (p) => p >= 1 - ? 1 - : (p *= 2) < 1 - ? 0.5 * backIn(p) - : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); - -export { anticipate }; -//# sourceMappingURL=anticipate.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/anticipate.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/anticipate.mjs.map deleted file mode 100644 index 28a651ec..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/anticipate.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"anticipate.mjs","sources":["../../../src/easing/anticipate.ts"],"sourcesContent":["import { backIn } from \"./back\"\n\nexport const anticipate = (p: number) =>\n p >= 1\n ? 1\n : (p *= 2) < 1\n ? 0.5 * backIn(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)))\n"],"names":[],"mappings":";;AAEO,MAAM,UAAU,GAAG,CAAC,CAAS,KAChC,CAAC,IAAI;AACD,MAAE;AACF,MAAE,CAAC,CAAC,IAAI,CAAC,IAAI;AACX,UAAE,GAAG,GAAG,MAAM,CAAC,CAAC;UACd,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/back.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/back.mjs deleted file mode 100644 index 74988003..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/back.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { cubicBezier } from './cubic-bezier.mjs'; -import { mirrorEasing } from './modifiers/mirror.mjs'; -import { reverseEasing } from './modifiers/reverse.mjs'; - -const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99); -const backIn = /*@__PURE__*/ reverseEasing(backOut); -const backInOut = /*@__PURE__*/ mirrorEasing(backIn); - -export { backIn, backInOut, backOut }; -//# sourceMappingURL=back.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/back.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/back.mjs.map deleted file mode 100644 index de464db3..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/back.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"back.mjs","sources":["../../../src/easing/back.ts"],"sourcesContent":["import { cubicBezier } from \"./cubic-bezier\"\nimport { mirrorEasing } from \"./modifiers/mirror\"\nimport { reverseEasing } from \"./modifiers/reverse\"\n\nexport const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99)\nexport const backIn = /*@__PURE__*/ reverseEasing(backOut)\nexport const backInOut = /*@__PURE__*/ mirrorEasing(backIn)\n"],"names":[],"mappings":";;;;AAIO,MAAM,OAAO,iBAAiB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;AAChE,MAAM,MAAM,iBAAiB,aAAa,CAAC,OAAO;AAClD,MAAM,SAAS,iBAAiB,YAAY,CAAC,MAAM;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/circ.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/circ.mjs deleted file mode 100644 index 5e24dc47..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/circ.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { mirrorEasing } from './modifiers/mirror.mjs'; -import { reverseEasing } from './modifiers/reverse.mjs'; - -const circIn = (p) => 1 - Math.sin(Math.acos(p)); -const circOut = reverseEasing(circIn); -const circInOut = mirrorEasing(circIn); - -export { circIn, circInOut, circOut }; -//# sourceMappingURL=circ.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/circ.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/circ.mjs.map deleted file mode 100644 index 280b4670..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/circ.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"circ.mjs","sources":["../../../src/easing/circ.ts"],"sourcesContent":["import { mirrorEasing } from \"./modifiers/mirror\"\nimport { reverseEasing } from \"./modifiers/reverse\"\nimport { EasingFunction } from \"./types\"\n\nexport const circIn: EasingFunction = (p) => 1 - Math.sin(Math.acos(p))\nexport const circOut = reverseEasing(circIn)\nexport const circInOut = mirrorEasing(circIn)\n"],"names":[],"mappings":";;;MAIa,MAAM,GAAmB,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;MACzD,OAAO,GAAG,aAAa,CAAC,MAAM;MAC9B,SAAS,GAAG,YAAY,CAAC,MAAM;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs deleted file mode 100644 index 4b13a5db..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs +++ /dev/null @@ -1,53 +0,0 @@ -import { noop } from '../noop.mjs'; - -/* - Bezier function generator - This has been modified from Gaëtan Renaudeau's BezierEasing - https://github.com/gre/bezier-easing/blob/master/src/index.js - https://github.com/gre/bezier-easing/blob/master/LICENSE - - I've removed the newtonRaphsonIterate algo because in benchmarking it - wasn't noticeably faster than binarySubdivision, indeed removing it - usually improved times, depending on the curve. - I also removed the lookup table, as for the added bundle size and loop we're - only cutting ~4 or so subdivision iterations. I bumped the max iterations up - to 12 to compensate and this still tended to be faster for no perceivable - loss in accuracy. - Usage - const easeOut = cubicBezier(.17,.67,.83,.67); - const x = easeOut(0.5); // returns 0.627... -*/ -// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. -const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * - t; -const subdivisionPrecision = 0.0000001; -const subdivisionMaxIterations = 12; -function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) { - let currentX; - let currentT; - let i = 0; - do { - currentT = lowerBound + (upperBound - lowerBound) / 2.0; - currentX = calcBezier(currentT, mX1, mX2) - x; - if (currentX > 0.0) { - upperBound = currentT; - } - else { - lowerBound = currentT; - } - } while (Math.abs(currentX) > subdivisionPrecision && - ++i < subdivisionMaxIterations); - return currentT; -} -/*#__NO_SIDE_EFFECTS__*/ -function cubicBezier(mX1, mY1, mX2, mY2) { - // If this is a linear gradient, return linear easing - if (mX1 === mY1 && mX2 === mY2) - return noop; - const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2); - // If animation is at start/end, return t without easing - return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2); -} - -export { cubicBezier }; -//# sourceMappingURL=cubic-bezier.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.map deleted file mode 100644 index 711fe2ec..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cubic-bezier.mjs","sources":["../../../src/easing/cubic-bezier.ts"],"sourcesContent":["/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticeably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n\nimport { noop } from \"../noop\"\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t: number, a1: number, a2: number) =>\n (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t\n\nconst subdivisionPrecision = 0.0000001\nconst subdivisionMaxIterations = 12\n\nfunction binarySubdivide(\n x: number,\n lowerBound: number,\n upperBound: number,\n mX1: number,\n mX2: number\n) {\n let currentX: number\n let currentT: number\n let i: number = 0\n\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0\n currentX = calcBezier(currentT, mX1, mX2) - x\n if (currentX > 0.0) {\n upperBound = currentT\n } else {\n lowerBound = currentT\n }\n } while (\n Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations\n )\n\n return currentT\n}\n\n/*#__NO_SIDE_EFFECTS__*/\nexport function cubicBezier(\n mX1: number,\n mY1: number,\n mX2: number,\n mY2: number\n) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2) return noop\n\n const getTForX = (aX: number) => binarySubdivide(aX, 0, 1, mX1, mX2)\n\n // If animation is at start/end, return t without easing\n return (t: number)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AE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;;AAGpE,IAAA,OAAO,CAAC,CAAS,KACb,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;AAClE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/ease.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/ease.mjs deleted file mode 100644 index 10cabac3..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/ease.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import { cubicBezier } from './cubic-bezier.mjs'; - -const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1); -const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1); -const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1); - -export { easeIn, easeInOut, easeOut }; -//# sourceMappingURL=ease.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/ease.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/ease.mjs.map deleted file mode 100644 index cb24bf39..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/ease.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ease.mjs","sources":["../../../src/easing/ease.ts"],"sourcesContent":["import { cubicBezier } from \"./cubic-bezier\"\n\nexport const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1)\nexport const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1)\nexport const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1)\n"],"names":[],"mappings":";;AAEO,MAAM,MAAM,iBAAiB,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACtD,MAAM,OAAO,iBAAiB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;AACvD,MAAM,SAAS,iBAAiB,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs deleted file mode 100644 index 1ed7de13..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs +++ /dev/null @@ -1,7 +0,0 @@ -// Accepts an easing function and returns a new one that outputs mirrored values for -// the second half of the animation. Turns easeIn into easeInOut. -/*#__NO_SIDE_EFFECTS__*/ -const mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2; - -export { mirrorEasing }; -//# sourceMappingURL=mirror.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs.map deleted file mode 100644 index a6b594d6..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mirror.mjs","sources":["../../../../src/easing/modifiers/mirror.ts"],"sourcesContent":["// Accepts an easing function and returns a new one that outputs mirrored values for\n\nimport { EasingModifier } from \"../types\"\n\n// the second half of the animation. Turns easeIn into easeInOut.\n/*#__NO_SIDE_EFFECTS__*/\nexport const mirrorEasing: EasingModifier = (easing) => (p) =>\n p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2\n"],"names":[],"mappings":"AAAA;AAIA;AACA;MACa,YAAY,GAAmB,CAAC,MAAM,KAAK,CAAC,CAAC,KACtD,CAAC,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs deleted file mode 100644 index 3a6d9427..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs +++ /dev/null @@ -1,7 +0,0 @@ -// Accepts an easing function and returns a new one that outputs reversed values. -// Turns easeIn into easeOut. -/*#__NO_SIDE_EFFECTS__*/ -const reverseEasing = (easing) => (p) => 1 - easing(1 - p); - -export { reverseEasing }; -//# sourceMappingURL=reverse.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs.map deleted file mode 100644 index 613d1de1..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reverse.mjs","sources":["../../../../src/easing/modifiers/reverse.ts"],"sourcesContent":["// Accepts an easing function and returns a new one that outputs reversed values.\n\nimport { EasingModifier } from \"../types\"\n\n// Turns easeIn into easeOut.\n/*#__NO_SIDE_EFFECTS__*/\nexport const reverseEasing: EasingModifier = (easing) => (p) =>\n 1 - easing(1 - p)\n"],"names":[],"mappings":"AAAA;AAIA;AACA;MACa,aAAa,GAAmB,CAAC,MAAM,KAAK,CAAC,CAAC,KACvD,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/steps.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/steps.mjs deleted file mode 100644 index 3e3961c1..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/steps.mjs +++ /dev/null @@ -1,17 +0,0 @@ -import { clamp } from '../clamp.mjs'; - -/*#__NO_SIDE_EFFECTS__*/ -function steps(numSteps, direction = "end") { - return (progress) => { - progress = - direction === "end" - ? Math.min(progress, 0.999) - : Math.max(progress, 0.001); - const expanded = progress * numSteps; - const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded); - return clamp(0, 1, rounded / numSteps); - }; -} - -export { steps }; -//# sourceMappingURL=steps.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/steps.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/steps.mjs.map deleted file mode 100644 index 1beaa69e..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/steps.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"steps.mjs","sources":["../../../src/easing/steps.ts"],"sourcesContent":["import { clamp } from \"../clamp\"\nimport type { EasingFunction } from \"./types\"\n\n/*\n Create stepped version of 0-1 progress\n\n @param [int]: Number of steps\n @param [number]: Current value\n @return [number]: Stepped value\n*/\nexport type Direction = \"start\" | \"end\"\n\n/*#__NO_SIDE_EFFECTS__*/\nexport function steps(\n numSteps: number,\n direction: Direction = \"end\"\n): EasingFunction {\n return (progress: number) => {\n progress =\n direction === \"end\"\n ? Math.min(progress, 0.999)\n : Math.max(progress, 0.001)\n const expanded = progress * numSteps\n const rounded =\n direction === \"end\" ? Math.floor(expanded) : Math.ceil(expanded)\n\n return clamp(0, 1, rounded / numSteps)\n }\n}\n"],"names":[],"mappings":";;AAYA;SACgB,KAAK,CACjB,QAAgB,EAChB,YAAuB,KAAK,EAAA;IAE5B,OAAO,CAAC,QAAgB,KAAI;QACxB,QAAQ;AACJ,YAAA,SAAS,KAAK;kBACR,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK;kBACxB,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC;AACnC,QAAA,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ;QACpC,MAAM,OAAO,GACT,SAAS,KAAK,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QAEpE,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;AAC1C,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs deleted file mode 100644 index 79a8519c..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { wrap } from '../../wrap.mjs'; -import { isEasingArray } from './is-easing-array.mjs'; - -/*#__NO_SIDE_EFFECTS__*/ -function getEasingForSegment(easing, i) { - return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing; -} - -export { getEasingForSegment }; -//# sourceMappingURL=get-easing-for-segment.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs.map deleted file mode 100644 index 32b3b48d..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get-easing-for-segment.mjs","sources":["../../../../src/easing/utils/get-easing-for-segment.ts"],"sourcesContent":["import { wrap } from \"../../wrap\"\nimport { Easing } from \"../types\"\nimport { isEasingArray } from \"./is-easing-array\"\n\n/*#__NO_SIDE_EFFECTS__*/\nexport function getEasingForSegment(\n easing: Easing | Easing[],\n i: number\n): Easing {\n return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing\n}\n"],"names":[],"mappings":";;;AAIA;AACM,SAAU,mBAAmB,CAC/B,MAAyB,EACzB,CAAS,EAAA;IAET,OAAO,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM;AAC7E;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs deleted file mode 100644 index 1a3c7367..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs +++ /dev/null @@ -1,5 +0,0 @@ -/*#__NO_SIDE_EFFECTS__*/ -const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number"; - -export { isBezierDefinition }; -//# sourceMappingURL=is-bezier-definition.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs.map deleted file mode 100644 index ffbdd27d..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-bezier-definition.mjs","sources":["../../../../src/easing/utils/is-bezier-definition.ts"],"sourcesContent":["import { BezierDefinition, Easing } from \"../types\"\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const isBezierDefinition = (\n easing: Easing | Easing[]\n): easing is BezierDefinition =>\n Array.isArray(easing) && typeof easing[0] === \"number\"\n"],"names":[],"mappings":"AAEA;MACa,kBAAkB,GAAG,CAC9B,MAAyB,KAEzB,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs deleted file mode 100644 index 6b01de06..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs +++ /dev/null @@ -1,7 +0,0 @@ -/*#__NO_SIDE_EFFECTS__*/ -const isEasingArray = (ease) => { - return Array.isArray(ease) && typeof ease[0] !== "number"; -}; - -export { isEasingArray }; -//# sourceMappingURL=is-easing-array.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs.map deleted file mode 100644 index 4fd993da..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-easing-array.mjs","sources":["../../../../src/easing/utils/is-easing-array.ts"],"sourcesContent":["import { Easing } from \"../types\"\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const isEasingArray = (ease: any): ease is Easing[] => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\"\n}\n"],"names":[],"mappings":"AAEA;AACO,MAAM,aAAa,GAAG,CAAC,IAAS,KAAsB;AACzD,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;AAC7D;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/map.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/map.mjs deleted file mode 100644 index 83b042d0..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/map.mjs +++ /dev/null @@ -1,42 +0,0 @@ -import { invariant } from '../../errors.mjs'; -import { noop } from '../../noop.mjs'; -import { anticipate } from '../anticipate.mjs'; -import { backOut, backInOut, backIn } from '../back.mjs'; -import { circOut, circInOut, circIn } from '../circ.mjs'; -import { cubicBezier } from '../cubic-bezier.mjs'; -import { easeOut, easeInOut, easeIn } from '../ease.mjs'; -import { isBezierDefinition } from './is-bezier-definition.mjs'; - -const easingLookup = { - linear: noop, - easeIn, - easeInOut, - easeOut, - circIn, - circInOut, - circOut, - backIn, - backInOut, - backOut, - anticipate, -}; -const isValidEasing = (easing) => { - return typeof easing === "string"; -}; -const easingDefinitionToFunction = (definition) => { - if (isBezierDefinition(definition)) { - // If cubic bezier definition, create bezier curve - invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length"); - const [x1, y1, x2, y2] = definition; - return cubicBezier(x1, y1, x2, y2); - } - else if (isValidEasing(definition)) { - // Else lookup from table - invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, "invalid-easing-type"); - return easingLookup[definition]; - } - return definition; -}; - -export { easingDefinitionToFunction }; -//# sourceMappingURL=map.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/map.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/map.mjs.map deleted file mode 100644 index c9d19ffe..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/map.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.mjs","sources":["../../../../src/easing/utils/map.ts"],"sourcesContent":["import { invariant } from \"../../errors\"\nimport { noop } from \"../../noop\"\nimport { anticipate } from \"../anticipate\"\nimport { backIn, backInOut, backOut } from \"../back\"\nimport { circIn, circInOut, circOut } from \"../circ\"\nimport { cubicBezier } from \"../cubic-bezier\"\nimport { easeIn, easeInOut, easeOut } from \"../ease\"\nimport { Easing, EasingFunction } from \"../types\"\nimport { isBezierDefinition } from \"./is-bezier-definition\"\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n}\n\nconst isValidEasing = (easing: Easing): easing is keyof typeof easingLookup => {\n return typeof easing === \"string\"\n}\n\nexport const easingDefinitionToFunction = (\n definition: Easing\n): EasingFunction => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(\n definition.length === 4,\n `Cubic bezier arrays must contain four numerical values.`,\n \"cubic-bezier-length\"\n )\n\n const [x1, y1, x2, y2] = definition\n return cubicBezier(x1, y1, x2, y2)\n } else if (isValidEasing(definition)) {\n // Else lookup from table\n invariant(\n easingLookup[definition] !== undefined,\n `Invalid easing type '${definition}'`,\n \"invalid-easing-type\"\n )\n return easingLookup[definition]\n }\n\n return definition\n}\n"],"names":[],"mappings":";;;;;;;;;AAUA,MAAM,YAAY,GAAG;AACjB,IAAA,MAAM,EAAE,IAAI;IACZ,MAAM;IACN,SAAS;IACT,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,UAAU;CACb;AAED,MAAM,aAAa,GAAG,CAAC,MAAc,KAAyC;AAC1E,IAAA,OAAO,OAAO,MAAM,KAAK,QAAQ;AACrC,CAAC;AAEM,MAAM,0BAA0B,GAAG,CACtC,UAAkB,KACF;AAChB,IAAA,IAAI,kBAAkB,CAAC,UAAU,CAAC,EAAE;;QAEhC,SAAS,CACL,UAAU,CAAC,MAAM,KAAK,CAAC,EACvB,CAAA,uDAAA,CAAyD,EACzD,qBAAqB,CACxB;QAED,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,UAAU;QACnC,OAAO,WAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACtC;AAAO,SAAA,IAAI,aAAa,CAAC,UAAU,CAAC,EAAE;;AAElC,QAAA,SAAS,CACL,YAAY,CAAC,UAAU,CAAC,KAAK,SAAS,EACtC,CAAA,qBAAA,EAAwB,UAAU,CAAA,CAAA,CAAG,EACrC,qBAAqB,CACxB;AACD,QAAA,OAAO,YAAY,CAAC,UAAU,CAAC;IACnC;AAEA,IAAA,OAAO,UAAU;AACrB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/errors.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/errors.mjs deleted file mode 100644 index 851adc94..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/errors.mjs +++ /dev/null @@ -1,20 +0,0 @@ -import { formatErrorMessage } from './format-error-message.mjs'; - -let warning = () => { }; -let invariant = () => { }; -if (typeof process !== "undefined" && - process.env?.NODE_ENV !== "production") { - warning = (check, message, errorCode) => { - if (!check && typeof console !== "undefined") { - console.warn(formatErrorMessage(message, errorCode)); - } - }; - invariant = (check, message, errorCode) => { - if (!check) { - throw new Error(formatErrorMessage(message, errorCode)); - } - }; -} - -export { invariant, warning }; -//# sourceMappingURL=errors.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/errors.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/errors.mjs.map deleted file mode 100644 index 837d6ef4..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/errors.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.mjs","sources":["../../src/errors.ts"],"sourcesContent":["import { formatErrorMessage } from \"./format-error-message\"\n\nexport type DevMessage = (\n check: boolean,\n message: string,\n errorCode?: string\n) => void\n\nlet warning: DevMessage = () => {}\nlet invariant: DevMessage = () => {}\n\nif (\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n) {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode))\n }\n }\n\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode))\n }\n }\n}\n\nexport { invariant, warning }\n"],"names":[],"mappings":";;AAQA,IAAI,OAAO,GAAe,MAAK,EAAE;AACjC,IAAI,SAAS,GAAe,MAAK,EAAE;AAEnC,IACI,OAAO,OAAO,KAAK,WAAW;AAC9B,IAAA,OAAO,CAAC,GAAG,EAAE,QAAQ,KAAK,YAAY,EACxC;IACE,OAAO,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,KAAI;QACpC,IAAI,CAAC,KAAK,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;YAC1C,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACxD;AACJ,IAAA,CAAC;IAED,SAAS,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,KAAI;QACtC,IAAI,CAAC,KAAK,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC3D;AACJ,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/format-error-message.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/format-error-message.mjs deleted file mode 100644 index dee97cc9..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/format-error-message.mjs +++ /dev/null @@ -1,8 +0,0 @@ -function formatErrorMessage(message, errorCode) { - return errorCode - ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}` - : message; -} - -export { formatErrorMessage }; -//# sourceMappingURL=format-error-message.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/format-error-message.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/format-error-message.mjs.map deleted file mode 100644 index d2ce8bab..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/format-error-message.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"format-error-message.mjs","sources":["../../src/format-error-message.ts"],"sourcesContent":["export function formatErrorMessage(message: string, errorCode?: string) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message\n}\n"],"names":[],"mappings":"AAAM,SAAU,kBAAkB,CAAC,OAAe,EAAE,SAAkB,EAAA;AAClE,IAAA,OAAO;AACH,UAAE,CAAA,EAAG,OAAO,CAAA,uFAAA,EAA0F,SAAS,CAAA;UAC7G,OAAO;AACjB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/global-config.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/global-config.mjs deleted file mode 100644 index 66ed5777..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/global-config.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const MotionGlobalConfig = {}; - -export { MotionGlobalConfig }; -//# sourceMappingURL=global-config.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/global-config.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/global-config.mjs.map deleted file mode 100644 index 664cd854..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/global-config.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"global-config.mjs","sources":["../../src/global-config.ts"],"sourcesContent":["export const MotionGlobalConfig: {\n skipAnimations?: boolean\n instantAnimations?: boolean\n useManualTiming?: boolean\n WillChange?: any\n mix?: (a: T, b: T) => (p: number) => T\n} = {}\n"],"names":[],"mappings":"AAAO,MAAM,kBAAkB,GAM3B;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/index.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/index.mjs deleted file mode 100644 index 2f07b9a2..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/index.mjs +++ /dev/null @@ -1,29 +0,0 @@ -export { addUniqueItem, moveItem, removeItem } from './array.mjs'; -export { clamp } from './clamp.mjs'; -export { invariant, warning } from './errors.mjs'; -export { MotionGlobalConfig } from './global-config.mjs'; -export { isNumericalString } from './is-numerical-string.mjs'; -export { isObject } from './is-object.mjs'; -export { isZeroValueString } from './is-zero-value-string.mjs'; -export { memo } from './memo.mjs'; -export { noop } from './noop.mjs'; -export { pipe } from './pipe.mjs'; -export { progress } from './progress.mjs'; -export { SubscriptionManager } from './subscription-manager.mjs'; -export { millisecondsToSeconds, secondsToMilliseconds } from './time-conversion.mjs'; -export { velocityPerSecond } from './velocity-per-second.mjs'; -export { hasWarned, warnOnce } from './warn-once.mjs'; -export { wrap } from './wrap.mjs'; -export { anticipate } from './easing/anticipate.mjs'; -export { backIn, backInOut, backOut } from './easing/back.mjs'; -export { circIn, circInOut, circOut } from './easing/circ.mjs'; -export { cubicBezier } from './easing/cubic-bezier.mjs'; -export { easeIn, easeInOut, easeOut } from './easing/ease.mjs'; -export { mirrorEasing } from './easing/modifiers/mirror.mjs'; -export { reverseEasing } from './easing/modifiers/reverse.mjs'; -export { steps } from './easing/steps.mjs'; -export { getEasingForSegment } from './easing/utils/get-easing-for-segment.mjs'; -export { isBezierDefinition } from './easing/utils/is-bezier-definition.mjs'; -export { isEasingArray } from './easing/utils/is-easing-array.mjs'; -export { easingDefinitionToFunction } from './easing/utils/map.mjs'; -//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/index.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/index.mjs.map deleted file mode 100644 index 9b2660b7..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-numerical-string.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-numerical-string.mjs deleted file mode 100644 index cb4ce6ef..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-numerical-string.mjs +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1" - */ -const isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v); - -export { isNumericalString }; -//# sourceMappingURL=is-numerical-string.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-numerical-string.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-numerical-string.mjs.map deleted file mode 100644 index f8a9eae1..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-numerical-string.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-numerical-string.mjs","sources":["../../src/is-numerical-string.ts"],"sourcesContent":["/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nexport const isNumericalString = (v: string) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v)\n"],"names":[],"mappings":"AAAA;;AAEG;AACI,MAAM,iBAAiB,GAAG,CAAC,CAAS,KAAK,8BAA8B,CAAC,IAAI,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-object.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-object.mjs deleted file mode 100644 index 7f9bd3e0..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-object.mjs +++ /dev/null @@ -1,4 +0,0 @@ -const isObject = (value) => typeof value === "object" && value !== null; - -export { isObject }; -//# sourceMappingURL=is-object.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-object.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-object.mjs.map deleted file mode 100644 index 44b48148..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-object.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-object.mjs","sources":["../../src/is-object.ts"],"sourcesContent":["export const isObject = (value: unknown): value is object =>\n typeof value === \"object\" && value !== null\n"],"names":[],"mappings":"AAAO,MAAM,QAAQ,GAAG,CAAC,KAAc,KACnC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-zero-value-string.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-zero-value-string.mjs deleted file mode 100644 index ba89398b..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-zero-value-string.mjs +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Check if the value is a zero value string like "0px" or "0%" - */ -const isZeroValueString = (v) => /^0[^.\s]+$/u.test(v); - -export { isZeroValueString }; -//# sourceMappingURL=is-zero-value-string.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-zero-value-string.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-zero-value-string.mjs.map deleted file mode 100644 index 8c7f2afb..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/is-zero-value-string.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is-zero-value-string.mjs","sources":["../../src/is-zero-value-string.ts"],"sourcesContent":["/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nexport const isZeroValueString = (v: string) => /^0[^.\\s]+$/u.test(v)\n"],"names":[],"mappings":"AAAA;;AAEG;AACI,MAAM,iBAAiB,GAAG,CAAC,CAAS,KAAK,aAAa,CAAC,IAAI,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/memo.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/memo.mjs deleted file mode 100644 index d164ae43..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/memo.mjs +++ /dev/null @@ -1,12 +0,0 @@ -/*#__NO_SIDE_EFFECTS__*/ -function memo(callback) { - let result; - return () => { - if (result === undefined) - result = callback(); - return result; - }; -} - -export { memo }; -//# sourceMappingURL=memo.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/memo.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/memo.mjs.map deleted file mode 100644 index 8b7e888c..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/memo.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"memo.mjs","sources":["../../src/memo.ts"],"sourcesContent":["/*#__NO_SIDE_EFFECTS__*/\nexport function memo(callback: () => T) {\n let result: T | undefined\n\n return () => {\n if (result === undefined) result = callback()\n return result\n }\n}\n"],"names":[],"mappings":"AAAA;AACM,SAAU,IAAI,CAAgB,QAAiB,EAAA;AACjD,IAAA,IAAI,MAAqB;AAEzB,IAAA,OAAO,MAAK;QACR,IAAI,MAAM,KAAK,SAAS;YAAE,MAAM,GAAG,QAAQ,EAAE;AAC7C,QAAA,OAAO,MAAM;AACjB,IAAA,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.mjs deleted file mode 100644 index bd29da3b..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.mjs +++ /dev/null @@ -1,5 +0,0 @@ -/*#__NO_SIDE_EFFECTS__*/ -const noop = (any) => any; - -export { noop }; -//# sourceMappingURL=noop.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.mjs.map deleted file mode 100644 index fffdfa81..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/noop.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"noop.mjs","sources":["../../src/noop.ts"],"sourcesContent":["/*#__NO_SIDE_EFFECTS__*/\nexport const noop = (any: T): T => any\n"],"names":[],"mappings":"AAAA;AACO,MAAM,IAAI,GAAG,CAAI,GAAM,KAAQ;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/pipe.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/pipe.mjs deleted file mode 100644 index bd4512c4..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/pipe.mjs +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Pipe - * Compose other transformers to run linearily - * pipe(min(20), max(40)) - * @param {...functions} transformers - * @return {function} - */ -const pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v))); - -export { pipe }; -//# sourceMappingURL=pipe.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/pipe.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/pipe.mjs.map deleted file mode 100644 index 12dd6367..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/pipe.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pipe.mjs","sources":["../../src/pipe.ts"],"sourcesContent":["/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nexport const pipe = (...transformers: Function[]) =>\n transformers.reduce((a, b) => (v: any) => b(a(v)))\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;AACI,MAAM,IAAI,GAAG,CAAC,GAAG,YAAwB,KAC5C,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/progress.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/progress.mjs deleted file mode 100644 index d964710f..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/progress.mjs +++ /dev/null @@ -1,15 +0,0 @@ -/* - Progress within given range - - Given a lower limit and an upper limit, we return the progress - (expressed as a number 0-1) represented by the given value, and - limit that progress to within 0-1. -*/ -/*#__NO_SIDE_EFFECTS__*/ -const progress = (from, to, value) => { - const range = to - from; - return range ? (value - from) / range : 1; -}; - -export { progress }; -//# sourceMappingURL=progress.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/progress.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/progress.mjs.map deleted file mode 100644 index 99c498df..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/progress.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"progress.mjs","sources":["../../src/progress.ts"],"sourcesContent":["/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n*/\n/*#__NO_SIDE_EFFECTS__*/\nexport const progress = (from: number, to: number, value: number) => {\n const range = to - from\n return range ? (value - from) / range : 1\n}\n"],"names":[],"mappings":"AAAA;;;;;;AAME;AACF;AACO,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,KAAa,KAAI;AAChE,IAAA,MAAM,KAAK,GAAG,EAAE,GAAG,IAAI;AACvB,IAAA,OAAO,KAAK,GAAG,CAAC,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,CAAC;AAC7C;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/subscription-manager.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/subscription-manager.mjs deleted file mode 100644 index 7329b56a..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/subscription-manager.mjs +++ /dev/null @@ -1,41 +0,0 @@ -import { addUniqueItem, removeItem } from './array.mjs'; - -class SubscriptionManager { - constructor() { - this.subscriptions = []; - } - add(handler) { - addUniqueItem(this.subscriptions, handler); - return () => removeItem(this.subscriptions, handler); - } - notify(a, b, c) { - const numSubscriptions = this.subscriptions.length; - if (!numSubscriptions) - return; - if (numSubscriptions === 1) { - /** - * If there's only a single handler we can just call it without invoking a loop. - */ - this.subscriptions[0](a, b, c); - } - else { - for (let i = 0; i < numSubscriptions; i++) { - /** - * Check whether the handler exists before firing as it's possible - * the subscriptions were modified during this loop running. - */ - const handler = this.subscriptions[i]; - handler && handler(a, b, c); - } - } - } - getSize() { - return this.subscriptions.length; - } - clear() { - this.subscriptions.length = 0; - } -} - -export { SubscriptionManager }; -//# sourceMappingURL=subscription-manager.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/subscription-manager.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/subscription-manager.mjs.map deleted file mode 100644 index 8a2a74df..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/subscription-manager.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscription-manager.mjs","sources":["../../src/subscription-manager.ts"],"sourcesContent":["import { addUniqueItem, removeItem } from \"./array\"\n\ntype GenericHandler = (...args: any) => void\n\nexport class SubscriptionManager {\n private subscriptions: Handler[] = []\n\n add(handler: Handler): VoidFunction {\n addUniqueItem(this.subscriptions, handler)\n return () => removeItem(this.subscriptions, handler)\n }\n\n notify(\n a?: Parameters[0],\n b?: Parameters[1],\n c?: Parameters[2]\n ) {\n const numSubscriptions = this.subscriptions.length\n\n if (!numSubscriptions) return\n\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c)\n } else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i]\n handler && handler(a, b, c)\n }\n }\n }\n\n getSize() {\n return this.subscriptions.length\n }\n\n clear() {\n this.subscriptions.length = 0\n }\n}\n"],"names":[],"mappings":";;MAIa,mBAAmB,CAAA;AAAhC,IAAA,WAAA,GAAA;QACY,IAAA,CAAA,aAAa,GAAc,EAAE;IAwCzC;AAtCI,IAAA,GAAG,CAAC,OAAgB,EAAA;AAChB,QAAA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC;QAC1C,OAAO,MAAM,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC;IACxD;AAEA,IAAA,MAAM,CACF,CAA0B,EAC1B,CAA0B,EAC1B,CAA0B,EAAA;AAE1B,QAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM;AAElD,QAAA,IAAI,CAAC,gBAAgB;YAAE;AAEvB,QAAA,IAAI,gBAAgB,KAAK,CAAC,EAAE;AACxB;;AAEG;AACH,YAAA,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAClC;aAAO;AACH,YAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,gBAAgB,EAAE,CAAC,EAAE,EAAE;AACvC;;;AAGG;gBACH,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;gBACrC,OAAO,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YAC/B;QACJ;IACJ;IAEA,OAAO,GAAA;AACH,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM;IACpC;IAEA,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;IACjC;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/time-conversion.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/time-conversion.mjs deleted file mode 100644 index f7703994..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/time-conversion.mjs +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Converts seconds to milliseconds - * - * @param seconds - Time in seconds. - * @return milliseconds - Converted time in milliseconds. - */ -/*#__NO_SIDE_EFFECTS__*/ -const secondsToMilliseconds = (seconds) => seconds * 1000; -/*#__NO_SIDE_EFFECTS__*/ -const millisecondsToSeconds = (milliseconds) => milliseconds / 1000; - -export { millisecondsToSeconds, secondsToMilliseconds }; -//# sourceMappingURL=time-conversion.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/time-conversion.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/time-conversion.mjs.map deleted file mode 100644 index 3b40c545..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/time-conversion.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"time-conversion.mjs","sources":["../../src/time-conversion.ts"],"sourcesContent":["/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const secondsToMilliseconds = (seconds: number) => seconds * 1000\n\n/*#__NO_SIDE_EFFECTS__*/\nexport const millisecondsToSeconds = (milliseconds: number) =>\n milliseconds / 1000\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAEH;AACO,MAAM,qBAAqB,GAAG,CAAC,OAAe,KAAK,OAAO,GAAG;AAEpE;AACO,MAAM,qBAAqB,GAAG,CAAC,YAAoB,KACtD,YAAY,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/velocity-per-second.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/velocity-per-second.mjs deleted file mode 100644 index 6fc328a1..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/velocity-per-second.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/* - Convert velocity into velocity per second -*/ -/*#__NO_SIDE_EFFECTS__*/ -const velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0; - -export { velocityPerSecond }; -//# sourceMappingURL=velocity-per-second.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/velocity-per-second.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/velocity-per-second.mjs.map deleted file mode 100644 index d1a94d74..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/velocity-per-second.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"velocity-per-second.mjs","sources":["../../src/velocity-per-second.ts"],"sourcesContent":["/*\n Convert velocity into velocity per second\n*/\n/*#__NO_SIDE_EFFECTS__*/\nexport const velocityPerSecond = (velocity: number, frameDuration: number) =>\n frameDuration ? velocity * (1000 / frameDuration) : 0\n"],"names":[],"mappings":"AAAA;;AAEE;AACF;AACO,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAE,aAAqB,KACrE,aAAa,GAAG,QAAQ,IAAI,IAAI,GAAG,aAAa,CAAC,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/warn-once.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/warn-once.mjs deleted file mode 100644 index 8d68e963..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/warn-once.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { formatErrorMessage } from './format-error-message.mjs'; - -const warned = new Set(); -function hasWarned(message) { - return warned.has(message); -} -function warnOnce(condition, message, errorCode) { - if (condition || warned.has(message)) - return; - console.warn(formatErrorMessage(message, errorCode)); - warned.add(message); -} - -export { hasWarned, warnOnce }; -//# sourceMappingURL=warn-once.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/warn-once.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/warn-once.mjs.map deleted file mode 100644 index 6c6b6f7c..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/warn-once.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"warn-once.mjs","sources":["../../src/warn-once.ts"],"sourcesContent":["import { formatErrorMessage } from \"./format-error-message\"\n\nconst warned = new Set()\n\nexport function hasWarned(message: string) {\n return warned.has(message)\n}\n\nexport function warnOnce(\n condition: boolean,\n message: string,\n errorCode?: string\n) {\n if (condition || warned.has(message)) return\n\n console.warn(formatErrorMessage(message, errorCode))\n warned.add(message)\n}\n"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU;AAE1B,SAAU,SAAS,CAAC,OAAe,EAAA;AACrC,IAAA,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;AAC9B;SAEgB,QAAQ,CACpB,SAAkB,EAClB,OAAe,EACf,SAAkB,EAAA;AAElB,IAAA,IAAI,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;QAAE;IAEtC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACpD,IAAA,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;AACvB;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/wrap.mjs b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/wrap.mjs deleted file mode 100644 index 5fc9fba9..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/wrap.mjs +++ /dev/null @@ -1,7 +0,0 @@ -const wrap = (min, max, v) => { - const rangeSize = max - min; - return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min; -}; - -export { wrap }; -//# sourceMappingURL=wrap.mjs.map diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/wrap.mjs.map b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/wrap.mjs.map deleted file mode 100644 index e2fd2d7f..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/wrap.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wrap.mjs","sources":["../../src/wrap.ts"],"sourcesContent":["export const wrap = (min: number, max: number, v: number) => {\n const rangeSize = max - min\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min\n}\n"],"names":[],"mappings":"AAAO,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,CAAS,KAAI;AACxD,IAAA,MAAM,SAAS,GAAG,GAAG,GAAG,GAAG;AAC3B,IAAA,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,SAAS,IAAI,SAAS,IAAI,SAAS,IAAI,GAAG;AACpE;;;;"} \ No newline at end of file diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/index.d.ts b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/index.d.ts deleted file mode 100644 index 5ef1fae2..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/index.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -declare function addUniqueItem(arr: T[], item: T): void; -declare function removeItem(arr: T[], item: T): void; -declare function moveItem([...arr]: T[], fromIndex: number, toIndex: number): T[]; - -declare const clamp: (min: number, max: number, v: number) => number; - -type DevMessage = (check: boolean, message: string, errorCode?: string) => void; -declare let warning: DevMessage; -declare let invariant: DevMessage; - -declare const MotionGlobalConfig: { - skipAnimations?: boolean; - instantAnimations?: boolean; - useManualTiming?: boolean; - WillChange?: any; - mix?: (a: T, b: T) => (p: number) => T; -}; - -/** - * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1" - */ -declare const isNumericalString: (v: string) => boolean; - -declare const isObject: (value: unknown) => value is object; - -/** - * Check if the value is a zero value string like "0px" or "0%" - */ -declare const isZeroValueString: (v: string) => boolean; - -declare function memo(callback: () => T): () => T; - -declare const noop: (any: T) => T; - -/** - * Pipe - * Compose other transformers to run linearily - * pipe(min(20), max(40)) - * @param {...functions} transformers - * @return {function} - */ -declare const pipe: (...transformers: Function[]) => Function; - -declare const progress: (from: number, to: number, value: number) => number; - -type GenericHandler = (...args: any) => void; -declare class SubscriptionManager { - private subscriptions; - add(handler: Handler): VoidFunction; - notify(a?: Parameters[0], b?: Parameters[1], c?: Parameters[2]): void; - getSize(): number; - clear(): void; -} - -/** - * Converts seconds to milliseconds - * - * @param seconds - Time in seconds. - * @return milliseconds - Converted time in milliseconds. - */ -declare const secondsToMilliseconds: (seconds: number) => number; -declare const millisecondsToSeconds: (milliseconds: number) => number; - -declare const velocityPerSecond: (velocity: number, frameDuration: number) => number; - -declare function hasWarned(message: string): boolean; -declare function warnOnce(condition: boolean, message: string, errorCode?: string): void; - -declare const wrap: (min: number, max: number, v: number) => number; - -declare const anticipate: (p: number) => number; - -declare const backOut: (t: number) => number; -declare const backIn: EasingFunction; -declare const backInOut: EasingFunction; - -type EasingFunction = (v: number) => number; -type EasingModifier = (easing: EasingFunction) => EasingFunction; -type BezierDefinition = readonly [number, number, number, number]; -type EasingDefinition = BezierDefinition | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate"; -/** - * The easing function to use. Set as one of: - * - * - The name of an in-built easing function. - * - An array of four numbers to define a cubic bezier curve. - * - An easing function, that accepts and returns a progress value between `0` and `1`. - * - * @public - */ -type Easing = EasingDefinition | EasingFunction; - -declare const circIn: EasingFunction; -declare const circOut: EasingFunction; -declare const circInOut: EasingFunction; - -declare function cubicBezier(mX1: number, mY1: number, mX2: number, mY2: number): (t: number) => number; - -declare const easeIn: (t: number) => number; -declare const easeOut: (t: number) => number; -declare const easeInOut: (t: number) => number; - -declare const mirrorEasing: EasingModifier; - -declare const reverseEasing: EasingModifier; - -type Direction = "start" | "end"; -declare function steps(numSteps: number, direction?: Direction): EasingFunction; - -declare function getEasingForSegment(easing: Easing | Easing[], i: number): Easing; - -declare const isBezierDefinition: (easing: Easing | Easing[]) => easing is BezierDefinition; - -declare const isEasingArray: (ease: any) => ease is Easing[]; - -declare const easingDefinitionToFunction: (definition: Easing) => EasingFunction; - -interface Point { - x: number; - y: number; -} -interface Axis { - min: number; - max: number; -} -interface Box { - x: Axis; - y: Axis; -} -interface BoundingBox { - top: number; - right: number; - bottom: number; - left: number; -} -interface AxisDelta { - translate: number; - scale: number; - origin: number; - originPoint: number; -} -interface Delta { - x: AxisDelta; - y: AxisDelta; -} -type TransformPoint = (point: Point) => Point; - -export { type Axis, type AxisDelta, type BezierDefinition, type BoundingBox, type Box, type Delta, type DevMessage, type Direction, type Easing, type EasingDefinition, type EasingFunction, type EasingModifier, MotionGlobalConfig, type Point, SubscriptionManager, type TransformPoint, addUniqueItem, anticipate, backIn, backInOut, backOut, circIn, circInOut, circOut, clamp, cubicBezier, easeIn, easeInOut, easeOut, easingDefinitionToFunction, getEasingForSegment, hasWarned, invariant, isBezierDefinition, isEasingArray, isNumericalString, isObject, isZeroValueString, memo, millisecondsToSeconds, mirrorEasing, moveItem, noop, pipe, progress, removeItem, reverseEasing, secondsToMilliseconds, steps, velocityPerSecond, warnOnce, warning, wrap }; diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/motion-utils.dev.js b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/motion-utils.dev.js deleted file mode 100644 index dc5d721a..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/motion-utils.dev.js +++ /dev/null @@ -1,348 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.MotionUtils = {})); -})(this, (function (exports) { 'use strict'; - - function addUniqueItem(arr, item) { - if (arr.indexOf(item) === -1) - arr.push(item); - } - function removeItem(arr, item) { - const index = arr.indexOf(item); - if (index > -1) - arr.splice(index, 1); - } - // Adapted from array-move - function moveItem([...arr], fromIndex, toIndex) { - const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex; - if (startIndex >= 0 && startIndex < arr.length) { - const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex; - const [item] = arr.splice(fromIndex, 1); - arr.splice(endIndex, 0, item); - } - return arr; - } - - const clamp = (min, max, v) => { - if (v > max) - return max; - if (v < min) - return min; - return v; - }; - - function formatErrorMessage(message, errorCode) { - return errorCode - ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}` - : message; - } - - exports.warning = () => { }; - exports.invariant = () => { }; - if (typeof process !== "undefined" && - process.env?.NODE_ENV !== "production") { - exports.warning = (check, message, errorCode) => { - if (!check && typeof console !== "undefined") { - console.warn(formatErrorMessage(message, errorCode)); - } - }; - exports.invariant = (check, message, errorCode) => { - if (!check) { - throw new Error(formatErrorMessage(message, errorCode)); - } - }; - } - - const MotionGlobalConfig = {}; - - /** - * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1" - */ - const isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v); - - const isObject = (value) => typeof value === "object" && value !== null; - - /** - * Check if the value is a zero value string like "0px" or "0%" - */ - const isZeroValueString = (v) => /^0[^.\s]+$/u.test(v); - - /*#__NO_SIDE_EFFECTS__*/ - function memo(callback) { - let result; - return () => { - if (result === undefined) - result = callback(); - return result; - }; - } - - /*#__NO_SIDE_EFFECTS__*/ - const noop = (any) => any; - - /** - * Pipe - * Compose other transformers to run linearily - * pipe(min(20), max(40)) - * @param {...functions} transformers - * @return {function} - */ - const pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v))); - - /* - Progress within given range - - Given a lower limit and an upper limit, we return the progress - (expressed as a number 0-1) represented by the given value, and - limit that progress to within 0-1. - */ - /*#__NO_SIDE_EFFECTS__*/ - const progress = (from, to, value) => { - const range = to - from; - return range ? (value - from) / range : 1; - }; - - class SubscriptionManager { - constructor() { - this.subscriptions = []; - } - add(handler) { - addUniqueItem(this.subscriptions, handler); - return () => removeItem(this.subscriptions, handler); - } - notify(a, b, c) { - const numSubscriptions = this.subscriptions.length; - if (!numSubscriptions) - return; - if (numSubscriptions === 1) { - /** - * If there's only a single handler we can just call it without invoking a loop. - */ - this.subscriptions[0](a, b, c); - } - else { - for (let i = 0; i < numSubscriptions; i++) { - /** - * Check whether the handler exists before firing as it's possible - * the subscriptions were modified during this loop running. - */ - const handler = this.subscriptions[i]; - handler && handler(a, b, c); - } - } - } - getSize() { - return this.subscriptions.length; - } - clear() { - this.subscriptions.length = 0; - } - } - - /** - * Converts seconds to milliseconds - * - * @param seconds - Time in seconds. - * @return milliseconds - Converted time in milliseconds. - */ - /*#__NO_SIDE_EFFECTS__*/ - const secondsToMilliseconds = (seconds) => seconds * 1000; - /*#__NO_SIDE_EFFECTS__*/ - const millisecondsToSeconds = (milliseconds) => milliseconds / 1000; - - /* - Convert velocity into velocity per second - */ - /*#__NO_SIDE_EFFECTS__*/ - const velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0; - - const warned = new Set(); - function hasWarned(message) { - return warned.has(message); - } - function warnOnce(condition, message, errorCode) { - if (condition || warned.has(message)) - return; - console.warn(formatErrorMessage(message, errorCode)); - warned.add(message); - } - - const wrap = (min, max, v) => { - const rangeSize = max - min; - return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min; - }; - - /* - Bezier function generator - This has been modified from Gaëtan Renaudeau's BezierEasing - https://github.com/gre/bezier-easing/blob/master/src/index.js - https://github.com/gre/bezier-easing/blob/master/LICENSE - - I've removed the newtonRaphsonIterate algo because in benchmarking it - wasn't noticeably faster than binarySubdivision, indeed removing it - usually improved times, depending on the curve. - I also removed the lookup table, as for the added bundle size and loop we're - only cutting ~4 or so subdivision iterations. I bumped the max iterations up - to 12 to compensate and this still tended to be faster for no perceivable - loss in accuracy. - Usage - const easeOut = cubicBezier(.17,.67,.83,.67); - const x = easeOut(0.5); // returns 0.627... - */ - // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. - const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * - t; - const subdivisionPrecision = 0.0000001; - const subdivisionMaxIterations = 12; - function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) { - let currentX; - let currentT; - let i = 0; - do { - currentT = lowerBound + (upperBound - lowerBound) / 2.0; - currentX = calcBezier(currentT, mX1, mX2) - x; - if (currentX > 0.0) { - upperBound = currentT; - } - else { - lowerBound = currentT; - } - } while (Math.abs(currentX) > subdivisionPrecision && - ++i < subdivisionMaxIterations); - return currentT; - } - /*#__NO_SIDE_EFFECTS__*/ - function cubicBezier(mX1, mY1, mX2, mY2) { - // If this is a linear gradient, return linear easing - if (mX1 === mY1 && mX2 === mY2) - return noop; - const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2); - // If animation is at start/end, return t without easing - return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2); - } - - // Accepts an easing function and returns a new one that outputs mirrored values for - // the second half of the animation. Turns easeIn into easeInOut. - /*#__NO_SIDE_EFFECTS__*/ - const mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2; - - // Accepts an easing function and returns a new one that outputs reversed values. - // Turns easeIn into easeOut. - /*#__NO_SIDE_EFFECTS__*/ - const reverseEasing = (easing) => (p) => 1 - easing(1 - p); - - const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99); - const backIn = /*@__PURE__*/ reverseEasing(backOut); - const backInOut = /*@__PURE__*/ mirrorEasing(backIn); - - const anticipate = (p) => p >= 1 - ? 1 - : (p *= 2) < 1 - ? 0.5 * backIn(p) - : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); - - const circIn = (p) => 1 - Math.sin(Math.acos(p)); - const circOut = reverseEasing(circIn); - const circInOut = mirrorEasing(circIn); - - const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1); - const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1); - const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1); - - /*#__NO_SIDE_EFFECTS__*/ - function steps(numSteps, direction = "end") { - return (progress) => { - progress = - direction === "end" - ? Math.min(progress, 0.999) - : Math.max(progress, 0.001); - const expanded = progress * numSteps; - const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded); - return clamp(0, 1, rounded / numSteps); - }; - } - - /*#__NO_SIDE_EFFECTS__*/ - const isEasingArray = (ease) => { - return Array.isArray(ease) && typeof ease[0] !== "number"; - }; - - /*#__NO_SIDE_EFFECTS__*/ - function getEasingForSegment(easing, i) { - return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing; - } - - /*#__NO_SIDE_EFFECTS__*/ - const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number"; - - const easingLookup = { - linear: noop, - easeIn, - easeInOut, - easeOut, - circIn, - circInOut, - circOut, - backIn, - backInOut, - backOut, - anticipate, - }; - const isValidEasing = (easing) => { - return typeof easing === "string"; - }; - const easingDefinitionToFunction = (definition) => { - if (isBezierDefinition(definition)) { - // If cubic bezier definition, create bezier curve - exports.invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length"); - const [x1, y1, x2, y2] = definition; - return cubicBezier(x1, y1, x2, y2); - } - else if (isValidEasing(definition)) { - // Else lookup from table - exports.invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, "invalid-easing-type"); - return easingLookup[definition]; - } - return definition; - }; - - exports.MotionGlobalConfig = MotionGlobalConfig; - exports.SubscriptionManager = SubscriptionManager; - exports.addUniqueItem = addUniqueItem; - exports.anticipate = anticipate; - exports.backIn = backIn; - exports.backInOut = backInOut; - exports.backOut = backOut; - exports.circIn = circIn; - exports.circInOut = circInOut; - exports.circOut = circOut; - exports.clamp = clamp; - exports.cubicBezier = cubicBezier; - exports.easeIn = easeIn; - exports.easeInOut = easeInOut; - exports.easeOut = easeOut; - exports.easingDefinitionToFunction = easingDefinitionToFunction; - exports.getEasingForSegment = getEasingForSegment; - exports.hasWarned = hasWarned; - exports.isBezierDefinition = isBezierDefinition; - exports.isEasingArray = isEasingArray; - exports.isNumericalString = isNumericalString; - exports.isObject = isObject; - exports.isZeroValueString = isZeroValueString; - exports.memo = memo; - exports.millisecondsToSeconds = millisecondsToSeconds; - exports.mirrorEasing = mirrorEasing; - exports.moveItem = moveItem; - exports.noop = noop; - exports.pipe = pipe; - exports.progress = progress; - exports.removeItem = removeItem; - exports.reverseEasing = reverseEasing; - exports.secondsToMilliseconds = secondsToMilliseconds; - exports.steps = steps; - exports.velocityPerSecond = velocityPerSecond; - exports.warnOnce = warnOnce; - exports.wrap = wrap; - -})); diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/motion-utils.js b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/motion-utils.js deleted file mode 100644 index 34f8b07e..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/motion-utils.js +++ /dev/null @@ -1 +0,0 @@ -!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n="undefined"!=typeof globalThis?globalThis:n||self).MotionUtils={})}(this,function(n){"use strict";function t(n,t){-1===n.indexOf(t)&&n.push(t)}function e(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}const i=(n,t,e)=>e>t?t:e{},n.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(n.warning=(n,t,e)=>{n||"undefined"==typeof console||console.warn(s(t,e))},n.invariant=(n,t,e)=>{if(!n)throw new Error(s(t,e))});const o=n=>n;const r=new Set;const c=(n,t,e)=>{const i=t-n;return((e-n)%i+i)%i+n},a=(n,t,e)=>(((1-3*e+3*t)*n+(3*e-6*t))*n+3*t)*n;function u(n,t,e,i){if(n===t&&e===i)return o;const s=t=>function(n,t,e,i,s){let o,r,c=0;do{r=t+(e-t)/2,o=a(r,i,s)-n,o>0?e=r:t=r}while(Math.abs(o)>1e-7&&++c<12);return r}(t,0,1,n,e);return n=>0===n||1===n?n:a(s(n),t,i)}const l=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,f=n=>t=>1-n(1-t),p=u(.33,1.53,.69,.99),d=f(p),h=l(d),g=n=>n>=1?1:(n*=2)<1?.5*d(n):.5*(2-Math.pow(2,-10*(n-1))),b=n=>1-Math.sin(Math.acos(n)),m=f(b),y=l(b),v=u(.42,0,1,1),O=u(0,0,.58,1),I=u(.42,0,.58,1);const M=n=>Array.isArray(n)&&"number"!=typeof n[0];const w=n=>Array.isArray(n)&&"number"==typeof n[0],S={linear:o,easeIn:v,easeInOut:I,easeOut:O,circIn:b,circInOut:y,circOut:m,backIn:d,backInOut:h,backOut:p,anticipate:g};n.MotionGlobalConfig={},n.SubscriptionManager=class{constructor(){this.subscriptions=[]}add(n){return t(this.subscriptions,n),()=>e(this.subscriptions,n)}notify(n,t,e){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](n,t,e);else for(let s=0;s{if(w(t)){n.invariant(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,i,s,o]=t;return u(e,i,s,o)}return"string"==typeof t?(n.invariant(void 0!==S[t],`Invalid easing type '${t}'`,"invalid-easing-type"),S[t]):t},n.getEasingForSegment=function(n,t){return M(n)?n[c(0,n.length,t)]:n},n.hasWarned=function(n){return r.has(n)},n.isBezierDefinition=w,n.isEasingArray=M,n.isNumericalString=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),n.isObject=n=>"object"==typeof n&&null!==n,n.isZeroValueString=n=>/^0[^.\s]+$/u.test(n),n.memo=function(n){let t;return()=>(void 0===t&&(t=n()),t)},n.millisecondsToSeconds=n=>n/1e3,n.mirrorEasing=l,n.moveItem=function([...n],t,e){const i=t<0?n.length+t:t;if(i>=0&&in.reduce((n,t)=>e=>t(n(e))),n.progress=(n,t,e)=>{const i=t-n;return i?(e-n)/i:1},n.removeItem=e,n.reverseEasing=f,n.secondsToMilliseconds=n=>1e3*n,n.steps=function(n,t="end"){return e=>{const s=(e="end"===t?Math.min(e,.999):Math.max(e,.001))*n,o="end"===t?Math.floor(s):Math.ceil(s);return i(0,1,o/n)}},n.velocityPerSecond=(n,t)=>t?n*(1e3/t):0,n.warnOnce=function(n,t,e){n||r.has(t)||(console.warn(s(t,e)),r.add(t))},n.wrap=c}); diff --git a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/package.json b/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/package.json deleted file mode 100644 index e6f587e4..00000000 --- a/node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "motion-utils", - "version": "12.39.0", - "author": "Matt Perry", - "license": "MIT", - "repository": "https://github.com/motiondivision/motion", - "main": "./dist/cjs/index.js", - "types": "./dist/index.d.ts", - "module": "./dist/es/index.mjs", - "sideEffects": false, - "exports": { - ".": { - "types": "./dist/index.d.ts", - "require": "./dist/cjs/index.js", - "import": "./dist/es/index.mjs", - "default": "./dist/cjs/index.js" - } - }, - "scripts": { - "clean": "rm -rf types dist lib", - "build": "yarn clean && tsc -p . && rollup -c", - "dev": "concurrently -c blue,red -n tsc,rollup --kill-others \"tsc --watch -p . --preserveWatchOutput\" \"rollup --config --watch --no-watch.clearScreen\"", - "test": "jest --config jest.config.json --max-workers=2" - }, - "gitHead": "e1cad4e8c401b3bbfb3f5378a150f1270b86ea11" -} diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/framer-motion b/node_modules/.pnpm/motion@12.40.0/node_modules/framer-motion deleted file mode 120000 index 797576ae..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/framer-motion +++ /dev/null @@ -1 +0,0 @@ -../../framer-motion@12.40.0/node_modules/framer-motion \ No newline at end of file diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/LICENSE.md b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/LICENSE.md deleted file mode 100644 index 81110442..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2024 [Motion](https://motion.dev) B.V. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/README.md b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/README.md deleted file mode 100644 index c4ec0234..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/README.md +++ /dev/null @@ -1,140 +0,0 @@ -

Motion logo
Motion

-

- An open source animation library
for JavaScript, React and Vue -

- -

- npm version - npm downloads per month - jsDelivr hits (npm) - NPM License -

- -```bash -# React / JavaScript -npm install motion - -# Vue -npm install motion-v -``` - -## Table of Contents - -1. [Why Motion?](#why-motion) -2. [🍦 Platforms](#-platforms) -3. [🎓 Examples](#-examples) -4. [⚡️ Motion+](#-motion) -5. [👩🏻‍⚖️ License](#-license) -6. [💎 Contribute](#-contribute) -7. [✨ Sponsors](#-sponsors) - -## Why Motion? - -- **Simple API:** First-class React, JavaScript, and Vue packages. -- **Hybrid engine:** Power of JavaScript combined with native browser APIs for 120fps, GPU-accelerated animations. -- **Production-ready:** TypeScript, extensive test suite, tree-shakable, tiny footprint. - **Batteries included:** Gestures, springs, layout transitions, scroll-linked effects, timelines. - -## 🍦 Platforms - -Motion is available for [React](https://motion.dev/docs/react), [JavaScript](https://motion.dev/docs/quick-start) and [Vue](https://motion.dev/docs/vue). - -### React - -```jsx -import { motion } from "motion/react" - -function Component() { - return -} -``` - -Get started with [Motion for React](https://motion.dev/docs/react). - -**Note:** Framer Motion is now Motion. Import from `motion/react` instead of `framer-motion`. - -### JS - -```javascript -import { animate } from "motion" - -animate("#box", { x: 100 }) -``` - -Get started with [JavaScript](https://motion.dev/docs/quick-start). - -### Vue - -```html - - - -``` - -Get started with [Motion for Vue](https://motion.dev/docs/vue). - -## 🎓 Examples & tutorials - -Browse 330+ [official examples](https://motion.dev/examples), with copy-paste code that'll level-up your animations whether you're a beginner or an expert. - -Over 100 examples come with a full step-by-step [tutorial](https://motion.dev/tutorials). - -## ⚡️ Motion+ - -A one-time payment, lifetime-updates membership: - -- **330+ examples** -- **100+ tutorials** -- **Premium APIs** like [Cursor](https://motion.dev/docs/cursor) and [Ticker](https://motion.dev/docs/react-ticker) -- **Transition editor** for Cursor and VS Code -- **AI skills** -- **Private Discord** -- **Early access content** - -[Get Motion+](https://motion.dev/plus) - -## 👩🏻‍⚖️ License - -- Motion is MIT licensed. - -## 💎 Contribute - -- Want to contribute to Motion? Our [contributing guide](https://github.com/motiondivision/motion/blob/master/CONTRIBUTING.md) has you covered. - -## ✨ Sponsors - -Motion is sustainable thanks to the kind support of its sponsors. - -[Become a sponsor](https://motion.dev/sponsor) - -### Partners - -Motion powers the animations for all websites built with Framer, the web builder for creative pros. The Motion website itself is built on Framer, for its delightful canvas-based editing and powerful CMS features. - - - Framer - - -Motion drives the animations on the Cursor homepage, and is working with Cursor to bring powerful AI workflows to the Motion examples and docs. - - - Cursor - - -### Platinum - -Linear Figma Sanity Sanity Clerk - -### Gold - -### Silver - -Liveblocks Frontend.fyi Firecrawl Puzzmo Bolt.new - -### Personal - -- [OlegWock](https://sinja.io) -- [Lambert Weller](https://github.com/l-mbert) -- [Jake LeBoeuf](https://jklb.wf) diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/debug.js b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/debug.js deleted file mode 100644 index c13331ad..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/debug.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var debug = require('framer-motion/debug'); - - - -Object.keys(debug).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return debug[k]; } - }); -}); diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/index.js b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/index.js deleted file mode 100644 index c8516999..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var dom = require('framer-motion/dom'); - - - -Object.keys(dom).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return dom[k]; } - }); -}); diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/mini.js b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/mini.js deleted file mode 100644 index d4f10a5c..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/mini.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var mini = require('framer-motion/dom/mini'); - - - -Object.keys(mini).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return mini[k]; } - }); -}); diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react-client.js b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react-client.js deleted file mode 100644 index 6f8722fc..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react-client.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var client = require('framer-motion/client'); - - - -Object.keys(client).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return client[k]; } - }); -}); diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react-m.js b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react-m.js deleted file mode 100644 index 69f738a8..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react-m.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var m = require('framer-motion/m'); - - - -Object.keys(m).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return m[k]; } - }); -}); diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react-mini.js b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react-mini.js deleted file mode 100644 index 7c137c9d..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react-mini.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var mini = require('framer-motion/mini'); - - - -Object.keys(mini).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return mini[k]; } - }); -}); diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react.js b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react.js deleted file mode 100644 index 3a6f4198..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/cjs/react.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var framerMotion = require('framer-motion'); - - - -Object.defineProperty(exports, "m", { - enumerable: true, - get: function () { return framerMotion.m; } -}); -Object.defineProperty(exports, "motion", { - enumerable: true, - get: function () { return framerMotion.motion; } -}); -Object.keys(framerMotion).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return framerMotion[k]; } - }); -}); diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/debug.d.ts b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/debug.d.ts deleted file mode 100644 index 8c55be24..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/debug.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/debug'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/debug.mjs b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/debug.mjs deleted file mode 100644 index 8c55be24..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/debug.mjs +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/debug'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/index.mjs b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/index.mjs deleted file mode 100644 index 6bcc19b8..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/index.mjs +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/dom'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/mini.mjs b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/mini.mjs deleted file mode 100644 index 8c6de40c..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/mini.mjs +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/dom/mini'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react-client.mjs b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react-client.mjs deleted file mode 100644 index dd39a72a..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react-client.mjs +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/client'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react-m.mjs b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react-m.mjs deleted file mode 100644 index c7ed1b12..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react-m.mjs +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/m'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react-mini.mjs b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react-mini.mjs deleted file mode 100644 index ef5bdaef..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react-mini.mjs +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/mini'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react.mjs b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react.mjs deleted file mode 100644 index 18fa8ea9..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/es/react.mjs +++ /dev/null @@ -1,2 +0,0 @@ -export * from 'framer-motion'; -export { m, motion } from 'framer-motion'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/index.d.ts b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/index.d.ts deleted file mode 100644 index 6bcc19b8..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/dom'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/mini.d.ts b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/mini.d.ts deleted file mode 100644 index 8c6de40c..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/mini.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/dom/mini'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/motion.dev.js b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/motion.dev.js deleted file mode 100644 index 45164848..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/motion.dev.js +++ /dev/null @@ -1,11933 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Motion = {})); -})(this, (function (exports) { 'use strict'; - - function addUniqueItem(arr, item) { - if (arr.indexOf(item) === -1) - arr.push(item); - } - function removeItem(arr, item) { - const index = arr.indexOf(item); - if (index > -1) - arr.splice(index, 1); - } - // Adapted from array-move - function moveItem([...arr], fromIndex, toIndex) { - const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex; - if (startIndex >= 0 && startIndex < arr.length) { - const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex; - const [item] = arr.splice(fromIndex, 1); - arr.splice(endIndex, 0, item); - } - return arr; - } - - const clamp = (min, max, v) => { - if (v > max) - return max; - if (v < min) - return min; - return v; - }; - - function formatErrorMessage(message, errorCode) { - return errorCode - ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}` - : message; - } - - exports.warning = () => { }; - exports.invariant = () => { }; - if (typeof process !== "undefined" && - process.env?.NODE_ENV !== "production") { - exports.warning = (check, message, errorCode) => { - if (!check && typeof console !== "undefined") { - console.warn(formatErrorMessage(message, errorCode)); - } - }; - exports.invariant = (check, message, errorCode) => { - if (!check) { - throw new Error(formatErrorMessage(message, errorCode)); - } - }; - } - - const MotionGlobalConfig = {}; - - /** - * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1" - */ - const isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v); - - const isObject = (value) => typeof value === "object" && value !== null; - - /** - * Check if the value is a zero value string like "0px" or "0%" - */ - const isZeroValueString = (v) => /^0[^.\s]+$/u.test(v); - - /*#__NO_SIDE_EFFECTS__*/ - function memo(callback) { - let result; - return () => { - if (result === undefined) - result = callback(); - return result; - }; - } - - /*#__NO_SIDE_EFFECTS__*/ - const noop$1 = (any) => any; - - /** - * Pipe - * Compose other transformers to run linearily - * pipe(min(20), max(40)) - * @param {...functions} transformers - * @return {function} - */ - const pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v))); - - /* - Progress within given range - - Given a lower limit and an upper limit, we return the progress - (expressed as a number 0-1) represented by the given value, and - limit that progress to within 0-1. - */ - /*#__NO_SIDE_EFFECTS__*/ - const progress = (from, to, value) => { - const range = to - from; - return range ? (value - from) / range : 1; - }; - - class SubscriptionManager { - constructor() { - this.subscriptions = []; - } - add(handler) { - addUniqueItem(this.subscriptions, handler); - return () => removeItem(this.subscriptions, handler); - } - notify(a, b, c) { - const numSubscriptions = this.subscriptions.length; - if (!numSubscriptions) - return; - if (numSubscriptions === 1) { - /** - * If there's only a single handler we can just call it without invoking a loop. - */ - this.subscriptions[0](a, b, c); - } - else { - for (let i = 0; i < numSubscriptions; i++) { - /** - * Check whether the handler exists before firing as it's possible - * the subscriptions were modified during this loop running. - */ - const handler = this.subscriptions[i]; - handler && handler(a, b, c); - } - } - } - getSize() { - return this.subscriptions.length; - } - clear() { - this.subscriptions.length = 0; - } - } - - /** - * Converts seconds to milliseconds - * - * @param seconds - Time in seconds. - * @return milliseconds - Converted time in milliseconds. - */ - /*#__NO_SIDE_EFFECTS__*/ - const secondsToMilliseconds = (seconds) => seconds * 1000; - /*#__NO_SIDE_EFFECTS__*/ - const millisecondsToSeconds = (milliseconds) => milliseconds / 1000; - - /* - Convert velocity into velocity per second - */ - /*#__NO_SIDE_EFFECTS__*/ - const velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0; - - const warned = new Set(); - function hasWarned(message) { - return warned.has(message); - } - function warnOnce(condition, message, errorCode) { - if (condition || warned.has(message)) - return; - console.warn(formatErrorMessage(message, errorCode)); - warned.add(message); - } - - const wrap = (min, max, v) => { - const rangeSize = max - min; - return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min; - }; - - /* - Bezier function generator - This has been modified from Gaëtan Renaudeau's BezierEasing - https://github.com/gre/bezier-easing/blob/master/src/index.js - https://github.com/gre/bezier-easing/blob/master/LICENSE - - I've removed the newtonRaphsonIterate algo because in benchmarking it - wasn't noticeably faster than binarySubdivision, indeed removing it - usually improved times, depending on the curve. - I also removed the lookup table, as for the added bundle size and loop we're - only cutting ~4 or so subdivision iterations. I bumped the max iterations up - to 12 to compensate and this still tended to be faster for no perceivable - loss in accuracy. - Usage - const easeOut = cubicBezier(.17,.67,.83,.67); - const x = easeOut(0.5); // returns 0.627... - */ - // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. - const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * - t; - const subdivisionPrecision = 0.0000001; - const subdivisionMaxIterations = 12; - function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) { - let currentX; - let currentT; - let i = 0; - do { - currentT = lowerBound + (upperBound - lowerBound) / 2.0; - currentX = calcBezier(currentT, mX1, mX2) - x; - if (currentX > 0.0) { - upperBound = currentT; - } - else { - lowerBound = currentT; - } - } while (Math.abs(currentX) > subdivisionPrecision && - ++i < subdivisionMaxIterations); - return currentT; - } - /*#__NO_SIDE_EFFECTS__*/ - function cubicBezier(mX1, mY1, mX2, mY2) { - // If this is a linear gradient, return linear easing - if (mX1 === mY1 && mX2 === mY2) - return noop$1; - const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2); - // If animation is at start/end, return t without easing - return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2); - } - - // Accepts an easing function and returns a new one that outputs mirrored values for - // the second half of the animation. Turns easeIn into easeInOut. - /*#__NO_SIDE_EFFECTS__*/ - const mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2; - - // Accepts an easing function and returns a new one that outputs reversed values. - // Turns easeIn into easeOut. - /*#__NO_SIDE_EFFECTS__*/ - const reverseEasing = (easing) => (p) => 1 - easing(1 - p); - - const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99); - const backIn = /*@__PURE__*/ reverseEasing(backOut); - const backInOut = /*@__PURE__*/ mirrorEasing(backIn); - - const anticipate = (p) => p >= 1 - ? 1 - : (p *= 2) < 1 - ? 0.5 * backIn(p) - : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); - - const circIn = (p) => 1 - Math.sin(Math.acos(p)); - const circOut = reverseEasing(circIn); - const circInOut = mirrorEasing(circIn); - - const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1); - const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1); - const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1); - - /*#__NO_SIDE_EFFECTS__*/ - function steps(numSteps, direction = "end") { - return (progress) => { - progress = - direction === "end" - ? Math.min(progress, 0.999) - : Math.max(progress, 0.001); - const expanded = progress * numSteps; - const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded); - return clamp(0, 1, rounded / numSteps); - }; - } - - /*#__NO_SIDE_EFFECTS__*/ - const isEasingArray = (ease) => { - return Array.isArray(ease) && typeof ease[0] !== "number"; - }; - - /*#__NO_SIDE_EFFECTS__*/ - function getEasingForSegment(easing, i) { - return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing; - } - - /*#__NO_SIDE_EFFECTS__*/ - const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number"; - - const easingLookup = { - linear: noop$1, - easeIn, - easeInOut, - easeOut, - circIn, - circInOut, - circOut, - backIn, - backInOut, - backOut, - anticipate, - }; - const isValidEasing = (easing) => { - return typeof easing === "string"; - }; - const easingDefinitionToFunction = (definition) => { - if (isBezierDefinition(definition)) { - // If cubic bezier definition, create bezier curve - exports.invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length"); - const [x1, y1, x2, y2] = definition; - return cubicBezier(x1, y1, x2, y2); - } - else if (isValidEasing(definition)) { - // Else lookup from table - exports.invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, "invalid-easing-type"); - return easingLookup[definition]; - } - return definition; - }; - - const stepsOrder = [ - "setup", // Compute - "read", // Read - "resolveKeyframes", // Write/Read/Write/Read - "preUpdate", // Compute - "update", // Compute - "preRender", // Compute - "render", // Write - "postRender", // Compute - ]; - - const statsBuffer = { - value: null, - addProjectionMetrics: null, - }; - - function createRenderStep(runNextFrame, stepName) { - /** - * We create and reuse two queues, one to queue jobs for the current frame - * and one for the next. We reuse to avoid triggering GC after x frames. - */ - let thisFrame = new Set(); - let nextFrame = new Set(); - /** - * Track whether we're currently processing jobs in this step. This way - * we can decide whether to schedule new jobs for this frame or next. - */ - let isProcessing = false; - let flushNextFrame = false; - /** - * A set of processes which were marked keepAlive when scheduled. - */ - const toKeepAlive = new WeakSet(); - let latestFrameData = { - delta: 0.0, - timestamp: 0.0, - isProcessing: false, - }; - let numCalls = 0; - function triggerCallback(callback) { - if (toKeepAlive.has(callback)) { - step.schedule(callback); - runNextFrame(); - } - numCalls++; - callback(latestFrameData); - } - const step = { - /** - * Schedule a process to run on the next frame. - */ - schedule: (callback, keepAlive = false, immediate = false) => { - const addToCurrentFrame = immediate && isProcessing; - const queue = addToCurrentFrame ? thisFrame : nextFrame; - if (keepAlive) - toKeepAlive.add(callback); - queue.add(callback); - return callback; - }, - /** - * Cancel the provided callback from running on the next frame. - */ - cancel: (callback) => { - nextFrame.delete(callback); - toKeepAlive.delete(callback); - }, - /** - * Execute all schedule callbacks. - */ - process: (frameData) => { - latestFrameData = frameData; - /** - * If we're already processing we've probably been triggered by a flushSync - * inside an existing process. Instead of executing, mark flushNextFrame - * as true and ensure we flush the following frame at the end of this one. - */ - if (isProcessing) { - flushNextFrame = true; - return; - } - isProcessing = true; - // Swap this frame and the next to avoid GC - const prevFrame = thisFrame; - thisFrame = nextFrame; - nextFrame = prevFrame; - // Execute this frame - thisFrame.forEach(triggerCallback); - /** - * If we're recording stats then - */ - if (stepName && statsBuffer.value) { - statsBuffer.value.frameloop[stepName].push(numCalls); - } - numCalls = 0; - // Clear the frame so no callbacks remain. This is to avoid - // memory leaks should this render step not run for a while. - thisFrame.clear(); - isProcessing = false; - if (flushNextFrame) { - flushNextFrame = false; - step.process(frameData); - } - }, - }; - return step; - } - - const maxElapsed$1 = 40; - function createRenderBatcher(scheduleNextBatch, allowKeepAlive) { - let runNextFrame = false; - let useDefaultElapsed = true; - const state = { - delta: 0.0, - timestamp: 0.0, - isProcessing: false, - }; - const flagRunNextFrame = () => (runNextFrame = true); - const steps = stepsOrder.reduce((acc, key) => { - acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined); - return acc; - }, {}); - const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps; - const processBatch = () => { - const useManualTiming = MotionGlobalConfig.useManualTiming; - const timestamp = useManualTiming - ? state.timestamp - : performance.now(); - runNextFrame = false; - if (!useManualTiming) { - state.delta = useDefaultElapsed - ? 1000 / 60 - : Math.max(Math.min(timestamp - state.timestamp, maxElapsed$1), 1); - } - state.timestamp = timestamp; - state.isProcessing = true; - // Unrolled render loop for better per-frame performance - setup.process(state); - read.process(state); - resolveKeyframes.process(state); - preUpdate.process(state); - update.process(state); - preRender.process(state); - render.process(state); - postRender.process(state); - state.isProcessing = false; - if (runNextFrame && allowKeepAlive) { - useDefaultElapsed = false; - scheduleNextBatch(processBatch); - } - }; - const wake = () => { - runNextFrame = true; - useDefaultElapsed = true; - if (!state.isProcessing) { - scheduleNextBatch(processBatch); - } - }; - const schedule = stepsOrder.reduce((acc, key) => { - const step = steps[key]; - acc[key] = (process, keepAlive = false, immediate = false) => { - if (!runNextFrame) - wake(); - return step.schedule(process, keepAlive, immediate); - }; - return acc; - }, {}); - const cancel = (process) => { - for (let i = 0; i < stepsOrder.length; i++) { - steps[stepsOrder[i]].cancel(process); - } - }; - return { schedule, cancel, state, steps }; - } - - const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop$1, true); - - let now; - function clearTime() { - now = undefined; - } - /** - * An eventloop-synchronous alternative to performance.now(). - * - * Ensures that time measurements remain consistent within a synchronous context. - * Usually calling performance.now() twice within the same synchronous context - * will return different values which isn't useful for animations when we're usually - * trying to sync animations to the same frame. - */ - const time = { - now: () => { - if (now === undefined) { - time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming - ? frameData.timestamp - : performance.now()); - } - return now; - }, - set: (newTime) => { - now = newTime; - queueMicrotask(clearTime); - }, - }; - - const activeAnimations = { - layout: 0, - mainThread: 0, - waapi: 0, - }; - - const checkStringStartsWith = (token) => (key) => typeof key === "string" && key.startsWith(token); - const isCSSVariableName = - /*@__PURE__*/ checkStringStartsWith("--"); - const startsAsVariableToken = - /*@__PURE__*/ checkStringStartsWith("var(--"); - const isCSSVariableToken = (value) => { - const startsWithToken = startsAsVariableToken(value); - if (!startsWithToken) - return false; - // Ensure any comments are stripped from the value as this can harm performance of the regex. - return singleCssVariableRegex.test(value.split("/*")[0].trim()); - }; - const singleCssVariableRegex = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu; - /** - * Check if a value contains a CSS variable anywhere (e.g. inside calc()). - * Unlike isCSSVariableToken which checks if the value IS a var() token, - * this checks if the value CONTAINS var() somewhere in the string. - */ - function containsCSSVariable(value) { - if (typeof value !== "string") - return false; - // Strip comments to avoid false positives - return value.split("/*")[0].includes("var(--"); - } - - const number = { - test: (v) => typeof v === "number", - parse: parseFloat, - transform: (v) => v, - }; - const alpha = { - ...number, - transform: (v) => clamp(0, 1, v), - }; - const scale = { - ...number, - default: 1, - }; - - // If this number is a decimal, make it just five decimal places - // to avoid exponents - const sanitize = (v) => Math.round(v * 100000) / 100000; - - const floatRegex = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu; - - function isNullish(v) { - return v == null; - } - - const singleColorRegex = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu; - - /** - * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000, - * but false if a number or multiple colors - */ - const isColorString = (type, testProp) => (v) => { - return Boolean((typeof v === "string" && - singleColorRegex.test(v) && - v.startsWith(type)) || - (testProp && - !isNullish(v) && - Object.prototype.hasOwnProperty.call(v, testProp))); - }; - const splitColor = (aName, bName, cName) => (v) => { - if (typeof v !== "string") - return v; - const [a, b, c, alpha] = v.match(floatRegex); - return { - [aName]: parseFloat(a), - [bName]: parseFloat(b), - [cName]: parseFloat(c), - alpha: alpha !== undefined ? parseFloat(alpha) : 1, - }; - }; - - const clampRgbUnit = (v) => clamp(0, 255, v); - const rgbUnit = { - ...number, - transform: (v) => Math.round(clampRgbUnit(v)), - }; - const rgba = { - test: /*@__PURE__*/ isColorString("rgb", "red"), - parse: /*@__PURE__*/ splitColor("red", "green", "blue"), - transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" + - rgbUnit.transform(red) + - ", " + - rgbUnit.transform(green) + - ", " + - rgbUnit.transform(blue) + - ", " + - sanitize(alpha.transform(alpha$1)) + - ")", - }; - - function parseHex(v) { - let r = ""; - let g = ""; - let b = ""; - let a = ""; - // If we have 6 characters, ie #FF0000 - if (v.length > 5) { - r = v.substring(1, 3); - g = v.substring(3, 5); - b = v.substring(5, 7); - a = v.substring(7, 9); - // Or we have 3 characters, ie #F00 - } - else { - r = v.substring(1, 2); - g = v.substring(2, 3); - b = v.substring(3, 4); - a = v.substring(4, 5); - r += r; - g += g; - b += b; - a += a; - } - return { - red: parseInt(r, 16), - green: parseInt(g, 16), - blue: parseInt(b, 16), - alpha: a ? parseInt(a, 16) / 255 : 1, - }; - } - const hex = { - test: /*@__PURE__*/ isColorString("#"), - parse: parseHex, - transform: rgba.transform, - }; - - /*#__NO_SIDE_EFFECTS__*/ - const createUnitType = (unit) => ({ - test: (v) => typeof v === "string" && v.endsWith(unit) && v.split(" ").length === 1, - parse: parseFloat, - transform: (v) => `${v}${unit}`, - }); - const degrees = /*@__PURE__*/ createUnitType("deg"); - const percent = /*@__PURE__*/ createUnitType("%"); - const px = /*@__PURE__*/ createUnitType("px"); - const vh = /*@__PURE__*/ createUnitType("vh"); - const vw = /*@__PURE__*/ createUnitType("vw"); - const progressPercentage = /*@__PURE__*/ (() => ({ - ...percent, - parse: (v) => percent.parse(v) / 100, - transform: (v) => percent.transform(v * 100), - }))(); - - const hsla = { - test: /*@__PURE__*/ isColorString("hsl", "hue"), - parse: /*@__PURE__*/ splitColor("hue", "saturation", "lightness"), - transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => { - return ("hsla(" + - Math.round(hue) + - ", " + - percent.transform(sanitize(saturation)) + - ", " + - percent.transform(sanitize(lightness)) + - ", " + - sanitize(alpha.transform(alpha$1)) + - ")"); - }, - }; - - const color = { - test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v), - parse: (v) => { - if (rgba.test(v)) { - return rgba.parse(v); - } - else if (hsla.test(v)) { - return hsla.parse(v); - } - else { - return hex.parse(v); - } - }, - transform: (v) => { - return typeof v === "string" - ? v - : v.hasOwnProperty("red") - ? rgba.transform(v) - : hsla.transform(v); - }, - getAnimatableNone: (v) => { - const parsed = color.parse(v); - parsed.alpha = 0; - return color.transform(parsed); - }, - }; - - const colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu; - - function test(v) { - return (isNaN(v) && - typeof v === "string" && - (v.match(floatRegex)?.length || 0) + - (v.match(colorRegex)?.length || 0) > - 0); - } - const NUMBER_TOKEN = "number"; - const COLOR_TOKEN = "color"; - const VAR_TOKEN = "var"; - const VAR_FUNCTION_TOKEN = "var("; - const SPLIT_TOKEN = "${}"; - // this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex` - const complexRegex = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu; - function analyseComplexValue(value) { - const originalValue = value.toString(); - const values = []; - const indexes = { - color: [], - number: [], - var: [], - }; - const types = []; - let i = 0; - const tokenised = originalValue.replace(complexRegex, (parsedValue) => { - if (color.test(parsedValue)) { - indexes.color.push(i); - types.push(COLOR_TOKEN); - values.push(color.parse(parsedValue)); - } - else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) { - indexes.var.push(i); - types.push(VAR_TOKEN); - values.push(parsedValue); - } - else { - indexes.number.push(i); - types.push(NUMBER_TOKEN); - values.push(parseFloat(parsedValue)); - } - ++i; - return SPLIT_TOKEN; - }); - const split = tokenised.split(SPLIT_TOKEN); - return { values, split, indexes, types }; - } - function parseComplexValue(v) { - return analyseComplexValue(v).values; - } - function buildTransformer({ split, types }) { - const numSections = split.length; - return (v) => { - let output = ""; - for (let i = 0; i < numSections; i++) { - output += split[i]; - if (v[i] !== undefined) { - const type = types[i]; - if (type === NUMBER_TOKEN) { - output += sanitize(v[i]); - } - else if (type === COLOR_TOKEN) { - output += color.transform(v[i]); - } - else { - output += v[i]; - } - } - } - return output; - }; - } - function createTransformer(source) { - return buildTransformer(analyseComplexValue(source)); - } - const convertNumbersToZero = (v) => typeof v === "number" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v; - /** - * Convert a parsed value to its zero equivalent, but preserve numbers - * that act as divisors in CSS calc() expressions. - * - * analyseComplexValue extracts numbers from CSS strings and puts the - * surrounding text into a `split` template array. For example: - * "calc(var(--gap) / 5)" → values: [var(--gap), 5] - * split: ["calc(", " / ", ")"] - * - * When building a zero-equivalent for animation, naively zeroing all - * numbers turns the divisor into 0 → "calc(var(--gap) / 0)" → NaN. - * We detect this by checking whether the text preceding a number - * (split[i]) ends with "/" — the CSS calc division operator. - */ - const convertToZero = (value, splitBefore) => { - if (typeof value === "number") { - return splitBefore?.trim().endsWith("/") ? value : 0; - } - return convertNumbersToZero(value); - }; - function getAnimatableNone$1(v) { - const info = analyseComplexValue(v); - const transformer = buildTransformer(info); - return transformer(info.values.map((value, i) => convertToZero(value, info.split[i]))); - } - const complex = { - test, - parse: parseComplexValue, - createTransformer, - getAnimatableNone: getAnimatableNone$1, - }; - - // Adapted from https://gist.github.com/mjackson/5311256 - function hueToRgb(p, q, t) { - if (t < 0) - t += 1; - if (t > 1) - t -= 1; - if (t < 1 / 6) - return p + (q - p) * 6 * t; - if (t < 1 / 2) - return q; - if (t < 2 / 3) - return p + (q - p) * (2 / 3 - t) * 6; - return p; - } - function hslaToRgba({ hue, saturation, lightness, alpha }) { - hue /= 360; - saturation /= 100; - lightness /= 100; - let red = 0; - let green = 0; - let blue = 0; - if (!saturation) { - red = green = blue = lightness; - } - else { - const q = lightness < 0.5 - ? lightness * (1 + saturation) - : lightness + saturation - lightness * saturation; - const p = 2 * lightness - q; - red = hueToRgb(p, q, hue + 1 / 3); - green = hueToRgb(p, q, hue); - blue = hueToRgb(p, q, hue - 1 / 3); - } - return { - red: Math.round(red * 255), - green: Math.round(green * 255), - blue: Math.round(blue * 255), - alpha, - }; - } - - function mixImmediate(a, b) { - return (p) => (p > 0 ? b : a); - } - - /* - Value in range from progress - - Given a lower limit and an upper limit, we return the value within - that range as expressed by progress (usually a number from 0 to 1) - - So progress = 0.5 would change - - from -------- to - - to - - from ---- to - - E.g. from = 10, to = 20, progress = 0.5 => 15 - - @param [number]: Lower limit of range - @param [number]: Upper limit of range - @param [number]: The progress between lower and upper limits expressed 0-1 - @return [number]: Value as calculated from progress within range (not limited within range) - */ - const mixNumber$1 = (from, to, progress) => { - return from + (to - from) * progress; - }; - - // Linear color space blending - // Explained https://www.youtube.com/watch?v=LKnqECcg6Gw - // Demonstrated http://codepen.io/osublake/pen/xGVVaN - const mixLinearColor = (from, to, v) => { - const fromExpo = from * from; - const expo = v * (to * to - fromExpo) + fromExpo; - return expo < 0 ? 0 : Math.sqrt(expo); - }; - const colorTypes = [hex, rgba, hsla]; - const getColorType = (v) => colorTypes.find((type) => type.test(v)); - function asRGBA(color) { - const type = getColorType(color); - exports.warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"); - if (!Boolean(type)) - return false; - let model = type.parse(color); - if (type === hsla) { - // TODO Remove this cast - needed since Motion's stricter typing - model = hslaToRgba(model); - } - return model; - } - const mixColor = (from, to) => { - const fromRGBA = asRGBA(from); - const toRGBA = asRGBA(to); - if (!fromRGBA || !toRGBA) { - return mixImmediate(from, to); - } - const blended = { ...fromRGBA }; - return (v) => { - blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v); - blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v); - blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v); - blended.alpha = mixNumber$1(fromRGBA.alpha, toRGBA.alpha, v); - return rgba.transform(blended); - }; - }; - - const invisibleValues = new Set(["none", "hidden"]); - /** - * Returns a function that, when provided a progress value between 0 and 1, - * will return the "none" or "hidden" string only when the progress is that of - * the origin or target. - */ - function mixVisibility(origin, target) { - if (invisibleValues.has(origin)) { - return (p) => (p <= 0 ? origin : target); - } - else { - return (p) => (p >= 1 ? target : origin); - } - } - - function mixNumber(a, b) { - return (p) => mixNumber$1(a, b, p); - } - function getMixer(a) { - if (typeof a === "number") { - return mixNumber; - } - else if (typeof a === "string") { - return isCSSVariableToken(a) - ? mixImmediate - : color.test(a) - ? mixColor - : mixComplex; - } - else if (Array.isArray(a)) { - return mixArray; - } - else if (typeof a === "object") { - return color.test(a) ? mixColor : mixObject; - } - return mixImmediate; - } - function mixArray(a, b) { - const output = [...a]; - const numValues = output.length; - const blendValue = a.map((v, i) => getMixer(v)(v, b[i])); - return (p) => { - for (let i = 0; i < numValues; i++) { - output[i] = blendValue[i](p); - } - return output; - }; - } - function mixObject(a, b) { - const output = { ...a, ...b }; - const blendValue = {}; - for (const key in output) { - if (a[key] !== undefined && b[key] !== undefined) { - blendValue[key] = getMixer(a[key])(a[key], b[key]); - } - } - return (v) => { - for (const key in blendValue) { - output[key] = blendValue[key](v); - } - return output; - }; - } - function matchOrder(origin, target) { - const orderedOrigin = []; - const pointers = { color: 0, var: 0, number: 0 }; - for (let i = 0; i < target.values.length; i++) { - const type = target.types[i]; - const originIndex = origin.indexes[type][pointers[type]]; - const originValue = origin.values[originIndex] ?? 0; - orderedOrigin[i] = originValue; - pointers[type]++; - } - return orderedOrigin; - } - const mixComplex = (origin, target) => { - const template = complex.createTransformer(target); - const originStats = analyseComplexValue(origin); - const targetStats = analyseComplexValue(target); - const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length && - originStats.indexes.color.length === targetStats.indexes.color.length && - originStats.indexes.number.length >= targetStats.indexes.number.length; - if (canInterpolate) { - if ((invisibleValues.has(origin) && - !targetStats.values.length) || - (invisibleValues.has(target) && - !originStats.values.length)) { - return mixVisibility(origin, target); - } - return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template); - } - else { - exports.warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"); - return mixImmediate(origin, target); - } - }; - - function mix(from, to, p) { - if (typeof from === "number" && - typeof to === "number" && - typeof p === "number") { - return mixNumber$1(from, to, p); - } - const mixer = getMixer(from); - return mixer(from, to); - } - - const frameloopDriver = (update) => { - const passTimestamp = ({ timestamp }) => update(timestamp); - return { - start: (keepAlive = true) => frame.update(passTimestamp, keepAlive), - stop: () => cancelFrame(passTimestamp), - /** - * If we're processing this frame we can use the - * framelocked timestamp to keep things in sync. - */ - now: () => (frameData.isProcessing ? frameData.timestamp : time.now()), - }; - }; - - const generateLinearEasing = (easing, duration, // as milliseconds - resolution = 10 // as milliseconds - ) => { - let points = ""; - const numPoints = Math.max(Math.round(duration / resolution), 2); - for (let i = 0; i < numPoints; i++) { - points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + ", "; - } - return `linear(${points.substring(0, points.length - 2)})`; - }; - - /** - * Implement a practical max duration for keyframe generation - * to prevent infinite loops - */ - const maxGeneratorDuration = 20000; - function calcGeneratorDuration(generator) { - let duration = 0; - const timeStep = 50; - let state = generator.next(duration); - while (!state.done && duration < maxGeneratorDuration) { - duration += timeStep; - state = generator.next(duration); - } - return duration >= maxGeneratorDuration ? Infinity : duration; - } - - /** - * Create a progress => progress easing function from a generator. - */ - function createGeneratorEasing(options, scale = 100, createGenerator) { - const generator = createGenerator({ ...options, keyframes: [0, scale] }); - const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration); - return { - type: "keyframes", - ease: (progress) => { - return generator.next(duration * progress).value / scale; - }, - duration: millisecondsToSeconds(duration), - }; - } - - const springDefaults = { - // Default spring physics - stiffness: 100, - damping: 10, - mass: 1.0, - velocity: 0.0, - // Default duration/bounce-based options - duration: 800, // in ms - bounce: 0.3, - visualDuration: 0.3, // in seconds - // Rest thresholds - restSpeed: { - granular: 0.01, - default: 2, - }, - restDelta: { - granular: 0.005, - default: 0.5, - }, - // Limits - minDuration: 0.01, // in seconds - maxDuration: 10.0, // in seconds - minDamping: 0.05, - maxDamping: 1, - }; - function calcAngularFreq(undampedFreq, dampingRatio) { - return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio); - } - const rootIterations = 12; - function approximateRoot(envelope, derivative, initialGuess) { - let result = initialGuess; - for (let i = 1; i < rootIterations; i++) { - result = result - envelope(result) / derivative(result); - } - return result; - } - /** - * This is ported from the Framer implementation of duration-based spring resolution. - */ - const safeMin = 0.001; - function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) { - let envelope; - let derivative; - exports.warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit"); - let dampingRatio = 1 - bounce; - /** - * Restrict dampingRatio and duration to within acceptable ranges. - */ - dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio); - duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration)); - if (dampingRatio < 1) { - /** - * Underdamped spring - */ - envelope = (undampedFreq) => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const a = exponentialDecay - velocity; - const b = calcAngularFreq(undampedFreq, dampingRatio); - const c = Math.exp(-delta); - return safeMin - (a / b) * c; - }; - derivative = (undampedFreq) => { - const exponentialDecay = undampedFreq * dampingRatio; - const delta = exponentialDecay * duration; - const d = delta * velocity + velocity; - const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration; - const f = Math.exp(-delta); - const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio); - const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1; - return (factor * ((d - e) * f)) / g; - }; - } - else { - /** - * Critically-damped spring - */ - envelope = (undampedFreq) => { - const a = Math.exp(-undampedFreq * duration); - const b = (undampedFreq - velocity) * duration + 1; - return -safeMin + a * b; - }; - derivative = (undampedFreq) => { - const a = Math.exp(-undampedFreq * duration); - const b = (velocity - undampedFreq) * (duration * duration); - return a * b; - }; - } - const initialGuess = 5 / duration; - const undampedFreq = approximateRoot(envelope, derivative, initialGuess); - duration = secondsToMilliseconds(duration); - if (isNaN(undampedFreq)) { - return { - stiffness: springDefaults.stiffness, - damping: springDefaults.damping, - duration, - }; - } - else { - const stiffness = Math.pow(undampedFreq, 2) * mass; - return { - stiffness, - damping: dampingRatio * 2 * Math.sqrt(mass * stiffness), - duration, - }; - } - } - const durationKeys = ["duration", "bounce"]; - const physicsKeys = ["stiffness", "damping", "mass"]; - function isSpringType(options, keys) { - return keys.some((key) => options[key] !== undefined); - } - function getSpringOptions(options) { - let springOptions = { - velocity: springDefaults.velocity, - stiffness: springDefaults.stiffness, - damping: springDefaults.damping, - mass: springDefaults.mass, - isResolvedFromDuration: false, - ...options, - }; - // stiffness/damping/mass overrides duration/bounce - if (!isSpringType(options, physicsKeys) && - isSpringType(options, durationKeys)) { - // Time-defined springs should ignore inherited velocity. - // Velocity from interrupted animations can cause findSpring() - // to compute wildly different spring parameters, leading to - // massive oscillation on small-range animations. - springOptions.velocity = 0; - if (options.visualDuration) { - const visualDuration = options.visualDuration; - const root = (2 * Math.PI) / (visualDuration * 1.2); - const stiffness = root * root; - const damping = 2 * - clamp(0.05, 1, 1 - (options.bounce || 0)) * - Math.sqrt(stiffness); - springOptions = { - ...springOptions, - mass: springDefaults.mass, - stiffness, - damping, - }; - } - else { - const derived = findSpring({ ...options, velocity: 0 }); - springOptions = { - ...springOptions, - ...derived, - mass: springDefaults.mass, - }; - springOptions.isResolvedFromDuration = true; - } - } - return springOptions; - } - function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) { - const options = typeof optionsOrVisualDuration !== "object" - ? { - visualDuration: optionsOrVisualDuration, - keyframes: [0, 1], - bounce, - } - : optionsOrVisualDuration; - let { restSpeed, restDelta } = options; - const origin = options.keyframes[0]; - const target = options.keyframes[options.keyframes.length - 1]; - /** - * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator - * to reduce GC during animation. - */ - const state = { done: false, value: origin }; - const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({ - ...options, - velocity: -millisecondsToSeconds(options.velocity || 0), - }); - const initialVelocity = velocity || 0.0; - const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass)); - const initialDelta = target - origin; - const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass)); - /** - * If we're working on a granular scale, use smaller defaults for determining - * when the spring is finished. - * - * These defaults have been selected emprically based on what strikes a good - * ratio between feeling good and finishing as soon as changes are imperceptible. - */ - const isGranularScale = Math.abs(initialDelta) < 5; - restSpeed || (restSpeed = isGranularScale - ? springDefaults.restSpeed.granular - : springDefaults.restSpeed.default); - restDelta || (restDelta = isGranularScale - ? springDefaults.restDelta.granular - : springDefaults.restDelta.default); - let resolveSpring; - let resolveVelocity; - // Underdamped coefficients, hoisted for use in the inlined next() hot path - let angularFreq; - let A; - let sinCoeff; - let cosCoeff; - if (dampingRatio < 1) { - angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio); - A = - (initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) / - angularFreq; - // Underdamped spring - resolveSpring = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return (target - - envelope * - (A * Math.sin(angularFreq * t) + - initialDelta * Math.cos(angularFreq * t))); - }; - // Analytical derivative of underdamped spring (px/ms) - sinCoeff = - dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq; - cosCoeff = - dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq; - resolveVelocity = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - return envelope * - (sinCoeff * Math.sin(angularFreq * t) + - cosCoeff * Math.cos(angularFreq * t)); - }; - } - else if (dampingRatio === 1) { - // Critically damped spring - resolveSpring = (t) => target - - Math.exp(-undampedAngularFreq * t) * - (initialDelta + - (initialVelocity + undampedAngularFreq * initialDelta) * t); - // Analytical derivative of critically damped spring (px/ms) - const C = initialVelocity + undampedAngularFreq * initialDelta; - resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) * - (undampedAngularFreq * C * t - initialVelocity); - } - else { - // Overdamped spring - const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1); - resolveSpring = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - // When performing sinh or cosh values can hit Infinity so we cap them here - const freqForT = Math.min(dampedAngularFreq * t, 300); - return (target - - (envelope * - ((initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) * - Math.sinh(freqForT) + - dampedAngularFreq * - initialDelta * - Math.cosh(freqForT))) / - dampedAngularFreq); - }; - // Analytical derivative of overdamped spring (px/ms) - const P = (initialVelocity + - dampingRatio * undampedAngularFreq * initialDelta) / - dampedAngularFreq; - const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq; - const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq; - resolveVelocity = (t) => { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const freqForT = Math.min(dampedAngularFreq * t, 300); - return envelope * - (sinhCoeff * Math.sinh(freqForT) + - coshCoeff * Math.cosh(freqForT)); - }; - } - const generator = { - calculatedDuration: isResolvedFromDuration ? duration || null : null, - velocity: (t) => secondsToMilliseconds(resolveVelocity(t)), - next: (t) => { - /** - * For underdamped physics springs we need both position and - * velocity each tick. Compute shared trig values once to avoid - * duplicate Math.exp/sin/cos calls on the hot path. - */ - if (!isResolvedFromDuration && dampingRatio < 1) { - const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); - const sin = Math.sin(angularFreq * t); - const cos = Math.cos(angularFreq * t); - const current = target - - envelope * - (A * sin + initialDelta * cos); - const currentVelocity = secondsToMilliseconds(envelope * - (sinCoeff * sin + cosCoeff * cos)); - state.done = - Math.abs(currentVelocity) <= restSpeed && - Math.abs(target - current) <= restDelta; - state.value = state.done ? target : current; - return state; - } - const current = resolveSpring(t); - if (!isResolvedFromDuration) { - const currentVelocity = secondsToMilliseconds(resolveVelocity(t)); - state.done = - Math.abs(currentVelocity) <= restSpeed && - Math.abs(target - current) <= restDelta; - } - else { - state.done = t >= duration; - } - state.value = state.done ? target : current; - return state; - }, - toString: () => { - const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration); - const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30); - return calculatedDuration + "ms " + easing; - }, - toTransition: () => { }, - }; - return generator; - } - spring.applyToOptions = (options) => { - const generatorOptions = createGeneratorEasing(options, 100, spring); - options.ease = generatorOptions.ease; - options.duration = secondsToMilliseconds(generatorOptions.duration); - options.type = "keyframes"; - return options; - }; - - const velocitySampleDuration = 5; // ms - function getGeneratorVelocity(resolveValue, t, current) { - const prevT = Math.max(t - velocitySampleDuration, 0); - return velocityPerSecond(current - resolveValue(prevT), t - prevT); - } - - function inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) { - const origin = keyframes[0]; - const state = { - done: false, - value: origin, - }; - const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max); - const nearestBoundary = (v) => { - if (min === undefined) - return max; - if (max === undefined) - return min; - return Math.abs(min - v) < Math.abs(max - v) ? min : max; - }; - let amplitude = power * velocity; - const ideal = origin + amplitude; - const target = modifyTarget === undefined ? ideal : modifyTarget(ideal); - /** - * If the target has changed we need to re-calculate the amplitude, otherwise - * the animation will start from the wrong position. - */ - if (target !== ideal) - amplitude = target - origin; - const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant); - const calcLatest = (t) => target + calcDelta(t); - const applyFriction = (t) => { - const delta = calcDelta(t); - const latest = calcLatest(t); - state.done = Math.abs(delta) <= restDelta; - state.value = state.done ? target : latest; - }; - /** - * Ideally this would resolve for t in a stateless way, we could - * do that by always precalculating the animation but as we know - * this will be done anyway we can assume that spring will - * be discovered during that. - */ - let timeReachedBoundary; - let spring$1; - const checkCatchBoundary = (t) => { - if (!isOutOfBounds(state.value)) - return; - timeReachedBoundary = t; - spring$1 = spring({ - keyframes: [state.value, nearestBoundary(state.value)], - velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000 - damping: bounceDamping, - stiffness: bounceStiffness, - restDelta, - restSpeed, - }); - }; - checkCatchBoundary(0); - return { - calculatedDuration: null, - next: (t) => { - /** - * We need to resolve the friction to figure out if we need a - * spring but we don't want to do this twice per frame. So here - * we flag if we updated for this frame and later if we did - * we can skip doing it again. - */ - let hasUpdatedFrame = false; - if (!spring$1 && timeReachedBoundary === undefined) { - hasUpdatedFrame = true; - applyFriction(t); - checkCatchBoundary(t); - } - /** - * If we have a spring and the provided t is beyond the moment the friction - * animation crossed the min/max boundary, use the spring. - */ - if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) { - return spring$1.next(t - timeReachedBoundary); - } - else { - !hasUpdatedFrame && applyFriction(t); - return state; - } - }, - }; - } - - function createMixers(output, ease, customMixer) { - const mixers = []; - const mixerFactory = customMixer || MotionGlobalConfig.mix || mix; - const numMixers = output.length - 1; - for (let i = 0; i < numMixers; i++) { - let mixer = mixerFactory(output[i], output[i + 1]); - if (ease) { - const easingFunction = Array.isArray(ease) ? ease[i] || noop$1 : ease; - mixer = pipe(easingFunction, mixer); - } - mixers.push(mixer); - } - return mixers; - } - /** - * Create a function that maps from a numerical input array to a generic output array. - * - * Accepts: - * - Numbers - * - Colors (hex, hsl, hsla, rgb, rgba) - * - Complex (combinations of one or more numbers or strings) - * - * ```jsx - * const mixColor = interpolate([0, 1], ['#fff', '#000']) - * - * mixColor(0.5) // 'rgba(128, 128, 128, 1)' - * ``` - * - * TODO Revisit this approach once we've moved to data models for values, - * probably not needed to pregenerate mixer functions. - * - * @public - */ - function interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) { - const inputLength = input.length; - exports.invariant(inputLength === output.length, "Both input and output ranges must be the same length", "range-length"); - /** - * If we're only provided a single input, we can just make a function - * that returns the output. - */ - if (inputLength === 1) - return () => output[0]; - if (inputLength === 2 && output[0] === output[1]) - return () => output[1]; - const isZeroDeltaRange = input[0] === input[1]; - // If input runs highest -> lowest, reverse both arrays - if (input[0] > input[inputLength - 1]) { - input = [...input].reverse(); - output = [...output].reverse(); - } - const mixers = createMixers(output, ease, mixer); - const numMixers = mixers.length; - const interpolator = (v) => { - if (isZeroDeltaRange && v < input[0]) - return output[0]; - let i = 0; - if (numMixers > 1) { - for (; i < input.length - 2; i++) { - if (v < input[i + 1]) - break; - } - } - const progressInRange = progress(input[i], input[i + 1], v); - return mixers[i](progressInRange); - }; - return isClamp - ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v)) - : interpolator; - } - - function fillOffset(offset, remaining) { - const min = offset[offset.length - 1]; - for (let i = 1; i <= remaining; i++) { - const offsetProgress = progress(0, remaining, i); - offset.push(mixNumber$1(min, 1, offsetProgress)); - } - } - - function defaultOffset$1(arr) { - const offset = [0]; - fillOffset(offset, arr.length - 1); - return offset; - } - - function convertOffsetToTimes(offset, duration) { - return offset.map((o) => o * duration); - } - - function defaultEasing(values, easing) { - return values.map(() => easing || easeInOut).splice(0, values.length - 1); - } - function keyframes({ duration = 300, keyframes: keyframeValues, times, ease = "easeInOut", }) { - /** - * Easing functions can be externally defined as strings. Here we convert them - * into actual functions. - */ - const easingFunctions = isEasingArray(ease) - ? ease.map(easingDefinitionToFunction) - : easingDefinitionToFunction(ease); - /** - * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator - * to reduce GC during animation. - */ - const state = { - done: false, - value: keyframeValues[0], - }; - /** - * Create a times array based on the provided 0-1 offsets - */ - const absoluteTimes = convertOffsetToTimes( - // Only use the provided offsets if they're the correct length - // TODO Maybe we should warn here if there's a length mismatch - times && times.length === keyframeValues.length - ? times - : defaultOffset$1(keyframeValues), duration); - const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, { - ease: Array.isArray(easingFunctions) - ? easingFunctions - : defaultEasing(keyframeValues, easingFunctions), - }); - return { - calculatedDuration: duration, - next: (t) => { - state.value = mapTimeToKeyframe(t); - state.done = t >= duration; - return state; - }, - }; - } - - const isNotNull = (value) => value !== null; - function getFinalKeyframe(keyframes, { repeat, repeatType = "loop" }, finalKeyframe, speed = 1) { - const resolvedKeyframes = keyframes.filter(isNotNull); - const useFirstKeyframe = speed < 0 || (repeat && repeatType !== "loop" && repeat % 2 === 1); - const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1; - return !index || finalKeyframe === undefined - ? resolvedKeyframes[index] - : finalKeyframe; - } - - const transitionTypeMap = { - decay: inertia, - inertia, - tween: keyframes, - keyframes: keyframes, - spring, - }; - function replaceTransitionType(transition) { - if (typeof transition.type === "string") { - transition.type = transitionTypeMap[transition.type]; - } - } - - class WithPromise { - constructor() { - this.updateFinished(); - } - get finished() { - return this._finished; - } - updateFinished() { - this._finished = new Promise((resolve) => { - this.resolve = resolve; - }); - } - notifyFinished() { - this.resolve(); - } - /** - * Allows the animation to be awaited. - * - * @deprecated Use `finished` instead. - */ - then(onResolve, onReject) { - return this.finished.then(onResolve, onReject); - } - } - - const percentToProgress = (percent) => percent / 100; - class JSAnimation extends WithPromise { - constructor(options) { - super(); - this.state = "idle"; - this.startTime = null; - this.isStopped = false; - /** - * The current time of the animation. - */ - this.currentTime = 0; - /** - * The time at which the animation was paused. - */ - this.holdTime = null; - /** - * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed. - */ - this.playbackSpeed = 1; - /** - * Reusable state object for the delay phase to avoid - * allocating a new object every frame. - */ - this.delayState = { - done: false, - value: undefined, - }; - /** - * This method is bound to the instance to fix a pattern where - * animation.stop is returned as a reference from a useEffect. - */ - this.stop = () => { - const { motionValue } = this.options; - if (motionValue && motionValue.updatedAt !== time.now()) { - this.tick(time.now()); - } - this.isStopped = true; - if (this.state === "idle") - return; - this.teardown(); - this.options.onStop?.(); - }; - activeAnimations.mainThread++; - this.options = options; - this.initAnimation(); - this.play(); - if (options.autoplay === false) - this.pause(); - } - initAnimation() { - const { options } = this; - replaceTransitionType(options); - const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options; - let { keyframes: keyframes$1 } = options; - const generatorFactory = type || keyframes; - if (generatorFactory !== keyframes) { - exports.invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, "spring-two-frames"); - } - if (generatorFactory !== keyframes && - typeof keyframes$1[0] !== "number") { - this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1])); - keyframes$1 = [0, 100]; - } - const generator = generatorFactory({ ...options, keyframes: keyframes$1 }); - /** - * If we have a mirror repeat type we need to create a second generator that outputs the - * mirrored (not reversed) animation and later ping pong between the two generators. - */ - if (repeatType === "mirror") { - this.mirroredGenerator = generatorFactory({ - ...options, - keyframes: [...keyframes$1].reverse(), - velocity: -velocity, - }); - } - /** - * If duration is undefined and we have repeat options, - * we need to calculate a duration from the generator. - * - * We set it to the generator itself to cache the duration. - * Any timeline resolver will need to have already precalculated - * the duration by this step. - */ - if (generator.calculatedDuration === null) { - generator.calculatedDuration = calcGeneratorDuration(generator); - } - const { calculatedDuration } = generator; - this.calculatedDuration = calculatedDuration; - this.resolvedDuration = calculatedDuration + repeatDelay; - this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay; - this.generator = generator; - } - updateTime(timestamp) { - const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed; - // Update currentTime - if (this.holdTime !== null) { - this.currentTime = this.holdTime; - } - else { - // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 = - // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for - // example. - this.currentTime = animationTime; - } - } - tick(timestamp, sample = false) { - const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this; - if (this.startTime === null) - return generator.next(0); - const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options; - /** - * requestAnimationFrame timestamps can come through as lower than - * the startTime as set by performance.now(). Here we prevent this, - * though in the future it could be possible to make setting startTime - * a pending operation that gets resolved here. - */ - if (this.speed > 0) { - this.startTime = Math.min(this.startTime, timestamp); - } - else if (this.speed < 0) { - this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime); - } - if (sample) { - this.currentTime = timestamp; - } - else { - this.updateTime(timestamp); - } - // Rebase on delay - const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1); - const isInDelayPhase = this.playbackSpeed >= 0 - ? timeWithoutDelay < 0 - : timeWithoutDelay > totalDuration; - this.currentTime = Math.max(timeWithoutDelay, 0); - // If this animation has finished, set the current time to the total duration. - if (this.state === "finished" && this.holdTime === null) { - this.currentTime = totalDuration; - } - let elapsed = this.currentTime; - let frameGenerator = generator; - if (repeat) { - /** - * Get the current progress (0-1) of the animation. If t is > - * than duration we'll get values like 2.5 (midway through the - * third iteration) - */ - const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration; - /** - * Get the current iteration (0 indexed). For instance the floor of - * 2.5 is 2. - */ - let currentIteration = Math.floor(progress); - /** - * Get the current progress of the iteration by taking the remainder - * so 2.5 is 0.5 through iteration 2 - */ - let iterationProgress = progress % 1.0; - /** - * If iteration progress is 1 we count that as the end - * of the previous iteration. - */ - if (!iterationProgress && progress >= 1) { - iterationProgress = 1; - } - iterationProgress === 1 && currentIteration--; - currentIteration = Math.min(currentIteration, repeat + 1); - /** - * Reverse progress if we're not running in "normal" direction - */ - const isOddIteration = Boolean(currentIteration % 2); - if (isOddIteration) { - if (repeatType === "reverse") { - iterationProgress = 1 - iterationProgress; - if (repeatDelay) { - iterationProgress -= repeatDelay / resolvedDuration; - } - } - else if (repeatType === "mirror") { - frameGenerator = mirroredGenerator; - } - } - elapsed = clamp(0, 1, iterationProgress) * resolvedDuration; - } - /** - * If we're in negative time, set state as the initial keyframe. - * This prevents delay: x, duration: 0 animations from finishing - * instantly. - */ - let state; - if (isInDelayPhase) { - this.delayState.value = keyframes[0]; - state = this.delayState; - } - else { - state = frameGenerator.next(elapsed); - } - if (mixKeyframes && !isInDelayPhase) { - state.value = mixKeyframes(state.value); - } - let { done } = state; - if (!isInDelayPhase && calculatedDuration !== null) { - done = - this.playbackSpeed >= 0 - ? this.currentTime >= totalDuration - : this.currentTime <= 0; - } - const isAnimationFinished = this.holdTime === null && - (this.state === "finished" || (this.state === "running" && done)); - // TODO: The exception for inertia could be cleaner here - if (isAnimationFinished && type !== inertia) { - state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed); - } - if (onUpdate) { - onUpdate(state.value); - } - if (isAnimationFinished) { - this.finish(); - } - return state; - } - /** - * Allows the returned animation to be awaited or promise-chained. Currently - * resolves when the animation finishes at all but in a future update could/should - * reject if its cancels. - */ - then(resolve, reject) { - return this.finished.then(resolve, reject); - } - get duration() { - return millisecondsToSeconds(this.calculatedDuration); - } - get iterationDuration() { - const { delay = 0 } = this.options || {}; - return this.duration + millisecondsToSeconds(delay); - } - get time() { - return millisecondsToSeconds(this.currentTime); - } - set time(newTime) { - newTime = secondsToMilliseconds(newTime); - this.currentTime = newTime; - if (this.startTime === null || - this.holdTime !== null || - this.playbackSpeed === 0) { - this.holdTime = newTime; - } - else if (this.driver) { - this.startTime = this.driver.now() - newTime / this.playbackSpeed; - } - if (this.driver) { - this.driver.start(false); - } - else { - this.startTime = 0; - this.state = "paused"; - this.holdTime = newTime; - this.tick(newTime); - } - } - /** - * Returns the generator's velocity at the current time in units/second. - * Uses the analytical derivative when available (springs), avoiding - * the MotionValue's frame-dependent velocity estimation. - */ - getGeneratorVelocity() { - const t = this.currentTime; - if (t <= 0) - return this.options.velocity || 0; - if (this.generator.velocity) { - return this.generator.velocity(t); - } - // Fallback: finite difference - const current = this.generator.next(t).value; - return getGeneratorVelocity((s) => this.generator.next(s).value, t, current); - } - get speed() { - return this.playbackSpeed; - } - set speed(newSpeed) { - const hasChanged = this.playbackSpeed !== newSpeed; - if (hasChanged && this.driver) { - this.updateTime(time.now()); - } - this.playbackSpeed = newSpeed; - if (hasChanged && this.driver) { - this.time = millisecondsToSeconds(this.currentTime); - } - } - play() { - if (this.isStopped) - return; - const { driver = frameloopDriver, startTime } = this.options; - if (!this.driver) { - this.driver = driver((timestamp) => this.tick(timestamp)); - } - this.options.onPlay?.(); - const now = this.driver.now(); - if (this.state === "finished") { - this.updateFinished(); - this.startTime = now; - } - else if (this.holdTime !== null) { - this.startTime = now - this.holdTime; - } - else if (!this.startTime) { - this.startTime = startTime ?? now; - } - if (this.state === "finished" && this.speed < 0) { - this.startTime += this.calculatedDuration; - } - this.holdTime = null; - /** - * Set playState to running only after we've used it in - * the previous logic. - */ - this.state = "running"; - this.driver.start(); - } - pause() { - this.state = "paused"; - this.updateTime(time.now()); - this.holdTime = this.currentTime; - } - complete() { - if (this.state !== "running") { - this.play(); - } - this.state = "finished"; - this.holdTime = null; - } - finish() { - this.notifyFinished(); - this.teardown(); - this.state = "finished"; - this.options.onComplete?.(); - } - cancel() { - this.holdTime = null; - this.startTime = 0; - this.tick(0); - this.teardown(); - this.options.onCancel?.(); - } - teardown() { - this.state = "idle"; - this.stopDriver(); - this.startTime = this.holdTime = null; - activeAnimations.mainThread--; - } - stopDriver() { - if (!this.driver) - return; - this.driver.stop(); - this.driver = undefined; - } - sample(sampleTime) { - this.startTime = 0; - return this.tick(sampleTime, true); - } - attachTimeline(timeline) { - if (this.options.allowFlatten) { - this.options.type = "keyframes"; - this.options.ease = "linear"; - this.initAnimation(); - } - this.driver?.stop(); - return timeline.observe(this); - } - } - // Legacy function support - function animateValue(options) { - return new JSAnimation(options); - } - - function fillWildcards(keyframes) { - for (let i = 1; i < keyframes.length; i++) { - keyframes[i] ?? (keyframes[i] = keyframes[i - 1]); - } - } - - const radToDeg = (rad) => (rad * 180) / Math.PI; - const rotate = (v) => { - const angle = radToDeg(Math.atan2(v[1], v[0])); - return rebaseAngle(angle); - }; - const matrix2dParsers = { - x: 4, - y: 5, - translateX: 4, - translateY: 5, - scaleX: 0, - scaleY: 3, - scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2, - rotate, - rotateZ: rotate, - skewX: (v) => radToDeg(Math.atan(v[1])), - skewY: (v) => radToDeg(Math.atan(v[2])), - skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2, - }; - const rebaseAngle = (angle) => { - angle = angle % 360; - if (angle < 0) - angle += 360; - return angle; - }; - const rotateZ = rotate; - const scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]); - const scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]); - const matrix3dParsers = { - x: 12, - y: 13, - z: 14, - translateX: 12, - translateY: 13, - translateZ: 14, - scaleX, - scaleY, - scale: (v) => (scaleX(v) + scaleY(v)) / 2, - rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))), - rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))), - rotateZ, - rotate: rotateZ, - skewX: (v) => radToDeg(Math.atan(v[4])), - skewY: (v) => radToDeg(Math.atan(v[1])), - skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2, - }; - function defaultTransformValue(name) { - return name.includes("scale") ? 1 : 0; - } - function parseValueFromTransform(transform, name) { - if (!transform || transform === "none") { - return defaultTransformValue(name); - } - const matrix3dMatch = transform.match(/^matrix3d\(([-\d.e\s,]+)\)$/u); - let parsers; - let match; - if (matrix3dMatch) { - parsers = matrix3dParsers; - match = matrix3dMatch; - } - else { - const matrix2dMatch = transform.match(/^matrix\(([-\d.e\s,]+)\)$/u); - parsers = matrix2dParsers; - match = matrix2dMatch; - } - if (!match) { - return defaultTransformValue(name); - } - const valueParser = parsers[name]; - const values = match[1].split(",").map(convertTransformToNumber); - return typeof valueParser === "function" - ? valueParser(values) - : values[valueParser]; - } - const readTransformValue = (instance, name) => { - const { transform = "none" } = getComputedStyle(instance); - return parseValueFromTransform(transform, name); - }; - function convertTransformToNumber(value) { - return parseFloat(value.trim()); - } - - /** - * Generate a list of every possible transform key. - */ - const transformPropOrder = [ - "transformPerspective", - "x", - "y", - "z", - "translateX", - "translateY", - "translateZ", - "scale", - "scaleX", - "scaleY", - "rotate", - "rotateX", - "rotateY", - "rotateZ", - "skew", - "skewX", - "skewY", - ]; - /** - * A quick lookup for transform props. - * - * `pathRotation` is a transform for routing purposes (skipped from raw - * style application, wired to the transform composite, flags transform - * dirty) but is intentionally NOT in `transformPropOrder` — it is - * composed onto `rotate` at the build sites, not serialized in its own - * slot, and must stay out of the order-array consumers (parse-transform, - * unit-conversion, keys-position). - */ - const transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, "pathRotation"]))(); - - const isNumOrPxType = (v) => v === number || v === px; - const transformKeys = new Set(["x", "y", "z"]); - const nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key)); - function removeNonTranslationalTransform(visualElement) { - const removedTransforms = []; - nonTranslationalTransformKeys.forEach((key) => { - const value = visualElement.getValue(key); - if (value !== undefined) { - removedTransforms.push([key, value.get()]); - value.set(key.startsWith("scale") ? 1 : 0); - } - }); - return removedTransforms; - } - const positionalValues = { - // Dimensions - width: ({ x }, { paddingLeft = "0", paddingRight = "0", boxSizing }) => { - const width = x.max - x.min; - return boxSizing === "border-box" - ? width - : width - parseFloat(paddingLeft) - parseFloat(paddingRight); - }, - height: ({ y }, { paddingTop = "0", paddingBottom = "0", boxSizing }) => { - const height = y.max - y.min; - return boxSizing === "border-box" - ? height - : height - parseFloat(paddingTop) - parseFloat(paddingBottom); - }, - top: (_bbox, { top }) => parseFloat(top), - left: (_bbox, { left }) => parseFloat(left), - bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min), - right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min), - // Transform - x: (_bbox, { transform }) => parseValueFromTransform(transform, "x"), - y: (_bbox, { transform }) => parseValueFromTransform(transform, "y"), - }; - // Alias translate longform names - positionalValues.translateX = positionalValues.x; - positionalValues.translateY = positionalValues.y; - - const toResolve = new Set(); - let isScheduled = false; - let anyNeedsMeasurement = false; - let isForced = false; - function measureAllKeyframes() { - if (anyNeedsMeasurement) { - const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement); - const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element)); - const transformsToRestore = new Map(); - /** - * Write pass - * If we're measuring elements we want to remove bounding box-changing transforms. - */ - elementsToMeasure.forEach((element) => { - const removedTransforms = removeNonTranslationalTransform(element); - if (!removedTransforms.length) - return; - transformsToRestore.set(element, removedTransforms); - element.render(); - }); - // Read - resolversToMeasure.forEach((resolver) => resolver.measureInitialState()); - // Write - elementsToMeasure.forEach((element) => { - element.render(); - const restore = transformsToRestore.get(element); - if (restore) { - restore.forEach(([key, value]) => { - element.getValue(key)?.set(value); - }); - } - }); - // Read - resolversToMeasure.forEach((resolver) => resolver.measureEndState()); - // Write - resolversToMeasure.forEach((resolver) => { - if (resolver.suspendedScrollY !== undefined) { - window.scrollTo(0, resolver.suspendedScrollY); - } - }); - } - anyNeedsMeasurement = false; - isScheduled = false; - toResolve.forEach((resolver) => resolver.complete(isForced)); - toResolve.clear(); - } - function readAllKeyframes() { - toResolve.forEach((resolver) => { - resolver.readKeyframes(); - if (resolver.needsMeasurement) { - anyNeedsMeasurement = true; - } - }); - } - function flushKeyframeResolvers() { - isForced = true; - readAllKeyframes(); - measureAllKeyframes(); - isForced = false; - } - class KeyframeResolver { - constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) { - this.state = "pending"; - /** - * Track whether this resolver is async. If it is, it'll be added to the - * resolver queue and flushed in the next frame. Resolvers that aren't going - * to trigger read/write thrashing don't need to be async. - */ - this.isAsync = false; - /** - * Track whether this resolver needs to perform a measurement - * to resolve its keyframes. - */ - this.needsMeasurement = false; - this.unresolvedKeyframes = [...unresolvedKeyframes]; - this.onComplete = onComplete; - this.name = name; - this.motionValue = motionValue; - this.element = element; - this.isAsync = isAsync; - } - scheduleResolve() { - this.state = "scheduled"; - if (this.isAsync) { - toResolve.add(this); - if (!isScheduled) { - isScheduled = true; - frame.read(readAllKeyframes); - frame.resolveKeyframes(measureAllKeyframes); - } - } - else { - this.readKeyframes(); - this.complete(); - } - } - readKeyframes() { - const { unresolvedKeyframes, name, element, motionValue } = this; - // If initial keyframe is null we need to read it from the DOM - if (unresolvedKeyframes[0] === null) { - const currentValue = motionValue?.get(); - // TODO: This doesn't work if the final keyframe is a wildcard - const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1]; - if (currentValue !== undefined) { - unresolvedKeyframes[0] = currentValue; - } - else if (element && name) { - const valueAsRead = element.readValue(name, finalKeyframe); - if (valueAsRead !== undefined && valueAsRead !== null) { - unresolvedKeyframes[0] = valueAsRead; - } - } - if (unresolvedKeyframes[0] === undefined) { - unresolvedKeyframes[0] = finalKeyframe; - } - if (motionValue && currentValue === undefined) { - motionValue.set(unresolvedKeyframes[0]); - } - } - fillWildcards(unresolvedKeyframes); - } - setFinalKeyframe() { } - measureInitialState() { } - renderEndStyles() { } - measureEndState() { } - complete(isForcedComplete = false) { - this.state = "complete"; - this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete); - toResolve.delete(this); - } - cancel() { - if (this.state === "scheduled") { - toResolve.delete(this); - this.state = "pending"; - } - } - resume() { - if (this.state === "pending") - this.scheduleResolve(); - } - } - - const isCSSVar = (name) => name.startsWith("--"); - - function setStyle(element, name, value) { - isCSSVar(name) - ? element.style.setProperty(name, value) - : (element.style[name] = value); - } - - /** - * Add the ability for test suites to manually set support flags - * to better test more environments. - */ - const supportsFlags = {}; - - function memoSupports(callback, supportsFlag) { - const memoized = memo(callback); - return () => supportsFlags[supportsFlag] ?? memoized(); - } - - const supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, "scrollTimeline"); - const supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, "viewTimeline"); - - const supportsLinearEasing = /*@__PURE__*/ memoSupports(() => { - try { - document - .createElement("div") - .animate({ opacity: 0 }, { easing: "linear(0, 1)" }); - } - catch (e) { - return false; - } - return true; - }, "linearEasing"); - - const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`; - - const supportedWaapiEasing = { - linear: "linear", - ease: "ease", - easeIn: "ease-in", - easeOut: "ease-out", - easeInOut: "ease-in-out", - circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]), - circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]), - backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]), - backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]), - }; - - function mapEasingToNativeEasing(easing, duration) { - if (!easing) { - return undefined; - } - else if (typeof easing === "function") { - return supportsLinearEasing() - ? generateLinearEasing(easing, duration) - : "ease-out"; - } - else if (isBezierDefinition(easing)) { - return cubicBezierAsString(easing); - } - else if (Array.isArray(easing)) { - return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) || - supportedWaapiEasing.easeOut); - } - else { - return supportedWaapiEasing[easing]; - } - } - - function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = "loop", ease = "easeOut", times, } = {}, pseudoElement = undefined) { - const keyframeOptions = { - [valueName]: keyframes, - }; - if (times) - keyframeOptions.offset = times; - const easing = mapEasingToNativeEasing(ease, duration); - /** - * If this is an easing array, apply to keyframes, not animation as a whole - */ - if (Array.isArray(easing)) - keyframeOptions.easing = easing; - if (statsBuffer.value) { - activeAnimations.waapi++; - } - const options = { - delay, - duration, - easing: !Array.isArray(easing) ? easing : "linear", - fill: "both", - iterations: repeat + 1, - direction: repeatType === "reverse" ? "alternate" : "normal", - }; - if (pseudoElement) - options.pseudoElement = pseudoElement; - const animation = element.animate(keyframeOptions, options); - if (statsBuffer.value) { - animation.finished.finally(() => { - activeAnimations.waapi--; - }); - } - return animation; - } - - function isGenerator(type) { - return typeof type === "function" && "applyToOptions" in type; - } - - function applyGeneratorOptions({ type, ...options }) { - if (isGenerator(type) && supportsLinearEasing()) { - return type.applyToOptions(options); - } - else { - options.duration ?? (options.duration = 300); - options.ease ?? (options.ease = "easeOut"); - } - return options; - } - - /** - * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API. - */ - class NativeAnimation extends WithPromise { - constructor(options) { - super(); - this.finishedTime = null; - this.isStopped = false; - /** - * Tracks a manually-set start time that takes precedence over WAAPI's - * dynamic startTime. This is cleared when play() or time setter is called, - * allowing WAAPI to take over timing. - */ - this.manualStartTime = null; - if (!options) - return; - const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options; - this.isPseudoElement = Boolean(pseudoElement); - this.allowFlatten = allowFlatten; - this.options = options; - exports.invariant(typeof options.type !== "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring"); - const transition = applyGeneratorOptions(options); - this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement); - if (transition.autoplay === false) { - this.animation.pause(); - } - this.animation.onfinish = () => { - this.finishedTime = this.time; - if (!pseudoElement) { - const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed); - if (this.updateMotionValue) { - this.updateMotionValue(keyframe); - } - /** - * If we can, we want to commit the final style as set by the user, - * rather than the computed keyframe value supplied by the animation. - * We always do this, even when a motion value is present, to prevent - * a visual flash in Firefox where the WAAPI animation's fill is removed - * during cancel() before the scheduled render can apply the correct value. - */ - setStyle(element, name, keyframe); - this.animation.cancel(); - } - onComplete?.(); - this.notifyFinished(); - }; - } - play() { - if (this.isStopped) - return; - this.manualStartTime = null; - this.animation.play(); - if (this.state === "finished") { - this.updateFinished(); - } - } - pause() { - this.animation.pause(); - } - complete() { - this.animation.finish?.(); - } - cancel() { - try { - this.animation.cancel(); - } - catch (e) { } - } - stop() { - if (this.isStopped) - return; - this.isStopped = true; - const { state } = this; - if (state === "idle" || state === "finished") { - return; - } - if (this.updateMotionValue) { - this.updateMotionValue(); - } - else { - this.commitStyles(); - } - if (!this.isPseudoElement) - this.cancel(); - } - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * In this method, we commit styles back to the DOM before cancelling - * the animation. - * - * This is designed to be overridden by NativeAnimationExtended, which - * will create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to also correctly calculate velocity for any subsequent animation - * while deferring the commit until the next animation frame. - */ - commitStyles() { - const element = this.options?.element; - if (!this.isPseudoElement && element?.isConnected) { - this.animation.commitStyles?.(); - } - } - get duration() { - const duration = this.animation.effect?.getComputedTiming?.().duration || 0; - return millisecondsToSeconds(Number(duration)); - } - get iterationDuration() { - const { delay = 0 } = this.options || {}; - return this.duration + millisecondsToSeconds(delay); - } - get time() { - return millisecondsToSeconds(Number(this.animation.currentTime) || 0); - } - set time(newTime) { - const wasFinished = this.finishedTime !== null; - this.manualStartTime = null; - this.finishedTime = null; - this.animation.currentTime = secondsToMilliseconds(newTime); - if (wasFinished) { - this.animation.pause(); - } - } - /** - * The playback speed of the animation. - * 1 = normal speed, 2 = double speed, 0.5 = half speed. - */ - get speed() { - return this.animation.playbackRate; - } - set speed(newSpeed) { - // Allow backwards playback after finishing - if (newSpeed < 0) - this.finishedTime = null; - this.animation.playbackRate = newSpeed; - } - get state() { - return this.finishedTime !== null - ? "finished" - : this.animation.playState; - } - get startTime() { - return this.manualStartTime ?? Number(this.animation.startTime); - } - set startTime(newStartTime) { - this.manualStartTime = this.animation.startTime = newStartTime; - } - /** - * Attaches a timeline to the animation, for instance the `ScrollTimeline`. - */ - attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) { - if (this.allowFlatten) { - this.animation.effect?.updateTiming({ easing: "linear" }); - } - this.animation.onfinish = null; - if (timeline && supportsScrollTimeline()) { - this.animation.timeline = timeline; - if (rangeStart) - this.animation.rangeStart = rangeStart; - if (rangeEnd) - this.animation.rangeEnd = rangeEnd; - return noop$1; - } - else { - return observe(this); - } - } - } - - const unsupportedEasingFunctions = { - anticipate, - backInOut, - circInOut, - }; - function isUnsupportedEase(key) { - return key in unsupportedEasingFunctions; - } - function replaceStringEasing(transition) { - if (typeof transition.ease === "string" && - isUnsupportedEase(transition.ease)) { - transition.ease = unsupportedEasingFunctions[transition.ease]; - } - } - - /** - * 10ms is chosen here as it strikes a balance between smooth - * results (more than one keyframe per frame at 60fps) and - * keyframe quantity. - */ - const sampleDelta = 10; //ms - class NativeAnimationExtended extends NativeAnimation { - constructor(options) { - /** - * The base NativeAnimation function only supports a subset - * of Motion easings, and WAAPI also only supports some - * easing functions via string/cubic-bezier definitions. - * - * This function replaces those unsupported easing functions - * with a JS easing function. This will later get compiled - * to a linear() easing function. - */ - replaceStringEasing(options); - /** - * Ensure we replace the transition type with a generator function - * before passing to WAAPI. - * - * TODO: Does this have a better home? It could be shared with - * JSAnimation. - */ - replaceTransitionType(options); - super(options); - /** - * Only set startTime when the animation should autoplay. - * Setting startTime on a paused WAAPI animation unpauses it - * (per the WAAPI spec), which breaks autoplay: false. - */ - if (options.startTime !== undefined && options.autoplay !== false) { - this.startTime = options.startTime; - } - this.options = options; - } - /** - * WAAPI doesn't natively have any interruption capabilities. - * - * Rather than read committed styles back out of the DOM, we can - * create a renderless JS animation and sample it twice to calculate - * its current value, "previous" value, and therefore allow - * Motion to calculate velocity for any subsequent animation. - */ - updateMotionValue(value) { - const { motionValue, onUpdate, onComplete, element, ...options } = this.options; - if (!motionValue) - return; - if (value !== undefined) { - motionValue.set(value); - return; - } - const sampleAnimation = new JSAnimation({ - ...options, - autoplay: false, - }); - /** - * Use wall-clock elapsed time for sampling. - * Under CPU load, WAAPI's currentTime may not reflect actual - * elapsed time, causing incorrect sampling and visual jumps. - */ - const sampleTime = Math.max(sampleDelta, time.now() - this.startTime); - const delta = clamp(0, sampleDelta, sampleTime - sampleDelta); - const current = sampleAnimation.sample(sampleTime).value; - /** - * Write the estimated value to inline style so it persists - * after cancel(), covering the async gap before the next - * animation starts. - */ - const { name } = this.options; - if (element && name) - setStyle(element, name, current); - motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta); - sampleAnimation.stop(); - } - } - - /** - * Check if a value is animatable. Examples: - * - * ✅: 100, "100px", "#fff" - * ❌: "block", "url(2.jpg)" - * @param value - * - * @internal - */ - const isAnimatable = (value, name) => { - // If the list of keys that might be non-animatable grows, replace with Set - if (name === "zIndex") - return false; - // If it's a number or a keyframes array, we can animate it. We might at some point - // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this, - // but for now lets leave it like this for performance reasons - if (typeof value === "number" || Array.isArray(value)) - return true; - if (typeof value === "string" && // It's animatable if we have a string - (complex.test(value) || value === "0") && // And it contains numbers and/or colors - !value.startsWith("url(") // Unless it starts with "url(" - ) { - return true; - } - return false; - }; - - function hasKeyframesChanged(keyframes) { - const current = keyframes[0]; - if (keyframes.length === 1) - return true; - for (let i = 0; i < keyframes.length; i++) { - if (keyframes[i] !== current) - return true; - } - } - function canAnimate(keyframes, name, type, velocity) { - /** - * Check if we're able to animate between the start and end keyframes, - * and throw a warning if we're attempting to animate between one that's - * animatable and another that isn't. - */ - const originKeyframe = keyframes[0]; - if (originKeyframe === null) { - return false; - } - /** - * These aren't traditionally animatable but we do support them. - * In future we could look into making this more generic or replacing - * this function with mix() === mixImmediate - */ - if (name === "display" || name === "visibility") - return true; - const targetKeyframe = keyframes[keyframes.length - 1]; - const isOriginAnimatable = isAnimatable(originKeyframe, name); - const isTargetAnimatable = isAnimatable(targetKeyframe, name); - exports.warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable"); - // Always skip if any of these are true - if (!isOriginAnimatable || !isTargetAnimatable) { - return false; - } - return (hasKeyframesChanged(keyframes) || - ((type === "spring" || isGenerator(type)) && velocity)); - } - - function makeAnimationInstant(options) { - options.duration = 0; - options.type = "keyframes"; - } - - /** - * A list of values that can be hardware-accelerated. - */ - const acceleratedValues = new Set([ - "opacity", - "clipPath", - "filter", - "transform", - // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved - // or until we implement support for linear() easing. - // "background-color" - ]); - - const browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/; - function hasBrowserOnlyColors(keyframes) { - for (let i = 0; i < keyframes.length; i++) { - if (typeof keyframes[i] === "string" && - browserColorFunctions.test(keyframes[i])) { - return true; - } - } - return false; - } - - const colorProperties = new Set([ - "color", - "backgroundColor", - "outlineColor", - "fill", - "stroke", - "borderColor", - "borderTopColor", - "borderRightColor", - "borderBottomColor", - "borderLeftColor", - ]); - const supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate")); - function supportsBrowserAnimation(options) { - const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options; - const subject = motionValue?.owner?.current; - /** - * We use this check instead of isHTMLElement() because we explicitly - * **don't** want elements in different timing contexts (i.e. popups) - * to be accelerated, as it's not possible to sync these animations - * properly with those driven from the main window frameloop. - */ - if (!(subject instanceof HTMLElement)) { - return false; - } - const { onUpdate, transformTemplate } = motionValue.owner.getProps(); - return (supportsWaapi() && - name && - /** - * Force WAAPI for color properties with browser-only color formats - * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse. - */ - (acceleratedValues.has(name) || - (colorProperties.has(name) && - hasBrowserOnlyColors(keyframes))) && - (name !== "transform" || !transformTemplate) && - /** - * If we're outputting values to onUpdate then we can't use WAAPI as there's - * no way to read the value from WAAPI every frame. - */ - !onUpdate && - !repeatDelay && - repeatType !== "mirror" && - damping !== 0 && - type !== "inertia"); - } - - /** - * Maximum time allowed between an animation being created and it being - * resolved for us to use the latter as the start time. - * - * This is to ensure that while we prefer to "start" an animation as soon - * as it's triggered, we also want to avoid a visual jump if there's a big delay - * between these two moments. - */ - const MAX_RESOLVE_DELAY = 40; - class AsyncMotionValueAnimation extends WithPromise { - constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", keyframes, name, motionValue, element, ...options }) { - super(); - /** - * Bound to support return animation.stop pattern - */ - this.stop = () => { - if (this._animation) { - this._animation.stop(); - this.stopTimeline?.(); - } - this.keyframeResolver?.cancel(); - }; - this.createdAt = time.now(); - const optionsWithDefaults = { - autoplay, - delay, - type, - repeat, - repeatDelay, - repeatType, - name, - motionValue, - element, - ...options, - }; - const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver; - this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element); - this.keyframeResolver?.scheduleResolve(); - } - onKeyframesResolved(keyframes, finalKeyframe, options, sync) { - this.keyframeResolver = undefined; - const { name, type, velocity, delay, isHandoff, onUpdate } = options; - this.resolvedAt = time.now(); - /** - * If we can't animate this value with the resolved keyframes - * then we should complete it immediately. - */ - let canAnimateValue = true; - if (!canAnimate(keyframes, name, type, velocity)) { - canAnimateValue = false; - if (MotionGlobalConfig.instantAnimations || !delay) { - onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe)); - } - keyframes[0] = keyframes[keyframes.length - 1]; - makeAnimationInstant(options); - options.repeat = 0; - } - /** - * Resolve startTime for the animation. - * - * This method uses the createdAt and resolvedAt to calculate the - * animation startTime. *Ideally*, we would use the createdAt time as t=0 - * as the following frame would then be the first frame of the animation in - * progress, which would feel snappier. - * - * However, if there's a delay (main thread work) between the creation of - * the animation and the first committed frame, we prefer to use resolvedAt - * to avoid a sudden jump into the animation. - */ - const startTime = sync - ? !this.resolvedAt - ? this.createdAt - : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY - ? this.resolvedAt - : this.createdAt - : undefined; - const resolvedOptions = { - startTime, - finalKeyframe, - ...options, - keyframes, - }; - /** - * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via - * WAAPI. Therefore, this animation must be JS to ensure it runs "under" the - * optimised animation. - * - * Also skip WAAPI when keyframes aren't animatable, as the resolved - * values may not be valid CSS and would trigger browser warnings. - */ - const useWaapi = canAnimateValue && - !isHandoff && - supportsBrowserAnimation(resolvedOptions); - const element = resolvedOptions.motionValue?.owner?.current; - let animation; - if (useWaapi) { - try { - animation = new NativeAnimationExtended({ - ...resolvedOptions, - element, - }); - } - catch { - animation = new JSAnimation(resolvedOptions); - } - } - else { - animation = new JSAnimation(resolvedOptions); - } - animation.finished.then(() => { - this.notifyFinished(); - }).catch(noop$1); - if (this.pendingTimeline) { - this.stopTimeline = animation.attachTimeline(this.pendingTimeline); - this.pendingTimeline = undefined; - } - this._animation = animation; - } - get finished() { - if (!this._animation) { - return this._finished; - } - else { - return this.animation.finished; - } - } - then(onResolve, _onReject) { - return this.finished.finally(onResolve).then(() => { }); - } - get animation() { - if (!this._animation) { - this.keyframeResolver?.resume(); - flushKeyframeResolvers(); - } - return this._animation; - } - get duration() { - return this.animation.duration; - } - get iterationDuration() { - return this.animation.iterationDuration; - } - get time() { - return this.animation.time; - } - set time(newTime) { - this.animation.time = newTime; - } - get speed() { - return this.animation.speed; - } - get state() { - return this.animation.state; - } - set speed(newSpeed) { - this.animation.speed = newSpeed; - } - get startTime() { - return this.animation.startTime; - } - attachTimeline(timeline) { - if (this._animation) { - this.stopTimeline = this.animation.attachTimeline(timeline); - } - else { - this.pendingTimeline = timeline; - } - return () => this.stop(); - } - play() { - this.animation.play(); - } - pause() { - this.animation.pause(); - } - complete() { - this.animation.complete(); - } - cancel() { - if (this._animation) { - this.animation.cancel(); - } - this.keyframeResolver?.cancel(); - } - } - - class GroupAnimation { - constructor(animations) { - // Bound to accomadate common `return animation.stop` pattern - this.stop = () => this.runAll("stop"); - this.animations = animations.filter(Boolean); - } - get finished() { - return Promise.all(this.animations.map((animation) => animation.finished)); - } - /** - * TODO: Filter out cancelled or stopped animations before returning - */ - getAll(propName) { - return this.animations[0][propName]; - } - setAll(propName, newValue) { - for (let i = 0; i < this.animations.length; i++) { - this.animations[i][propName] = newValue; - } - } - attachTimeline(timeline) { - const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline)); - return () => { - subscriptions.forEach((cancel, i) => { - cancel && cancel(); - this.animations[i].stop(); - }); - }; - } - get time() { - return this.getAll("time"); - } - set time(time) { - this.setAll("time", time); - } - get speed() { - return this.getAll("speed"); - } - set speed(speed) { - this.setAll("speed", speed); - } - get state() { - return this.getAll("state"); - } - get startTime() { - return this.getAll("startTime"); - } - get duration() { - return getMax(this.animations, "duration"); - } - get iterationDuration() { - return getMax(this.animations, "iterationDuration"); - } - runAll(methodName) { - this.animations.forEach((controls) => controls[methodName]()); - } - play() { - this.runAll("play"); - } - pause() { - this.runAll("pause"); - } - cancel() { - this.runAll("cancel"); - } - complete() { - this.runAll("complete"); - } - } - function getMax(animations, propName) { - let max = 0; - for (let i = 0; i < animations.length; i++) { - const value = animations[i][propName]; - if (value !== null && value > max) { - max = value; - } - } - return max; - } - - class GroupAnimationWithThen extends GroupAnimation { - then(onResolve, _onReject) { - return this.finished.finally(onResolve).then(() => { }); - } - } - - class NativeAnimationWrapper extends NativeAnimation { - constructor(animation) { - super(); - this.animation = animation; - animation.onfinish = () => { - this.finishedTime = this.time; - this.notifyFinished(); - }; - } - } - - const animationMaps = new WeakMap(); - const animationMapKey = (name, pseudoElement = "") => `${name}:${pseudoElement}`; - function getAnimationMap(element) { - let map = animationMaps.get(element); - if (!map) { - map = new Map(); - animationMaps.set(element, map); - } - return map; - } - - function calcChildStagger(children, child, delayChildren, staggerChildren = 0, staggerDirection = 1) { - const index = Array.from(children) - .sort((a, b) => a.sortNodePosition(b)) - .indexOf(child); - const numChildren = children.size; - const maxStaggerDuration = (numChildren - 1) * staggerChildren; - const delayIsFunction = typeof delayChildren === "function"; - return delayIsFunction - ? delayChildren(index, numChildren) - : staggerDirection === 1 - ? index * staggerChildren - : maxStaggerDuration - index * staggerChildren; - } - - /** - * Maximum time between the value of two frames, beyond which we - * assume the velocity has since been 0. - */ - const MAX_VELOCITY_DELTA = 30; - const isFloat = (value) => { - return !isNaN(parseFloat(value)); - }; - const collectMotionValues = { - current: undefined, - }; - /** - * `MotionValue` is used to track the state and velocity of motion values. - * - * @public - */ - class MotionValue { - /** - * @param init - The initiating value - * @param config - Optional configuration options - * - * - `transformer`: A function to transform incoming values with. - */ - constructor(init, options = {}) { - /** - * Tracks whether this value can output a velocity. Currently this is only true - * if the value is numerical, but we might be able to widen the scope here and support - * other value types. - * - * @internal - */ - this.canTrackVelocity = null; - /** - * An object containing a SubscriptionManager for each active event. - */ - this.events = {}; - this.updateAndNotify = (v) => { - const currentTime = time.now(); - /** - * If we're updating the value during another frame or eventloop - * than the previous frame, then the we set the previous frame value - * to current. - */ - if (this.updatedAt !== currentTime) { - this.setPrevFrameValue(); - } - this.prev = this.current; - this.setCurrent(v); - // Update update subscribers - if (this.current !== this.prev) { - this.events.change?.notify(this.current); - if (this.dependents) { - for (const dependent of this.dependents) { - dependent.dirty(); - } - } - } - }; - this.hasAnimated = false; - this.setCurrent(init); - this.owner = options.owner; - } - setCurrent(current) { - this.current = current; - this.updatedAt = time.now(); - if (this.canTrackVelocity === null && current !== undefined) { - this.canTrackVelocity = isFloat(this.current); - } - } - setPrevFrameValue(prevFrameValue = this.current) { - this.prevFrameValue = prevFrameValue; - this.prevUpdatedAt = this.updatedAt; - } - /** - * Adds a function that will be notified when the `MotionValue` is updated. - * - * It returns a function that, when called, will cancel the subscription. - * - * When calling `onChange` inside a React component, it should be wrapped with the - * `useEffect` hook. As it returns an unsubscribe function, this should be returned - * from the `useEffect` function to ensure you don't add duplicate subscribers.. - * - * ```jsx - * export const MyComponent = () => { - * const x = useMotionValue(0) - * const y = useMotionValue(0) - * const opacity = useMotionValue(1) - * - * useEffect(() => { - * function updateOpacity() { - * const maxXY = Math.max(x.get(), y.get()) - * const newOpacity = transform(maxXY, [0, 100], [1, 0]) - * opacity.set(newOpacity) - * } - * - * const unsubscribeX = x.on("change", updateOpacity) - * const unsubscribeY = y.on("change", updateOpacity) - * - * return () => { - * unsubscribeX() - * unsubscribeY() - * } - * }, []) - * - * return - * } - * ``` - * - * @param subscriber - A function that receives the latest value. - * @returns A function that, when called, will cancel this subscription. - * - * @deprecated - */ - onChange(subscription) { - { - warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on("change", callback).`); - } - return this.on("change", subscription); - } - on(eventName, callback) { - if (!this.events[eventName]) { - this.events[eventName] = new SubscriptionManager(); - } - const unsubscribe = this.events[eventName].add(callback); - if (eventName === "change") { - return () => { - unsubscribe(); - /** - * If we have no more change listeners by the start - * of the next frame, stop active animations. - */ - frame.read(() => { - if (!this.events.change.getSize()) { - this.stop(); - } - }); - }; - } - return unsubscribe; - } - clearListeners() { - for (const eventManagers in this.events) { - this.events[eventManagers].clear(); - } - } - /** - * Attaches a passive effect to the `MotionValue`. - */ - attach(passiveEffect, stopPassiveEffect) { - this.passiveEffect = passiveEffect; - this.stopPassiveEffect = stopPassiveEffect; - } - /** - * Sets the state of the `MotionValue`. - * - * @remarks - * - * ```jsx - * const x = useMotionValue(0) - * x.set(10) - * ``` - * - * @param latest - Latest value to set. - * @param render - Whether to notify render subscribers. Defaults to `true` - * - * @public - */ - set(v) { - if (!this.passiveEffect) { - this.updateAndNotify(v); - } - else { - this.passiveEffect(v, this.updateAndNotify); - } - } - setWithVelocity(prev, current, delta) { - this.set(current); - this.prev = undefined; - this.prevFrameValue = prev; - this.prevUpdatedAt = this.updatedAt - delta; - } - /** - * Set the state of the `MotionValue`, stopping any active animations, - * effects, and resets velocity to `0`. - */ - jump(v, endAnimation = true) { - this.updateAndNotify(v); - this.prev = v; - this.prevUpdatedAt = this.prevFrameValue = undefined; - endAnimation && this.stop(); - if (this.stopPassiveEffect) - this.stopPassiveEffect(); - } - dirty() { - this.events.change?.notify(this.current); - } - addDependent(dependent) { - if (!this.dependents) { - this.dependents = new Set(); - } - this.dependents.add(dependent); - } - removeDependent(dependent) { - if (this.dependents) { - this.dependents.delete(dependent); - } - } - /** - * Returns the latest state of `MotionValue` - * - * @returns - The latest state of `MotionValue` - * - * @public - */ - get() { - if (collectMotionValues.current) { - collectMotionValues.current.push(this); - } - return this.current; - } - /** - * @public - */ - getPrevious() { - return this.prev; - } - /** - * Returns the latest velocity of `MotionValue` - * - * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical. - * - * @public - */ - getVelocity() { - const currentTime = time.now(); - if (!this.canTrackVelocity || - this.prevFrameValue === undefined || - currentTime - this.updatedAt > MAX_VELOCITY_DELTA) { - return 0; - } - const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA); - // Casts because of parseFloat's poor typing - return velocityPerSecond(parseFloat(this.current) - - parseFloat(this.prevFrameValue), delta); - } - /** - * Registers a new animation to control this `MotionValue`. Only one - * animation can drive a `MotionValue` at one time. - * - * ```jsx - * value.start() - * ``` - * - * @param animation - A function that starts the provided animation - */ - start(startAnimation) { - this.stop(); - return new Promise((resolve) => { - this.hasAnimated = true; - this.animation = startAnimation(resolve); - if (this.events.animationStart) { - this.events.animationStart.notify(); - } - }).then(() => { - if (this.events.animationComplete) { - this.events.animationComplete.notify(); - } - this.clearAnimation(); - }); - } - /** - * Stop the currently active animation. - * - * @public - */ - stop() { - if (this.animation) { - this.animation.stop(); - if (this.events.animationCancel) { - this.events.animationCancel.notify(); - } - } - this.clearAnimation(); - } - /** - * Returns `true` if this value is currently animating. - * - * @public - */ - isAnimating() { - return !!this.animation; - } - clearAnimation() { - delete this.animation; - } - /** - * Destroy and clean up subscribers to this `MotionValue`. - * - * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically - * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually - * created a `MotionValue` via the `motionValue` function. - * - * @public - */ - destroy() { - this.dependents?.clear(); - this.events.destroy?.notify(); - this.clearListeners(); - this.stop(); - if (this.stopPassiveEffect) { - this.stopPassiveEffect(); - } - } - } - function motionValue(init, options) { - return new MotionValue(init, options); - } - - /** - * If `transition` has `inherit: true`, shallow-merge it with - * `parentTransition` (child keys win) and strip the `inherit` key. - * Otherwise return `transition` unchanged. - */ - function resolveTransition(transition, parentTransition) { - if (transition?.inherit && parentTransition) { - const { inherit: _, ...rest } = transition; - return { ...parentTransition, ...rest }; - } - return transition; - } - - function getValueTransition$1(transition, key) { - const valueTransition = transition?.[key] ?? - transition?.["default"] ?? - transition; - if (valueTransition !== transition) { - return resolveTransition(valueTransition, transition); - } - return valueTransition; - } - - const underDampedSpring = { - type: "spring", - stiffness: 500, - damping: 25, - restSpeed: 10, - }; - const criticallyDampedSpring = (target) => ({ - type: "spring", - stiffness: 550, - damping: target === 0 ? 2 * Math.sqrt(550) : 30, - restSpeed: 10, - }); - const keyframesTransition = { - type: "keyframes", - duration: 0.8, - }; - /** - * Default easing curve is a slightly shallower version of - * the default browser easing curve. - */ - const ease = { - type: "keyframes", - ease: [0.25, 0.1, 0.35, 1], - duration: 0.3, - }; - const getDefaultTransition = (valueKey, { keyframes }) => { - if (keyframes.length > 2) { - return keyframesTransition; - } - else if (transformProps.has(valueKey)) { - return valueKey.startsWith("scale") - ? criticallyDampedSpring(keyframes[1]) - : underDampedSpring; - } - return ease; - }; - - const orchestrationKeys = new Set([ - "when", - "delay", - "delayChildren", - "staggerChildren", - "staggerDirection", - "repeat", - "repeatType", - "repeatDelay", - "from", - "elapsed", - ]); - /** - * Decide whether a transition is defined on a given Transition. - * This filters out orchestration options and returns true - * if any options are left. - */ - function isTransitionDefined(transition) { - for (const key in transition) { - if (!orchestrationKeys.has(key)) - return true; - } - return false; - } - - const animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => { - const valueTransition = getValueTransition$1(transition, name) || {}; - /** - * Most transition values are currently completely overwritten by value-specific - * transitions. In the future it'd be nicer to blend these transitions. But for now - * delay actually does inherit from the root transition if not value-specific. - */ - const delay = valueTransition.delay || transition.delay || 0; - /** - * Elapsed isn't a public transition option but can be passed through from - * optimized appear effects in milliseconds. - */ - let { elapsed = 0 } = transition; - elapsed = elapsed - secondsToMilliseconds(delay); - const options = { - keyframes: Array.isArray(target) ? target : [null, target], - ease: "easeOut", - velocity: value.getVelocity(), - ...valueTransition, - delay: -elapsed, - onUpdate: (v) => { - value.set(v); - valueTransition.onUpdate && valueTransition.onUpdate(v); - }, - onComplete: () => { - onComplete(); - valueTransition.onComplete && valueTransition.onComplete(); - }, - name, - motionValue: value, - element: isHandoff ? undefined : element, - }; - /** - * If there's no transition defined for this value, we can generate - * unique transition settings for this value. - */ - if (!isTransitionDefined(valueTransition)) { - Object.assign(options, getDefaultTransition(name, options)); - } - /** - * Both WAAPI and our internal animation functions use durations - * as defined by milliseconds, while our external API defines them - * as seconds. - */ - options.duration && (options.duration = secondsToMilliseconds(options.duration)); - options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay)); - /** - * Support deprecated way to set initial value. Prefer keyframe syntax. - */ - if (options.from !== undefined) { - options.keyframes[0] = options.from; - } - let shouldSkip = false; - if (options.type === false || - (options.duration === 0 && !options.repeatDelay)) { - makeAnimationInstant(options); - if (options.delay === 0) { - shouldSkip = true; - } - } - if (MotionGlobalConfig.instantAnimations || - MotionGlobalConfig.skipAnimations || - element?.shouldSkipAnimations || - valueTransition.skipAnimations) { - shouldSkip = true; - makeAnimationInstant(options); - options.delay = 0; - } - /** - * If the transition type or easing has been explicitly set by the user - * then we don't want to allow flattening the animation. - */ - options.allowFlatten = !valueTransition.type && !valueTransition.ease; - /** - * If we can or must skip creating the animation, and apply only - * the final keyframe, do so. We also check once keyframes are resolved but - * this early check prevents the need to create an animation at all. - */ - if (shouldSkip && !isHandoff && value.get() !== undefined) { - const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition); - if (finalKeyframe !== undefined) { - frame.update(() => { - options.onUpdate(finalKeyframe); - options.onComplete(); - }); - return; - } - } - return valueTransition.isSync - ? new JSAnimation(options) - : new AsyncMotionValueAnimation(options); - }; - - const MIN_LAYOUT_DISTANCE = 20; - function bezierPoint(t, origin, control, target) { - const inv = 1 - t; - return inv * inv * origin + 2 * inv * t * control + t * t * target; - } - function bezierTangentAngle(t, originX, controlX, targetX, originY, controlY, targetY) { - const dx = 2 * (1 - t) * (controlX - originX) + 2 * t * (targetX - controlX); - const dy = 2 * (1 - t) * (controlY - originY) + 2 * t * (targetY - controlY); - return Math.atan2(dy, dx) * (180 / Math.PI); - } - function computeArcControlPoint(fromX, fromY, toX, toY, strength, peak) { - const deltaX = toX - fromX; - const deltaY = toY - fromY; - const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); - if (distance > 0) { - const normalPerpX = -deltaY / distance; - const normalPerpY = deltaX / distance; - const desiredHeight = strength * distance; - return { - x: fromX + deltaX * peak + normalPerpX * desiredHeight, - y: fromY + deltaY * peak + normalPerpY * desiredHeight, - }; - } - return { x: fromX, y: fromY }; - } - /** - * The pure sampling factory: `(from, to) => (t) => point`. Internal — - * used by {@link arc} and the unit tests. Not part of the public surface. - */ - function createArcPath({ strength = 0.5, peak = 0.5, direction, rotate = false, } = {}) { - const rotationScale = rotate === true ? 1 : typeof rotate === "number" ? rotate : 0; - // Auto-direction only: persists across calls to flip the bulge back - // onto the same screen side when the dominant axis changes between - // calls. Reuse the factory (module scope / useMemo) to keep this alive. - let prevBulgeSign; - const createInterpolator = (from, to) => { - const dx = to.x - from.x; - const dy = to.y - from.y; - let signed; - if (direction === "cw") { - signed = -strength; - } - else if (direction === "ccw") { - signed = strength; - } - else { - const dom = Math.abs(dx) >= Math.abs(dy) ? dx : dy; - signed = dom < 0 ? -strength : strength; - } - let control = computeArcControlPoint(from.x, from.y, to.x, to.y, signed, peak); - if (direction === undefined) { - const isVertical = Math.abs(dx) < Math.abs(dy); - const midX = from.x + dx * peak; - const midY = from.y + dy * peak; - const bulgeSign = isVertical - ? Math.sign(control.x - midX) - : Math.sign(control.y - midY); - if (prevBulgeSign !== undefined && - bulgeSign !== 0 && - bulgeSign !== prevBulgeSign) { - signed = -signed; - control = computeArcControlPoint(from.x, from.y, to.x, to.y, signed, peak); - } - else if (bulgeSign !== 0) { - prevBulgeSign = bulgeSign; - } - } - const tangent0 = rotationScale - ? bezierTangentAngle(0, from.x, control.x, to.x, from.y, control.y, to.y) - : 0; - const tangent1 = rotationScale - ? bezierTangentAngle(1, from.x, control.x, to.x, from.y, control.y, to.y) - : 0; - const tangentDelta = rotationScale - ? wrap(-180, 180, tangent1 - tangent0) - : 0; - return (t) => { - const out = { - x: bezierPoint(t, from.x, control.x, to.x), - y: bezierPoint(t, from.y, control.y, to.y), - }; - if (rotationScale) { - const raw = bezierTangentAngle(t, from.x, control.x, to.x, from.y, control.y, to.y); - const baseline = tangent0 + tangentDelta * t; - out.rotate = wrap(-180, 180, raw - baseline) * rotationScale; - } - return out; - }; - }; - return createInterpolator; - } - /** - * Creates a curved path for `transition.path`: - * - * ```ts - * - * ``` - * - * Reuse the returned value (module scope / useMemo / useRef) so its - * continuity closure survives re-renders — a fresh `arc()` has no memory. - */ - function arc(options = {}) { - const sample = createArcPath(options); - const path = { - interpolateProjection(delta) { - // `from` is the current translate offset (carries any in-flight - // displacement when interrupted); `to` is the new layout origin. - // The distance floor avoids visible wobble on tiny shifts. - const tx = delta.x.translate; - const ty = delta.y.translate; - if (Math.sqrt(tx * tx + ty * ty) < MIN_LAYOUT_DISTANCE) { - return undefined; - } - return sample({ x: tx, y: ty }, { x: 0, y: 0 }); - }, - animateVisualElement(visualElement, target, transition, delay, animations) { - if (!("x" in target || "y" in target)) - return; - const xValue = visualElement.getValue("x", visualElement.latestValues["x"] ?? 0); - const yValue = visualElement.getValue("y", visualElement.latestValues["y"] ?? 0); - const xRaw = target.x; - const yRaw = target.y; - const xFrom = (Array.isArray(xRaw) && xRaw[0] != null - ? xRaw[0] - : xValue?.get()) ?? 0; - const yFrom = (Array.isArray(yRaw) && yRaw[0] != null - ? yRaw[0] - : yValue?.get()) ?? 0; - const xTo = (Array.isArray(xRaw) - ? xRaw[xRaw.length - 1] - : xRaw ?? xFrom); - const yTo = (Array.isArray(yRaw) - ? yRaw[yRaw.length - 1] - : yRaw ?? yFrom); - // Interruption needs no flag: x/y already hold the displaced - // mid-arc position, so xFrom/yFrom carry the continuity geometry. - const interpolate = sample({ x: xFrom, y: yFrom }, { x: xTo, y: yTo }); - // Drive a dedicated `pathRotation` value (composed onto `rotate` - // at the build sites) rather than `rotate` itself, so a - // concurrent rotate animation composes and nothing accumulates - // on interrupt. - const pathRotationValue = interpolate(0).rotate !== undefined - ? visualElement.getValue("pathRotation", 0) - : undefined; - const pathTransition = { - delay, - ...getValueTransition$1(transition || {}, "x"), - }; - delete pathTransition.path; - const progress = motionValue(0); - progress.start(animateMotionValue("", progress, [0, 1000], { - ...pathTransition, - isSync: true, - velocity: 0, - onUpdate: (latest) => { - const point = interpolate(latest / 1000); - xValue?.set(point.x); - yValue?.set(point.y); - if (pathRotationValue && point.rotate !== undefined) { - pathRotationValue.set(point.rotate); - } - }, - onComplete: () => { - xValue?.set(xTo); - yValue?.set(yTo); - pathRotationValue?.set(0); - }, - // Interrupt/cancel must clear our additive contribution - // so it can't linger on top of the user's `rotate`. - onStop: () => pathRotationValue?.set(0), - onCancel: () => pathRotationValue?.set(0), - })); - if (progress.animation) - animations.push(progress.animation); - delete target.x; - delete target.y; - }, - }; - return path; - } - - /** - * Parse Framer's special CSS variable format into a CSS token and a fallback. - * - * ``` - * `var(--foo, #fff)` => [`--foo`, '#fff'] - * ``` - * - * @param current - */ - const splitCSSVariableRegex = - // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words - /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u; - function parseCSSVariable(current) { - const match = splitCSSVariableRegex.exec(current); - if (!match) - return [,]; - const [, token1, token2, fallback] = match; - return [`--${token1 ?? token2}`, fallback]; - } - const maxDepth = 4; - function getVariableValue(current, element, depth = 1) { - exports.invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth"); - const [token, fallback] = parseCSSVariable(current); - // No CSS variable detected - if (!token) - return; - // Attempt to read this CSS variable off the element - const resolved = window.getComputedStyle(element).getPropertyValue(token); - if (resolved) { - const trimmed = resolved.trim(); - return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed; - } - return isCSSVariableToken(fallback) - ? getVariableValue(fallback, element, depth + 1) - : fallback; - } - - function getValueState(visualElement) { - const state = [{}, {}]; - visualElement?.values.forEach((value, key) => { - state[0][key] = value.get(); - state[1][key] = value.getVelocity(); - }); - return state; - } - function resolveVariantFromProps(props, definition, custom, visualElement) { - /** - * If the variant definition is a function, resolve. - */ - if (typeof definition === "function") { - const [current, velocity] = getValueState(visualElement); - definition = definition(custom !== undefined ? custom : props.custom, current, velocity); - } - /** - * If the variant definition is a variant label, or - * the function returned a variant label, resolve. - */ - if (typeof definition === "string") { - definition = props.variants && props.variants[definition]; - } - /** - * At this point we've resolved both functions and variant labels, - * but the resolved variant label might itself have been a function. - * If so, resolve. This can only have returned a valid target object. - */ - if (typeof definition === "function") { - const [current, velocity] = getValueState(visualElement); - definition = definition(custom !== undefined ? custom : props.custom, current, velocity); - } - return definition; - } - - function resolveVariant(visualElement, definition, custom) { - const props = visualElement.getProps(); - return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement); - } - - const positionalKeys = new Set([ - "width", - "height", - "top", - "left", - "right", - "bottom", - ...transformPropOrder, - ]); - - const isKeyframesTarget = (v) => { - return Array.isArray(v); - }; - - /** - * Set VisualElement's MotionValue, creating a new MotionValue for it if - * it doesn't exist. - */ - function setMotionValue(visualElement, key, value) { - if (visualElement.hasValue(key)) { - visualElement.getValue(key).set(value); - } - else { - visualElement.addValue(key, motionValue(value)); - } - } - function resolveFinalValueInKeyframes(v) { - // TODO maybe throw if v.length - 1 is placeholder token? - return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v; - } - function setTarget(visualElement, definition) { - const resolved = resolveVariant(visualElement, definition); - let { transitionEnd = {}, transition = {}, ...target } = resolved || {}; - target = { ...target, ...transitionEnd }; - for (const key in target) { - const value = resolveFinalValueInKeyframes(target[key]); - setMotionValue(visualElement, key, value); - } - } - - const isMotionValue = (value) => Boolean(value && value.getVelocity); - - function isWillChangeMotionValue(value) { - return Boolean(isMotionValue(value) && value.add); - } - - function addValueToWillChange(visualElement, key) { - const willChange = visualElement.getValue("willChange"); - /** - * It could be that a user has set willChange to a regular MotionValue, - * in which case we can't add the value to it. - */ - if (isWillChangeMotionValue(willChange)) { - return willChange.add(key); - } - else if (!willChange && MotionGlobalConfig.WillChange) { - const newWillChange = new MotionGlobalConfig.WillChange("auto"); - visualElement.addValue("willChange", newWillChange); - newWillChange.add(key); - } - } - - function camelToDash(str) { - return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`); - } - - const optimizedAppearDataId = "framerAppearId"; - const optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId); - - function getOptimisedAppearId(visualElement) { - return visualElement.props[optimizedAppearDataAttribute]; - } - - /** - * Decide whether we should block this animation. Previously, we achieved this - * just by checking whether the key was listed in protectedKeys, but this - * posed problems if an animation was triggered by afterChildren and protectedKeys - * had been set to true in the meantime. - */ - function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) { - const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true; - needsAnimating[key] = false; - return shouldBlock; - } - function animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) { - let { transition, transitionEnd, ...target } = targetAndTransition; - const defaultTransition = visualElement.getDefaultTransition(); - transition = transition - ? resolveTransition(transition, defaultTransition) - : defaultTransition; - const reduceMotion = transition?.reduceMotion; - const skipAnimations = transition?.skipAnimations; - if (transitionOverride) - transition = transitionOverride; - const animations = []; - const animationTypeState = type && - visualElement.animationState && - visualElement.animationState.getState()[type]; - const path = transition?.path; - if (path) { - // path mutates `target` to claim x/y; loop below skips them. - path.animateVisualElement(visualElement, target, transition, delay, animations); - } - for (const key in target) { - const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null); - const valueTarget = target[key]; - if (valueTarget === undefined || - (animationTypeState && - shouldBlockAnimation(animationTypeState, key))) { - continue; - } - const valueTransition = { - delay, - ...getValueTransition$1(transition || {}, key), - }; - if (skipAnimations) - valueTransition.skipAnimations = true; - /** - * If the value is already at the defined target, skip the animation. - * We still re-assert the value via frame.update to take precedence - * over any stale transitionEnd callbacks from previous animations. - */ - const currentValue = value.get(); - if (currentValue !== undefined && - !value.isAnimating() && - !Array.isArray(valueTarget) && - valueTarget === currentValue && - !valueTransition.velocity) { - frame.update(() => value.set(valueTarget)); - continue; - } - /** - * If this is the first time a value is being animated, check - * to see if we're handling off from an existing animation. - */ - let isHandoff = false; - if (window.MotionHandoffAnimation) { - const appearId = getOptimisedAppearId(visualElement); - if (appearId) { - const startTime = window.MotionHandoffAnimation(appearId, key, frame); - if (startTime !== null) { - valueTransition.startTime = startTime; - isHandoff = true; - } - } - } - addValueToWillChange(visualElement, key); - const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion; - value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key) - ? { type: false } - : valueTransition, visualElement, isHandoff)); - const animation = value.animation; - if (animation) { - animations.push(animation); - } - } - if (transitionEnd) { - const applyTransitionEnd = () => frame.update(() => { - transitionEnd && setTarget(visualElement, transitionEnd); - }); - if (animations.length) { - Promise.all(animations).then(applyTransitionEnd); - } - else { - applyTransitionEnd(); - } - } - return animations; - } - - function animateVariant(visualElement, variant, options = {}) { - const resolved = resolveVariant(visualElement, variant, options.type === "exit" - ? visualElement.presenceContext?.custom - : undefined); - let { transition = visualElement.getDefaultTransition() || {} } = resolved || {}; - if (options.transitionOverride) { - transition = options.transitionOverride; - } - /** - * If we have a variant, create a callback that runs it as an animation. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - const getAnimation = resolved - ? () => Promise.all(animateTarget(visualElement, resolved, options)) - : () => Promise.resolve(); - /** - * If we have children, create a callback that runs all their animations. - * Otherwise, we resolve a Promise immediately for a composable no-op. - */ - const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size - ? (forwardDelay = 0) => { - const { delayChildren = 0, staggerChildren, staggerDirection, } = transition; - return animateChildren(visualElement, variant, forwardDelay, delayChildren, staggerChildren, staggerDirection, options); - } - : () => Promise.resolve(); - /** - * If the transition explicitly defines a "when" option, we need to resolve either - * this animation or all children animations before playing the other. - */ - const { when } = transition; - if (when) { - const [first, last] = when === "beforeChildren" - ? [getAnimation, getChildAnimations] - : [getChildAnimations, getAnimation]; - return first().then(() => last()); - } - else { - return Promise.all([getAnimation(), getChildAnimations(options.delay)]); - } - } - function animateChildren(visualElement, variant, delay = 0, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) { - const animations = []; - for (const child of visualElement.variantChildren) { - child.notify("AnimationStart", variant); - animations.push(animateVariant(child, variant, { - ...options, - delay: delay + - (typeof delayChildren === "function" ? 0 : delayChildren) + - calcChildStagger(visualElement.variantChildren, child, delayChildren, staggerChildren, staggerDirection), - }).then(() => child.notify("AnimationComplete", variant))); - } - return Promise.all(animations); - } - - function animateVisualElement(visualElement, definition, options = {}) { - visualElement.notify("AnimationStart", definition); - let animation; - if (Array.isArray(definition)) { - const animations = definition.map((variant) => animateVariant(visualElement, variant, options)); - animation = Promise.all(animations); - } - else if (typeof definition === "string") { - animation = animateVariant(visualElement, definition, options); - } - else { - const resolvedDefinition = typeof definition === "function" - ? resolveVariant(visualElement, definition, options.custom) - : definition; - animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options)); - } - return animation.then(() => { - visualElement.notify("AnimationComplete", definition); - }); - } - - /** - * ValueType for "auto" - */ - const auto = { - test: (v) => v === "auto", - parse: (v) => v, - }; - - /** - * Tests a provided value against a ValueType - */ - const testValueType = (v) => (type) => type.test(v); - - /** - * A list of value types commonly used for dimensions - */ - const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto]; - /** - * Tests a dimensional value against the list of dimension ValueTypes - */ - const findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v)); - - function isNone(value) { - if (typeof value === "number") { - return value === 0; - } - else if (value !== null) { - return value === "none" || value === "0" || isZeroValueString(value); - } - else { - return true; - } - } - - /** - * Properties that should default to 1 or 100% - */ - const maxDefaults = new Set(["brightness", "contrast", "saturate", "opacity"]); - function applyDefaultFilter(v) { - const [name, value] = v.slice(0, -1).split("("); - if (name === "drop-shadow") - return v; - const [number] = value.match(floatRegex) || []; - if (!number) - return v; - const unit = value.replace(number, ""); - let defaultValue = maxDefaults.has(name) ? 1 : 0; - if (number !== value) - defaultValue *= 100; - return name + "(" + defaultValue + unit + ")"; - } - const functionRegex = /\b([a-z-]*)\(.*?\)/gu; - const filter = { - ...complex, - getAnimatableNone: (v) => { - const functions = v.match(functionRegex); - return functions ? functions.map(applyDefaultFilter).join(" ") : v; - }, - }; - - const mask = { - ...complex, - getAnimatableNone: (v) => { - const parsed = complex.parse(v); - const transformer = complex.createTransformer(v); - return transformer(parsed.map((v) => typeof v === "number" ? 0 : typeof v === "object" ? { ...v, alpha: 1 } : v)); - }, - }; - - const int = { - ...number, - transform: Math.round, - }; - - const transformValueTypes = { - rotate: degrees, - /** - * Internal channel for `transition.path` orientToPath. Composed onto - * `rotate` at the transform-build sites so the user's `rotate` is - * never read or overwritten. Not part of `transformPropOrder`. - */ - pathRotation: degrees, - rotateX: degrees, - rotateY: degrees, - rotateZ: degrees, - scale, - scaleX: scale, - scaleY: scale, - scaleZ: scale, - skew: degrees, - skewX: degrees, - skewY: degrees, - distance: px, - translateX: px, - translateY: px, - translateZ: px, - x: px, - y: px, - z: px, - perspective: px, - transformPerspective: px, - opacity: alpha, - originX: progressPercentage, - originY: progressPercentage, - originZ: px, - }; - - const numberValueTypes = { - // Border props - borderWidth: px, - borderTopWidth: px, - borderRightWidth: px, - borderBottomWidth: px, - borderLeftWidth: px, - borderRadius: px, - borderTopLeftRadius: px, - borderTopRightRadius: px, - borderBottomRightRadius: px, - borderBottomLeftRadius: px, - // Positioning props - width: px, - maxWidth: px, - height: px, - maxHeight: px, - top: px, - right: px, - bottom: px, - left: px, - inset: px, - insetBlock: px, - insetBlockStart: px, - insetBlockEnd: px, - insetInline: px, - insetInlineStart: px, - insetInlineEnd: px, - // Spacing props - padding: px, - paddingTop: px, - paddingRight: px, - paddingBottom: px, - paddingLeft: px, - paddingBlock: px, - paddingBlockStart: px, - paddingBlockEnd: px, - paddingInline: px, - paddingInlineStart: px, - paddingInlineEnd: px, - margin: px, - marginTop: px, - marginRight: px, - marginBottom: px, - marginLeft: px, - marginBlock: px, - marginBlockStart: px, - marginBlockEnd: px, - marginInline: px, - marginInlineStart: px, - marginInlineEnd: px, - // Typography - fontSize: px, - // Misc - backgroundPositionX: px, - backgroundPositionY: px, - ...transformValueTypes, - zIndex: int, - // SVG - fillOpacity: alpha, - strokeOpacity: alpha, - numOctaves: int, - }; - - /** - * A map of default value types for common values - */ - const defaultValueTypes = { - ...numberValueTypes, - // Color props - color, - backgroundColor: color, - outlineColor: color, - fill: color, - stroke: color, - // Border props - borderColor: color, - borderTopColor: color, - borderRightColor: color, - borderBottomColor: color, - borderLeftColor: color, - filter, - WebkitFilter: filter, - mask, - WebkitMask: mask, - }; - /** - * Gets the default ValueType for the provided value key - */ - const getDefaultValueType = (key) => defaultValueTypes[key]; - - const customTypes = /*@__PURE__*/ new Set([filter, mask]); - function getAnimatableNone(key, value) { - let defaultValueType = getDefaultValueType(key); - if (!customTypes.has(defaultValueType)) - defaultValueType = complex; - // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target - return defaultValueType.getAnimatableNone - ? defaultValueType.getAnimatableNone(value) - : undefined; - } - - /** - * If we encounter keyframes like "none" or "0" and we also have keyframes like - * "#fff" or "200px 200px" we want to find a keyframe to serve as a template for - * the "none" keyframes. In this case "#fff" or "200px 200px" - then these get turned into - * zero equivalents, i.e. "#fff0" or "0px 0px". - */ - const invalidTemplates = new Set(["auto", "none", "0"]); - function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) { - let i = 0; - let animatableTemplate = undefined; - while (i < unresolvedKeyframes.length && !animatableTemplate) { - const keyframe = unresolvedKeyframes[i]; - if (typeof keyframe === "string" && - !invalidTemplates.has(keyframe) && - analyseComplexValue(keyframe).values.length) { - animatableTemplate = unresolvedKeyframes[i]; - } - i++; - } - if (animatableTemplate && name) { - for (const noneIndex of noneKeyframeIndexes) { - unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate); - } - } - } - - class DOMKeyframesResolver extends KeyframeResolver { - constructor(unresolvedKeyframes, onComplete, name, motionValue, element) { - super(unresolvedKeyframes, onComplete, name, motionValue, element, true); - } - readKeyframes() { - const { unresolvedKeyframes, element, name } = this; - if (!element || !element.current) - return; - super.readKeyframes(); - /** - * If any keyframe is a CSS variable, we need to find its value by sampling the element - */ - for (let i = 0; i < unresolvedKeyframes.length; i++) { - let keyframe = unresolvedKeyframes[i]; - if (typeof keyframe === "string") { - keyframe = keyframe.trim(); - if (isCSSVariableToken(keyframe)) { - const resolved = getVariableValue(keyframe, element.current); - if (resolved !== undefined) { - unresolvedKeyframes[i] = resolved; - } - if (i === unresolvedKeyframes.length - 1) { - this.finalKeyframe = keyframe; - } - } - } - } - /** - * Resolve "none" values. We do this potentially twice - once before and once after measuring keyframes. - * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which - * have a far bigger performance impact. - */ - this.resolveNoneKeyframes(); - /** - * Check to see if unit type has changed. If so schedule jobs that will - * temporarily set styles to the destination keyframes. - * Skip if we have more than two keyframes or this isn't a positional value. - * TODO: We can throw if there are multiple keyframes and the value type changes. - */ - if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) { - return; - } - const [origin, target] = unresolvedKeyframes; - const originType = findDimensionValueType(origin); - const targetType = findDimensionValueType(target); - /** - * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other - * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410. - */ - const originHasVar = containsCSSVariable(origin); - const targetHasVar = containsCSSVariable(target); - if (originHasVar !== targetHasVar && positionalValues[name]) { - this.needsMeasurement = true; - return; - } - /** - * Either we don't recognise these value types or we can animate between them. - */ - if (originType === targetType) - return; - /** - * If both values are numbers or pixels, we can animate between them by - * converting them to numbers. - */ - if (isNumOrPxType(originType) && isNumOrPxType(targetType)) { - for (let i = 0; i < unresolvedKeyframes.length; i++) { - const value = unresolvedKeyframes[i]; - if (typeof value === "string") { - unresolvedKeyframes[i] = parseFloat(value); - } - } - } - else if (positionalValues[name]) { - /** - * Else, the only way to resolve this is by measuring the element. - */ - this.needsMeasurement = true; - } - } - resolveNoneKeyframes() { - const { unresolvedKeyframes, name } = this; - const noneKeyframeIndexes = []; - for (let i = 0; i < unresolvedKeyframes.length; i++) { - if (unresolvedKeyframes[i] === null || - isNone(unresolvedKeyframes[i])) { - noneKeyframeIndexes.push(i); - } - } - if (noneKeyframeIndexes.length) { - makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name); - } - } - measureInitialState() { - const { element, unresolvedKeyframes, name } = this; - if (!element || !element.current) - return; - if (name === "height") { - this.suspendedScrollY = window.pageYOffset; - } - this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current)); - unresolvedKeyframes[0] = this.measuredOrigin; - // Set final key frame to measure after next render - const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1]; - if (measureKeyframe !== undefined) { - element.getValue(name, measureKeyframe).jump(measureKeyframe, false); - } - } - measureEndState() { - const { element, name, unresolvedKeyframes } = this; - if (!element || !element.current) - return; - const value = element.getValue(name); - value && value.jump(this.measuredOrigin, false); - const finalKeyframeIndex = unresolvedKeyframes.length - 1; - const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex]; - unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current)); - if (finalKeyframe !== null && this.finalKeyframe === undefined) { - this.finalKeyframe = finalKeyframe; - } - // If we removed transform values, reapply them before the next render - if (this.removedTransforms?.length) { - this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => { - element - .getValue(unsetTransformName) - .set(unsetTransformValue); - }); - } - this.resolveNoneKeyframes(); - } - } - - const pxValues = new Set([ - // Border props - "borderWidth", - "borderTopWidth", - "borderRightWidth", - "borderBottomWidth", - "borderLeftWidth", - "borderRadius", - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomRightRadius", - "borderBottomLeftRadius", - // Positioning props - "width", - "maxWidth", - "height", - "maxHeight", - "top", - "right", - "bottom", - "left", - "inset", - "insetBlock", - "insetBlockStart", - "insetBlockEnd", - "insetInline", - "insetInlineStart", - "insetInlineEnd", - // Spacing props - "padding", - "paddingTop", - "paddingRight", - "paddingBottom", - "paddingLeft", - "paddingBlock", - "paddingBlockStart", - "paddingBlockEnd", - "paddingInline", - "paddingInlineStart", - "paddingInlineEnd", - "margin", - "marginTop", - "marginRight", - "marginBottom", - "marginLeft", - "marginBlock", - "marginBlockStart", - "marginBlockEnd", - "marginInline", - "marginInlineStart", - "marginInlineEnd", - // Typography - "fontSize", - // Misc - "backgroundPositionX", - "backgroundPositionY", - ]); - - function applyPxDefaults(keyframes, name) { - for (let i = 0; i < keyframes.length; i++) { - if (typeof keyframes[i] === "number" && pxValues.has(name)) { - keyframes[i] = keyframes[i] + "px"; - } - } - } - - function isWaapiSupportedEasing(easing) { - return Boolean((typeof easing === "function" && supportsLinearEasing()) || - !easing || - (typeof easing === "string" && - (easing in supportedWaapiEasing || supportsLinearEasing())) || - isBezierDefinition(easing) || - (Array.isArray(easing) && easing.every(isWaapiSupportedEasing))); - } - - const supportsPartialKeyframes = /*@__PURE__*/ memo(() => { - try { - document.createElement("div").animate({ opacity: [1] }); - } - catch (e) { - return false; - } - return true; - }); - - function resolveElements(elementOrSelector, scope, selectorCache) { - if (elementOrSelector == null) { - return []; - } - if (elementOrSelector instanceof EventTarget) { - return [elementOrSelector]; - } - else if (typeof elementOrSelector === "string") { - let root = document; - if (scope) { - root = scope.current; - } - const elements = selectorCache?.[elementOrSelector] ?? - root.querySelectorAll(elementOrSelector); - return elements ? Array.from(elements) : []; - } - return Array.from(elementOrSelector).filter((element) => element != null); - } - - function createSelectorEffect(subjectEffect) { - return (subject, values) => { - const elements = resolveElements(subject); - const subscriptions = []; - for (const element of elements) { - const remove = subjectEffect(element, values); - subscriptions.push(remove); - } - return () => { - for (const remove of subscriptions) - remove(); - }; - }; - } - - /** - * Provided a value and a ValueType, returns the value as that value type. - */ - const getValueAsType = (value, type) => { - return type && typeof value === "number" - ? type.transform(value) - : value; - }; - - class MotionValueState { - constructor() { - this.latest = {}; - this.values = new Map(); - } - set(name, value, render, computed, useDefaultValueType = true) { - const existingValue = this.values.get(name); - if (existingValue) { - existingValue.onRemove(); - } - const onChange = () => { - const v = value.get(); - if (useDefaultValueType) { - this.latest[name] = getValueAsType(v, numberValueTypes[name]); - } - else { - this.latest[name] = v; - } - render && frame.render(render); - }; - onChange(); - const cancelOnChange = value.on("change", onChange); - computed && value.addDependent(computed); - const remove = () => { - cancelOnChange(); - render && cancelFrame(render); - this.values.delete(name); - computed && value.removeDependent(computed); - }; - this.values.set(name, { value, onRemove: remove }); - return remove; - } - get(name) { - return this.values.get(name)?.value; - } - } - - function createEffect(addValue) { - const stateCache = new WeakMap(); - return (subject, values) => { - const state = stateCache.get(subject) ?? new MotionValueState(); - stateCache.set(subject, state); - const subscriptions = []; - for (const key in values) { - const value = values[key]; - const remove = addValue(subject, state, key, value); - subscriptions.push(remove); - } - return () => { - for (const cancel of subscriptions) - cancel(); - }; - }; - } - - function canSetAsProperty(element, name) { - if (!(name in element)) - return false; - const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) || - Object.getOwnPropertyDescriptor(element, name); - // Check if it has a setter - return descriptor && typeof descriptor.set === "function"; - } - const addAttrValue = (element, state, key, value) => { - const isProp = canSetAsProperty(element, key); - const name = isProp - ? key - : key.startsWith("data") || key.startsWith("aria") - ? camelToDash(key) - : key; - /** - * Set attribute directly via property if available - */ - const render = isProp - ? () => { - element[name] = state.latest[key]; - } - : () => { - const v = state.latest[key]; - if (v === null || v === undefined) { - element.removeAttribute(name); - } - else { - element.setAttribute(name, String(v)); - } - }; - return state.set(key, value, render); - }; - const attrEffect = /*@__PURE__*/ createSelectorEffect( - /*@__PURE__*/ createEffect(addAttrValue)); - - const propEffect = /*@__PURE__*/ createEffect((subject, state, key, value) => { - return state.set(key, value, () => { - subject[key] = state.latest[key]; - }, undefined, false); - }); - - /** - * Checks if an element is an HTML element in a way - * that works across iframes - */ - function isHTMLElement(element) { - return (isObject(element) && - "offsetHeight" in element && - !("ownerSVGElement" in element)); - } - - const translateAlias$1 = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective", - }; - function buildTransform$1(state) { - let transform = ""; - let transformIsDefault = true; - /** - * Loop over all possible transforms in order, adding the ones that - * are present to the transform string. - */ - for (let i = 0; i < transformPropOrder.length; i++) { - const key = transformPropOrder[i]; - const value = state.latest[key]; - if (value === undefined) - continue; - let valueIsDefault = true; - if (typeof value === "number") { - valueIsDefault = value === (key.startsWith("scale") ? 1 : 0); - } - else { - const parsed = parseFloat(value); - valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0; - } - if (!valueIsDefault) { - transformIsDefault = false; - const transformName = translateAlias$1[key] || key; - transform += `${transformName}(${value}) `; - } - } - // See build-transform.ts: additive `rotate()` so user `rotate` isn't - // clobbered. Not a `transformPropOrder` slot. - const pathRotation = state.latest.pathRotation; - if (pathRotation) { - transformIsDefault = false; - transform += `rotate(${typeof pathRotation === "number" - ? `${pathRotation}deg` - : pathRotation}) `; - } - return transformIsDefault ? "none" : transform.trim(); - } - - const originProps = new Set(["originX", "originY", "originZ"]); - const addStyleValue = (element, state, key, value) => { - let render = undefined; - let computed = undefined; - if (transformProps.has(key)) { - if (!state.get("transform")) { - // If this is an HTML element, we need to set the transform-box to fill-box - // to normalise the transform relative to the element's bounding box - if (!isHTMLElement(element) && !state.get("transformBox")) { - addStyleValue(element, state, "transformBox", new MotionValue("fill-box")); - } - state.set("transform", new MotionValue("none"), () => { - element.style.transform = buildTransform$1(state); - }); - } - computed = state.get("transform"); - } - else if (originProps.has(key)) { - if (!state.get("transformOrigin")) { - state.set("transformOrigin", new MotionValue(""), () => { - const originX = state.latest.originX ?? "50%"; - const originY = state.latest.originY ?? "50%"; - const originZ = state.latest.originZ ?? 0; - element.style.transformOrigin = `${originX} ${originY} ${originZ}`; - }); - } - computed = state.get("transformOrigin"); - } - else if (isCSSVar(key)) { - render = () => { - element.style.setProperty(key, state.latest[key]); - }; - } - else { - render = () => { - element.style[key] = state.latest[key]; - }; - } - return state.set(key, value, render, computed); - }; - const styleEffect = /*@__PURE__*/ createSelectorEffect( - /*@__PURE__*/ createEffect(addStyleValue)); - - function addSVGPathValue(element, state, key, value) { - frame.render(() => element.setAttribute("pathLength", "1")); - if (key === "pathOffset") { - return state.set(key, value, () => { - // Use unitless value to avoid Safari zoom bug - const offset = state.latest[key]; - element.setAttribute("stroke-dashoffset", `${-offset}`); - }); - } - else { - if (!state.get("stroke-dasharray")) { - state.set("stroke-dasharray", new MotionValue("1 1"), () => { - const { pathLength = 1, pathSpacing } = state.latest; - // Use unitless values to avoid Safari zoom bug - element.setAttribute("stroke-dasharray", `${pathLength} ${pathSpacing ?? 1 - Number(pathLength)}`); - }); - } - return state.set(key, value, undefined, state.get("stroke-dasharray")); - } - } - const addSVGValue = (element, state, key, value) => { - if (key.startsWith("path")) { - return addSVGPathValue(element, state, key, value); - } - else if (key.startsWith("attr")) { - return addAttrValue(element, state, convertAttrKey(key), value); - } - const handler = key in element.style ? addStyleValue : addAttrValue; - return handler(element, state, key, value); - }; - const svgEffect = /*@__PURE__*/ createSelectorEffect( - /*@__PURE__*/ createEffect(addSVGValue)); - function convertAttrKey(key) { - return key.replace(/^attr([A-Z])/, (_, firstChar) => firstChar.toLowerCase()); - } - - const { schedule: microtask, cancel: cancelMicrotask } = - /* @__PURE__ */ createRenderBatcher(queueMicrotask, false); - - const isDragging = { - x: false, - y: false, - }; - function isDragActive() { - return isDragging.x || isDragging.y; - } - - function setDragLock(axis) { - if (axis === "x" || axis === "y") { - if (isDragging[axis]) { - return null; - } - else { - isDragging[axis] = true; - return () => { - isDragging[axis] = false; - }; - } - } - else { - if (isDragging.x || isDragging.y) { - return null; - } - else { - isDragging.x = isDragging.y = true; - return () => { - isDragging.x = isDragging.y = false; - }; - } - } - } - - function setupGesture(elementOrSelector, options) { - const elements = resolveElements(elementOrSelector); - const gestureAbortController = new AbortController(); - const eventOptions = { - passive: true, - ...options, - signal: gestureAbortController.signal, - }; - const cancel = () => gestureAbortController.abort(); - return [elements, eventOptions, cancel]; - } - - function isValidHover(event) { - return !(event.pointerType === "touch" || isDragActive()); - } - /** - * Create a hover gesture. hover() is different to .addEventListener("pointerenter") - * in that it has an easier syntax, filters out polyfilled touch events, interoperates - * with drag gestures, and automatically removes the "pointerennd" event listener when the hover ends. - * - * @public - */ - function hover(elementOrSelector, onHoverStart, options = {}) { - const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options); - elements.forEach((element) => { - let isPressed = false; - let deferredHoverEnd = false; - let hoverEndCallback; - const removePointerLeave = () => { - element.removeEventListener("pointerleave", onPointerLeave); - }; - const endHover = (event) => { - if (hoverEndCallback) { - hoverEndCallback(event); - hoverEndCallback = undefined; - } - removePointerLeave(); - }; - const onPointerUp = (event) => { - isPressed = false; - window.removeEventListener("pointerup", onPointerUp); - window.removeEventListener("pointercancel", onPointerUp); - if (deferredHoverEnd) { - deferredHoverEnd = false; - endHover(event); - } - }; - const onPointerDown = () => { - isPressed = true; - window.addEventListener("pointerup", onPointerUp, eventOptions); - window.addEventListener("pointercancel", onPointerUp, eventOptions); - }; - const onPointerLeave = (leaveEvent) => { - if (leaveEvent.pointerType === "touch") - return; - if (isPressed) { - deferredHoverEnd = true; - return; - } - endHover(leaveEvent); - }; - const onPointerEnter = (enterEvent) => { - if (!isValidHover(enterEvent)) - return; - deferredHoverEnd = false; - const onHoverEnd = onHoverStart(element, enterEvent); - if (typeof onHoverEnd !== "function") - return; - hoverEndCallback = onHoverEnd; - element.addEventListener("pointerleave", onPointerLeave, eventOptions); - }; - element.addEventListener("pointerenter", onPointerEnter, eventOptions); - element.addEventListener("pointerdown", onPointerDown, eventOptions); - }); - return cancel; - } - - /** - * Recursively traverse up the tree to check whether the provided child node - * is the parent or a descendant of it. - * - * @param parent - Element to find - * @param child - Element to test against parent - */ - const isNodeOrChild = (parent, child) => { - if (!child) { - return false; - } - else if (parent === child) { - return true; - } - else { - return isNodeOrChild(parent, child.parentElement); - } - }; - - const isPrimaryPointer = (event) => { - if (event.pointerType === "mouse") { - return typeof event.button !== "number" || event.button <= 0; - } - else { - /** - * isPrimary is true for all mice buttons, whereas every touch point - * is regarded as its own input. So subsequent concurrent touch points - * will be false. - * - * Specifically match against false here as incomplete versions of - * PointerEvents in very old browser might have it set as undefined. - */ - return event.isPrimary !== false; - } - }; - - const keyboardAccessibleElements = new Set([ - "BUTTON", - "INPUT", - "SELECT", - "TEXTAREA", - "A", - ]); - /** - * Checks if an element is natively keyboard accessible (focusable). - * Used by the press gesture to determine if we need to add tabIndex. - */ - function isElementKeyboardAccessible(element) { - return (keyboardAccessibleElements.has(element.tagName) || - element.isContentEditable === true); - } - const textInputElements = new Set(["INPUT", "SELECT", "TEXTAREA"]); - /** - * Checks if an element has text selection or direct interaction behavior - * that should block drag gestures from starting. - * - * This specifically targets form controls where the user might want to select - * text or interact with the control (e.g., sliders, dropdowns). - * - * Buttons and links are NOT included because they don't have click-and-move - * actions of their own - they only respond to click events, so dragging - * should still work when initiated from these elements. - */ - function isElementTextInput(element) { - return (textInputElements.has(element.tagName) || - element.isContentEditable === true); - } - - const isPressing = new WeakSet(); - - /** - * Filter out events that are not "Enter" keys. - */ - function filterEvents(callback) { - return (event) => { - if (event.key !== "Enter") - return; - callback(event); - }; - } - function firePointerEvent(target, type) { - target.dispatchEvent(new PointerEvent("pointer" + type, { isPrimary: true, bubbles: true })); - } - const enableKeyboardPress = (focusEvent, eventOptions) => { - const element = focusEvent.currentTarget; - if (!element) - return; - const handleKeydown = filterEvents(() => { - if (isPressing.has(element)) - return; - firePointerEvent(element, "down"); - const handleKeyup = filterEvents(() => { - firePointerEvent(element, "up"); - }); - const handleBlur = () => firePointerEvent(element, "cancel"); - element.addEventListener("keyup", handleKeyup, eventOptions); - element.addEventListener("blur", handleBlur, eventOptions); - }); - element.addEventListener("keydown", handleKeydown, eventOptions); - /** - * Add an event listener that fires on blur to remove the keydown events. - */ - element.addEventListener("blur", () => element.removeEventListener("keydown", handleKeydown), eventOptions); - }; - - /** - * Filter out events that are not primary pointer events, or are triggering - * while a Motion gesture is active. - */ - function isValidPressEvent(event) { - return isPrimaryPointer(event) && !isDragActive(); - } - const claimedPointerDownEvents = new WeakSet(); - /** - * Create a press gesture. - * - * Press is different to `"pointerdown"`, `"pointerup"` in that it - * automatically filters out secondary pointer events like right - * click and multitouch. - * - * It also adds accessibility support for keyboards, where - * an element with a press gesture will receive focus and - * trigger on Enter `"keydown"` and `"keyup"` events. - * - * This is different to a browser's `"click"` event, which does - * respond to keyboards but only for the `"click"` itself, rather - * than the press start and end/cancel. The element also needs - * to be focusable for this to work, whereas a press gesture will - * make an element focusable by default. - * - * @public - */ - function press(targetOrSelector, onPressStart, options = {}) { - const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options); - const startPress = (startEvent) => { - const target = startEvent.currentTarget; - if (!isValidPressEvent(startEvent)) - return; - if (claimedPointerDownEvents.has(startEvent)) - return; - isPressing.add(target); - if (options.stopPropagation) { - claimedPointerDownEvents.add(startEvent); - } - const onPressEnd = onPressStart(target, startEvent); - const onPointerEnd = (endEvent, success) => { - window.removeEventListener("pointerup", onPointerUp); - window.removeEventListener("pointercancel", onPointerCancel); - if (isPressing.has(target)) { - isPressing.delete(target); - } - if (!isValidPressEvent(endEvent)) { - return; - } - if (typeof onPressEnd === "function") { - onPressEnd(endEvent, { success }); - } - }; - const onPointerUp = (upEvent) => { - onPointerEnd(upEvent, target === window || - target === document || - options.useGlobalTarget || - isNodeOrChild(target, upEvent.target)); - }; - const onPointerCancel = (cancelEvent) => { - onPointerEnd(cancelEvent, false); - }; - window.addEventListener("pointerup", onPointerUp, eventOptions); - window.addEventListener("pointercancel", onPointerCancel, eventOptions); - }; - targets.forEach((target) => { - const pointerDownTarget = options.useGlobalTarget ? window : target; - pointerDownTarget.addEventListener("pointerdown", startPress, eventOptions); - if (isHTMLElement(target)) { - target.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions)); - if (!isElementKeyboardAccessible(target) && - !target.hasAttribute("tabindex")) { - target.tabIndex = 0; - } - } - }); - return cancelEvents; - } - - function getComputedStyle$2(element, name) { - const computedStyle = window.getComputedStyle(element); - return isCSSVar(name) - ? computedStyle.getPropertyValue(name) - : computedStyle[name]; - } - - /** - * Checks if an element is an SVG element in a way - * that works across iframes - */ - function isSVGElement(element) { - return isObject(element) && "ownerSVGElement" in element; - } - - const resizeHandlers = new WeakMap(); - let observer; - const getSize = (borderBoxAxis, svgAxis, htmlAxis) => (target, borderBoxSize) => { - if (borderBoxSize && borderBoxSize[0]) { - return borderBoxSize[0][(borderBoxAxis + "Size")]; - } - else if (isSVGElement(target) && "getBBox" in target) { - return target.getBBox()[svgAxis]; - } - else { - return target[htmlAxis]; - } - }; - const getWidth = /*@__PURE__*/ getSize("inline", "width", "offsetWidth"); - const getHeight = /*@__PURE__*/ getSize("block", "height", "offsetHeight"); - function notifyTarget({ target, borderBoxSize }) { - resizeHandlers.get(target)?.forEach((handler) => { - handler(target, { - get width() { - return getWidth(target, borderBoxSize); - }, - get height() { - return getHeight(target, borderBoxSize); - }, - }); - }); - } - function notifyAll(entries) { - entries.forEach(notifyTarget); - } - function createResizeObserver() { - if (typeof ResizeObserver === "undefined") - return; - observer = new ResizeObserver(notifyAll); - } - function resizeElement(target, handler) { - if (!observer) - createResizeObserver(); - const elements = resolveElements(target); - elements.forEach((element) => { - let elementHandlers = resizeHandlers.get(element); - if (!elementHandlers) { - elementHandlers = new Set(); - resizeHandlers.set(element, elementHandlers); - } - elementHandlers.add(handler); - observer?.observe(element); - }); - return () => { - elements.forEach((element) => { - const elementHandlers = resizeHandlers.get(element); - elementHandlers?.delete(handler); - if (!elementHandlers?.size) { - observer?.unobserve(element); - } - }); - }; - } - - const windowCallbacks = new Set(); - let windowResizeHandler; - function createWindowResizeHandler() { - windowResizeHandler = () => { - const info = { - get width() { - return window.innerWidth; - }, - get height() { - return window.innerHeight; - }, - }; - windowCallbacks.forEach((callback) => callback(info)); - }; - window.addEventListener("resize", windowResizeHandler); - } - function resizeWindow(callback) { - windowCallbacks.add(callback); - if (!windowResizeHandler) - createWindowResizeHandler(); - return () => { - windowCallbacks.delete(callback); - if (!windowCallbacks.size && - typeof windowResizeHandler === "function") { - window.removeEventListener("resize", windowResizeHandler); - windowResizeHandler = undefined; - } - }; - } - - function resize(a, b) { - return typeof a === "function" ? resizeWindow(a) : resizeElement(a, b); - } - - function observeTimeline(update, timeline) { - let prevProgress; - const onFrame = () => { - const { currentTime } = timeline; - const percentage = currentTime === null ? 0 : currentTime.value; - const progress = percentage / 100; - if (prevProgress !== progress) { - update(progress); - } - prevProgress = progress; - }; - frame.preUpdate(onFrame, true); - return () => cancelFrame(onFrame); - } - - function record() { - const { value } = statsBuffer; - if (value === null) { - cancelFrame(record); - return; - } - value.frameloop.rate.push(frameData.delta); - value.animations.mainThread.push(activeAnimations.mainThread); - value.animations.waapi.push(activeAnimations.waapi); - value.animations.layout.push(activeAnimations.layout); - } - function mean(values) { - return values.reduce((acc, value) => acc + value, 0) / values.length; - } - function summarise(values, calcAverage = mean) { - if (values.length === 0) { - return { - min: 0, - max: 0, - avg: 0, - }; - } - return { - min: Math.min(...values), - max: Math.max(...values), - avg: calcAverage(values), - }; - } - const msToFps = (ms) => Math.round(1000 / ms); - function clearStatsBuffer() { - statsBuffer.value = null; - statsBuffer.addProjectionMetrics = null; - } - function reportStats() { - const { value } = statsBuffer; - if (!value) { - throw new Error("Stats are not being measured"); - } - clearStatsBuffer(); - cancelFrame(record); - const summary = { - frameloop: { - setup: summarise(value.frameloop.setup), - rate: summarise(value.frameloop.rate), - read: summarise(value.frameloop.read), - resolveKeyframes: summarise(value.frameloop.resolveKeyframes), - preUpdate: summarise(value.frameloop.preUpdate), - update: summarise(value.frameloop.update), - preRender: summarise(value.frameloop.preRender), - render: summarise(value.frameloop.render), - postRender: summarise(value.frameloop.postRender), - }, - animations: { - mainThread: summarise(value.animations.mainThread), - waapi: summarise(value.animations.waapi), - layout: summarise(value.animations.layout), - }, - layoutProjection: { - nodes: summarise(value.layoutProjection.nodes), - calculatedTargetDeltas: summarise(value.layoutProjection.calculatedTargetDeltas), - calculatedProjections: summarise(value.layoutProjection.calculatedProjections), - }, - }; - /** - * Convert the rate to FPS - */ - const { rate } = summary.frameloop; - rate.min = msToFps(rate.min); - rate.max = msToFps(rate.max); - rate.avg = msToFps(rate.avg); - [rate.min, rate.max] = [rate.max, rate.min]; - return summary; - } - function recordStats() { - if (statsBuffer.value) { - clearStatsBuffer(); - throw new Error("Stats are already being measured"); - } - const newStatsBuffer = statsBuffer; - newStatsBuffer.value = { - frameloop: { - setup: [], - rate: [], - read: [], - resolveKeyframes: [], - preUpdate: [], - update: [], - preRender: [], - render: [], - postRender: [], - }, - animations: { - mainThread: [], - waapi: [], - layout: [], - }, - layoutProjection: { - nodes: [], - calculatedTargetDeltas: [], - calculatedProjections: [], - }, - }; - newStatsBuffer.addProjectionMetrics = (metrics) => { - const { layoutProjection } = newStatsBuffer.value; - layoutProjection.nodes.push(metrics.nodes); - layoutProjection.calculatedTargetDeltas.push(metrics.calculatedTargetDeltas); - layoutProjection.calculatedProjections.push(metrics.calculatedProjections); - }; - frame.postRender(record, true); - return reportStats; - } - - /** - * Checks if an element is specifically an SVGSVGElement (the root SVG element) - * in a way that works across iframes - */ - function isSVGSVGElement(element) { - return isSVGElement(element) && element.tagName === "svg"; - } - - function getOriginIndex(from, total) { - if (from === "first") { - return 0; - } - else { - const lastIndex = total - 1; - return from === "last" ? lastIndex : lastIndex / 2; - } - } - function stagger(duration = 0.1, { startDelay = 0, from = 0, ease } = {}) { - return (i, total) => { - const fromIndex = typeof from === "number" ? from : getOriginIndex(from, total); - const distance = Math.abs(fromIndex - i); - let delay = duration * distance; - if (ease) { - const maxDelay = total * duration; - const easingFunction = easingDefinitionToFunction(ease); - delay = easingFunction(delay / maxDelay) * maxDelay; - } - return startDelay + delay; - }; - } - - function transform(...args) { - const useImmediate = !Array.isArray(args[0]); - const argOffset = useImmediate ? 0 : -1; - const inputValue = args[0 + argOffset]; - const inputRange = args[1 + argOffset]; - const outputRange = args[2 + argOffset]; - const options = args[3 + argOffset]; - const interpolator = interpolate(inputRange, outputRange, options); - return useImmediate ? interpolator(inputValue) : interpolator; - } - - /** - * Create a `MotionValue` that animates to its latest value using any transition type. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = followValue(x, { type: "spring", stiffness: 300 }) - * // or with tween - * const z = followValue(x, { type: "tween", duration: 0.5, ease: "easeOut" }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns `MotionValue` - * - * @public - */ - function followValue(source, options) { - const initialValue = isMotionValue(source) ? source.get() : source; - const value = motionValue(initialValue); - attachFollow(value, source, options); - return value; - } - /** - * Attach an animation to a MotionValue that will animate whenever the value changes. - * Similar to attachSpring but supports any transition type (spring, tween, inertia, etc.) - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Animation transition options - * @returns Cleanup function - * - * @public - */ - function attachFollow(value, source, options = {}) { - const initialValue = value.get(); - let activeAnimation = null; - let latestValue = initialValue; - let latestSetter; - const unit = typeof initialValue === "string" - ? initialValue.replace(/[\d.-]/g, "") - : undefined; - const stopAnimation = () => { - if (activeAnimation) { - activeAnimation.stop(); - activeAnimation = null; - } - value.animation = undefined; - }; - const startAnimation = () => { - const currentValue = asNumber$1(value.get()); - const targetValue = asNumber$1(latestValue); - // Don't animate if we're already at the target - if (currentValue === targetValue) { - stopAnimation(); - return; - } - // Use the running animation's analytical velocity for accuracy, - // falling back to the MotionValue's velocity for the initial animation. - // This prevents systematic velocity loss at high frame rates (240hz+). - const velocity = activeAnimation - ? activeAnimation.getGeneratorVelocity() - : value.getVelocity(); - stopAnimation(); - activeAnimation = new JSAnimation({ - keyframes: [currentValue, targetValue], - velocity, - // Default to spring if no type specified (matches useSpring behavior) - type: "spring", - restDelta: 0.001, - restSpeed: 0.01, - ...options, - onUpdate: latestSetter, - }); - }; - // Use a stable function reference so the frame loop Set deduplicates - // multiple calls within the same frame (e.g. rapid mouse events) - const scheduleAnimation = () => { - startAnimation(); - value.animation = activeAnimation ?? undefined; - value["events"].animationStart?.notify(); - activeAnimation?.then(() => { - value.animation = undefined; - value["events"].animationComplete?.notify(); - }); - }; - value.attach((v, set) => { - latestValue = v; - latestSetter = (latest) => set(parseValue(latest, unit)); - frame.postRender(scheduleAnimation); - }, stopAnimation); - if (isMotionValue(source)) { - let skipNextAnimation = options.skipInitialAnimation === true; - const removeSourceOnChange = source.on("change", (v) => { - if (skipNextAnimation) { - skipNextAnimation = false; - value.jump(parseValue(v, unit), false); - } - else { - value.set(parseValue(v, unit)); - } - }); - const removeValueOnDestroy = value.on("destroy", removeSourceOnChange); - return () => { - removeSourceOnChange(); - removeValueOnDestroy(); - }; - } - return stopAnimation; - } - function parseValue(v, unit) { - return unit ? v + unit : v; - } - function asNumber$1(v) { - return typeof v === "number" ? v : parseFloat(v); - } - - function subscribeValue(inputValues, outputValue, getLatest) { - const update = () => outputValue.set(getLatest()); - const scheduleUpdate = () => frame.preRender(update, false, true); - const subscriptions = inputValues.map((v) => v.on("change", scheduleUpdate)); - outputValue.on("destroy", () => { - subscriptions.forEach((unsubscribe) => unsubscribe()); - cancelFrame(update); - }); - } - - /** - * Create a `MotionValue` that transforms the output of other `MotionValue`s by - * passing their latest values through a transform function. - * - * Whenever a `MotionValue` referred to in the provided function is updated, - * it will be re-evaluated. - * - * ```jsx - * const x = motionValue(0) - * const y = transformValue(() => x.get() * 2) // double x - * ``` - * - * @param transformer - A transform function. This function must be pure with no side-effects or conditional statements. - * @returns `MotionValue` - * - * @public - */ - function transformValue(transform) { - const collectedValues = []; - /** - * Open session of collectMotionValues. Any MotionValue that calls get() - * inside transform will be saved into this array. - */ - collectMotionValues.current = collectedValues; - const initialValue = transform(); - collectMotionValues.current = undefined; - const value = motionValue(initialValue); - subscribeValue(collectedValues, value, transform); - return value; - } - - /** - * Create a `MotionValue` that maps the output of another `MotionValue` by - * mapping it from one range of values into another. - * - * @remarks - * - * Given an input range of `[-200, -100, 100, 200]` and an output range of - * `[0, 1, 1, 0]`, the returned `MotionValue` will: - * - * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`. - * - When provided a value between `-100` and `100`, will return `1`. - * - When provided a value between `100` and `200`, will return a value between `1` and `0` - * - * The input range must be a linear series of numbers. The output range - * can be any value type supported by Motion: numbers, colors, shadows, etc. - * - * Every value in the output range must be of the same type and in the same format. - * - * ```jsx - * const x = motionValue(0) - * const xRange = [-200, -100, 100, 200] - * const opacityRange = [0, 1, 1, 0] - * const opacity = mapValue(x, xRange, opacityRange) - * ``` - * - * @param inputValue - `MotionValue` - * @param inputRange - A linear series of numbers (either all increasing or decreasing) - * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`. - * @param options - - * - * - clamp: boolean. Clamp values to within the given range. Defaults to `true` - * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each. - * - * @returns `MotionValue` - * - * @public - */ - function mapValue(inputValue, inputRange, outputRange, options) { - const map = transform(inputRange, outputRange, options); - return transformValue(() => map(inputValue.get())); - } - - /** - * Create a `MotionValue` that animates to its latest value using a spring. - * Can either be a value or track another `MotionValue`. - * - * ```jsx - * const x = motionValue(0) - * const y = springValue(x, { stiffness: 300 }) - * ``` - * - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns `MotionValue` - * - * @public - */ - function springValue(source, options) { - return followValue(source, { type: "spring", ...options }); - } - /** - * Attach a spring animation to a MotionValue that will animate whenever the value changes. - * - * @param value - The MotionValue to animate - * @param source - Initial value or MotionValue to track - * @param options - Spring configuration options - * @returns Cleanup function - * - * @public - */ - function attachSpring(value, source, options) { - return attachFollow(value, source, { type: "spring", ...options }); - } - - /** - * A list of all ValueTypes - */ - const valueTypes = [...dimensionValueTypes, color, complex]; - /** - * Tests a value against the list of ValueTypes - */ - const findValueType = (v) => valueTypes.find(testValueType(v)); - - function chooseLayerType(valueName) { - if (valueName === "layout") - return "group"; - if (valueName === "enter" || valueName === "new") - return "new"; - if (valueName === "exit" || valueName === "old") - return "old"; - return "group"; - } - - let pendingRules = {}; - let style = null; - const css = { - set: (selector, values) => { - pendingRules[selector] = values; - }, - commit: () => { - if (!style) { - style = document.createElement("style"); - style.id = "motion-view"; - } - let cssText = ""; - for (const selector in pendingRules) { - const rule = pendingRules[selector]; - cssText += `${selector} {\n`; - for (const [property, value] of Object.entries(rule)) { - cssText += ` ${property}: ${value};\n`; - } - cssText += "}\n"; - } - style.textContent = cssText; - document.head.appendChild(style); - pendingRules = {}; - }, - remove: () => { - if (style && style.parentElement) { - style.parentElement.removeChild(style); - } - }, - }; - - function getViewAnimationLayerInfo(pseudoElement) { - const match = pseudoElement.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/); - if (!match) - return null; - return { layer: match[2], type: match[1] }; - } - - function filterViewAnimations(animation) { - const { effect } = animation; - if (!effect) - return false; - return (effect.target === document.documentElement && - effect.pseudoElement?.startsWith("::view-transition")); - } - function getViewAnimations() { - return document.getAnimations().filter(filterViewAnimations); - } - - function hasTarget(target, targets) { - return targets.has(target) && Object.keys(targets.get(target)).length > 0; - } - - const definitionNames = ["layout", "enter", "exit", "new", "old"]; - function startViewAnimation(builder) { - const { update, targets, options: defaultOptions } = builder; - if (!document.startViewTransition) { - return new Promise(async (resolve) => { - await update(); - resolve(new GroupAnimation([])); - }); - } - // TODO: Go over existing targets and ensure they all have ids - /** - * If we don't have any animations defined for the root target, - * remove it from being captured. - */ - if (!hasTarget("root", targets)) { - css.set(":root", { - "view-transition-name": "none", - }); - } - /** - * Set the timing curve to linear for all view transition layers. - * This gets baked into the keyframes, which can't be changed - * without breaking the generated animation. - * - * This allows us to set easing via updateTiming - which can be changed. - */ - css.set("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)", { "animation-timing-function": "linear !important" }); - css.commit(); // Write - const transition = document.startViewTransition(async () => { - await update(); - // TODO: Go over new targets and ensure they all have ids - }); - transition.finished.finally(() => { - css.remove(); // Write - }); - return new Promise((resolve) => { - transition.ready.then(() => { - const generatedViewAnimations = getViewAnimations(); - const animations = []; - /** - * Create animations for each of our explicitly-defined subjects. - */ - targets.forEach((definition, target) => { - // TODO: If target is not "root", resolve elements - // and iterate over each - for (const key of definitionNames) { - if (!definition[key]) - continue; - const { keyframes, options } = definition[key]; - for (let [valueName, valueKeyframes] of Object.entries(keyframes)) { - if (!valueKeyframes) - continue; - const valueOptions = { - ...getValueTransition$1(defaultOptions, valueName), - ...getValueTransition$1(options, valueName), - }; - const type = chooseLayerType(key); - /** - * If this is an opacity animation, and keyframes are not an array, - * we need to convert them into an array and set an initial value. - */ - if (valueName === "opacity" && - !Array.isArray(valueKeyframes)) { - const initialValue = type === "new" ? 0 : 1; - valueKeyframes = [initialValue, valueKeyframes]; - } - /** - * Resolve stagger function if provided. - */ - if (typeof valueOptions.delay === "function") { - valueOptions.delay = valueOptions.delay(0, 1); - } - valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay)); - const animation = new NativeAnimation({ - ...valueOptions, - element: document.documentElement, - name: valueName, - pseudoElement: `::view-transition-${type}(${target})`, - keyframes: valueKeyframes, - }); - animations.push(animation); - } - } - }); - /** - * Handle browser generated animations - */ - for (const animation of generatedViewAnimations) { - if (animation.playState === "finished") - continue; - const { effect } = animation; - if (!effect || !(effect instanceof KeyframeEffect)) - continue; - const { pseudoElement } = effect; - if (!pseudoElement) - continue; - const name = getViewAnimationLayerInfo(pseudoElement); - if (!name) - continue; - const targetDefinition = targets.get(name.layer); - if (!targetDefinition) { - /** - * If transition name is group then update the timing of the animation - * whereas if it's old or new then we could possibly replace it using - * the above method. - */ - const transitionName = name.type === "group" ? "layout" : ""; - let animationTransition = { - ...getValueTransition$1(defaultOptions, transitionName), - }; - animationTransition.duration && (animationTransition.duration = secondsToMilliseconds(animationTransition.duration)); - animationTransition = - applyGeneratorOptions(animationTransition); - const easing = mapEasingToNativeEasing(animationTransition.ease, animationTransition.duration); - effect.updateTiming({ - delay: secondsToMilliseconds(animationTransition.delay ?? 0), - duration: animationTransition.duration, - easing, - }); - animations.push(new NativeAnimationWrapper(animation)); - } - else if (hasOpacity(targetDefinition, "enter") && - hasOpacity(targetDefinition, "exit") && - effect - .getKeyframes() - .some((keyframe) => keyframe.mixBlendMode)) { - animations.push(new NativeAnimationWrapper(animation)); - } - else { - animation.cancel(); - } - } - resolve(new GroupAnimation(animations)); - }); - }); - } - function hasOpacity(target, key) { - return target?.[key]?.keyframes.opacity; - } - - let builders = []; - let current = null; - function next() { - current = null; - const [nextBuilder] = builders; - if (nextBuilder) - start(nextBuilder); - } - function start(builder) { - removeItem(builders, builder); - current = builder; - startViewAnimation(builder).then((animation) => { - builder.notifyReady(animation); - animation.finished.finally(next); - }); - } - function processQueue() { - /** - * Iterate backwards over the builders array. We can ignore the - * "wait" animations. If we have an interrupting animation in the - * queue then we need to batch all preceeding animations into it. - * Currently this only batches the update functions but will also - * need to batch the targets. - */ - for (let i = builders.length - 1; i >= 0; i--) { - const builder = builders[i]; - const { interrupt } = builder.options; - if (interrupt === "immediate") { - const batchedUpdates = builders.slice(0, i + 1).map((b) => b.update); - const remaining = builders.slice(i + 1); - builder.update = () => { - batchedUpdates.forEach((update) => update()); - }; - // Put the current builder at the front, followed by any "wait" builders - builders = [builder, ...remaining]; - break; - } - } - if (!current || builders[0]?.options.interrupt === "immediate") { - next(); - } - } - function addToQueue(builder) { - builders.push(builder); - microtask.render(processQueue); - } - - class ViewTransitionBuilder { - constructor(update, options = {}) { - this.currentSubject = "root"; - this.targets = new Map(); - this.notifyReady = noop$1; - this.readyPromise = new Promise((resolve) => { - this.notifyReady = resolve; - }); - this.update = update; - this.options = { - interrupt: "wait", - ...options, - }; - addToQueue(this); - } - get(subject) { - this.currentSubject = subject; - return this; - } - layout(keyframes, options) { - this.updateTarget("layout", keyframes, options); - return this; - } - new(keyframes, options) { - this.updateTarget("new", keyframes, options); - return this; - } - old(keyframes, options) { - this.updateTarget("old", keyframes, options); - return this; - } - enter(keyframes, options) { - this.updateTarget("enter", keyframes, options); - return this; - } - exit(keyframes, options) { - this.updateTarget("exit", keyframes, options); - return this; - } - crossfade(options) { - this.updateTarget("enter", { opacity: 1 }, options); - this.updateTarget("exit", { opacity: 0 }, options); - return this; - } - updateTarget(target, keyframes, options = {}) { - const { currentSubject, targets } = this; - if (!targets.has(currentSubject)) { - targets.set(currentSubject, {}); - } - const targetData = targets.get(currentSubject); - targetData[target] = { keyframes, options }; - } - then(resolve, reject) { - return this.readyPromise.then(resolve, reject); - } - } - function animateView(update, defaultOptions = {}) { - return new ViewTransitionBuilder(update, defaultOptions); - } - - const createAxisDelta = () => ({ - translate: 0, - scale: 1, - origin: 0, - originPoint: 0, - }); - const createDelta = () => ({ - x: createAxisDelta(), - y: createAxisDelta(), - }); - const createAxis = () => ({ min: 0, max: 0 }); - const createBox = () => ({ - x: createAxis(), - y: createAxis(), - }); - - const visualElementStore = new WeakMap(); - - function isAnimationControls(v) { - return (v !== null && - typeof v === "object" && - typeof v.start === "function"); - } - - /** - * Decides if the supplied variable is variant label - */ - function isVariantLabel(v) { - return typeof v === "string" || Array.isArray(v); - } - - const variantPriorityOrder = [ - "animate", - "whileInView", - "whileFocus", - "whileHover", - "whileTap", - "whileDrag", - "exit", - ]; - const variantProps = ["initial", ...variantPriorityOrder]; - - function isControllingVariants(props) { - return (isAnimationControls(props.animate) || - variantProps.some((name) => isVariantLabel(props[name]))); - } - function isVariantNode(props) { - return Boolean(isControllingVariants(props) || props.variants); - } - - /** - * Updates motion values from props changes. - * Uses `any` type for element to avoid circular dependencies with VisualElement. - */ - function updateMotionValuesFromProps(element, next, prev) { - for (const key in next) { - const nextValue = next[key]; - const prevValue = prev[key]; - if (isMotionValue(nextValue)) { - /** - * If this is a motion value found in props or style, we want to add it - * to our visual element's motion value map. - */ - element.addValue(key, nextValue); - } - else if (isMotionValue(prevValue)) { - /** - * If we're swapping from a motion value to a static value, - * create a new motion value from that - */ - element.addValue(key, motionValue(nextValue, { owner: element })); - } - else if (prevValue !== nextValue) { - /** - * If this is a flat value that has changed, update the motion value - * or create one if it doesn't exist. We only want to do this if we're - * not handling the value with our animation state. - */ - if (element.hasValue(key)) { - const existingValue = element.getValue(key); - if (existingValue.liveStyle === true) { - existingValue.jump(nextValue); - } - else if (!existingValue.hasAnimated) { - existingValue.set(nextValue); - } - } - else { - const latestValue = element.getStaticValue(key); - element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element })); - } - } - } - // Handle removed values - for (const key in prev) { - if (next[key] === undefined) - element.removeValue(key); - } - return next; - } - - // Does this device prefer reduced motion? Returns `null` server-side. - const prefersReducedMotion = { current: null }; - const hasReducedMotionListener = { current: false }; - - const isBrowser = typeof window !== "undefined"; - function initPrefersReducedMotion() { - hasReducedMotionListener.current = true; - if (!isBrowser) - return; - if (window.matchMedia) { - const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)"); - const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches); - motionMediaQuery.addEventListener("change", setReducedMotionPreferences); - setReducedMotionPreferences(); - } - else { - prefersReducedMotion.current = false; - } - } - - const propEventHandlers = [ - "AnimationStart", - "AnimationComplete", - "Update", - "BeforeLayoutMeasure", - "LayoutMeasure", - "LayoutAnimationStart", - "LayoutAnimationComplete", - ]; - /** - * Static feature definitions - can be injected by framework layer - */ - let featureDefinitions = {}; - /** - * Set feature definitions for all VisualElements. - * This should be called by the framework layer (e.g., framer-motion) during initialization. - */ - function setFeatureDefinitions(definitions) { - featureDefinitions = definitions; - } - /** - * Get the current feature definitions - */ - function getFeatureDefinitions() { - return featureDefinitions; - } - /** - * A VisualElement is an imperative abstraction around UI elements such as - * HTMLElement, SVGElement, Three.Object3D etc. - */ - class VisualElement { - /** - * This method takes React props and returns found MotionValues. For example, HTML - * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays. - * - * This isn't an abstract method as it needs calling in the constructor, but it is - * intended to be one. - */ - scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) { - return {}; - } - constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) { - /** - * A reference to the current underlying Instance, e.g. a HTMLElement - * or Three.Mesh etc. - */ - this.current = null; - /** - * A set containing references to this VisualElement's children. - */ - this.children = new Set(); - /** - * Determine what role this visual element should take in the variant tree. - */ - this.isVariantNode = false; - this.isControllingVariants = false; - /** - * Decides whether this VisualElement should animate in reduced motion - * mode. - * - * TODO: This is currently set on every individual VisualElement but feels - * like it could be set globally. - */ - this.shouldReduceMotion = null; - /** - * Decides whether animations should be skipped for this VisualElement. - * Useful for E2E tests and visual regression testing. - */ - this.shouldSkipAnimations = false; - /** - * A map of all motion values attached to this visual element. Motion - * values are source of truth for any given animated value. A motion - * value might be provided externally by the component via props. - */ - this.values = new Map(); - this.KeyframeResolver = KeyframeResolver; - /** - * Cleanup functions for active features (hover/tap/exit etc) - */ - this.features = {}; - /** - * A map of every subscription that binds the provided or generated - * motion values onChange listeners to this visual element. - */ - this.valueSubscriptions = new Map(); - /** - * A reference to the previously-provided motion values as returned - * from scrapeMotionValuesFromProps. We use the keys in here to determine - * if any motion values need to be removed after props are updated. - */ - this.prevMotionValues = {}; - /** - * Track whether this element has been mounted before, to detect - * remounts after Suspense unmount/remount cycles. - */ - this.hasBeenMounted = false; - /** - * An object containing a SubscriptionManager for each active event. - */ - this.events = {}; - /** - * An object containing an unsubscribe function for each prop event subscription. - * For example, every "Update" event can have multiple subscribers via - * VisualElement.on(), but only one of those can be defined via the onUpdate prop. - */ - this.propEventSubscriptions = {}; - this.notifyUpdate = () => this.notify("Update", this.latestValues); - this.render = () => { - if (!this.current) - return; - this.triggerBuild(); - this.renderInstance(this.current, this.renderState, this.props.style, this.projection); - }; - this.renderScheduledAt = 0.0; - this.scheduleRender = () => { - const now = time.now(); - if (this.renderScheduledAt < now) { - this.renderScheduledAt = now; - frame.render(this.render, false, true); - } - }; - const { latestValues, renderState } = visualState; - this.latestValues = latestValues; - this.baseTarget = { ...latestValues }; - this.initialValues = props.initial ? { ...latestValues } : {}; - this.renderState = renderState; - this.parent = parent; - this.props = props; - this.presenceContext = presenceContext; - this.depth = parent ? parent.depth + 1 : 0; - this.reducedMotionConfig = reducedMotionConfig; - this.skipAnimationsConfig = skipAnimations; - this.options = options; - this.blockInitialAnimation = Boolean(blockInitialAnimation); - this.isControllingVariants = isControllingVariants(props); - this.isVariantNode = isVariantNode(props); - if (this.isVariantNode) { - this.variantChildren = new Set(); - } - this.manuallyAnimateOnMount = Boolean(parent && parent.current); - /** - * Any motion values that are provided to the element when created - * aren't yet bound to the element, as this would technically be impure. - * However, we iterate through the motion values and set them to the - * initial values for this component. - * - * TODO: This is impure and we should look at changing this to run on mount. - * Doing so will break some tests but this isn't necessarily a breaking change, - * more a reflection of the test. - */ - const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this); - for (const key in initialMotionValues) { - const value = initialMotionValues[key]; - if (latestValues[key] !== undefined && isMotionValue(value)) { - value.set(latestValues[key]); - } - } - } - mount(instance) { - /** - * If this element has been mounted before (e.g. after a Suspense - * unmount/remount), reset motion values to their initial state - * so animations replay correctly from initial → animate. - */ - if (this.hasBeenMounted) { - for (const key in this.initialValues) { - this.values.get(key)?.jump(this.initialValues[key]); - this.latestValues[key] = this.initialValues[key]; - } - } - this.current = instance; - visualElementStore.set(instance, this); - if (this.projection && !this.projection.instance) { - this.projection.mount(instance); - } - if (this.parent && this.isVariantNode && !this.isControllingVariants) { - this.removeFromVariantTree = this.parent.addVariantChild(this); - } - this.values.forEach((value, key) => this.bindToMotionValue(key, value)); - /** - * Determine reduced motion preference. Only initialize the matchMedia - * listener if we actually need the dynamic value (i.e., when config - * is neither "never" nor "always"). - */ - if (this.reducedMotionConfig === "never") { - this.shouldReduceMotion = false; - } - else if (this.reducedMotionConfig === "always") { - this.shouldReduceMotion = true; - } - else { - if (!hasReducedMotionListener.current) { - initPrefersReducedMotion(); - } - this.shouldReduceMotion = prefersReducedMotion.current; - } - { - warnOnce(this.shouldReduceMotion !== true, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"); - } - /** - * Set whether animations should be skipped based on the config. - */ - this.shouldSkipAnimations = this.skipAnimationsConfig ?? false; - this.parent?.addChild(this); - this.update(this.props, this.presenceContext); - this.hasBeenMounted = true; - } - unmount() { - this.projection && this.projection.unmount(); - cancelFrame(this.notifyUpdate); - cancelFrame(this.render); - this.valueSubscriptions.forEach((remove) => remove()); - this.valueSubscriptions.clear(); - this.removeFromVariantTree && this.removeFromVariantTree(); - this.parent?.removeChild(this); - for (const key in this.events) { - this.events[key].clear(); - } - for (const key in this.features) { - const feature = this.features[key]; - if (feature) { - feature.unmount(); - feature.isMounted = false; - } - } - this.current = null; - } - addChild(child) { - this.children.add(child); - this.enteringChildren ?? (this.enteringChildren = new Set()); - this.enteringChildren.add(child); - } - removeChild(child) { - this.children.delete(child); - this.enteringChildren && this.enteringChildren.delete(child); - } - bindToMotionValue(key, value) { - if (this.valueSubscriptions.has(key)) { - this.valueSubscriptions.get(key)(); - } - if (value.accelerate && - acceleratedValues.has(key) && - this.current instanceof HTMLElement) { - const { factory, keyframes, times, ease, duration } = value.accelerate; - const animation = new NativeAnimation({ - element: this.current, - name: key, - keyframes, - times, - ease, - duration: secondsToMilliseconds(duration), - }); - const cleanup = factory(animation); - this.valueSubscriptions.set(key, () => { - cleanup(); - animation.cancel(); - }); - return; - } - const valueIsTransform = transformProps.has(key); - if (valueIsTransform && this.onBindTransform) { - this.onBindTransform(); - } - const removeOnChange = value.on("change", (latestValue) => { - this.latestValues[key] = latestValue; - this.props.onUpdate && frame.preRender(this.notifyUpdate); - if (valueIsTransform && this.projection) { - this.projection.isTransformDirty = true; - } - this.scheduleRender(); - }); - let removeSyncCheck; - if (typeof window !== "undefined" && - window.MotionCheckAppearSync) { - removeSyncCheck = window.MotionCheckAppearSync(this, key, value); - } - this.valueSubscriptions.set(key, () => { - removeOnChange(); - if (removeSyncCheck) - removeSyncCheck(); - // Defer to MotionValue.on("change") auto-stop so React 19 remounts - // can resubscribe before the animation is cancelled (#3315). - }); - } - sortNodePosition(other) { - /** - * If these nodes aren't even of the same type we can't compare their depth. - */ - if (!this.current || - !this.sortInstanceNodePosition || - this.type !== other.type) { - return 0; - } - return this.sortInstanceNodePosition(this.current, other.current); - } - updateFeatures() { - let key = "animation"; - for (key in featureDefinitions) { - const featureDefinition = featureDefinitions[key]; - if (!featureDefinition) - continue; - const { isEnabled, Feature: FeatureConstructor } = featureDefinition; - /** - * If this feature is enabled but not active, make a new instance. - */ - if (!this.features[key] && - FeatureConstructor && - isEnabled(this.props)) { - this.features[key] = new FeatureConstructor(this); - } - /** - * If we have a feature, mount or update it. - */ - if (this.features[key]) { - const feature = this.features[key]; - if (feature.isMounted) { - feature.update(); - } - else { - feature.mount(); - feature.isMounted = true; - } - } - } - } - triggerBuild() { - this.build(this.renderState, this.latestValues, this.props); - } - /** - * Measure the current viewport box with or without transforms. - * Only measures axis-aligned boxes, rotate and skew must be manually - * removed with a re-render to work. - */ - measureViewportBox() { - return this.current - ? this.measureInstanceViewportBox(this.current, this.props) - : createBox(); - } - getStaticValue(key) { - return this.latestValues[key]; - } - setStaticValue(key, value) { - this.latestValues[key] = value; - } - /** - * Update the provided props. Ensure any newly-added motion values are - * added to our map, old ones removed, and listeners updated. - */ - update(props, presenceContext) { - if (props.transformTemplate || this.props.transformTemplate) { - this.scheduleRender(); - } - this.prevProps = this.props; - this.props = props; - this.prevPresenceContext = this.presenceContext; - this.presenceContext = presenceContext; - /** - * Update prop event handlers ie onAnimationStart, onAnimationComplete - */ - for (let i = 0; i < propEventHandlers.length; i++) { - const key = propEventHandlers[i]; - if (this.propEventSubscriptions[key]) { - this.propEventSubscriptions[key](); - delete this.propEventSubscriptions[key]; - } - const listenerName = ("on" + key); - const listener = props[listenerName]; - if (listener) { - this.propEventSubscriptions[key] = this.on(key, listener); - } - } - this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues); - if (this.handleChildMotionValue) { - this.handleChildMotionValue(); - } - } - getProps() { - return this.props; - } - /** - * Returns the variant definition with a given name. - */ - getVariant(name) { - return this.props.variants ? this.props.variants[name] : undefined; - } - /** - * Returns the defined default transition on this component. - */ - getDefaultTransition() { - return this.props.transition; - } - getTransformPagePoint() { - return this.props.transformPagePoint; - } - getClosestVariantNode() { - return this.isVariantNode - ? this - : this.parent - ? this.parent.getClosestVariantNode() - : undefined; - } - /** - * Add a child visual element to our set of children. - */ - addVariantChild(child) { - const closestVariantNode = this.getClosestVariantNode(); - if (closestVariantNode) { - closestVariantNode.variantChildren && - closestVariantNode.variantChildren.add(child); - return () => closestVariantNode.variantChildren.delete(child); - } - } - /** - * Add a motion value and bind it to this visual element. - */ - addValue(key, value) { - // Remove existing value if it exists - const existingValue = this.values.get(key); - if (value !== existingValue) { - if (existingValue) - this.removeValue(key); - this.bindToMotionValue(key, value); - this.values.set(key, value); - this.latestValues[key] = value.get(); - } - } - /** - * Remove a motion value and unbind any active subscriptions. - */ - removeValue(key) { - this.values.delete(key); - const unsubscribe = this.valueSubscriptions.get(key); - if (unsubscribe) { - unsubscribe(); - this.valueSubscriptions.delete(key); - } - delete this.latestValues[key]; - this.removeValueFromRenderState(key, this.renderState); - } - /** - * Check whether we have a motion value for this key - */ - hasValue(key) { - return this.values.has(key); - } - getValue(key, defaultValue) { - if (this.props.values && this.props.values[key]) { - return this.props.values[key]; - } - let value = this.values.get(key); - if (value === undefined && defaultValue !== undefined) { - value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this }); - this.addValue(key, value); - } - return value; - } - /** - * If we're trying to animate to a previously unencountered value, - * we need to check for it in our state and as a last resort read it - * directly from the instance (which might have performance implications). - */ - readValue(key, target) { - let value = this.latestValues[key] !== undefined || !this.current - ? this.latestValues[key] - : this.getBaseTargetFromProps(this.props, key) ?? - this.readValueFromInstance(this.current, key, this.options); - if (value !== undefined && value !== null) { - if (typeof value === "string" && - (isNumericalString(value) || isZeroValueString(value))) { - // If this is a number read as a string, ie "0" or "200", convert it to a number - value = parseFloat(value); - } - else if (!findValueType(value) && complex.test(target)) { - value = getAnimatableNone(key, target); - } - this.setBaseTarget(key, isMotionValue(value) ? value.get() : value); - } - return isMotionValue(value) ? value.get() : value; - } - /** - * Set the base target to later animate back to. This is currently - * only hydrated on creation and when we first read a value. - */ - setBaseTarget(key, value) { - this.baseTarget[key] = value; - } - /** - * Find the base target for a value thats been removed from all animation - * props. - */ - getBaseTarget(key) { - const { initial } = this.props; - let valueFromInitial; - if (typeof initial === "string" || typeof initial === "object") { - const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom); - if (variant) { - valueFromInitial = variant[key]; - } - } - /** - * If this value still exists in the current initial variant, read that. - */ - if (initial && valueFromInitial !== undefined) { - return valueFromInitial; - } - /** - * Alternatively, if this VisualElement config has defined a getBaseTarget - * so we can read the value from an alternative source, try that. - */ - const target = this.getBaseTargetFromProps(this.props, key); - if (target !== undefined && !isMotionValue(target)) - return target; - /** - * If the value was initially defined on initial, but it doesn't any more, - * return undefined. Otherwise return the value as initially read from the DOM. - */ - return this.initialValues[key] !== undefined && - valueFromInitial === undefined - ? undefined - : this.baseTarget[key]; - } - on(eventName, callback) { - if (!this.events[eventName]) { - this.events[eventName] = new SubscriptionManager(); - } - return this.events[eventName].add(callback); - } - notify(eventName, ...args) { - if (this.events[eventName]) { - this.events[eventName].notify(...args); - } - } - scheduleRenderMicrotask() { - microtask.render(this.render); - } - } - - class DOMVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.KeyframeResolver = DOMKeyframesResolver; - } - sortInstanceNodePosition(a, b) { - /** - * compareDocumentPosition returns a bitmask, by using the bitwise & - * we're returning true if 2 in that bitmask is set to true. 2 is set - * to true if b preceeds a. - */ - return a.compareDocumentPosition(b) & 2 ? 1 : -1; - } - getBaseTargetFromProps(props, key) { - const style = props.style; - return style ? style[key] : undefined; - } - removeValueFromRenderState(key, { vars, style }) { - delete vars[key]; - delete style[key]; - } - handleChildMotionValue() { - if (this.childSubscription) { - this.childSubscription(); - delete this.childSubscription; - } - const { children } = this.props; - if (isMotionValue(children)) { - this.childSubscription = children.on("change", (latest) => { - if (this.current) { - this.current.textContent = `${latest}`; - } - }); - } - } - } - - /** - * Feature base class for extending VisualElement functionality. - * Features are plugins that can be mounted/unmounted to add behavior - * like gestures, animations, or layout tracking. - */ - class Feature { - constructor(node) { - this.isMounted = false; - this.node = node; - } - update() { } - } - - /** - * Bounding boxes tend to be defined as top, left, right, bottom. For various operations - * it's easier to consider each axis individually. This function returns a bounding box - * as a map of single-axis min/max values. - */ - function convertBoundingBoxToBox({ top, left, right, bottom, }) { - return { - x: { min: left, max: right }, - y: { min: top, max: bottom }, - }; - } - function convertBoxToBoundingBox({ x, y }) { - return { top: y.min, right: x.max, bottom: y.max, left: x.min }; - } - /** - * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function - * provided by Framer to allow measured points to be corrected for device scaling. This is used - * when measuring DOM elements and DOM event points. - */ - function transformBoxPoints(point, transformPoint) { - if (!transformPoint) - return point; - const topLeft = transformPoint({ x: point.left, y: point.top }); - const bottomRight = transformPoint({ x: point.right, y: point.bottom }); - return { - top: topLeft.y, - left: topLeft.x, - bottom: bottomRight.y, - right: bottomRight.x, - }; - } - - function isIdentityScale(scale) { - return scale === undefined || scale === 1; - } - function hasScale({ scale, scaleX, scaleY }) { - return (!isIdentityScale(scale) || - !isIdentityScale(scaleX) || - !isIdentityScale(scaleY)); - } - function hasTransform(values) { - return (hasScale(values) || - has2DTranslate(values) || - values.z || - values.rotate || - values.rotateX || - values.rotateY || - values.skewX || - values.skewY); - } - function has2DTranslate(values) { - return is2DTranslate(values.x) || is2DTranslate(values.y); - } - function is2DTranslate(value) { - return value && value !== "0%"; - } - - /** - * Scales a point based on a factor and an originPoint - */ - function scalePoint(point, scale, originPoint) { - const distanceFromOrigin = point - originPoint; - const scaled = scale * distanceFromOrigin; - return originPoint + scaled; - } - /** - * Applies a translate/scale delta to a point - */ - function applyPointDelta(point, translate, scale, originPoint, boxScale) { - if (boxScale !== undefined) { - point = scalePoint(point, boxScale, originPoint); - } - return scalePoint(point, scale, originPoint) + translate; - } - /** - * Applies a translate/scale delta to an axis - */ - function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) { - axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale); - axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale); - } - /** - * Applies a translate/scale delta to a box - */ - function applyBoxDelta(box, { x, y }) { - applyAxisDelta(box.x, x.translate, x.scale, x.originPoint); - applyAxisDelta(box.y, y.translate, y.scale, y.originPoint); - } - const TREE_SCALE_SNAP_MIN = 0.999999999999; - const TREE_SCALE_SNAP_MAX = 1.0000000000001; - /** - * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms - * in a tree upon our box before then calculating how to project it into our desired viewport-relative box - * - * This is the final nested loop within updateLayoutDelta for future refactoring - */ - function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) { - const treeLength = treePath.length; - if (!treeLength) - return; - // Reset the treeScale - treeScale.x = treeScale.y = 1; - let node; - let delta; - for (let i = 0; i < treeLength; i++) { - node = treePath[i]; - delta = node.projectionDelta; - /** - * TODO: Prefer to remove this, but currently we have motion components with - * display: contents in Framer. - */ - const { visualElement } = node.options; - if (visualElement && - visualElement.props.style && - visualElement.props.style.display === "contents") { - continue; - } - if (isSharedTransition && - node.options.layoutScroll && - node.scroll && - node !== node.root) { - translateAxis(box.x, -node.scroll.offset.x); - translateAxis(box.y, -node.scroll.offset.y); - } - if (delta) { - // Incoporate each ancestor's scale into a cumulative treeScale for this component - treeScale.x *= delta.x.scale; - treeScale.y *= delta.y.scale; - // Apply each ancestor's calculated delta into this component's recorded layout box - applyBoxDelta(box, delta); - } - if (isSharedTransition && hasTransform(node.latestValues)) { - transformBox(box, node.latestValues, node.layout?.layoutBox); - } - } - /** - * Snap tree scale back to 1 if it's within a non-perceivable threshold. - * This will help reduce useless scales getting rendered. - */ - if (treeScale.x < TREE_SCALE_SNAP_MAX && - treeScale.x > TREE_SCALE_SNAP_MIN) { - treeScale.x = 1.0; - } - if (treeScale.y < TREE_SCALE_SNAP_MAX && - treeScale.y > TREE_SCALE_SNAP_MIN) { - treeScale.y = 1.0; - } - } - function translateAxis(axis, distance) { - axis.min += distance; - axis.max += distance; - } - /** - * Apply a transform to an axis from the latest resolved motion values. - * This function basically acts as a bridge between a flat motion value map - * and applyAxisDelta - */ - function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) { - const originPoint = mixNumber$1(axis.min, axis.max, axisOrigin); - // Apply the axis delta to the final axis - applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale); - } - function resolveAxisTranslate(value, axis) { - if (typeof value === "string") { - return (parseFloat(value) / 100) * (axis.max - axis.min); - } - return value; - } - /** - * Apply a transform to a box from the latest resolved motion values. - */ - function transformBox(box, transform, sourceBox) { - const resolveBox = sourceBox ?? box; - transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX); - transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY); - } - - function measureViewportBox(instance, transformPoint) { - return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint)); - } - function measurePageBox(element, rootProjectionNode, transformPagePoint) { - const viewportBox = measureViewportBox(element, transformPagePoint); - const { scroll } = rootProjectionNode; - if (scroll) { - translateAxis(viewportBox.x, scroll.offset.x); - translateAxis(viewportBox.y, scroll.offset.y); - } - return viewportBox; - } - - const translateAlias = { - x: "translateX", - y: "translateY", - z: "translateZ", - transformPerspective: "perspective", - }; - const numTransforms = transformPropOrder.length; - /** - * Build a CSS transform style from individual x/y/scale etc properties. - * - * This outputs with a default order of transforms/scales/rotations, this can be customised by - * providing a transformTemplate function. - */ - function buildTransform(latestValues, transform, transformTemplate) { - // The transform string we're going to build into. - let transformString = ""; - let transformIsDefault = true; - /** - * Loop over all possible transforms in order, adding the ones that - * are present to the transform string. - */ - for (let i = 0; i < numTransforms; i++) { - const key = transformPropOrder[i]; - const value = latestValues[key]; - if (value === undefined) - continue; - let valueIsDefault = true; - if (typeof value === "number") { - valueIsDefault = value === (key.startsWith("scale") ? 1 : 0); - } - else { - const parsed = parseFloat(value); - valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0; - } - if (!valueIsDefault || transformTemplate) { - const valueAsType = getValueAsType(value, numberValueTypes[key]); - if (!valueIsDefault) { - transformIsDefault = false; - const transformName = translateAlias[key] || key; - transformString += `${transformName}(${valueAsType}) `; - } - if (transformTemplate) { - transform[key] = valueAsType; - } - } - } - // `pathRotation` composes onto `rotate` as a separate additive term so - // the user's `rotate` is never clobbered. Deliberately not a slot in - // `transformPropOrder`. - const pathRotation = latestValues.pathRotation; - if (pathRotation) { - transformIsDefault = false; - transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `; - } - transformString = transformString.trim(); - // If we have a custom `transform` template, pass our transform values and - // generated transformString to that before returning - if (transformTemplate) { - transformString = transformTemplate(transform, transformIsDefault ? "" : transformString); - } - else if (transformIsDefault) { - transformString = "none"; - } - return transformString; - } - - function buildHTMLStyles(state, latestValues, transformTemplate) { - const { style, vars, transformOrigin } = state; - // Track whether we encounter any transform or transformOrigin values. - let hasTransform = false; - let hasTransformOrigin = false; - /** - * Loop over all our latest animated values and decide whether to handle them - * as a style or CSS variable. - * - * Transforms and transform origins are kept separately for further processing. - */ - for (const key in latestValues) { - const value = latestValues[key]; - if (transformProps.has(key)) { - // If this is a transform, flag to enable further transform processing - hasTransform = true; - continue; - } - else if (isCSSVariableName(key)) { - vars[key] = value; - continue; - } - else { - // Convert the value to its default value type, ie 0 -> "0px" - const valueAsType = getValueAsType(value, numberValueTypes[key]); - if (key.startsWith("origin")) { - // If this is a transform origin, flag and enable further transform-origin processing - hasTransformOrigin = true; - transformOrigin[key] = - valueAsType; - } - else { - style[key] = valueAsType; - } - } - } - if (!latestValues.transform) { - if (hasTransform || transformTemplate) { - style.transform = buildTransform(latestValues, state.transform, transformTemplate); - } - else if (style.transform) { - /** - * If we have previously created a transform but currently don't have any, - * reset transform style to none. - */ - style.transform = "none"; - } - } - /** - * Build a transformOrigin style. Uses the same defaults as the browser for - * undefined origins. - */ - if (hasTransformOrigin) { - const { originX = "50%", originY = "50%", originZ = 0, } = transformOrigin; - style.transformOrigin = `${originX} ${originY} ${originZ}`; - } - } - - function renderHTML(element, { style, vars }, styleProp, projection) { - const elementStyle = element.style; - let key; - for (key in style) { - // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type. - elementStyle[key] = style[key]; - } - // Write projection styles directly to element style - projection?.applyProjectionStyles(elementStyle, styleProp); - for (key in vars) { - // Loop over any CSS variables and assign those. - // They can only be assigned using `setProperty`. - elementStyle.setProperty(key, vars[key]); - } - } - - function pixelsToPercent(pixels, axis) { - if (axis.max === axis.min) - return 0; - return (pixels / (axis.max - axis.min)) * 100; - } - /** - * We always correct borderRadius as a percentage rather than pixels to reduce paints. - * For example, if you are projecting a box that is 100px wide with a 10px borderRadius - * into a box that is 200px wide with a 20px borderRadius, that is actually a 10% - * borderRadius in both states. If we animate between the two in pixels that will trigger - * a paint each time. If we animate between the two in percentage we'll avoid a paint. - */ - const correctBorderRadius = { - correct: (latest, node) => { - if (!node.target) - return latest; - /** - * If latest is a string, if it's a percentage we can return immediately as it's - * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number. - */ - if (typeof latest === "string") { - if (px.test(latest)) { - latest = parseFloat(latest); - } - else { - return latest; - } - } - /** - * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that - * pixel value as a percentage of each axis - */ - const x = pixelsToPercent(latest, node.target.x); - const y = pixelsToPercent(latest, node.target.y); - return `${x}% ${y}%`; - }, - }; - - const correctBoxShadow = { - correct: (latest, { treeScale, projectionDelta }) => { - const original = latest; - const shadow = complex.parse(latest); - // TODO: Doesn't support multiple shadows - if (shadow.length > 5) - return original; - const template = complex.createTransformer(latest); - const offset = typeof shadow[0] !== "number" ? 1 : 0; - // Calculate the overall context scale - const xScale = projectionDelta.x.scale * treeScale.x; - const yScale = projectionDelta.y.scale * treeScale.y; - shadow[0 + offset] /= xScale; - shadow[1 + offset] /= yScale; - /** - * Ideally we'd correct x and y scales individually, but because blur and - * spread apply to both we have to take a scale average and apply that instead. - * We could potentially improve the outcome of this by incorporating the ratio between - * the two scales. - */ - const averageScale = mixNumber$1(xScale, yScale, 0.5); - // Blur - if (typeof shadow[2 + offset] === "number") - shadow[2 + offset] /= averageScale; - // Spread - if (typeof shadow[3 + offset] === "number") - shadow[3 + offset] /= averageScale; - return template(shadow); - }, - }; - - const scaleCorrectors = { - borderRadius: { - ...correctBorderRadius, - applyTo: [ - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomLeftRadius", - "borderBottomRightRadius", - ], - }, - borderTopLeftRadius: correctBorderRadius, - borderTopRightRadius: correctBorderRadius, - borderBottomLeftRadius: correctBorderRadius, - borderBottomRightRadius: correctBorderRadius, - boxShadow: correctBoxShadow, - }; - function addScaleCorrector(correctors) { - for (const key in correctors) { - scaleCorrectors[key] = correctors[key]; - if (isCSSVariableName(key)) { - scaleCorrectors[key].isCSSVariable = true; - } - } - } - - function isForcedMotionValue(key, { layout, layoutId }) { - return (transformProps.has(key) || - key.startsWith("origin") || - ((layout || layoutId !== undefined) && - (!!scaleCorrectors[key] || key === "opacity"))); - } - - function scrapeMotionValuesFromProps$1(props, prevProps, visualElement) { - const style = props.style; - const prevStyle = prevProps?.style; - const newValues = {}; - if (!style) - return newValues; - for (const key in style) { - if (isMotionValue(style[key]) || - (prevStyle && isMotionValue(prevStyle[key])) || - isForcedMotionValue(key, props) || - visualElement?.getValue(key)?.liveStyle !== undefined) { - newValues[key] = style[key]; - } - } - return newValues; - } - - function getComputedStyle$1(element) { - return window.getComputedStyle(element); - } - class HTMLVisualElement extends DOMVisualElement { - constructor() { - super(...arguments); - this.type = "html"; - this.renderInstance = renderHTML; - } - readValueFromInstance(instance, key) { - if (transformProps.has(key)) { - return this.projection?.isProjecting - ? defaultTransformValue(key) - : readTransformValue(instance, key); - } - else { - const computedStyle = getComputedStyle$1(instance); - const value = (isCSSVariableName(key) - ? computedStyle.getPropertyValue(key) - : computedStyle[key]) || 0; - return typeof value === "string" ? value.trim() : value; - } - } - measureInstanceViewportBox(instance, { transformPagePoint }) { - return measureViewportBox(instance, transformPagePoint); - } - build(renderState, latestValues, props) { - buildHTMLStyles(renderState, latestValues, props.transformTemplate); - } - scrapeMotionValuesFromProps(props, prevProps, visualElement) { - return scrapeMotionValuesFromProps$1(props, prevProps, visualElement); - } - } - - function isObjectKey(key, object) { - return key in object; - } - class ObjectVisualElement extends VisualElement { - constructor() { - super(...arguments); - this.type = "object"; - } - readValueFromInstance(instance, key) { - if (isObjectKey(key, instance)) { - const value = instance[key]; - if (typeof value === "string" || typeof value === "number") { - return value; - } - } - return undefined; - } - getBaseTargetFromProps() { - return undefined; - } - removeValueFromRenderState(key, renderState) { - delete renderState.output[key]; - } - measureInstanceViewportBox() { - return createBox(); - } - build(renderState, latestValues) { - Object.assign(renderState.output, latestValues); - } - renderInstance(instance, { output }) { - Object.assign(instance, output); - } - sortInstanceNodePosition() { - return 0; - } - } - - const dashKeys = { - offset: "stroke-dashoffset", - array: "stroke-dasharray", - }; - const camelKeys = { - offset: "strokeDashoffset", - array: "strokeDasharray", - }; - /** - * Build SVG path properties. Uses the path's measured length to convert - * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset - * and stroke-dasharray attributes. - * - * This function is mutative to reduce per-frame GC. - * - * Note: We use unitless values for stroke-dasharray and stroke-dashoffset - * because Safari incorrectly scales px values when the page is zoomed. - */ - function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) { - // Normalise path length by setting SVG attribute pathLength to 1 - attrs.pathLength = 1; - // We use dash case when setting attributes directly to the DOM node and camel case - // when defining props on a React component. - const keys = useDashCase ? dashKeys : camelKeys; - // Build the dash offset (unitless to avoid Safari zoom bug) - attrs[keys.offset] = `${-offset}`; - // Build the dash array (unitless to avoid Safari zoom bug) - attrs[keys.array] = `${length} ${spacing}`; - } - - /** - * CSS Motion Path properties that should remain as CSS styles on SVG elements. - */ - const cssMotionPathProperties = [ - "offsetDistance", - "offsetPath", - "offsetRotate", - "offsetAnchor", - ]; - /** - * Build SVG visual attributes, like cx and style.transform - */ - function buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, - // This is object creation, which we try to avoid per-frame. - ...latest }, isSVGTag, transformTemplate, styleProp) { - buildHTMLStyles(state, latest, transformTemplate); - /** - * For svg tags we just want to make sure viewBox is animatable and treat all the styles - * as normal HTML tags. - */ - if (isSVGTag) { - if (state.style.viewBox) { - state.attrs.viewBox = state.style.viewBox; - } - return; - } - state.attrs = state.style; - state.style = {}; - const { attrs, style } = state; - /** - * However, we apply transforms as CSS transforms. - * So if we detect a transform, transformOrigin we take it from attrs and copy it into style. - */ - if (attrs.transform) { - style.transform = attrs.transform; - delete attrs.transform; - } - if (style.transform || attrs.transformOrigin) { - style.transformOrigin = attrs.transformOrigin ?? "50% 50%"; - delete attrs.transformOrigin; - } - if (style.transform) { - /** - * SVG's element transform-origin uses its own median as a reference. - * Therefore, transformBox becomes a fill-box - */ - style.transformBox = styleProp?.transformBox ?? "fill-box"; - delete attrs.transformBox; - } - for (const key of cssMotionPathProperties) { - if (attrs[key] !== undefined) { - style[key] = attrs[key]; - delete attrs[key]; - } - } - // Render attrX/attrY/attrScale as attributes - if (attrX !== undefined) - attrs.x = attrX; - if (attrY !== undefined) - attrs.y = attrY; - if (attrScale !== undefined) - attrs.scale = attrScale; - // Build SVG path if one has been defined - if (pathLength !== undefined) { - buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false); - } - } - - /** - * A set of attribute names that are always read/written as camel case. - */ - const camelCaseAttributes = new Set([ - "baseFrequency", - "diffuseConstant", - "kernelMatrix", - "kernelUnitLength", - "keySplines", - "keyTimes", - "limitingConeAngle", - "markerHeight", - "markerWidth", - "numOctaves", - "targetX", - "targetY", - "surfaceScale", - "specularConstant", - "specularExponent", - "stdDeviation", - "tableValues", - "viewBox", - "gradientTransform", - "pathLength", - "startOffset", - "textLength", - "lengthAdjust", - ]); - - const isSVGTag = (tag) => typeof tag === "string" && tag.toLowerCase() === "svg"; - - function renderSVG(element, renderState, _styleProp, projection) { - renderHTML(element, renderState, undefined, projection); - for (const key in renderState.attrs) { - element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]); - } - } - - function scrapeMotionValuesFromProps(props, prevProps, visualElement) { - const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement); - for (const key in props) { - if (isMotionValue(props[key]) || - isMotionValue(prevProps[key])) { - const targetKey = transformPropOrder.indexOf(key) !== -1 - ? "attr" + key.charAt(0).toUpperCase() + key.substring(1) - : key; - newValues[targetKey] = props[key]; - } - } - return newValues; - } - - class SVGVisualElement extends DOMVisualElement { - constructor() { - super(...arguments); - this.type = "svg"; - this.isSVGTag = false; - this.measureInstanceViewportBox = createBox; - } - getBaseTargetFromProps(props, key) { - return props[key]; - } - readValueFromInstance(instance, key) { - if (transformProps.has(key)) { - const defaultType = getDefaultValueType(key); - return defaultType ? defaultType.default || 0 : 0; - } - key = !camelCaseAttributes.has(key) ? camelToDash(key) : key; - return instance.getAttribute(key); - } - scrapeMotionValuesFromProps(props, prevProps, visualElement) { - return scrapeMotionValuesFromProps(props, prevProps, visualElement); - } - build(renderState, latestValues, props) { - buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style); - } - renderInstance(instance, renderState, styleProp, projection) { - renderSVG(instance, renderState, styleProp, projection); - } - mount(instance) { - this.isSVGTag = isSVGTag(instance.tagName); - super.mount(instance); - } - } - - const numVariantProps = variantProps.length; - /** - * Get variant context from a visual element's parent chain. - * Uses `any` type for visualElement to avoid circular dependencies. - */ - function getVariantContext(visualElement) { - if (!visualElement) - return undefined; - if (!visualElement.isControllingVariants) { - const context = visualElement.parent - ? getVariantContext(visualElement.parent) || {} - : {}; - if (visualElement.props.initial !== undefined) { - context.initial = visualElement.props.initial; - } - return context; - } - const context = {}; - for (let i = 0; i < numVariantProps; i++) { - const name = variantProps[i]; - const prop = visualElement.props[name]; - if (isVariantLabel(prop) || prop === false) { - context[name] = prop; - } - } - return context; - } - - function shallowCompare(next, prev) { - if (!Array.isArray(prev)) - return false; - const prevLength = prev.length; - if (prevLength !== next.length) - return false; - for (let i = 0; i < prevLength; i++) { - if (prev[i] !== next[i]) - return false; - } - return true; - } - - const reversePriorityOrder = [...variantPriorityOrder].reverse(); - const numAnimationTypes = variantPriorityOrder.length; - function createAnimateFunction(visualElement) { - return (animations) => { - return Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options))); - }; - } - function createAnimationState(visualElement) { - let animate = createAnimateFunction(visualElement); - let state = createState(); - let isInitialRender = true; - /** - * Track whether the animation state has been reset (e.g. via StrictMode - * double-invocation or Suspense unmount/remount). On the first - * animateChanges() call after a reset we need to behave like the initial - * render for variant-inheritance checks, even though isInitialRender is - * already false. - */ - let wasReset = false; - /** - * This function will be used to reduce the animation definitions for - * each active animation type into an object of resolved values for it. - */ - const buildResolvedTypeValues = (type) => (acc, definition) => { - const resolved = resolveVariant(visualElement, definition, type === "exit" - ? visualElement.presenceContext?.custom - : undefined); - if (resolved) { - const { transition, transitionEnd, ...target } = resolved; - acc = { ...acc, ...target, ...transitionEnd }; - } - return acc; - }; - /** - * This just allows us to inject mocked animation functions - * @internal - */ - function setAnimateFunction(makeAnimator) { - animate = makeAnimator(visualElement); - } - /** - * When we receive new props, we need to: - * 1. Create a list of protected keys for each type. This is a directory of - * value keys that are currently being "handled" by types of a higher priority - * so that whenever an animation is played of a given type, these values are - * protected from being animated. - * 2. Determine if an animation type needs animating. - * 3. Determine if any values have been removed from a type and figure out - * what to animate those to. - */ - function animateChanges(changedActiveType) { - const { props } = visualElement; - const context = getVariantContext(visualElement.parent) || {}; - /** - * A list of animations that we'll build into as we iterate through the animation - * types. This will get executed at the end of the function. - */ - const animations = []; - /** - * Keep track of which values have been removed. Then, as we hit lower priority - * animation types, we can check if they contain removed values and animate to that. - */ - const removedKeys = new Set(); - /** - * A dictionary of all encountered keys. This is an object to let us build into and - * copy it without iteration. Each time we hit an animation type we set its protected - * keys - the keys its not allowed to animate - to the latest version of this object. - */ - let encounteredKeys = {}; - /** - * If a variant has been removed at a given index, and this component is controlling - * variant animations, we want to ensure lower-priority variants are forced to animate. - */ - let removedVariantIndex = Infinity; - /** - * Iterate through all animation types in reverse priority order. For each, we want to - * detect which values it's handling and whether or not they've changed (and therefore - * need to be animated). If any values have been removed, we want to detect those in - * lower priority props and flag for animation. - */ - for (let i = 0; i < numAnimationTypes; i++) { - const type = reversePriorityOrder[i]; - const typeState = state[type]; - const prop = props[type] !== undefined - ? props[type] - : context[type]; - const propIsVariant = isVariantLabel(prop); - /** - * If this type has *just* changed isActive status, set activeDelta - * to that status. Otherwise set to null. - */ - const activeDelta = type === changedActiveType ? typeState.isActive : null; - if (activeDelta === false) - removedVariantIndex = i; - /** - * If this prop is an inherited variant, rather than been set directly on the - * component itself, we want to make sure we allow the parent to trigger animations. - * - * TODO: Can probably change this to a !isControllingVariants check - */ - let isInherited = prop === context[type] && - prop !== props[type] && - propIsVariant; - if (isInherited && - (isInitialRender || wasReset) && - visualElement.manuallyAnimateOnMount) { - isInherited = false; - } - /** - * Set all encountered keys so far as the protected keys for this type. This will - * be any key that has been animated or otherwise handled by active, higher-priortiy types. - */ - typeState.protectedKeys = { ...encounteredKeys }; - // Check if we can skip analysing this prop early - if ( - // If it isn't active and hasn't *just* been set as inactive - (!typeState.isActive && activeDelta === null) || - // If we didn't and don't have any defined prop for this animation type - (!prop && !typeState.prevProp) || - // Or if the prop doesn't define an animation - isAnimationControls(prop) || - typeof prop === "boolean") { - continue; - } - /** - * If exit is already active and wasn't just activated, skip - * re-processing to prevent interrupting running exit animations. - * Re-resolving exit with a changed custom value can start new - * value animations that stop the originals, leaving the exit - * animation promise unresolved and the component stuck in the DOM. - */ - if (type === "exit" && typeState.isActive && activeDelta !== true) { - if (typeState.prevResolvedValues) { - encounteredKeys = { - ...encounteredKeys, - ...typeState.prevResolvedValues, - }; - } - continue; - } - /** - * As we go look through the values defined on this type, if we detect - * a changed value or a value that was removed in a higher priority, we set - * this to true and add this prop to the animation list. - */ - const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop); - let shouldAnimateType = variantDidChange || - // If we're making this variant active, we want to always make it active - (type === changedActiveType && - typeState.isActive && - !isInherited && - propIsVariant) || - // If we removed a higher-priority variant (i is in reverse order) - (i > removedVariantIndex && propIsVariant); - let handledRemovedValues = false; - /** - * As animations can be set as variant lists, variants or target objects, we - * coerce everything to an array if it isn't one already - */ - const definitionList = Array.isArray(prop) ? prop : [prop]; - /** - * Build an object of all the resolved values. We'll use this in the subsequent - * animateChanges calls to determine whether a value has changed. - */ - let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {}); - if (activeDelta === false) - resolvedValues = {}; - /** - * Now we need to loop through all the keys in the prev prop and this prop, - * and decide: - * 1. If the value has changed, and needs animating - * 2. If it has been removed, and needs adding to the removedKeys set - * 3. If it has been removed in a higher priority type and needs animating - * 4. If it hasn't been removed in a higher priority but hasn't changed, and - * needs adding to the type's protectedKeys list. - */ - const { prevResolvedValues = {} } = typeState; - const allKeys = { - ...prevResolvedValues, - ...resolvedValues, - }; - const markToAnimate = (key) => { - shouldAnimateType = true; - if (removedKeys.has(key)) { - handledRemovedValues = true; - removedKeys.delete(key); - } - typeState.needsAnimating[key] = true; - const motionValue = visualElement.getValue(key); - if (motionValue) - motionValue.liveStyle = false; - }; - for (const key in allKeys) { - const next = resolvedValues[key]; - const prev = prevResolvedValues[key]; - // If we've already handled this we can just skip ahead - if (encounteredKeys.hasOwnProperty(key)) - continue; - /** - * If the value has changed, we probably want to animate it. - */ - let valueHasChanged = false; - if (isKeyframesTarget(next) && isKeyframesTarget(prev)) { - valueHasChanged = - !shallowCompare(next, prev) || variantDidChange; - } - else { - valueHasChanged = next !== prev; - } - if (valueHasChanged) { - if (next !== undefined && next !== null) { - // If next is defined and doesn't equal prev, it needs animating - markToAnimate(key); - } - else { - // If it's undefined, it's been removed. - removedKeys.add(key); - } - } - else if (next !== undefined && removedKeys.has(key)) { - /** - * If next hasn't changed and it isn't undefined, we want to check if it's - * been removed by a higher priority - */ - markToAnimate(key); - } - else { - /** - * If it hasn't changed, we add it to the list of protected values - * to ensure it doesn't get animated. - */ - typeState.protectedKeys[key] = true; - } - } - /** - * Update the typeState so next time animateChanges is called we can compare the - * latest prop and resolvedValues to these. - */ - typeState.prevProp = prop; - typeState.prevResolvedValues = resolvedValues; - if (typeState.isActive) { - encounteredKeys = { ...encounteredKeys, ...resolvedValues }; - } - if ((isInitialRender || wasReset) && - visualElement.blockInitialAnimation) { - shouldAnimateType = false; - } - /** - * If this is an inherited prop we want to skip this animation - * unless the inherited variants haven't changed on this render. - */ - const willAnimateViaParent = isInherited && variantDidChange; - const needsAnimating = !willAnimateViaParent || handledRemovedValues; - if (shouldAnimateType && needsAnimating) { - animations.push(...definitionList.map((animation) => { - const options = { type }; - /** - * If we're performing the initial animation, but we're not - * rendering at the same time as the variant-controlling parent, - * we want to use the parent's transition to calculate the stagger. - */ - if (typeof animation === "string" && - (isInitialRender || wasReset) && - !willAnimateViaParent && - visualElement.manuallyAnimateOnMount && - visualElement.parent) { - const { parent } = visualElement; - const parentVariant = resolveVariant(parent, animation); - if (parent.enteringChildren && parentVariant) { - const { delayChildren } = parentVariant.transition || {}; - options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren); - } - } - return { - animation: animation, - options, - }; - })); - } - } - /** - * If there are some removed value that haven't been dealt with, - * we need to create a new animation that falls back either to the value - * defined in the style prop, or the last read value. - */ - if (removedKeys.size) { - const fallbackAnimation = {}; - /** - * If the initial prop contains a transition we can use that, otherwise - * allow the animation function to use the visual element's default. - */ - if (typeof props.initial !== "boolean") { - const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial) - ? props.initial[0] - : props.initial); - if (initialTransition && initialTransition.transition) { - fallbackAnimation.transition = initialTransition.transition; - } - } - removedKeys.forEach((key) => { - const fallbackTarget = visualElement.getBaseTarget(key); - const motionValue = visualElement.getValue(key); - if (motionValue) - motionValue.liveStyle = true; - // @ts-expect-error - @mattgperry to figure if we should do something here - fallbackAnimation[key] = fallbackTarget ?? null; - }); - animations.push({ animation: fallbackAnimation }); - } - let shouldAnimate = Boolean(animations.length); - if (isInitialRender && - (props.initial === false || props.initial === props.animate) && - !visualElement.manuallyAnimateOnMount) { - shouldAnimate = false; - } - isInitialRender = false; - wasReset = false; - return shouldAnimate ? animate(animations) : Promise.resolve(); - } - /** - * Change whether a certain animation type is active. - */ - function setActive(type, isActive) { - // If the active state hasn't changed, we can safely do nothing here - if (state[type].isActive === isActive) - return Promise.resolve(); - // Propagate active change to children - visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive)); - state[type].isActive = isActive; - const animations = animateChanges(type); - for (const key in state) { - state[key].protectedKeys = {}; - } - return animations; - } - return { - animateChanges, - setActive, - setAnimateFunction, - getState: () => state, - reset: () => { - state = createState(); - wasReset = true; - }, - }; - } - function checkVariantsDidChange(prev, next) { - if (typeof next === "string") { - return next !== prev; - } - else if (Array.isArray(next)) { - return !shallowCompare(next, prev); - } - return false; - } - function createTypeState(isActive = false) { - return { - isActive, - protectedKeys: {}, - needsAnimating: {}, - prevResolvedValues: {}, - }; - } - function createState() { - return { - animate: createTypeState(true), - whileInView: createTypeState(), - whileHover: createTypeState(), - whileTap: createTypeState(), - whileDrag: createTypeState(), - whileFocus: createTypeState(), - exit: createTypeState(), - }; - } - - /** - * Reset an axis to the provided origin box. - * - * This is a mutative operation. - */ - function copyAxisInto(axis, originAxis) { - axis.min = originAxis.min; - axis.max = originAxis.max; - } - /** - * Reset a box to the provided origin box. - * - * This is a mutative operation. - */ - function copyBoxInto(box, originBox) { - copyAxisInto(box.x, originBox.x); - copyAxisInto(box.y, originBox.y); - } - /** - * Reset a delta to the provided origin box. - * - * This is a mutative operation. - */ - function copyAxisDeltaInto(delta, originDelta) { - delta.translate = originDelta.translate; - delta.scale = originDelta.scale; - delta.originPoint = originDelta.originPoint; - delta.origin = originDelta.origin; - } - - const SCALE_PRECISION = 0.0001; - const SCALE_MIN = 1 - SCALE_PRECISION; - const SCALE_MAX = 1 + SCALE_PRECISION; - const TRANSLATE_PRECISION = 0.01; - const TRANSLATE_MIN = 0 - TRANSLATE_PRECISION; - const TRANSLATE_MAX = 0 + TRANSLATE_PRECISION; - function calcLength(axis) { - return axis.max - axis.min; - } - function isNear(value, target, maxDistance) { - return Math.abs(value - target) <= maxDistance; - } - function calcAxisDelta(delta, source, target, origin = 0.5) { - delta.origin = origin; - delta.originPoint = mixNumber$1(source.min, source.max, delta.origin); - delta.scale = calcLength(target) / calcLength(source); - delta.translate = - mixNumber$1(target.min, target.max, delta.origin) - delta.originPoint; - if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) || - isNaN(delta.scale)) { - delta.scale = 1.0; - } - if ((delta.translate >= TRANSLATE_MIN && - delta.translate <= TRANSLATE_MAX) || - isNaN(delta.translate)) { - delta.translate = 0.0; - } - } - function calcBoxDelta(delta, source, target, origin) { - calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined); - calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined); - } - function calcRelativeAxis(target, relative, parent, anchor = 0) { - const anchorPoint = anchor - ? mixNumber$1(parent.min, parent.max, anchor) - : parent.min; - target.min = anchorPoint + relative.min; - target.max = target.min + calcLength(relative); - } - function calcRelativeBox(target, relative, parent, anchor) { - calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x); - calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y); - } - function calcRelativeAxisPosition(target, layout, parent, anchor = 0) { - const anchorPoint = anchor - ? mixNumber$1(parent.min, parent.max, anchor) - : parent.min; - target.min = layout.min - anchorPoint; - target.max = target.min + calcLength(layout); - } - function calcRelativePosition(target, layout, parent, anchor) { - calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x); - calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y); - } - - /** - * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse - */ - function removePointDelta(point, translate, scale, originPoint, boxScale) { - point -= translate; - point = scalePoint(point, 1 / scale, originPoint); - if (boxScale !== undefined) { - point = scalePoint(point, 1 / boxScale, originPoint); - } - return point; - } - /** - * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse - */ - function removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) { - if (percent.test(translate)) { - translate = parseFloat(translate); - const relativeProgress = mixNumber$1(sourceAxis.min, sourceAxis.max, translate / 100); - translate = relativeProgress - sourceAxis.min; - } - if (typeof translate !== "number") - return; - let originPoint = mixNumber$1(originAxis.min, originAxis.max, origin); - if (axis === originAxis) - originPoint -= translate; - axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale); - axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale); - } - /** - * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ - function removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) { - removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis); - } - /** - * The names of the motion values we want to apply as translation, scale and origin. - */ - const xKeys = ["x", "scaleX", "originX"]; - const yKeys = ["y", "scaleY", "originY"]; - /** - * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse - * and acts as a bridge between motion values and removeAxisDelta - */ - function removeBoxTransforms(box, transforms, originBox, sourceBox) { - removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined); - removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined); - } - - function isAxisDeltaZero(delta) { - return delta.translate === 0 && delta.scale === 1; - } - function isDeltaZero(delta) { - return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y); - } - function axisEquals(a, b) { - return a.min === b.min && a.max === b.max; - } - function boxEquals(a, b) { - return axisEquals(a.x, b.x) && axisEquals(a.y, b.y); - } - function axisEqualsRounded(a, b) { - return (Math.round(a.min) === Math.round(b.min) && - Math.round(a.max) === Math.round(b.max)); - } - function boxEqualsRounded(a, b) { - return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y); - } - function aspectRatio(box) { - return calcLength(box.x) / calcLength(box.y); - } - function axisDeltaEquals(a, b) { - return (a.translate === b.translate && - a.scale === b.scale && - a.originPoint === b.originPoint); - } - - function eachAxis(callback) { - return [callback("x"), callback("y")]; - } - - function buildProjectionTransform(delta, treeScale, latestTransform) { - let transform = ""; - /** - * The translations we use to calculate are always relative to the viewport coordinate space. - * But when we apply scales, we also scale the coordinate space of an element and its children. - * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need - * to move an element 100 pixels, we actually need to move it 200 in within that scaled space. - */ - const xTranslate = delta.x.translate / treeScale.x; - const yTranslate = delta.y.translate / treeScale.y; - const zTranslate = latestTransform?.z || 0; - if (xTranslate || yTranslate || zTranslate) { - transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `; - } - /** - * Apply scale correction for the tree transform. - * This will apply scale to the screen-orientated axes. - */ - if (treeScale.x !== 1 || treeScale.y !== 1) { - transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `; - } - if (latestTransform) { - const { transformPerspective, rotate, pathRotation, rotateX, rotateY, skewX, skewY, } = latestTransform; - if (transformPerspective) - transform = `perspective(${transformPerspective}px) ${transform}`; - if (rotate) - transform += `rotate(${rotate}deg) `; - // Additive `rotate()` so user `rotate` isn't clobbered. - if (pathRotation) - transform += `rotate(${pathRotation}deg) `; - if (rotateX) - transform += `rotateX(${rotateX}deg) `; - if (rotateY) - transform += `rotateY(${rotateY}deg) `; - if (skewX) - transform += `skewX(${skewX}deg) `; - if (skewY) - transform += `skewY(${skewY}deg) `; - } - /** - * Apply scale to match the size of the element to the size we want it. - * This will apply scale to the element-orientated axes. - */ - const elementScaleX = delta.x.scale * treeScale.x; - const elementScaleY = delta.y.scale * treeScale.y; - if (elementScaleX !== 1 || elementScaleY !== 1) { - transform += `scale(${elementScaleX}, ${elementScaleY})`; - } - return transform || "none"; - } - - const borderLabels = [ - "borderTopLeftRadius", - "borderTopRightRadius", - "borderBottomLeftRadius", - "borderBottomRightRadius", - ]; - const numBorders = borderLabels.length; - const asNumber = (value) => typeof value === "string" ? parseFloat(value) : value; - const isPx = (value) => typeof value === "number" || px.test(value); - function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) { - if (shouldCrossfadeOpacity) { - target.opacity = mixNumber$1(0, lead.opacity ?? 1, easeCrossfadeIn(progress)); - target.opacityExit = mixNumber$1(follow.opacity ?? 1, 0, easeCrossfadeOut(progress)); - } - else if (isOnlyMember) { - target.opacity = mixNumber$1(follow.opacity ?? 1, lead.opacity ?? 1, progress); - } - /** - * Mix border radius - */ - for (let i = 0; i < numBorders; i++) { - const borderLabel = borderLabels[i]; - let followRadius = getRadius(follow, borderLabel); - let leadRadius = getRadius(lead, borderLabel); - if (followRadius === undefined && leadRadius === undefined) - continue; - followRadius || (followRadius = 0); - leadRadius || (leadRadius = 0); - const canMix = followRadius === 0 || - leadRadius === 0 || - isPx(followRadius) === isPx(leadRadius); - if (canMix) { - target[borderLabel] = Math.max(mixNumber$1(asNumber(followRadius), asNumber(leadRadius), progress), 0); - if (percent.test(leadRadius) || percent.test(followRadius)) { - target[borderLabel] += "%"; - } - } - else { - target[borderLabel] = leadRadius; - } - } - /** - * Mix rotation - */ - if (follow.rotate || lead.rotate) { - target.rotate = mixNumber$1(follow.rotate || 0, lead.rotate || 0, progress); - } - } - function getRadius(values, radiusName) { - return values[radiusName] !== undefined - ? values[radiusName] - : values.borderRadius; - } - const easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut); - const easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop$1); - function compress(min, max, easing) { - return (p) => { - // Could replace ifs with clamp - if (p < min) - return 0; - if (p > max) - return 1; - return easing(progress(min, max, p)); - }; - } - - function animateSingleValue(value, keyframes, options) { - const motionValue$1 = isMotionValue(value) ? value : motionValue(value); - motionValue$1.start(animateMotionValue("", motionValue$1, keyframes, options)); - return motionValue$1.animation; - } - - function addDomEvent(target, eventName, handler, options = { passive: true }) { - target.addEventListener(eventName, handler, options); - return () => target.removeEventListener(eventName, handler); - } - - const compareByDepth = (a, b) => a.depth - b.depth; - - class FlatTree { - constructor() { - this.children = []; - this.isDirty = false; - } - add(child) { - addUniqueItem(this.children, child); - this.isDirty = true; - } - remove(child) { - removeItem(this.children, child); - this.isDirty = true; - } - forEach(callback) { - this.isDirty && this.children.sort(compareByDepth); - this.isDirty = false; - this.children.forEach(callback); - } - } - - /** - * Timeout defined in ms - */ - function delay(callback, timeout) { - const start = time.now(); - const checkElapsed = ({ timestamp }) => { - const elapsed = timestamp - start; - if (elapsed >= timeout) { - cancelFrame(checkElapsed); - callback(elapsed - timeout); - } - }; - frame.setup(checkElapsed, true); - return () => cancelFrame(checkElapsed); - } - function delayInSeconds(callback, timeout) { - return delay(callback, secondsToMilliseconds(timeout)); - } - - /** - * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself - */ - function resolveMotionValue(value) { - return isMotionValue(value) ? value.get() : value; - } - - class NodeStack { - constructor() { - this.members = []; - } - add(node) { - addUniqueItem(this.members, node); - for (let i = this.members.length - 1; i >= 0; i--) { - const member = this.members[i]; - if (member === node || member === this.lead || member === this.prevLead) - continue; - const inst = member.instance; - if ((!inst || inst.isConnected === false) && !member.snapshot) { - removeItem(this.members, member); - member.unmount(); - } - } - node.scheduleRender(); - } - remove(node) { - removeItem(this.members, node); - if (node === this.prevLead) - this.prevLead = undefined; - if (node === this.lead) { - const prevLead = this.members[this.members.length - 1]; - if (prevLead) - this.promote(prevLead); - } - } - relegate(node) { - for (let i = this.members.indexOf(node) - 1; i >= 0; i--) { - const member = this.members[i]; - if (member.isPresent !== false && member.instance?.isConnected !== false) { - this.promote(member); - return true; - } - } - return false; - } - promote(node, preserveFollowOpacity) { - const prevLead = this.lead; - if (node === prevLead) - return; - this.prevLead = prevLead; - this.lead = node; - node.show(); - if (prevLead) { - prevLead.updateSnapshot(); - node.scheduleRender(); - const { layoutDependency: prevDep } = prevLead.options; - const { layoutDependency: nextDep } = node.options; - if (prevDep === undefined || prevDep !== nextDep) { - node.resumeFrom = prevLead; - if (preserveFollowOpacity) - prevLead.preserveOpacity = true; - if (prevLead.snapshot) { - node.snapshot = prevLead.snapshot; - node.snapshot.latestValues = - prevLead.animationValues || prevLead.latestValues; - } - if (node.root?.isUpdating) - node.isLayoutDirty = true; - } - if (node.options.crossfade === false) - prevLead.hide(); - } - } - exitAnimationComplete() { - this.members.forEach((member) => { - member.options.onExitComplete?.(); - member.resumingFrom?.options.onExitComplete?.(); - }); - } - scheduleRender() { - this.members.forEach((member) => member.instance && member.scheduleRender(false)); - } - removeLeadSnapshot() { - if (this.lead?.snapshot) - this.lead.snapshot = undefined; - } - } - - /** - * This should only ever be modified on the client otherwise it'll - * persist through server requests. If we need instanced states we - * could lazy-init via root. - */ - const globalProjectionState = { - /** - * Global flag as to whether the tree has animated since the last time - * we resized the window - */ - hasAnimatedSinceResize: true, - /** - * We set this to true once, on the first update. Any nodes added to the tree beyond that - * update will be given a `data-projection-id` attribute. - */ - hasEverUpdated: false, - }; - - const metrics = { - nodes: 0, - calculatedTargetDeltas: 0, - calculatedProjections: 0, - }; - const transformAxes = ["", "X", "Y", "Z"]; - /** - * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1 - * which has a noticeable difference in spring animations - */ - const animationTarget = 1000; - let id = 0; - function resetDistortingTransform(key, visualElement, values, sharedAnimationValues) { - const { latestValues } = visualElement; - // Record the distorting transform and then temporarily set it to 0 - if (latestValues[key]) { - values[key] = latestValues[key]; - visualElement.setStaticValue(key, 0); - if (sharedAnimationValues) { - sharedAnimationValues[key] = 0; - } - } - } - function cancelTreeOptimisedTransformAnimations(projectionNode) { - projectionNode.hasCheckedOptimisedAppear = true; - if (projectionNode.root === projectionNode) - return; - const { visualElement } = projectionNode.options; - if (!visualElement) - return; - const appearId = getOptimisedAppearId(visualElement); - if (window.MotionHasOptimisedAnimation(appearId, "transform")) { - const { layout, layoutId } = projectionNode.options; - window.MotionCancelOptimisedAnimation(appearId, "transform", frame, !(layout || layoutId)); - } - const { parent } = projectionNode; - if (parent && !parent.hasCheckedOptimisedAppear) { - cancelTreeOptimisedTransformAnimations(parent); - } - } - function createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) { - return class ProjectionNode { - constructor(latestValues = {}, parent = defaultParent?.()) { - /** - * A unique ID generated for every projection node. - */ - this.id = id++; - /** - * An id that represents a unique session instigated by startUpdate. - */ - this.animationId = 0; - this.animationCommitId = 0; - /** - * A Set containing all this component's children. This is used to iterate - * through the children. - * - * TODO: This could be faster to iterate as a flat array stored on the root node. - */ - this.children = new Set(); - /** - * Options for the node. We use this to configure what kind of layout animations - * we should perform (if any). - */ - this.options = {}; - /** - * We use this to detect when its safe to shut down part of a projection tree. - * We have to keep projecting children for scale correction and relative projection - * until all their parents stop performing layout animations. - */ - this.isTreeAnimating = false; - this.isAnimationBlocked = false; - /** - * Flag to true if we think this layout has been changed. We can't always know this, - * currently we set it to true every time a component renders, or if it has a layoutDependency - * if that has changed between renders. Additionally, components can be grouped by LayoutGroup - * and if one node is dirtied, they all are. - */ - this.isLayoutDirty = false; - /** - * Flag to true if we think the projection calculations for this node needs - * recalculating as a result of an updated transform or layout animation. - */ - this.isProjectionDirty = false; - /** - * Flag to true if the layout *or* transform has changed. This then gets propagated - * throughout the projection tree, forcing any element below to recalculate on the next frame. - */ - this.isSharedProjectionDirty = false; - /** - * Flag transform dirty. This gets propagated throughout the whole tree but is only - * respected by shared nodes. - */ - this.isTransformDirty = false; - /** - * Block layout updates for instant layout transitions throughout the tree. - */ - this.updateManuallyBlocked = false; - this.updateBlockedByResize = false; - /** - * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate` - * call. - */ - this.isUpdating = false; - /** - * If this is an SVG element we currently disable projection transforms - */ - this.isSVG = false; - /** - * Flag to true (during promotion) if a node doing an instant layout transition needs to reset - * its projection styles. - */ - this.needsReset = false; - /** - * Flags whether this node should have its transform reset prior to measuring. - */ - this.shouldResetTransform = false; - /** - * Store whether this node has been checked for optimised appear animations. As - * effects fire bottom-up, and we want to look up the tree for appear animations, - * this makes sure we only check each path once, stopping at nodes that - * have already been checked. - */ - this.hasCheckedOptimisedAppear = false; - /** - * An object representing the calculated contextual/accumulated/tree scale. - * This will be used to scale calculcated projection transforms, as these are - * calculated in screen-space but need to be scaled for elements to layoutly - * make it to their calculated destinations. - * - * TODO: Lazy-init - */ - this.treeScale = { x: 1, y: 1 }; - /** - * - */ - this.eventHandlers = new Map(); - this.hasTreeAnimated = false; - this.layoutVersion = 0; - // Note: Currently only running on root node - this.updateScheduled = false; - this.scheduleUpdate = () => this.update(); - this.projectionUpdateScheduled = false; - this.checkUpdateFailed = () => { - if (this.isUpdating) { - this.isUpdating = false; - this.clearAllSnapshots(); - } - }; - /** - * This is a multi-step process as shared nodes might be of different depths. Nodes - * are sorted by depth order, so we need to resolve the entire tree before moving to - * the next step. - */ - this.updateProjection = () => { - this.projectionUpdateScheduled = false; - /** - * Reset debug counts. Manually resetting rather than creating a new - * object each frame. - */ - if (statsBuffer.value) { - metrics.nodes = - metrics.calculatedTargetDeltas = - metrics.calculatedProjections = - 0; - } - this.nodes.forEach(propagateDirtyNodes); - this.nodes.forEach(resolveTargetDelta); - this.nodes.forEach(calcProjection); - this.nodes.forEach(cleanDirtyNodes); - if (statsBuffer.addProjectionMetrics) { - statsBuffer.addProjectionMetrics(metrics); - } - }; - /** - * Frame calculations - */ - this.resolvedRelativeTargetAt = 0.0; - this.linkedParentVersion = 0; - this.hasProjected = false; - this.isVisible = true; - this.animationProgress = 0; - /** - * Shared layout - */ - // TODO Only running on root node - this.sharedNodes = new Map(); - this.latestValues = latestValues; - this.root = parent ? parent.root || parent : this; - this.path = parent ? [...parent.path, parent] : []; - this.parent = parent; - this.depth = parent ? parent.depth + 1 : 0; - for (let i = 0; i < this.path.length; i++) { - this.path[i].shouldResetTransform = true; - } - if (this.root === this) - this.nodes = new FlatTree(); - } - addEventListener(name, handler) { - if (!this.eventHandlers.has(name)) { - this.eventHandlers.set(name, new SubscriptionManager()); - } - return this.eventHandlers.get(name).add(handler); - } - notifyListeners(name, ...args) { - const subscriptionManager = this.eventHandlers.get(name); - subscriptionManager && subscriptionManager.notify(...args); - } - hasListeners(name) { - return this.eventHandlers.has(name); - } - /** - * Lifecycles - */ - mount(instance) { - if (this.instance) - return; - this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance); - this.instance = instance; - const { layoutId, layout, visualElement } = this.options; - if (visualElement && !visualElement.current) { - visualElement.mount(instance); - } - this.root.nodes.add(this); - this.parent && this.parent.children.add(this); - if (this.root.hasTreeAnimated && (layout || layoutId)) { - this.isLayoutDirty = true; - } - if (attachResizeListener) { - let cancelDelay; - let innerWidth = 0; - const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false); - // Set initial innerWidth in a frame.read callback to batch the read - frame.read(() => { - innerWidth = window.innerWidth; - }); - attachResizeListener(instance, () => { - const newInnerWidth = window.innerWidth; - if (newInnerWidth === innerWidth) - return; - innerWidth = newInnerWidth; - this.root.updateBlockedByResize = true; - cancelDelay && cancelDelay(); - cancelDelay = delay(resizeUnblockUpdate, 250); - if (globalProjectionState.hasAnimatedSinceResize) { - globalProjectionState.hasAnimatedSinceResize = false; - this.nodes.forEach(finishAnimation); - } - }); - } - if (layoutId) { - this.root.registerSharedNode(layoutId, this); - } - // Only register the handler if it requires layout animation - if (this.options.animate !== false && - visualElement && - (layoutId || layout)) { - this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout, }) => { - if (this.isTreeAnimationBlocked()) { - this.target = undefined; - this.relativeTarget = undefined; - return; - } - // TODO: Check here if an animation exists - const layoutTransition = this.options.transition || - visualElement.getDefaultTransition() || - defaultLayoutTransition; - const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps(); - /** - * The target layout of the element might stay the same, - * but its position relative to its parent has changed. - */ - const hasTargetChanged = !this.targetLayout || - !boxEqualsRounded(this.targetLayout, newLayout); - /* - * Note: Disabled to fix relative animations always triggering new - * layout animations. If this causes further issues, we can try - * a different approach to detecting relative target changes. - */ - // || hasRelativeLayoutChanged - /** - * If the layout hasn't seemed to have changed, it might be that the - * element is visually in the same place in the document but its position - * relative to its parent has indeed changed. So here we check for that. - */ - const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged; - if (this.options.layoutRoot || - this.resumeFrom || - hasOnlyRelativeTargetChanged || - (hasLayoutChanged && - (hasTargetChanged || !this.currentAnimation))) { - if (this.resumeFrom) { - this.resumingFrom = this.resumeFrom; - this.resumingFrom.resumingFrom = undefined; - } - const animationOptions = { - ...getValueTransition$1(layoutTransition, "layout"), - onPlay: onLayoutAnimationStart, - onComplete: onLayoutAnimationComplete, - }; - if (visualElement.shouldReduceMotion || - this.options.layoutRoot) { - animationOptions.delay = 0; - animationOptions.type = false; - } - this.startAnimation(animationOptions); - /** - * Set animation origin after starting animation to avoid layout jump - * caused by stopping previous layout animation - */ - this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged, animationOptions - .path); - } - else { - /** - * If the layout hasn't changed and we have an animation that hasn't started yet, - * finish it immediately. Otherwise it will be animating from a location - * that was probably never committed to screen and look like a jumpy box. - */ - if (!hasLayoutChanged) { - finishAnimation(this); - } - if (this.isLead() && this.options.onExitComplete) { - this.options.onExitComplete(); - } - } - this.targetLayout = newLayout; - }); - } - } - unmount() { - this.options.layoutId && this.willUpdate(); - this.root.nodes.remove(this); - const stack = this.getStack(); - stack && stack.remove(this); - this.parent && this.parent.children.delete(this); - this.instance = undefined; - this.eventHandlers.clear(); - cancelFrame(this.updateProjection); - } - // only on the root - blockUpdate() { - this.updateManuallyBlocked = true; - } - unblockUpdate() { - this.updateManuallyBlocked = false; - } - isUpdateBlocked() { - return this.updateManuallyBlocked || this.updateBlockedByResize; - } - isTreeAnimationBlocked() { - return (this.isAnimationBlocked || - (this.parent && this.parent.isTreeAnimationBlocked()) || - false); - } - // Note: currently only running on root node - startUpdate() { - if (this.isUpdateBlocked()) - return; - this.isUpdating = true; - this.nodes && this.nodes.forEach(resetSkewAndRotation); - this.animationId++; - } - getTransformTemplate() { - const { visualElement } = this.options; - return visualElement && visualElement.getProps().transformTemplate; - } - willUpdate(shouldNotifyListeners = true) { - this.root.hasTreeAnimated = true; - if (this.root.isUpdateBlocked()) { - this.options.onExitComplete && this.options.onExitComplete(); - return; - } - /** - * If we're running optimised appear animations then these must be - * cancelled before measuring the DOM. This is so we can measure - * the true layout of the element rather than the WAAPI animation - * which will be unaffected by the resetSkewAndRotate step. - * - * Note: This is a DOM write. Worst case scenario is this is sandwiched - * between other snapshot reads which will cause unnecessary style recalculations. - * This has to happen here though, as we don't yet know which nodes will need - * snapshots in startUpdate(), but we only want to cancel optimised animations - * if a layout animation measurement is actually going to be affected by them. - */ - if (window.MotionCancelOptimisedAnimation && - !this.hasCheckedOptimisedAppear) { - cancelTreeOptimisedTransformAnimations(this); - } - !this.root.isUpdating && this.root.startUpdate(); - if (this.isLayoutDirty) - return; - this.isLayoutDirty = true; - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - node.shouldResetTransform = true; - /** - * Percentage translates resolve against layoutBox dimensions, - * so ancestors with them must be re-measured after transform reset. - */ - if (typeof node.latestValues.x === "string" || - typeof node.latestValues.y === "string") { - node.isLayoutDirty = true; - } - node.updateScroll("snapshot"); - if (node.options.layoutRoot) { - node.willUpdate(false); - } - } - const { layoutId, layout } = this.options; - if (layoutId === undefined && !layout) - return; - const transformTemplate = this.getTransformTemplate(); - this.prevTransformTemplateValue = transformTemplate - ? transformTemplate(this.latestValues, "") - : undefined; - this.updateSnapshot(); - shouldNotifyListeners && this.notifyListeners("willUpdate"); - } - update() { - this.updateScheduled = false; - const updateWasBlocked = this.isUpdateBlocked(); - // When doing an instant transition, we skip the layout update, - // but should still clean up the measurements so that the next - // snapshot could be taken correctly. - if (updateWasBlocked) { - const wasBlockedByResize = this.updateBlockedByResize; - this.unblockUpdate(); - this.updateBlockedByResize = false; - this.clearAllSnapshots(); - /** - * When blocked by resize, still measure layouts so - * callbacks like onLayoutMeasure fire (e.g. Reorder). - * Skip notifyLayoutUpdate to prevent animations. - */ - if (wasBlockedByResize) { - this.nodes.forEach(forceLayoutMeasure); - } - this.nodes.forEach(clearMeasurements); - return; - } - /** - * If this is a repeat of didUpdate then ignore the animation. - */ - if (this.animationId <= this.animationCommitId) { - this.nodes.forEach(clearIsLayoutDirty); - return; - } - this.animationCommitId = this.animationId; - if (!this.isUpdating) { - this.nodes.forEach(clearIsLayoutDirty); - } - else { - this.isUpdating = false; - /** - * Ensure animation-blocked nodes (e.g. during drag) - * get measured even when memoized (willUpdate skipped). - */ - this.nodes.forEach(ensureDraggedNodesSnapshotted); - /** - * Write - */ - this.nodes.forEach(resetTransformStyle); - /** - * Read ================== - */ - // Update layout measurements of updated children - this.nodes.forEach(updateLayout); - /** - * Write - */ - // Notify listeners that the layout is updated - this.nodes.forEach(notifyLayoutUpdate); - } - this.clearAllSnapshots(); - /** - * Manually flush any pending updates. Ideally - * we could leave this to the following requestAnimationFrame but this seems - * to leave a flash of incorrectly styled content. - */ - const now = time.now(); - frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp); - frameData.timestamp = now; - frameData.isProcessing = true; - frameSteps.update.process(frameData); - frameSteps.preRender.process(frameData); - frameSteps.render.process(frameData); - frameData.isProcessing = false; - } - didUpdate() { - if (!this.updateScheduled) { - this.updateScheduled = true; - microtask.read(this.scheduleUpdate); - } - } - clearAllSnapshots() { - this.nodes.forEach(clearSnapshot); - this.sharedNodes.forEach(removeLeadSnapshots); - } - scheduleUpdateProjection() { - if (!this.projectionUpdateScheduled) { - this.projectionUpdateScheduled = true; - frame.preRender(this.updateProjection, false, true); - } - } - scheduleCheckAfterUnmount() { - /** - * If the unmounting node is in a layoutGroup and did trigger a willUpdate, - * we manually call didUpdate to give a chance to the siblings to animate. - * Otherwise, cleanup all snapshots to prevents future nodes from reusing them. - */ - frame.postRender(() => { - if (this.isLayoutDirty) { - this.root.didUpdate(); - } - else { - this.root.checkUpdateFailed(); - } - }); - } - /** - * Update measurements - */ - updateSnapshot() { - if (this.snapshot || !this.instance) - return; - this.snapshot = this.measure(); - if (this.snapshot && - !calcLength(this.snapshot.measuredBox.x) && - !calcLength(this.snapshot.measuredBox.y)) { - this.snapshot = undefined; - } - } - updateLayout() { - if (!this.instance) - return; - this.updateScroll(); - if (!(this.options.alwaysMeasureLayout && this.isLead()) && - !this.isLayoutDirty) { - return; - } - /** - * When a node is mounted, it simply resumes from the prevLead's - * snapshot instead of taking a new one, but the ancestors scroll - * might have updated while the prevLead is unmounted. We need to - * update the scroll again to make sure the layout we measure is - * up to date. - */ - if (this.resumeFrom && !this.resumeFrom.instance) { - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - node.updateScroll(); - } - } - const prevLayout = this.layout; - this.layout = this.measure(false); - this.layoutVersion++; - if (!this.layoutCorrected) - this.layoutCorrected = createBox(); - this.isLayoutDirty = false; - this.projectionDelta = undefined; - this.notifyListeners("measure", this.layout.layoutBox); - const { visualElement } = this.options; - visualElement && - visualElement.notify("LayoutMeasure", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined); - } - updateScroll(phase = "measure") { - let needsMeasurement = Boolean(this.options.layoutScroll && this.instance); - if (this.scroll && - this.scroll.animationId === this.root.animationId && - this.scroll.phase === phase) { - needsMeasurement = false; - } - if (needsMeasurement && this.instance) { - const isRoot = checkIsScrollRoot(this.instance); - this.scroll = { - animationId: this.root.animationId, - phase, - isRoot, - offset: measureScroll(this.instance), - wasRoot: this.scroll ? this.scroll.isRoot : isRoot, - }; - } - } - resetTransform() { - if (!resetTransform) - return; - const isResetRequested = this.isLayoutDirty || - this.shouldResetTransform || - this.options.alwaysMeasureLayout; - const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta); - const transformTemplate = this.getTransformTemplate(); - const transformTemplateValue = transformTemplate - ? transformTemplate(this.latestValues, "") - : undefined; - const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue; - if (isResetRequested && - this.instance && - (hasProjection || - hasTransform(this.latestValues) || - transformTemplateHasChanged)) { - resetTransform(this.instance, transformTemplateValue); - this.shouldResetTransform = false; - this.scheduleRender(); - } - } - measure(removeTransform = true) { - const pageBox = this.measurePageBox(); - let layoutBox = this.removeElementScroll(pageBox); - /** - * Measurements taken during the pre-render stage - * still have transforms applied so we remove them - * via calculation. - */ - if (removeTransform) { - layoutBox = this.removeTransform(layoutBox); - } - roundBox(layoutBox); - return { - animationId: this.root.animationId, - measuredBox: pageBox, - layoutBox, - latestValues: {}, - source: this.id, - }; - } - measurePageBox() { - const { visualElement } = this.options; - if (!visualElement) - return createBox(); - const box = visualElement.measureViewportBox(); - const wasInScrollRoot = this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot); - if (!wasInScrollRoot) { - // Remove viewport scroll to give page-relative coordinates - const { scroll } = this.root; - if (scroll) { - translateAxis(box.x, scroll.offset.x); - translateAxis(box.y, scroll.offset.y); - } - } - return box; - } - removeElementScroll(box) { - const boxWithoutScroll = createBox(); - copyBoxInto(boxWithoutScroll, box); - if (this.scroll?.wasRoot) { - return boxWithoutScroll; - } - /** - * Performance TODO: Keep a cumulative scroll offset down the tree - * rather than loop back up the path. - */ - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - const { scroll, options } = node; - if (node !== this.root && scroll && options.layoutScroll) { - /** - * If this is a new scroll root, we want to remove all previous scrolls - * from the viewport box. - */ - if (scroll.wasRoot) { - copyBoxInto(boxWithoutScroll, box); - } - translateAxis(boxWithoutScroll.x, scroll.offset.x); - translateAxis(boxWithoutScroll.y, scroll.offset.y); - } - } - return boxWithoutScroll; - } - applyTransform(box, transformOnly = false, output) { - const withTransforms = output || createBox(); - copyBoxInto(withTransforms, box); - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - if (!transformOnly && - node.options.layoutScroll && - node.scroll && - node !== node.root) { - translateAxis(withTransforms.x, -node.scroll.offset.x); - translateAxis(withTransforms.y, -node.scroll.offset.y); - } - if (!hasTransform(node.latestValues)) - continue; - transformBox(withTransforms, node.latestValues, node.layout?.layoutBox); - } - if (hasTransform(this.latestValues)) { - transformBox(withTransforms, this.latestValues, this.layout?.layoutBox); - } - return withTransforms; - } - removeTransform(box) { - const boxWithoutTransform = createBox(); - copyBoxInto(boxWithoutTransform, box); - for (let i = 0; i < this.path.length; i++) { - const node = this.path[i]; - if (!hasTransform(node.latestValues)) - continue; - let sourceBox; - if (node.instance) { - hasScale(node.latestValues) && node.updateSnapshot(); - sourceBox = createBox(); - copyBoxInto(sourceBox, node.measurePageBox()); - } - removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot?.layoutBox, sourceBox); - } - if (hasTransform(this.latestValues)) { - removeBoxTransforms(boxWithoutTransform, this.latestValues); - } - return boxWithoutTransform; - } - setTargetDelta(delta) { - this.targetDelta = delta; - this.root.scheduleUpdateProjection(); - this.isProjectionDirty = true; - } - setOptions(options) { - this.options = { - ...this.options, - ...options, - crossfade: options.crossfade !== undefined ? options.crossfade : true, - }; - } - clearMeasurements() { - this.scroll = undefined; - this.layout = undefined; - this.snapshot = undefined; - this.prevTransformTemplateValue = undefined; - this.targetDelta = undefined; - this.target = undefined; - this.isLayoutDirty = false; - } - forceRelativeParentToResolveTarget() { - if (!this.relativeParent) - return; - /** - * If the parent target isn't up-to-date, force it to update. - * This is an unfortunate de-optimisation as it means any updating relative - * projection will cause all the relative parents to recalculate back - * up the tree. - */ - if (this.relativeParent.resolvedRelativeTargetAt !== - frameData.timestamp) { - this.relativeParent.resolveTargetDelta(true); - } - } - resolveTargetDelta(forceRecalculation = false) { - /** - * Once the dirty status of nodes has been spread through the tree, we also - * need to check if we have a shared node of a different depth that has itself - * been dirtied. - */ - const lead = this.getLead(); - this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty); - this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty); - this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty); - const isShared = Boolean(this.resumingFrom) || this !== lead; - /** - * We don't use transform for this step of processing so we don't - * need to check whether any nodes have changed transform. - */ - const canSkip = !(forceRecalculation || - (isShared && this.isSharedProjectionDirty) || - this.isProjectionDirty || - this.parent?.isProjectionDirty || - this.attemptToResolveRelativeTarget || - this.root.updateBlockedByResize); - if (canSkip) - return; - const { layout, layoutId } = this.options; - /** - * If we have no layout, we can't perform projection, so early return - */ - if (!this.layout || !(layout || layoutId)) - return; - this.resolvedRelativeTargetAt = frameData.timestamp; - const relativeParent = this.getClosestProjectingParent(); - if (relativeParent && - this.linkedParentVersion !== relativeParent.layoutVersion && - !relativeParent.options.layoutRoot) { - this.removeRelativeTarget(); - } - /** - * If we don't have a targetDelta but do have a layout, we can attempt to resolve - * a relativeParent. This will allow a component to perform scale correction - * even if no animation has started. - */ - if (!this.targetDelta && !this.relativeTarget) { - if (this.options.layoutAnchor !== false && - relativeParent && - relativeParent.layout) { - this.createRelativeTarget(relativeParent, this.layout.layoutBox, relativeParent.layout.layoutBox); - } - else { - this.removeRelativeTarget(); - } - } - /** - * If we have no relative target or no target delta our target isn't valid - * for this frame. - */ - if (!this.relativeTarget && !this.targetDelta) - return; - /** - * Lazy-init target data structure - */ - if (!this.target) { - this.target = createBox(); - this.targetWithTransforms = createBox(); - } - /** - * If we've got a relative box for this component, resolve it into a target relative to the parent. - */ - if (this.relativeTarget && - this.relativeTargetOrigin && - this.relativeParent && - this.relativeParent.target) { - this.forceRelativeParentToResolveTarget(); - calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || undefined); - /** - * If we've only got a targetDelta, resolve it into a target - */ - } - else if (this.targetDelta) { - if (Boolean(this.resumingFrom)) { - this.applyTransform(this.layout.layoutBox, false, this.target); - } - else { - copyBoxInto(this.target, this.layout.layoutBox); - } - applyBoxDelta(this.target, this.targetDelta); - } - else { - /** - * If no target, use own layout as target - */ - copyBoxInto(this.target, this.layout.layoutBox); - } - /** - * If we've been told to attempt to resolve a relative target, do so. - */ - if (this.attemptToResolveRelativeTarget) { - this.attemptToResolveRelativeTarget = false; - if (this.options.layoutAnchor !== false && - relativeParent && - Boolean(relativeParent.resumingFrom) === - Boolean(this.resumingFrom) && - !relativeParent.options.layoutScroll && - relativeParent.target && - this.animationProgress !== 1) { - this.createRelativeTarget(relativeParent, this.target, relativeParent.target); - } - else { - this.relativeParent = this.relativeTarget = undefined; - } - } - /** - * Increase debug counter for resolved target deltas - */ - if (statsBuffer.value) { - metrics.calculatedTargetDeltas++; - } - } - getClosestProjectingParent() { - if (!this.parent || - hasScale(this.parent.latestValues) || - has2DTranslate(this.parent.latestValues)) { - return undefined; - } - if (this.parent.isProjecting()) { - return this.parent; - } - else { - return this.parent.getClosestProjectingParent(); - } - } - isProjecting() { - return Boolean((this.relativeTarget || - this.targetDelta || - this.options.layoutRoot) && - this.layout); - } - createRelativeTarget(relativeParent, layout, parentLayout) { - this.relativeParent = relativeParent; - this.linkedParentVersion = relativeParent.layoutVersion; - this.forceRelativeParentToResolveTarget(); - this.relativeTarget = createBox(); - this.relativeTargetOrigin = createBox(); - calcRelativePosition(this.relativeTargetOrigin, layout, parentLayout, this.options.layoutAnchor || undefined); - copyBoxInto(this.relativeTarget, this.relativeTargetOrigin); - } - removeRelativeTarget() { - this.relativeParent = this.relativeTarget = undefined; - } - calcProjection() { - const lead = this.getLead(); - const isShared = Boolean(this.resumingFrom) || this !== lead; - let canSkip = true; - /** - * If this is a normal layout animation and neither this node nor its nearest projecting - * is dirty then we can't skip. - */ - if (this.isProjectionDirty || this.parent?.isProjectionDirty) { - canSkip = false; - } - /** - * If this is a shared layout animation and this node's shared projection is dirty then - * we can't skip. - */ - if (isShared && - (this.isSharedProjectionDirty || this.isTransformDirty)) { - canSkip = false; - } - /** - * If we have resolved the target this frame we must recalculate the - * projection to ensure it visually represents the internal calculations. - */ - if (this.resolvedRelativeTargetAt === frameData.timestamp) { - canSkip = false; - } - if (canSkip) - return; - const { layout, layoutId } = this.options; - /** - * If this section of the tree isn't animating we can - * delete our target sources for the following frame. - */ - this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) || - this.currentAnimation || - this.pendingAnimation); - if (!this.isTreeAnimating) { - this.targetDelta = this.relativeTarget = undefined; - } - if (!this.layout || !(layout || layoutId)) - return; - /** - * Reset the corrected box with the latest values from box, as we're then going - * to perform mutative operations on it. - */ - copyBoxInto(this.layoutCorrected, this.layout.layoutBox); - /** - * Record previous tree scales before updating. - */ - const prevTreeScaleX = this.treeScale.x; - const prevTreeScaleY = this.treeScale.y; - /** - * Apply all the parent deltas to this box to produce the corrected box. This - * is the layout box, as it will appear on screen as a result of the transforms of its parents. - */ - applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared); - /** - * If this layer needs to perform scale correction but doesn't have a target, - * use the layout as the target. - */ - if (lead.layout && - !lead.target && - (this.treeScale.x !== 1 || this.treeScale.y !== 1)) { - lead.target = lead.layout.layoutBox; - lead.targetWithTransforms = createBox(); - } - const { target } = lead; - if (!target) { - /** - * If we don't have a target to project into, but we were previously - * projecting, we want to remove the stored transform and schedule - * a render to ensure the elements reflect the removed transform. - */ - if (this.prevProjectionDelta) { - this.createProjectionDeltas(); - this.scheduleRender(); - } - return; - } - if (!this.projectionDelta || !this.prevProjectionDelta) { - this.createProjectionDeltas(); - } - else { - copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x); - copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y); - } - /** - * Update the delta between the corrected box and the target box before user-set transforms were applied. - * This will allow us to calculate the corrected borderRadius and boxShadow to compensate - * for our layout reprojection, but still allow them to be scaled correctly by the user. - * It might be that to simplify this we may want to accept that user-set scale is also corrected - * and we wouldn't have to keep and calc both deltas, OR we could support a user setting - * to allow people to choose whether these styles are corrected based on just the - * layout reprojection or the final bounding box. - */ - calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues); - if (this.treeScale.x !== prevTreeScaleX || - this.treeScale.y !== prevTreeScaleY || - !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) || - !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) { - this.hasProjected = true; - this.scheduleRender(); - this.notifyListeners("projectionUpdate", target); - } - /** - * Increase debug counter for recalculated projections - */ - if (statsBuffer.value) { - metrics.calculatedProjections++; - } - } - hide() { - this.isVisible = false; - // TODO: Schedule render - } - show() { - this.isVisible = true; - // TODO: Schedule render - } - scheduleRender(notifyAll = true) { - this.options.visualElement?.scheduleRender(); - if (notifyAll) { - const stack = this.getStack(); - stack && stack.scheduleRender(); - } - if (this.resumingFrom && !this.resumingFrom.instance) { - this.resumingFrom = undefined; - } - } - createProjectionDeltas() { - this.prevProjectionDelta = createDelta(); - this.projectionDelta = createDelta(); - this.projectionDeltaWithTransform = createDelta(); - } - setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false, pathFn) { - const snapshot = this.snapshot; - const snapshotLatestValues = snapshot ? snapshot.latestValues : {}; - const mixedValues = { ...this.latestValues }; - const targetDelta = createDelta(); - if (!this.relativeParent || - !this.relativeParent.options.layoutRoot) { - this.relativeTarget = this.relativeTargetOrigin = undefined; - } - this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged; - const relativeLayout = createBox(); - const snapshotSource = snapshot ? snapshot.source : undefined; - const layoutSource = this.layout ? this.layout.source : undefined; - const isSharedLayoutAnimation = snapshotSource !== layoutSource; - const stack = this.getStack(); - const isOnlyMember = !stack || stack.members.length <= 1; - const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && - !isOnlyMember && - this.options.crossfade === true && - !this.path.some(hasOpacityCrossfade)); - this.animationProgress = 0; - let prevRelativeTarget; - // The path decides whether the layout shift is worth curving - // (distance floor) and resolves the interpolator from the delta. - const interpolate = pathFn?.interpolateProjection(delta); - this.mixTargetDelta = (latest) => { - const progress = latest / 1000; - const point = interpolate?.(progress); - if (point) { - targetDelta.x.translate = point.x; - targetDelta.x.scale = mixNumber$1(delta.x.scale, 1, progress); - targetDelta.x.origin = delta.x.origin; - targetDelta.x.originPoint = delta.x.originPoint; - targetDelta.y.translate = point.y; - targetDelta.y.scale = mixNumber$1(delta.y.scale, 1, progress); - targetDelta.y.origin = delta.y.origin; - targetDelta.y.originPoint = delta.y.originPoint; - } - else { - mixAxisDeltaLinear(targetDelta.x, delta.x, progress); - mixAxisDeltaLinear(targetDelta.y, delta.y, progress); - } - this.setTargetDelta(targetDelta); - if (this.relativeTarget && - this.relativeTargetOrigin && - this.layout && - this.relativeParent && - this.relativeParent.layout) { - calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || undefined); - mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress); - /** - * If this is an unchanged relative target we can consider the - * projection not dirty. - */ - if (prevRelativeTarget && - boxEquals(this.relativeTarget, prevRelativeTarget)) { - this.isProjectionDirty = false; - } - if (!prevRelativeTarget) - prevRelativeTarget = createBox(); - copyBoxInto(prevRelativeTarget, this.relativeTarget); - } - if (isSharedLayoutAnimation) { - this.animationValues = mixedValues; - mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember); - } - if (point && point.rotate !== undefined) { - // Dedicated `pathRotation` channel, not `rotate`, so an - // animating `rotate` is composed with, never clobbered. - if (!this.animationValues) - this.animationValues = mixedValues; - this.animationValues.pathRotation = point.rotate; - } - this.root.scheduleUpdateProjection(); - this.scheduleRender(); - this.animationProgress = progress; - }; - this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0); - } - startAnimation(options) { - this.notifyListeners("animationStart"); - this.currentAnimation?.stop(); - this.resumingFrom?.currentAnimation?.stop(); - if (this.pendingAnimation) { - cancelFrame(this.pendingAnimation); - this.pendingAnimation = undefined; - } - /** - * Start the animation in the next frame to have a frame with progress 0, - * where the target is the same as when the animation started, so we can - * calculate the relative positions correctly for instant transitions. - */ - this.pendingAnimation = frame.update(() => { - globalProjectionState.hasAnimatedSinceResize = true; - activeAnimations.layout++; - this.motionValue || (this.motionValue = motionValue(0)); - this.motionValue.jump(0, false); - this.currentAnimation = animateSingleValue(this.motionValue, [0, 1000], { - ...options, - velocity: 0, - isSync: true, - onUpdate: (latest) => { - this.mixTargetDelta(latest); - options.onUpdate && options.onUpdate(latest); - }, - onStop: () => { - activeAnimations.layout--; - }, - onComplete: () => { - activeAnimations.layout--; - options.onComplete && options.onComplete(); - this.completeAnimation(); - }, - }); - if (this.resumingFrom) { - this.resumingFrom.currentAnimation = this.currentAnimation; - } - this.pendingAnimation = undefined; - }); - } - completeAnimation() { - if (this.resumingFrom) { - this.resumingFrom.currentAnimation = undefined; - this.resumingFrom.preserveOpacity = undefined; - } - const stack = this.getStack(); - stack && stack.exitAnimationComplete(); - this.resumingFrom = - this.currentAnimation = - this.animationValues = - undefined; - this.notifyListeners("animationComplete"); - } - finishAnimation() { - if (this.currentAnimation) { - this.mixTargetDelta && this.mixTargetDelta(animationTarget); - this.currentAnimation.stop(); - } - this.completeAnimation(); - } - applyTransformsToTarget() { - const lead = this.getLead(); - let { targetWithTransforms, target, layout, latestValues } = lead; - if (!targetWithTransforms || !target || !layout) - return; - /** - * If we're only animating position, and this element isn't the lead element, - * then instead of projecting into the lead box we instead want to calculate - * a new target that aligns the two boxes but maintains the layout shape. - */ - if (this !== lead && - this.layout && - layout && - shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) { - target = this.target || createBox(); - const xLength = calcLength(this.layout.layoutBox.x); - target.x.min = lead.target.x.min; - target.x.max = target.x.min + xLength; - const yLength = calcLength(this.layout.layoutBox.y); - target.y.min = lead.target.y.min; - target.y.max = target.y.min + yLength; - } - copyBoxInto(targetWithTransforms, target); - /** - * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal. - * This is the final box that we will then project into by calculating a transform delta and - * applying it to the corrected box. - */ - transformBox(targetWithTransforms, latestValues); - /** - * Update the delta between the corrected box and the final target box, after - * user-set transforms are applied to it. This will be used by the renderer to - * create a transform style that will reproject the element from its layout layout - * into the desired bounding box. - */ - calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues); - } - registerSharedNode(layoutId, node) { - if (!this.sharedNodes.has(layoutId)) { - this.sharedNodes.set(layoutId, new NodeStack()); - } - const stack = this.sharedNodes.get(layoutId); - stack.add(node); - const config = node.options.initialPromotionConfig; - node.promote({ - transition: config ? config.transition : undefined, - preserveFollowOpacity: config && config.shouldPreserveFollowOpacity - ? config.shouldPreserveFollowOpacity(node) - : undefined, - }); - } - isLead() { - const stack = this.getStack(); - return stack ? stack.lead === this : true; - } - getLead() { - const { layoutId } = this.options; - return layoutId ? this.getStack()?.lead || this : this; - } - getPrevLead() { - const { layoutId } = this.options; - return layoutId ? this.getStack()?.prevLead : undefined; - } - getStack() { - const { layoutId } = this.options; - if (layoutId) - return this.root.sharedNodes.get(layoutId); - } - promote({ needsReset, transition, preserveFollowOpacity, } = {}) { - const stack = this.getStack(); - if (stack) - stack.promote(this, preserveFollowOpacity); - if (needsReset) { - this.projectionDelta = undefined; - this.needsReset = true; - } - if (transition) - this.setOptions({ transition }); - } - relegate() { - const stack = this.getStack(); - if (stack) { - return stack.relegate(this); - } - else { - return false; - } - } - resetSkewAndRotation() { - const { visualElement } = this.options; - if (!visualElement) - return; - // If there's no detected skew or rotation values, we can early return without a forced render. - let hasDistortingTransform = false; - /** - * An unrolled check for rotation values. Most elements don't have any rotation and - * skipping the nested loop and new object creation is 50% faster. - */ - const { latestValues } = visualElement; - if (latestValues.z || - latestValues.rotate || - latestValues.rotateX || - latestValues.rotateY || - latestValues.rotateZ || - latestValues.skewX || - latestValues.skewY) { - hasDistortingTransform = true; - } - // If there's no distorting values, we don't need to do any more. - if (!hasDistortingTransform) - return; - const resetValues = {}; - if (latestValues.z) { - resetDistortingTransform("z", visualElement, resetValues, this.animationValues); - } - // Check the skew and rotate value of all axes and reset to 0 - for (let i = 0; i < transformAxes.length; i++) { - resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues); - resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues); - } - // Force a render of this element to apply the transform with all skews and rotations - // set to 0. - visualElement.render(); - // Put back all the values we reset - for (const key in resetValues) { - visualElement.setStaticValue(key, resetValues[key]); - if (this.animationValues) { - this.animationValues[key] = resetValues[key]; - } - } - // Schedule a render for the next frame. This ensures we won't visually - // see the element with the reset rotate value applied. - visualElement.scheduleRender(); - } - applyProjectionStyles(targetStyle, // CSSStyleDeclaration - doesn't allow numbers to be assigned to properties - styleProp) { - if (!this.instance || this.isSVG) - return; - if (!this.isVisible) { - targetStyle.visibility = "hidden"; - return; - } - const transformTemplate = this.getTransformTemplate(); - if (this.needsReset) { - this.needsReset = false; - targetStyle.visibility = ""; - targetStyle.opacity = ""; - targetStyle.pointerEvents = - resolveMotionValue(styleProp?.pointerEvents) || ""; - targetStyle.transform = transformTemplate - ? transformTemplate(this.latestValues, "") - : "none"; - return; - } - const lead = this.getLead(); - if (!this.projectionDelta || !this.layout || !lead.target) { - if (this.options.layoutId) { - targetStyle.opacity = - this.latestValues.opacity !== undefined - ? this.latestValues.opacity - : 1; - targetStyle.pointerEvents = - resolveMotionValue(styleProp?.pointerEvents) || ""; - } - if (this.hasProjected && !hasTransform(this.latestValues)) { - targetStyle.transform = transformTemplate - ? transformTemplate({}, "") - : "none"; - this.hasProjected = false; - } - return; - } - targetStyle.visibility = ""; - const valuesToRender = lead.animationValues || lead.latestValues; - this.applyTransformsToTarget(); - let transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender); - if (transformTemplate) { - transform = transformTemplate(valuesToRender, transform); - } - targetStyle.transform = transform; - const { x, y } = this.projectionDelta; - targetStyle.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`; - if (lead.animationValues) { - /** - * If the lead component is animating, assign this either the entering/leaving - * opacity - */ - targetStyle.opacity = - lead === this - ? valuesToRender.opacity ?? - this.latestValues.opacity ?? - 1 - : this.preserveOpacity - ? this.latestValues.opacity - : valuesToRender.opacityExit; - } - else { - /** - * Or we're not animating at all, set the lead component to its layout - * opacity and other components to hidden. - */ - targetStyle.opacity = - lead === this - ? valuesToRender.opacity !== undefined - ? valuesToRender.opacity - : "" - : valuesToRender.opacityExit !== undefined - ? valuesToRender.opacityExit - : 0; - } - /** - * Apply scale correction - */ - for (const key in scaleCorrectors) { - if (valuesToRender[key] === undefined) - continue; - const { correct, applyTo, isCSSVariable } = scaleCorrectors[key]; - /** - * Only apply scale correction to the value if we have an - * active projection transform. Otherwise these values become - * vulnerable to distortion if the element changes size without - * a corresponding layout animation. - */ - const corrected = transform === "none" - ? valuesToRender[key] - : correct(valuesToRender[key], lead); - if (applyTo) { - const num = applyTo.length; - for (let i = 0; i < num; i++) { - targetStyle[applyTo[i]] = corrected; - } - } - else { - // If this is a CSS variable, set it directly on the instance. - // Replacing this function from creating styles to setting them - // would be a good place to remove per frame object creation - if (isCSSVariable) { - this.options.visualElement.renderState.vars[key] = corrected; - } - else { - targetStyle[key] = corrected; - } - } - } - /** - * Disable pointer events on follow components. This is to ensure - * that if a follow component covers a lead component it doesn't block - * pointer events on the lead. - */ - if (this.options.layoutId) { - targetStyle.pointerEvents = - lead === this - ? resolveMotionValue(styleProp?.pointerEvents) || "" - : "none"; - } - } - clearSnapshot() { - this.resumeFrom = this.snapshot = undefined; - } - // Only run on root - resetTree() { - this.root.nodes.forEach((node) => node.currentAnimation?.stop()); - this.root.nodes.forEach(clearMeasurements); - this.root.sharedNodes.clear(); - } - }; - } - function updateLayout(node) { - node.updateLayout(); - } - function notifyLayoutUpdate(node) { - const snapshot = node.resumeFrom?.snapshot || node.snapshot; - if (node.isLead() && - node.layout && - snapshot && - node.hasListeners("didUpdate")) { - const { layoutBox: layout, measuredBox: measuredLayout } = node.layout; - const { animationType } = node.options; - const isShared = snapshot.source !== node.layout.source; - // TODO Maybe we want to also resize the layout snapshot so we don't trigger - // animations for instance if layout="size" and an element has only changed position - if (animationType === "size") { - eachAxis((axis) => { - const axisSnapshot = isShared - ? snapshot.measuredBox[axis] - : snapshot.layoutBox[axis]; - const length = calcLength(axisSnapshot); - axisSnapshot.min = layout[axis].min; - axisSnapshot.max = axisSnapshot.min + length; - }); - } - else if (animationType === "x" || animationType === "y") { - const snapAxis = animationType === "x" ? "y" : "x"; - copyAxisInto(isShared - ? snapshot.measuredBox[snapAxis] - : snapshot.layoutBox[snapAxis], layout[snapAxis]); - } - else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) { - eachAxis((axis) => { - const axisSnapshot = isShared - ? snapshot.measuredBox[axis] - : snapshot.layoutBox[axis]; - const length = calcLength(layout[axis]); - axisSnapshot.max = axisSnapshot.min + length; - /** - * Ensure relative target gets resized and rerendererd - */ - if (node.relativeTarget && !node.currentAnimation) { - node.isProjectionDirty = true; - node.relativeTarget[axis].max = - node.relativeTarget[axis].min + length; - } - }); - } - const layoutDelta = createDelta(); - calcBoxDelta(layoutDelta, layout, snapshot.layoutBox); - const visualDelta = createDelta(); - if (isShared) { - calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox); - } - else { - calcBoxDelta(visualDelta, layout, snapshot.layoutBox); - } - const hasLayoutChanged = !isDeltaZero(layoutDelta); - let hasRelativeLayoutChanged = false; - if (!node.resumeFrom) { - const relativeParent = node.getClosestProjectingParent(); - /** - * If the relativeParent is itself resuming from a different element then - * the relative snapshot is not relavent - */ - if (relativeParent && !relativeParent.resumeFrom) { - const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent; - if (parentSnapshot && parentLayout) { - const anchor = node.options.layoutAnchor || undefined; - const relativeSnapshot = createBox(); - calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox, anchor); - const relativeLayout = createBox(); - calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox, anchor); - if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) { - hasRelativeLayoutChanged = true; - } - if (relativeParent.options.layoutRoot) { - node.relativeTarget = relativeLayout; - node.relativeTargetOrigin = relativeSnapshot; - node.relativeParent = relativeParent; - } - } - } - } - node.notifyListeners("didUpdate", { - layout, - snapshot, - delta: visualDelta, - layoutDelta, - hasLayoutChanged, - hasRelativeLayoutChanged, - }); - } - else if (node.isLead()) { - const { onExitComplete } = node.options; - onExitComplete && onExitComplete(); - } - /** - * Clearing transition - * TODO: Investigate why this transition is being passed in as {type: false } from Framer - * and why we need it at all - */ - node.options.transition = undefined; - } - function propagateDirtyNodes(node) { - /** - * Increase debug counter for nodes encountered this frame - */ - if (statsBuffer.value) { - metrics.nodes++; - } - if (!node.parent) - return; - /** - * If this node isn't projecting, propagate isProjectionDirty. It will have - * no performance impact but it will allow the next child that *is* projecting - * but *isn't* dirty to just check its parent to see if *any* ancestor needs - * correcting. - */ - if (!node.isProjecting()) { - node.isProjectionDirty = node.parent.isProjectionDirty; - } - /** - * Propagate isSharedProjectionDirty and isTransformDirty - * throughout the whole tree. A future revision can take another look at - * this but for safety we still recalcualte shared nodes. - */ - node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty || - node.parent.isProjectionDirty || - node.parent.isSharedProjectionDirty)); - node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty); - } - function cleanDirtyNodes(node) { - node.isProjectionDirty = - node.isSharedProjectionDirty = - node.isTransformDirty = - false; - } - function clearSnapshot(node) { - node.clearSnapshot(); - } - function clearMeasurements(node) { - node.clearMeasurements(); - } - function forceLayoutMeasure(node) { - node.isLayoutDirty = true; - node.updateLayout(); - } - function clearIsLayoutDirty(node) { - node.isLayoutDirty = false; - } - /** - * When a node is animation-blocked (e.g. during drag) and its component - * didn't re-render (memoized), willUpdate() is never called so there's - * no snapshot. Use the previous layout as a snapshot and mark dirty so - * resetTransform/updateLayout/notifyLayoutUpdate process it normally. - */ - function ensureDraggedNodesSnapshotted(node) { - if (node.isAnimationBlocked && node.layout && !node.isLayoutDirty) { - node.snapshot = node.layout; - node.isLayoutDirty = true; - } - } - function resetTransformStyle(node) { - const { visualElement } = node.options; - if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) { - visualElement.notify("BeforeLayoutMeasure"); - } - node.resetTransform(); - } - function finishAnimation(node) { - node.finishAnimation(); - node.targetDelta = node.relativeTarget = node.target = undefined; - node.isProjectionDirty = true; - } - function resolveTargetDelta(node) { - node.resolveTargetDelta(); - } - function calcProjection(node) { - node.calcProjection(); - } - function resetSkewAndRotation(node) { - node.resetSkewAndRotation(); - } - function removeLeadSnapshots(stack) { - stack.removeLeadSnapshot(); - } - function mixAxisDeltaLinear(output, delta, p) { - output.translate = mixNumber$1(delta.translate, 0, p); - output.scale = mixNumber$1(delta.scale, 1, p); - output.origin = delta.origin; - output.originPoint = delta.originPoint; - } - function mixAxis(output, from, to, p) { - output.min = mixNumber$1(from.min, to.min, p); - output.max = mixNumber$1(from.max, to.max, p); - } - function mixBox(output, from, to, p) { - mixAxis(output.x, from.x, to.x, p); - mixAxis(output.y, from.y, to.y, p); - } - function hasOpacityCrossfade(node) { - return (node.animationValues && node.animationValues.opacityExit !== undefined); - } - const defaultLayoutTransition = { - duration: 0.45, - ease: [0.4, 0, 0.1, 1], - }; - const userAgentContains = (string) => typeof navigator !== "undefined" && - navigator.userAgent && - navigator.userAgent.toLowerCase().includes(string); - /** - * Measured bounding boxes must be rounded in Safari and - * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements - * can appear to jump. - */ - const roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/") - ? Math.round - : noop$1; - function roundAxis(axis) { - // Round to the nearest .5 pixels to support subpixel layouts - axis.min = roundPoint(axis.min); - axis.max = roundPoint(axis.max); - } - function roundBox(box) { - roundAxis(box.x); - roundAxis(box.y); - } - function shouldAnimatePositionOnly(animationType, snapshot, layout) { - return (animationType === "position" || - (animationType === "preserve-aspect" && - !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2))); - } - function checkNodeWasScrollRoot(node) { - return node !== node.root && node.scroll?.wasRoot; - } - - const DocumentProjectionNode = createProjectionNode({ - attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify), - measureScroll: () => ({ - x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0, - y: document.documentElement.scrollTop || document.body?.scrollTop || 0, - }), - checkIsScrollRoot: () => true, - }); - - const notify = (node) => !node.isLayoutDirty && node.willUpdate(false); - function nodeGroup() { - const nodes = new Set(); - const subscriptions = new WeakMap(); - const dirtyAll = () => nodes.forEach(notify); - return { - add: (node) => { - nodes.add(node); - subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll)); - }, - remove: (node) => { - nodes.delete(node); - const unsubscribe = subscriptions.get(node); - if (unsubscribe) { - unsubscribe(); - subscriptions.delete(node); - } - dirtyAll(); - }, - dirty: dirtyAll, - }; - } - - const rootProjectionNode = { - current: undefined, - }; - const HTMLProjectionNode = createProjectionNode({ - measureScroll: (instance) => ({ - x: instance.scrollLeft, - y: instance.scrollTop, - }), - defaultParent: () => { - if (!rootProjectionNode.current) { - const documentNode = new DocumentProjectionNode({}); - documentNode.mount(window); - documentNode.setOptions({ layoutScroll: true }); - rootProjectionNode.current = documentNode; - } - return rootProjectionNode.current; - }, - resetTransform: (instance, value) => { - instance.style.transform = value !== undefined ? value : "none"; - }, - checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed"), - }); - - const layoutSelector = "[data-layout], [data-layout-id]"; - const noop = () => { }; - function snapshotFromTarget(projection) { - const target = projection.targetWithTransforms || projection.target; - if (!target) - return undefined; - const measuredBox = createBox(); - const layoutBox = createBox(); - copyBoxInto(measuredBox, target); - copyBoxInto(layoutBox, target); - return { - animationId: projection.root?.animationId ?? 0, - measuredBox, - layoutBox, - latestValues: projection.animationValues || projection.latestValues || {}, - source: projection.id, - }; - } - class LayoutAnimationBuilder { - constructor(scope, updateDom, defaultOptions) { - this.sharedTransitions = new Map(); - this.notifyReady = noop; - this.rejectReady = noop; - this.scope = scope; - this.updateDom = updateDom; - this.defaultOptions = defaultOptions; - this.readyPromise = new Promise((resolve, reject) => { - this.notifyReady = resolve; - this.rejectReady = reject; - }); - frame.postRender(() => { - this.start().then(this.notifyReady).catch(this.rejectReady); - }); - } - shared(id, transition) { - this.sharedTransitions.set(id, transition); - return this; - } - then(resolve, reject) { - return this.readyPromise.then(resolve, reject); - } - async start() { - const beforeElements = collectLayoutElements(this.scope); - const beforeRecords = this.buildRecords(beforeElements); - beforeRecords.forEach(({ projection }) => { - const hasCurrentAnimation = Boolean(projection.currentAnimation); - const isSharedLayout = Boolean(projection.options.layoutId); - if (hasCurrentAnimation && isSharedLayout) { - const snapshot = snapshotFromTarget(projection); - if (snapshot) { - projection.snapshot = snapshot; - } - else if (projection.snapshot) { - projection.snapshot = undefined; - } - } - else if (projection.snapshot && - (projection.currentAnimation || projection.isProjecting())) { - projection.snapshot = undefined; - } - projection.isPresent = true; - projection.willUpdate(); - }); - await this.updateDom(); - const afterElements = collectLayoutElements(this.scope); - const afterRecords = this.buildRecords(afterElements); - this.handleExitingElements(beforeRecords, afterRecords); - afterRecords.forEach(({ projection }) => { - const instance = projection.instance; - const resumeFromInstance = projection.resumeFrom - ?.instance; - if (!instance || !resumeFromInstance) - return; - if (!("style" in instance)) - return; - const currentTransform = instance.style.transform; - const resumeFromTransform = resumeFromInstance.style.transform; - if (currentTransform && - resumeFromTransform && - currentTransform === resumeFromTransform) { - instance.style.transform = ""; - instance.style.transformOrigin = ""; - } - }); - afterRecords.forEach(({ projection }) => { - projection.isPresent = true; - }); - const root = getProjectionRoot(afterRecords, beforeRecords); - root?.didUpdate(); - await new Promise((resolve) => { - frame.postRender(() => resolve()); - }); - const animations = collectAnimations(afterRecords); - const animation = new GroupAnimation(animations); - return animation; - } - buildRecords(elements) { - const records = []; - const recordMap = new Map(); - for (const element of elements) { - const parentRecord = findParentRecord(element, recordMap, this.scope); - const { layout, layoutId } = readLayoutAttributes(element); - const override = layoutId - ? this.sharedTransitions.get(layoutId) - : undefined; - const transition = override || this.defaultOptions; - const record = getOrCreateRecord(element, parentRecord?.projection, { - layout, - layoutId, - animationType: typeof layout === "string" ? layout : "both", - transition: transition, - }); - recordMap.set(element, record); - records.push(record); - } - return records; - } - handleExitingElements(beforeRecords, afterRecords) { - const afterElementsSet = new Set(afterRecords.map((record) => record.element)); - beforeRecords.forEach((record) => { - if (afterElementsSet.has(record.element)) - return; - // For shared layout elements, relegate to set up resumeFrom - // so the remaining element animates from this position - if (record.projection.options.layoutId) { - record.projection.isPresent = false; - record.projection.relegate(); - } - record.visualElement.unmount(); - visualElementStore.delete(record.element); - }); - // Clear resumeFrom on EXISTING nodes that point to unmounted projections - // This prevents crossfade animation when the source element was removed entirely - // But preserve resumeFrom for NEW nodes so they can animate from the old position - // Also preserve resumeFrom for lead nodes that were just promoted via relegate - const beforeElementsSet = new Set(beforeRecords.map((record) => record.element)); - afterRecords.forEach(({ element, projection }) => { - if (beforeElementsSet.has(element) && - projection.resumeFrom && - !projection.resumeFrom.instance && - !projection.isLead()) { - projection.resumeFrom = undefined; - projection.snapshot = undefined; - } - }); - } - } - function parseAnimateLayoutArgs(scopeOrUpdateDom, updateDomOrOptions, options) { - // animateLayout(updateDom) - if (typeof scopeOrUpdateDom === "function") { - return { - scope: document, - updateDom: scopeOrUpdateDom, - defaultOptions: updateDomOrOptions, - }; - } - // animateLayout(scope, updateDom, options?) - const elements = resolveElements(scopeOrUpdateDom); - const scope = elements[0] || document; - return { - scope, - updateDom: updateDomOrOptions, - defaultOptions: options, - }; - } - function collectLayoutElements(scope) { - const elements = Array.from(scope.querySelectorAll(layoutSelector)); - if (scope instanceof Element && scope.matches(layoutSelector)) { - if (!elements.includes(scope)) { - elements.unshift(scope); - } - } - return elements; - } - function readLayoutAttributes(element) { - const layoutId = element.getAttribute("data-layout-id") || undefined; - const rawLayout = element.getAttribute("data-layout"); - let layout; - if (rawLayout === "" || rawLayout === "true") { - layout = true; - } - else if (rawLayout) { - layout = rawLayout; - } - return { - layout, - layoutId, - }; - } - function createVisualState() { - return { - latestValues: {}, - renderState: { - transform: {}, - transformOrigin: {}, - style: {}, - vars: {}, - }, - }; - } - function getOrCreateRecord(element, parentProjection, projectionOptions) { - const existing = visualElementStore.get(element); - const visualElement = existing ?? - new HTMLVisualElement({ - props: {}, - presenceContext: null, - visualState: createVisualState(), - }, { allowProjection: true }); - if (!existing || !visualElement.projection) { - visualElement.projection = new HTMLProjectionNode(visualElement.latestValues, parentProjection); - } - visualElement.projection.setOptions({ - ...projectionOptions, - visualElement, - }); - if (!visualElement.current) { - visualElement.mount(element); - } - else if (!visualElement.projection.instance) { - // Mount projection if VisualElement is already mounted but projection isn't - // This happens when animate() was called before animateLayout() - visualElement.projection.mount(element); - } - if (!existing) { - visualElementStore.set(element, visualElement); - } - return { - element, - visualElement, - projection: visualElement.projection, - }; - } - function findParentRecord(element, recordMap, scope) { - let parent = element.parentElement; - while (parent) { - const record = recordMap.get(parent); - if (record) - return record; - if (parent === scope) - break; - parent = parent.parentElement; - } - return undefined; - } - function getProjectionRoot(afterRecords, beforeRecords) { - const record = afterRecords[0] || beforeRecords[0]; - return record?.projection.root; - } - function collectAnimations(afterRecords) { - const animations = new Set(); - afterRecords.forEach((record) => { - const animation = record.projection.currentAnimation; - if (animation) - animations.add(animation); - }); - return Array.from(animations); - } - - /** - * @deprecated - * - * Import as `frame` instead. - */ - const sync = frame; - /** - * @deprecated - * - * Use cancelFrame(callback) instead. - */ - const cancelSync = stepsOrder.reduce((acc, key) => { - acc[key] = (process) => cancelFrame(process); - return acc; - }, {}); - - function isDOMKeyframes(keyframes) { - return typeof keyframes === "object" && !Array.isArray(keyframes); - } - - function resolveSubjects(subject, keyframes, scope, selectorCache) { - if (subject == null) { - return []; - } - if (typeof subject === "string" && isDOMKeyframes(keyframes)) { - return resolveElements(subject, scope, selectorCache); - } - else if (subject instanceof NodeList) { - return Array.from(subject); - } - else if (Array.isArray(subject)) { - return subject.filter((s) => s != null); - } - else { - return [subject]; - } - } - - function calculateRepeatDuration(duration, repeat, repeatDelay) { - return duration * (repeat + 1) + repeatDelay * repeat; - } - - /** - * Given a absolute or relative time definition and current/prev time state of the sequence, - * calculate an absolute time for the next keyframes. - */ - function calcNextTime(current, next, prev, labels) { - if (typeof next === "number") { - return next; - } - else if (next.startsWith("-") || next.startsWith("+")) { - return Math.max(0, current + parseFloat(next)); - } - else if (next === "<") { - return prev; - } - else if (next.startsWith("<")) { - return Math.max(0, prev + parseFloat(next.slice(1))); - } - else { - return labels.get(next) ?? current; - } - } - - function eraseKeyframes(sequence, startTime, endTime) { - for (let i = 0; i < sequence.length; i++) { - const keyframe = sequence[i]; - if (keyframe.at > startTime && keyframe.at < endTime) { - removeItem(sequence, keyframe); - // If we remove this item we have to push the pointer back one - i--; - } - } - } - function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) { - /** - * Erase every existing value between currentTime and targetTime, - * this will essentially splice this timeline into any currently - * defined ones. - */ - eraseKeyframes(sequence, startTime, endTime); - for (let i = 0; i < keyframes.length; i++) { - sequence.push({ - value: keyframes[i], - at: mixNumber$1(startTime, endTime, offset[i]), - easing: getEasingForSegment(easing, i), - }); - } - } - - /** - * Take an array of times that represent repeated keyframes. For instance - * if we have original times of [0, 0.5, 1] then our repeated times will - * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back - * down to a 0-1 scale. - * - * `repeatDelayUnits` is the repeatDelay expressed in units of a single - * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`. - */ - function normalizeTimes(times, repeat, repeatDelayUnits = 0) { - const totalUnits = repeat + 1 + repeat * repeatDelayUnits; - for (let i = 0; i < times.length; i++) { - times[i] = times[i] / totalUnits; - } - } - - function compareByTime(a, b) { - if (a.at === b.at) { - if (a.value === null) - return 1; - if (b.value === null) - return -1; - return 0; - } - else { - return a.at - b.at; - } - } - - const defaultSegmentEasing = "easeInOut"; - const MAX_REPEAT = 20; - function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) { - const defaultDuration = defaultTransition.duration || 0.3; - const animationDefinitions = new Map(); - const sequences = new Map(); - const elementCache = {}; - const timeLabels = new Map(); - let prevTime = 0; - let currentTime = 0; - let totalDuration = 0; - /** - * Build the timeline by mapping over the sequence array and converting - * the definitions into keyframes and offsets with absolute time values. - * These will later get converted into relative offsets in a second pass. - */ - for (let i = 0; i < sequence.length; i++) { - const segment = sequence[i]; - /** - * If this is a timeline label, mark it and skip the rest of this iteration. - */ - if (typeof segment === "string") { - timeLabels.set(segment, currentTime); - continue; - } - else if (!Array.isArray(segment)) { - timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels)); - continue; - } - let [subject, keyframes, transition = {}] = segment; - /** - * If a relative or absolute time value has been specified we need to resolve - * it in relation to the currentTime. - */ - if (transition.at !== undefined) { - currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels); - } - /** - * Keep track of the maximum duration in this definition. This will be - * applied to currentTime once the definition has been parsed. - */ - let maxDuration = 0; - const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => { - const valueKeyframesAsList = keyframesAsList(valueKeyframes); - const { delay = 0, times = defaultOffset$1(valueKeyframesAsList), type = defaultTransition.type || "keyframes", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition; - let { ease = defaultTransition.ease || "easeOut", duration } = valueTransition; - /** - * Resolve stagger() if defined. - */ - const calculatedDelay = typeof delay === "function" - ? delay(elementIndex, numSubjects) - : delay; - /** - * If this animation should and can use a spring, generate a spring easing function. - */ - const numKeyframes = valueKeyframesAsList.length; - const createGenerator = isGenerator(type) - ? type - : generators?.[type || "keyframes"]; - if (numKeyframes <= 2 && createGenerator) { - /** - * As we're creating an easing function from a spring, - * ideally we want to generate it using the real distance - * between the two keyframes. However this isn't always - * possible - in these situations we use 0-100. - */ - let absoluteDelta = 100; - if (numKeyframes === 2 && - isNumberKeyframesArray(valueKeyframesAsList)) { - const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0]; - absoluteDelta = Math.abs(delta); - } - const springTransition = { - ...defaultTransition, - ...remainingTransition, - }; - if (duration !== undefined) { - springTransition.duration = secondsToMilliseconds(duration); - } - const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator); - ease = springEasing.ease; - duration = springEasing.duration; - } - duration ?? (duration = defaultDuration); - const startTime = currentTime + calculatedDelay; - /** - * If there's only one time offset of 0, fill in a second with length 1 - */ - if (times.length === 1 && times[0] === 0) { - times[1] = 1; - } - /** - * Fill out if offset if fewer offsets than keyframes - */ - const remainder = times.length - valueKeyframesAsList.length; - remainder > 0 && fillOffset(times, remainder); - /** - * If only one value has been set, ie [1], push a null to the start of - * the keyframe array. This will let us mark a keyframe at this point - * that will later be hydrated with the previous value. - */ - valueKeyframesAsList.length === 1 && - valueKeyframesAsList.unshift(null); - /** - * Segments can't express `repeat: Infinity` or very large - * counts — they'd leave dead time after the segment or - * explode the keyframe array. Ignore with a warning. - */ - if (repeat) { - exports.warning(repeat < MAX_REPEAT, `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`); - } - if (repeat && repeat < MAX_REPEAT) { - /** - * Express repeatDelay in units of a single iteration's duration - * so it can be added to the per-iteration time offsets below - * before they're normalized to 0-1. - */ - const repeatDelayUnits = duration > 0 ? repeatDelay / duration : 0; - duration = calculateRepeatDuration(duration, repeat, repeatDelay); - const originalKeyframes = [...valueKeyframesAsList]; - const originalTimes = [...times]; - ease = Array.isArray(ease) ? [...ease] : [ease]; - const originalEase = [...ease]; - /** - * For reverse/mirror, alternate iterations play the segment - * backwards. mirror matches JSAnimation's mirroredGenerator: - * reversed keyframes, easings unchanged. reverse matches - * JSAnimation's iterationProgress = 1 - p: reversed - * keyframes, easing array reversed AND each function easing - * mapped through reverseEasing (string easings unchanged — - * they're resolved later by the keyframes engine). - */ - const isFlipping = repeatType === "reverse" || repeatType === "mirror"; - let flippedKeyframes = originalKeyframes; - let flippedEases = originalEase; - if (isFlipping) { - flippedKeyframes = [...originalKeyframes].reverse(); - if (repeatType === "reverse") { - flippedEases = [...originalEase] - .reverse() - .map((e) => typeof e === "function" - ? reverseEasing(e) - : e); - } - } - for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) { - const isFlipped = isFlipping && repeatIndex % 2 === 0; - const iterKeyframes = isFlipped - ? flippedKeyframes - : originalKeyframes; - const iterEase = isFlipped ? flippedEases : originalEase; - const iterStartOffset = (repeatIndex + 1) * (1 + repeatDelayUnits); - /** - * If repeatDelay is set, hold the previous iteration's - * final value through the delay by inserting a keyframe - * at the moment the next iteration begins. - */ - if (repeatDelayUnits > 0) { - valueKeyframesAsList.push(valueKeyframesAsList[valueKeyframesAsList.length - 1]); - times.push(iterStartOffset); - ease.push("linear"); - } - valueKeyframesAsList.push(...iterKeyframes); - for (let keyframeIndex = 0; keyframeIndex < iterKeyframes.length; keyframeIndex++) { - times.push(originalTimes[keyframeIndex] + iterStartOffset); - ease.push(keyframeIndex === 0 - ? "linear" - : getEasingForSegment(iterEase, keyframeIndex - 1)); - } - } - normalizeTimes(times, repeat, repeatDelayUnits); - } - const targetTime = startTime + duration; - /** - * Add keyframes, mapping offsets to absolute time. - */ - addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime); - maxDuration = Math.max(calculatedDelay + duration, maxDuration); - totalDuration = Math.max(targetTime, totalDuration); - }; - if (isMotionValue(subject)) { - const subjectSequence = getSubjectSequence(subject, sequences); - resolveValueSequence(keyframes, transition, getValueSequence("default", subjectSequence)); - } - else { - const subjects = resolveSubjects(subject, keyframes, scope, elementCache); - const numSubjects = subjects.length; - /** - * For every element in this segment, process the defined values. - */ - for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) { - /** - * Cast necessary, but we know these are of this type - */ - keyframes = keyframes; - transition = transition; - const thisSubject = subjects[subjectIndex]; - const subjectSequence = getSubjectSequence(thisSubject, sequences); - for (const key in keyframes) { - resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects); - } - } - } - prevTime = currentTime; - currentTime += maxDuration; - } - /** - * For every element and value combination create a new animation. - */ - sequences.forEach((valueSequences, element) => { - for (const key in valueSequences) { - const valueSequence = valueSequences[key]; - /** - * Arrange all the keyframes in ascending time order. - */ - valueSequence.sort(compareByTime); - const keyframes = []; - const valueOffset = []; - const valueEasing = []; - /** - * For each keyframe, translate absolute times into - * relative offsets based on the total duration of the timeline. - */ - for (let i = 0; i < valueSequence.length; i++) { - const { at, value, easing } = valueSequence[i]; - keyframes.push(value); - valueOffset.push(progress(0, totalDuration, at)); - valueEasing.push(easing || "easeOut"); - } - /** - * If the first keyframe doesn't land on offset: 0 - * provide one by duplicating the initial keyframe. This ensures - * it snaps to the first keyframe when the animation starts. - */ - if (valueOffset[0] !== 0) { - valueOffset.unshift(0); - keyframes.unshift(keyframes[0]); - valueEasing.unshift(defaultSegmentEasing); - } - /** - * If the last keyframe doesn't land on offset: 1 - * provide one with a null wildcard value. This will ensure it - * stays static until the end of the animation. - */ - if (valueOffset[valueOffset.length - 1] !== 1) { - valueOffset.push(1); - keyframes.push(null); - } - if (!animationDefinitions.has(element)) { - animationDefinitions.set(element, { - keyframes: {}, - transition: {}, - }); - } - const definition = animationDefinitions.get(element); - definition.keyframes[key] = keyframes; - /** - * Exclude `type` from defaultTransition since springs have been - * converted to duration-based easing functions in resolveValueSequence. - * Including `type: "spring"` would cause JSAnimation to error when - * the merged keyframes array has more than 2 keyframes. - */ - const { type: _type, ...remainingDefaultTransition } = defaultTransition; - definition.transition[key] = { - ...remainingDefaultTransition, - duration: totalDuration, - ease: valueEasing, - times: valueOffset, - ...sequenceTransition, - }; - } - }); - return animationDefinitions; - } - function getSubjectSequence(subject, sequences) { - !sequences.has(subject) && sequences.set(subject, {}); - return sequences.get(subject); - } - function getValueSequence(name, sequences) { - if (!sequences[name]) - sequences[name] = []; - return sequences[name]; - } - function keyframesAsList(keyframes) { - return Array.isArray(keyframes) ? keyframes : [keyframes]; - } - function getValueTransition(transition, key) { - return transition && transition[key] - ? { - ...transition, - ...transition[key], - } - : { ...transition }; - } - const isNumber = (keyframe) => typeof keyframe === "number"; - const isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber); - - function createDOMVisualElement(element) { - const options = { - presenceContext: null, - props: {}, - visualState: { - renderState: { - transform: {}, - transformOrigin: {}, - style: {}, - vars: {}, - attrs: {}, - }, - latestValues: {}, - }, - }; - const node = isSVGElement(element) && !isSVGSVGElement(element) - ? new SVGVisualElement(options) - : new HTMLVisualElement(options); - node.mount(element); - visualElementStore.set(element, node); - } - function createObjectVisualElement(subject) { - const options = { - presenceContext: null, - props: {}, - visualState: { - renderState: { - output: {}, - }, - latestValues: {}, - }, - }; - const node = new ObjectVisualElement(options); - node.mount(subject); - visualElementStore.set(subject, node); - } - - function isSingleValue(subject, keyframes) { - return (isMotionValue(subject) || - typeof subject === "number" || - (typeof subject === "string" && !isDOMKeyframes(keyframes))); - } - /** - * Implementation - */ - function animateSubject(subject, keyframes, options, scope) { - const animations = []; - if (isSingleValue(subject, keyframes)) { - animations.push(animateSingleValue(subject, isDOMKeyframes(keyframes) - ? keyframes.default || keyframes - : keyframes, options ? options.default || options : options)); - } - else { - // Gracefully handle null/undefined subjects (e.g., from querySelector returning null) - if (subject == null) { - return animations; - } - const subjects = resolveSubjects(subject, keyframes, scope); - const numSubjects = subjects.length; - exports.invariant(Boolean(numSubjects), "No valid elements provided.", "no-valid-elements"); - for (let i = 0; i < numSubjects; i++) { - const thisSubject = subjects[i]; - const createVisualElement = thisSubject instanceof Element - ? createDOMVisualElement - : createObjectVisualElement; - if (!visualElementStore.has(thisSubject)) { - createVisualElement(thisSubject); - } - const visualElement = visualElementStore.get(thisSubject); - const transition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if ("delay" in transition && - typeof transition.delay === "function") { - transition.delay = transition.delay(i, numSubjects); - } - animations.push(...animateTarget(visualElement, { ...keyframes, transition }, {})); - } - } - return animations; - } - - function animateSequence(sequence, options, scope) { - const animations = []; - /** - * Pre-process: replace function segments with MotionValue segments, - * subscribe callbacks immediately - */ - const processedSequence = sequence.map((segment) => { - if (Array.isArray(segment) && typeof segment[0] === "function") { - const callback = segment[0]; - const mv = motionValue(0); - mv.on("change", callback); - if (segment.length === 1) { - return [mv, [0, 1]]; - } - else if (segment.length === 2) { - return [mv, [0, 1], segment[1]]; - } - else { - return [mv, segment[1], segment[2]]; - } - } - return segment; - }); - const animationDefinitions = createAnimationsFromSequence(processedSequence, options, scope, { spring }); - animationDefinitions.forEach(({ keyframes, transition }, subject) => { - animations.push(...animateSubject(subject, keyframes, transition)); - }); - return animations; - } - - function isSequence(value) { - return Array.isArray(value) && value.some(Array.isArray); - } - /** - * Creates an animation function that is optionally scoped - * to a specific element. - */ - function createScopedAnimate(options = {}) { - const { scope, reduceMotion, skipAnimations } = options; - /** - * Implementation - */ - function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) { - let animations = []; - let animationOnComplete; - const inherited = {}; - if (reduceMotion !== undefined) - inherited.reduceMotion = reduceMotion; - if (skipAnimations !== undefined) - inherited.skipAnimations = skipAnimations; - if (isSequence(subjectOrSequence)) { - const { onComplete, ...sequenceOptions } = optionsOrKeyframes || {}; - if (typeof onComplete === "function") { - animationOnComplete = onComplete; - } - animations = animateSequence(subjectOrSequence, { ...inherited, ...sequenceOptions }, scope); - } - else { - // Extract top-level onComplete so it doesn't get applied per-value - const { onComplete, ...rest } = options || {}; - if (typeof onComplete === "function") { - animationOnComplete = onComplete; - } - animations = animateSubject(subjectOrSequence, optionsOrKeyframes, { ...inherited, ...rest }, scope); - } - const animation = new GroupAnimationWithThen(animations); - if (animationOnComplete) { - animation.finished.then(animationOnComplete); - } - if (scope) { - scope.animations.push(animation); - animation.finished.then(() => { - removeItem(scope.animations, animation); - }); - } - return animation; - } - return scopedAnimate; - } - const animate = createScopedAnimate(); - - function animateElements(elementOrSelector, keyframes, options, scope) { - // Gracefully handle null/undefined elements (e.g., from querySelector returning null) - if (elementOrSelector == null) { - return []; - } - const elements = resolveElements(elementOrSelector, scope); - const numElements = elements.length; - exports.invariant(Boolean(numElements), "No valid elements provided.", "no-valid-elements"); - /** - * WAAPI doesn't support interrupting animations. - * - * Therefore, starting animations requires a three-step process: - * 1. Stop existing animations (write styles to DOM) - * 2. Resolve keyframes (read styles from DOM) - * 3. Create new animations (write styles to DOM) - * - * The hybrid `animate()` function uses AsyncAnimation to resolve - * keyframes before creating new animations, which removes style - * thrashing. Here, we have much stricter filesize constraints. - * Therefore we do this in a synchronous way that ensures that - * at least within `animate()` calls there is no style thrashing. - * - * In the motion-native-animate-mini-interrupt benchmark this - * was 80% faster than a single loop. - */ - const animationDefinitions = []; - /** - * Step 1: Build options and stop existing animations (write) - */ - for (let i = 0; i < numElements; i++) { - const element = elements[i]; - const elementTransition = { ...options }; - /** - * Resolve stagger function if provided. - */ - if (typeof elementTransition.delay === "function") { - elementTransition.delay = elementTransition.delay(i, numElements); - } - for (const valueName in keyframes) { - let valueKeyframes = keyframes[valueName]; - if (!Array.isArray(valueKeyframes)) { - valueKeyframes = [valueKeyframes]; - } - const valueOptions = { - ...getValueTransition$1(elementTransition, valueName), - }; - valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration)); - valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay)); - /** - * If there's an existing animation playing on this element then stop it - * before creating a new one. - */ - const map = getAnimationMap(element); - const key = animationMapKey(valueName, valueOptions.pseudoElement || ""); - const currentAnimation = map.get(key); - currentAnimation && currentAnimation.stop(); - animationDefinitions.push({ - map, - key, - unresolvedKeyframes: valueKeyframes, - options: { - ...valueOptions, - element, - name: valueName, - allowFlatten: !elementTransition.type && !elementTransition.ease, - }, - }); - } - } - /** - * Step 2: Resolve keyframes (read) - */ - for (let i = 0; i < animationDefinitions.length; i++) { - const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i]; - const { element, name, pseudoElement } = animationOptions; - if (!pseudoElement && unresolvedKeyframes[0] === null) { - unresolvedKeyframes[0] = getComputedStyle$2(element, name); - } - fillWildcards(unresolvedKeyframes); - applyPxDefaults(unresolvedKeyframes, name); - /** - * If we only have one keyframe, explicitly read the initial keyframe - * from the computed style. This is to ensure consistency with WAAPI behaviour - * for restarting animations, for instance .play() after finish, when it - * has one vs two keyframes. - */ - if (!pseudoElement && unresolvedKeyframes.length < 2) { - unresolvedKeyframes.unshift(getComputedStyle$2(element, name)); - } - animationOptions.keyframes = unresolvedKeyframes; - } - /** - * Step 3: Create new animations (write) - */ - const animations = []; - for (let i = 0; i < animationDefinitions.length; i++) { - const { map, key, options: animationOptions } = animationDefinitions[i]; - const animation = new NativeAnimation(animationOptions); - map.set(key, animation); - animation.finished.finally(() => map.delete(key)); - animations.push(animation); - } - return animations; - } - - const createScopedWaapiAnimate = (scope) => { - function scopedAnimate(elementOrSelector, keyframes, options) { - return new GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope)); - } - return scopedAnimate; - }; - const animateMini = /*@__PURE__*/ createScopedWaapiAnimate(); - - function canUseNativeTimeline(target) { - if (typeof window === "undefined") - return false; - return target ? supportsViewTimeline() : supportsScrollTimeline(); - } - - /** - * A time in milliseconds, beyond which we consider the scroll velocity to be 0. - */ - const maxElapsed = 50; - const createAxisInfo = () => ({ - current: 0, - offset: [], - progress: 0, - scrollLength: 0, - targetOffset: 0, - targetLength: 0, - containerLength: 0, - velocity: 0, - }); - const createScrollInfo = () => ({ - time: 0, - x: createAxisInfo(), - y: createAxisInfo(), - }); - const keys = { - x: { - length: "Width", - position: "Left", - }, - y: { - length: "Height", - position: "Top", - }, - }; - function updateAxisInfo(element, axisName, info, time) { - const axis = info[axisName]; - const { length, position } = keys[axisName]; - const prev = axis.current; - const prevTime = info.time; - axis.current = Math.abs(element[`scroll${position}`]); - axis.scrollLength = element[`scroll${length}`] - element[`client${length}`]; - axis.offset.length = 0; - axis.offset[0] = 0; - axis.offset[1] = axis.scrollLength; - axis.progress = progress(0, axis.scrollLength, axis.current); - const elapsed = time - prevTime; - axis.velocity = - elapsed > maxElapsed - ? 0 - : velocityPerSecond(axis.current - prev, elapsed); - } - function updateScrollInfo(element, info, time) { - updateAxisInfo(element, "x", info, time); - updateAxisInfo(element, "y", info, time); - info.time = time; - } - - function calcInset(element, container) { - const inset = { x: 0, y: 0 }; - let current = element; - while (current && current !== container) { - if (isHTMLElement(current)) { - inset.x += current.offsetLeft; - inset.y += current.offsetTop; - current = current.offsetParent; - } - else if (current.tagName === "svg") { - /** - * This isn't an ideal approach to measuring the offset of tags. - * It would be preferable, given they behave like HTMLElements in most ways - * to use offsetLeft/Top. But these don't exist on . Likewise we - * can't use .getBBox() like most SVG elements as these provide the offset - * relative to the SVG itself, which for is usually 0x0. - */ - const svgBoundingBox = current.getBoundingClientRect(); - current = current.parentElement; - const parentBoundingBox = current.getBoundingClientRect(); - inset.x += svgBoundingBox.left - parentBoundingBox.left; - inset.y += svgBoundingBox.top - parentBoundingBox.top; - } - else if (current instanceof SVGGraphicsElement) { - const { x, y } = current.getBBox(); - inset.x += x; - inset.y += y; - let svg = null; - let parent = current.parentNode; - while (!svg) { - if (parent.tagName === "svg") { - svg = parent; - } - parent = current.parentNode; - } - current = svg; - } - else { - break; - } - } - return inset; - } - - const namedEdges = { - start: 0, - center: 0.5, - end: 1, - }; - function resolveEdge(edge, length, inset = 0) { - let delta = 0; - /** - * If we have this edge defined as a preset, replace the definition - * with the numerical value. - */ - if (edge in namedEdges) { - edge = namedEdges[edge]; - } - /** - * Handle unit values - */ - if (typeof edge === "string") { - const asNumber = parseFloat(edge); - if (edge.endsWith("px")) { - delta = asNumber; - } - else if (edge.endsWith("%")) { - edge = asNumber / 100; - } - else if (edge.endsWith("vw")) { - delta = (asNumber / 100) * document.documentElement.clientWidth; - } - else if (edge.endsWith("vh")) { - delta = (asNumber / 100) * document.documentElement.clientHeight; - } - else { - edge = asNumber; - } - } - /** - * If the edge is defined as a number, handle as a progress value. - */ - if (typeof edge === "number") { - delta = length * edge; - } - return inset + delta; - } - - const defaultOffset = [0, 0]; - function resolveOffset(offset, containerLength, targetLength, targetInset) { - let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset; - let targetPoint = 0; - let containerPoint = 0; - if (typeof offset === "number") { - /** - * If we're provided offset: [0, 0.5, 1] then each number x should become - * [x, x], so we default to the behaviour of mapping 0 => 0 of both target - * and container etc. - */ - offsetDefinition = [offset, offset]; - } - else if (typeof offset === "string") { - offset = offset.trim(); - if (offset.includes(" ")) { - offsetDefinition = offset.split(" "); - } - else { - /** - * If we're provided a definition like "100px" then we want to apply - * that only to the top of the target point, leaving the container at 0. - * Whereas a named offset like "end" should be applied to both. - */ - offsetDefinition = [offset, namedEdges[offset] ? offset : `0`]; - } - } - targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset); - containerPoint = resolveEdge(offsetDefinition[1], containerLength); - return targetPoint - containerPoint; - } - - const ScrollOffset = { - Enter: [ - [0, 1], - [1, 1], - ], - Exit: [ - [0, 0], - [1, 0], - ], - Any: [ - [1, 0], - [0, 1], - ], - All: [ - [0, 0], - [1, 1], - ], - }; - - const point = { x: 0, y: 0 }; - function getTargetSize(target) { - return "getBBox" in target && target.tagName !== "svg" - ? target.getBBox() - : { width: target.clientWidth, height: target.clientHeight }; - } - function resolveOffsets(container, info, options) { - const { offset: offsetDefinition = ScrollOffset.All } = options; - const { target = container, axis = "y" } = options; - const lengthLabel = axis === "y" ? "height" : "width"; - const inset = target !== container ? calcInset(target, container) : point; - /** - * Measure the target and container. If they're the same thing then we - * use the container's scrollWidth/Height as the target, from there - * all other calculations can remain the same. - */ - const targetSize = target === container - ? { width: container.scrollWidth, height: container.scrollHeight } - : getTargetSize(target); - const containerSize = { - width: container.clientWidth, - height: container.clientHeight, - }; - /** - * Reset the length of the resolved offset array rather than creating a new one. - * TODO: More reusable data structures for targetSize/containerSize would also be good. - */ - info[axis].offset.length = 0; - /** - * Populate the offset array by resolving the user's offset definition into - * a list of pixel scroll offets. - */ - let hasChanged = !info[axis].interpolate; - const numOffsets = offsetDefinition.length; - for (let i = 0; i < numOffsets; i++) { - const offset = resolveOffset(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]); - if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) { - hasChanged = true; - } - info[axis].offset[i] = offset; - } - /** - * If the pixel scroll offsets have changed, create a new interpolator function - * to map scroll value into a progress. - */ - if (hasChanged) { - info[axis].interpolate = interpolate(info[axis].offset, defaultOffset$1(offsetDefinition), { clamp: false }); - info[axis].interpolatorOffsets = [...info[axis].offset]; - } - info[axis].progress = clamp(0, 1, info[axis].interpolate(info[axis].current)); - } - - function measure(container, target = container, info) { - /** - * Find inset of target within scrollable container - */ - info.x.targetOffset = 0; - info.y.targetOffset = 0; - if (target !== container) { - let node = target; - while (node && node !== container) { - info.x.targetOffset += node.offsetLeft; - info.y.targetOffset += node.offsetTop; - node = node.offsetParent; - } - } - info.x.targetLength = - target === container ? target.scrollWidth : target.clientWidth; - info.y.targetLength = - target === container ? target.scrollHeight : target.clientHeight; - info.x.containerLength = container.clientWidth; - info.y.containerLength = container.clientHeight; - /** - * In development mode ensure scroll containers aren't position: static as this makes - * it difficult to measure their relative positions. The document scrolling element - * is exempt: offsetParent measurements naturally resolve relative to the document. - */ - { - if (container && - target && - target !== container && - container !== document.documentElement && - container !== document.scrollingElement && - container !== document.body) { - warnOnce(getComputedStyle(container).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly."); - } - } - } - function createOnScrollHandler(element, onScroll, info, options = {}) { - return { - measure: (time) => { - measure(element, options.target, info); - updateScrollInfo(element, info, time); - if (options.offset || options.target) { - resolveOffsets(element, info, options); - } - }, - notify: () => onScroll(info), - }; - } - - const scrollListeners = new WeakMap(); - const resizeListeners = new WeakMap(); - const onScrollHandlers = new WeakMap(); - const scrollSize = new WeakMap(); - const dimensionCheckProcesses = new WeakMap(); - const getEventTarget = (element) => element === document.scrollingElement ? window : element; - function scrollInfo(onScroll, { container = document.scrollingElement, trackContentSize = false, ...options } = {}) { - if (!container) - return noop$1; - let containerHandlers = onScrollHandlers.get(container); - /** - * Get the onScroll handlers for this container. - * If one isn't found, create a new one. - */ - if (!containerHandlers) { - containerHandlers = new Set(); - onScrollHandlers.set(container, containerHandlers); - } - /** - * Create a new onScroll handler for the provided callback. - */ - const info = createScrollInfo(); - const containerHandler = createOnScrollHandler(container, onScroll, info, options); - containerHandlers.add(containerHandler); - /** - * Check if there's a scroll event listener for this container. - * If not, create one. - */ - if (!scrollListeners.has(container)) { - const measureAll = () => { - for (const handler of containerHandlers) { - handler.measure(frameData.timestamp); - } - frame.preUpdate(notifyAll); - }; - const notifyAll = () => { - for (const handler of containerHandlers) { - handler.notify(); - } - }; - const listener = () => frame.read(measureAll); - scrollListeners.set(container, listener); - const target = getEventTarget(container); - window.addEventListener("resize", listener); - if (container !== document.documentElement) { - resizeListeners.set(container, resize(container, listener)); - } - target.addEventListener("scroll", listener); - listener(); - } - /** - * Enable content size tracking if requested and not already enabled. - */ - if (trackContentSize && !dimensionCheckProcesses.has(container)) { - const listener = scrollListeners.get(container); - // Store initial scroll dimensions (object is reused to avoid allocation) - const size = { - width: container.scrollWidth, - height: container.scrollHeight, - }; - scrollSize.set(container, size); - // Add frame-based scroll dimension checking to detect content changes - const checkScrollDimensions = () => { - const newWidth = container.scrollWidth; - const newHeight = container.scrollHeight; - if (size.width !== newWidth || size.height !== newHeight) { - listener(); - size.width = newWidth; - size.height = newHeight; - } - }; - // Schedule with keepAlive=true to run every frame - const dimensionCheckProcess = frame.read(checkScrollDimensions, true); - dimensionCheckProcesses.set(container, dimensionCheckProcess); - } - const listener = scrollListeners.get(container); - frame.read(listener, false, true); - return () => { - cancelFrame(listener); - /** - * Check if we even have any handlers for this container. - */ - const currentHandlers = onScrollHandlers.get(container); - if (!currentHandlers) - return; - currentHandlers.delete(containerHandler); - if (currentHandlers.size) - return; - /** - * If no more handlers, remove the scroll listener too. - */ - const scrollListener = scrollListeners.get(container); - scrollListeners.delete(container); - if (scrollListener) { - getEventTarget(container).removeEventListener("scroll", scrollListener); - resizeListeners.get(container)?.(); - window.removeEventListener("resize", scrollListener); - } - // Clean up scroll dimension checking - const dimensionCheckProcess = dimensionCheckProcesses.get(container); - if (dimensionCheckProcess) { - cancelFrame(dimensionCheckProcess); - dimensionCheckProcesses.delete(container); - } - scrollSize.delete(container); - }; - } - - /** - * Maps from ProgressIntersection pairs used by Motion's preset offsets to - * ViewTimeline named ranges. Returns undefined for unrecognised patterns, - * which signals the caller to fall back to JS-based scroll tracking. - */ - const presets = [ - [ScrollOffset.Enter, "entry"], - [ScrollOffset.Exit, "exit"], - [ScrollOffset.Any, "cover"], - [ScrollOffset.All, "contain"], - ]; - const stringToProgress = { - start: 0, - end: 1, - }; - function parseStringOffset(s) { - const parts = s.trim().split(/\s+/); - if (parts.length !== 2) - return undefined; - const a = stringToProgress[parts[0]]; - const b = stringToProgress[parts[1]]; - if (a === undefined || b === undefined) - return undefined; - return [a, b]; - } - function normaliseOffset(offset) { - if (offset.length !== 2) - return undefined; - const result = []; - for (const item of offset) { - if (Array.isArray(item)) { - result.push(item); - } - else if (typeof item === "string") { - const parsed = parseStringOffset(item); - if (!parsed) - return undefined; - result.push(parsed); - } - else { - return undefined; - } - } - return result; - } - function matchesPreset(offset, preset) { - const normalised = normaliseOffset(offset); - if (!normalised) - return false; - for (let i = 0; i < 2; i++) { - const o = normalised[i]; - const p = preset[i]; - if (o[0] !== p[0] || o[1] !== p[1]) - return false; - } - return true; - } - function offsetToViewTimelineRange(offset) { - if (!offset) { - return { rangeStart: "contain 0%", rangeEnd: "contain 100%" }; - } - for (const [preset, name] of presets) { - if (matchesPreset(offset, preset)) { - return { rangeStart: `${name} 0%`, rangeEnd: `${name} 100%` }; - } - } - return undefined; - } - - const timelineCache = new Map(); - function scrollTimelineFallback(options) { - const currentTime = { value: 0 }; - const cancel = scrollInfo((info) => { - currentTime.value = info[options.axis].progress * 100; - }, options); - return { currentTime, cancel }; - } - function getTimeline({ source, container, ...options }) { - const { axis } = options; - if (source) - container = source; - let containerCache = timelineCache.get(container); - if (!containerCache) { - containerCache = new Map(); - timelineCache.set(container, containerCache); - } - const targetKey = options.target ?? "self"; - let targetCache = containerCache.get(targetKey); - if (!targetCache) { - targetCache = {}; - containerCache.set(targetKey, targetCache); - } - const axisKey = axis + (options.offset ?? []).join(","); - if (!targetCache[axisKey]) { - if (options.target && canUseNativeTimeline(options.target)) { - const range = offsetToViewTimelineRange(options.offset); - if (range) { - targetCache[axisKey] = new ViewTimeline({ - subject: options.target, - axis, - }); - } - else { - targetCache[axisKey] = scrollTimelineFallback({ - container, - ...options, - }); - } - } - else if (canUseNativeTimeline()) { - targetCache[axisKey] = new ScrollTimeline({ - source: container, - axis, - }); - } - else { - targetCache[axisKey] = scrollTimelineFallback({ - container, - ...options, - }); - } - } - return targetCache[axisKey]; - } - - function attachToAnimation(animation, options) { - const timeline = getTimeline(options); - const range = options.target - ? offsetToViewTimelineRange(options.offset) - : undefined; - /** - * Use native timeline when: - * - No target: ScrollTimeline (existing behaviour) - * - Target with mappable offset: ViewTimeline with named range - * - Target with unmappable offset: fall back to JS observe - */ - const useNative = options.target - ? canUseNativeTimeline(options.target) && !!range - : canUseNativeTimeline(); - return animation.attachTimeline({ - timeline: useNative ? timeline : undefined, - ...(range && - useNative && { - rangeStart: range.rangeStart, - rangeEnd: range.rangeEnd, - }), - observe: (valueAnimation) => { - valueAnimation.pause(); - return observeTimeline((progress) => { - valueAnimation.time = - valueAnimation.iterationDuration * progress; - }, timeline); - }, - }); - } - - /** - * Currently, we only support element tracking with `scrollInfo`, though in - * the future we can also offer ViewTimeline support. - */ - function isElementTracking(options) { - return options && (options.target || options.offset); - } - - /** - * If the onScroll function has two arguments, it's expecting - * more specific information about the scroll from scrollInfo. - */ - function isOnScrollWithInfo(onScroll) { - return onScroll.length === 2; - } - function attachToFunction(onScroll, options) { - if (isOnScrollWithInfo(onScroll) || isElementTracking(options)) { - return scrollInfo((info) => { - onScroll(info[options.axis].progress, info); - }, options); - } - else { - return observeTimeline(onScroll, getTimeline(options)); - } - } - - function scroll(onScroll, { axis = "y", container = document.scrollingElement, ...options } = {}) { - if (!container) - return noop$1; - const optionsWithDefaults = { axis, container, ...options }; - return typeof onScroll === "function" - ? attachToFunction(onScroll, optionsWithDefaults) - : attachToAnimation(onScroll, optionsWithDefaults); - } - - const thresholds = { - some: 0, - all: 1, - }; - function inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = "some" } = {}) { - const elements = resolveElements(elementOrSelector); - const activeIntersections = new WeakMap(); - const onIntersectionChange = (entries) => { - entries.forEach((entry) => { - const onEnd = activeIntersections.get(entry.target); - /** - * If there's no change to the intersection, we don't need to - * do anything here. - */ - if (entry.isIntersecting === Boolean(onEnd)) - return; - if (entry.isIntersecting) { - const newOnEnd = onStart(entry.target, entry); - if (typeof newOnEnd === "function") { - activeIntersections.set(entry.target, newOnEnd); - } - else { - observer.unobserve(entry.target); - } - } - else if (typeof onEnd === "function") { - onEnd(entry); - activeIntersections.delete(entry.target); - } - }); - }; - const observer = new IntersectionObserver(onIntersectionChange, { - root, - rootMargin, - threshold: typeof amount === "number" ? amount : thresholds[amount], - }); - elements.forEach((element) => observer.observe(element)); - return () => observer.disconnect(); - } - - const distance = (a, b) => Math.abs(a - b); - function distance2D(a, b) { - // Multi-dimensional - const xDelta = distance(a.x, b.x); - const yDelta = distance(a.y, b.y); - return Math.sqrt(xDelta ** 2 + yDelta ** 2); - } - - exports.AsyncMotionValueAnimation = AsyncMotionValueAnimation; - exports.DOMKeyframesResolver = DOMKeyframesResolver; - exports.DOMVisualElement = DOMVisualElement; - exports.DocumentProjectionNode = DocumentProjectionNode; - exports.Feature = Feature; - exports.FlatTree = FlatTree; - exports.GroupAnimation = GroupAnimation; - exports.GroupAnimationWithThen = GroupAnimationWithThen; - exports.HTMLProjectionNode = HTMLProjectionNode; - exports.HTMLVisualElement = HTMLVisualElement; - exports.JSAnimation = JSAnimation; - exports.KeyframeResolver = KeyframeResolver; - exports.LayoutAnimationBuilder = LayoutAnimationBuilder; - exports.MotionGlobalConfig = MotionGlobalConfig; - exports.MotionValue = MotionValue; - exports.NativeAnimation = NativeAnimation; - exports.NativeAnimationExtended = NativeAnimationExtended; - exports.NativeAnimationWrapper = NativeAnimationWrapper; - exports.NodeStack = NodeStack; - exports.ObjectVisualElement = ObjectVisualElement; - exports.SVGVisualElement = SVGVisualElement; - exports.SubscriptionManager = SubscriptionManager; - exports.ViewTransitionBuilder = ViewTransitionBuilder; - exports.VisualElement = VisualElement; - exports.acceleratedValues = acceleratedValues; - exports.activeAnimations = activeAnimations; - exports.addAttrValue = addAttrValue; - exports.addDomEvent = addDomEvent; - exports.addScaleCorrector = addScaleCorrector; - exports.addStyleValue = addStyleValue; - exports.addUniqueItem = addUniqueItem; - exports.addValueToWillChange = addValueToWillChange; - exports.alpha = alpha; - exports.analyseComplexValue = analyseComplexValue; - exports.animate = animate; - exports.animateMini = animateMini; - exports.animateMotionValue = animateMotionValue; - exports.animateSingleValue = animateSingleValue; - exports.animateTarget = animateTarget; - exports.animateValue = animateValue; - exports.animateVariant = animateVariant; - exports.animateView = animateView; - exports.animateVisualElement = animateVisualElement; - exports.animationMapKey = animationMapKey; - exports.anticipate = anticipate; - exports.applyAxisDelta = applyAxisDelta; - exports.applyBoxDelta = applyBoxDelta; - exports.applyGeneratorOptions = applyGeneratorOptions; - exports.applyPointDelta = applyPointDelta; - exports.applyPxDefaults = applyPxDefaults; - exports.applyTreeDeltas = applyTreeDeltas; - exports.arc = arc; - exports.aspectRatio = aspectRatio; - exports.attachFollow = attachFollow; - exports.attachSpring = attachSpring; - exports.attrEffect = attrEffect; - exports.axisDeltaEquals = axisDeltaEquals; - exports.axisEquals = axisEquals; - exports.axisEqualsRounded = axisEqualsRounded; - exports.backIn = backIn; - exports.backInOut = backInOut; - exports.backOut = backOut; - exports.boxEquals = boxEquals; - exports.boxEqualsRounded = boxEqualsRounded; - exports.buildHTMLStyles = buildHTMLStyles; - exports.buildProjectionTransform = buildProjectionTransform; - exports.buildSVGAttrs = buildSVGAttrs; - exports.buildSVGPath = buildSVGPath; - exports.buildTransform = buildTransform; - exports.calcAxisDelta = calcAxisDelta; - exports.calcBoxDelta = calcBoxDelta; - exports.calcChildStagger = calcChildStagger; - exports.calcGeneratorDuration = calcGeneratorDuration; - exports.calcLength = calcLength; - exports.calcRelativeAxis = calcRelativeAxis; - exports.calcRelativeAxisPosition = calcRelativeAxisPosition; - exports.calcRelativeBox = calcRelativeBox; - exports.calcRelativePosition = calcRelativePosition; - exports.camelCaseAttributes = camelCaseAttributes; - exports.camelToDash = camelToDash; - exports.cancelFrame = cancelFrame; - exports.cancelMicrotask = cancelMicrotask; - exports.cancelSync = cancelSync; - exports.checkVariantsDidChange = checkVariantsDidChange; - exports.circIn = circIn; - exports.circInOut = circInOut; - exports.circOut = circOut; - exports.clamp = clamp; - exports.cleanDirtyNodes = cleanDirtyNodes; - exports.collectMotionValues = collectMotionValues; - exports.color = color; - exports.compareByDepth = compareByDepth; - exports.complex = complex; - exports.containsCSSVariable = containsCSSVariable; - exports.convertBoundingBoxToBox = convertBoundingBoxToBox; - exports.convertBoxToBoundingBox = convertBoxToBoundingBox; - exports.convertOffsetToTimes = convertOffsetToTimes; - exports.copyAxisDeltaInto = copyAxisDeltaInto; - exports.copyAxisInto = copyAxisInto; - exports.copyBoxInto = copyBoxInto; - exports.correctBorderRadius = correctBorderRadius; - exports.correctBoxShadow = correctBoxShadow; - exports.createAnimationState = createAnimationState; - exports.createAxis = createAxis; - exports.createAxisDelta = createAxisDelta; - exports.createBox = createBox; - exports.createDelta = createDelta; - exports.createGeneratorEasing = createGeneratorEasing; - exports.createProjectionNode = createProjectionNode; - exports.createRenderBatcher = createRenderBatcher; - exports.createScopedAnimate = createScopedAnimate; - exports.cubicBezier = cubicBezier; - exports.cubicBezierAsString = cubicBezierAsString; - exports.defaultEasing = defaultEasing; - exports.defaultOffset = defaultOffset$1; - exports.defaultTransformValue = defaultTransformValue; - exports.defaultValueTypes = defaultValueTypes; - exports.degrees = degrees; - exports.delay = delayInSeconds; - exports.delayInSeconds = delayInSeconds; - exports.dimensionValueTypes = dimensionValueTypes; - exports.distance = distance; - exports.distance2D = distance2D; - exports.eachAxis = eachAxis; - exports.easeIn = easeIn; - exports.easeInOut = easeInOut; - exports.easeOut = easeOut; - exports.easingDefinitionToFunction = easingDefinitionToFunction; - exports.fillOffset = fillOffset; - exports.fillWildcards = fillWildcards; - exports.findDimensionValueType = findDimensionValueType; - exports.findValueType = findValueType; - exports.flushKeyframeResolvers = flushKeyframeResolvers; - exports.followValue = followValue; - exports.frame = frame; - exports.frameData = frameData; - exports.frameSteps = frameSteps; - exports.generateLinearEasing = generateLinearEasing; - exports.getAnimatableNone = getAnimatableNone; - exports.getAnimationMap = getAnimationMap; - exports.getComputedStyle = getComputedStyle$2; - exports.getDefaultTransition = getDefaultTransition; - exports.getDefaultValueType = getDefaultValueType; - exports.getEasingForSegment = getEasingForSegment; - exports.getFeatureDefinitions = getFeatureDefinitions; - exports.getFinalKeyframe = getFinalKeyframe; - exports.getMixer = getMixer; - exports.getOptimisedAppearId = getOptimisedAppearId; - exports.getOriginIndex = getOriginIndex; - exports.getValueAsType = getValueAsType; - exports.getValueTransition = getValueTransition$1; - exports.getVariableValue = getVariableValue; - exports.getVariantContext = getVariantContext; - exports.getViewAnimationLayerInfo = getViewAnimationLayerInfo; - exports.getViewAnimations = getViewAnimations; - exports.globalProjectionState = globalProjectionState; - exports.has2DTranslate = has2DTranslate; - exports.hasReducedMotionListener = hasReducedMotionListener; - exports.hasScale = hasScale; - exports.hasTransform = hasTransform; - exports.hasWarned = hasWarned; - exports.hex = hex; - exports.hover = hover; - exports.hsla = hsla; - exports.hslaToRgba = hslaToRgba; - exports.inView = inView; - exports.inertia = inertia; - exports.initPrefersReducedMotion = initPrefersReducedMotion; - exports.interpolate = interpolate; - exports.invisibleValues = invisibleValues; - exports.isAnimationControls = isAnimationControls; - exports.isBezierDefinition = isBezierDefinition; - exports.isCSSVariableName = isCSSVariableName; - exports.isCSSVariableToken = isCSSVariableToken; - exports.isControllingVariants = isControllingVariants; - exports.isDeltaZero = isDeltaZero; - exports.isDragActive = isDragActive; - exports.isDragging = isDragging; - exports.isEasingArray = isEasingArray; - exports.isElementKeyboardAccessible = isElementKeyboardAccessible; - exports.isElementTextInput = isElementTextInput; - exports.isForcedMotionValue = isForcedMotionValue; - exports.isGenerator = isGenerator; - exports.isHTMLElement = isHTMLElement; - exports.isKeyframesTarget = isKeyframesTarget; - exports.isMotionValue = isMotionValue; - exports.isNear = isNear; - exports.isNodeOrChild = isNodeOrChild; - exports.isNumericalString = isNumericalString; - exports.isObject = isObject; - exports.isPrimaryPointer = isPrimaryPointer; - exports.isSVGElement = isSVGElement; - exports.isSVGSVGElement = isSVGSVGElement; - exports.isSVGTag = isSVGTag; - exports.isTransitionDefined = isTransitionDefined; - exports.isVariantLabel = isVariantLabel; - exports.isVariantNode = isVariantNode; - exports.isWaapiSupportedEasing = isWaapiSupportedEasing; - exports.isWillChangeMotionValue = isWillChangeMotionValue; - exports.isZeroValueString = isZeroValueString; - exports.keyframes = keyframes; - exports.makeAnimationInstant = makeAnimationInstant; - exports.mapEasingToNativeEasing = mapEasingToNativeEasing; - exports.mapValue = mapValue; - exports.maxGeneratorDuration = maxGeneratorDuration; - exports.measurePageBox = measurePageBox; - exports.measureViewportBox = measureViewportBox; - exports.memo = memo; - exports.microtask = microtask; - exports.millisecondsToSeconds = millisecondsToSeconds; - exports.mirrorEasing = mirrorEasing; - exports.mix = mix; - exports.mixArray = mixArray; - exports.mixColor = mixColor; - exports.mixComplex = mixComplex; - exports.mixImmediate = mixImmediate; - exports.mixLinearColor = mixLinearColor; - exports.mixNumber = mixNumber$1; - exports.mixObject = mixObject; - exports.mixValues = mixValues; - exports.mixVisibility = mixVisibility; - exports.motionValue = motionValue; - exports.moveItem = moveItem; - exports.nodeGroup = nodeGroup; - exports.noop = noop$1; - exports.number = number; - exports.numberValueTypes = numberValueTypes; - exports.observeTimeline = observeTimeline; - exports.optimizedAppearDataAttribute = optimizedAppearDataAttribute; - exports.optimizedAppearDataId = optimizedAppearDataId; - exports.parseAnimateLayoutArgs = parseAnimateLayoutArgs; - exports.parseCSSVariable = parseCSSVariable; - exports.parseValueFromTransform = parseValueFromTransform; - exports.percent = percent; - exports.pipe = pipe; - exports.pixelsToPercent = pixelsToPercent; - exports.positionalKeys = positionalKeys; - exports.prefersReducedMotion = prefersReducedMotion; - exports.press = press; - exports.progress = progress; - exports.progressPercentage = progressPercentage; - exports.propEffect = propEffect; - exports.propagateDirtyNodes = propagateDirtyNodes; - exports.px = px; - exports.readTransformValue = readTransformValue; - exports.recordStats = recordStats; - exports.removeAxisDelta = removeAxisDelta; - exports.removeAxisTransforms = removeAxisTransforms; - exports.removeBoxTransforms = removeBoxTransforms; - exports.removeItem = removeItem; - exports.removePointDelta = removePointDelta; - exports.renderHTML = renderHTML; - exports.renderSVG = renderSVG; - exports.resize = resize; - exports.resolveElements = resolveElements; - exports.resolveMotionValue = resolveMotionValue; - exports.resolveTransition = resolveTransition; - exports.resolveVariant = resolveVariant; - exports.resolveVariantFromProps = resolveVariantFromProps; - exports.reverseEasing = reverseEasing; - exports.rgbUnit = rgbUnit; - exports.rgba = rgba; - exports.rootProjectionNode = rootProjectionNode; - exports.scale = scale; - exports.scaleCorrectors = scaleCorrectors; - exports.scalePoint = scalePoint; - exports.scrapeHTMLMotionValuesFromProps = scrapeMotionValuesFromProps$1; - exports.scrapeSVGMotionValuesFromProps = scrapeMotionValuesFromProps; - exports.scroll = scroll; - exports.scrollInfo = scrollInfo; - exports.secondsToMilliseconds = secondsToMilliseconds; - exports.setDragLock = setDragLock; - exports.setFeatureDefinitions = setFeatureDefinitions; - exports.setStyle = setStyle; - exports.setTarget = setTarget; - exports.spring = spring; - exports.springValue = springValue; - exports.stagger = stagger; - exports.startWaapiAnimation = startWaapiAnimation; - exports.statsBuffer = statsBuffer; - exports.steps = steps; - exports.styleEffect = styleEffect; - exports.supportedWaapiEasing = supportedWaapiEasing; - exports.supportsBrowserAnimation = supportsBrowserAnimation; - exports.supportsFlags = supportsFlags; - exports.supportsLinearEasing = supportsLinearEasing; - exports.supportsPartialKeyframes = supportsPartialKeyframes; - exports.supportsScrollTimeline = supportsScrollTimeline; - exports.supportsViewTimeline = supportsViewTimeline; - exports.svgEffect = svgEffect; - exports.sync = sync; - exports.testValueType = testValueType; - exports.time = time; - exports.transform = transform; - exports.transformAxis = transformAxis; - exports.transformBox = transformBox; - exports.transformBoxPoints = transformBoxPoints; - exports.transformPropOrder = transformPropOrder; - exports.transformProps = transformProps; - exports.transformValue = transformValue; - exports.transformValueTypes = transformValueTypes; - exports.translateAxis = translateAxis; - exports.updateMotionValuesFromProps = updateMotionValuesFromProps; - exports.variantPriorityOrder = variantPriorityOrder; - exports.variantProps = variantProps; - exports.velocityPerSecond = velocityPerSecond; - exports.vh = vh; - exports.visualElementStore = visualElementStore; - exports.vw = vw; - exports.warnOnce = warnOnce; - exports.wrap = wrap; - -})); diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/motion.js b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/motion.js deleted file mode 100644 index 72b55256..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/motion.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(s(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(s(e,n))});const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>"object"==typeof t&&null!==t,l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(...t)=>t.reduce((t,e)=>n=>e(t(n))),d=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class p{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s1e3*t,f=t=>t/1e3,y=(t,e)=>e?t*(1e3/e):0,g=new Set;const v=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},x=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function T(t,e,n,i){if(t===e&&n===i)return u;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=x(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:x(s(t),e,i)}const w=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,b=t=>e=>1-t(1-e),S=T(.33,1.53,.69,.99),A=b(S),V=w(A),P=t=>t>=1?1:(t*=2)<1?.5*A(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),M=b(E),k=w(E),D=T(.42,0,1,1),R=T(0,0,.58,1),B=T(.42,0,.58,1);const C=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return C(t)?t[v(0,t.length,e)]:t}const L=t=>Array.isArray(t)&&"number"==typeof t[0],O={linear:u,easeIn:D,easeInOut:B,easeOut:R,circIn:E,circInOut:k,circOut:M,backIn:A,backInOut:V,backOut:S,anticipate:P},F=e=>{if(L(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return T(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==O[e],`Invalid easing type '${e}'`,"invalid-easing-type"),O[e]):e},I=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],W={value:null,addProjectionMetrics:null};function N(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=I.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(c),e&&W.value&&W.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(t))}};return u}(r,e?n:void 0),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,y=()=>{const r=o.useManualTiming,a=r?s.timestamp:performance.now();n=!1,r||(s.delta=i?1e3/60:Math.max(Math.min(a-s.timestamp,40),1)),s.timestamp=a,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),m.process(s),f.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))};return{schedule:I.reduce((e,o)=>{const r=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(y)),r.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e(void 0===Y&&H.set(z.isProcessing||o.useManualTiming?z.timestamp:performance.now()),Y),set:t=>{Y=t,queueMicrotask(X)}},G={layout:0,mainThread:0,waapi:0},q=t=>e=>"string"==typeof e&&e.startsWith(t),Z=q("--"),_=q("var(--"),J=t=>!!_(t)&&Q.test(t.split("/*")[0].trim()),Q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function tt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const et={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},nt={...et,transform:t=>i(0,1,t)},it={...et,default:1},st=t=>Math.round(1e5*t)/1e5,ot=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const rt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,at=(t,e)=>n=>Boolean("string"==typeof n&&rt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),lt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(ot);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},ct={...et,transform:t=>Math.round((t=>i(0,255,t))(t))},ut={test:at("rgb","red"),parse:lt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ct.transform(t)+", "+ct.transform(e)+", "+ct.transform(n)+", "+st(nt.transform(i))+")"};const ht={test:at("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:ut.transform},dt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),pt=dt("deg"),mt=dt("%"),ft=dt("px"),yt=dt("vh"),gt=dt("vw"),vt=(()=>({...mt,parse:t=>mt.parse(t)/100,transform:t=>mt.transform(100*t)}))(),xt={test:at("hsl","hue"),parse:lt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+mt.transform(st(e))+", "+mt.transform(st(n))+", "+st(nt.transform(i))+")"},Tt={test:t=>ut.test(t)||ht.test(t)||xt.test(t),parse:t=>ut.test(t)?ut.parse(t):xt.test(t)?xt.parse(t):ht.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ut.transform(t):xt.transform(t),getAnimatableNone:t=>{const e=Tt.parse(t);return e.alpha=0,Tt.transform(e)}},wt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const bt="number",St="color",At=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Vt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(At,t=>(Tt.test(t)?(i.color.push(o),s.push(St),n.push(Tt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(bt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Pt({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:Tt.test(n)?Tt.getAnimatableNone(n):n;var n};const Mt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(ot)?.length||0)+(t.match(wt)?.length||0)>0},parse:function(t){return Vt(t).values},createTransformer:function(t){return Pt(Vt(t))},getAnimatableNone:function(t){const e=Vt(t);return Pt(e)(e.values.map((t,n)=>Et(t,e.split[n])))}};function kt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Dt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=kt(a,i,t+1/3),o=kt(a,i,t),r=kt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Rt(t,e){return n=>n>0?e:t}const Bt=(t,e,n)=>t+(e-t)*n,Ct=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},jt=[ht,ut,xt];function Lt(e){const n=(i=e,jt.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(e);return n===xt&&(s=Dt(s)),s}const Ot=(t,e)=>{const n=Lt(t),i=Lt(e);if(!n||!i)return Rt(t,e);const s={...n};return t=>(s.red=Ct(n.red,i.red,t),s.green=Ct(n.green,i.green,t),s.blue=Ct(n.blue,i.blue,t),s.alpha=Bt(n.alpha,i.alpha,t),ut.transform(s))},Ft=new Set(["none","hidden"]);function It(t,e){return Ft.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Wt(t,e){return n=>Bt(t,e,n)}function Nt(t){return"number"==typeof t?Wt:"string"==typeof t?J(t)?Rt:Tt.test(t)?Ot:zt:Array.isArray(t)?Ut:"object"==typeof t?Tt.test(t)?Ot:$t:Rt}function Ut(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Nt(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in i)n[e]=i[e](t);return n}}const zt=(e,n)=>{const i=Mt.createTransformer(n),s=Vt(e),o=Vt(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Ft.has(e)&&!o.values.length||Ft.has(n)&&!s.values.length?It(e,n):h(Ut(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>U.update(e,t),stop:()=>$(e),now:()=>z.isProcessing?z.timestamp:H.now()}},Xt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e=Ht?1/0:e}function qt(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Gt(i),Ht);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:f(s)}}const Zt=100,_t=10,Jt=1,Qt=0,te=800,ee=.3,ne=.3,ie={granular:.01,default:2},se={granular:.005,default:.5},oe=.01,re=10,ae=.05,le=1;function ce(t,e){return t*Math.sqrt(1-e*e)}const ue=.001;const he=["duration","bounce"],de=["stiffness","damping","mass"];function pe(t,e){return e.some(e=>void 0!==t[e])}function me(e){let n={velocity:Qt,stiffness:Zt,damping:_t,mass:Jt,isResolvedFromDuration:!1,...e};if(!pe(e,de)&&pe(e,he))if(n.velocity=0,e.visualDuration){const t=e.visualDuration,s=2*Math.PI/(1.2*t),o=s*s,r=2*i(.05,1,1-(e.bounce||0))*Math.sqrt(o);n={...n,mass:Jt,stiffness:o,damping:r}}else{const s=function({duration:e=te,bounce:n=ee,velocity:s=Qt,mass:o=Jt}){let r,a;t.warning(e<=m(re),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=i(ae,le,l),e=i(oe,re,f(e)),l<1?(r=t=>{const n=t*l,i=n*e,o=n-s,r=ce(t,l),a=Math.exp(-i);return ue-o/r*a},a=t=>{const n=t*l*e,i=n*s+s,o=Math.pow(l,2)*Math.pow(t,2)*e,a=Math.exp(-n),c=ce(Math.pow(t,2),l);return(-r(t)+ue>0?-1:1)*((i-o)*a)/c}):(r=t=>Math.exp(-t*e)*((t-s)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(s-t)));const c=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(r,a,5/e);if(e=m(e),isNaN(c))return{stiffness:Zt,damping:_t,duration:e};{const t=Math.pow(c,2)*o;return{stiffness:t,damping:2*l*Math.sqrt(o*t),duration:e}}}({...e,velocity:0});n={...n,...s,mass:Jt},n.isResolvedFromDuration=!0}return n}function fe(t=ne,e=ee){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:p}=me({...n,velocity:-f(n.velocity||0)}),y=d||0,g=c/(2*Math.sqrt(l*u)),v=r-o,x=f(Math.sqrt(l/u)),T=Math.abs(v)<5;let w,b,S,A,V,P;if(i||(i=T?ie.granular:ie.default),s||(s=T?se.granular:se.default),g<1)S=ce(x,g),A=(y+g*x*v)/S,w=t=>{const e=Math.exp(-g*x*t);return r-e*(A*Math.sin(S*t)+v*Math.cos(S*t))},V=g*x*A+v*S,P=g*x*v-A*S,b=t=>Math.exp(-g*x*t)*(V*Math.sin(S*t)+P*Math.cos(S*t));else if(1===g){w=t=>r-Math.exp(-x*t)*(v+(y+x*v)*t);const t=y+x*v;b=e=>Math.exp(-x*e)*(x*t*e-y)}else{const t=x*Math.sqrt(g*g-1);w=e=>{const n=Math.exp(-g*x*e),i=Math.min(t*e,300);return r-n*((y+g*x*v)*Math.sinh(i)+t*v*Math.cosh(i))/t};const e=(y+g*x*v)/t,n=g*x*e-v*t,i=g*x*v-e*t;b=e=>{const s=Math.exp(-g*x*e),o=Math.min(t*e,300);return s*(n*Math.sinh(o)+i*Math.cosh(o))}}const E={calculatedDuration:p&&h||null,velocity:t=>m(b(t)),next:t=>{if(!p&&g<1){const e=Math.exp(-g*x*t),n=Math.sin(S*t),o=Math.cos(S*t),l=r-e*(A*n+v*o),c=m(e*(V*n+P*o));return a.done=Math.abs(c)<=i&&Math.abs(r-l)<=s,a.value=a.done?r:l,a}const e=w(t);if(p)a.done=t>=h;else{const n=m(b(t));a.done=Math.abs(n)<=i&&Math.abs(r-e)<=s}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(Gt(E),Ht),e=Xt(e=>E.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return E}fe.applyToOptions=t=>{const e=qt(t,100,fe);return t.ease=e.ease,t.duration=m(e.duration),t.type="keyframes",t};function ye(t,e,n){const i=Math.max(e-5,0);return y(n-t(i),e-i)}function ge({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?y:n};let T,w;const b=t=>{var e;(e=d.value,void 0!==a&&el)&&(T=t,w=fe({keyframes:[d.value,p(d.value)],velocity:ye(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==T||(e=!0,x(t),b(t)),void 0!==T&&t>=T?w.next(t-T):(!e&&x(t),d)}}}function ve(e,n,{clamp:s=!0,ease:r,mixer:a}={}){const l=e.length;if(t.invariant(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const p=function(t,e,n){const i=[],s=n||o.mix||Kt,r=t.length-1;for(let n=0;n{if(c&&t1)for(;if(i(e[0],e[l-1],t)):f}function xe(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=d(0,e,i);t.push(Bt(n,1,s))}}function Te(t){const e=[0];return xe(e,t.length-1),e}function we(t,e){return t.map(t=>t*e)}function be(t,e){return t.map(()=>e||B).splice(0,t.length-1)}function Se({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=C(i)?i.map(F):F(i),o={done:!1,value:e[0]},r=ve(we(n&&n.length===e.length?n:Te(e),t),e,{ease:Array.isArray(s)?s:be(e,s)});return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}const Ae=t=>null!==t;function Ve(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Ae),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Pe={decay:ge,inertia:ge,tween:Se,keyframes:Se,spring:fe};function Ee(t){"string"==typeof t.type&&(t.type=Pe[t.type])}class Me{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const ke=t=>t/100;class De extends Me{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==H.now()&&this.tick(H.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},G.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Ee(t);const{type:e=Se,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Se;a!==Se&&"number"!=typeof r[0]&&(this.mixKeyframes=h(ke,Kt(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Gt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x,T=this.currentTime,w=n;if(h){const t=Math.min(this.currentTime,s)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(w=r)),T=i(0,1,n)*a}v?(this.delayState.value=u[0],x=this.delayState):x=w.next(T),o&&!v&&(x.value=o(x.value));let{done:b}=x;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==ge&&(x.value=Ve(u,this.options,y,this.speed)),f&&f(x.value),S&&this.finish(),x}then(t,e){return this.finished.then(t,e)}get duration(){return f(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(this.currentTime)}set time(t){t=m(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return ye(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(H.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=f(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Yt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(H.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,G.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Re(t){for(let e=1;e180*t/Math.PI,Ce=t=>{const e=Be(Math.atan2(t[1],t[0]));return Le(e)},je={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ce,rotateZ:Ce,skewX:t=>Be(Math.atan(t[1])),skewY:t=>Be(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Le=t=>((t%=360)<0&&(t+=360),t),Oe=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fe=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ie={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Oe,scaleY:Fe,scale:t=>(Oe(t)+Fe(t))/2,rotateX:t=>Le(Be(Math.atan2(t[6],t[5]))),rotateY:t=>Le(Be(Math.atan2(-t[2],t[0]))),rotateZ:Ce,rotate:Ce,skewX:t=>Be(Math.atan(t[4])),skewY:t=>Be(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function We(t){return t.includes("scale")?1:0}function Ne(t,e){if(!t||"none"===t)return We(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Ie,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=je,s=e}if(!s)return We(e);const o=i[e],r=s[1].split(",").map($e);return"function"==typeof o?o(r):r[o]}const Ue=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ne(n,e)};function $e(t){return parseFloat(t.trim())}const ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ke=(()=>new Set([...ze,"pathRotation"]))(),Ye=t=>t===et||t===ft,Xe=new Set(["x","y","z"]),He=ze.filter(t=>!Xe.has(t));const Ge={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ne(e,"x"),y:(t,{transform:e})=>Ne(e,"y")};Ge.translateX=Ge.x,Ge.translateY=Ge.y;const qe=new Set;let Ze=!1,_e=!1,Je=!1;function Qe(){if(_e){const t=Array.from(qe).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return He.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}_e=!1,Ze=!1,qe.forEach(t=>t.complete(Je)),qe.clear()}function tn(){qe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(_e=!0)})}function en(){Je=!0,tn(),Qe(),Je=!1}class nn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(qe.add(this),Ze||(Ze=!0,U.read(tn),U.resolveKeyframes(Qe))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}Re(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),qe.delete(this)}cancel(){"scheduled"===this.state&&(qe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const sn=t=>t.startsWith("--");function on(t,e,n){sn(e)?t.style.setProperty(e,n):t.style[e]=n}const rn={};function an(t,e){const n=c(t);return()=>rn[e]??n()}const ln=an(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),cn=an(()=>void 0!==window.ViewTimeline,"viewTimeline"),un=an(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),hn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,dn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:hn([0,.65,.55,1]),circOut:hn([.55,0,1,.45]),backIn:hn([.31,.01,.66,-.59]),backOut:hn([.33,1.53,.69,.99])};function pn(t,e){return t?"function"==typeof t?un()?Xt(t,e):"ease-out":L(t)?hn(t):Array.isArray(t)?t.map(t=>pn(t,e)||dn.easeOut):dn[t]:void 0}function mn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=pn(a,s);Array.isArray(h)&&(u.easing=h),W.value&&G.waapi++;const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(d.pseudoElement=c);const p=t.animate(u,d);return W.value&&p.finished.finally(()=>{G.waapi--}),p}function fn(t){return"function"==typeof t&&"applyToOptions"in t}function yn({type:t,...e}){return fn(t)&&un()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class gn extends Me{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=yn(e);this.animation=mn(n,i,s,c,o),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Ve(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t),on(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return f(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=m(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ln()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),u):i(this)}}const vn={anticipate:P,backInOut:V,circInOut:k};function xn(t){"string"==typeof t.ease&&t.ease in vn&&(t.ease=vn[t.ease])}class Tn extends gn{constructor(t){xn(t),Ee(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new De({...r,autoplay:!1}),l=Math.max(10,H.now()-this.startTime),c=i(0,10,l-10),u=a.sample(l).value,{name:h}=this.options;o&&h&&on(o,h,u),e.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const wn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Mt.test(t)&&"0"!==t||t.startsWith("url(")));function bn(t){t.duration=0,t.type="keyframes"}const Sn=new Set(["opacity","clipPath","filter","transform"]),An=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Vn=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Pn=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function En(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Pn()&&n&&(Sn.has(n)||Vn.has(n)&&function(t){for(let e=0;e{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=H.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...u},d=c?.KeyframeResolver||nn;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:h,onUpdate:d}=i;this.resolvedAt=H.now();let p=!0;(function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=wn(o,n),l=wn(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},f=p&&!h&&En(m),y=m.motionValue?.owner?.current;let g;if(f)try{g=new Tn({...m,element:y})}catch{g=new De(m)}else g=new De(m);g.finished.then(()=>{this.notifyFinished()}).catch(u),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),en()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class kn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Dn(this.animations,"duration")}get iterationDuration(){return Dn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Dn(t,e){let n=0;for(let i=0;in&&(n=s)}return n}class Rn extends kn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Bn extends gn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Cn=new WeakMap,jn=(t,e="")=>`${t}:${e}`;function Ln(t){let e=Cn.get(t);return e||(e=new Map,Cn.set(t,e)),e}function On(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Fn={current:void 0};class In{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=H.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=H.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new p);const n=this.events[t].add(e);return"change"===t?()=>{n(),U.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Fn.current&&Fn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=H.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return y(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wn(t,e){return new In(t,e)}function Nn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Un(t,e){const n=t?.[e]??t?.default??t;return n!==t?Nn(n,t):n}const $n={type:"spring",stiffness:500,damping:25,restSpeed:10},zn={type:"keyframes",duration:.8},Kn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yn=(t,{keyframes:e})=>e.length>2?zn:Ke.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:$n:Kn,Xn=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Hn(t){for(const e in t)if(!Xn.has(e))return!0;return!1}const Gn=(t,e,n,i={},s,r)=>a=>{const l=Un(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=m(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};Hn(l)||Object.assign(h,Yn(t,h)),h.duration&&(h.duration=m(h.duration)),h.repeatDelay&&(h.repeatDelay=m(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(bn(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,bn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=Ve(h.keyframes,l);if(void 0!==t)return void U.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new De(h):new Mn(h)};function qn(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function Zn(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function _n(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const Jn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qn(t){const e=Jn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function ti(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=Qn(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return J(o)?ti(o,n,i+1):o}function ei(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ni(t,e,n,i){if("function"==typeof e){const[s,o]=ei(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=ei(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function ii(t,e,n){const i=t.getProps();return ni(i,e,void 0!==n?n:i.custom,t)}const si=new Set(["width","height","top","left","right","bottom",...ze]),oi=t=>Array.isArray(t);function ri(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wn(n))}function ai(t){return oi(t)?t[t.length-1]||0:t}function li(t,e){const n=ii(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){ri(t,e,ai(o[e]))}}const ci=t=>Boolean(t&&t.getVelocity);function ui(t){return Boolean(ci(t)&&t.add)}function hi(t,e){const n=t.getValue("willChange");if(ui(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function di(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const pi="framerAppearId",mi="data-"+di(pi);function fi(t){return t.props[mi]}function yi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function gi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Nn(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState&&t.animationState.getState()[s],p=o?.path;p&&p.animateVisualElement(t,a,o,n,h);for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&yi(d,e))continue;const r={delay:n,...Un(o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){U.update(()=>i.set(s));continue}let p=!1;if(window.MotionHandoffAnimation){const n=fi(t);if(n){const t=window.MotionHandoffAnimation(n,e,U);null!==t&&(r.startTime=t,p=!0)}}hi(t,e);const m=c??t.shouldReduceMotion;i.start(Gn(e,i,s,m&&si.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>U.update(()=>{r&&li(t,r)});h.length?Promise.all(h).then(e):e()}return h}function vi(t,e,n={}){const i=ii(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(gi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(vi(l,e,{...r,delay:n+("function"==typeof i?0:i)+On(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function xi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>vi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=vi(t,e,n);else{const s="function"==typeof e?ii(t,e,n.custom):e;i=Promise.all(gi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Ti=t=>e=>e.test(t),wi=[et,ft,mt,pt,gt,yt,{test:t=>"auto"===t,parse:t=>t}],bi=t=>wi.find(Ti(t));function Si(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const Ai=new Set(["brightness","contrast","saturate","opacity"]);function Vi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(ot)||[];if(!i)return t;const s=n.replace(i,"");let o=Ai.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Pi=/\b([a-z-]*)\(.*?\)/gu,Ei={...Mt,getAnimatableNone:t=>{const e=t.match(Pi);return e?e.map(Vi).join(" "):t}},Mi={...Mt,getAnimatableNone:t=>{const e=Mt.parse(t);return Mt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},ki={...et,transform:Math.round},Di={rotate:pt,pathRotation:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:pt,skewX:pt,skewY:pt,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:nt,originX:vt,originY:vt,originZ:ft},Ri={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,top:ft,right:ft,bottom:ft,left:ft,inset:ft,insetBlock:ft,insetBlockStart:ft,insetBlockEnd:ft,insetInline:ft,insetInlineStart:ft,insetInlineEnd:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,paddingBlock:ft,paddingBlockStart:ft,paddingBlockEnd:ft,paddingInline:ft,paddingInlineStart:ft,paddingInlineEnd:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,marginBlock:ft,marginBlockStart:ft,marginBlockEnd:ft,marginInline:ft,marginInlineStart:ft,marginInlineEnd:ft,fontSize:ft,backgroundPositionX:ft,backgroundPositionY:ft,...Di,zIndex:ki,fillOpacity:nt,strokeOpacity:nt,numOctaves:ki},Bi={...Ri,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:Ei,WebkitFilter:Ei,mask:Mi,WebkitMask:Mi},Ci=t=>Bi[t],ji=new Set([Ei,Mi]);function Li(t,e){let n=Ci(t);return ji.has(n)||(n=Mt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Oi=new Set(["auto","none","0"]);class Fi extends nn{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Ii=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function Wi(t,e){for(let n=0;n{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0});function Ui(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function $i(t){return(e,n)=>{const i=Ui(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const zi=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ki{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const r=()=>{const i=e.get();this.latest[t]=s?zi(i,Ri[t]):i,n&&U.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&$(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}}function Yi(t){const e=new WeakMap;return(n,i)=>{const s=e.get(n)??new Ki;e.set(n,s);const o=[];for(const e in i){const r=i[e],a=t(n,s,e,r);o.push(a)}return()=>{for(const t of o)t()}}}const Xi=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?di(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},Hi=$i(Yi(Xi)),Gi=Yi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function qi(t){return a(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const Zi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const _i=new Set(["originX","originY","originZ"]),Ji=(t,e,n,i)=>{let s,o;return Ke.has(n)?(e.get("transform")||(qi(t)||e.get("transformBox")||Ji(t,e,"transformBox",new In("fill-box")),e.set("transform",new In("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=sn(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},Qi=$i(Yi(Ji));const ts=$i(Yi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return U.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new In("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Xi(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Ji:Xi)(t,e,n,i)}));const{schedule:es,cancel:ns}=N(queueMicrotask,!1),is={x:!1,y:!1};function ss(){return is.x||is.y}function os(t,e){const n=Ui(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const rs=(t,e)=>!!e&&(t===e||rs(t,e.parentElement)),as=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,ls=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function cs(t){return ls.has(t.tagName)||!0===t.isContentEditable}const us=new Set(["INPUT","SELECT","TEXTAREA"]);const hs=new WeakSet;function ds(t){return e=>{"Enter"===e.key&&t(e)}}function ps(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function ms(t){return as(t)&&!ss()}const fs=new WeakSet;function ys(t,e){const n=window.getComputedStyle(t);return sn(e)?n.getPropertyValue(e):n[e]}function gs(t){return a(t)&&"ownerSVGElement"in t}const vs=new WeakMap;let xs;const Ts=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:gs(i)&&"getBBox"in i?i.getBBox()[e]:i[n],ws=Ts("inline","width","offsetWidth"),bs=Ts("block","height","offsetHeight");function Ss({target:t,borderBoxSize:e}){vs.get(t)?.forEach(n=>{n(t,{get width(){return ws(t,e)},get height(){return bs(t,e)}})})}function As(t){t.forEach(Ss)}function Vs(t,e){xs||"undefined"!=typeof ResizeObserver&&(xs=new ResizeObserver(As));const n=Ui(t);return n.forEach(t=>{let n=vs.get(t);n||(n=new Set,vs.set(t,n)),n.add(e),xs?.observe(t)}),()=>{n.forEach(t=>{const n=vs.get(t);n?.delete(e),n?.size||xs?.unobserve(t)})}}const Ps=new Set;let Es;function Ms(t){return Ps.add(t),Es||(Es=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ps.forEach(e=>e(t))},window.addEventListener("resize",Es)),()=>{Ps.delete(t),Ps.size||"function"!=typeof Es||(window.removeEventListener("resize",Es),Es=void 0)}}function ks(t,e){return"function"==typeof t?Ms(t):Vs(t,e)}function Ds(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return U.preUpdate(i,!0),()=>$(i)}function Rs(){const{value:t}=W;null!==t?(t.frameloop.rate.push(z.delta),t.animations.mainThread.push(G.mainThread),t.animations.waapi.push(G.waapi),t.animations.layout.push(G.layout)):$(Rs)}function Bs(t){return t.reduce((t,e)=>t+e,0)/t.length}function Cs(t,e=Bs){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const js=t=>Math.round(1e3/t);function Ls(){W.value=null,W.addProjectionMetrics=null}function Os(){const{value:t}=W;if(!t)throw new Error("Stats are not being measured");Ls(),$(Rs);const e={frameloop:{setup:Cs(t.frameloop.setup),rate:Cs(t.frameloop.rate),read:Cs(t.frameloop.read),resolveKeyframes:Cs(t.frameloop.resolveKeyframes),preUpdate:Cs(t.frameloop.preUpdate),update:Cs(t.frameloop.update),preRender:Cs(t.frameloop.preRender),render:Cs(t.frameloop.render),postRender:Cs(t.frameloop.postRender)},animations:{mainThread:Cs(t.animations.mainThread),waapi:Cs(t.animations.waapi),layout:Cs(t.animations.layout)},layoutProjection:{nodes:Cs(t.layoutProjection.nodes),calculatedTargetDeltas:Cs(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Cs(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=js(n.min),n.max=js(n.max),n.avg=js(n.avg),[n.min,n.max]=[n.max,n.min],e}function Fs(t){return gs(t)&&"svg"===t.tagName}function Is(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Ws(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=ve(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function Ns(t,e){const n=Wn(ci(t)?t.get():t);return Us(n,t,e),n}function Us(t,e,n={}){const i=t.get();let s,o=null,r=i;const a="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,l=()=>{o&&(o.stop(),o=null),t.animation=void 0},c=()=>{(()=>{const e=zs(t.get()),i=zs(r);if(e===i)return void l();const a=o?o.getGeneratorVelocity():t.getVelocity();l(),o=new De({keyframes:[e,i],velocity:a,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s})})(),t.animation=o??void 0,t.events.animationStart?.notify(),o?.then(()=>{t.animation=void 0,t.events.animationComplete?.notify()})};if(t.attach((t,e)=>{r=t,s=t=>e($s(t,a)),U.postRender(c)},l),ci(e)){let i=!0===n.skipInitialAnimation;const s=e.on("change",e=>{i?(i=!1,t.jump($s(e,a),!1)):t.set($s(e,a))}),o=t.on("destroy",s);return()=>{s(),o()}}return l}function $s(t,e){return e?t+e:t}function zs(t){return"number"==typeof t?t:parseFloat(t)}function Ks(t){const e=[];Fn.current=e;const n=t();Fn.current=void 0;const i=Wn(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>U.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),$(i)})}(e,i,t),i}const Ys=[...wi,Tt,Mt],Xs=t=>Ys.find(Ti(t));function Hs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Gs={},qs=null;const Zs=(t,e)=>{Gs[t]=e},_s=()=>{qs||(qs=document.createElement("style"),qs.id="motion-view");let t="";for(const e in Gs){const n=Gs[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}qs.textContent=t,document.head.appendChild(qs),Gs={}},Js=()=>{qs&&qs.parentElement&&qs.parentElement.removeChild(qs)};function Qs(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function to(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function eo(){return document.getAnimations().filter(to)}const no=["layout","enter","exit","new","old"];function io(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new kn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Zs(":root",{"view-transition-name":"none"}),Zs("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),_s();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{Js()}),new Promise(t=>{s.ready.then(()=>{const e=eo(),s=[];n.forEach((t,e)=>{for(const n of no){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...Un(i,t),...Un(r,t)},l=Hs(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof o.delay&&(o.delay=o.delay(0,1)),o.duration&&(o.duration=m(o.duration)),o.delay&&(o.delay=m(o.delay));const c=new gn({...o,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});s.push(c)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=Qs(o);if(!r)continue;const a=n.get(r.layer);if(a)so(a,"enter")&&so(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Bn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...Un(i,n)};o.duration&&(o.duration=m(o.duration)),o=yn(o);const a=pn(o.ease,o.duration);e.updateTiming({delay:m(o.delay??0),duration:o.duration,easing:a}),s.push(new Bn(t))}}t(new kn(s))})})}function so(t,e){return t?.[e]?.keyframes.opacity}let oo=[],ro=null;function ao(){ro=null;const[t]=oo;var e;t&&(n(oo,e=t),ro=e,io(e).then(t=>{e.notifyReady(t),t.finished.finally(ao)}))}function lo(){for(let t=oo.length-1;t>=0;t--){const e=oo[t],{interrupt:n}=e.options;if("immediate"===n){const n=oo.slice(0,t+1).map(t=>t.update),i=oo.slice(t+1);e.update=()=>{n.forEach(t=>t())},oo=[e,...i];break}}ro&&"immediate"!==oo[0]?.options.interrupt||ao()}class co{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=u,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,oo.push(n),es.render(lo)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const uo=()=>({translate:0,scale:1,origin:0,originPoint:0}),ho=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),po=()=>({min:0,max:0}),mo=()=>({x:{min:0,max:0},y:{min:0,max:0}}),fo=new WeakMap;function yo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function go(t){return"string"==typeof t||Array.isArray(t)}const vo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xo=["initial",...vo];function To(t){return yo(t.animate)||xo.some(e=>go(t[e]))}function wo(t){return Boolean(To(t)||t.variants)}function bo(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ci(s))t.addValue(i,s);else if(ci(o))t.addValue(i,Wn(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Wn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const So={current:null},Ao={current:!1},Vo="undefined"!=typeof window;function Po(){if(Ao.current=!0,Vo)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>So.current=t.matches;t.addEventListener("change",e),e()}else So.current=!1}const Eo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Mo={};class ko{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=nn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=H.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ao.current||Po(),this.shouldReduceMotion=So.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),$(this.notifyUpdate),$(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Sn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new gn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:m(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=Ke.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&U.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Mo){const e=Mo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Wn(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):!Xs(n)&&Mt.test(e)&&(n=Li(t,e)),this.setBaseTarget(t,ci(n)?n.get():n)),ci(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=ni(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||ci(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){es.render(this.render)}}class Do extends ko{constructor(){super(...arguments),this.KeyframeResolver=Fi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ci(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ro({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Bo(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Co(t){return void 0===t||1===t}function jo({scale:t,scaleX:e,scaleY:n}){return!Co(t)||!Co(e)||!Co(n)}function Lo(t){return jo(t)||Oo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Oo(t){return Fo(t.x)||Fo(t.y)}function Fo(t){return t&&"0%"!==t}function Io(t,e,n){return n+e*(t-n)}function Wo(t,e,n,i,s){return void 0!==s&&(t=Io(t,s,i)),Io(t,n,i)+e}function No(t,e=0,n=1,i,s){t.min=Wo(t.min,e,n,i,s),t.max=Wo(t.max,e,n,i,s)}function Uo(t,{x:e,y:n}){No(t.x,e.translate,e.scale,e.originPoint),No(t.y,n.translate,n.scale,n.originPoint)}const $o=.999999999999,zo=1.0000000000001;function Ko(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a$o&&(e.x=1),e.y$o&&(e.y=1)}function Yo(t,e){t.min+=e,t.max+=e}function Xo(t,e,n,i,s=.5){No(t,e,n,Bt(t.min,t.max,s),i)}function Ho(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function Go(t,e,n){const i=n??t;Xo(t.x,Ho(e.x,i.x),e.scaleX,e.scale,e.originX),Xo(t.y,Ho(e.y,i.y),e.scaleY,e.scale,e.originY)}function qo(t,e){return Ro(Bo(t.getBoundingClientRect(),e))}const Zo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_o=ze.length;function Jo(t,e,n){let i="",s=!0;for(let o=0;o<_o;o++){const r=ze[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=zi(a,Ri[r]);if(!l){s=!1;i+=`${Zo[r]||r}(${t}) `}n&&(e[r]=t)}}const o=t.pathRotation;return o&&(s=!1,i+=`rotate(${zi(o,Ri.pathRotation)}) `),i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Qo(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(Ke.has(t))r=!0;else if(Z(t))s[t]=n;else{const e=zi(n,Ri[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Jo(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function tr(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function er(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const nr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ft.test(t))return t;t=parseFloat(t)}return`${er(t,e.target.x)}% ${er(t,e.target.y)}%`}},ir={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Mt.parse(t);if(s.length>5)return i;const o=Mt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Bt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},sr={borderRadius:{...nr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nr,borderTopRightRadius:nr,borderBottomLeftRadius:nr,borderBottomRightRadius:nr,boxShadow:ir};function or(t,{layout:e,layoutId:n}){return Ke.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!sr[t]||"opacity"===t)}function rr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ci(i[e])||s&&ci(s[e])||or(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class ar extends Do{constructor(){super(...arguments),this.type="html",this.renderInstance=tr}readValueFromInstance(t,e){if(Ke.has(e))return this.projection?.isProjecting?We(e):Ue(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Z(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return qo(t,e)}build(t,e,n){Qo(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return rr(t,e,n)}}class lr extends ko{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const cr={offset:"stroke-dashoffset",array:"stroke-dasharray"},ur={offset:"strokeDashoffset",array:"strokeDasharray"};function hr(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?cr:ur;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const dr=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function pr(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Qo(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const t of dr)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&hr(h,s,o,r,!1)}const mr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),fr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function yr(t,e,n,i){tr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(mr.has(n)?n:di(n),e.attrs[n])}function gr(t,e,n){const i=rr(t,e,n);for(const n in t)if(ci(t[n])||ci(e[n])){i[-1!==ze.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class vr extends Do{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mo}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ke.has(e)){const t=Ci(e);return t&&t.default||0}return e=mr.has(e)?e:di(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return gr(t,e,n)}build(t,e,n){pr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){yr(t,e,0,i)}mount(t){this.isSVGTag=fr(t.tagName),super.mount(t)}}const xr=xo.length;function Tr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Tr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Cr(t,e,n,i){Br(t.x,e.x,n.x,i?i.originX:void 0),Br(t.y,e.y,n.y,i?i.originY:void 0)}function jr(t,e,n,i=0){const s=i?Bt(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Dr(e)}function Lr(t,e,n,i){jr(t.x,e.x,n.x,i?.x),jr(t.y,e.y,n.y,i?.y)}function Or(t,e,n,i=0){const s=i?Bt(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Dr(e)}function Fr(t,e,n,i){Or(t.x,e.x,n.x,i?.x),Or(t.y,e.y,n.y,i?.y)}function Ir(t,e,n,i,s){return t=Io(t-=e,1/n,i),void 0!==s&&(t=Io(t,1/s,i)),t}function Wr(t,e=0,n=1,i=.5,s,o=t,r=t){if(mt.test(e)){e=parseFloat(e);e=Bt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Bt(o.min,o.max,i);t===o&&(a-=e),t.min=Ir(t.min,e,n,a,s),t.max=Ir(t.max,e,n,a,s)}function Nr(t,e,[n,i,s],o,r){Wr(t,e[n],e[i],e[s],e.scale,o,r)}const Ur=["x","scaleX","originX"],$r=["y","scaleY","originY"];function zr(t,e,n,i){Nr(t.x,e,Ur,n?n.x:void 0,i?i.x:void 0),Nr(t.y,e,$r,n?n.y:void 0,i?i.y:void 0)}function Kr(t){return 0===t.translate&&1===t.scale}function Yr(t){return Kr(t.x)&&Kr(t.y)}function Xr(t,e){return t.min===e.min&&t.max===e.max}function Hr(t,e){return Xr(t.x,e.x)&&Xr(t.y,e.y)}function Gr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function qr(t,e){return Gr(t.x,e.x)&&Gr(t.y,e.y)}function Zr(t){return Dr(t.x)/Dr(t.y)}function _r(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Jr(t){return[t("x"),t("y")]}function Qr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,pathRotation:s,rotateX:o,rotateY:r,skewX:a,skewY:l}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotate(${s}deg) `),o&&(i+=`rotateX(${o}deg) `),r&&(i+=`rotateY(${r}deg) `),a&&(i+=`skewX(${a}deg) `),l&&(i+=`skewY(${l}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const ta=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ea=ta.length,na=t=>"string"==typeof t?parseFloat(t):t,ia=t=>"number"==typeof t||ft.test(t);function sa(t,e,n,i,s,o){s?(t.opacity=Bt(0,n.opacity??1,ra(i)),t.opacityExit=Bt(e.opacity??1,0,aa(i))):o&&(t.opacity=Bt(e.opacity??1,n.opacity??1,i));for(let s=0;sie?1:n(d(t,e,i))}function ca(t,e,n){const i=ci(t)?t:Wn(t);return i.start(Gn("",i,e,n)),i.animation}function ua(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const ha=(t,e)=>t.depth-e.depth;class da{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ha),this.isDirty=!1,this.children.forEach(t)}}function pa(t,e){const n=H.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&($(i),t(o-e))};return U.setup(i,!0),()=>$(i)}function ma(t,e){return pa(t,m(e))}function fa(t){return ci(t)?t.get():t}class ya{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(n(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const ga={hasAnimatedSinceResize:!0,hasEverUpdated:!1},va={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},xa=["","X","Y","Z"];let Ta=0;function wa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function ba(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=fi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&ba(i)}function Sa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=Ta++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,W.value&&(va.nodes=va.calculatedTargetDeltas=va.calculatedProjections=0),this.nodes.forEach(Pa),this.nodes.forEach(La),this.nodes.forEach(Oa),this.nodes.forEach(Ea),W.addProjectionMetrics&&W.addProjectionMetrics(va)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;U.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=pa(s,250),ga.hasAnimatedSinceResize&&(ga.hasAnimatedSinceResize=!1,this.nodes.forEach(ja)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||$a,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!qr(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Un(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||ja(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),$(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Fa),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ba(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Dr(this.snapshot.measuredBox.x)||Dr(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t{const n=e/1e3,i=p?.(n);var c,m,f,y;i?(r.x.translate=i.x,r.x.scale=Bt(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Bt(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(Wa(r.x,t.x,n),Wa(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fr(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,y=n,Na(c.x,m.x,f.x,y),Na(c.y,m.y,f.y,y),d&&Hr(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Mr(d,this.relativeTarget)),l&&(this.animationValues=o,sa(o,s,this.latestValues,n,h,u)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&($(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.update(()=>{ga.hasAnimatedSinceResize=!0,G.layout++,this.motionValue||(this.motionValue=Wn(0)),this.motionValue.jump(0,!1),this.currentAnimation=ca(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{G.layout--},onComplete:()=>{G.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Xa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Dr(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Dr(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Mr(e,n),Go(e,s),Cr(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new ya);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&wa("z",t,i,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(ka),this.root.sharedNodes.clear()}}}function Aa(t){t.updateLayout()}function Va(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)Jr(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Dr(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";Er(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else Xa(s,e.layoutBox,n)&&Jr(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Dr(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Cr(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Cr(a,t.applyTransform(i,!0),e.measuredBox):Cr(a,n,e.layoutBox);const l=!Yr(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};Fr(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};Fr(l,n,o.layoutBox,r),qr(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Pa(t){W.value&&va.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Ea(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ma(t){t.clearSnapshot()}function ka(t){t.clearMeasurements()}function Da(t){t.isLayoutDirty=!0,t.updateLayout()}function Ra(t){t.isLayoutDirty=!1}function Ba(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Ca(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ja(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function La(t){t.resolveTargetDelta()}function Oa(t){t.calcProjection()}function Fa(t){t.resetSkewAndRotation()}function Ia(t){t.removeLeadSnapshot()}function Wa(t,e,n){t.translate=Bt(e.translate,0,n),t.scale=Bt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Na(t,e,n,i){t.min=Bt(e.min,n.min,i),t.max=Bt(e.max,n.max,i)}function Ua(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const $a={duration:.45,ease:[.4,0,.1,1]},za=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ka=za("applewebkit/")&&!za("chrome/")?Math.round:u;function Ya(t){t.min=Ka(t.min),t.max=Ka(t.max)}function Xa(t,e,n){return"position"===t||"preserve-aspect"===t&&!Rr(Zr(e),Zr(n),.2)}function Ha(t){return t!==t.root&&t.scroll?.wasRoot}const Ga=Sa({attachResizeListener:(t,e)=>ua(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),qa=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Za={current:void 0},_a=Sa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Za.current){const t=new Ga({});t.mount(window),t.setOptions({layoutScroll:!0}),Za.current=t}return Za.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ja="[data-layout], [data-layout-id]",Qa=()=>{};function tl(t){const e=Array.from(t.querySelectorAll(Ja));return t instanceof Element&&t.matches(Ja)&&(e.includes(t)||e.unshift(t)),e}function el(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e}}function nl(t,e,n){const i=fo.get(t),s=i??new ar({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&s.projection||(s.projection=new _a(s.latestValues,e)),s.projection.setOptions({...n,visualElement:s}),s.current?s.projection.instance||s.projection.mount(t):s.mount(t),i||fo.set(t,s),{element:t,visualElement:s,projection:s.projection}}function il(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const sl=U,ol=I.reduce((t,e)=>(t[e]=t=>$(t),t),{});function rl(t){return"object"==typeof t&&!Array.isArray(t)}function al(t,e,n,i){return null==t?[]:"string"==typeof t&&rl(e)?Ui(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function ll(t,e,n){return t*(e+1)+n*e}function cl(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function ul(t,e,i,s,o,r){!function(t,e,i){for(let s=0;se&&o.at"number"==typeof t,vl=t=>t.every(gl);function xl(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=gs(t)&&!Fs(t)?new vr(e):new ar(e);n.mount(t),fo.set(t,n)}function Tl(t){const e=new lr({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),fo.set(t,e)}function wl(e,n,i,s){const o=[];if(function(t,e){return ci(t)||"number"==typeof t||"string"==typeof t&&!rl(e)}(e,n))o.push(ca(e,rl(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=al(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t{const c=fl(e),{delay:u=0,times:h=Te(c),type:d=n.type||"keyframes",repeat:y,repeatType:g,repeatDelay:x=0,...T}=i;let{ease:w=n.ease||"easeOut",duration:S}=i;const A="function"==typeof u?u(a,l):u,V=c.length,P=fn(d)?d:o?.[d||"keyframes"];if(V<=2&&P){let t=100;if(2===V&&vl(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...n,...T};void 0!==S&&(e.duration=m(S));const i=qt(e,t,P);w=i.ease,S=i.duration}S??(S=r);const E=p+A;1===h.length&&0===h[0]&&(h[1]=1);const M=h.length-c.length;if(M>0&&xe(h,M),1===c.length&&c.unshift(null),y&&t.warning(y<20,`Sequence segments can't repeat ${y} times — ignoring repeat option. Use a value below 20 or apply repeat at the sequence level instead.`),y&&y<20){const t=S>0?x/S:0;S=ll(S,y,x);const e=[...c],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w],s="reverse"===g||"mirror"===g;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===g&&(r=[...i].reverse().map(t=>"function"==typeof t?b(t):t)));for(let a=0;a0&&(c.push(c[c.length-1]),h.push(p),w.push("linear")),c.push(...u);for(let t=0;t{for(const s in t){const o=t[s];o.sort(dl);const r=[],l=[],c=[];for(let t=0;t{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=Wn(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:fe});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...wl(n,t,e))}),s}function Sl(t={}){const{scope:e,reduceMotion:i,skipAnimations:s}=t;return function(t,o,r){let a,l=[];const c={};if(void 0!==i&&(c.reduceMotion=i),void 0!==s&&(c.skipAnimations=s),u=t,Array.isArray(u)&&u.some(Array.isArray)){const{onComplete:n,...i}=o||{};"function"==typeof n&&(a=n),l=bl(t,{...c,...i},e)}else{const{onComplete:n,...i}=r||{};"function"==typeof n&&(a=n),l=wl(t,o,{...c,...i},e)}var u;const h=new Rn(l);return a&&h.finished.then(a),e&&(e.animations.push(h),h.finished.then(()=>{n(e.animations,h)})),h}}const Al=Sl();const Vl=e=>function(n,i,s){return new Rn(function(e,n,i,s){if(null==e)return[];const o=Ui(e,s),r=o.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;te.delete(n)),l.push(s)}return l}(n,i,s,e))},Pl=Vl();function El(t){return"undefined"!=typeof window&&(t?cn():ln())}const Ml={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function kl(t,e,n,i){const s=n[e],{length:o,position:r}=Ml[e],a=s.current,l=n.time;s.current=Math.abs(t[`scroll${r}`]),s.scrollLength=t[`scroll${o}`]-t[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=d(0,s.scrollLength,s.current);const c=i-l;s.velocity=c>50?0:y(s.current-a,c)}const Dl={start:0,center:.5,end:1};function Rl(t,e,n=0){let i=0;if(t in Dl&&(t=Dl[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Bl=[0,0];function Cl(t,e,n,i){let s=Array.isArray(t)?t:Bl,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Dl[t]?t:"0"]),o=Rl(s[0],n,i),r=Rl(s[1],e),o-r}const jl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Ll={x:0,y:0};function Ol(t,e,n){const{offset:s=jl.All}=n,{target:o=t,axis:r="y"}=n,a="y"===r?"height":"width",l=o!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(qi(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(o,t):Ll,c=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let h=!e[r].interpolate;const d=s.length;for(let t=0;t{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),function(t,e,n){kl(t,"x",e,n),kl(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Ol(t,n,i)},notify:()=>e(n)}}const Il=new WeakMap,Wl=new WeakMap,Nl=new WeakMap,Ul=new WeakMap,$l=new WeakMap,zl=t=>t===document.scrollingElement?window:t;function Kl(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return u;let s=Nl.get(e);s||(s=new Set,Nl.set(e,s));const o=Fl(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(s.add(o),!Il.has(e)){const t=()=>{for(const t of s)t.measure(z.timestamp);U.preUpdate(n)},n=()=>{for(const t of s)t.notify()},i=()=>U.read(t);Il.set(e,i);const o=zl(e);window.addEventListener("resize",i),e!==document.documentElement&&Wl.set(e,ks(e,i)),o.addEventListener("scroll",i),i()}if(n&&!$l.has(e)){const t=Il.get(e),n={width:e.scrollWidth,height:e.scrollHeight};Ul.set(e,n);const i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=U.read(i,!0);$l.set(e,s)}const r=Il.get(e);return U.read(r,!1,!0),()=>{$(r);const t=Nl.get(e);if(!t)return;if(t.delete(o),t.size)return;const n=Il.get(e);Il.delete(e),n&&(zl(e).removeEventListener("scroll",n),Wl.get(e)?.(),window.removeEventListener("resize",n));const i=$l.get(e);i&&($(i),$l.delete(e)),Ul.delete(e)}}const Yl=[[jl.Enter,"entry"],[jl.Exit,"exit"],[jl.Any,"cover"],[jl.All,"contain"]],Xl={start:0,end:1};function Hl(t){const e=t.trim().split(/\s+/);if(2!==e.length)return;const n=Xl[e[0]],i=Xl[e[1]];return void 0!==n&&void 0!==i?[n,i]:void 0}function Gl(t,e){const n=function(t){if(2!==t.length)return;const e=[];for(const n of t)if(Array.isArray(n))e.push(n);else{if("string"!=typeof n)return;{const t=Hl(n);if(!t)return;e.push(t)}}return e}(t);if(!n)return!1;for(let t=0;t<2;t++){const i=n[t],s=e[t];if(i[0]!==s[0]||i[1]!==s[1])return!1}return!0}function ql(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of Yl)if(Gl(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const Zl=new Map;function _l(t){const e={value:0},n=Kl(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}function Jl({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);let s=Zl.get(e);s||(s=new Map,Zl.set(e,s));const o=n.target??"self";let r=s.get(o);r||(r={},s.set(o,r));const a=i+(n.offset??[]).join(",");if(!r[a])if(n.target&&El(n.target)){const t=ql(n.offset);r[a]=t?new ViewTimeline({subject:n.target,axis:i}):_l({container:e,...n})}else El()?r[a]=new ScrollTimeline({source:e,axis:i}):r[a]=_l({container:e,...n});return r[a]}const Ql={some:0,all:1};const tc=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=Mn,t.DOMKeyframesResolver=Fi,t.DOMVisualElement=Do,t.DocumentProjectionNode=Ga,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=da,t.GroupAnimation=kn,t.GroupAnimationWithThen=Rn,t.HTMLProjectionNode=_a,t.HTMLVisualElement=ar,t.JSAnimation=De,t.KeyframeResolver=nn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=Qa,this.rejectReady=Qa,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),U.postRender(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=tl(this.scope),e=this.buildRecords(t);e.forEach(({projection:t})=>{const e=Boolean(t.currentAnimation),n=Boolean(t.options.layoutId);if(e&&n){const e=function(t){const e=t.targetWithTransforms||t.target;if(!e)return;const n={x:{min:0,max:0},y:{min:0,max:0}},i={x:{min:0,max:0},y:{min:0,max:0}};return Mr(n,e),Mr(i,e),{animationId:t.root?.animationId??0,measuredBox:n,layoutBox:i,latestValues:t.animationValues||t.latestValues||{},source:t.id}}(t);e?t.snapshot=e:t.snapshot&&(t.snapshot=void 0)}else t.snapshot&&(t.currentAnimation||t.isProjecting())&&(t.snapshot=void 0);t.isPresent=!0,t.willUpdate()}),await this.updateDom();const n=tl(this.scope),i=this.buildRecords(n);this.handleExitingElements(e,i),i.forEach(({projection:t})=>{const e=t.instance,n=t.resumeFrom?.instance;if(!e||!n)return;if(!("style"in e))return;const i=e.style.transform,s=n.style.transform;i&&s&&i===s&&(e.style.transform="",e.style.transformOrigin="")}),i.forEach(({projection:t})=>{t.isPresent=!0});const s=function(t,e){const n=t[0]||e[0];return n?.projection.root}(i,e);s?.didUpdate(),await new Promise(t=>{U.postRender(()=>t())});const o=function(t){const e=new Set;return t.forEach(t=>{const n=t.projection.currentAnimation;n&&e.add(n)}),Array.from(e)}(i);return new kn(o)}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=il(i,n,this.scope),{layout:s,layoutId:o}=el(i),r=(o?this.sharedTransitions.get(o):void 0)||this.defaultOptions,a=nl(i,t?.projection,{layout:s,layoutId:o,animationType:"string"==typeof s?s:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e){const n=new Set(e.map(t=>t.element));t.forEach(t=>{n.has(t.element)||(t.projection.options.layoutId&&(t.projection.isPresent=!1,t.projection.relegate()),t.visualElement.unmount(),fo.delete(t.element))});const i=new Set(t.map(t=>t.element));e.forEach(({element:t,projection:e})=>{i.has(t)&&e.resumeFrom&&!e.resumeFrom.instance&&!e.isLead()&&(e.resumeFrom=void 0,e.snapshot=void 0)})}},t.MotionGlobalConfig=o,t.MotionValue=In,t.NativeAnimation=gn,t.NativeAnimationExtended=Tn,t.NativeAnimationWrapper=Bn,t.NodeStack=ya,t.ObjectVisualElement=lr,t.SVGVisualElement=vr,t.SubscriptionManager=p,t.ViewTransitionBuilder=co,t.VisualElement=ko,t.acceleratedValues=Sn,t.activeAnimations=G,t.addAttrValue=Xi,t.addDomEvent=ua,t.addScaleCorrector=function(t){for(const e in t)sr[e]=t[e],Z(e)&&(sr[e].isCSSVariable=!0)},t.addStyleValue=Ji,t.addUniqueItem=e,t.addValueToWillChange=hi,t.alpha=nt,t.analyseComplexValue=Vt,t.animate=Al,t.animateMini=Pl,t.animateMotionValue=Gn,t.animateSingleValue=ca,t.animateTarget=gi,t.animateValue=function(t){return new De(t)},t.animateVariant=vi,t.animateView=function(t,e={}){return new co(t,e)},t.animateVisualElement=xi,t.animationMapKey=jn,t.anticipate=P,t.applyAxisDelta=No,t.applyBoxDelta=Uo,t.applyGeneratorOptions=yn,t.applyPointDelta=Wo,t.applyPxDefaults=Wi,t.applyTreeDeltas=Ko,t.arc=function(t={}){const e=function({strength:t=.5,peak:e=.5,direction:n,rotate:i=!1}={}){const s=!0===i?1:"number"==typeof i?i:0;let o;return(i,r)=>{const a=r.x-i.x,l=r.y-i.y;let c;c="cw"===n?-t:"ccw"===n?t:(Math.abs(a)>=Math.abs(l)?a:l)<0?-t:t;let u=_n(i.x,i.y,r.x,r.y,c,e);if(void 0===n){const t=Math.abs(a){const e={x:qn(t,i.x,u.x,r.x),y:qn(t,i.y,u.y,r.y)};if(s){const n=Zn(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=v(-180,180,n-o)*s}return e}}}(t),n={interpolateProjection(t){const n=t.x.translate,i=t.y.translate;if(!(Math.sqrt(n*n+i*i)<20))return e({x:n,y:i},{x:0,y:0})},animateVisualElement(t,n,i,s,o){if(!("x"in n)&&!("y"in n))return;const r=t.getValue("x",t.latestValues.x??0),a=t.getValue("y",t.latestValues.y??0),l=n.x,c=n.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=e({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t.getValue("pathRotation",0):void 0,y={delay:s,...Un(i||{},"x")};delete y.path;const g=Wn(0);g.start(Gn("",g,[0,1e3],{...y,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),g.animation&&o.push(g.animation),delete n.x,delete n.y}};return n},t.aspectRatio=Zr,t.attachFollow=Us,t.attachSpring=function(t,e,n){return Us(t,e,{type:"spring",...n})},t.attrEffect=Hi,t.axisDeltaEquals=_r,t.axisEquals=Xr,t.axisEqualsRounded=Gr,t.backIn=A,t.backInOut=V,t.backOut=S,t.boxEquals=Hr,t.boxEqualsRounded=qr,t.buildHTMLStyles=Qo,t.buildProjectionTransform=Qr,t.buildSVGAttrs=pr,t.buildSVGPath=hr,t.buildTransform=Jo,t.calcAxisDelta=Br,t.calcBoxDelta=Cr,t.calcChildStagger=On,t.calcGeneratorDuration=Gt,t.calcLength=Dr,t.calcRelativeAxis=jr,t.calcRelativeAxisPosition=Or,t.calcRelativeBox=Lr,t.calcRelativePosition=Fr,t.camelCaseAttributes=mr,t.camelToDash=di,t.cancelFrame=$,t.cancelMicrotask=ns,t.cancelSync=ol,t.checkVariantsDidChange=Ar,t.circIn=E,t.circInOut=k,t.circOut=M,t.clamp=i,t.cleanDirtyNodes=Ea,t.collectMotionValues=Fn,t.color=Tt,t.compareByDepth=ha,t.complex=Mt,t.containsCSSVariable=tt,t.convertBoundingBoxToBox=Ro,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=we,t.copyAxisDeltaInto=kr,t.copyAxisInto=Er,t.copyBoxInto=Mr,t.correctBorderRadius=nr,t.correctBoxShadow=ir,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>xi(t,e,n)))}(t),n=Pr(),i=!0,s=!1;const o=e=>(n,i)=>{const s=ii(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=Tr(t.parent)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;ed&&y,w=!1;const b=Array.isArray(f)?f:[f];let S=b.reduce(o(p),{});!1===g&&(S={});const{prevResolvedValues:A={}}=m,V={...A,...S},P=e=>{T=!0,u.has(e)&&(w=!0,u.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in V){const e=S[t],n=A[t];if(h.hasOwnProperty(t))continue;let i=!1;i=oi(e)&&oi(n)?!wr(e,n)||x:e!==n,i?null!=e?P(t):u.add(t):void 0!==e&&u.has(t)?P(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=S,m.isActive&&(h={...h,...S}),(i||s)&&t.blockInitialAnimation&&(T=!1);const E=v&&x;T&&(!E||w)&&c.push(...b.map(e=>{const n={type:p};if("string"==typeof e&&(i||s)&&!E&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=ii(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=On(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof a.initial){const n=ii(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let p=Boolean(c.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,s=!1,p?e(c):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Pr(),s=!0}}},t.createAxis=po,t.createAxisDelta=uo,t.createBox=mo,t.createDelta=ho,t.createGeneratorEasing=qt,t.createProjectionNode=Sa,t.createRenderBatcher=N,t.createScopedAnimate=Sl,t.cubicBezier=T,t.cubicBezierAsString=hn,t.defaultEasing=be,t.defaultOffset=Te,t.defaultTransformValue=We,t.defaultValueTypes=Bi,t.degrees=pt,t.delay=ma,t.delayInSeconds=ma,t.dimensionValueTypes=wi,t.distance=tc,t.distance2D=function(t,e){const n=tc(t.x,e.x),i=tc(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=Jr,t.easeIn=D,t.easeInOut=B,t.easeOut=R,t.easingDefinitionToFunction=F,t.fillOffset=xe,t.fillWildcards=Re,t.findDimensionValueType=bi,t.findValueType=Xs,t.flushKeyframeResolvers=en,t.followValue=Ns,t.frame=U,t.frameData=z,t.frameSteps=K,t.generateLinearEasing=Xt,t.getAnimatableNone=Li,t.getAnimationMap=Ln,t.getComputedStyle=ys,t.getDefaultTransition=Yn,t.getDefaultValueType=Ci,t.getEasingForSegment=j,t.getFeatureDefinitions=function(){return Mo},t.getFinalKeyframe=Ve,t.getMixer=Nt,t.getOptimisedAppearId=fi,t.getOriginIndex=Is,t.getValueAsType=zi,t.getValueTransition=Un,t.getVariableValue=ti,t.getVariantContext=Tr,t.getViewAnimationLayerInfo=Qs,t.getViewAnimations=eo,t.globalProjectionState=ga,t.has2DTranslate=Oo,t.hasReducedMotionListener=Ao,t.hasScale=jo,t.hasTransform=Lo,t.hasWarned=function(t){return g.has(t)},t.hex=ht,t.hover=function(t,e,n={}){const[i,s,o]=os(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||ss())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=xt,t.hslaToRgba=Dt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Ui(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:Ql[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=ge,t.initPrefersReducedMotion=Po,t.interpolate=ve,t.invisibleValues=Ft,t.isAnimationControls=yo,t.isBezierDefinition=L,t.isCSSVariableName=Z,t.isCSSVariableToken=J,t.isControllingVariants=To,t.isDeltaZero=Yr,t.isDragActive=ss,t.isDragging=is,t.isEasingArray=C,t.isElementKeyboardAccessible=cs,t.isElementTextInput=function(t){return us.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=or,t.isGenerator=fn,t.isHTMLElement=qi,t.isKeyframesTarget=oi,t.isMotionValue=ci,t.isNear=Rr,t.isNodeOrChild=rs,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=as,t.isSVGElement=gs,t.isSVGSVGElement=Fs,t.isSVGTag=fr,t.isTransitionDefined=Hn,t.isVariantLabel=go,t.isVariantNode=wo,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&un()||!e||"string"==typeof e&&(e in dn||un())||L(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=ui,t.isZeroValueString=l,t.keyframes=Se,t.makeAnimationInstant=bn,t.mapEasingToNativeEasing=pn,t.mapValue=function(t,e,n,i){const s=Ws(e,n,i);return Ks(()=>s(t.get()))},t.maxGeneratorDuration=Ht,t.measurePageBox=function(t,e,n){const i=qo(t,n),{scroll:s}=e;return s&&(Yo(i.x,s.offset.x),Yo(i.y,s.offset.y)),i},t.measureViewportBox=qo,t.memo=c,t.microtask=es,t.millisecondsToSeconds=f,t.mirrorEasing=w,t.mix=Kt,t.mixArray=Ut,t.mixColor=Ot,t.mixComplex=zt,t.mixImmediate=Rt,t.mixLinearColor=Ct,t.mixNumber=Bt,t.mixObject=$t,t.mixValues=sa,t.mixVisibility=It,t.motionValue=Wn,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&it.forEach(qa);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=u,t.number=et,t.numberValueTypes=Ri,t.observeTimeline=Ds,t.optimizedAppearDataAttribute=mi,t.optimizedAppearDataId=pi,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:Ui(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=Qn,t.parseValueFromTransform=Ne,t.percent=mt,t.pipe=h,t.pixelsToPercent=er,t.positionalKeys=si,t.prefersReducedMotion=So,t.press=function(t,e,n={}){const[i,s,o]=os(t,n),r=t=>{const i=t.currentTarget;if(!ms(t))return;if(fs.has(t))return;hs.add(i),n.stopPropagation&&fs.add(t);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),hs.has(i)&&hs.delete(i),ms(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||rs(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),qi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=ds(()=>{if(hs.has(n))return;ps(n,"down");const t=ds(()=>{ps(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>ps(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),cs(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=d,t.progressPercentage=vt,t.propEffect=Gi,t.propagateDirtyNodes=Pa,t.px=ft,t.readTransformValue=Ue,t.recordStats=function(){if(W.value)throw Ls(),new Error("Stats are already being measured");const t=W;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},U.postRender(Rs,!0),Os},t.removeAxisDelta=Wr,t.removeAxisTransforms=Nr,t.removeBoxTransforms=zr,t.removeItem=n,t.removePointDelta=Ir,t.renderHTML=tr,t.renderSVG=yr,t.resize=ks,t.resolveElements=Ui,t.resolveMotionValue=fa,t.resolveTransition=Nn,t.resolveVariant=ii,t.resolveVariantFromProps=ni,t.reverseEasing=b,t.rgbUnit=ct,t.rgba=ut,t.rootProjectionNode=Za,t.scale=it,t.scaleCorrectors=sr,t.scalePoint=Io,t.scrapeHTMLMotionValuesFromProps=rr,t.scrapeSVGMotionValuesFromProps=gr,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return u;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||function(t){return t&&(t.target||t.offset)}(e)?Kl(n=>{t(n[e.axis].progress,n)},e):Ds(t,Jl(e))}(t,s):function(t,e){const n=Jl(e),i=e.target?ql(e.offset):void 0,s=e.target?El(e.target)&&!!i:El();return t.attachTimeline({timeline:s?n:void 0,...i&&s&&{rangeStart:i.rangeStart,rangeEnd:i.rangeEnd},observe:t=>(t.pause(),Ds(e=>{t.time=t.iterationDuration*e},n))})}(t,s)},t.scrollInfo=Kl,t.secondsToMilliseconds=m,t.setDragLock=function(t){return"x"===t||"y"===t?is[t]?null:(is[t]=!0,()=>{is[t]=!1}):is.x||is.y?null:(is.x=is.y=!0,()=>{is.x=is.y=!1})},t.setFeatureDefinitions=function(t){Mo=t},t.setStyle=on,t.setTarget=li,t.spring=fe,t.springValue=function(t,e){return Ns(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:Is(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=F(i)(l/e)*e}return e+l}},t.startWaapiAnimation=mn,t.statsBuffer=W,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=Qi,t.supportedWaapiEasing=dn,t.supportsBrowserAnimation=En,t.supportsFlags=rn,t.supportsLinearEasing=un,t.supportsPartialKeyframes=Ni,t.supportsScrollTimeline=ln,t.supportsViewTimeline=cn,t.svgEffect=ts,t.sync=sl,t.testValueType=Ti,t.time=H,t.transform=Ws,t.transformAxis=Xo,t.transformBox=Go,t.transformBoxPoints=Bo,t.transformPropOrder=ze,t.transformProps=Ke,t.transformValue=Ks,t.transformValueTypes=Di,t.translateAxis=Yo,t.updateMotionValuesFromProps=bo,t.variantPriorityOrder=vo,t.variantProps=xo,t.velocityPerSecond=y,t.vh=yt,t.visualElementStore=fo,t.vw=gt,t.warnOnce=function(t,e,n){t||g.has(e)||(console.warn(s(e,n)),g.add(e))},t.wrap=v}); diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react-client.d.ts b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react-client.d.ts deleted file mode 100644 index dd39a72a..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react-client.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/client'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react-m.d.ts b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react-m.d.ts deleted file mode 100644 index c7ed1b12..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react-m.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/m'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react-mini.d.ts b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react-mini.d.ts deleted file mode 100644 index ef5bdaef..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react-mini.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'framer-motion/mini'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react.d.ts b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react.d.ts deleted file mode 100644 index 18fa8ea9..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/dist/react.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from 'framer-motion'; -export { m, motion } from 'framer-motion'; diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/mini/package.json b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/mini/package.json deleted file mode 100644 index 1ed44076..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/mini/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "types": "../dist/mini.d.ts", - "main": "../dist/cjs/mini.js", - "module": "../dist/es/mini.mjs" -} diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/package.json b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/package.json deleted file mode 100644 index ae567d68..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "name": "motion", - "version": "12.40.0", - "description": "An animation library for JavaScript and React.", - "main": "dist/cjs/index.js", - "module": "dist/es/index.mjs", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "require": "./dist/cjs/index.js", - "import": "./dist/es/index.mjs", - "default": "./dist/cjs/index.js" - }, - "./debug": { - "types": "./dist/debug.d.ts", - "require": "./dist/cjs/debug.js", - "import": "./dist/es/debug.mjs", - "default": "./dist/cjs/debug.js" - }, - "./mini": { - "types": "./dist/mini.d.ts", - "require": "./dist/cjs/mini.js", - "import": "./dist/es/mini.mjs", - "default": "./dist/cjs/mini.js" - }, - "./react": { - "types": "./dist/react.d.ts", - "require": "./dist/cjs/react.js", - "import": "./dist/es/react.mjs", - "default": "./dist/cjs/react.js" - }, - "./react-client": { - "types": "./dist/react-client.d.ts", - "require": "./dist/cjs/react-client.js", - "import": "./dist/es/react-client.mjs", - "default": "./dist/cjs/react-client.js" - }, - "./react-m": { - "types": "./dist/react-m.d.ts", - "require": "./dist/cjs/react-m.js", - "import": "./dist/es/react-m.mjs", - "default": "./dist/cjs/react-m.js" - }, - "./react-mini": { - "types": "./dist/react-mini.d.ts", - "require": "./dist/cjs/react-mini.js", - "import": "./dist/es/react-mini.mjs", - "default": "./dist/cjs/react-mini.js" - }, - "./package.json": "./package.json" - }, - "types": "dist/index.d.ts", - "author": "Matt Perry", - "license": "MIT", - "repository": "https://github.com/motiondivision/motion", - "sideEffects": false, - "keywords": [ - "javascript animation", - "react animation", - "react", - "three", - "3d", - "animation", - "gestures", - "drag", - "spring", - "popmotion", - "framer", - "waapi" - ], - "scripts": { - "build": "yarn clean && tsc -p . && rollup -c", - "dev": "concurrently -c blue,red -n tsc,rollup --kill-others \"tsc --watch -p . --preserveWatchOutput\" \"rollup --config --watch --no-watch.clearScreen\"", - "clean": "rm -rf types dist lib", - "prepack": "yarn build", - "postpublish": "git push --tags" - }, - "dependencies": { - "framer-motion": "^12.40.0", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "@emotion/is-prop-valid": "*", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/is-prop-valid": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - } - }, - "gitHead": "38ebb9480e5b25a51e09e2ec866c101d01d82c60" -} diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/react-client/package.json b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/react-client/package.json deleted file mode 100644 index 41e0c965..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/react-client/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "types": "../dist/react-client.d.ts", - "main": "../dist/cjs/react-client.js", - "module": "../dist/es/react-client.mjs" -} diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/react-m/package.json b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/react-m/package.json deleted file mode 100644 index 45b9dc15..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/react-m/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "types": "../dist/react-m.d.ts", - "main": "../dist/cjs/react-m.js", - "module": "../dist/es/react-m.mjs" -} diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/react/package.json b/node_modules/.pnpm/motion@12.40.0/node_modules/motion/react/package.json deleted file mode 100644 index 27ab21ce..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/motion/react/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "private": true, - "types": "../dist/react.d.ts", - "main": "../dist/cjs/react.js", - "module": "../dist/es/react.mjs" -} diff --git a/node_modules/.pnpm/motion@12.40.0/node_modules/tslib b/node_modules/.pnpm/motion@12.40.0/node_modules/tslib deleted file mode 120000 index 4edba0e2..00000000 --- a/node_modules/.pnpm/motion@12.40.0/node_modules/tslib +++ /dev/null @@ -1 +0,0 @@ -../../tslib@2.8.1/node_modules/tslib \ No newline at end of file diff --git a/node_modules/.pnpm/node_modules/framer-motion b/node_modules/.pnpm/node_modules/framer-motion deleted file mode 120000 index c2093d45..00000000 --- a/node_modules/.pnpm/node_modules/framer-motion +++ /dev/null @@ -1 +0,0 @@ -../framer-motion@12.40.0/node_modules/framer-motion \ No newline at end of file diff --git a/node_modules/.pnpm/node_modules/motion-dom b/node_modules/.pnpm/node_modules/motion-dom deleted file mode 120000 index 569a3c4c..00000000 --- a/node_modules/.pnpm/node_modules/motion-dom +++ /dev/null @@ -1 +0,0 @@ -../motion-dom@12.40.0/node_modules/motion-dom \ No newline at end of file diff --git a/node_modules/.pnpm/node_modules/motion-utils b/node_modules/.pnpm/node_modules/motion-utils deleted file mode 120000 index 62b9c9e6..00000000 --- a/node_modules/.pnpm/node_modules/motion-utils +++ /dev/null @@ -1 +0,0 @@ -../motion-utils@12.39.0/node_modules/motion-utils \ No newline at end of file diff --git a/node_modules/.pnpm/node_modules/tslib b/node_modules/.pnpm/node_modules/tslib deleted file mode 120000 index 9e1c1d38..00000000 --- a/node_modules/.pnpm/node_modules/tslib +++ /dev/null @@ -1 +0,0 @@ -../tslib@2.8.1/node_modules/tslib \ No newline at end of file diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/CopyrightNotice.txt b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/CopyrightNotice.txt deleted file mode 100644 index 0e425423..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/CopyrightNotice.txt +++ /dev/null @@ -1,15 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/LICENSE.txt b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/LICENSE.txt deleted file mode 100644 index bfe6430c..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/LICENSE.txt +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/README.md b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/README.md deleted file mode 100644 index 290cc618..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/README.md +++ /dev/null @@ -1,164 +0,0 @@ -# tslib - -This is a runtime library for [TypeScript](https://www.typescriptlang.org/) that contains all of the TypeScript helper functions. - -This library is primarily used by the `--importHelpers` flag in TypeScript. -When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: - -```ts -var __assign = (this && this.__assign) || Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; -}; -exports.x = {}; -exports.y = __assign({}, exports.x); - -``` - -will instead be emitted as something like the following: - -```ts -var tslib_1 = require("tslib"); -exports.x = {}; -exports.y = tslib_1.__assign({}, exports.x); -``` - -Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. -For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. - -# Installing - -For the latest stable version, run: - -## npm - -```sh -# TypeScript 3.9.2 or later -npm install tslib - -# TypeScript 3.8.4 or earlier -npm install tslib@^1 - -# TypeScript 2.3.2 or earlier -npm install tslib@1.6.1 -``` - -## yarn - -```sh -# TypeScript 3.9.2 or later -yarn add tslib - -# TypeScript 3.8.4 or earlier -yarn add tslib@^1 - -# TypeScript 2.3.2 or earlier -yarn add tslib@1.6.1 -``` - -## bower - -```sh -# TypeScript 3.9.2 or later -bower install tslib - -# TypeScript 3.8.4 or earlier -bower install tslib@^1 - -# TypeScript 2.3.2 or earlier -bower install tslib@1.6.1 -``` - -## JSPM - -```sh -# TypeScript 3.9.2 or later -jspm install tslib - -# TypeScript 3.8.4 or earlier -jspm install tslib@^1 - -# TypeScript 2.3.2 or earlier -jspm install tslib@1.6.1 -``` - -# Usage - -Set the `importHelpers` compiler option on the command line: - -``` -tsc --importHelpers file.ts -``` - -or in your tsconfig.json: - -```json -{ - "compilerOptions": { - "importHelpers": true - } -} -``` - -#### For bower and JSPM users - -You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: - -```json -{ - "compilerOptions": { - "module": "amd", - "importHelpers": true, - "baseUrl": "./", - "paths": { - "tslib" : ["bower_components/tslib/tslib.d.ts"] - } - } -} -``` - -For JSPM users: - -```json -{ - "compilerOptions": { - "module": "system", - "importHelpers": true, - "baseUrl": "./", - "paths": { - "tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"] - } - } -} -``` - -## Deployment - -- Choose your new version number -- Set it in `package.json` and `bower.json` -- Create a tag: `git tag [version]` -- Push the tag: `git push --tags` -- Create a [release in GitHub](https://github.com/microsoft/tslib/releases) -- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow - -Done. - -# Contribute - -There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. - -* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. -* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). -* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). -* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. -* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). - -# Documentation - -* [Quick tutorial](http://www.typescriptlang.org/Tutorial) -* [Programming handbook](http://www.typescriptlang.org/Handbook) -* [Homepage](http://www.typescriptlang.org/) diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/SECURITY.md b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/SECURITY.md deleted file mode 100644 index 869fdfe2..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/SECURITY.md +++ /dev/null @@ -1,41 +0,0 @@ - - -## Security - -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. - -## Reporting Security Issues - -**Please do not report security vulnerabilities through public GitHub issues.** - -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). - -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). - -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. - -## Preferred Languages - -We prefer all communications to be in English. - -## Policy - -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). - - diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.d.ts b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.d.ts deleted file mode 100644 index 3244fabe..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Note: named reexports are used instead of `export *` because -// TypeScript itself doesn't resolve the `export *` when checking -// if a particular helper exists. -export { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __createBinding, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -} from '../tslib.js'; -export * as default from '../tslib.js'; diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.js b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.js deleted file mode 100644 index c91f6186..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.js +++ /dev/null @@ -1,70 +0,0 @@ -import tslib from '../tslib.js'; -const { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -} = tslib; -export { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -}; -export default tslib; diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/package.json b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/package.json deleted file mode 100644 index aafa0e4b..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} \ No newline at end of file diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/package.json b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/package.json deleted file mode 100644 index 57d05787..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "tslib", - "author": "Microsoft Corp.", - "homepage": "https://www.typescriptlang.org/", - "version": "2.8.1", - "license": "0BSD", - "description": "Runtime library for TypeScript helper functions", - "keywords": [ - "TypeScript", - "Microsoft", - "compiler", - "language", - "javascript", - "tslib", - "runtime" - ], - "bugs": { - "url": "https://github.com/Microsoft/TypeScript/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/Microsoft/tslib.git" - }, - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "sideEffects": false, - "exports": { - ".": { - "module": { - "types": "./modules/index.d.ts", - "default": "./tslib.es6.mjs" - }, - "import": { - "node": "./modules/index.js", - "default": { - "types": "./modules/index.d.ts", - "default": "./tslib.es6.mjs" - } - }, - "default": "./tslib.js" - }, - "./*": "./*", - "./": "./" - } -} diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.d.ts b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.d.ts deleted file mode 100644 index f23df559..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.d.ts +++ /dev/null @@ -1,460 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - -/** - * Used to shim class extends. - * - * @param d The derived class. - * @param b The base class. - */ -export declare function __extends(d: Function, b: Function): void; - -/** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * - * @param t The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ -export declare function __assign(t: any, ...sources: any[]): any; - -/** - * Performs a rest spread on an object. - * - * @param t The source value. - * @param propertyNames The property names excluded from the rest spread. - */ -export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; - -/** - * Applies decorators to a target object - * - * @param decorators The set of decorators to apply. - * @param target The target object. - * @param key If specified, the own property to apply the decorators to. - * @param desc The property descriptor, defaults to fetching the descriptor from the target object. - * @experimental - */ -export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; - -/** - * Creates an observing function decorator from a parameter decorator. - * - * @param paramIndex The parameter index to apply the decorator to. - * @param decorator The parameter decorator to apply. Note that the return value is ignored. - * @experimental - */ -export declare function __param(paramIndex: number, decorator: Function): Function; - -/** - * Applies decorators to a class or class member, following the native ECMAScript decorator specification. - * @param ctor For non-field class members, the class constructor. Otherwise, `null`. - * @param descriptorIn The `PropertyDescriptor` to use when unable to look up the property from `ctor`. - * @param decorators The decorators to apply - * @param contextIn The `DecoratorContext` to clone for each decorator application. - * @param initializers An array of field initializer mutation functions into which new initializers are written. - * @param extraInitializers An array of extra initializer functions into which new initializers are written. - */ -export declare function __esDecorate(ctor: Function | null, descriptorIn: object | null, decorators: Function[], contextIn: object, initializers: Function[] | null, extraInitializers: Function[]): void; - -/** - * Runs field initializers or extra initializers generated by `__esDecorate`. - * @param thisArg The `this` argument to use. - * @param initializers The array of initializers to evaluate. - * @param value The initial value to pass to the initializers. - */ -export declare function __runInitializers(thisArg: unknown, initializers: Function[], value?: any): any; - -/** - * Converts a computed property name into a `string` or `symbol` value. - */ -export declare function __propKey(x: any): string | symbol; - -/** - * Assigns the name of a function derived from the left-hand side of an assignment. - * @param f The function to rename. - * @param name The new name for the function. - * @param prefix A prefix (such as `"get"` or `"set"`) to insert before the name. - */ -export declare function __setFunctionName(f: Function, name: string | symbol, prefix?: string): Function; - -/** - * Creates a decorator that sets metadata. - * - * @param metadataKey The metadata key - * @param metadataValue The metadata value - * @experimental - */ -export declare function __metadata(metadataKey: any, metadataValue: any): Function; - -/** - * Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`. - * - * @param thisArg The reference to use as the `this` value in the generator function - * @param _arguments The optional arguments array - * @param P The optional promise constructor argument, defaults to the `Promise` property of the global object. - * @param generator The generator function - */ -export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; - -/** - * Creates an Iterator object using the body as the implementation. - * - * @param thisArg The reference to use as the `this` value in the function - * @param body The generator state-machine based implementation. - * - * @see [./docs/generator.md] - */ -export declare function __generator(thisArg: any, body: Function): any; - -/** - * Creates bindings for all enumerable properties of `m` on `exports` - * - * @param m The source object - * @param o The `exports` object. - */ -export declare function __exportStar(m: any, o: any): void; - -/** - * Creates a value iterator from an `Iterable` or `ArrayLike` object. - * - * @param o The object. - * @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`. - */ -export declare function __values(o: any): any; - -/** - * Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array. - * - * @param o The object to read from. - * @param n The maximum number of arguments to read, defaults to `Infinity`. - */ -export declare function __read(o: any, n?: number): any[]; - -/** - * Creates an array from iterable spread. - * - * @param args The Iterable objects to spread. - * @deprecated since TypeScript 4.2 - Use `__spreadArray` - */ -export declare function __spread(...args: any[][]): any[]; - -/** - * Creates an array from array spread. - * - * @param args The ArrayLikes to spread into the resulting array. - * @deprecated since TypeScript 4.2 - Use `__spreadArray` - */ -export declare function __spreadArrays(...args: any[][]): any[]; - -/** - * Spreads the `from` array into the `to` array. - * - * @param pack Replace empty elements with `undefined`. - */ -export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[]; - -/** - * Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded, - * and instead should be awaited and the resulting value passed back to the generator. - * - * @param v The value to await. - */ -export declare function __await(v: any): any; - -/** - * Converts a generator function into an async generator function, by using `yield __await` - * in place of normal `await`. - * - * @param thisArg The reference to use as the `this` value in the generator function - * @param _arguments The optional arguments array - * @param generator The generator function - */ -export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; - -/** - * Used to wrap a potentially async iterator in such a way so that it wraps the result - * of calling iterator methods of `o` in `__await` instances, and then yields the awaited values. - * - * @param o The potentially async iterator. - * @returns A synchronous iterator yielding `__await` instances on every odd invocation - * and returning the awaited `IteratorResult` passed to `next` every even invocation. - */ -export declare function __asyncDelegator(o: any): any; - -/** - * Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object. - * - * @param o The object. - * @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`. - */ -export declare function __asyncValues(o: any): any; - -/** - * Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays. - * - * @param cooked The cooked possibly-sparse array. - * @param raw The raw string content. - */ -export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; - -/** - * Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS. - * - * ```js - * import Default, { Named, Other } from "mod"; - * // or - * import { default as Default, Named, Other } from "mod"; - * ``` - * - * @param mod The CommonJS module exports object. - */ -export declare function __importStar(mod: T): T; - -/** - * Used to shim default imports in ECMAScript Modules transpiled to CommonJS. - * - * ```js - * import Default from "mod"; - * ``` - * - * @param mod The CommonJS module exports object. - */ -export declare function __importDefault(mod: T): T | { default: T }; - -/** - * Emulates reading a private instance field. - * - * @param receiver The instance from which to read the private field. - * @param state A WeakMap containing the private field value for an instance. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet( - receiver: T, - state: { has(o: T): boolean, get(o: T): V | undefined }, - kind?: "f" -): V; - -/** - * Emulates reading a private static field. - * - * @param receiver The object from which to read the private static field. - * @param state The class constructor containing the definition of the static field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The descriptor that holds the static field value. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V>( - receiver: T, - state: T, - kind: "f", - f: { value: V } -): V; - -/** - * Emulates evaluating a private instance "get" accessor. - * - * @param receiver The instance on which to evaluate the private "get" accessor. - * @param state A WeakSet used to verify an instance supports the private "get" accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "get" accessor function to evaluate. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet( - receiver: T, - state: { has(o: T): boolean }, - kind: "a", - f: () => V -): V; - -/** - * Emulates evaluating a private static "get" accessor. - * - * @param receiver The object on which to evaluate the private static "get" accessor. - * @param state The class constructor containing the definition of the static "get" accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "get" accessor function to evaluate. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V>( - receiver: T, - state: T, - kind: "a", - f: () => V -): V; - -/** - * Emulates reading a private instance method. - * - * @param receiver The instance from which to read a private method. - * @param state A WeakSet used to verify an instance supports the private method. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The function to return as the private instance method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet unknown>( - receiver: T, - state: { has(o: T): boolean }, - kind: "m", - f: V -): V; - -/** - * Emulates reading a private static method. - * - * @param receiver The object from which to read the private static method. - * @param state The class constructor containing the definition of the static method. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The function to return as the private static method. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V extends (...args: any[]) => unknown>( - receiver: T, - state: T, - kind: "m", - f: V -): V; - -/** - * Emulates writing to a private instance field. - * - * @param receiver The instance on which to set a private field value. - * @param state A WeakMap used to store the private field value for an instance. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldSet( - receiver: T, - state: { has(o: T): boolean, set(o: T, value: V): unknown }, - value: V, - kind?: "f" -): V; - -/** - * Emulates writing to a private static field. - * - * @param receiver The object on which to set the private static field. - * @param state The class constructor containing the definition of the private static field. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The descriptor that holds the static field value. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldSet unknown, V>( - receiver: T, - state: T, - value: V, - kind: "f", - f: { value: V } -): V; - -/** - * Emulates writing to a private instance "set" accessor. - * - * @param receiver The instance on which to evaluate the private instance "set" accessor. - * @param state A WeakSet used to verify an instance supports the private "set" accessor. - * @param value The value to store in the private accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "set" accessor function to evaluate. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldSet( - receiver: T, - state: { has(o: T): boolean }, - value: V, - kind: "a", - f: (v: V) => void -): V; - -/** - * Emulates writing to a private static "set" accessor. - * - * @param receiver The object on which to evaluate the private static "set" accessor. - * @param state The class constructor containing the definition of the static "set" accessor. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "set" accessor function to evaluate. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldSet unknown, V>( - receiver: T, - state: T, - value: V, - kind: "a", - f: (v: V) => void -): V; - -/** - * Checks for the existence of a private field/method/accessor. - * - * @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member. - * @param receiver The object for which to test the presence of the private member. - */ -export declare function __classPrivateFieldIn( - state: (new (...args: any[]) => unknown) | { has(o: any): boolean }, - receiver: unknown, -): boolean; - -/** - * Creates a re-export binding on `object` with key `objectKey` that references `target[key]`. - * - * @param object The local `exports` object. - * @param target The object to re-export from. - * @param key The property key of `target` to re-export. - * @param objectKey The property key to re-export as. Defaults to `key`. - */ -export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; - -/** - * Adds a disposable resource to a resource-tracking environment object. - * @param env A resource-tracking environment object. - * @param value Either a Disposable or AsyncDisposable object, `null`, or `undefined`. - * @param async When `true`, `AsyncDisposable` resources can be added. When `false`, `AsyncDisposable` resources cannot be added. - * @returns The {@link value} argument. - * - * @throws {TypeError} If {@link value} is not an object, or if either `Symbol.dispose` or `Symbol.asyncDispose` are not - * defined, or if {@link value} does not have an appropriate `Symbol.dispose` or `Symbol.asyncDispose` method. - */ -export declare function __addDisposableResource(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }, value: T, async: boolean): T; - -/** - * Disposes all resources in a resource-tracking environment object. - * @param env A resource-tracking environment object. - * @returns A {@link Promise} if any resources in the environment were marked as `async` when added; otherwise, `void`. - * - * @throws {SuppressedError} if an error thrown during disposal would have suppressed a prior error from disposal or the - * error recorded in the resource-tracking environment object. - * @seealso {@link __addDisposableResource} - */ -export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any; - -/** - * Transforms a relative import specifier ending in a non-declaration TypeScript file extension to its JavaScript file extension counterpart. - * @param path The import specifier. - * @param preserveJsx Causes '*.tsx' to transform to '*.jsx' instead of '*.js'. Should be true when `--jsx` is set to `preserve`. - */ -export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean): string; \ No newline at end of file diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.html b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.html deleted file mode 100644 index b122e41b..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js deleted file mode 100644 index 6c1739b3..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +++ /dev/null @@ -1,402 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -export function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -export var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -export function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -export function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -export function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; - -export function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; - -export function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -}; - -export function __setFunctionName(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; - -export function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -export function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -export function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -export var __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); - -export function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} - -export function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -export function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -/** @deprecated */ -export function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -export function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} - -export function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} - -export function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -export function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -export function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } -} - -export function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -export function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}; - -var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); -}; - -export function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; -} - -export function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - -export function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} - -export function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -} - -export function __classPrivateFieldIn(state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} - -export function __addDisposableResource(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - -} - -var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -export function __disposeResources(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} - -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - -export default { - __extends: __extends, - __assign: __assign, - __rest: __rest, - __decorate: __decorate, - __param: __param, - __esDecorate: __esDecorate, - __runInitializers: __runInitializers, - __propKey: __propKey, - __setFunctionName: __setFunctionName, - __metadata: __metadata, - __awaiter: __awaiter, - __generator: __generator, - __createBinding: __createBinding, - __exportStar: __exportStar, - __values: __values, - __read: __read, - __spread: __spread, - __spreadArrays: __spreadArrays, - __spreadArray: __spreadArray, - __await: __await, - __asyncGenerator: __asyncGenerator, - __asyncDelegator: __asyncDelegator, - __asyncValues: __asyncValues, - __makeTemplateObject: __makeTemplateObject, - __importStar: __importStar, - __importDefault: __importDefault, - __classPrivateFieldGet: __classPrivateFieldGet, - __classPrivateFieldSet: __classPrivateFieldSet, - __classPrivateFieldIn: __classPrivateFieldIn, - __addDisposableResource: __addDisposableResource, - __disposeResources: __disposeResources, - __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, -}; diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs deleted file mode 100644 index c17990a1..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs +++ /dev/null @@ -1,401 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -export function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -export var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -export function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -export function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -export function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; - -export function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; - -export function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -}; - -export function __setFunctionName(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; - -export function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -export function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -export function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -export var __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); - -export function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} - -export function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -export function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -/** @deprecated */ -export function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -export function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} - -export function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} - -export function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -export function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -export function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } -} - -export function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -export function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}; - -var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); -}; - -export function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; -} - -export function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - -export function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} - -export function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -} - -export function __classPrivateFieldIn(state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} - -export function __addDisposableResource(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -} - -var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -export function __disposeResources(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} - -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - -export default { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __createBinding, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -}; diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.html b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.html deleted file mode 100644 index 44c9ba51..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.js b/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.js deleted file mode 100644 index 5e12ace6..00000000 --- a/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.js +++ /dev/null @@ -1,484 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __esDecorate; -var __runInitializers; -var __propKey; -var __setFunctionName; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -var __addDisposableResource; -var __disposeResources; -var __rewriteRelativeImportExtension; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if (typeof module === "object" && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - }; - - __runInitializers = function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; - }; - - __propKey = function (x) { - return typeof x === "symbol" ? x : "".concat(x); - }; - - __setFunctionName = function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); - }; - - __addDisposableResource = function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - }; - - var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - - __disposeResources = function (env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); - }; - - __rewriteRelativeImportExtension = function (path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); - exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); -}); - -0 && (module.exports = { - __extends: __extends, - __assign: __assign, - __rest: __rest, - __decorate: __decorate, - __param: __param, - __esDecorate: __esDecorate, - __runInitializers: __runInitializers, - __propKey: __propKey, - __setFunctionName: __setFunctionName, - __metadata: __metadata, - __awaiter: __awaiter, - __generator: __generator, - __exportStar: __exportStar, - __createBinding: __createBinding, - __values: __values, - __read: __read, - __spread: __spread, - __spreadArrays: __spreadArrays, - __spreadArray: __spreadArray, - __await: __await, - __asyncGenerator: __asyncGenerator, - __asyncDelegator: __asyncDelegator, - __asyncValues: __asyncValues, - __makeTemplateObject: __makeTemplateObject, - __importStar: __importStar, - __importDefault: __importDefault, - __classPrivateFieldGet: __classPrivateFieldGet, - __classPrivateFieldSet: __classPrivateFieldSet, - __classPrivateFieldIn: __classPrivateFieldIn, - __addDisposableResource: __addDisposableResource, - __disposeResources: __disposeResources, - __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, -}); diff --git a/node_modules/.vite/deps/_metadata.json b/node_modules/.vite/deps/_metadata.json deleted file mode 100644 index e94dd106..00000000 --- a/node_modules/.vite/deps/_metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "hash": "53fcbece", - "configHash": "a2986941", - "lockfileHash": "e3b0c442", - "browserHash": "7705c6f7", - "optimized": {}, - "chunks": {} -} \ No newline at end of file diff --git a/node_modules/.vite/deps/package.json b/node_modules/.vite/deps/package.json deleted file mode 100644 index 3dbc1ca5..00000000 --- a/node_modules/.vite/deps/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/motion b/node_modules/motion deleted file mode 120000 index e2b3b079..00000000 --- a/node_modules/motion +++ /dev/null @@ -1 +0,0 @@ -.pnpm/motion@12.40.0/node_modules/motion \ No newline at end of file