Turn one illustration into an animated 2D mesh avatar with a coding agent and a local editor
Add project scaffold and reference mesh avatar engine
shinshin866c2ecd538202
diff --git a/.gitignore b/.gitignorenew file mode 100644index 0000000..4afd02e--- /dev/null+++ b/.gitignore@@ -0,0 +1,12 @@+node_modules/+dist/+.DS_Store+*.log+docs/screenshots/+test-results/+playwright-report/+samples/**/*.png+samples/**/*.jpg+samples/**/*.jpeg+samples/**/*.webp+__pycache__/diff --git a/README.md b/README.mdnew file mode 100644index 0000000..fa1ed06--- /dev/null+++ b/README.md@@ -0,0 +1,64 @@+# Mesh Avatar Studio++Edit a mesh avatar rig over a source illustration and preview its animation locally in your browser.+Drag centers, pivots, strand nodes and polygon vertices; resize Gaussian regions; adjust numeric+fields; and test face angles, eye and mouth openings, breathing and secondary motion.++## Run++Requires Node.js 20.19+ or 22.12+.++```sh+npm install+npm run dev+```++Open the local URL printed by Vite. Use **Open rig** to load `rig.json`, then **Open image folder**+to choose the folder containing your source and pre-cut assets. The folder may include its own+`rig.json`; if present, it is loaded along with the images. Processing stays in the browser.++```text+project/+ rig.json+ source.png+ built/+ layers.json+ base.png+ hairmask.png+ eye0_ball.png+ ...other cut-out layers named in layers.json+ sprites/ # optional drawn eye/mouth variants+ sprites.json+ ...sprite images+```++Source and cut-out images are not bundled. If you have the matching miko-qipao sample images, place+`source.png` under `samples/miko-qipao/` and the cut-out images under `samples/miko-qipao/built/`.+The app loads the sample automatically when its images are available. Otherwise it opens an+empty workspace. The included JSON files describe geometry and asset rectangles.++## Editing++- Drag a handle or select an item to edit its numeric fields.+- Double-click a polygon/polyline edge to insert a vertex; Alt-click a vertex to remove it.+- Use the mouse wheel to zoom at the cursor; Space-drag or middle-drag to pan; **Fit** resets the view.+- **Undo** / **Redo** restore edits. Keyboard shortcuts: Ctrl/Cmd+Z, Ctrl/Cmd+Shift+Z and Ctrl/Cmd+S.+- **Save rig** downloads the current JSON. Dropping a JSON file also loads it.+- Disable **Idle animation** for a stable pose comparison, or use **Stress test** to sweep angles.++Editing a cut-out outline marks the layers stale. Existing image pixels and sampled eye curves+stay unchanged until the planned layer builder regenerates the assets.++## Verify++```sh+npm run lint+npm test+npm run build+npx playwright install chromium+npm run e2e+```++Tests that require sample images report a reason and skip when those images are absent.+Geometry, validation, history, sensitivity and empty-workspace checks still run.+`docs/screenshots/` stores local visual verification evidence and is excluded from version control.diff --git a/e2e/scaffold.spec.ts b/e2e/scaffold.spec.tsnew file mode 100644index 0000000..9b3cd72--- /dev/null+++ b/e2e/scaffold.spec.ts@@ -0,0 +1,5 @@+import { expect, test } from '@playwright/test';+test('opens the app', async ({ page }) => {+ await page.goto('/');+ await expect(page.getByRole('heading', { name: 'Mesh Avatar Studio' })).toBeVisible();+});diff --git a/eslint.config.js b/eslint.config.jsnew file mode 100644index 0000000..e541497--- /dev/null+++ b/eslint.config.js@@ -0,0 +1,15 @@+import js from '@eslint/js';+import ts from 'typescript-eslint';+import globals from 'globals';+export default ts.config(+ js.configs.recommended,+ ...ts.configs.recommended,+ {+ languageOptions: {+ globals: { ...globals.browser, ...globals.node },+ },+ rules: {+ '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],+ },+ },+);diff --git a/index.html b/index.htmlnew file mode 100644index 0000000..987369b--- /dev/null+++ b/index.html@@ -0,0 +1,12 @@+<!doctype html>+<html lang="ja">+ <head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Mesh Avatar Studio</title>+ </head>+ <body>+ <div id="root"></div>+ <script type="module" src="/src/main.tsx"></script>+ </body>+</html>diff --git a/package-lock.json b/package-lock.jsonnew file mode 100644index 0000000..d729a34--- /dev/null+++ b/package-lock.json@@ -0,0 +1,3778 @@+{+ "name": "mesh-avatar-studio",+ "version": "0.1.0",+ "lockfileVersion": 3,+ "requires": true,+ "packages": {+ "": {+ "name": "mesh-avatar-studio",+ "version": "0.1.0",+ "dependencies": {+ "react": "^19.1.0",+ "react-dom": "^19.1.0"+ },+ "devDependencies": {+ "@eslint/js": "^9.0.0",+ "@playwright/test": "^1.55.0",+ "@types/node": "^24.0.0",+ "@types/pngjs": "^6.0.0",+ "@types/react": "^19.0.0",+ "@types/react-dom": "^19.0.0",+ "@vitejs/plugin-react": "^5.0.0",+ "eslint": "^9.0.0",+ "globals": "^16.0.0",+ "pngjs": "^7.0.0",+ "typescript": "^5.9.0",+ "typescript-eslint": "^8.0.0",+ "vite": "^7.0.0",+ "vitest": "^3.2.0"+ }+ },+ "node_modules/@babel/code-frame": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",+ "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-validator-identifier": "^7.29.7",+ "js-tokens": "^4.0.0",+ "picocolors": "^1.1.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/compat-data": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz",+ "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/core": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz",+ "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.7",+ "@babel/generator": "^7.29.7",+ "@babel/helper-compilation-targets": "^7.29.7",+ "@babel/helper-module-transforms": "^7.29.7",+ "@babel/helpers": "^7.29.7",+ "@babel/parser": "^7.29.7",+ "@babel/template": "^7.29.7",+ "@babel/traverse": "^7.29.7",+ "@babel/types": "^7.29.7",+ "@jridgewell/remapping": "^2.3.5",+ "convert-source-map": "^2.0.0",+ "debug": "^4.1.0",+ "gensync": "^1.0.0-beta.2",+ "json5": "^2.2.3",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/babel"+ }+ },+ "node_modules/@babel/generator": {+ "version": "7.29.8",+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz",+ "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.29.8",+ "@babel/types": "^7.29.8",+ "@jridgewell/gen-mapping": "^0.3.12",+ "@jridgewell/trace-mapping": "^0.3.28",+ "jsesc": "^3.0.2"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-compilation-targets": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz",+ "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/compat-data": "^7.29.7",+ "@babel/helper-validator-option": "^7.29.7",+ "browserslist": "^4.24.0",+ "lru-cache": "^5.1.1",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-globals": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz",+ "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-imports": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz",+ "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/traverse": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-transforms": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz",+ "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-module-imports": "^7.29.7",+ "@babel/helper-validator-identifier": "^7.29.7",+ "@babel/traverse": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },+ "node_modules/@babel/helper-plugin-utils": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz",+ "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-string-parser": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz",+ "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-identifier": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",+ "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-option": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz",+ "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helpers": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz",+ "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/template": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/parser": {+ "version": "7.29.9",+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz",+ "integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.29.8"+ },+ "bin": {+ "parser": "bin/babel-parser.js"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@babel/plugin-transform-react-jsx-self": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz",+ "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-react-jsx-source": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz",+ "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/template": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz",+ "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.7",+ "@babel/parser": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/traverse": {+ "version": "7.29.8",+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz",+ "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.7",+ "@babel/generator": "^7.29.8",+ "@babel/helper-globals": "^7.29.7",+ "@babel/parser": "^7.29.8",+ "@babel/template": "^7.29.7",+ "@babel/types": "^7.29.8",+ "debug": "^4.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/types": {+ "version": "7.29.8",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz",+ "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-string-parser": "^7.29.7",+ "@babel/helper-validator-identifier": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@esbuild/aix-ppc64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz",+ "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "aix"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/android-arm": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz",+ "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/android-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz",+ "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/android-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz",+ "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/darwin-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz",+ "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/darwin-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz",+ "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/freebsd-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz",+ "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/freebsd-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz",+ "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-arm": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz",+ "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz",+ "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-ia32": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz",+ "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-loong64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz",+ "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-mips64el": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz",+ "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==",+ "cpu": [+ "mips64el"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-ppc64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz",+ "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-riscv64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz",+ "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-s390x": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz",+ "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==",+ "cpu": [+ "s390x"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz",+ "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/netbsd-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz",+ "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "netbsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/netbsd-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz",+ "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "netbsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/openbsd-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz",+ "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openbsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/openbsd-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz",+ "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openbsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/openharmony-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz",+ "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openharmony"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/sunos-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz",+ "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "sunos"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/win32-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz",+ "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/win32-ia32": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz",+ "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/win32-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz",+ "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@eslint-community/eslint-utils": {+ "version": "4.10.1",+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz",+ "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "eslint-visitor-keys": "^3.4.3"+ },+ "engines": {+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ },+ "peerDependencies": {+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"+ }+ },+ "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {+ "version": "3.4.3",+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/@eslint-community/regexpp": {+ "version": "4.12.2",+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",+ "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"+ }+ },+ "node_modules/@eslint/config-array": {+ "version": "0.21.2",+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz",+ "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@eslint/object-schema": "^2.1.7",+ "debug": "^4.3.1",+ "minimatch": "^3.1.5"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ }+ },+ "node_modules/@eslint/config-helpers": {+ "version": "0.4.2",+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz",+ "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@eslint/core": "^0.17.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ }+ },+ "node_modules/@eslint/core": {+ "version": "0.17.0",+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",+ "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@types/json-schema": "^7.0.15"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ }+ },+ "node_modules/@eslint/eslintrc": {+ "version": "3.3.7",+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.7.tgz",+ "integrity": "sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ajv": "^6.14.0",+ "debug": "^4.3.2",+ "espree": "^10.0.1",+ "globals": "^14.0.0",+ "ignore": "^5.2.0",+ "import-fresh": "^3.2.1",+ "js-yaml": "^4.3.2",+ "minimatch": "^3.1.5",+ "strip-json-comments": "^3.1.1"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/@eslint/eslintrc/node_modules/globals": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",+ "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@eslint/js": {+ "version": "9.39.5",+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.5.tgz",+ "integrity": "sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://eslint.org/donate"+ }+ },+ "node_modules/@eslint/object-schema": {+ "version": "2.1.7",+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz",+ "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ }+ },+ "node_modules/@eslint/plugin-kit": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz",+ "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@eslint/core": "^0.17.0",+ "levn": "^0.4.1"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ }+ },+ "node_modules/@humanfs/core": {+ "version": "0.19.2",+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz",+ "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@humanfs/types": "^0.15.0"+ },+ "engines": {+ "node": ">=18.18.0"+ }+ },+ "node_modules/@humanfs/node": {+ "version": "0.16.8",+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz",+ "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@humanfs/core": "^0.19.2",+ "@humanfs/types": "^0.15.0",+ "@humanwhocodes/retry": "^0.4.0"+ },+ "engines": {+ "node": ">=18.18.0"+ }+ },+ "node_modules/@humanfs/types": {+ "version": "0.15.0",+ "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz",+ "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18.18.0"+ }+ },+ "node_modules/@humanwhocodes/module-importer": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=12.22"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/nzakas"+ }+ },+ "node_modules/@humanwhocodes/retry": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18.18"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/nzakas"+ }+ },+ "node_modules/@jridgewell/gen-mapping": {+ "version": "0.3.13",+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.0",+ "@jridgewell/trace-mapping": "^0.3.24"+ }+ },+ "node_modules/@jridgewell/remapping": {+ "version": "2.3.5",+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/gen-mapping": "^0.3.5",+ "@jridgewell/trace-mapping": "^0.3.24"+ }+ },+ "node_modules/@jridgewell/resolve-uri": {+ "version": "3.1.2",+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@jridgewell/sourcemap-codec": {+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",+ "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@jridgewell/trace-mapping": {+ "version": "0.3.31",+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/resolve-uri": "^3.1.0",+ "@jridgewell/sourcemap-codec": "^1.4.14"+ }+ },+ "node_modules/@napi-rs/lzma-linux-x64-gnu": {+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz",+ "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^22.20 || ^24.12 || >=25"+ }+ },+ "node_modules/@playwright/test": {+ "version": "1.63.0",+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.63.0.tgz",+ "integrity": "sha512-oxMK4vllB9RK5NQ2l1pq1IfOf2AvnEuj/vYGDj0H2nMtmtZpKtCwt/l00GEO6xjGfpBNAvjovvYdCm50dRQkpQ==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "playwright": "1.63.0"+ },+ "bin": {+ "playwright": "cli.js"+ },+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/@rolldown/pluginutils": {+ "version": "1.0.0-rc.3",+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.3.tgz",+ "integrity": "sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@rollup/rollup-android-arm-eabi": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.5.tgz",+ "integrity": "sha512-J25QJU+B78T4FhhBsNpLJyVWOi31mwtpcMwywHmOKH65Q9IWGA81gPj+dnwlhU8wktVriYE+tFAaQgrnJRzAZg==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ]+ },+ "node_modules/@rollup/rollup-android-arm64": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.5.tgz",+ "integrity": "sha512-LDopB3zuZM5Ux9TT2luNEBJW/tYbGU2g1d+VpKk6I+gSKDb+/7sYE6M225gRQt4RbMX6MSwMsVR/phdjVUgRLg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ]+ },+ "node_modules/@rollup/rollup-darwin-arm64": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.5.tgz",+ "integrity": "sha512-wlJEERGfeuHeBavCL2qVnNacOK43NDoZM4sjkeRPymd04OAE9T1zBqDJgmZ+CIsPTYKwdzpUC8vmOw84dwY4Tg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ]+ },+ "node_modules/@rollup/rollup-darwin-x64": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.5.tgz",+ "integrity": "sha512-4nJJGg5jbo2wwPP4JP+LfEBA3bvP8rU9CLuhp7jWvq9sxEyhjQFTFdrqi+/dHEin/pd8jpT0vcehIpnZtmEdcQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ]+ },+ "node_modules/@rollup/rollup-freebsd-arm64": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.5.tgz",+ "integrity": "sha512-DrZbyCDF1hneuO6jRbvZ2D7+PIBM6yIwYnJpg2vIk58T+wuFpiaGZrfUr59lDWw45bg+IrpTGLPiNi/Fk4w3Cg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ]+ },+ "node_modules/@rollup/rollup-freebsd-x64": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.5.tgz",+ "integrity": "sha512-gqfUVMJMB3mehqywxp6hTBFfgtMQykZY19+cfiaYP0toIJLb/1DZRJHVkQQGP13W4TAwfZDWeg1qBcheTRioXQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.5.tgz",+ "integrity": "sha512-CFmhpvAwzSaWMlN3VN7UtmoTihlZNzoP0juQib5TQRnYUyDV8dXeWOp29sobWAT6gXl/hQgAClLlEiYozQG3OQ==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.5.tgz",+ "integrity": "sha512-Uc9H8eXCOayV6JLTH5bXKMId6qbhNHa818/BgYjm4jrlq3vZquC9cqyvHBw17xy5Mnj5f+I3gFK5JcEf3hSqrw==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm64-gnu": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.5.tgz",+ "integrity": "sha512-VcPr/szv/1BFw112Kt//fxulXt/JPqzzidU84iW68L2DdjnOO8QFUv2zTSYBEPHD6movBD4z+bbr5y60GYM7Jw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm64-musl": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.5.tgz",+ "integrity": "sha512-BnxtJ5/91BrIHYIkGrmjz/lbMhqEHt1dPFqIxIFR+jPn0xVc/oUSCtIT089zfp5ufwGDlYz2UC+Fe1SRBpYFbQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-loong64-gnu": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.5.tgz",+ "integrity": "sha512-LrYcHZwF+fAMNKHYTOQ5osWM4AZF7YF6D+XtsjDyEvljtt11twc+zHVXBLNEjxVSUnKYsOhvVz4Z213eW02COQ==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-loong64-musl": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.5.tgz",+ "integrity": "sha512-nj7QKQePAAUpCpJHtg0pR0W/b92A9NO17JS3BAQmHDn/yhmkir2p8llrKY9TOhleKIaSzy1JhxS3T9FVld6coA==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.5.tgz",+ "integrity": "sha512-5ylkX6dWMeBKge9nTU+Rxfb+ZfaCIJ9lRqIFaK0eAMcWp7OJbYnLveLgXmm0VrvuLKb8qIK+mHyH0qu88RM+iA==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-ppc64-musl": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.5.tgz",+ "integrity": "sha512-oHK4ZHYFDKjZviK34I+NwgfbGxgI7ztrNxj2hPTSSNFgeq1a/lEd7dHV2fdGAuTH4Iym3RHJg+vAbWaWG4B7Zg==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.5.tgz",+ "integrity": "sha512-UcetmHZ6XOXuUByiKZyQmb55ZPr0LABr3Ec/HB9wKZn6CEAFWZkE+hsJErJ9hbPBC7nI0dKuELx7CoV6IM7TMg==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-riscv64-musl": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.5.tgz",+ "integrity": "sha512-C5CmDPQBtvjVo8cgQsBs+w6WB0JLkiixhgi6hVLV11hERWdn/p0XcPU2OUcZzac9BPOFq7SbaHFa8r3SWEysCQ==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-s390x-gnu": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.5.tgz",+ "integrity": "sha512-lHVQHJFKsuuxLMi3MQO9XVL8Tje3JR82CzB+QDKC5NWBcsIWuwsn9uIM5e3lBhI+fF1/s63qnyYqsg65+8rV/w==",+ "cpu": [+ "s390x"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-x64-gnu": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.5.tgz",+ "integrity": "sha512-3W9bTFcQNJn71cSJVM9RKIiZOy8DO/XLDii8Uv/Pm6WKqDRj7JV3ZfuXIEfyuy5LXpIzAbB/1M4Ukp9GKNa7nA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-x64-musl": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.5.tgz",+ "integrity": "sha512-VDC7rRJlee/scpki96GZ27Omf6yU87s1YXwVTpjE5841faVlDYYT565rgfmoR1U0sqL7z5ivQSDjcsF6VRXyBA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-openbsd-x64": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.5.tgz",+ "integrity": "sha512-z86Ok2p4pTdv5xqCKZsTooO7yBEiaJR/HzU3Wx8RmWsPoLppnMKROhJusQob8B3IE1ghC343kUW9rC2r+Wf3ig==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openbsd"+ ]+ },+ "node_modules/@rollup/rollup-openharmony-arm64": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.5.tgz",+ "integrity": "sha512-IzQmj+xXwQFGhMAMKMQVXkMwMZN3TqkJgAE0nSsqvVwWWciP4AIPMmWRqOQ2GfX7TUDZr+xqGFcBS36CRPGw0g==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openharmony"+ ]+ },+ "node_modules/@rollup/rollup-win32-arm64-msvc": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.5.tgz",+ "integrity": "sha512-F6qpTaPc9bwBH85kjy0/BLmLSW1uv7AoOXCoRIkg2arlgCYlWYcAbiMkvZuAcaWk9TpCRG//okznLAqLGshkMw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-ia32-msvc": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.5.tgz",+ "integrity": "sha512-igoDsTFhhwECBeGbUuLeIk7t8Y1apa+cs6mDWpx2EZ0ch7oEQgzHbFUXN9euoHekCAQzXdXApAGkV6jznS7tWw==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-x64-gnu": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.5.tgz",+ "integrity": "sha512-U3teMeMbXFmaM5D+OTJpsOXd+wV/qftIeYF9kBKL4v73641qyJmoXFtA28DQLsnmlyayEsTe72xpLHrArq6vHw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-x64-msvc": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.5.tgz",+ "integrity": "sha512-ypfC34F3RKXvCXBglGqGMsUSMKlgwd1HX9AOAlx9RoZZ6GaI42YHVeKpzg3JG+wpBUJYTG+NNZhqbDWL8tBZkw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@types/babel__core": {+ "version": "7.20.5",+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",+ "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.20.7",+ "@babel/types": "^7.20.7",+ "@types/babel__generator": "*",+ "@types/babel__template": "*",+ "@types/babel__traverse": "*"+ }+ },+ "node_modules/@types/babel__generator": {+ "version": "7.27.0",+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz",+ "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.0.0"+ }+ },+ "node_modules/@types/babel__template": {+ "version": "7.4.4",+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",+ "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.1.0",+ "@babel/types": "^7.0.0"+ }+ },+ "node_modules/@types/babel__traverse": {+ "version": "7.28.0",+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz",+ "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.28.2"+ }+ },+ "node_modules/@types/chai": {+ "version": "5.2.3",+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",+ "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/deep-eql": "*",+ "assertion-error": "^2.0.1"+ }+ },+ "node_modules/@types/deep-eql": {+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",+ "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/estree": {+ "version": "1.0.9",+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",+ "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/json-schema": {+ "version": "7.0.15",+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/node": {+ "version": "24.19.0",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.0.tgz",+ "integrity": "sha512-zY+5tKxXdhGh1PYI0ac+7juvEu4OI6vWtVVoj5i2m42jxAY1U+zHGt6QCyOFwykdP62sM3MJ9stoYYUw5aCWew==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "undici-types": ">=7.24.0 <7.24.7"+ }+ },+ "node_modules/@types/pngjs": {+ "version": "6.0.5",+ "resolved": "https://registry.npmjs.org/@types/pngjs/-/pngjs-6.0.5.tgz",+ "integrity": "sha512-0k5eKfrA83JOZPppLtS2C7OUtyNAl2wKNxfyYl9Q5g9lPkgBl/9hNyAu6HuEH2J4XmIv2znEpkDd0SaZVxW6iQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/node": "*"+ }+ },+ "node_modules/@types/react": {+ "version": "19.3.0",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz",+ "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "csstype": "^3.2.2"+ }+ },+ "node_modules/@types/react-dom": {+ "version": "19.3.0",+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz",+ "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==",+ "dev": true,+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "^19.3.0"+ }+ },+ "node_modules/@typescript-eslint/eslint-plugin": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.71.0.tgz",+ "integrity": "sha512-pqcS9c1HxZTHt7End4nXqd0s5lJrrFzrgCkKFJrsbUnaL6M3+6oBFZaslg6Gjsl3argl2DDRFROnXARaZ2e4Nw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@eslint-community/regexpp": "^4.12.2",+ "@typescript-eslint/scope-manager": "8.71.0",+ "@typescript-eslint/type-utils": "8.71.0",+ "@typescript-eslint/utils": "8.71.0",+ "@typescript-eslint/visitor-keys": "8.71.0",+ "ignore": "^7.0.5",+ "natural-compare": "^1.4.0",+ "ts-api-utils": "^2.5.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "@typescript-eslint/parser": "^8.71.0",+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",+ "typescript": ">=4.8.4 <6.1.0"+ }+ },+ "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {+ "version": "7.0.10",+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.10.tgz",+ "integrity": "sha512-HpbUakT7xp5miBUywCHf36ZEuAJNklBJDDsGpUIjMzOSmM8ELSfA9Sa/QDPeNeqeoN31u+UTCkL4klCOVvRm4Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 4"+ }+ },+ "node_modules/@typescript-eslint/parser": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.71.0.tgz",+ "integrity": "sha512-CG4nPk1f2zc8yw4pALqHsFYH2hdo+h1T9daSp21+Hnxi9LOE3GT9hAfTKJCBXVNM2GmYs1eMEP615wPoeOgk3A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/scope-manager": "8.71.0",+ "@typescript-eslint/types": "8.71.0",+ "@typescript-eslint/typescript-estree": "8.71.0",+ "@typescript-eslint/visitor-keys": "8.71.0",+ "debug": "^4.4.3"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",+ "typescript": ">=4.8.4 <6.1.0"+ }+ },+ "node_modules/@typescript-eslint/project-service": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.71.0.tgz",+ "integrity": "sha512-aABjw5rjBacYONVPaPiWOCjJu0vEF4a25iQuodlmQYL1trtLZ0X/y+2Vzl3BKI1odM4LnwLE1oUDXYp1wzx1TQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/tsconfig-utils": "^8.71.0",+ "@typescript-eslint/types": "^8.71.0",+ "debug": "^4.4.3"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "typescript": ">=4.8.4 <6.1.0"+ }+ },+ "node_modules/@typescript-eslint/scope-manager": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.71.0.tgz",+ "integrity": "sha512-gWF0BhUcnjZxSpLE8ngS/59n2SB0J3YqRxvX1+2aoRJk9hNtHSLOV+TcarFiOr5ipXm3yc1QrI4c9YZc8zyCxw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/types": "8.71.0",+ "@typescript-eslint/visitor-keys": "8.71.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ }+ },+ "node_modules/@typescript-eslint/tsconfig-utils": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.71.0.tgz",+ "integrity": "sha512-Z1UlWHADEK2Mlb9NpWfDeSjqoZ5EyrOv4R3eQpbkzqn/EwaIdOpXXupEA1+0ZIOSJSZZDBHG0BrQyN8zUG6Pwg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "typescript": ">=4.8.4 <6.1.0"+ }+ },+ "node_modules/@typescript-eslint/type-utils": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.71.0.tgz",+ "integrity": "sha512-i8uO1qbdxeKgRnS5sCRt6On3/nfo2d2DwQe3Yvjx543zLy7r8ySqRuPPiIIXAhS03U0v5NfAFx+rUgxFzKKwNw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/types": "8.71.0",+ "@typescript-eslint/typescript-estree": "8.71.0",+ "@typescript-eslint/utils": "8.71.0",+ "debug": "^4.4.3",+ "ts-api-utils": "^2.5.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",+ "typescript": ">=4.8.4 <6.1.0"+ }+ },+ "node_modules/@typescript-eslint/types": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.71.0.tgz",+ "integrity": "sha512-cJ4OoxPGWvFnBTnSZyaU+qJzGTqPTGJY+gDchj6cRyLRdmIdt4rcsE4twj+zPfrNiWuVi38wijHzShL++Z9atQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ }+ },+ "node_modules/@typescript-eslint/typescript-estree": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.71.0.tgz",+ "integrity": "sha512-PEEF4G5sLLWAS5BpPrUvms4ySZkiBQQZM4z+3ReI46axK5Vqr/vXBQatJQIZZOYdGyPUAKTtsrWzpqKuU+3DEw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/project-service": "8.71.0",+ "@typescript-eslint/tsconfig-utils": "8.71.0",+ "@typescript-eslint/types": "8.71.0",+ "@typescript-eslint/visitor-keys": "8.71.0",+ "debug": "^4.4.3",+ "minimatch": "^10.2.2",+ "semver": "^7.7.3",+ "tinyglobby": "^0.2.15",+ "ts-api-utils": "^2.5.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "typescript": ">=4.8.4 <6.1.0"+ }+ },+ "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },+ "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {+ "version": "5.0.12",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz",+ "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^4.0.2"+ },+ "engines": {+ "node": "20 || >=22"+ }+ },+ "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {+ "version": "10.2.6",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",+ "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "brace-expansion": "^5.0.8"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {+ "version": "7.8.5",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@typescript-eslint/utils": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.71.0.tgz",+ "integrity": "sha512-pKR/tEMVrXZG23UFKUn5BQf3zfmfk7KQceI2cGzywZ5nxM5Eu3hEJU1utjWzydtzBbcJAQhHN8iPCxobHpPcZQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@eslint-community/eslint-utils": "^4.9.1",+ "@typescript-eslint/scope-manager": "8.71.0",+ "@typescript-eslint/types": "8.71.0",+ "@typescript-eslint/typescript-estree": "8.71.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",+ "typescript": ">=4.8.4 <6.1.0"+ }+ },+ "node_modules/@typescript-eslint/visitor-keys": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.71.0.tgz",+ "integrity": "sha512-8eQ9R218XORK+KLosnf4bu/QsUXvUyVwTbArg7/0NMB1Pu87OJKvj4nhFblkYE8gQV73mW1dx1ptlPCkwRGa7A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/types": "8.71.0",+ "eslint-visitor-keys": "^5.0.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ }+ },+ "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/@vitejs/plugin-react": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.2.0.tgz",+ "integrity": "sha512-YmKkfhOAi3wsB1PhJq5Scj3GXMn3WvtQ/JC0xoopuHoXSdmtdStOpFrYaT1kie2YgFBcIe64ROzMYRjCrYOdYw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/core": "^7.29.0",+ "@babel/plugin-transform-react-jsx-self": "^7.27.1",+ "@babel/plugin-transform-react-jsx-source": "^7.27.1",+ "@rolldown/pluginutils": "1.0.0-rc.3",+ "@types/babel__core": "^7.20.5",+ "react-refresh": "^0.18.0"+ },+ "engines": {+ "node": "^20.19.0 || >=22.12.0"+ },+ "peerDependencies": {+ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"+ }+ },+ "node_modules/@vitest/expect": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.7.tgz",+ "integrity": "sha512-E8eBXaKibuvH2pSZErOjdVb5vF4PbKYcrnluBTYxEk1l/VhhwZg1kZQsdtjq+CsF5CFydf2Rdkz7jDHKSisi3w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/chai": "^5.2.2",+ "@vitest/spy": "3.2.7",+ "@vitest/utils": "3.2.7",+ "chai": "^5.2.0",+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/mocker": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.7.tgz",+ "integrity": "sha512-Trr0hYO9CM3Wj6ksWHRhK9IZpIY6wTMO5u/MqXurMxT57sWBaOPEtP3Oq60ihZuh5JsiagKfz95OcxdEP6dBrA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/spy": "3.2.7",+ "estree-walker": "^3.0.3",+ "magic-string": "^0.30.17"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ },+ "peerDependencies": {+ "msw": "^2.4.9",+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0"+ },+ "peerDependenciesMeta": {+ "msw": {+ "optional": true+ },+ "vite": {+ "optional": true+ }+ }+ },+ "node_modules/@vitest/pretty-format": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.7.tgz",+ "integrity": "sha512-KUHlwqVu0sRlhCdyPdQ/wBoTfRahjUky1MubOmYw9fWfIZy1gNoHpuaaQBPAaMaVYdQYHJLurzj8ECCj5OwTqA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/runner": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.7.tgz",+ "integrity": "sha512-sB9y4ovltoQP+WaUPwmSxO9WIg9Ig694Di5PalVPsYHklAdE027mehpWF2SQSVq+k6sFgaivbTjTJwZLSHbedA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/utils": "3.2.7",+ "pathe": "^2.0.3",+ "strip-literal": "^3.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/snapshot": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.7.tgz",+ "integrity": "sha512-7C+MwShwtBSI5Buwoyg3s/iY1eHL9PKAf+O1wVh/TdnjXUtkoL/9YQtre90i4MtNXM6edP1wJ2zOBpfCyhIS7g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/pretty-format": "3.2.7",+ "magic-string": "^0.30.17",+ "pathe": "^2.0.3"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/spy": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.7.tgz",+ "integrity": "sha512-Q2eQGI6d2L/hBtZ0qNuKcAGid68XK6cv1xsoaIma6PaJhHPoqcEJhYpXZ/5myCMqkNgtP6UKuBhbc0nHKnrkuQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tinyspy": "^4.0.3"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/utils": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.7.tgz",+ "integrity": "sha512-x6BDOd7dyo3PFLY3I9/HJ25X/6OurhGXk2/B9gOZNPF7XDVjeBK4k01lQE5uvDpbuheErh91qYuE1E2OEjK3Rw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/pretty-format": "3.2.7",+ "loupe": "^3.1.4",+ "tinyrainbow": "^2.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/acorn": {+ "version": "8.18.0",+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz",+ "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "acorn": "bin/acorn"+ },+ "engines": {+ "node": ">=0.4.0"+ }+ },+ "node_modules/acorn-jsx": {+ "version": "5.3.2",+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",+ "dev": true,+ "license": "MIT",+ "peerDependencies": {+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"+ }+ },+ "node_modules/ajv": {+ "version": "6.15.0",+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",+ "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fast-deep-equal": "^3.1.1",+ "fast-json-stable-stringify": "^2.0.0",+ "json-schema-traverse": "^0.4.1",+ "uri-js": "^4.2.2"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/epoberezkin"+ }+ },+ "node_modules/ansi-styles": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "color-convert": "^2.0.1"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/argparse": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",+ "dev": true,+ "license": "Python-2.0"+ },+ "node_modules/assertion-error": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",+ "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/baseline-browser-mapping": {+ "version": "2.11.26",+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.26.tgz",+ "integrity": "sha512-GLQdD3y6UF8iVuMJl5fHgE4jdn/ua7n+toKfLgNlg3BqQtOZjpy68T8Tup8/wGWZCDlm7KMg7tPb4MPn7oN0TQ==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "baseline-browser-mapping": "dist/cli.cjs"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/brace-expansion": {+ "version": "1.1.21",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz",+ "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^1.0.0",+ "concat-map": "0.0.1"+ }+ },+ "node_modules/browserslist": {+ "version": "4.29.3",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.3.tgz",+ "integrity": "sha512-1R4kiYKXGViqEN0CnoDrXc1StD9niAwu+j2dukWzrD4bJgsD4lDmEp0CRbc6E/vYJIfTHwPmwyaKtVSudICdPA==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "baseline-browser-mapping": "^2.11.26",+ "caniuse-lite": "^1.0.30001813",+ "electron-to-chromium": "^1.5.439",+ "node-releases": "^2.0.57",+ "update-browserslist-db": "^1.3.3"+ },+ "bin": {+ "browserslist": "cli.js"+ },+ "engines": {+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"+ }+ },+ "node_modules/cac": {+ "version": "6.7.14",+ "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",+ "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/callsites": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/caniuse-lite": {+ "version": "1.0.30001814",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001814.tgz",+ "integrity": "sha512-/Uaf1lAzr59XcMpW0o96WoEfr+VXK2OX4U9AgFoiSHsVJ4HppnIFUjtYzsyDH2+tgANaQb2/oxYGwCPapN1FpA==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "CC-BY-4.0"+ },+ "node_modules/chai": {+ "version": "5.3.3",+ "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz",+ "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "assertion-error": "^2.0.1",+ "check-error": "^2.1.1",+ "deep-eql": "^5.0.1",+ "loupe": "^3.1.0",+ "pathval": "^2.0.0"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "node_modules/check-error": {+ "version": "2.1.3",+ "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz",+ "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 16"+ }+ },+ "node_modules/color-convert": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "color-name": "~1.1.4"+ },+ "engines": {+ "node": ">=7.0.0"+ }+ },+ "node_modules/color-name": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/concat-map": {+ "version": "0.0.1",+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/convert-source-map": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/cross-spawn": {+ "version": "7.0.6",+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "path-key": "^3.1.0",+ "shebang-command": "^2.0.0",+ "which": "^2.0.1"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/csstype": {+ "version": "3.2.3",+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/debug": {+ "version": "4.4.3",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ms": "^2.1.3"+ },+ "engines": {+ "node": ">=6.0"+ },+ "peerDependenciesMeta": {+ "supports-color": {+ "optional": true+ }+ }+ },+ "node_modules/deep-eql": {+ "version": "5.0.2",+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz",+ "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/deep-is": {+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/electron-to-chromium": {+ "version": "1.5.442",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.442.tgz",+ "integrity": "sha512-najZYZ3+ZpjN1z3VOsrBiv5ej18vQgfV2lvEmxWzfmKrk4bdm3Owseyud4yGU6DfFn9pyunoAHDDyM4KmP78Ew==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/es-module-lexer": {+ "version": "1.7.0",+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz",+ "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/esbuild": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz",+ "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "bin": {+ "esbuild": "bin/esbuild"+ },+ "engines": {+ "node": ">=18"+ },+ "optionalDependencies": {+ "@esbuild/aix-ppc64": "0.28.2",+ "@esbuild/android-arm": "0.28.2",+ "@esbuild/android-arm64": "0.28.2",+ "@esbuild/android-x64": "0.28.2",+ "@esbuild/darwin-arm64": "0.28.2",+ "@esbuild/darwin-x64": "0.28.2",+ "@esbuild/freebsd-arm64": "0.28.2",+ "@esbuild/freebsd-x64": "0.28.2",+ "@esbuild/linux-arm": "0.28.2",+ "@esbuild/linux-arm64": "0.28.2",+ "@esbuild/linux-ia32": "0.28.2",+ "@esbuild/linux-loong64": "0.28.2",+ "@esbuild/linux-mips64el": "0.28.2",+ "@esbuild/linux-ppc64": "0.28.2",+ "@esbuild/linux-riscv64": "0.28.2",+ "@esbuild/linux-s390x": "0.28.2",+ "@esbuild/linux-x64": "0.28.2",+ "@esbuild/netbsd-arm64": "0.28.2",+ "@esbuild/netbsd-x64": "0.28.2",+ "@esbuild/openbsd-arm64": "0.28.2",+ "@esbuild/openbsd-x64": "0.28.2",+ "@esbuild/openharmony-arm64": "0.28.2",+ "@esbuild/sunos-x64": "0.28.2",+ "@esbuild/win32-arm64": "0.28.2",+ "@esbuild/win32-ia32": "0.28.2",+ "@esbuild/win32-x64": "0.28.2"+ }+ },+ "node_modules/escalade": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/escape-string-regexp": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/eslint": {+ "version": "9.39.5",+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.5.tgz",+ "integrity": "sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==",+ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@eslint-community/eslint-utils": "^4.8.0",+ "@eslint-community/regexpp": "^4.12.1",+ "@eslint/config-array": "^0.21.2",+ "@eslint/config-helpers": "^0.4.2",+ "@eslint/core": "^0.17.0",+ "@eslint/eslintrc": "^3.3.6",+ "@eslint/js": "9.39.5",+ "@eslint/plugin-kit": "^0.4.1",+ "@humanfs/node": "^0.16.6",+ "@humanwhocodes/module-importer": "^1.0.1",+ "@humanwhocodes/retry": "^0.4.2",+ "@types/estree": "^1.0.6",+ "ajv": "^6.14.0",+ "chalk": "^4.0.0",+ "cross-spawn": "^7.0.6",+ "debug": "^4.3.2",+ "escape-string-regexp": "^4.0.0",+ "eslint-scope": "^8.4.0",+ "eslint-visitor-keys": "^4.2.1",+ "espree": "^10.4.0",+ "esquery": "^1.5.0",+ "esutils": "^2.0.2",+ "fast-deep-equal": "^3.1.3",+ "file-entry-cache": "^8.0.0",+ "find-up": "^5.0.0",+ "glob-parent": "^6.0.2",+ "ignore": "^5.2.0",+ "imurmurhash": "^0.1.4",+ "is-glob": "^4.0.0",+ "json-stable-stringify-without-jsonify": "^1.0.1",+ "lodash.merge": "^4.6.2",+ "minimatch": "^3.1.5",+ "natural-compare": "^1.4.0",+ "optionator": "^0.9.3"+ },+ "bin": {+ "eslint": "bin/eslint.js"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://eslint.org/donate"+ },+ "peerDependencies": {+ "jiti": "*"+ },+ "peerDependenciesMeta": {+ "jiti": {+ "optional": true+ }+ }+ },+ "node_modules/eslint-scope": {+ "version": "8.4.0",+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz",+ "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "esrecurse": "^4.3.0",+ "estraverse": "^5.2.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/eslint-visitor-keys": {+ "version": "4.2.1",+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/espree": {+ "version": "10.4.0",+ "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",+ "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "acorn": "^8.15.0",+ "acorn-jsx": "^5.3.2",+ "eslint-visitor-keys": "^4.2.1"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/esquery": {+ "version": "1.7.0",+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",+ "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",+ "dev": true,+ "license": "BSD-3-Clause",+ "dependencies": {+ "estraverse": "^5.1.0"+ },+ "engines": {+ "node": ">=0.10"+ }+ },+ "node_modules/esrecurse": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "estraverse": "^5.2.0"+ },+ "engines": {+ "node": ">=4.0"+ }+ },+ "node_modules/estraverse": {+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",+ "dev": true,+ "license": "BSD-2-Clause",+ "engines": {+ "node": ">=4.0"+ }+ },+ "node_modules/estree-walker": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/estree": "^1.0.0"+ }+ },+ "node_modules/esutils": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",+ "dev": true,+ "license": "BSD-2-Clause",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/expect-type": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz",+ "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=12.0.0"+ }+ },+ "node_modules/fast-deep-equal": {+ "version": "3.1.3",+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/fast-json-stable-stringify": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/fast-levenshtein": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/fdir": {+ "version": "6.5.0",+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12.0.0"+ },+ "peerDependencies": {+ "picomatch": "^3 || ^4"+ },+ "peerDependenciesMeta": {+ "picomatch": {+ "optional": true+ }+ }+ },+ "node_modules/file-entry-cache": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",+ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "flat-cache": "^4.0.0"+ },+ "engines": {+ "node": ">=16.0.0"+ }+ },+ "node_modules/find-up": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "locate-path": "^6.0.0",+ "path-exists": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/flat-cache": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",+ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "flatted": "^3.2.9",+ "keyv": "^4.5.4"+ },+ "engines": {+ "node": ">=16"+ }+ },+ "node_modules/flatted": {+ "version": "3.4.4",+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz",+ "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/fsevents": {+ "version": "2.3.3",+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"+ }+ },+ "node_modules/gensync": {+ "version": "1.0.0-beta.2",+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/glob-parent": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "is-glob": "^4.0.3"+ },+ "engines": {+ "node": ">=10.13.0"+ }+ },+ "node_modules/globals": {+ "version": "16.5.0",+ "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz",+ "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/has-flag": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/ignore": {+ "version": "5.3.2",+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 4"+ }+ },+ "node_modules/import-fresh": {+ "version": "3.3.1",+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",+ "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "parent-module": "^1.0.0",+ "resolve-from": "^4.0.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/imurmurhash": {+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.8.19"+ }+ },+ "node_modules/is-extglob": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/is-glob": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "is-extglob": "^2.1.1"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/isexe": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/js-tokens": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/js-yaml": {+ "version": "4.3.2",+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz",+ "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/puzrin"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/nodeca"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "argparse": "^2.0.1"+ },+ "bin": {+ "js-yaml": "bin/js-yaml.js"+ }+ },+ "node_modules/jsesc": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "jsesc": "bin/jsesc"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/json-buffer": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/json-schema-traverse": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/json-stable-stringify-without-jsonify": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/json5": {+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "json5": "lib/cli.js"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/keyv": {+ "version": "4.5.4",+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "json-buffer": "3.0.1"+ }+ },+ "node_modules/levn": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "prelude-ls": "^1.2.1",+ "type-check": "~0.4.0"+ },+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/locate-path": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "p-locate": "^5.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/lodash.merge": {+ "version": "4.6.2",+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/loupe": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz",+ "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/lru-cache": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "yallist": "^3.0.2"+ }+ },+ "node_modules/magic-string": {+ "version": "0.30.21",+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.5"+ }+ },+ "node_modules/minimatch": {+ "version": "3.1.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",+ "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^1.1.7"+ },+ "engines": {+ "node": "*"+ }+ },+ "node_modules/ms": {+ "version": "2.1.3",+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/nanoid": {+ "version": "3.3.19",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz",+ "integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "bin": {+ "nanoid": "bin/nanoid.cjs"+ },+ "engines": {+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"+ }+ },+ "node_modules/natural-compare": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/node-releases": {+ "version": "2.0.57",+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.57.tgz",+ "integrity": "sha512-kQK9LGGFiHtrWiNhZtA7Qbw17AQz+dmsEKODRIVTXA9+e5MS/2gZEBhYJt13GrAz5/IOZKddH/0Z3TP/Zgo+yw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/optionator": {+ "version": "0.9.4",+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",+ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "deep-is": "^0.1.3",+ "fast-levenshtein": "^2.0.6",+ "levn": "^0.4.1",+ "prelude-ls": "^1.2.1",+ "type-check": "^0.4.0",+ "word-wrap": "^1.2.5"+ },+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/p-limit": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "yocto-queue": "^0.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/p-locate": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "p-limit": "^3.0.2"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/parent-module": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "callsites": "^3.0.0"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/path-exists": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/path-key": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/pathe": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",+ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/pathval": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz",+ "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 14.16"+ }+ },+ "node_modules/picocolors": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/picomatch": {+ "version": "4.0.7",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },+ "node_modules/playwright": {+ "version": "1.63.0",+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.63.0.tgz",+ "integrity": "sha512-+7ziBLidS4NaNCdt57SUDT+wYmmd5fmiQejUic/kb+YsYSCPyOOE9sebzMjNmQrsnNpDJqd4WHvV/8lfKfUDUg==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "playwright-core": "1.63.0"+ },+ "bin": {+ "playwright": "cli.js"+ },+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/playwright-core": {+ "version": "1.63.0",+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.63.0.tgz",+ "integrity": "sha512-rYCsBF/M5HjUch52bbtVONEFjv6Xu8sm8h72dNlR5bzIE1fvC/bxgspzkjSfU+MweEMmPM8KJebG6nnyxo5mCg==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "playwright-core": "cli.js"+ },+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/pngjs": {+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-7.0.0.tgz",+ "integrity": "sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=14.19.0"+ }+ },+ "node_modules/postcss": {+ "version": "8.5.28",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz",+ "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/postcss"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "nanoid": "^3.3.18",+ "picocolors": "^1.1.1",+ "source-map-js": "^1.2.1"+ },+ "engines": {+ "node": "^10 || ^12 || >=14"+ }+ },+ "node_modules/prelude-ls": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/punycode": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/react": {+ "version": "19.3.0",+ "resolved": "https://registry.npmjs.org/react/-/react-19.3.0.tgz",+ "integrity": "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/react-dom": {+ "version": "19.3.0",+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.0.tgz",+ "integrity": "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==",+ "license": "MIT",+ "dependencies": {+ "scheduler": "^0.28.0"+ },+ "peerDependencies": {+ "react": "^19.3.0"+ }+ },+ "node_modules/react-refresh": {+ "version": "0.18.0",+ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz",+ "integrity": "sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/resolve-from": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/rollup": {+ "version": "4.63.5",+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.5.tgz",+ "integrity": "sha512-KRWwmNLlPw5M7HcdYfm15oBv9n9LPtjzpzCIxS/phwqvPyxHSoKX6Y2YU3pxSPfy0CLquVgsx/j/hBi6OvH1Nw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/estree": "1.0.9"+ },+ "bin": {+ "rollup": "dist/bin/rollup"+ },+ "engines": {+ "node": ">=18.0.0",+ "npm": ">=8.0.0"+ },+ "optionalDependencies": {+ "@napi-rs/lzma-linux-x64-gnu": "1.5.1",+ "@rollup/rollup-android-arm-eabi": "4.63.5",+ "@rollup/rollup-android-arm64": "4.63.5",+ "@rollup/rollup-darwin-arm64": "4.63.5",+ "@rollup/rollup-darwin-x64": "4.63.5",+ "@rollup/rollup-freebsd-arm64": "4.63.5",+ "@rollup/rollup-freebsd-x64": "4.63.5",+ "@rollup/rollup-linux-arm-gnueabihf": "4.63.5",+ "@rollup/rollup-linux-arm-musleabihf": "4.63.5",+ "@rollup/rollup-linux-arm64-gnu": "4.63.5",+ "@rollup/rollup-linux-arm64-musl": "4.63.5",+ "@rollup/rollup-linux-loong64-gnu": "4.63.5",+ "@rollup/rollup-linux-loong64-musl": "4.63.5",+ "@rollup/rollup-linux-ppc64-gnu": "4.63.5",+ "@rollup/rollup-linux-ppc64-musl": "4.63.5",+ "@rollup/rollup-linux-riscv64-gnu": "4.63.5",+ "@rollup/rollup-linux-riscv64-musl": "4.63.5",+ "@rollup/rollup-linux-s390x-gnu": "4.63.5",+ "@rollup/rollup-linux-x64-gnu": "4.63.5",+ "@rollup/rollup-linux-x64-musl": "4.63.5",+ "@rollup/rollup-openbsd-x64": "4.63.5",+ "@rollup/rollup-openharmony-arm64": "4.63.5",+ "@rollup/rollup-win32-arm64-msvc": "4.63.5",+ "@rollup/rollup-win32-ia32-msvc": "4.63.5",+ "@rollup/rollup-win32-x64-gnu": "4.63.5",+ "@rollup/rollup-win32-x64-msvc": "4.63.5",+ "fsevents": "~2.3.2"+ }+ },+ "node_modules/scheduler": {+ "version": "0.28.0",+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz",+ "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==",+ "license": "MIT"+ },+ "node_modules/semver": {+ "version": "6.3.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ }+ },+ "node_modules/shebang-command": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "shebang-regex": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/shebang-regex": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/siginfo": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",+ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/source-map-js": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",+ "dev": true,+ "license": "BSD-3-Clause",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/stackback": {+ "version": "0.0.2",+ "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",+ "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/std-env": {+ "version": "3.10.0",+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz",+ "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/strip-json-comments": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/strip-literal": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz",+ "integrity": "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "js-tokens": "^9.0.1"+ },+ "funding": {+ "url": "https://github.com/sponsors/antfu"+ }+ },+ "node_modules/strip-literal/node_modules/js-tokens": {+ "version": "9.0.1",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz",+ "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/supports-color": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "has-flag": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/tinybench": {+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",+ "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/tinyexec": {+ "version": "0.3.2",+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz",+ "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/tinyglobby": {+ "version": "0.2.17",+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fdir": "^6.5.0",+ "picomatch": "^4.0.4"+ },+ "engines": {+ "node": ">=12.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/SuperchupuDev"+ }+ },+ "node_modules/tinypool": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz",+ "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^18.0.0 || >=20.0.0"+ }+ },+ "node_modules/tinyrainbow": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz",+ "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/tinyspy": {+ "version": "4.0.6",+ "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.6.tgz",+ "integrity": "sha512-u8KszXvGfU68hVcZpRHKG28T0krMuv2G5nDhiHaMLen/gIuFEgIJhaJuO69qjnXg5paSrbPMFfx3brNuN8eVSg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/ts-api-utils": {+ "version": "2.5.0",+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz",+ "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18.12"+ },+ "peerDependencies": {+ "typescript": ">=4.8.4"+ }+ },+ "node_modules/type-check": {+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "prelude-ls": "^1.2.1"+ },+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/typescript": {+ "version": "5.9.3",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "tsc": "bin/tsc",+ "tsserver": "bin/tsserver"+ },+ "engines": {+ "node": ">=14.17"+ }+ },+ "node_modules/typescript-eslint": {+ "version": "8.71.0",+ "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.71.0.tgz",+ "integrity": "sha512-fBdHYiqQ14RW6mOMXD14Svn82ZsCYAoQSzGRzyEjR59S5A2Krh/l7fGTOQ7iCr8gGy/mHVXtEF7s5fgjEdV0Pw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/eslint-plugin": "8.71.0",+ "@typescript-eslint/parser": "8.71.0",+ "@typescript-eslint/typescript-estree": "8.71.0",+ "@typescript-eslint/utils": "8.71.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",+ "typescript": ">=4.8.4 <6.1.0"+ }+ },+ "node_modules/undici-types": {+ "version": "7.24.6",+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",+ "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/update-browserslist-db": {+ "version": "1.3.3",+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.3.tgz",+ "integrity": "sha512-pJ2sYawQS0R/WI928Gj5GlPhTGzbMelq0+4INtSYNDV9ErKJcX6xjGWkoG/VnB3dpUm00zALaqkrUD77pO5TDQ==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "escalade": "^3.2.0",+ "picocolors": "^1.1.1"+ },+ "bin": {+ "update-browserslist-db": "cli.js"+ },+ "peerDependencies": {+ "browserslist": ">= 4.21.0"+ }+ },+ "node_modules/uri-js": {+ "version": "4.4.1",+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "punycode": "^2.1.0"+ }+ },+ "node_modules/vite": {+ "version": "7.3.6",+ "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.6.tgz",+ "integrity": "sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "esbuild": "^0.27.0 || ^0.28.0",+ "fdir": "^6.5.0",+ "picomatch": "^4.0.3",+ "postcss": "^8.5.6",+ "rollup": "^4.43.0",+ "tinyglobby": "^0.2.15"+ },+ "bin": {+ "vite": "bin/vite.js"+ },+ "engines": {+ "node": "^20.19.0 || >=22.12.0"+ },+ "funding": {+ "url": "https://github.com/vitejs/vite?sponsor=1"+ },+ "optionalDependencies": {+ "fsevents": "~2.3.3"+ },+ "peerDependencies": {+ "@types/node": "^20.19.0 || >=22.12.0",+ "jiti": ">=1.21.0",+ "less": "^4.0.0",+ "lightningcss": "^1.21.0",+ "sass": "^1.70.0",+ "sass-embedded": "^1.70.0",+ "stylus": ">=0.54.8",+ "sugarss": "^5.0.0",+ "terser": "^5.16.0",+ "tsx": "^4.8.1",+ "yaml": "^2.4.2"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ },+ "jiti": {+ "optional": true+ },+ "less": {+ "optional": true+ },+ "lightningcss": {+ "optional": true+ },+ "sass": {+ "optional": true+ },+ "sass-embedded": {+ "optional": true+ },+ "stylus": {+ "optional": true+ },+ "sugarss": {+ "optional": true+ },+ "terser": {+ "optional": true+ },+ "tsx": {+ "optional": true+ },+ "yaml": {+ "optional": true+ }+ }+ },+ "node_modules/vite-node": {+ "version": "3.2.4",+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz",+ "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "cac": "^6.7.14",+ "debug": "^4.4.1",+ "es-module-lexer": "^1.7.0",+ "pathe": "^2.0.3",+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0"+ },+ "bin": {+ "vite-node": "vite-node.mjs"+ },+ "engines": {+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/vitest": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.7.tgz",+ "integrity": "sha512-KrxIJ62Fd89gfysR4WotlgZABiz2dqFPgqGzX7s+CwsqLFomRH7777ZcrOD6+WVAh7khPQP41A+BKbpcJFrdEg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/chai": "^5.2.2",+ "@vitest/expect": "3.2.7",+ "@vitest/mocker": "3.2.7",+ "@vitest/pretty-format": "^3.2.7",+ "@vitest/runner": "3.2.7",+ "@vitest/snapshot": "3.2.7",+ "@vitest/spy": "3.2.7",+ "@vitest/utils": "3.2.7",+ "chai": "^5.2.0",+ "debug": "^4.4.1",+ "expect-type": "^1.2.1",+ "magic-string": "^0.30.17",+ "pathe": "^2.0.3",+ "picomatch": "^4.0.2",+ "std-env": "^3.9.0",+ "tinybench": "^2.9.0",+ "tinyexec": "^0.3.2",+ "tinyglobby": "^0.2.14",+ "tinypool": "^1.1.1",+ "tinyrainbow": "^2.0.0",+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0",+ "vite-node": "3.2.4",+ "why-is-node-running": "^2.3.0"+ },+ "bin": {+ "vitest": "vitest.mjs"+ },+ "engines": {+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ },+ "peerDependencies": {+ "@edge-runtime/vm": "*",+ "@types/debug": "^4.1.12",+ "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",+ "@vitest/browser": "3.2.7",+ "@vitest/ui": "3.2.7",+ "happy-dom": "*",+ "jsdom": "*"+ },+ "peerDependenciesMeta": {+ "@edge-runtime/vm": {+ "optional": true+ },+ "@types/debug": {+ "optional": true+ },+ "@types/node": {+ "optional": true+ },+ "@vitest/browser": {+ "optional": true+ },+ "@vitest/ui": {+ "optional": true+ },+ "happy-dom": {+ "optional": true+ },+ "jsdom": {+ "optional": true+ }+ }+ },+ "node_modules/which": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "isexe": "^2.0.0"+ },+ "bin": {+ "node-which": "bin/node-which"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/why-is-node-running": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz",+ "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "siginfo": "^2.0.0",+ "stackback": "0.0.2"+ },+ "bin": {+ "why-is-node-running": "cli.js"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/word-wrap": {+ "version": "1.2.5",+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",+ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/yallist": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/yocto-queue": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ }+ }+}diff --git a/package.json b/package.jsonnew file mode 100644index 0000000..590542c--- /dev/null+++ b/package.json@@ -0,0 +1,33 @@+{+ "name": "mesh-avatar-studio",+ "version": "0.1.0",+ "private": true,+ "type": "module",+ "scripts": {+ "dev": "vite --host 127.0.0.1",+ "test": "vitest run",+ "lint": "eslint src tests e2e",+ "build": "tsc --noEmit && vite build",+ "e2e": "playwright test"+ },+ "dependencies": {+ "react": "^19.1.0",+ "react-dom": "^19.1.0"+ },+ "devDependencies": {+ "@eslint/js": "^9.0.0",+ "@playwright/test": "^1.55.0",+ "@types/node": "^24.0.0",+ "@types/react": "^19.0.0",+ "@types/react-dom": "^19.0.0",+ "@vitejs/plugin-react": "^5.0.0",+ "eslint": "^9.0.0",+ "globals": "^16.0.0",+ "typescript": "^5.9.0",+ "typescript-eslint": "^8.0.0",+ "vite": "^7.0.0",+ "vitest": "^3.2.0",+ "pngjs": "^7.0.0",+ "@types/pngjs": "^6.0.0"+ }+}diff --git a/playwright.config.ts b/playwright.config.tsnew file mode 100644index 0000000..e19d78d--- /dev/null+++ b/playwright.config.ts@@ -0,0 +1,16 @@+import { defineConfig } from '@playwright/test';+const port = Number(process.env.PLAYWRIGHT_PORT ?? 5173);+const baseURL = `http://127.0.0.1:${port}`;++export default defineConfig({+ testDir: 'e2e',+ use: {+ baseURL,+ viewport: { width: 1440, height: 1000 },+ },+ webServer: {+ command: `npm run dev -- --port ${port}`,+ url: baseURL,+ reuseExistingServer: true,+ },+});diff --git a/reference/build_layers.py b/reference/build_layers.pynew file mode 100644index 0000000..31e5392--- /dev/null+++ b/reference/build_layers.py@@ -0,0 +1,356 @@+"""Split the single illustration into animatable layers.++Outputs (samples/miko-qipao/built/):+ base.png full image with hand/forearm and tassels removed (inpainted)+ hand.png hand + forearm layer (cropped)+ tassel_l.png left tassel (cropped)+ tassel_r.png right tassel (cropped)+ eye{0,1}_ball.png / _lash.png / _low.png+ eye white+iris, upper lash, lower lash of each eye (the base gets+ plain lid skin underneath so the lash can slide down over it)+ hairmask.png soft mask of hair strands (limits hair sway to actual hair)+ layers.json crop rectangles of each layer in source-image pixels+"""+import hashlib+import json+from pathlib import Path++import cv2+import numpy as np+from PIL import Image++ROOT = Path(__file__).resolve().parent.parent+SRC = ROOT / "samples" / "miko-qipao" / "source.png"+OUT = ROOT / "samples" / "miko-qipao" / "built"++# Hand + forearm outline, traced in source pixels (clockwise from the index knuckle).+HAND_POLY = [+ (472, 609), (492, 608), (515, 618), (535, 633), (552, 653), (566, 668),+ (575, 690), (579, 715), (577, 745), (575, 772), (565, 772), (550, 762),+ (546, 790), (547, 830), (543, 870), (536, 920), (521, 975), (506, 1025),+ (491, 1075), (476, 1125), (461, 1175), (448, 1215), (436, 1254),+ (241, 1254), (253, 1215), (273, 1175), (298, 1130), (326, 1094),+ (352, 1082), (380, 1046), (412, 1004), (440, 952), (462, 904), (464, 860),+ (458, 815), (445, 780), (430, 748), (421, 715), (426, 690), (441, 660),+ (458, 630),+]++# Only the part hanging below the knot is cut out; the cord loop stays in the base+# layer because it overlaps hair and could not be inpainted cleanly.+# Behind the fingertips: the chin contour and the empty background under it.+# The contour is visible on both sides of the fingers (measured in the source); a smooth+# curve through those points continues it behind them. Above it the skin is filled from the+# surrounding shading, below it (left of the neck) is empty background.+JAW_VISIBLE = [(470, 585.5), (476, 585.5), (482, 592.5), (488, 598.5),+ # where the index finger rests on the chin (the line both share in the source)+ (502, 610.5), (514, 618.5), (526, 624.5), (538, 628.5), (550, 634.5),+ (560, 638.5), (566, 640.5), (572, 641.5), (578, 644)]+JAW_X = (470, 600)+BG_BEHIND_HAND = [(440, 560), (560, 626), (556, 638), (552, 665), (535, 700), (440, 700)]++TASSELS = {+ "tassel_l": (236, 416, 348, 610), # x0, y0, x1, y1 search box (y0 = knot top)+ "tassel_r": (856, 279, 952, 474),+}+++def polygon_mask(shape, poly):+ m = np.zeros(shape, np.uint8)+ cv2.fillPoly(m, [np.array(poly, np.int32)], 255)+ return m+++def red_mask(rgb, box):+ x0, y0, x1, y1 = box+ r, g, b = [rgb[..., i].astype(np.float32) for i in range(3)]+ redness = (r - np.maximum(g, b)) / np.maximum(r, 1)+ m = ((redness > 0.5) & (r > 60)).astype(np.uint8) * 255+ box_m = np.zeros_like(m)+ box_m[y0:y1, x0:x1] = 255+ m &= box_m+ # keep only the biggest connected blob (the tassel), close small holes+ m = cv2.morphologyEx(m, cv2.MORPH_CLOSE, np.ones((5, 5), np.uint8))+ n, lab, stats, _ = cv2.connectedComponentsWithStats(m)+ if n > 1:+ big = 1 + np.argmax(stats[1:, cv2.CC_STAT_AREA])+ m = np.where(lab == big, 255, 0).astype(np.uint8)+ # grab the anti-aliased dark outline around the red+ return cv2.dilate(m, np.ones((3, 3), np.uint8), iterations=1)+++def crop_layer(rgba, mask, pad=4, soft=True):+ ys, xs = np.where(mask > 0)+ x0, y0 = max(xs.min() - pad, 0), max(ys.min() - pad, 0)+ x1, y1 = min(xs.max() + pad + 1, rgba.shape[1]), min(ys.max() + pad + 1, rgba.shape[0])+ layer = rgba.copy()+ soft = (cv2.GaussianBlur(mask, (3, 3), 0) if soft else mask).astype(np.float32) / 255+ layer[..., 3] = (layer[..., 3].astype(np.float32) * soft).astype(np.uint8)+ return layer[y0:y1, x0:x1], [int(x0), int(y0), int(x1 - x0), int(y1 - y0)]+++def inpaint_rgba(rgba, mask):+ rgb = cv2.inpaint(np.ascontiguousarray(rgba[..., :3]), mask, 9, cv2.INPAINT_TELEA)+ a = cv2.inpaint(np.ascontiguousarray(rgba[..., 3]), mask, 9, cv2.INPAINT_TELEA)+ out = np.dstack([rgb, a])+ return out+++# Eyes, traced in source pixels:+# opening = the visible eye white + iris (lower edge of the upper lash, upper edge of the lower lid)+# roi = everything that belongs to the eye: lash flicks, corner wedges, the crease above+EYES = [+ dict(opening=[(446, 488), (450, 472), (458, 464), (468, 457), (480, 452), (495, 450), (510, 450),+ (522, 452), (532, 457), (538, 464), (541, 475), (541, 488), (535, 495), (520, 501),+ (505, 506), (488, 508), (470, 507), (457, 503), (449, 497)],+ roi=[(424, 478), (432, 458), (445, 440), (470, 428), (500, 424), (530, 426), (552, 436),+ (556, 452), (552, 470), (548, 495), (540, 505), (520, 512), (495, 516), (465, 514),+ (445, 506), (430, 500)]),+ dict(opening=[(666, 402), (672, 393), (685, 387), (700, 384), (718, 383), (735, 385), (752, 388),+ (764, 392), (768, 402), (768, 420), (762, 430), (748, 438), (730, 443), (712, 447),+ (695, 451), (682, 451), (672, 445), (667, 432), (665, 418)],+ roi=[(648, 400), (652, 380), (665, 366), (690, 356), (720, 354), (748, 358), (763, 366),+ (766, 390), (766, 402), (764, 428), (758, 440), (740, 448), (715, 454), (690, 458),+ (672, 456), (658, 442), (650, 420)]),+]+EYE_SAMPLES = 24+++def column_span(poly, x):+ """min / max y where the vertical line at x crosses the polygon."""+ ys = []+ n = len(poly)+ for i in range(n):+ (ax, ay), (bx, by) = poly[i], poly[(i + 1) % n]+ if (ax - x) * (bx - x) <= 0 and ax != bx:+ ys.append(ay + (by - ay) * (x - ax) / (bx - ax))+ return min(ys), max(ys)+++def eye_curves(e):+ """Top / bottom edge of the opening sampled at EYE_SAMPLES columns (for the renderer)."""+ xs = [p[0] for p in e["opening"]]+ x0, x1 = min(xs), max(xs)+ top, bot = [], []+ for i in range(EYE_SAMPLES):+ x = x0 + (x1 - x0) * min(max(i / (EYE_SAMPLES - 1), 0.002), 0.998)+ t, b = column_span(e["opening"], x)+ top.append(round(t, 2)); bot.append(round(b, 2))+ # the ends are the eye corners: top and bottom meet there+ for k in (0, -1):+ top[k] = bot[k] = round((top[k] + bot[k]) / 2, 2)+ return dict(x0=x0, x1=x1, top=top, bot=bot)+++def eye_classes(rgba, e):+ """Sort every pixel of the eye region into ball / lash / low / crease. A pixel counts as skin+ only if it matches the skin colour estimated from outside the region, so faint strokes are+ not left behind on the lid when the lash moves."""+ h, w = rgba.shape[:2]+ yy, xx = np.mgrid[0:h, 0:w]+ c = eye_curves(e)+ xs = np.linspace(c["x0"], c["x1"], EYE_SAMPLES)+ top = np.interp(xx, xs, c["top"])+ inside_x = (xx >= c["x0"]) & (xx <= c["x1"])+ rgb = rgba[..., :3].astype(np.float32)+ lum = rgb @ np.array([0.3, 0.59, 0.11], np.float32)+ white = (rgb.min(-1) > 190) & (rgb[..., 0] - rgb[..., 2] <= 14)+ region = polygon_mask((h, w), e["roi"]) > 0+ core = polygon_mask((h, w), e["opening"])+ ball = cv2.dilate(core, np.ones((3, 3), np.uint8)) > 0+ # lines may overlap the ball's 1px rim: the rim pixels are half lash, half white, and a+ # pixel that belongs to neither layer shows up as a light seam+ core = core > 0+ est = fill_skin(rgba, region.astype(np.uint8) * 255)[..., :3].astype(np.float32)+ skin = np.abs(rgb - est).max(-1) < 22+ ink = region & ~skin & ~core+ # upper side: above the opening's top edge (+ a little), or above the corner line outside it+ corner_line = np.interp(xx, [c["x0"], c["x1"]], [c["top"][0], c["top"][-1]])+ upper = np.where(inside_x, yy <= top + 3, yy <= corner_line + 2)+ crease = ink & inside_x & (yy < top - 9) & (lum > 120) & ~white+ lash = ink & upper & ~crease & ~white+ low = ink & ~upper & ~white+ stray = ink & white+ m8 = lambda m: m.astype(np.uint8) * 255+ return m8(ball), m8(lash), m8(low), m8(crease), m8(stray & ~ball), m8(core)+++# darkest colour of each kind of line, used to split its pixels into colour + alpha+INK = {"lash": (30, 10, 8), "low": (110, 45, 40), "crease": (175, 95, 85)}+++def unblend(rgba, skin_rgb, mask, ink):+ """RGBA layer that reproduces rgba where it lies over skin_rgb (soft line edges keep+ their antialiasing instead of carrying a halo of the old background)."""+ orig = rgba[..., :3].astype(np.float32)+ sk = skin_rgb.astype(np.float32)+ ref = np.array(ink, np.float32)+ a = np.clip(((sk - orig) / np.maximum(sk - ref, 1)).max(-1), 0, 1)+ a *= (mask > 0)+ col = np.clip((orig - sk * (1 - a[..., None])) / np.maximum(a[..., None], 1e-3), 0, 255)+ out = np.zeros_like(rgba)+ out[..., :3] = col.astype(np.uint8)+ out[..., 3] = (a * 255).astype(np.uint8)+ return out+++def fill_skin(img, hole):+ """Fill the hole with skin that continues the shading around it.+ 1. dark hair / lash pixels and eye white next to the hole are not skin: they are+ replaced by a normalised-convolution estimate so they cannot bleed in;+ 2. the hole is then solved as a membrane (Laplace equation) with the surrounding skin+ as the boundary, so the fill meets the lid shadow and blush without a visible edge+ (a plain average looked like a flat, lighter patch)."""+ rgb = img[..., :3].astype(np.float32)+ lum = rgb @ np.array([0.3, 0.59, 0.11], np.float32)+ redness = rgb[..., 0] - rgb[..., 2]+ skin = (hole == 0) & (lum > 150) & (redness > 8) & (img[..., 3] > 200)+ est = rgb.copy()+ known = skin.astype(np.float32)+ for sigma in (3, 6, 12, 24, 48):+ num = cv2.GaussianBlur(rgb * known[..., None], (0, 0), sigma)+ den = cv2.GaussianBlur(known, (0, 0), sigma)[..., None]+ fill = (known == 0) & (den[..., 0] > 0.02)+ est[fill] = (num / np.maximum(den, 1e-4))[fill]+ known = np.maximum(known, fill.astype(np.float32) * 0.5)+ solve = (hole > 0) | ((cv2.dilate(hole, np.ones((17, 17), np.uint8)) > 0) & ~skin)+ ys, xs = np.where(solve)+ out = rgb.copy()+ if len(ys):+ y0, y1, x0, x1 = max(ys.min() - 2, 0), ys.max() + 3, max(xs.min() - 2, 0), xs.max() + 3+ cur = np.where(solve[..., None], est, rgb)[y0:y1, x0:x1].copy()+ m = solve[y0:y1, x0:x1]+ fixed = cur.copy()+ for _ in range(600): # Jacobi iterations from a good start: converges quickly+ avg = cv2.blur(cur, (3, 3))+ cur = np.where(m[..., None], avg, fixed)+ out[y0:y1, x0:x1] = cur+ k = cv2.GaussianBlur((hole > 0).astype(np.float32), (0, 0), 1.0)[..., None]+ res = img.copy()+ res[..., :3] = np.clip(img[..., :3] * (1 - k) + out * k, 0, 255).astype(np.uint8)+ res[..., 3] = np.maximum(img[..., 3], (k[..., 0] * 255).astype(np.uint8))+ return res+++def hair_mask(rgba):+ r, g, b, al = [rgba[..., i].astype(np.float32) for i in range(4)]+ lum = 0.3 * r + 0.59 * g + 0.11 * b+ m = ((lum < 150) & (r >= g) & (g >= b * 0.85) & (r - b < 110) & (al > 200)).astype(np.uint8) * 255+ m = cv2.morphologyEx(m, cv2.MORPH_OPEN, np.ones((3, 3), np.uint8)) # drop thin contour lines+ # eyes, brows and mouth are dark too but must never sway+ for cx, cy, rx, ry in [(493, 480, 70, 45), (713, 415, 65, 50), (700, 324, 100, 26), (635, 568, 50, 20)]:+ cv2.ellipse(m, (cx, cy), (rx, ry), 0, 0, 360, 0, -1)+ # wide blur: the sway offset must stay well below the width of the falloff or the mesh folds+ return cv2.GaussianBlur(m, (0, 0), 9)+++def main():+ rgba = np.array(Image.open(SRC).convert("RGBA"))+ a = rgba[..., 3]+ rgba[..., 3] = np.where(a > 240, 255, a) # source alpha is 248-254 on opaque areas+ h, w = a.shape+ OUT.mkdir(parents=True, exist_ok=True)+ # build id lets the page bypass stale cached copies of the images+ meta = {"size": [w, h], "build": hashlib.sha1(SRC.read_bytes() + Path(__file__).read_bytes()).hexdigest()[:10], "layers": {}}++ remove = np.zeros((h, w), np.uint8)+ tassel_bg = np.zeros((h, w), np.uint8)++ hand = polygon_mask((h, w), HAND_POLY)+ layer, rect = crop_layer(rgba, hand)+ Image.fromarray(layer).save(OUT / "hand.png")+ meta["layers"]["hand"] = rect+ remove |= cv2.dilate(hand, np.ones((5, 5), np.uint8))+ # the finger outline hugs the jaw line; take a wider margin there (it gets repainted below)+ tips = cv2.dilate(hand, np.ones((11, 11), np.uint8))+ tips[665:] = 0+ remove |= tips++ for name, box in TASSELS.items():+ m = red_mask(rgba[..., :3], box)+ layer, rect = crop_layer(rgba, m)+ Image.fromarray(layer).save(OUT / f"{name}.png")+ meta["layers"][name] = rect+ tassel_bg |= cv2.dilate(m, np.ones((5, 5), np.uint8))++ # eyes: sort the pixels into parts, paint plain lid skin underneath, and split the+ # lines into colour + alpha against that skin+ eye_hole = np.zeros((h, w), np.uint8)+ eye_parts = []+ for i, e in enumerate(EYES):+ ball, lash, low, crease, stray, core = eye_classes(rgba, e)+ # grow the line classes 2px into the surrounding skin (in priority order, no overlaps)+ # so their soft antialiased edges go with them instead of staying behind as a trace+ # lines may reach 1px into the white's rim: that pixel row is the antialiased edge of+ # the lash, and cutting it on the polygon left a staircase along the closed lid+ taken = cv2.erode(core, np.ones((3, 3), np.uint8))+ lines = {}+ for part, m in (("lash", lash), ("low", low), ("crease", crease)):+ grown = cv2.dilate(m, np.ones((5, 5), np.uint8)) & ~taken+ region = polygon_mask((h, w), e["roi"])+ lines[part] = grown & cv2.dilate(region, np.ones((5, 5), np.uint8))+ taken |= lines[part]+ eye_parts.append((i, ball, lines))+ # bits of eye white just outside the traced opening would stay on the closed lid+ rgb = rgba[..., :3].astype(np.int32)+ whiteish = ((rgb.min(-1) > 200) & (rgb[..., 0] - rgb[..., 2] < 20)).astype(np.uint8) * 255+ near = cv2.dilate(core, np.ones((15, 15), np.uint8)) & ~core+ eye_hole |= taken | core | stray | (whiteish & near)+ skin_under = fill_skin(rgba, eye_hole)[..., :3]+ for i, ball, lines in eye_parts:+ # hard edge: a feathered edge let the skin underneath show through as a light seam+ layer, rect = crop_layer(rgba, ball, pad=3, soft=False)+ Image.fromarray(layer).save(OUT / f"eye{i}_ball.png")+ meta["layers"][f"eye{i}_ball"] = rect+ for part, m in lines.items():+ full = unblend(rgba, skin_under, m, INK[part])+ # soften the cut-out edge a touch (the colour split keeps the line itself crisp)+ edge = np.clip(cv2.GaussianBlur(m.astype(np.float32) / 255, (0, 0), 0.7) * 1.6, 0, 1)+ full[..., 3] = (full[..., 3] * edge).astype(np.uint8)+ ys, xs = np.where(full[..., 3] > 0)+ x0, y0, x1, y1 = xs.min() - 2, ys.min() - 2, xs.max() + 3, ys.max() + 3+ Image.fromarray(full[y0:y1, x0:x1]).save(OUT / f"eye{i}_{part}.png")+ meta["layers"][f"eye{i}_{part}"] = [int(x0), int(y0), int(x1 - x0), int(y1 - y0)]+ meta["eyes"] = [eye_curves(e) for e in EYES]++ # paint what is known to be behind the fingers, then inpaint only the rest+ prefill = rgba.copy()+ yy, xx = np.mgrid[0:h, 0:w]+ jx, jy = np.array(JAW_VISIBLE, float).T+ coef = np.polyfit(jx, jy, 4)+ curve = np.polyval(coef, xx)+ slope = np.polyval(np.polyder(coef), xx)+ dist = (yy - curve) / np.sqrt(1 + slope ** 2) # signed normal distance, + below+ in_x = (xx >= JAW_X[0]) & (xx <= JAW_X[1])+ hole = remove > 0+ face = hole & in_x & (dist < 0) & (yy > 540)+ bg = hole & (polygon_mask((h, w), BG_BEHIND_HAND) > 0) & (dist >= 0)+ # skin above the jaw: continue the surrounding shading into the gap+ filled = fill_skin(rgba, face.astype(np.uint8) * 255)+ prefill[face] = filled[face]+ prefill[face, 3] = 255+ prefill[bg] = (0, 0, 0, 0)+ # the contour: colour and width taken from the visible part of the line+ def darkest(x, y):+ col = rgba[int(y) - 3:int(y) + 4, int(x), :3].astype(float)+ return col[np.argmin(col @ np.array([0.3, 0.59, 0.11]))]+ line_col = np.median(np.array([darkest(x, y) for x, y in JAW_VISIBLE[:4] + JAW_VISIBLE[-4:]]), axis=0)+ lw = (np.clip(1.7 - np.abs(dist - 0.2), 0, 1) * (hole & in_x))[..., None]+ prefill[..., :3] = (prefill[..., :3] * (1 - lw) + line_col * lw).astype(np.uint8)+ prefill[..., 3] = np.maximum(prefill[..., 3], (lw[..., 0] * 255).astype(np.uint8))+ painted = (face | bg | (lw[..., 0] > 0)).astype(np.uint8) * 255 & remove+ base = inpaint_rgba(prefill, (remove & ~painted) | tassel_bg | eye_hole)+ base = fill_skin(base, eye_hole)+ # the hanging tassels only cover empty background: fade alpha out within a few px+ # of the kept pixels (a hard cut left a stair-stepped edge along the hair)+ kept = ((rgba[..., 3] > 128) & (tassel_bg == 0)).astype(np.uint8)+ dist = cv2.distanceTransform(1 - kept, cv2.DIST_L2, 5)+ fade = np.clip(1 - dist / 2.5, 0, 1)+ base[..., 3] = np.where(tassel_bg > 0, (base[..., 3] * fade).astype(np.uint8), base[..., 3])+ Image.fromarray(base).save(OUT / "base.png")+ Image.fromarray(hair_mask(rgba)).save(OUT / "hairmask.png")+ (OUT / "layers.json").write_text(json.dumps(meta, indent=2))+ print(json.dumps(meta))+++if __name__ == "__main__":+ main()diff --git a/reference/build_sprites.py b/reference/build_sprites.pynew file mode 100644index 0000000..7ad942e--- /dev/null+++ b/reference/build_sprites.py@@ -0,0 +1,73 @@+"""Cut the drawn eye / mouth variants into small sprite layers.++Input : samples/miko-qipao/variants/{eyes_closed,eyes_smile,eyes_half,mouth_a,mouth_a_half,mouth_i,mouth_o}.png+ (1254x1254, identical to the source outside samples/miko-qipao/variant-masks/*_edit_mask.png)+Output: samples/miko-qipao/built/sprites/<name>[_<eye>].png and samples/miko-qipao/built/sprites/sprites.json++Eyes are split per eye (0 = image-left eye, 1 = image-right eye) so a wink can close one.+Each sprite keeps the drawn pixels inside the edit mask with a few px of feathering at the+edge; outside the mask the variant equals the source, so the feather is invisible.+"""+import hashlib+import json+from pathlib import Path++import cv2+import numpy as np+from PIL import Image++ROOT = Path(__file__).resolve().parent.parent+VARIANTS = ROOT / "samples" / "miko-qipao" / "variants"+MASKS = ROOT / "samples" / "miko-qipao" / "variant-masks"+OUT = ROOT / "samples" / "miko-qipao" / "built" / "sprites"+FEATHER = 4 # px++EYE_VARIANTS = ["eyes_closed", "eyes_smile", "eyes_half"]+MOUTH_VARIANTS = ["mouth_a", "mouth_a_half", "mouth_i", "mouth_o"]+++def edit_region(name):+ a = np.array(Image.open(MASKS / f"{name}_edit_mask.png"))[..., 3]+ return (a == 0).astype(np.uint8)+++def feathered(region):+ dist = cv2.distanceTransform(region, cv2.DIST_L2, 5)+ return np.clip(dist / FEATHER, 0, 1)+++def save_sprite(img, weight, name, meta):+ ys, xs = np.where(weight > 0)+ x0, y0, x1, y1 = xs.min(), ys.min(), xs.max() + 1, ys.max() + 1+ rgba = img[y0:y1, x0:x1].copy()+ rgba[..., 3] = (rgba[..., 3] * weight[y0:y1, x0:x1]).astype(np.uint8)+ Image.fromarray(rgba).save(OUT / f"{name}.png")+ meta[name] = [int(x0), int(y0), int(x1 - x0), int(y1 - y0)]+++def main():+ OUT.mkdir(parents=True, exist_ok=True)+ meta = {}++ eyes = edit_region("eyes")+ n, labels = cv2.connectedComponents(eyes)+ assert n == 3, f"expected two eye regions, got {n - 1}"+ # order the two regions left to right+ comps = sorted(range(1, n), key=lambda k: np.where(labels == k)[1].mean())+ for v in EYE_VARIANTS:+ img = np.array(Image.open(VARIANTS / f"{v}.png").convert("RGBA"))+ for eye, k in enumerate(comps):+ save_sprite(img, feathered((labels == k).astype(np.uint8)), f"{v}_{eye}", meta)++ mouth = feathered(edit_region("mouth"))+ for v in MOUTH_VARIANTS:+ img = np.array(Image.open(VARIANTS / f"{v}.png").convert("RGBA"))+ save_sprite(img, mouth, v, meta)++ build = hashlib.sha1(b"".join((OUT / f"{k}.png").read_bytes() for k in sorted(meta))).hexdigest()[:10]+ (OUT / "sprites.json").write_text(json.dumps({"build": build, "layers": meta}, indent=2))+ print(build, len(meta), "sprites")+++if __name__ == "__main__":+ main()diff --git a/reference/engine/createMeshAvatar.d.ts b/reference/engine/createMeshAvatar.d.tsnew file mode 100644index 0000000..44cf94f--- /dev/null+++ b/reference/engine/createMeshAvatar.d.ts@@ -0,0 +1,59 @@+export type MeshAvatarEmotion =+ | 'happy'+ | 'sad'+ | 'angry'+ | 'surprised'+ | 'relaxed'+ | 'neutral';++export interface MeshAvatarMotionInfo {+ id: string;+ label: string;+ /** true for the small idle motions played at random while waiting */+ idle: boolean;+}++export interface MeshAvatarOptions {+ /** Folder with layers.json and the layer PNGs. Default: `/avatar/miko-qipao/` */+ assetsBase?: string;+ /** Run no animation loop; advance time yourself with `advance()` (video rendering). */+ manual?: boolean;+ /** Margin above the image, as a share of its height; negative hides the image's top+ * (its flat cut edge). Default: -0.07 */+ padTop?: number;+ /** Empty margin left and right, as a share of its width. Default: 0 */+ padSide?: number;+}++export interface MeshAvatar {+ readonly motions: MeshAvatarMotionInfo[];+ /** 0..1 loudness of the voice being played (e.g. normalised RMS) */+ setVoiceLevel(level: number): void;+ /** true while TTS audio is playing: idle motions pause and the head nods along */+ setSpeaking(speaking: boolean): void;+ /** AITuber OnAir emotion tag; unknown tags fall back to neutral */+ setEmotion(+ emotion: MeshAvatarEmotion | string | null | undefined,+ options?: { playMotion?: boolean },+ ): void;+ /** How much the head moves with the voice while speaking (1 = default) */+ setTalkGain(gain: number): void;+ /** Play a motion or idle motion by id (see `motions`) */+ play(id: string): void;+ /** Move the mouth through the vowels of kana text, without audio (previews / tuning) */+ speakKana(text: string): void;+ setAutoIdle(enabled: boolean): void;+ setAutoMotion(enabled: boolean): void;+ /** Hair / tassel sway multiplier (1 = default) */+ setSwayGain(gain: number): void;+ /** Called with the motion id when a motion starts and with null when it ends */+ onMotion(listener: (id: string | null) => void): () => void;+ /** Advance the simulation by `seconds` and draw (tests / hidden tabs) */+ advance(seconds: number, fps?: number): void;+ destroy(): void;+}++export function createMeshAvatar(+ canvas: HTMLCanvasElement,+ options?: MeshAvatarOptions,+): Promise<MeshAvatar>;diff --git a/reference/engine/createMeshAvatar.js b/reference/engine/createMeshAvatar.jsnew file mode 100644index 0000000..adf34f9--- /dev/null+++ b/reference/engine/createMeshAvatar.js@@ -0,0 +1,210 @@+// Mesh avatar engine: turns a pre-split single illustration (see public/avatar/miko-qipao/) into a+// Live2D-like animated avatar on a WebGL2 canvas. No UI and no framework: the app drives it+// through the small API returned by createMeshAvatar().+import { IMG, EYES, setEyes, baseWeights, deformBase, eyePartY, eyePartAlpha, handWeights, handFrame, deformHand, TASSELS } from './rig.js';+import { Renderer, buildGrid } from './renderer.js';+import { Physics } from './physics.js';+import { Motion } from './motion.js';+import { MOTIONS, IDLE_MOTIONS } from './motions.js';+import { createSprites } from './sprites.js';++const EYE_PARTS = ['ball', 'low', 'crease', 'lash']; // back to front++function loadImage(src) {+ return new Promise((res, rej) => {+ const i = new Image();+ i.onload = () => res(i);+ i.onerror = () => rej(new Error(`failed to load ${src}`));+ i.src = src;+ });+}++function channelOf(img, ch) {+ const c = document.createElement('canvas');+ c.width = img.width; c.height = img.height;+ const g = c.getContext('2d');+ g.drawImage(img, 0, 0);+ const d = g.getImageData(0, 0, c.width, c.height).data;+ const a = new Uint8Array(c.width * c.height);+ for (let i = 0; i < a.length; i++) a[i] = d[i * 4 + ch];+ return a;+}+const alphaOf = img => channelOf(img, 3);++// Two-bone skinning along the tassel: top follows segment 1, lower part segment 2.+function deformTassel(ch, mesh) {+ const [px, py] = ch.t.pivot, d = ch.dir, P = ch.pts;+ const sstep = (a, b, x) => { const t = Math.min(1, Math.max(0, (x - a) / (b - a))); return t * t * (3 - 2 * t); };+ const c1 = Math.cos(ch.phi[0]), s1 = Math.sin(ch.phi[0]);+ const c2 = Math.cos(ch.phi[1]), s2 = Math.sin(ch.phi[1]);+ const r = mesh.rest, o = mesh.pos;+ for (let i = 0; i < r.length; i += 2) {+ const vx = r[i] - px, vy = r[i + 1] - py;+ const along = vx * d[0] + vy * d[1];+ const ax = P[0][0] + vx * c1 - vy * s1, ay = P[0][1] + vx * s1 + vy * c1;+ const ux = vx - d[0] * ch.L1, uy = vy - d[1] * ch.L1;+ const bx = P[1][0] + ux * c2 - uy * s2, by = P[1][1] + ux * s2 + uy * c2;+ const w = sstep(ch.L1 * 0.55, ch.L1 * 1.35, along);+ o[i] = ax + (bx - ax) * w; o[i + 1] = ay + (by - ay) * w;+ }+}++export async function createMeshAvatar(canvas, options = {}) {+ const base = (options.assetsBase ?? '/avatar/miko-qipao/').replace(/\/?$/, '/');+ const meta = await (await fetch(`${base}layers.json`, { cache: 'no-store' })).json();+ setEyes(meta.eyes);+ const names = ['base', 'hand', 'tassel_l', 'tassel_r', ...[0, 1].flatMap(i => EYE_PARTS.map(p => `eye${i}_${p}`)), 'hairmask'];+ const imgs = Object.fromEntries(await Promise.all(names.map(async n => [n, await loadImage(`${base}${n}.png?b=${meta.build}`)])));+ const hairMask = channelOf(imgs.hairmask, 0);+ const hairAt = (x, y) => hairMask[Math.min(IMG.h - 1, Math.max(0, Math.round(y))) * IMG.w + Math.min(IMG.w - 1, Math.max(0, Math.round(x)))] / 255;++ // The source image is cut flat at its top edge (crown and right bun). A negative top margin+ // keeps the top ~88px (7%) above the canvas, which the layout puts at the top of the panel:+ // the cut stays off screen even at the deepest head tilt.+ const R = new Renderer(canvas, { padTop: options.padTop ?? -0.07, padSide: options.padSide ?? 0 });+ const rects = { base: [0, 0, IMG.w, IMG.h], ...meta.layers };++ // base layer, denser where hair strands bend and the face parts shift+ const baseMesh = buildGrid(rects.base, 14, alphaOf(imgs.base), imgs.base.width, { x0: 340, x1: 880, y0: 60, y1: 760, cell: 7 });+ const baseW = [];+ for (let i = 0; i < baseMesh.rest.length / 2; i++) {+ const x = baseMesh.rest[i * 2], y = baseMesh.rest[i * 2 + 1];+ baseW.push(baseWeights(x, y, hairAt(x, y)));+ }+ R.addLayer('base', imgs.base, baseMesh, { face: true });++ // eyes: white+iris clipped by the lids, then the line layers on top+ const eyeParts = [];+ EYES.forEach((e, i) => {+ for (const part of EYE_PARTS) {+ const n = `eye${i}_${part}`;+ const mesh = buildGrid(rects[n], part === 'ball' ? 4 : 3, alphaOf(imgs[n]), imgs[n].width);+ const W = [];+ for (let k = 0; k < mesh.rest.length / 2; k++) W.push(baseWeights(mesh.rest[k * 2], mesh.rest[k * 2 + 1], 0));+ const layer = R.addLayer(n, imgs[n], mesh, { eyeBall: part === 'ball' ? i : undefined });+ eyeParts.push({ e, eye: i, part, mesh, W, layer });+ }+ });++ // drawn eye / mouth variants (closed / half / smiling eyes, あいうえお mouths) over the face+ let sprites = null;+ try {+ const res = await fetch(`${base}sprites/sprites.json`, { cache: 'no-store' });+ if (res.ok) {+ const sheet = await res.json();+ const simgs = Object.fromEntries(await Promise.all(Object.keys(sheet.layers).map(async n =>+ [n, await loadImage(`${base}sprites/${n}.png?b=${sheet.build}`)])));+ sprites = createSprites(R, sheet, simgs, buildGrid, alphaOf);+ }+ } catch (err) {+ console.warn('eye / mouth sprites not loaded:', err);+ }++ const tassels = TASSELS.map(t => {+ const mesh = buildGrid(rects[t.name], 6, alphaOf(imgs[t.name]), imgs[t.name].width);+ return R.addLayer(t.name, imgs[t.name], mesh);+ });++ const handMesh = buildGrid(rects.hand, 9, alphaOf(imgs.hand), imgs.hand.width);+ const handW = [];+ for (let i = 0; i < handMesh.rest.length / 2; i++) handW.push(handWeights(handMesh.rest[i * 2], handMesh.rest[i * 2 + 1]));+ R.addLayer('hand', imgs.hand, handMesh);++ const physics = new Physics();+ const motion = new Motion();+ const listeners = new Set();+ motion.onMotion = id => { for (const fn of listeners) fn(id); };++ const tmp = [0, 0];+ function tick(dt) {+ const P = motion.update(dt);+ const phys = physics.step(P, dt);++ const bp = baseMesh.pos, br = baseMesh.rest;+ for (let i = 0; i < baseW.length; i++) {+ deformBase(br[i * 2], br[i * 2 + 1], baseW[i], P, phys, tmp);+ bp[i * 2] = tmp[0]; bp[i * 2 + 1] = tmp[1];+ }+ // with drawn eye sprites the layered eye is only ever shown exactly as drawn: moving the+ // cut-out lash leaves seams at its edges+ const eyeOpenFor = v => (sprites ? 1 : v);+ for (const ep of eyeParts) {+ const open = eyeOpenFor(ep.eye === 0 ? P.ParamEyeROpen : P.ParamEyeLOpen);+ const smile = ep.eye === 0 ? P.ParamEyeSmile : (P.eyeSmileL ?? P.ParamEyeSmile);+ ep.layer.alpha = eyePartAlpha(ep.part, open, smile);+ const r = ep.mesh.rest, o = ep.mesh.pos;+ for (let k = 0; k < ep.W.length; k++) {+ const x = r[k * 2], y = r[k * 2 + 1];+ deformBase(x, eyePartY(ep.e, ep.part, x, y, open, smile), ep.W[k], P, phys, tmp);+ o[k * 2] = tmp[0]; o[k * 2 + 1] = tmp[1];+ }+ }+ const cover = sprites?.update(P, phys, dt);+ if (cover) for (const ep of eyeParts) if (cover.eyes[ep.eye]) ep.layer.alpha = 0;+ const hp = handMesh.pos, hr = handMesh.rest, HF = handFrame(P);+ for (let i = 0; i < handW.length; i++) {+ deformHand(hr[i * 2], hr[i * 2 + 1], handW[i], P, HF, tmp);+ hp[i * 2] = tmp[0]; hp[i * 2 + 1] = tmp[1];+ }+ physics.chains.forEach((ch, k) => deformTassel(ch, tassels[k].mesh));++ const ball = 7; // px of iris travel+ R.draw({+ eyes: [+ eyeOpenFor(P.ParamEyeROpen), P.ParamEyeSmile, P.ParamEyeBallX * ball, -P.ParamEyeBallY * ball * 0.6,+ eyeOpenFor(P.ParamEyeLOpen), P.eyeSmileL ?? P.ParamEyeSmile, P.ParamEyeBallX * ball * 0.85, -P.ParamEyeBallY * ball * 0.6,+ ],+ // with sprites the drawn mouths replace the shader-painted one+ mouthOpen: sprites ? 0 : P.ParamMouthOpenY, mouthForm: P.ParamMouthForm, cheek: P.ParamCheek,+ showMesh: false, originalAlpha: 0, joints: [],+ });+ }++ // `manual: true` runs no animation loop: the caller advances time with advance()+ // (offline video rendering, one call per frame)+ let raf = 0, last = performance.now(), destroyed = false;+ const frame = now => {+ const dt = Math.min(0.05, (now - last) / 1000);+ last = now;+ tick(dt);+ raf = requestAnimationFrame(frame);+ };+ if (!options.manual) raf = requestAnimationFrame(frame);++ const motionList = [+ ...Object.entries(MOTIONS).map(([id, m]) => ({ id, label: m.label, idle: false })),+ ...Object.entries(IDLE_MOTIONS).map(([id, m]) => ({ id, label: m.label, idle: true })),+ ];++ return {+ motions: motionList,+ /** 0..1 loudness of the voice being played (e.g. normalised RMS). */+ setVoiceLevel(v) { motion.setVoiceLevel(v); },+ /** true while TTS audio is playing: idle motions pause and the head nods along. */+ setSpeaking(on) { motion.setSpeaking(on); },+ /** AITuber OnAir emotion tag: happy / sad / angry / surprised / relaxed / neutral (or null). */+ setEmotion(tag, opts) { motion.setEmotion(tag, opts); },+ /** How much the head moves with the voice while speaking (1 = default, calmer below). */+ setTalkGain(g) { motion.talkGain = Math.max(0, Number(g) || 0); },+ /** Play a motion or idle motion by id (see `motions`). */+ play(id) { if (motion.hasMotion(id)) motion.playMotion(id); },+ /** Move the mouth through the vowels of kana text (no audio; for previews). */+ speakKana(text) { motion.speakKana(String(text ?? '')); },+ setAutoIdle(on) { motion.autoIdle = !!on; },+ setAutoMotion(on) { motion.autoMotion = !!on; },+ /** Hair / tassel sway multiplier (1 = default). */+ setSwayGain(g) { physics.gain = g; },+ /** Called with the motion id when a motion starts and with null when it ends. */+ onMotion(fn) { listeners.add(fn); return () => listeners.delete(fn); },+ /** Advance the simulation by `sec` and draw (for tests / hidden tabs). */+ advance(sec, fps = 60) { for (let i = 0; i < Math.round(sec * fps); i++) tick(1 / fps); },+ destroy() {+ if (destroyed) return;+ destroyed = true;+ cancelAnimationFrame(raf);+ listeners.clear();+ // the GL context is not lost on purpose: the canvas may already be reused by a new+ // instance (React StrictMode mounts twice) and a canvas only ever has one context+ },+ };+}diff --git a/reference/engine/kana.js b/reference/engine/kana.jsnew file mode 100644index 0000000..aefa452--- /dev/null+++ b/reference/engine/kana.js@@ -0,0 +1,62 @@+// Japanese text -> timed mouth shapes, for previewing lip sync without audio.+// Only kana are read; other characters are skipped, punctuation makes a short pause.++// open: how far the mouth opens, form: -1 wide (い) .. 0 (あ) .. +1 round (う)+export const VOWELS = {+ a: { open: 0.9, form: 0, label: 'あ' },+ i: { open: 0.5, form: -0.85, label: 'い' },+ u: { open: 0.4, form: 0.9, label: 'う' },+ e: { open: 0.62, form: -0.4, label: 'え' },+ o: { open: 0.75, form: 0.6, label: 'お' },+ n: { open: 0, form: null, label: 'ん' }, // closes with the previous shape+};++const ROWS = {+ a: 'あかさたなはまやらわがざだばぱぁ',+ i: 'いきしちにひみりぎじぢびぴぃ',+ u: 'うくすつぬふむゆるぐずづぶぷぅゔ',+ e: 'えけせてねへめれげぜでべぺぇ',+ o: 'おこそとのほもよろをごぞどぼぽぉ',+};+const VOWEL_OF = {};+for (const [v, chars] of Object.entries(ROWS)) for (const c of chars) VOWEL_OF[c] = v;+const LIPS_CLOSE = new Set([...'まみむめもばびぶべぼぱぴぷぺぽ']); // m / b / p close the lips first+const PLAIN_VOWEL = new Set([...'あいうえおぁぃぅぇぉ']);+const SMALL_Y = { ゃ: 'a', ゅ: 'u', ょ: 'o' };+const PAUSE = new Set([...'、。,.,.!?!? …']);++const toHiragana = s => s.replace(/[ァ-ヶ]/g, c => String.fromCharCode(c.charCodeAt(0) - 0x60));++/** -> [{ vowel, dur, onset }] where onset is 'lips' | 'consonant' | null */+export function kanaToMoras(text, mora = 0.14) {+ const out = [];+ for (const c of toHiragana(text)) {+ const last = out[out.length - 1];+ if (SMALL_Y[c] && last) { last.vowel = SMALL_Y[c]; continue; }+ if (c === 'ー' && last) { last.dur += mora; continue; }+ if (c === 'っ') { out.push({ vowel: 'n', dur: mora * 0.8, onset: null }); continue; }+ if (c === 'ん') { out.push({ vowel: 'n', dur: mora, onset: null }); continue; }+ if (PAUSE.has(c)) { out.push({ vowel: 'n', dur: mora * 2.2, onset: null }); continue; }+ const v = VOWEL_OF[c];+ if (!v) continue;+ out.push({ vowel: v, dur: mora, onset: LIPS_CLOSE.has(c) ? 'lips' : PLAIN_VOWEL.has(c) ? null : 'consonant' });+ }+ return out;+}++/** Mouth target at time t (s) of a mora timeline, or null when it is over. */+export function sampleMoras(moras, t) {+ let start = 0;+ for (const m of moras) {+ if (t < start + m.dur) {+ const x = (t - start) / m.dur;+ const v = VOWELS[m.vowel];+ // consonants: the mouth is nearly shut (lips) or half shut at the start of the mora+ const onset = m.onset === 'lips' ? 0.05 : m.onset === 'consonant' ? 0.45 : 1;+ const k = x < 0.35 ? onset + (1 - onset) * (x / 0.35) : 1;+ return { open: v.open * k, form: v.form, vowel: m.vowel };+ }+ start += m.dur;+ }+ return null;+}diff --git a/reference/engine/motion.js b/reference/engine/motion.jsnew file mode 100644index 0000000..bcf5fe4--- /dev/null+++ b/reference/engine/motion.js@@ -0,0 +1,361 @@+// Drives parameters: idle ("おまかせ"), mouse follow, blinking, expressions, motions.+import { PARAMS } from './rig.js';+import { MOTIONS, IDLE_MOTIONS, ADDITIVE, sampleTrack } from './motions.js';+import { VOWELS, kanaToMoras, sampleMoras } from './kana.js';++const ALL_MOTIONS = { ...MOTIONS, ...IDLE_MOTIONS };+// scales the head / body / arm tracks of idle motions (they are authored at full size, so 1)+// (gaze, eyes and brows are left alone)+export const IDLE_GAIN = { amp: 1, stiff: 1.8 };+const IDLE_SCALED = /^Param(Angle|BodyAngle|ArmAngle|HandAngle)/;++// motion tracks that replace the expression (the rest are additive or body targets)+const FACE_TRACKS = new Set(['eyeOpen', 'eyeOpenL', 'eyeSmileL', 'ParamEyeSmile', 'ParamMouthOpenY',+ 'ParamMouthForm', 'ParamCheek', 'ParamBrowY', 'ParamBrowAngle']);+const sstep = (a, b, x) => { const t = Math.min(1, Math.max(0, (x - a) / (b - a))); return t * t * (3 - 2 * t); };++// smooth 1D value noise+function noise(t, seed) {+ const i = Math.floor(t), f = t - i;+ const h = n => { const x = Math.sin((n + seed * 57.3) * 127.1) * 43758.5453; return x - Math.floor(x); };+ const u = f * f * (3 - 2 * f);+ return (h(i) * (1 - u) + h(i + 1) * u) * 2 - 1;+}+const fbm = (t, s) => noise(t, s) * 0.7 + noise(t * 2.3, s + 9) * 0.3;+const clamp = (v, a, b) => Math.max(a, Math.min(b, v));++export const EXPRESSIONS = {+ normal: { label: 'ふつう', p: {} },+ smile: { label: 'にっこり', p: { eyeOpen: 0, ParamEyeSmile: 1, ParamCheek: 0.35, ParamBrowY: 0.2 } },+ shy: { label: '照れ', p: { eyeOpen: 0.78, ParamEyeSmile: 0.5, ParamCheek: 1, ParamBrowAngle: -0.5, ParamBrowY: -0.1, glance: [0.7, 0.35] } },+ jito: { label: 'ジト目', p: { eyeOpen: 0.5, ParamBrowY: -0.5, ParamBrowAngle: 0.6 } },+ surprise: { label: 'びっくり', p: { eyeOpen: 1.22, ParamBrowY: 1, ParamMouthOpenY: 0.6, ParamMouthForm: 0.6 } },+ wink: { label: 'ウインク', p: { eyeOpenL: 0, eyeSmileL: 1, ParamCheek: 0.3 } },+ // talking faces for AITuber OnAir emotion tags: eyes stay mostly open (closed / ^^ eyes are+ // what a single image fakes worst, and they would stay shut for a whole sentence)+ happyTalk: { label: 'happy', p: { eyeOpen: 0.8, ParamEyeSmile: 0.45, ParamCheek: 0.35, ParamBrowY: 0.25, ParamMouthForm: -0.5 } },+ sadTalk: { label: 'sad', p: { eyeOpen: 0.78, ParamBrowAngle: -0.8, ParamBrowY: -0.2, ParamMouthForm: 0.3, glance: [0, -0.35] } },+ angryTalk: { label: 'angry', p: { eyeOpen: 0.72, ParamBrowAngle: 0.85, ParamBrowY: -0.55, ParamMouthForm: 0.2 } },+ surprisedTalk: { label: 'surprised', p: { eyeOpen: 1.18, ParamBrowY: 0.9, ParamMouthForm: 0.9 } },+ relaxedTalk: { label: 'relaxed', p: { eyeOpen: 0.82, ParamEyeSmile: 0.35, ParamCheek: 0.15, ParamBrowY: 0.1 } },+};++// emotion tag -> [expression, motion played when the line starts]+const EMOTIONS = {+ happy: ['happyTalk', 'nod'],+ sad: ['sadTalk', 'sigh'],+ angry: ['angryTalk', 'no'],+ surprised: ['surprisedTalk', 'surprise'],+ relaxed: ['relaxedTalk', 'sway'],+ neutral: ['normal', null],+};++// [stiffness, damping ratio] of the parameter smoothing; unlisted params use [120, 0.95]+const SPRINGS = {+ ParamEyeBallX: [260, 0.9], ParamEyeBallY: [260, 0.9],+ ParamAngleX: [55, 0.72], ParamAngleY: [55, 0.72], ParamAngleZ: [45, 0.75],+ ParamBodyAngleX: [14, 0.9], ParamBodyAngleZ: [12, 0.9],+ ParamArmAngle: [20, 0.85], ParamHandAngle: [30, 0.8],+};++export class Motion {+ constructor() {+ this.mode = 'auto'; // auto | mouse | manual+ this.P = Object.fromEntries(PARAMS.map(p => [p.id, p.def]));+ this.manual = { ...this.P };+ this.cur = { ...this.P }; // smoothed values+ this.vel = Object.fromEntries(PARAMS.map(p => [p.id, 0]));+ this.expr = 'normal';+ this.exprMix = {}; // smoothed expression values+ this.t = 0;+ this.blink = { t: 0, start: 1.5, double: false };+ this.gaze = { x: 0, y: 0, next: 0 };+ this.tap = { next: 4, until: -1 };+ this.pointer = null; // image px+ this.faceCenter = [615, 470];+ this.lipOpen = null; // external mouth value from lip sync+ this.lipForm = 0;+ this.speaking = false; // TTS audio playing (setSpeaking)+ this.voice = 0; // 0..1 loudness (setVoiceLevel)+ this.mouth = 0;+ this.vowel = 'a';+ this.vowelForm = 0;+ this.syllableArmed = true;+ this.voicePeak = 0;+ this.voiceTrough = 0;+ this.kana = null;+ this.emotionUntil = 0; // when the emotion face goes back to normal+ this.talkGain = 1; // how much the head moves along with the voice+ this.play = null; // { id, t } of the motion being played+ this.autoMotion = true; // "おまかせ" plays a reaction motion now and then+ this.nextAuto = 14;+ this.autoIdle = true; // ...and small idle motions more often+ this.nextIdle = 3;+ this.lastAuto = null;+ this.onMotion = null; // UI callback (id or null)+ }++ setExpression(k) { this.expr = k; }++ hasMotion(id) { return id in ALL_MOTIONS; }++ // ---- speech (driven from outside, e.g. by the TTS audio analyser) ----+ setVoiceLevel(v) { this.voice = Math.min(1, Math.max(0, Number(v) || 0)); }++ setSpeaking(on) {+ if (on === this.speaking) return;+ this.speaking = !!on;+ if (!on) {+ // hold the emotion a moment after the line, then go back to the plain face+ this.emotionUntil = this.t + 1.2;+ this.voice = 0;+ }+ }++ /** `playMotion: false` changes only the face (a caller that picks motions itself). */+ setEmotion(tag, { playMotion = true } = {}) {+ const e = EMOTIONS[tag] ?? EMOTIONS.neutral;+ this.expr = e[0];+ this.emotionUntil = Infinity;+ if (e[1] && playMotion) this.playMotion(e[1]);+ }++ /** Mouth shapes from kana text, without audio (preview / tuning). */+ speakKana(text) {+ this.kana = { moras: kanaToMoras(text), t: 0 };+ }++ // Mouth from the TTS loudness. A volume signal has no vowel information, so each syllable+ // (the voice dipping and rising again) gets one vowel at random, weighted towards あ, and+ // keeps it until the next syllable: the drawn mouths must not change shape mid-syllable.+ // Syllables are found relative to the recent peak (not an absolute level), and the mouth+ // is scaled by where the voice sits between the recent trough and peak, so it closes in+ // the dip before each mora even when a loud voice never gets quiet.+ speechMouth(dt) {+ if (this.kana) {+ this.kana.t += dt;+ const m = sampleMoras(this.kana.moras, this.kana.t);+ if (!m) { this.kana = null; return this.mouth > 0.01 ? [this.mouth *= 0.6, this.vowelForm] : null; }+ const k = m.open > this.mouth ? 1 - Math.exp(-dt * 30) : 1 - Math.exp(-dt * 22);+ this.mouth += (m.open - this.mouth) * k;+ if (m.form !== null) this.vowelForm = m.form;+ return [this.mouth, this.vowelForm];+ }+ const v = this.speaking ? this.voice : 0;+ // recent peak / trough: follow at once, then relax over ~0.2 s+ const relax = 1 - Math.exp(-dt * 5);+ this.voicePeak = v > this.voicePeak ? v : this.voicePeak + (v - this.voicePeak) * relax;+ this.voiceTrough = v < this.voiceTrough ? v : this.voiceTrough + (v - this.voiceTrough) * relax;+ const peak = Math.max(this.voicePeak, 0.05);+ if (v < peak * 0.6) this.syllableArmed = true;+ else if (this.syllableArmed && v > peak * 0.8 && v > 0.1) {+ this.syllableArmed = false;+ const r = Math.random();+ this.vowel = r < 0.4 ? 'a' : r < 0.58 ? 'o' : r < 0.74 ? 'e' : r < 0.88 ? 'i' : 'u';+ }+ const range = this.voicePeak - this.voiceTrough;+ const rise = range < peak * 0.3 ? 1 : Math.max(0, (v - this.voiceTrough) / range);+ const shape = VOWELS[this.vowel ?? 'a'];+ const level = Math.min(1, Math.pow(v, 0.7) * 1.15) * Math.pow(rise, 0.3);+ const target = this.speaking ? Math.min(0.95, level) * (0.45 + 0.55 * shape.open / 0.9) : 0;+ // quick attack, quick release: the mouth has to shut between morae (~7 per second)+ const k = target > this.mouth ? 1 - Math.exp(-dt * 40) : 1 - Math.exp(-dt * 32);+ this.mouth += (target - this.mouth) * k;+ if (this.speaking) this.vowelForm = shape.form; // after the line: close in the last shape+ return this.speaking || this.mouth > 0.01 ? [this.mouth, this.vowelForm] : null;+ }++ // Breathing: inhale ~40% of the cycle, a slower exhale, a short pause at the bottom,+ // and a period that drifts between ~3.2 and 4.6 s so it never looks metronomic.+ breathValue(dt) {+ this.breathPhase = (this.breathPhase ?? 0) + dt / (this.breathPeriod ?? 3.8);+ if (this.breathPhase >= 1) { this.breathPhase -= 1; this.breathPeriod = 3.2 + Math.random() * 1.4; }+ const x = this.breathPhase;+ if (x < 0.4) return sstep(0, 0.4, x);+ if (x < 0.88) return 1 - sstep(0.4, 0.88, x);+ return 0;+ }++ // pick one at random, never the one that just played+ playRandom(ids) {+ const pool = ids.filter(k => k !== this.lastAuto);+ this.playMotion(pool[Math.floor(Math.random() * pool.length)]);+ }++ playMotion(id) {+ this.lastAuto = id;+ this.play = { id, t: 0 };+ this.onMotion?.(id);+ }++ blinkValue(dt) {+ const b = this.blink;+ b.t += dt;+ if (b.t < b.start) return 1;+ const x = (b.t - b.start) / 0.17;+ if (x >= 1) {+ if (b.double) { b.double = false; b.start = b.t + 0.07; }+ else { b.start = b.t + 1.8 + Math.random() * 4.2; b.double = Math.random() < 0.18; }+ return 1;+ }+ return x < 0.45 ? 1 - x / 0.45 : (x - 0.45) / 0.55;+ }++ update(dt) {+ this.t += dt;+ const t = this.t;+ const T = {}; // targets+ for (const p of PARAMS) T[p.id] = p.def;++ if (this.mode === 'manual') {+ Object.assign(T, this.manual);+ } else if (this.mode === 'auto') {+ // wandering plus following the gaze: the eyes jump first, the head turns after them+ T.ParamAngleX = fbm(t * 0.18, 1) * 10 + this.gaze.x * 11;+ T.ParamAngleY = fbm(t * 0.15, 2) * 6 - 1 + this.gaze.y * 7;+ T.ParamAngleZ = fbm(t * 0.12, 3) * 10;+ T.ParamBodyAngleX = fbm(t * 0.1, 4) * 5;+ T.ParamBodyAngleZ = fbm(t * 0.09, 5) * 4;+ T.ParamArmAngle = fbm(t * 0.14, 6) * 5;+ T.ParamHandAngle = fbm(t * 0.21, 7) * 5;+ // glances+ if (t > this.gaze.next) {+ const r = Math.random();+ this.gaze.x = r < 0.45 ? 0 : (Math.random() * 2 - 1) * 0.8;+ this.gaze.y = r < 0.45 ? 0 : (Math.random() * 2 - 1) * 0.5;+ this.gaze.next = t + 0.8 + Math.random() * 2.5;+ }+ T.ParamEyeBallX = this.gaze.x + T.ParamAngleX / 60;+ T.ParamEyeBallY = this.gaze.y + T.ParamAngleY / 60;+ // occasional finger tapping on the chin+ if (t > this.tap.next) { this.tap.until = t + 1.1; this.tap.next = t + 5 + Math.random() * 6; }+ // random playback: reactions every ~15-25 s, small idle motions every few seconds in between+ // while talking: no random motions, just nod along with the voice+ if (this.speaking) {+ this.nextIdle = Math.max(this.nextIdle, t + 2.5);+ this.nextAuto = Math.max(this.nextAuto, t + 6);+ const g = this.talkGain;+ this.talkNod = (this.talkNod ?? 0) + (this.voice * 7 * g - (this.talkNod ?? 0)) * Math.min(1, dt * 6);+ T.ParamAngleY -= this.talkNod;+ T.ParamAngleX += fbm(t * 0.6, 11) * 5 * g;+ T.ParamAngleZ += fbm(t * 0.5, 12) * 4 * g;+ }+ if (!this.speaking && t > this.emotionUntil) { this.expr = 'normal'; this.emotionUntil = Infinity; }+ if (this.speaking) { /* no random playback */ }+ else if (!this.play && this.autoMotion && t > this.nextAuto) {+ this.playRandom(Object.keys(MOTIONS).filter(k => k !== 'surprise'));+ this.nextAuto = t + 15 + Math.random() * 10;+ this.nextIdle = Math.max(this.nextIdle, t + 5);+ } else if (!this.play && this.autoIdle && t > this.nextIdle) {+ this.playRandom(Object.keys(IDLE_MOTIONS));+ this.nextIdle = t + 5 + Math.random() * 5; // counted from the start, so 1-5 s of plain idling after it+ }+ } else if (this.mode === 'mouse' && this.pointer) {+ const dx = (this.pointer[0] - this.faceCenter[0]) / 500, dy = (this.pointer[1] - this.faceCenter[1]) / 500;+ T.ParamAngleX = clamp(dx * 30, -30, 30);+ T.ParamAngleY = clamp(-dy * 30, -30, 30);+ T.ParamAngleZ = clamp(-dx * dy * 25, -12, 12);+ T.ParamBodyAngleX = clamp(dx * 10, -10, 10) * 0.6;+ T.ParamEyeBallX = clamp(dx * 1.4, -1, 1);+ T.ParamEyeBallY = clamp(-dy * 1.4, -1, 1);+ T.ParamHandAngle = clamp(dx * 4, -5, 5);+ }+ if (this.mode !== 'manual') {+ T.ParamBreath = this.breathValue(dt);+ if (t < this.tap.until) T.ParamFingerTap = Math.max(0, Math.sin((this.tap.until - t) * Math.PI * 3.6)) ** 2;+ }++ // motion: body/head tracks go into the targets, so the springs smooth them too+ let M = null, mw = 0;+ if (this.play) {+ const def = ALL_MOTIONS[this.play.id];+ this.play.t += dt;+ if (this.play.t >= def.dur) { this.play = null; this.onMotion?.(null); }+ else {+ M = {};+ for (const [id, keys] of Object.entries(def.tracks))+ M[id] = sampleTrack(keys, this.play.t) * (def.idle && IDLE_SCALED.test(id) ? IDLE_GAIN.amp : 1);+ mw = sstep(0, 0.15, this.play.t) * (1 - sstep(def.dur - 0.25, def.dur, this.play.t));+ for (const [id, v] of Object.entries(M)) {+ if (ADDITIVE.has(id)) T[id] += v;+ else if (id === 'ParamBreath') T[id] += (v - T[id]) * mw; // a motion sets its own breathing+ else if (!FACE_TRACKS.has(id)) T[id] = Math.max(T[id], Math.max(0, v));+ }+ }+ }++ if (this.mode !== 'manual') T.ParamAngleY += T.ParamBreath * 1.6;++ // expression layer (smoothed so switching is not a jump)+ const E = EXPRESSIONS[this.expr].p;+ const keys = ['eyeOpen', 'eyeOpenL', 'eyeSmileL', 'ParamEyeSmile', 'ParamMouthOpenY', 'ParamMouthForm', 'ParamCheek', 'ParamBrowY', 'ParamBrowAngle', 'gx', 'gy'];+ const target = { eyeOpen: E.eyeOpen ?? 1, eyeOpenL: E.eyeOpenL ?? E.eyeOpen ?? 1, eyeSmileL: E.eyeSmileL ?? E.ParamEyeSmile ?? 0,+ ParamEyeSmile: E.ParamEyeSmile ?? 0, ParamMouthOpenY: E.ParamMouthOpenY ?? 0, ParamMouthForm: E.ParamMouthForm ?? 0,+ ParamCheek: E.ParamCheek ?? 0, ParamBrowY: E.ParamBrowY ?? 0, ParamBrowAngle: E.ParamBrowAngle ?? 0,+ gx: E.glance?.[0] ?? 0, gy: E.glance?.[1] ?? 0 };+ const k = 1 - Math.exp(-dt * 9);+ for (const key of keys) {+ if (this.exprMix[key] === undefined) this.exprMix[key] = target[key];+ this.exprMix[key] += (target[key] - this.exprMix[key]) * k;+ }+ const X = this.exprMix;++ // spring-damper towards the targets for body params+ const out = {};+ for (const p of PARAMS) {+ const id = p.id;+ if (this.mode === 'manual' && !M) { out[id] = T[id]; this.cur[id] = T[id]; this.vel[id] = 0; continue; }+ // eyes lead, the head follows with a slight overshoot, the body trails behind+ let [stiff, zeta] = SPRINGS[id] ?? [120, 0.95];+ // keyframed motions are already smooth; follow them more tightly than idle wandering+ // keyframed motions are followed more tightly than the idle wandering; idle motions a+ // bit less so they stay soft but still reach their poses+ if (M && /^ParamAngle|^ParamBody/.test(id)) {+ if (ALL_MOTIONS[this.play?.id ?? '']?.idle) { stiff *= IDLE_GAIN.stiff; zeta = 0.8; }+ else if (/^ParamAngle/.test(id)) { stiff *= 4.5; zeta = 0.75; }+ }+ const damp = 2 * Math.sqrt(stiff) * zeta;+ this.vel[id] += (stiff * (T[id] - this.cur[id]) - damp * this.vel[id]) * dt;+ this.cur[id] += this.vel[id] * dt;+ out[id] = this.cur[id];+ }+ let blink = 1;+ if (this.mode !== 'manual') {+ blink = this.blinkValue(dt);+ out.ParamEyeROpen = X.eyeOpen * blink;+ out.ParamEyeLOpen = X.eyeOpenL * blink;+ out.ParamEyeSmile = X.ParamEyeSmile;+ out.eyeSmileL = X.eyeSmileL;+ out.ParamMouthOpenY = X.ParamMouthOpenY;+ out.ParamMouthForm = X.ParamMouthForm;+ out.ParamCheek = X.ParamCheek;+ // brows dip a little with each blink and lift when looking up+ out.ParamBrowY = X.ParamBrowY + (out.ParamAngleY > 0 ? out.ParamAngleY / 60 : 0) - (1 - blink) * 0.18;+ out.ParamBrowAngle = X.ParamBrowAngle;+ out.ParamEyeBallX = clamp(out.ParamEyeBallX + X.gx, -1, 1);+ out.ParamEyeBallY = clamp(out.ParamEyeBallY + X.gy, -1, 1);+ } else {+ out.eyeSmileL = out.ParamEyeSmile;+ }+ if (M) {+ const mix = (key, v) => { out[key] += (v - out[key]) * mw; };+ const clampEye = v => Math.min(1.3, Math.max(0, v));+ if ('eyeOpen' in M) { mix('ParamEyeROpen', clampEye(M.eyeOpen) * blink); if (!('eyeOpenL' in M)) mix('ParamEyeLOpen', clampEye(M.eyeOpen) * blink); }+ if ('eyeOpenL' in M) mix('ParamEyeLOpen', clampEye(M.eyeOpenL) * blink);+ if ('ParamEyeSmile' in M) { mix('ParamEyeSmile', M.ParamEyeSmile); if (!('eyeSmileL' in M)) mix('eyeSmileL', M.ParamEyeSmile); }+ if ('eyeSmileL' in M) mix('eyeSmileL', M.eyeSmileL);+ for (const id of ['ParamMouthOpenY', 'ParamMouthForm', 'ParamCheek', 'ParamBrowY', 'ParamBrowAngle'])+ if (id in M) mix(id, id === 'ParamMouthOpenY' || id === 'ParamCheek' ? Math.max(0, M[id]) : M[id]);+ }+ const sm = this.speechMouth(dt);+ if (sm) { this.lipOpen = sm[0]; this.lipForm = sm[1]; }+ else if (this.lipOpen !== null && !this.speaking && !this.kana) this.lipOpen = null;+ if (this.lipOpen !== null) {+ out.ParamMouthOpenY = Math.max(out.ParamMouthOpenY * 0.3, this.lipOpen);+ // while talking the voice decides the vowel; the expression's form would shift it+ out.ParamMouthForm = clamp(this.lipForm, -1, 1);+ }+ this.P = out;+ return out;+ }+}diff --git a/reference/engine/motions.d.ts b/reference/engine/motions.d.tsnew file mode 100644index 0000000..0a6fa5d--- /dev/null+++ b/reference/engine/motions.d.ts@@ -0,0 +1,2 @@+export const MOTIONS: Record<string, { label: string }>;+export const IDLE_MOTIONS: Record<string, { label: string }>;diff --git a/reference/engine/motions.js b/reference/engine/motions.jsnew file mode 100644index 0000000..d220b47--- /dev/null+++ b/reference/engine/motions.js@@ -0,0 +1,358 @@+// Keyframed motions. Each track is [[time(s), value], ...] and is interpolated with a+// smooth cubic curve. Head/body/eye-direction tracks are ADDED on top of whatever the+// current mode is doing (idle, mouse follow); face tracks REPLACE the expression.+// The result still goes through the parameter springs, which adds follow-through.++export const ADDITIVE = new Set([+ 'ParamAngleX', 'ParamAngleY', 'ParamAngleZ', 'ParamBodyAngleX', 'ParamBodyAngleZ',+ 'ParamArmAngle', 'ParamHandAngle', 'ParamEyeBallX', 'ParamEyeBallY',+]);++export const MOTIONS = {+ nod: {+ label: 'うなずき', dur: 1.7,+ tracks: {+ ParamAngleY: [[0, 0], [0.32, -13], [0.62, 2], [0.95, -9], [1.3, 1], [1.7, 0]],+ ParamAngleZ: [[0, 0], [0.4, -2], [1.0, -1], [1.7, 0]],+ ParamBodyAngleX: [[0, 0], [0.5, -1.5], [1.7, 0]],+ ParamEyeSmile: [[0, 0], [0.3, 0.45], [1.3, 0.45], [1.7, 0]],+ eyeOpen: [[0, 1], [0.3, 0.72], [1.3, 0.72], [1.7, 1]],+ ParamMouthOpenY: [[0, 0], [0.3, 0.12], [1.3, 0.12], [1.7, 0]],+ ParamMouthForm: [[0, 0], [0.3, -0.6], [1.7, -0.3]],+ },+ },+ tilt: {+ label: '首かしげ', dur: 2.6,+ tracks: {+ ParamAngleZ: [[0, 0], [0.55, 17], [2.0, 15], [2.6, 0]],+ ParamAngleX: [[0, 0], [0.6, 8], [2.0, 7], [2.6, 0]],+ ParamAngleY: [[0, 0], [0.6, 4], [2.6, 0]],+ ParamBodyAngleZ: [[0, 0], [0.8, 3], [2.0, 3], [2.6, 0]],+ ParamEyeBallX: [[0, 0], [0.4, 0.5], [2.1, 0.4], [2.6, 0]],+ ParamEyeBallY: [[0, 0], [0.4, 0.35], [2.1, 0.3], [2.6, 0]],+ ParamBrowAngle: [[0, 0], [0.5, -0.7], [2.1, -0.6], [2.6, 0]],+ ParamBrowY: [[0, 0], [0.5, 0.35], [2.1, 0.3], [2.6, 0]],+ // closed mouth: a barely open round mouth read as a squashed blob+ },+ },+ think: {+ label: '考えごと', dur: 3.6,+ tracks: {+ ParamAngleX: [[0, 0], [0.7, -11], [3.0, -9], [3.6, 0]],+ ParamAngleY: [[0, 0], [0.7, 9], [3.0, 8], [3.6, 0]],+ ParamAngleZ: [[0, 0], [0.8, 6], [3.0, 5], [3.6, 0]],+ ParamEyeBallX: [[0, 0], [0.35, -0.8], [3.1, -0.7], [3.6, 0]],+ ParamEyeBallY: [[0, 0], [0.35, 0.7], [3.1, 0.6], [3.6, 0]],+ ParamHandAngle: [[0, 0], [0.6, 3], [3.0, 3], [3.6, 0]],+ ParamFingerTap: [[0, 0], [0.9, 0], [1.05, 1], [1.2, 0], [1.4, 1], [1.55, 0], [1.75, 1], [1.9, 0],+ [2.3, 0], [2.45, 1], [2.6, 0], [3.6, 0]],+ ParamBrowY: [[0, 0], [0.6, 0.25], [3.0, 0.2], [3.6, 0]],+ ParamBrowAngle: [[0, 0], [0.6, -0.3], [3.0, -0.3], [3.6, 0]],+ ParamMouthForm: [[0, 0], [0.6, 0.4], [3.6, 0]],+ },+ },+ giggle: {+ label: 'くすっと笑う', dur: 2.2,+ tracks: {+ eyeOpen: [[0, 1], [0.2, 0], [1.8, 0], [2.2, 1]],+ ParamEyeSmile: [[0, 0], [0.2, 1], [1.8, 1], [2.2, 0]],+ ParamMouthOpenY: [[0, 0], [0.2, 0.5], [0.45, 0.32], [0.7, 0.55], [0.95, 0.34], [1.2, 0.5], [1.8, 0.3], [2.1, 0]],+ ParamMouthForm: [[0, 0], [0.2, -0.8], [2.2, -0.2]],+ ParamCheek: [[0, 0], [0.3, 0.7], [1.8, 0.7], [2.2, 0.1]],+ ParamAngleY: [[0, 0], [0.2, -5], [0.45, -1], [0.7, -6], [0.95, -2], [1.2, -5], [1.6, -2], [2.2, 0]],+ ParamAngleZ: [[0, 0], [0.3, -6], [1.8, -5], [2.2, 0]],+ ParamBodyAngleZ: [[0, 0], [0.25, 2], [0.5, -1], [0.75, 2], [1.0, -1], [1.3, 1.5], [2.2, 0]],+ ParamBrowY: [[0, 0], [0.3, 0.3], [1.8, 0.3], [2.2, 0]],+ },+ },+ surprise: {+ label: 'びっくり', dur: 2.0,+ tracks: {+ ParamAngleY: [[0, 0], [0.12, 10], [0.5, 6], [1.5, 5], [2.0, 0]],+ ParamAngleX: [[0, 0], [0.12, -4], [2.0, 0]],+ ParamBodyAngleX: [[0, 0], [0.15, -4], [1.5, -3], [2.0, 0]],+ eyeOpen: [[0, 1], [0.1, 1.25], [1.5, 1.2], [2.0, 1]],+ ParamBrowY: [[0, 0], [0.1, 1], [1.5, 0.9], [2.0, 0]],+ ParamMouthOpenY: [[0, 0], [0.12, 0.6], [1.4, 0.45], [2.0, 0]],+ ParamMouthForm: [[0, 0], [0.12, 0.6], [1.5, 0.55], [2.0, 0]], // お+ ParamArmAngle: [[0, 0], [0.15, -4], [1.5, -3], [2.0, 0]],+ },+ },+ shy: {+ label: '照れる', dur: 3.2,+ tracks: {+ ParamAngleX: [[0, 0], [0.6, 14], [2.6, 12], [3.2, 0]],+ ParamAngleY: [[0, 0], [0.6, -9], [2.6, -8], [3.2, 0]],+ ParamAngleZ: [[0, 0], [0.7, -8], [2.6, -7], [3.2, 0]],+ ParamEyeBallX: [[0, 0], [0.3, 0.8], [1.6, 0.8], [1.9, -0.3], [2.2, 0.8], [2.8, 0.6], [3.2, 0]],+ ParamEyeBallY: [[0, 0], [0.3, -0.5], [2.8, -0.4], [3.2, 0]],+ eyeOpen: [[0, 1], [0.5, 0.75], [2.7, 0.75], [3.2, 1]],+ ParamEyeSmile: [[0, 0], [0.5, 0.5], [2.7, 0.5], [3.2, 0]],+ ParamCheek: [[0, 0], [0.8, 1], [2.7, 1], [3.2, 0]],+ ParamBrowAngle: [[0, 0], [0.5, -0.6], [2.7, -0.5], [3.2, 0]],+ ParamMouthForm: [[0, 0], [0.5, -0.4], [3.2, 0]],+ ParamHandAngle: [[0, 0], [0.8, 4], [2.6, 4], [3.2, 0]],+ },+ },+ no: {+ label: 'いやいや', dur: 1.9,+ tracks: {+ ParamAngleX: [[0, 0], [0.2, 13], [0.45, -13], [0.7, 12], [0.95, -10], [1.2, 5], [1.5, 0]],+ ParamAngleY: [[0, 0], [0.2, -3], [1.3, -3], [1.9, 0]],+ ParamBodyAngleX: [[0, 0], [0.3, 1.5], [0.6, -1.5], [0.9, 1], [1.3, 0]],+ eyeOpen: [[0, 1], [0.15, 0], [1.4, 0], [1.9, 1]],+ ParamEyeSmile: [[0, 0], [0.15, 1], [1.4, 1], [1.9, 0]],+ // closed mouth while shaking the head+ ParamBrowAngle: [[0, 0], [0.2, -0.5], [1.4, -0.5], [1.9, 0]],+ },+ },+ wink: {+ label: 'ウインク', dur: 2.0,+ tracks: {+ ParamAngleZ: [[0, 0], [0.35, -13], [1.5, -12], [2.0, 0]],+ ParamAngleX: [[0, 0], [0.35, 9], [1.5, 8], [2.0, 0]],+ ParamBodyAngleZ: [[0, 0], [0.5, -2], [1.5, -2], [2.0, 0]],+ eyeOpenL: [[0, 1], [0.25, 1], [0.4, 0], [1.4, 0], [1.6, 1]],+ eyeSmileL: [[0, 0], [0.3, 1], [1.5, 1], [1.7, 0]],+ ParamMouthOpenY: [[0, 0], [2.0, 0]], // wink with a closed smile+ ParamMouthForm: [[0, 0], [0.35, -0.8], [2.0, 0]],+ ParamCheek: [[0, 0], [0.4, 0.5], [1.6, 0.5], [2.0, 0]],+ },+ },+ greet: {+ label: 'ごあいさつ', dur: 2.6,+ tracks: {+ ParamAngleY: [[0, 0], [0.7, -18], [1.2, -17], [1.9, 2], [2.6, 0]],+ ParamBodyAngleX: [[0, 0], [0.8, 2], [1.8, 0]],+ ParamBodyAngleZ: [[0, 0], [0.8, 1.5], [2.0, 0]],+ ParamArmAngle: [[0, 0], [0.8, 3], [2.0, 0]],+ eyeOpen: [[0, 1], [0.5, 0], [1.4, 0], [1.8, 1]],+ ParamEyeSmile: [[0, 0], [0.5, 1], [1.6, 1], [2.3, 0.4], [2.6, 0]],+ ParamMouthOpenY: [[0, 0], [1.6, 0], [1.8, 0.3], [2.3, 0.2], [2.6, 0]],+ ParamMouthForm: [[0, 0], [1.6, -0.8], [2.6, -0.3]],+ ParamCheek: [[0, 0], [1.6, 0.3], [2.6, 0]],+ },+ },+};++// Idle motions: every one moves several parameters at once (breath, head, body, arm,+// gaze, lids, brows) so the whole figure takes part, like a Live2D idle.+// Eyes only go down to ~0.55 open and the mouth stays shut (a single image fakes those worst).+// ParamBreath tracks replace the automatic breathing while the motion plays.+export const IDLE_MOTIONS = {+ lookAround: {+ label: 'きょろきょろ', dur: 5.2, idle: true,+ tracks: {+ ParamEyeBallX: [[0, 0], [0.25, -0.85], [1.5, -0.8], [1.8, 0.1], [2.1, 0.85], [3.4, 0.8], [3.7, 0], [5.2, 0]],+ ParamEyeBallY: [[0, 0], [0.25, 0.15], [1.8, 0.25], [2.1, 0.1], [3.7, 0], [5.2, 0]],+ ParamAngleX: [[0, 0], [0.7, -20], [1.6, -18], [2.5, 19], [3.5, 17], [4.4, 0], [5.2, 0]],+ ParamAngleY: [[0, 0], [0.7, 3], [1.8, 5], [2.5, 3], [4.4, 0]],+ ParamAngleZ: [[0, 0], [0.8, 4], [1.8, 0], [2.6, -4], [4.4, 0]],+ ParamBodyAngleX: [[0, 0], [1.0, -4], [2.8, 4], [4.6, 0]],+ ParamBodyAngleZ: [[0, 0], [1.0, 1.5], [2.8, -1.5], [4.6, 0]],+ ParamHandAngle: [[0, 0], [1.0, -2], [2.8, 2], [4.6, 0]],+ ParamBrowY: [[0, 0], [0.5, 0.35], [3.6, 0.3], [4.4, 0]],+ // curious: a quick inhale, held while looking, let out at the end+ ParamBreath: [[0, 0.2], [0.6, 0.85], [3.6, 0.7], [4.6, 0], [5.2, 0.1]],+ },+ },+ glance: {+ label: 'ふと横を見る', dur: 4.6, idle: true,+ tracks: {+ ParamEyeBallX: [[0, 0], [0.18, 0.9], [2.6, 0.85], [2.9, 0.15], [3.2, 0], [4.6, 0]],+ ParamEyeBallY: [[0, 0], [0.18, 0.4], [2.6, 0.35], [3.2, 0]],+ ParamAngleX: [[0, 0], [0.6, 13], [2.6, 11], [3.6, 0]],+ ParamAngleY: [[0, 0], [0.6, 6], [2.6, 5], [3.6, 0]],+ ParamAngleZ: [[0, 0], [0.7, -5], [2.6, -4], [3.6, 0]],+ ParamBodyAngleX: [[0, 0], [1.0, 2.5], [2.8, 2], [4.0, 0]],+ eyeOpen: [[0, 1], [0.3, 1.06], [2.5, 1.05], [2.8, 0.85], [3.4, 1]],+ ParamBrowY: [[0, 0], [0.4, 0.4], [2.5, 0.35], [3.4, 0]],+ ParamBrowAngle: [[0, 0], [0.4, -0.2], [2.5, -0.2], [3.4, 0]],+ ParamBreath: [[0, 0], [0.5, 0.6], [2.6, 0.55], [3.8, 0], [4.6, 0.3]],+ },+ },+ sway: {+ label: 'ゆらゆら', dur: 7.0, idle: true,+ tracks: {+ ParamBodyAngleZ: [[0, 0], [1.6, 6], [3.4, -6], [5.2, 5], [7.0, 0]],+ ParamBodyAngleX: [[0, 0], [1.6, 3], [3.4, -3], [5.2, 2.5], [7.0, 0]],+ ParamAngleZ: [[0, 0], [1.8, -10], [3.6, 10], [5.4, -8], [7.0, 0]],+ ParamAngleX: [[0, 0], [1.8, 6], [3.6, -6], [5.4, 5], [7.0, 0]],+ ParamAngleY: [[0, 0], [0.9, 3], [1.8, 0], [2.7, 3], [3.6, 0], [4.5, 3], [5.4, 0], [7.0, 0]],+ ParamArmAngle: [[0, 0], [1.6, 3], [3.4, -3], [5.2, 2], [7.0, 0]],+ ParamHandAngle: [[0, 0], [1.8, -4], [3.6, 4], [5.4, -3], [7.0, 0]],+ ParamEyeBallX: [[0, 0], [1.8, -0.3], [3.6, 0.3], [5.4, -0.2], [7.0, 0]],+ eyeOpen: [[0, 1], [0.8, 0.82], [6.2, 0.82], [7.0, 1]],+ ParamEyeSmile: [[0, 0], [0.8, 0.35], [6.2, 0.35], [7.0, 0]],+ // slow, even breaths in time with the sway+ ParamBreath: [[0, 0], [0.9, 1], [1.8, 0], [2.7, 1], [3.6, 0], [4.5, 1], [5.4, 0], [6.3, 0.8], [7.0, 0]],+ },+ },+ sigh: {+ label: 'ひと息', dur: 5.6, idle: true,+ tracks: {+ ParamBreath: [[0, 0], [1.3, 1.25], [1.9, 1.25], [3.6, 0], [5.6, 0]],+ ParamAngleY: [[0, 0], [1.3, 9], [1.9, 9], [3.3, -9], [4.6, -6], [5.6, 0]],+ ParamAngleZ: [[0, 0], [1.3, -3], [3.3, 5], [5.6, 0]],+ ParamBodyAngleX: [[0, 0], [1.3, -2.5], [3.3, 2.5], [5.6, 0]],+ ParamBodyAngleZ: [[0, 0], [1.9, 1], [3.3, -1.5], [5.6, 0]],+ ParamArmAngle: [[0, 0], [1.3, -2.5], [3.3, 2], [5.6, 0]],+ ParamEyeBallY: [[0, 0], [1.2, 0.4], [2.0, 0.3], [3.2, -0.4], [4.8, -0.2], [5.6, 0]],+ eyeOpen: [[0, 1], [1.0, 0.95], [1.9, 0.6], [3.4, 0.6], [4.6, 0.78], [5.6, 1]],+ ParamBrowY: [[0, 0], [1.3, 0.35], [3.2, -0.2], [5.6, 0]],+ ParamBrowAngle: [[0, 0], [1.9, -0.4], [4.6, -0.35], [5.6, 0]],+ },+ },+ doze: {+ label: 'うとうと', dur: 7.2, idle: true,+ tracks: {+ eyeOpen: [[0, 1], [1.8, 0.78], [3.2, 0.62], [4.5, 0.55], [4.75, 1.1], [5.6, 1.05], [7.2, 1]],+ ParamAngleY: [[0, 0], [1.8, -6], [3.2, -9], [4.5, -17], [4.75, 5], [5.6, 2], [7.2, 0]],+ ParamAngleZ: [[0, 0], [2.0, 4], [4.5, 10], [4.75, -2], [7.2, 0]],+ ParamAngleX: [[0, 0], [4.5, -4], [4.75, 3], [5.4, -6], [6.2, 5], [7.2, 0]],+ ParamBodyAngleZ: [[0, 0], [4.5, 3], [4.8, -2], [7.2, 0]],+ ParamBodyAngleX: [[0, 0], [4.5, 2], [4.8, -1.5], [7.2, 0]],+ ParamArmAngle: [[0, 0], [4.5, 3], [4.8, -2], [7.2, 0]],+ ParamHandAngle: [[0, 0], [4.5, 5], [4.8, -1], [7.2, 0]],+ ParamEyeBallY: [[0, 0], [4.5, -0.4], [4.75, 0.2], [7.2, 0]],+ ParamEyeBallX: [[0, 0], [4.8, 0], [5.3, -0.6], [6.1, 0.6], [6.8, 0]],+ ParamBrowY: [[0, 0], [4.5, -0.35], [4.75, 0.8], [5.8, 0.3], [7.2, 0]],+ // long, slow, deepening breaths; a sharp inhale on waking+ ParamBreath: [[0, 0], [1.1, 0.7], [2.6, 0], [3.8, 0.6], [4.5, 0.2], [4.8, 1.1], [6.0, 0.2], [7.2, 0]],+ },+ },+ stretch: {+ label: '首をのばす', dur: 6.2, idle: true,+ tracks: {+ ParamAngleZ: [[0, 0], [1.3, -22], [2.3, -21], [3.8, 20], [4.8, 19], [6.2, 0]],+ ParamAngleY: [[0, 0], [1.3, 5], [2.3, 7], [3.1, -3], [3.8, 5], [4.8, 6], [6.2, 0]],+ ParamAngleX: [[0, 0], [1.3, -5], [3.8, 5], [6.2, 0]],+ ParamBodyAngleZ: [[0, 0], [1.3, 4], [3.8, -4], [6.2, 0]],+ ParamBodyAngleX: [[0, 0], [1.3, -2], [3.8, 2], [6.2, 0]],+ ParamArmAngle: [[0, 0], [1.3, 2], [3.8, -2], [6.2, 0]],+ eyeOpen: [[0, 1], [0.8, 0.62], [4.9, 0.62], [5.6, 1]],+ ParamBrowAngle: [[0, 0], [1.0, -0.3], [4.9, -0.3], [5.8, 0]],+ ParamBreath: [[0, 0], [1.3, 1.1], [2.3, 0.9], [3.1, 0.2], [3.8, 1.1], [4.8, 0.9], [6.2, 0]],+ },+ },+ lean: {+ label: 'のぞきこむ', dur: 4.8, idle: true,+ tracks: {+ ParamBodyAngleX: [[0, 0], [0.9, 6], [3.4, 6], [4.4, 0]],+ ParamBodyAngleZ: [[0, 0], [0.9, -3], [3.4, -3], [4.4, 0]],+ ParamAngleX: [[0, 0], [0.9, 9], [2.0, 7], [2.6, 10], [3.4, 8], [4.4, 0]],+ ParamAngleY: [[0, 0], [0.9, -6], [3.4, -5], [4.4, 0]],+ ParamAngleZ: [[0, 0], [0.9, 10], [2.2, 12], [3.4, 9], [4.4, 0]],+ ParamArmAngle: [[0, 0], [0.9, -3], [3.4, -3], [4.4, 0]],+ ParamHandAngle: [[0, 0], [0.9, 3], [3.4, 3], [4.4, 0]],+ ParamEyeBallY: [[0, 0], [0.6, 0.45], [3.4, 0.4], [4.2, 0]],+ ParamEyeBallX: [[0, 0], [1.5, 0], [1.8, -0.3], [2.3, 0.2], [2.8, 0], [4.2, 0]],+ eyeOpen: [[0, 1], [0.6, 1.1], [3.4, 1.08], [4.2, 1]],+ ParamBrowY: [[0, 0], [0.6, 0.45], [3.4, 0.4], [4.2, 0]],+ ParamBrowAngle: [[0, 0], [0.6, -0.3], [3.4, -0.3], [4.2, 0]],+ ParamCheek: [[0, 0], [1.2, 0.25], [3.4, 0.25], [4.4, 0]],+ ParamBreath: [[0, 0], [0.8, 0.8], [3.4, 0.6], [4.4, 0], [4.8, 0.2]],+ },+ },+ hum: {+ label: 'ふんふん', dur: 5.6, idle: true,+ tracks: {+ ParamAngleY: [[0, 0], [0.45, -5], [0.9, 2], [1.35, -5], [1.8, 2], [2.25, -5], [2.7, 2], [3.15, -5], [3.6, 2], [4.05, -4], [4.8, 0]],+ ParamAngleZ: [[0, 0], [0.9, 8], [1.8, -8], [2.7, 8], [3.6, -8], [4.6, 0]],+ ParamAngleX: [[0, 0], [0.9, 4], [1.8, -4], [2.7, 4], [3.6, -4], [4.6, 0]],+ ParamBodyAngleZ: [[0, 0], [0.9, -3], [1.8, 3], [2.7, -3], [3.6, 3], [4.6, 0]],+ ParamBodyAngleX: [[0, 0], [1.8, 2], [3.6, -2], [4.8, 0]],+ ParamHandAngle: [[0, 0], [0.9, 3], [1.8, -3], [2.7, 3], [3.6, -3], [4.6, 0]],+ ParamFingerTap: [[0, 0], [0.45, 1], [0.9, 0], [1.35, 1], [1.8, 0], [2.25, 1], [2.7, 0], [3.15, 1], [3.6, 0], [5.6, 0]],+ ParamEyeBallX: [[0, 0], [0.9, 0.3], [1.8, -0.3], [2.7, 0.3], [3.6, -0.3], [4.6, 0]],+ eyeOpen: [[0, 1], [0.4, 0.72], [4.6, 0.72], [5.3, 1]],+ ParamEyeSmile: [[0, 0], [0.4, 0.55], [4.6, 0.55], [5.3, 0]],+ ParamCheek: [[0, 0], [0.8, 0.3], [4.6, 0.3], [5.6, 0]],+ ParamBrowY: [[0, 0], [0.5, 0.25], [4.6, 0.25], [5.4, 0]],+ ParamBreath: [[0, 0], [0.9, 0.9], [1.8, 0.2], [2.7, 0.9], [3.6, 0.2], [4.6, 0.8], [5.6, 0]],+ },+ },+ tap: {+ label: 'とんとん', dur: 5.0, idle: true,+ tracks: {+ ParamEyeBallX: [[0, 0], [0.3, -0.6], [2.2, -0.5], [2.5, -0.1], [2.8, -0.6], [4.2, -0.5], [4.7, 0]],+ ParamEyeBallY: [[0, 0], [0.3, 0.55], [4.2, 0.5], [4.7, 0]],+ ParamAngleX: [[0, 0], [0.8, -11], [2.4, -9], [3.0, -12], [4.2, -10], [5.0, 0]],+ ParamAngleY: [[0, 0], [0.8, 8], [4.2, 7], [5.0, 0]],+ ParamAngleZ: [[0, 0], [0.8, 6], [2.4, 4], [3.0, 7], [4.2, 5], [5.0, 0]],+ ParamBodyAngleX: [[0, 0], [1.0, -2], [4.2, -2], [5.0, 0]],+ ParamHandAngle: [[0, 0], [0.8, 3], [4.2, 3], [5.0, 0]],+ ParamFingerTap: [[0, 0], [0.9, 0], [1.05, 1], [1.2, 0], [1.4, 1], [1.55, 0], [1.75, 1], [1.9, 0],+ [2.6, 0], [2.75, 1], [2.9, 0], [3.1, 1], [3.25, 0], [5.0, 0]],+ ParamBrowY: [[0, 0], [0.6, 0.3], [4.2, 0.25], [5.0, 0]],+ ParamBrowAngle: [[0, 0], [0.6, -0.35], [4.2, -0.3], [5.0, 0]],+ eyeOpen: [[0, 1], [0.6, 0.9], [4.2, 0.9], [5.0, 1]],+ ParamBreath: [[0, 0], [0.8, 0.7], [2.2, 0.4], [3.2, 0.8], [4.4, 0], [5.0, 0.2]],+ },+ },+ readNote: {+ label: '原稿を見る', dur: 2.6, idle: true,+ tracks: {+ // a quick look down at the notes on the desk and back to the camera+ ParamEyeBallY: [[0, 0], [0.2, -0.85], [1.5, -0.8], [1.75, 0], [2.6, 0]],+ ParamEyeBallX: [[0, 0], [0.2, -0.15], [1.5, -0.1], [1.75, 0]],+ ParamAngleY: [[0, 0], [0.45, -9], [1.5, -8], [2.0, 1], [2.6, 0]],+ ParamAngleZ: [[0, 0], [0.5, 2], [1.6, 2], [2.6, 0]],+ eyeOpen: [[0, 1], [0.3, 0.78], [1.5, 0.78], [1.75, 1]],+ ParamBreath: [[0, 0.3], [0.8, 0.5], [1.8, 0.2], [2.6, 0.4]],+ },+ },+ waiting: {+ label: 'そわそわ', dur: 6.4, idle: true,+ tracks: {+ // shifts her weight, checks the viewer, looks away, shifts back+ ParamBodyAngleZ: [[0, 0], [0.9, 5], [2.4, 4], [3.3, -5], [5.2, -4], [6.4, 0]],+ ParamBodyAngleX: [[0, 0], [0.9, 3], [3.3, -3], [5.2, -2], [6.4, 0]],+ ParamAngleZ: [[0, 0], [1.0, -6], [2.4, -4], [3.4, 6], [5.2, 5], [6.4, 0]],+ ParamAngleX: [[0, 0], [1.2, -8], [2.2, 2], [3.6, 12], [5.0, 10], [6.2, 0]],+ ParamAngleY: [[0, 0], [1.2, -3], [2.2, 2], [3.6, -2], [6.2, 0]],+ ParamArmAngle: [[0, 0], [0.9, 3], [3.3, -3], [5.2, -2], [6.4, 0]],+ ParamHandAngle: [[0, 0], [1.2, 3], [3.4, -3], [6.4, 0]],+ ParamFingerTap: [[0, 0], [4.2, 0], [4.35, 1], [4.5, 0], [4.7, 1], [4.85, 0], [6.4, 0]],+ ParamEyeBallX: [[0, 0], [0.9, -0.7], [1.9, -0.6], [2.1, 0], [2.7, 0], [2.9, 0.8], [5.0, 0.7], [5.4, 0], [6.4, 0]],+ ParamEyeBallY: [[0, 0], [0.9, -0.2], [2.1, 0], [2.9, 0.3], [5.4, 0]],+ eyeOpen: [[0, 1], [2.0, 1], [2.2, 1.06], [2.8, 1.05], [3.1, 0.85], [5.4, 0.85], [6.2, 1]],+ ParamBrowAngle: [[0, 0], [0.9, -0.35], [2.0, -0.35], [2.3, 0], [3.1, -0.4], [5.4, -0.35], [6.4, 0]],+ ParamBrowY: [[0, 0], [2.2, 0.4], [2.8, 0.35], [3.2, 0], [6.4, 0]],+ ParamBreath: [[0, 0.3], [0.9, 0.8], [2.0, 0.3], [2.6, 0.9], [3.4, 0.2], [4.4, 0.8], [5.6, 0], [6.4, 0.2]],+ },+ },+ spaceOut: {+ label: 'ぼんやり', dur: 7.4, idle: true,+ tracks: {+ // gaze drifts up and away, breaths get slow and long, one slow blink+ ParamEyeBallX: [[0, 0], [1.4, -0.55], [4.8, -0.6], [5.6, 0.1], [7.0, 0]],+ ParamEyeBallY: [[0, 0], [1.4, 0.6], [4.8, 0.55], [5.6, 0], [7.0, 0]],+ ParamAngleX: [[0, 0], [2.0, -9], [4.8, -10], [6.0, 2], [7.4, 0]],+ ParamAngleY: [[0, 0], [2.0, 7], [4.8, 8], [6.0, -2], [7.4, 0]],+ ParamAngleZ: [[0, 0], [2.0, 9], [4.8, 11], [6.0, 2], [7.4, 0]],+ ParamBodyAngleZ: [[0, 0], [2.2, 3], [4.8, 3.5], [6.4, 0]],+ ParamBodyAngleX: [[0, 0], [2.2, -2], [4.8, -2], [6.4, 0]],+ ParamHandAngle: [[0, 0], [2.2, 4], [4.8, 5], [6.4, 0]],+ ParamArmAngle: [[0, 0], [2.2, 2], [4.8, 2], [6.4, 0]],+ eyeOpen: [[0, 1], [1.4, 0.8], [3.0, 0.8], [3.35, 0.56], [3.8, 0.8], [4.8, 0.8], [5.6, 1.04], [6.4, 1]],+ ParamBrowY: [[0, 0], [1.6, 0.15], [4.8, 0.15], [5.6, 0.35], [6.6, 0]],+ ParamBreath: [[0, 0], [1.6, 0.9], [3.4, 0], [5.0, 0.9], [6.2, 0.1], [7.4, 0]],+ },+ },+};++// Cubic Hermite through the keys (tangents from neighbours, flat at both ends).+export function sampleTrack(keys, t) {+ if (t <= keys[0][0]) return keys[0][1];+ const n = keys.length - 1;+ if (t >= keys[n][0]) return keys[n][1];+ let i = 0;+ while (t > keys[i + 1][0]) i++;+ const [t0, v0] = keys[i], [t1, v1] = keys[i + 1];+ const tan = j => (j <= 0 || j >= n) ? 0 : (keys[j + 1][1] - keys[j - 1][1]) / (keys[j + 1][0] - keys[j - 1][0]);+ const h = t1 - t0, u = (t - t0) / h;+ const m0 = tan(i) * h, m1 = tan(i + 1) * h;+ const u2 = u * u, u3 = u2 * u;+ return (2 * u3 - 3 * u2 + 1) * v0 + (u3 - 2 * u2 + u) * m0 + (-2 * u3 + 3 * u2) * v1 + (u3 - u2) * m1;+}diff --git a/reference/engine/physics.js b/reference/engine/physics.jsnew file mode 100644index 0000000..147fa32--- /dev/null+++ b/reference/engine/physics.js@@ -0,0 +1,171 @@+// Secondary motion: spring chains for hair strands, spring-mass points for the buns+// and 2-segment verlet chains for tassels.+import { applyHead, applyBody, TASSELS, STRANDS, tasselAnchor } from './rig.js';++// Strand chain tuning: stiffness per node (root .. tip), how much of the parent's lag each+// node inherits (this is what makes a swing travel down the strand), and damping.+const STRAND_K = [0, 300, 200, 140], STRAND_COUPLE = 0.9, STRAND_DAMP = 7;++// Overall hair feel, tuned against measured runs (see README). Once motions made the head+// move ~4x faster, the chains whipped and neighbouring strands split apart by up to 16px,+// which smeared the hair between them.+// stiff / damp / couple: scale the chain springs, damping and the root-to-tip lag+// reach: soft limit of the tip offset, as a share of each strand's `max`+// bind: smoothing passes across the fringe strands (more = moves more as one sheet)+export const HAIR_TUNE = { stiff: 1.7, damp: 1.6, couple: 0.85, reach: 0.9, bind: 4 };+const FRINGE = 6;++// Tassel pendulum: swing frequency (Hz), damping ratio, how much head tilt it counters,+// how strongly knot acceleration pushes it, gentle wind (rad), limit (rad), accel smoothing (1/s)+export const TASSEL_TUNE = { freq: 0.7, zeta: 0.22, hang: 0.85, inertia: 0.32, wind: 0.03, max: 0.55, smooth: 6 };+const rotV = (v, a) => [v[0] * Math.cos(a) - v[1] * Math.sin(a), v[0] * Math.sin(a) + v[1] * Math.cos(a)]; // STRANDS[0..5] are the fringe, 6 and 7 the side locks+const softLimit = (v, m) => { const l = Math.hypot(v[0], v[1]); if (l < 1e-6) return v; const k = m * Math.tanh(l / m) / l; return [v[0] * k, v[1] * k]; };++const HAIR = {+ bunL: { at: [262, 250], k: 260, c: 11, hang: 3, max: 4 },+ bunR: { at: [820, 110], k: 260, c: 11, hang: 3, max: 4 },+};++const clampLen = (v, m) => { const l = Math.hypot(v[0], v[1]); if (l > m) { v[0] *= m / l; v[1] *= m / l; } };++export class Physics {+ constructor() {+ this.gain = 1; // "揺れやすさ"+ this.out = { gain: 1 };+ this.hair = {};+ for (const k of Object.keys(HAIR)) {+ this.hair[k] = { p: null, v: [0, 0] };+ this.out[k] = [0, 0];+ }+ this.strands = STRANDS.map(() => ({ p: null, v: [[0, 0], [0, 0], [0, 0], [0, 0]] }));+ this.out.strands = STRANDS.map(() => [[0, 0], [0, 0], [0, 0], [0, 0]]);+ this.chains = TASSELS.map(t => {+ const dx = t.tip[0] - t.pivot[0], dy = t.tip[1] - t.pivot[1], L = Math.hypot(dx, dy);+ const dir = [dx / L, dy / L];+ return { t, dir, L1: L * t.split, L2: L * (1 - t.split), pts: null, prev: null, phi: [0, 0], anchor: [0, 0] };+ });+ this.time = 0;+ }++ hairAnchor(at, P) {+ const p = [at[0], at[1]];+ applyHead(p, 1, P);+ applyBody(p, at[1], P);+ return p;+ }++ step(P, dt) {+ const sub = Math.max(1, Math.ceil(dt / (1 / 240)));+ const h = Math.min(dt, 0.05) / sub;+ const roll = -P.ParamAngleZ / 30 * 9 * Math.PI / 180 - P.ParamBodyAngleZ / 10 * 3 * Math.PI / 180;+ const g = this.gain;+ const noSway = { gain: 0, bunL: [0, 0], bunR: [0, 0] };++ STRANDS.forEach((cfg, si) => {+ const st = this.strands[si], out = this.out.strands[si];+ const target = cfg.nodes.map(n => this.hairAnchor(n, P));+ if (!st.p) st.p = target.map(t => [...t]);+ const phase = si * 1.7;+ for (let i = 0; i < sub; i++) {+ const t = this.time + i * h;+ for (let j = 1; j < 4; j++) {+ // hanging hair stays vertical when the head rolls (grows with distance from the root)+ const hang = Math.hypot(cfg.nodes[j][0] - cfg.nodes[0][0], cfg.nodes[j][1] - cfg.nodes[0][1]);+ // mostly one shared breeze, with a little per-strand flutter+ const wind = (Math.sin(t * 1.3) * 0.5 + Math.sin(t * 3.1) * 0.3 + Math.sin(t * 4.7 + phase) * 0.2) * cfg.max * 0.1 * j / 3;+ const parent = [st.p[j - 1][0] - target[j - 1][0], st.p[j - 1][1] - target[j - 1][1]];+ const tx = target[j][0] + parent[0] * STRAND_COUPLE * HAIR_TUNE.couple - Math.sin(roll) * hang * 0.12 + wind;+ const ty = target[j][1] + parent[1] * STRAND_COUPLE * HAIR_TUNE.couple;+ const k = STRAND_K[j] * cfg.k * HAIR_TUNE.stiff / Math.max(0.35, g), c = STRAND_DAMP * HAIR_TUNE.damp * Math.sqrt(HAIR_TUNE.stiff) / Math.max(0.5, Math.sqrt(g));+ const v = st.v[j], q = st.p[j];+ v[0] += (k * (tx - q[0]) - c * v[0]) * h;+ v[1] += (k * (ty - q[1]) - c * v[1]) * h;+ q[0] += v[0] * h; q[1] += v[1] * h;+ }+ st.p[0] = [...target[0]];+ }+ for (let j = 0; j < 4; j++) {+ const o = [st.p[j][0] - target[j][0], st.p[j][1] - target[j][1]];+ out[j] = softLimit(o, Math.max(0.5, cfg.max * HAIR_TUNE.reach * Math.max(1, g) * j / 3));+ }+ });++ for (const [k, cfg] of Object.entries(HAIR)) {+ const s = this.hair[k];+ const a = this.hairAnchor(cfg.at, P);+ // hanging hair keeps pointing down when the head rolls; plus a light breeze+ const wind = Math.sin(this.time * 1.3 + cfg.at[0] * 0.01) * 0.6 + Math.sin(this.time * 2.9 + cfg.at[1] * 0.02) * 0.4;+ const tx = a[0] - Math.sin(roll) * cfg.hang + wind * cfg.max * 0.12;+ const ty = a[1];+ if (!s.p) s.p = [tx, ty];+ const k2 = cfg.k / Math.max(0.35, g), c2 = cfg.c / Math.max(0.5, Math.sqrt(g));+ for (let i = 0; i < sub; i++) {+ s.v[0] += (k2 * (tx - s.p[0]) - c2 * s.v[0]) * h;+ s.v[1] += (k2 * (ty - s.p[1]) - c2 * s.v[1]) * h;+ s.p[0] += s.v[0] * h; s.p[1] += s.v[1] * h;+ }+ const o = [s.p[0] - a[0], s.p[1] - a[1]];+ clampLen(o, cfg.max * Math.max(1, g));+ this.out[k] = o;+ }+ this.out.gain = 1;++ // pull each fringe strand towards the average of its neighbours so the fringe moves+ // as one sheet with a little variation, instead of strands splitting apart+ const O = this.out.strands;+ for (let pass = 0; pass < HAIR_TUNE.bind; pass++) for (let j = 1; j < 4; j++) {+ const snap = O.slice(0, FRINGE).map(o => [...o[j]]);+ for (let i = 0; i < FRINGE; i++) {+ const l = snap[Math.max(0, i - 1)], r = snap[Math.min(FRINGE - 1, i + 1)];+ for (const a of [0, 1]) O[i][j][a] = snap[i][a] * 0.5 + (l[a] + r[a]) * 0.25;+ }+ }++ // Tassels: a two-joint angular pendulum. The old verlet chain was pulled back to its+ // drawn shape every substep, which made it buzz (~10 direction changes/s, 1deg swing).+ // Here each joint is a slow damped spring (~0.7 Hz) driven by the smoothed acceleration+ // of the knot, so it swings in long arcs and lags behind the head like the hair does.+ for (const ch of this.chains) {+ const A = tasselAnchor(ch.t, P, this.out, [0, 0]);+ if (!ch.st) ch.st = { th: [0, 0], w: [0, 0], pos: [...A], vel: [0, 0], acc: [0, 0] };+ const st = ch.st, T = TASSEL_TUNE;+ // knot velocity / acceleration, low-passed so spring overshoot of the head doesn't jitter it+ const vel = [(A[0] - st.pos[0]) / Math.max(dt, 1e-3), (A[1] - st.pos[1]) / Math.max(dt, 1e-3)];+ const kf = 1 - Math.exp(-dt * T.smooth);+ const acc = [(vel[0] - st.vel[0]) / Math.max(dt, 1e-3), (vel[1] - st.vel[1]) / Math.max(dt, 1e-3)];+ st.acc = [st.acc[0] + (acc[0] - st.acc[0]) * kf, st.acc[1] + (acc[1] - st.acc[1]) * kf];+ st.vel = [st.vel[0] + (vel[0] - st.vel[0]) * kf, st.vel[1] + (vel[1] - st.vel[1]) * kf];+ st.pos = [...A];+ // perpendicular to the hanging direction: pushes the pendulum sideways+ const nrm = [-ch.dir[1], ch.dir[0]];+ const push = -(st.acc[0] * nrm[0] + st.acc[1] * nrm[1]) / (ch.L1 + ch.L2) * T.inertia;+ const wind = (Math.sin(this.time * 0.9 + ch.t.pivot[0]) * 0.6 + Math.sin(this.time * 0.37 + ch.t.pivot[1]) * 0.4) * T.wind;+ const target = -roll * T.hang + wind; // keeps hanging down when the head tilts+ const w1 = 2 * Math.PI * T.freq / Math.sqrt(Math.max(0.4, g)), w2 = w1 * 1.35;+ for (let i = 0; i < sub; i++) {+ const a1 = -w1 * w1 * (st.th[0] - target) - 2 * T.zeta * w1 * st.w[0] + push;+ st.w[0] += a1 * h; st.th[0] += st.w[0] * h;+ // the lower half follows the upper one with its own lag (a soft whip at the tip)+ const a2 = -w2 * w2 * (st.th[1] - st.th[0]) - 2 * T.zeta * w2 * st.w[1] + push * 0.4 + a1 * 0.5;+ st.w[1] += a2 * h; st.th[1] += st.w[1] * h;+ }+ st.th[0] = Math.max(-T.max, Math.min(T.max, st.th[0]));+ st.th[1] = Math.max(-T.max * 1.4, Math.min(T.max * 1.4, st.th[1]));+ ch.phi = [st.th[0], st.th[1]];+ // joint positions for skinning and the debug overlay+ const d1 = rotV(ch.dir, st.th[0]), d2 = rotV(ch.dir, st.th[1]);+ const p1 = [A[0] + d1[0] * ch.L1, A[1] + d1[1] * ch.L1];+ ch.pts = [[...A], p1, [p1[0] + d2[0] * ch.L2, p1[1] + d2[1] * ch.L2]];+ ch.anchor = A;+ }+ this.time += dt;+ return this.out;+ }+}++function norm(v) { const l = Math.hypot(v[0], v[1]) || 1; return [v[0] / l, v[1] / l]; }+function clampA(a, m) {+ while (a > Math.PI) a -= 2 * Math.PI;+ while (a < -Math.PI) a += 2 * Math.PI;+ return Math.max(-m, Math.min(m, a));+}diff --git a/reference/engine/renderer.js b/reference/engine/renderer.jsnew file mode 100644index 0000000..36cb4b2--- /dev/null+++ b/reference/engine/renderer.js@@ -0,0 +1,340 @@+// WebGL2 renderer: textured grid meshes whose vertices are deformed on the CPU,+// plus a fragment-shader pass for eyelids, eye balls, mouth and blush on the base layer.+import { IMG, EYES, MOUTH, CHEEKS } from './rig.js';++const VS = `#version 300 es+in vec2 aPos; in vec2 aUv;+uniform vec2 uScale; uniform vec2 uOffset;+out vec2 vUv;+void main() { vUv = aUv; gl_Position = vec4(aPos * uScale + uOffset, 0.0, 1.0); }`;++const FS = `#version 300 es+precision highp float;+in vec2 vUv; out vec4 outColor;+uniform sampler2D uTex;+uniform vec4 uRect; // layer rect in source px+uniform int uFace;+uniform float uAlpha;+uniform vec4 uEyeBox[2]; // x0, x1, -, -+uniform float uEyeTop[48]; // 2 eyes x EYE_N samples+uniform float uEyeBot[48];+uniform vec4 uEyeState[2]; // open, smile, ballX(px), ballY(px)+uniform vec4 uMouth; // cx, cy, angle, halfLen+uniform vec4 uMouthState; // open, form, bow, -+uniform vec4 uCheeks; // x0, y0, x1, y1+uniform float uCheek;++const int EYE_N = 24;+float crv(int e, bool top, float u) {+ float f = clamp(u, 0.0, 1.0) * float(EYE_N - 1);+ int i = min(int(floor(f)), EYE_N - 2);+ float t = f - float(i);+ int k = e * EYE_N + i;+ return top ? mix(uEyeTop[k], uEyeTop[k + 1], t) : mix(uEyeBot[k], uEyeBot[k + 1], t);+}++// Upper lid line and lower lid line of eye e at column u, for the current open/smile state.+// Must match eyeLids() in rig.js, which moves the lash meshes to the same lines.+// Must match eyeLidsRaw() / eyeLids() in rig.js.+vec2 eyeLidsRaw(int e, float u) {+ u = clamp(u, 0.0, 1.0);+ vec4 st = uEyeState[e];+ float top = crv(e, true, u), bot = crv(e, false, u);+ float b = 1.0 - st.x, smile = st.y, hump = 4.0 * u * (1.0 - u);+ float H = crv(e, false, 0.5) - crv(e, true, 0.5);+ float arc = mix(uEyeTop[e * EYE_N], uEyeTop[e * EYE_N + EYE_N - 1], u) - 0.3 * H * hump;+ float closed = max(top, bot + 1.0 + (arc - bot - 1.0) * smile);+ return vec2((closed - top) * max(b, -0.07), b > 0.0 ? (closed - bot) * b * smile : 0.0);+}++vec2 eyeLids(int e, float u, float top, float bot) {+ vec4 box = uEyeBox[e];+ float du = 5.0 / (box.y - box.x);+ vec2 raw = eyeLidsRaw(e, u);+ vec2 d = (eyeLidsRaw(e, u - 2.0 * du) + 2.0 * eyeLidsRaw(e, u - du) + 3.0 * raw+ + 2.0 * eyeLidsRaw(e, u + du) + eyeLidsRaw(e, u + 2.0 * du)) / 9.0;+ // for hiding the ball take whichever closes more: the smoothed lash can sit a little+ // above the raw lid near the corners, and the gap must show lid skin, not eye white+ return vec2(top + max(d.x, raw.x), bot + min(d.y, raw.y));+}++vec4 texAt(vec2 p) { return texture(uTex, (p - uRect.xy) / uRect.zw); }++// Eye white + iris layer: shown only between the lids (the lids cover it, it never squashes);+// the iris slides inside the opening for the gaze.+vec4 eyeBall(int e, vec2 p) {+ vec4 box = uEyeBox[e]; vec4 st = uEyeState[e];+ float u = clamp((p.x - box.x) / (box.y - box.x), 0.0, 1.0);+ float top = crv(e, true, u), bot = crv(e, false, u);+ vec2 lids = eyeLids(e, u, top, bot);+ float v = clamp((p.y - top) / max(bot - top, 1.0), 0.0, 1.0);+ float w = sqrt(4.0 * u * (1.0 - u)) * sqrt(4.0 * v * (1.0 - v));+ vec4 c = texAt(p - vec2(st.z, st.w) * w);+ // the lash covers ~2px of the ball's upper edge, so the cut can sit under it (no seam)+ return c * smoothstep(lids.x - 1.0, lids.x + 0.5, p.y) * (1.0 - smoothstep(lids.y - 0.9, lids.y + 0.6, p.y));+}++vec4 mouth(vec2 p, vec4 base) {+ float open = uMouthState.x;+ if (open < 0.01) return base;+ vec2 d = vec2(cos(uMouth.z), sin(uMouth.z)), n = vec2(-d.y, d.x);+ vec2 r = p - uMouth.xy;+ float s = dot(r, d) / uMouth.w, t = dot(r, n);+ float form = uMouthState.y; // -1 wide "i" .. +1 round "o"+ float wf = mix(0.78, 0.46, clamp(form * 0.5 + 0.5, 0.0, 1.0));+ float k = 1.0 - (s / wf) * (s / wf);+ if (k <= 0.0) return base;+ float line = uMouthState.z * (1.0 - s * s);+ float hk = pow(k, mix(0.55, 0.85, clamp(form, 0.0, 1.0)));+ float H = mix(20.0, 26.0, clamp(form, 0.0, 1.0));+ float up = line - 0.6 - open * 2.5 * hk;+ float lo = line + open * H * hk;+ float cov = smoothstep(-0.7, 0.7, t - up) * smoothstep(-0.7, 0.7, lo - t);+ if (cov <= 0.0) return base;+ float tv = clamp((t - up) / max(lo - up, 1.0), 0.0, 1.0);+ vec3 col = mix(vec3(0.24, 0.05, 0.08), vec3(0.48, 0.15, 0.19), tv);+ float tongue = smoothstep(0.5, 0.78, tv) * (1.0 - smoothstep(0.45, 0.8, abs(s) / wf));+ col = mix(col, vec3(0.86, 0.44, 0.47), tongue * 0.9);+ float teeth = (1.0 - smoothstep(0.12, 0.22, tv)) * smoothstep(0.25, 0.45, open) * (1.0 - smoothstep(0.55, 0.85, abs(s) / wf));+ col = mix(col, vec3(0.99, 0.96, 0.94), teeth);+ float rim = 1.0 - smoothstep(0.6, 1.8, lo - t);+ col = mix(col, vec3(0.36, 0.09, 0.11), rim * 0.85);+ return vec4(mix(base.rgb, col, cov), 1.0);+}++void main() {+ vec2 p = uRect.xy + vUv * uRect.zw;+ vec4 c;+ if (uFace == 1) {+ c = mouth(p, texAt(p));+ float blush = exp(-dot((p - uCheeks.xy) / vec2(48.0, 22.0), (p - uCheeks.xy) / vec2(48.0, 22.0)))+ + exp(-dot((p - uCheeks.zw) / vec2(40.0, 20.0), (p - uCheeks.zw) / vec2(40.0, 20.0)));+ c.rgb = mix(c.rgb, c.rgb * vec3(1.0, 0.62, 0.64) , clamp(blush * uCheek * 0.55, 0.0, 1.0) * c.a);+ } else if (uFace >= 2) {+ c = eyeBall(uFace - 2, p);+ } else {+ c = texAt(p);+ }+ outColor = c * uAlpha;+}`;++const LINE_VS = `#version 300 es+in vec2 aPos; uniform vec2 uScale; uniform vec2 uOffset;+void main() { gl_Position = vec4(aPos * uScale + uOffset, 0.0, 1.0); gl_PointSize = 7.0; }`;+const LINE_FS = `#version 300 es+precision mediump float; uniform vec4 uColor; out vec4 o; void main() { o = uColor; }`;++function compile(gl, vs, fs) {+ const prog = gl.createProgram();+ for (const [type, src] of [[gl.VERTEX_SHADER, vs], [gl.FRAGMENT_SHADER, fs]]) {+ const sh = gl.createShader(type);+ gl.shaderSource(sh, src); gl.compileShader(sh);+ if (!gl.getShaderParameter(sh, gl.COMPILE_STATUS)) throw new Error(gl.getShaderInfoLog(sh));+ gl.attachShader(prog, sh);+ }+ gl.linkProgram(prog);+ if (!gl.getProgramParameter(prog, gl.LINK_STATUS)) throw new Error(gl.getProgramInfoLog(prog));+ const u = {};+ const n = gl.getProgramParameter(prog, gl.ACTIVE_UNIFORMS);+ for (let i = 0; i < n; i++) {+ const name = gl.getActiveUniform(prog, i).name.replace('[0]', '');+ u[name] = gl.getUniformLocation(prog, name);+ }+ return { prog, u };+}++// Grid lines along one axis: `cell` spacing, `fine.cell` inside [fine.from, fine.to).+function axis(start, len, cell, fine) {+ const out = [start];+ let v = start;+ while (v < start + len - 0.5) {+ const c = fine && v >= fine.from && v < fine.to ? fine.cell : cell;+ v = Math.min(start + len, v + c);+ out.push(v);+ }+ return out;+}++// Grid mesh over a layer rect (optionally denser inside `fine`); cells that are fully+// transparent are dropped.+export function buildGrid(rect, cell, alpha, alphaW, fine = null) {+ const [rx, ry, rw, rh] = rect;+ const xs = axis(rx, rw, cell, fine && { from: fine.x0, to: fine.x1, cell: fine.cell });+ const ys = axis(ry, rh, cell, fine && { from: fine.y0, to: fine.y1, cell: fine.cell });+ const cols = xs.length - 1, rows = ys.length - 1;+ const nv = (cols + 1) * (rows + 1);+ const rest = new Float32Array(nv * 2), uv = new Float32Array(nv * 2);+ for (let j = 0; j <= rows; j++) for (let i = 0; i <= cols; i++) {+ const k = j * (cols + 1) + i;+ rest[k * 2] = xs[i]; rest[k * 2 + 1] = ys[j];+ uv[k * 2] = (xs[i] - rx) / rw; uv[k * 2 + 1] = (ys[j] - ry) / rh;+ }+ const tris = [], lines = [];+ const alphaH = alpha.length / alphaW;+ // alpha may be a 1x1 stand-in (fully opaque quad)+ const ax = alphaW === 1 ? 0 : 1;+ for (let j = 0; j < rows; j++) for (let i = 0; i < cols; i++) {+ const x0 = Math.floor(xs[i] - rx) * ax - 2, x1 = Math.ceil(xs[i + 1] - rx) * ax + 2;+ const y0 = Math.floor(ys[j] - ry) * ax - 2, y1 = Math.ceil(ys[j + 1] - ry) * ax + 2;+ let any = false;+ for (let y = Math.max(0, y0); y < Math.min(alphaH, y1) && !any; y += 1)+ for (let x = Math.max(0, x0); x < Math.min(alphaW, x1); x += 1)+ if (alpha[y * alphaW + x] > 3) { any = true; break; }+ if (!any) continue;+ const a = j * (cols + 1) + i, b = a + 1, c = a + cols + 1, d = c + 1;+ tris.push(a, b, c, b, d, c);+ lines.push(a, b, a, c, b, c);+ if (i === cols - 1) lines.push(b, d);+ if (j === rows - 1) lines.push(c, d);+ }+ return { rect, cols, rows, rest, uv, pos: new Float32Array(rest), tris: new Uint32Array(tris), lines: new Uint32Array(lines) };+}++export class Renderer {+ // padTop / padSide: margin around the image, as a share of its height / width. A negative+ // padTop pushes the top of the image above the canvas (hides a cut-off top edge).+ constructor(canvas, { padTop = 0, padSide = 0 } = {}) {+ this.pad = { top: padTop, side: padSide };+ const gl = canvas.getContext('webgl2', { premultipliedAlpha: true, antialias: true, alpha: true, preserveDrawingBuffer: true });+ if (!gl) throw new Error('WebGL2 が使えません');+ this.gl = gl; this.canvas = canvas;+ this.main = compile(gl, VS, FS);+ this.line = compile(gl, LINE_VS, LINE_FS);+ this.layers = [];+ gl.enable(gl.BLEND);+ gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);+ }++ texture(img) {+ const gl = this.gl, t = gl.createTexture();+ gl.bindTexture(gl.TEXTURE_2D, t);+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img);+ gl.generateMipmap(gl.TEXTURE_2D);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);+ return t;+ }++ addLayer(name, img, mesh, opts = {}) {+ const gl = this.gl;+ const vao = gl.createVertexArray();+ gl.bindVertexArray(vao);+ const posBuf = gl.createBuffer();+ gl.bindBuffer(gl.ARRAY_BUFFER, posBuf);+ gl.bufferData(gl.ARRAY_BUFFER, mesh.pos, gl.DYNAMIC_DRAW);+ for (const prog of [this.main, this.line]) {+ const loc = gl.getAttribLocation(prog.prog, 'aPos');+ gl.enableVertexAttribArray(loc); gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);+ }+ const uvBuf = gl.createBuffer();+ gl.bindBuffer(gl.ARRAY_BUFFER, uvBuf);+ gl.bufferData(gl.ARRAY_BUFFER, mesh.uv, gl.STATIC_DRAW);+ const uvLoc = gl.getAttribLocation(this.main.prog, 'aUv');+ gl.enableVertexAttribArray(uvLoc); gl.vertexAttribPointer(uvLoc, 2, gl.FLOAT, false, 0, 0);+ const triBuf = gl.createBuffer();+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, triBuf);+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, mesh.tris, gl.STATIC_DRAW);+ gl.bindVertexArray(null);+ const lineBuf = gl.createBuffer();+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, lineBuf);+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, mesh.lines, gl.STATIC_DRAW);+ const layer = { name, mesh, tex: this.texture(img), vao, posBuf, triBuf, lineBuf, visible: true, face: !!opts.face, eyeBall: opts.eyeBall, color: opts.color || [1, 1, 1, 1] };+ this.layers.push(layer);+ return layer;+ }++ resize() {+ const c = this.canvas, dpr = Math.min(window.devicePixelRatio || 1, 2);+ const w = Math.round(c.clientWidth * dpr), h = Math.round(c.clientHeight * dpr);+ if (c.width !== w || c.height !== h) { c.width = w; c.height = h; }+ // fit the source image, anchored to the bottom so the cut-off body stays at the edge+ const s = Math.min(w / (IMG.w * (1 + 2 * this.pad.side)), h / (IMG.h * (1 + this.pad.top)));+ const ox = (w - IMG.w * s) / 2, oy = h - IMG.h * s;+ this.scale = [2 * s / w, -2 * s / h];+ this.offset = [-1 + 2 * ox / w, 1 - 2 * oy / h];+ this.pxScale = s; this.pxOff = [ox, oy];+ }++ draw(state) {+ const gl = this.gl;+ this.resize();+ gl.viewport(0, 0, this.canvas.width, this.canvas.height);+ gl.clearColor(0, 0, 0, 0);+ gl.clear(gl.COLOR_BUFFER_BIT);+ const m = this.main;+ gl.useProgram(m.prog);+ gl.uniform2fv(m.u.uScale, this.scale); gl.uniform2fv(m.u.uOffset, this.offset);+ gl.uniform1i(m.u.uTex, 0);+ gl.uniform4fv(m.u.uEyeBox, EYES.flatMap(e => [e.x0, e.x1, 0, 0]));+ gl.uniform1fv(m.u.uEyeTop, EYES.flatMap(e => e.top));+ gl.uniform1fv(m.u.uEyeBot, EYES.flatMap(e => e.bot));+ gl.uniform4fv(m.u.uEyeState, state.eyes);+ gl.uniform4f(m.u.uMouth, MOUTH.cx, MOUTH.cy, MOUTH.angle, MOUTH.halfLen);+ gl.uniform4f(m.u.uMouthState, state.mouthOpen, state.mouthForm, MOUTH.bow, 0);+ gl.uniform4f(m.u.uCheeks, CHEEKS[0][0], CHEEKS[0][1], CHEEKS[1][0], CHEEKS[1][1]);+ gl.uniform1f(m.u.uCheek, state.cheek);+ gl.activeTexture(gl.TEXTURE0);++ for (const L of this.layers) {+ if (!L.visible || L.overlay) continue;+ this.drawLayer(L, L.alpha ?? 1);+ }+ if (this.original && state.originalAlpha > 0) this.drawLayer(this.original, state.originalAlpha);++ if (state.showMesh) {+ const l = this.line;+ gl.useProgram(l.prog);+ gl.uniform2fv(l.u.uScale, this.scale); gl.uniform2fv(l.u.uOffset, this.offset);+ for (const L of this.layers) {+ if (!L.visible || L.overlay) continue;+ gl.bindVertexArray(L.vao);+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, L.lineBuf);+ gl.uniform4fv(l.u.uColor, L.color);+ gl.drawElements(gl.LINES, L.mesh.lines.length, gl.UNSIGNED_INT, 0);+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, L.triBuf);+ }+ if (state.joints?.length) this.drawPoints(state.joints);+ gl.bindVertexArray(null);+ }+ }++ drawLayer(L, alpha) {+ const gl = this.gl, m = this.main;+ gl.useProgram(m.prog);+ gl.bindVertexArray(L.vao);+ gl.bindBuffer(gl.ARRAY_BUFFER, L.posBuf);+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, L.mesh.pos);+ gl.bindTexture(gl.TEXTURE_2D, L.tex);+ gl.uniform4fv(m.u.uRect, L.mesh.rect);+ gl.uniform1i(m.u.uFace, L.eyeBall !== undefined ? 2 + L.eyeBall : L.face ? 1 : 0);+ gl.uniform1f(m.u.uAlpha, alpha);+ gl.drawElements(gl.TRIANGLES, L.mesh.tris.length, gl.UNSIGNED_INT, 0);+ }++ drawPoints(pts) {+ const gl = this.gl, l = this.line;+ if (!this.pointBuf) {+ this.pointBuf = gl.createBuffer();+ this.pointVao = gl.createVertexArray();+ gl.bindVertexArray(this.pointVao);+ gl.bindBuffer(gl.ARRAY_BUFFER, this.pointBuf);+ const loc = gl.getAttribLocation(l.prog, 'aPos');+ gl.enableVertexAttribArray(loc); gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);+ }+ gl.bindVertexArray(this.pointVao);+ gl.bindBuffer(gl.ARRAY_BUFFER, this.pointBuf);+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(pts.flat()), gl.DYNAMIC_DRAW);+ gl.uniform4f(l.u.uColor, 1, 0.85, 0.2, 1);+ gl.drawArrays(gl.POINTS, 0, pts.length);+ }++ // canvas CSS px -> source image px+ toImage(cx, cy) {+ if (!this.pxOff) return null; // pointer moved before the first frame was drawn+ const dpr = this.canvas.width / this.canvas.clientWidth;+ return [(cx * dpr - this.pxOff[0]) / this.pxScale, (cy * dpr - this.pxOff[1]) / this.pxScale];+ }+}diff --git a/reference/engine/rig.js b/reference/engine/rig.jsnew file mode 100644index 0000000..f551539--- /dev/null+++ b/reference/engine/rig.js@@ -0,0 +1,310 @@+// Rig definition: every coordinate is in source-image pixels (1254 x 1254).+// Deformers are plain functions of the rest position, so the same head/body+// transform can be shared by the base layer, the hand and the tassel anchors.++export const IMG = { w: 1254, h: 1254 };++export const PARAMS = [+ { id: 'ParamAngleX', label: '顔の向き 左右', min: -30, max: 30, def: 0, group: '頭と体' },+ { id: 'ParamAngleY', label: '顔の向き 上下', min: -30, max: 30, def: 0, group: '頭と体' },+ { id: 'ParamAngleZ', label: '顔の傾き', min: -30, max: 30, def: 0, group: '頭と体' },+ { id: 'ParamBodyAngleX', label: '体の向き 左右', min: -10, max: 10, def: 0, group: '頭と体' },+ { id: 'ParamBodyAngleZ', label: '体の傾き', min: -10, max: 10, def: 0, group: '頭と体' },+ { id: 'ParamBreath', label: '呼吸', min: 0, max: 1, def: 0, group: '頭と体' },+ { id: 'ParamEyeLOpen', label: '左目の開き', min: 0, max: 1.25, def: 1, group: '目と眉' },+ { id: 'ParamEyeROpen', label: '右目の開き', min: 0, max: 1.25, def: 1, group: '目と眉' },+ { id: 'ParamEyeSmile', label: '目の笑い', min: 0, max: 1, def: 0, group: '目と眉' },+ { id: 'ParamEyeBallX', label: '目玉 左右', min: -1, max: 1, def: 0, group: '目と眉' },+ { id: 'ParamEyeBallY', label: '目玉 上下', min: -1, max: 1, def: 0, group: '目と眉' },+ { id: 'ParamBrowY', label: '眉 上下', min: -1, max: 1, def: 0, group: '目と眉' },+ { id: 'ParamBrowAngle', label: '眉の角度', min: -1, max: 1, def: 0, group: '目と眉' },+ { id: 'ParamMouthOpenY', label: '口の開き', min: 0, max: 1, def: 0, group: '口と頬' },+ { id: 'ParamMouthForm', label: '口の形 (い↔お)', min: -1, max: 1, def: 0, group: '口と頬' },+ { id: 'ParamCheek', label: '照れ', min: 0, max: 1, def: 0, group: '口と頬' },+ { id: 'ParamArmAngle', label: '腕の角度', min: -10, max: 10, def: 0, group: '手' },+ { id: 'ParamHandAngle', label: '手首の角度', min: -10, max: 10, def: 0, group: '手' },+ { id: 'ParamFingerTap', label: '指トントン', min: 0, max: 1, def: 0, group: '手' },+];++// ---- face features ----+// Eye openings come from layers.json ("eyes", written when the layers were cut): the top / bottom edge of+// the visible eye white + iris, sampled at EYE_N evenly spaced columns from corner to corner.+export const EYE_N = 24;+export const EYES = [];+export function setEyes(list) { EYES.length = 0; EYES.push(...list); }++function sampled(arr, u) {+ const f = Math.min(1, Math.max(0, u)) * (EYE_N - 1), i = Math.min(Math.floor(f), EYE_N - 2), t = f - i;+ return arr[i] + (arr[i + 1] - arr[i]) * t;+}++// Raw lid lines at column u for the current state; must match eyeLidsRaw() in the shader.+// plain closing: the upper lid comes down onto the lower lid+// smiling (^^): both lids meet on an upward arc from corner to corner+function eyeLidsRaw(e, u, open, smile) {+ u = Math.min(1, Math.max(0, u));+ const top = sampled(e.top, u), bot = sampled(e.bot, u);+ const b = 1 - open, hump = 4 * u * (1 - u);+ const H = sampled(e.bot, 0.5) - sampled(e.top, 0.5);+ const arc = e.top[0] + (e.top[EYE_N - 1] - e.top[0]) * u - 0.3 * H * hump;+ const closed = Math.max(top, bot + 1 + (arc - bot - 1) * smile);+ // wide-open (open > 1) only lifts the lash a few px: there is no drawn eye white above it+ return [(closed - top) * Math.max(b, -0.07), b > 0 ? (closed - bot) * b * smile : 0];+}++// Lid movement is smoothed across columns: the opening's edge is very steep at the corners,+// and following it exactly bent the lash into a zigzag there.+const LID_TAPS = [[-2, 1], [-1, 2], [0, 3], [1, 2], [2, 1]], LID_STEP = 5;+function eyeLids(e, x, open, smile) {+ let du = 0, db = 0;+ for (const [k, w] of LID_TAPS) {+ const [a, c] = eyeLidsRaw(e, (x + k * LID_STEP - e.x0) / (e.x1 - e.x0), open, smile);+ du += a * w / 9; db += c * w / 9;+ }+ const u = Math.min(1, Math.max(0, (x - e.x0) / (e.x1 - e.x0)));+ const top = sampled(e.top, u), bot = sampled(e.bot, u);+ return { top, bot, b: 1 - open, lid: top + du, bc: bot + db };+}++// Rest-space y of an eye-part vertex for the current eye state. The upper lash slides down+// to the lid line and thins a little; the lower lash rises for smiling eyes; the crease+// follows the lid a little (the lid skin stretches).+export function eyePartY(e, part, x, y, open, smile) {+ const L = eyeLids(e, x, open, smile);+ if (part === 'lash') return L.lid - (L.top - y) * (1 - 0.3 * Math.min(1, Math.max(0, L.b)));+ if (part === 'low') return y + (L.bc - L.bot);+ if (part === 'crease') return y + (L.lid - L.top) * 0.22;+ return y;+}++// The lower lash fades out as smiling eyes close, so the arc reads as one line, not two;+// the crease softens as the lid stretches.+export function eyePartAlpha(part, open, smile) {+ const b = Math.min(1, Math.max(0, 1 - open));+ if (part === 'low') return 1 - Math.min(1, b * smile * 1.2);+ if (part === 'crease') return 1 - 0.45 * b;+ return 1;+}++// Closed mouth line runs from (599,579) to (672,556) and bows down ~5.5px.+export const MOUTH = { cx: 635.5, cy: 567.5, angle: Math.atan2(-23, 73), halfLen: 38.3, bow: 5.5 };+export const CHEEKS = [[488, 532], [748, 468]];++// ---- mesh deformers ----+// The turn field is a smooth bump over the head. It is deliberately larger than the+// face so its rim falls in the background, and its slope is zero at the rim.+const HEAD = { cx: 615, cy: 400, rx: 430, ry: 470, shiftX: 50, shiftY: 40, pivotX: 640, pivotY: 700,+ maxRoll: 9 * Math.PI / 180 };+const BODY = { pivotX: 640, pivotY: 1650, maxRoll: 3 * Math.PI / 180 };++const sstep = (a, b, x) => { const t = Math.min(1, Math.max(0, (x - a) / (b - a))); return t * t * (3 - 2 * t); };+const band = (a0, a1, b0, b1, x) => sstep(a0, a1, x) * (1 - sstep(b0, b1, x));+const gauss = (x, y, cx, cy, rx, ry) => Math.exp(-(((x - cx) / rx) ** 2 + ((y - cy) / ry) ** 2));++export function headWeight(x, y) { return 1 - sstep(630, 800, y); }+// The turn bump already fades out towards its rim, so it only needs a gentle cut-off+// (stacking both fades is what sheared the neck).+export function turnWeight(x, y) { return 1 - sstep(640, 900, y); }++// Hair strands: rest polylines root -> tip (4 nodes each), traced from the drawing.+// Each one is a small spring chain in physics.js; vertices follow the strands near them.+export const STRANDS = [+ { name: 'bang1', nodes: [[500, 140], [470, 240], [445, 340], [428, 430]], sigma: 18, k: 1.0, max: 8 },+ { name: 'bang2', nodes: [[530, 130], [505, 240], [485, 340], [468, 438]], sigma: 18, k: 0.92, max: 8 },+ { name: 'bang3', nodes: [[555, 125], [540, 230], [525, 330], [510, 432]], sigma: 18, k: 1.06, max: 8 },+ { name: 'bang4', nodes: [[575, 130], [568, 230], [558, 330], [550, 422]], sigma: 18, k: 0.95, max: 8 },+ { name: 'bang5', nodes: [[590, 140], [590, 230], [590, 320], [590, 405]], sigma: 18, k: 1.03, max: 8 },+ { name: 'bang6', nodes: [[600, 160], [608, 220], [618, 280], [628, 335]], sigma: 16, k: 1.1, max: 7 },+ { name: 'sideL', nodes: [[420, 300], [400, 430], [398, 560], [415, 700]], sigma: 26, k: 0.55, max: 12 },+ { name: 'sideR', nodes: [[770, 260], [782, 380], [792, 480], [800, 580]], sigma: 22, k: 0.65, max: 10 },+];++// distance to a polyline and the normalised position t (0 root .. 1 tip) of the closest point+function onPolyline(x, y, nodes) {+ let best = Infinity, bt = 0;+ const n = nodes.length - 1;+ for (let i = 0; i < n; i++) {+ const [ax, ay] = nodes[i], [bx, by] = nodes[i + 1];+ const vx = bx - ax, vy = by - ay;+ const u = Math.min(1, Math.max(0, ((x - ax) * vx + (y - ay) * vy) / (vx * vx + vy * vy)));+ const d = Math.hypot(x - ax - vx * u, y - ay - vy * u);+ if (d < best) { best = d; bt = (i + u) / n; }+ }+ return [best, bt];+}++// Sparse list of [strand index, weight, t]. Weights of overlapping strands are shared so+// the region between two strands blends their motions instead of adding them.+function strandWeights(x, y, hair) {+ if (hair < 0.02) return [];+ const hits = [];+ let sum = 0;+ STRANDS.forEach((s, i) => {+ const [d, t] = onPolyline(x, y, s.nodes);+ const g = Math.exp(-((d / s.sigma) ** 2));+ if (g < 0.02) return;+ hits.push([i, g, t]); sum += g;+ });+ const norm = Math.max(1, sum);+ return hits.map(([i, g, t]) => [i, hair * g / norm * sstep(0.04, 0.55, t), t]);+}++// Per-vertex weights of the base layer, computed once from the rest position.+// hair: 0..1 from hairmask.png, so strands only move actual hair.+export function baseWeights(x, y, hair = 1) {+ return {+ head: headWeight(x, y),+ turn: turnWeight(x, y),+ strands: strandWeights(x, y, hair),+ bunL: gauss(x, y, 262, 250, 105, 115),+ bunR: gauss(x, y, 820, 110, 115, 105),+ brow: gauss(x, y, 700, 326, 78, 20) * (1 - sstep(346, 358, y)),+ // chin below the mouth line drops a little when the mouth opens+ jaw: gauss(x, y, 632, 625, 100, 55) * sstep(572, 598, y),+ // per-feature depth for head turns (nose sticks out most, ears sit at the back)+ nose: gauss(x, y, 615, 515, 45, 45),+ mouth: gauss(x, y, 635, 568, 60, 30),+ eyeA: gauss(x, y, 493, 478, 80, 55),+ eyeB: gauss(x, y, 713, 415, 75, 55),+ earR: gauss(x, y, 828, 400, 35, 60),+ earL: gauss(x, y, 418, 520, 30, 55),+ chest: gauss(x, y, 660, 960, 260, 200),+ breath: 1 - sstep(1040, 1254, y),+ shoulder: gauss(x, y, 230, 800, 160, 120) + gauss(x, y, 1040, 870, 160, 120),+ };+}++// Head turn: features near the face centre travel further than the contour.+// (A sphere projection was tried first; its rim has an infinite slope and kinked+// the hair strands and fingers it crossed.)+function turnOffset(x, y, ax, ay) {+ const nx = (x - HEAD.cx) / HEAD.rx, ny = (y - HEAD.cy) / HEAD.ry;+ const t = 1 - nx * nx - ny * ny;+ if (t <= 0) return [0, 0];+ // flat top over eyes/nose/mouth (r < ~0.4) so they move as one piece; all the+ // stretching needed for parallax happens on the cheeks, contour and hair+ const d = sstep(0, 0.84, t);+ return [ax * HEAD.shiftX * d, -ay * HEAD.shiftY * d];+}++function rotateAround(p, cx, cy, a) {+ const c = Math.cos(a), s = Math.sin(a), dx = p[0] - cx, dy = p[1] - cy;+ p[0] = cx + dx * c - dy * s; p[1] = cy + dx * s + dy * c;+}++// Head transform with weight w (0 = body, 1 = fully head). Mutates p.+export function applyHead(p, w, P, wTurn = w) {+ const o = turnOffset(p[0], p[1], P.ParamAngleX / 30, P.ParamAngleY / 30);+ p[0] += o[0] * wTurn; p[1] += o[1] * wTurn;+ if (w <= 0) return;+ rotateAround(p, HEAD.pivotX, HEAD.pivotY, -P.ParamAngleZ / 30 * HEAD.maxRoll * w);+}++export function applyBody(p, restY, P, chest = 0, breathW = 1, shoulder = 0) {+ const b = P.ParamBreath;+ // inhale: everything above the cut-off rises, shoulders lift more, the chest widens a little+ p[1] -= b * (5 * breathW + 4 * shoulder);+ p[0] += (p[0] - 660) * 0.012 * b * chest;+ p[0] += P.ParamBodyAngleX / 10 * (7 + 9 * chest);+ // bottom rows stay put so no gap opens at the cut-off edge of the image+ rotateAround(p, BODY.pivotX, BODY.pivotY, -P.ParamBodyAngleZ / 10 * BODY.maxRoll * (1 - sstep(950, 1254, restY)));+}++// Base layer: hair and face-part offsets are added in rest space, then head, then body.+export function deformBase(x, y, w, P, phys, out) {+ const p = out;+ p[0] = x; p[1] = y;+ const g = phys.gain;+ for (const [i, wi, t] of w.strands) {+ const o = phys.strands?.[i];+ if (!o) continue;+ const f = t * 3, k = Math.min(2, Math.floor(f)), u = f - k;+ p[0] += (o[k][0] + (o[k + 1][0] - o[k][0]) * u) * wi * g;+ p[1] += (o[k][1] + (o[k + 1][1] - o[k][1]) * u) * wi * g;+ }+ p[0] += (phys.bunL[0] * w.bunL + phys.bunR[0] * w.bunR) * g;+ p[1] += (phys.bunL[1] * w.bunL + phys.bunR[1] * w.bunR) * g;+ // brows+ p[1] -= P.ParamBrowY * 7 * w.brow;+ if (w.brow > 0.01) {+ const a = P.ParamBrowAngle * 0.12 * w.brow;+ p[1] += (x - 700) * Math.sin(a);+ }+ p[1] += P.ParamMouthOpenY * 3.5 * w.jaw;+ // head turn, per part: nose and mouth travel further than the eyes, the far eye+ // narrows and the near eye widens, the ears and buns slide the other way+ const ax = P.ParamAngleX / 30, ay = P.ParamAngleY / 30;+ p[0] += ax * (8 * w.nose + 5 * w.mouth) + (x - 493) * 0.12 * ax * w.eyeA - (x - 713) * 0.12 * ax * w.eyeB+ - ax * 9 * w.earR + ax * 4 * w.earL - ax * 10 * (w.bunL + w.bunR);+ p[1] -= ay * (6 * w.nose + 3 * w.mouth);+ p[1] += (y - 478) * -0.06 * Math.abs(ay) * w.eyeA + (y - 415) * -0.06 * Math.abs(ay) * w.eyeB;+ applyHead(p, w.head, P, w.turn);+ applyBody(p, y, P, w.chest, w.breath, w.shoulder);+ return p;+}++// ---- hand / forearm ----+// Two rigid bones (forearm about the elbow, hand about the wrist) instead of letting the+// head's warp field bend them. The forearm takes only part of the swing, because whatever+// it uncovers is inpainted; the wrist does the rest so the fingertips stay on the chin.+const ELBOW = [300, 1390], WRIST = [505, 850], KNUCKLE = [497, 652], CONTACT = [530, 628];+const FOREARM_SHARE = 0.3;++export function handWeights(x, y) {+ return {+ arm: 1 - sstep(1180, 1300, y),+ wrist: 1 - sstep(790, 900, y),+ hand: 1 - sstep(800, 900, y),+ finger: sstep(482, 540, x) * (1 - sstep(678, 722, y)),+ pinBottom: sstep(1180, 1254, y),+ };+}++const rot = (p, o, c, s) => { const dx = p[0] - o[0], dy = p[1] - o[1]; return [o[0] + dx * c - dy * s, o[1] + dx * s + dy * c]; };+const angleOf = v => Math.atan2(v[1], v[0]);++// Per-frame bone transforms of the hand layer.+export function handFrame(P) {+ const c = [...CONTACT];+ applyHead(c, headWeight(...CONTACT), P, turnWeight(...CONTACT));+ applyBody(c, CONTACT[1], P, 0, 1, 0);+ const e = [...ELBOW];+ applyBody(e, ELBOW[1], P, 0, 0, 0);+ const full = angleOf([c[0] - e[0], c[1] - e[1]]) - angleOf([CONTACT[0] - ELBOW[0], CONTACT[1] - ELBOW[1]]);+ const a = full * FOREARM_SHARE;+ const ca = Math.cos(a), sa = Math.sin(a);+ const tr = p => { const q = rot(p, ELBOW, ca, sa); return [q[0] + e[0] - ELBOW[0], q[1] + e[1] - ELBOW[1]]; };+ const w = tr(WRIST), c1 = tr(CONTACT);+ const b = angleOf([c[0] - w[0], c[1] - w[1]]) - angleOf([c1[0] - w[0], c1[1] - w[1]]);+ const k = Math.min(1.03, Math.max(0.97, Math.hypot(c[0] - w[0], c[1] - w[1]) / Math.hypot(c1[0] - w[0], c1[1] - w[1])));+ return { tr, w, b, k };+}++export function deformHand(x, y, w, P, F, out) {+ let p = [x, y];+ // kept small on purpose: anything the hand uncovers is only a blurry inpaint+ p = rot(p, KNUCKLE, Math.cos(P.ParamFingerTap * 0.07 * w.finger), Math.sin(P.ParamFingerTap * 0.07 * w.finger));+ const ha = -P.ParamHandAngle / 10 * 0.045 * w.wrist, aa = -P.ParamArmAngle / 10 * 0.015 * w.arm;+ p = rot(p, WRIST, Math.cos(ha), Math.sin(ha));+ p = rot(p, ELBOW, Math.cos(aa), Math.sin(aa));+ p = F.tr(p);+ // wrist bone, blended in across the wrist so the joint bends smoothly+ const bw = F.b * w.hand, kw = 1 + (F.k - 1) * w.hand;+ p = rot(p, F.w, Math.cos(bw) * kw, Math.sin(bw) * kw);+ // the arm is cut by the image edge: keep that edge on the edge+ p[1] += (y - p[1]) * w.pinBottom;+ out[0] = p[0]; out[1] = p[1];+ return out;+}++// ---- tassels (2-bone chains driven by physics) ----+export const TASSELS = [+ { name: 'tassel_l', pivot: [292, 419], tip: [289, 598], split: 0.4 },+ { name: 'tassel_r', pivot: [868, 282], tip: [903, 462], split: 0.4 },+];++// Where the tassel hangs from, after head/body deformation.+export function tasselAnchor(t, P, phys, out) {+ const w = baseWeights(t.pivot[0], t.pivot[1]);+ return deformBase(t.pivot[0], t.pivot[1], w, P, phys, out);+}diff --git a/reference/engine/sprites.js b/reference/engine/sprites.jsnew file mode 100644index 0000000..740dc3f--- /dev/null+++ b/reference/engine/sprites.js@@ -0,0 +1,165 @@+// Drawn eye / mouth variants (public/avatar/miko-qipao/sprites/, cut from full-size drawings) laid over the+// face. Closed eyes and open mouths are what the single image does not contain, so instead of+// faking them with shaders these are swapped in like the frames of an anime blink / lip flap.+// The sprite meshes follow the same head / body deformation as the face.+import { baseWeights, deformBase, MOUTH } from './rig.js';++const sstep = (a, b, x) => { const t = Math.min(1, Math.max(0, (x - a) / (b - a))); return t * t * (3 - 2 * t); };++// Mouth opening area (the region the mouth drawings were painted in): used to squash only+// the inside of the mouth sprite, the skin at its edge stays put.+const MOUTH_AREA = { cx: 636, cy: 574, rx: 62, ry: 34, angle: -14 * Math.PI / 180 };+// Mouth shapes. ParamMouthForm is the vowel axis: -1 wide (い) .. 0 (あ) .. +1 round (う/お);+// ParamMouthOpenY how far it opens. Each shape names the drawing it uses, the openness that+// drawing shows at full size, and a width factor (う is a narrowed お).+export const MOUTH_SHAPES = {+ a: { sprite: 'mouth_a', ref: 0.9, width: 1 },+ aHalf: { sprite: 'mouth_a_half', ref: 0.55, width: 1 },+ i: { sprite: 'mouth_i', ref: 0.55, width: 1 },+ e: { sprite: 'mouth_a_half', ref: 0.65, width: 1.06 },+ o: { sprite: 'mouth_o', ref: 0.75, width: 1 },+ u: { sprite: 'mouth_o', ref: 0.75, width: 0.78 },+};+// below this the drawn closed mouth of the original image is shown (a barely open mouth+// drawing looked like a stuck, oddly shaped mouth)+export const MOUTH_OPEN_MIN = 0.16;++// Vowel regions on the form axis, with a little hysteresis so the drawing does not flicker+// when the form hovers on a boundary.+function classifyVowel(form, prev) {+ const pad = 0.07;+ const inside = (v, lo, hi) => v >= lo - (prev ? pad : 0) && v < hi + (prev ? pad : 0);+ const regions = [['i', -9, -0.55], ['e', -0.55, -0.2], ['a', -0.2, 0.35], ['o', 0.35, 0.75], ['u', 0.75, 9]];+ const was = prev && regions.find(r => r[0] === prev || (prev === 'aHalf' && r[0] === 'a'));+ if (was && inside(form, was[1], was[2])) return was[0];+ return regions.find(r => form >= r[1] && form < r[2])[0];+}++// Eyes switch between drawings like anime frames: the original open eye (never with shifted+// lids: lowering the cut-out lash left seams at the corners), the drawn half-closed eye,+// and the drawn closed / smiling eye.+export const EYE_OPEN_MIN = 0.75, EYE_CLOSED_MAX = 0.3, EYE_FADE_SEC = 0.06;++export function eyeSprite(open, smile) {+ if (open >= EYE_OPEN_MIN) return null;+ if (open < EYE_CLOSED_MAX) return smile >= 0.5 ? 'eyes_smile' : 'eyes_closed';+ return 'eyes_half';+}++export function mouthShape(open, form, prev = null) {+ if (open < MOUTH_OPEN_MIN) return null;+ const v = classifyVowel(form, prev);+ if (v === 'a') return open >= 0.6 ? 'a' : 'aHalf';+ return v;+}++function mouthLineY(x) {+ return MOUTH.cy + (x - MOUTH.cx) * Math.tan(MOUTH.angle);+}++function mouthCenterX() { return MOUTH_AREA.cx; }++function mouthInner(x, y) {+ const c = Math.cos(-MOUTH_AREA.angle), s = Math.sin(-MOUTH_AREA.angle);+ const dx = x - MOUTH_AREA.cx, dy = y - MOUTH_AREA.cy;+ const u = (dx * c - dy * s) / MOUTH_AREA.rx, v = (dx * s + dy * c) / MOUTH_AREA.ry;+ return 1 - sstep(0.55, 0.95, Math.hypot(u, v));+}++/**+ * @param R Renderer+ * @param sheet parsed sprites.json ({ build, layers: { name: [x, y, w, h] } })+ * @param imgs { name: HTMLImageElement }+ * @param buildGrid, alphaOf helpers from the renderer / page+ */+export function createSprites(R, sheet, imgs, buildGrid, alphaOf) {+ const items = {};+ // draw order matters for the cross-fades: half-closed under closed / smiling (the fade-in frame is drawn on top)+ const order = n => (n.startsWith('eyes_half') ? 0 : n.startsWith('eyes_') ? 1 : 2);+ const entries = Object.entries(sheet.layers).sort((x, y) => order(x[0]) - order(y[0]));+ for (const [name, rect] of entries) {+ const mesh = buildGrid(rect, 4, alphaOf(imgs[name]), imgs[name].width);+ const W = [], inner = [];+ for (let k = 0; k < mesh.rest.length / 2; k++) {+ const x = mesh.rest[k * 2], y = mesh.rest[k * 2 + 1];+ W.push(baseWeights(x, y, 0));+ inner.push(name.startsWith('mouth') ? mouthInner(x, y) : 0);+ }+ const layer = R.addLayer(name, imgs[name], mesh, { color: [0.4, 1, 0.8, 0.6] });+ layer.visible = false;+ items[name] = { mesh, W, inner, layer };+ }+ const tmp = [0, 0];+ let lastShape = null;+ const eyeState = [0, 1].map(() => ({ cur: 'open', prev: 'open', t: 1 }));++ function place(item, P, phys, squash, width = 1) {+ const r = item.mesh.rest, o = item.mesh.pos;+ for (let k = 0; k < item.W.length; k++) {+ let x = r[k * 2];+ let y = r[k * 2 + 1];+ const w = item.inner[k];+ if (w > 0) {+ const line = mouthLineY(x);+ y = line + (y - line) * (1 + (squash - 1) * w);+ x = mouthCenterX() + (x - mouthCenterX()) * (1 + (width - 1) * w);+ }+ deformBase(x, y, item.W[k], P, phys, tmp);+ o[k * 2] = tmp[0]; o[k * 2 + 1] = tmp[1];+ }+ }++ return {+ /**+ * Show / hide and deform the sprites for this frame.+ * Returns which eyes are covered by a sprite, so the layered eye parts can be hidden.+ */+ update(P, phys, dt = 1 / 60) {+ for (const it of Object.values(items)) it.layer.visible = false;+ const covered = [false, false];+ const eyes = [+ [P.ParamEyeROpen, P.ParamEyeSmile],+ [P.ParamEyeLOpen, P.eyeSmileL ?? P.ParamEyeSmile],+ ];+ // the frame is picked by openness; when it changes, the new drawing fades in over+ // EYE_FADE_SEC (a time-based cross-fade, so no double image is ever held)+ eyes.forEach(([open, smile], i) => {+ const st = eyeState[i];+ const want = eyeSprite(open, smile) ?? 'open';+ if (want !== st.cur) { st.prev = st.cur; st.cur = want; st.t = 0; }+ st.t = Math.min(1, st.t + dt / EYE_FADE_SEC);+ const k = sstep(0, 1, st.t);+ const show = (name, alpha) => {+ if (name === 'open' || alpha <= 0.001) return;+ const it = items[`${name}_${i}`];+ if (!it) return;+ it.layer.visible = true;+ it.layer.alpha = alpha;+ place(it, P, phys, 1);+ };+ // the outgoing frame stays fully drawn underneath while the new one fades in on top;+ // fading out to the open eye works the other way round+ // whichever frame is drawn higher up (closed/smile above half, both above the open eye)+ // does the fading, the lower one stays solid, so the eye is never see-through+ const rank = n => (n === 'open' ? -1 : n === 'eyes_half' ? 0 : 1);+ if (st.t >= 1) show(st.cur, 1);+ else if (rank(st.cur) > rank(st.prev)) { show(st.prev, 1); show(st.cur, k); }+ else { show(st.cur, 1); show(st.prev, 1 - k); }+ covered[i] = st.cur !== 'open' && k >= 0.999;+ });+ const shape = mouthShape(P.ParamMouthOpenY, P.ParamMouthForm, lastShape);+ lastShape = shape;+ const def = shape && MOUTH_SHAPES[shape];+ const mt = def && items[def.sprite];+ if (mt) {+ mt.layer.visible = true;+ // fade in right above the threshold so the closed line hands over softly+ mt.layer.alpha = sstep(MOUTH_OPEN_MIN, MOUTH_OPEN_MIN + 0.04, P.ParamMouthOpenY);+ // never squash a drawing below half its height: flatter looked like a blob+ const squash = Math.min(1.1, Math.max(0.5, P.ParamMouthOpenY / def.ref));+ place(mt, P, phys, squash, def.width);+ }+ return { eyes: covered, mouth: shape };+ },+ };+}diff --git a/samples/miko-qipao/built/layers.json b/samples/miko-qipao/built/layers.jsonnew file mode 100644index 0000000..d6a5ee9--- /dev/null+++ b/samples/miko-qipao/built/layers.json@@ -0,0 +1,189 @@+{+ "size": [+ 1254,+ 1254+ ],+ "build": "2d51269985",+ "layers": {+ "hand": [+ 237,+ 604,+ 347,+ 650+ ],+ "tassel_l": [+ 241,+ 411,+ 112,+ 198+ ],+ "tassel_r": [+ 851,+ 274,+ 101,+ 202+ ],+ "eye0_ball": [+ 442,+ 446,+ 104,+ 67+ ],+ "eye0_lash": [+ 422,+ 434,+ 120,+ 60+ ],+ "eye0_low": [+ 423,+ 490,+ 90,+ 30+ ],+ "eye0_crease": [+ 445,+ 421,+ 99,+ 40+ ],+ "eye1_ball": [+ 661,+ 379,+ 112,+ 77+ ],+ "eye1_lash": [+ 645,+ 363,+ 126,+ 61+ ],+ "eye1_low": [+ 651,+ 420,+ 78,+ 29+ ],+ "eye1_crease": [+ 662,+ 361,+ 107,+ 34+ ]+ },+ "eyes": [+ {+ "x0": 446,+ "x1": 541,+ "top": [+ 487.9,+ 471.87,+ 467.74,+ 463.73,+ 460.83,+ 457.94,+ 455.84,+ 454.12,+ 452.4,+ 451.58,+ 451.03,+ 450.48,+ 450.0,+ 450.0,+ 450.0,+ 450.0,+ 450.35,+ 451.04,+ 451.72,+ 453.24,+ 455.3,+ 457.86,+ 462.68,+ 481.26+ ],+ "bot": [+ 487.9,+ 497.85,+ 500.95,+ 503.43,+ 504.7,+ 505.97,+ 507.04,+ 507.27,+ 507.5,+ 507.73,+ 507.96,+ 507.6,+ 507.11,+ 506.62,+ 506.14,+ 505.01,+ 503.64,+ 502.26,+ 500.86,+ 499.21,+ 497.56,+ 495.9,+ 492.82,+ 481.26+ ]+ },+ {+ "x0": 665,+ "x1": 768,+ "top": [+ 417.07,+ 396.78,+ 392.1,+ 390.03,+ 387.96,+ 386.52,+ 385.63,+ 384.73,+ 383.95,+ 383.71,+ 383.46,+ 383.21,+ 383.09,+ 383.61,+ 384.14,+ 384.67,+ 385.29,+ 386.08,+ 386.87,+ 387.66,+ 388.86,+ 390.35,+ 391.84,+ 410.91+ ],+ "bot": [+ 417.07,+ 438.44,+ 446.17,+ 448.86,+ 451.0,+ 451.0,+ 451.0,+ 450.68,+ 449.63,+ 448.58,+ 447.52,+ 446.5,+ 445.5,+ 444.51,+ 443.51,+ 442.4,+ 441.15,+ 439.91,+ 438.66,+ 436.81,+ 434.25,+ 431.69,+ 427.46,+ 410.91+ ]+ }+ ]+}\ No newline at end of filediff --git a/samples/miko-qipao/built/sprites/sprites.json b/samples/miko-qipao/built/sprites/sprites.jsonnew file mode 100644index 0000000..5b26c8f--- /dev/null+++ b/samples/miko-qipao/built/sprites/sprites.json@@ -0,0 +1,65 @@+{+ "build": "dc153c8bb7",+ "layers": {+ "eyes_closed_0": [+ 417,+ 417,+ 147,+ 107+ ],+ "eyes_closed_1": [+ 641,+ 347,+ 133,+ 119+ ],+ "eyes_smile_0": [+ 417,+ 417,+ 147,+ 107+ ],+ "eyes_smile_1": [+ 641,+ 347,+ 133,+ 119+ ],+ "eyes_half_0": [+ 417,+ 417,+ 147,+ 107+ ],+ "eyes_half_1": [+ 641,+ 347,+ 133,+ 119+ ],+ "mouth_a": [+ 575,+ 538,+ 123,+ 73+ ],+ "mouth_a_half": [+ 575,+ 538,+ 123,+ 73+ ],+ "mouth_i": [+ 575,+ 538,+ 123,+ 73+ ],+ "mouth_o": [+ 575,+ 538,+ 123,+ 73+ ]+ }+}\ No newline at end of filediff --git a/tests/scaffold.test.ts b/tests/scaffold.test.tsnew file mode 100644index 0000000..6ad61a1--- /dev/null+++ b/tests/scaffold.test.ts@@ -0,0 +1,2 @@+import { expect, test } from 'vitest';+test('test runner is available', () => expect(1 + 1).toBe(2));diff --git a/tsconfig.json b/tsconfig.jsonnew file mode 100644index 0000000..dbc997f--- /dev/null+++ b/tsconfig.json@@ -0,0 +1,27 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "lib": [+ "ES2022",+ "DOM",+ "DOM.Iterable"+ ],+ "module": "ESNext",+ "moduleResolution": "Bundler",+ "jsx": "react-jsx",+ "strict": true,+ "allowJs": true,+ "checkJs": false,+ "resolveJsonModule": true,+ "esModuleInterop": true,+ "skipLibCheck": true,+ "noEmit": true+ },+ "include": [+ "src",+ "tests",+ "e2e",+ "vite.config.ts",+ "playwright.config.ts"+ ]+}diff --git a/vite.config.ts b/vite.config.tsnew file mode 100644index 0000000..a37cdd3--- /dev/null+++ b/vite.config.ts@@ -0,0 +1,19 @@+import { defineConfig } from 'vitest/config';+import react from '@vitejs/plugin-react';+import { readFileSync } from 'node:fs';+export default defineConfig({+ plugins: [react(), {+ name: 'sample-rig',+ resolveId(id) {+ if (id === 'virtual:sample-rig') return '\0sample-rig';+ },+ load(id) {+ if (id === '\0sample-rig') {+ const json = readFileSync(new URL('./samples/miko-qipao/rig.json', import.meta.url), 'utf8');+ return `export default ${json}`;+ }+ },+ }],+ publicDir: 'samples',+ test: { include: ['tests/**/*.test.ts'] },+});