diff --git a/ai/generative-ai-service/card-recognition-generator/LICENSE b/ai/generative-ai-service/card-recognition-generator/LICENSE new file mode 100644 index 000000000..bb91ea780 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/LICENSE @@ -0,0 +1,35 @@ +Copyright (c) 2026 Oracle and/or its affiliates. + +The Universal Permissive License (UPL), Version 1.0 + +Subject to the condition set forth below, permission is hereby granted to any +person obtaining a copy of this software, associated documentation and/or data +(collectively the "Software"), free of charge and under any and all copyright +rights in the Software, and any and all patent rights owned or freely +licensable by each licensor hereunder covering either (i) the unmodified +Software as contributed to or provided by such licensor, or (ii) the Larger +Works (as defined below), to deal in both + +(a) the Software, and +(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if +one is included with the Software (each a "Larger Work" to which the Software +is contributed by such licensors), + +without restriction, including without limitation the rights to copy, create +derivative works of, display, perform, and distribute the Software and make, +use, sell, offer for sale, import, export, have made, and have sold the +Software and the Larger Work(s), and to sublicense the foregoing rights on +either these or other terms. + +This license is subject to the following condition: +The above copyright notice and either this complete permission notice or at +a minimum a reference to the UPL must be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ai/generative-ai-service/card-recognition-generator/README.md b/ai/generative-ai-service/card-recognition-generator/README.md new file mode 100644 index 000000000..5934cc27b --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/README.md @@ -0,0 +1,86 @@ +# Recognition Card Generator + +Internal demo application: generates branded employee recognition cards (background via image API, typography and layout composed in software), plus a web UI to upload employee CSV data, generate previews, download PNGs, and compose email drafts. + +All application source and assets live in **`files/`**. This README stays at the repository root so the repo is easy to browse on GitHub. + +--- + +## Repository layout + +| Path | Purpose | +|------|--------| +| `files/src/` | FastAPI backend (`react_api.py`, image client) | +| `files/frontend/` | React (Vite + TypeScript) web UI | +| `files/data/` | Sample CSV files for testing | +| `files/requirements.txt` | Python dependencies | +| `files/output/` | Generated PNGs (created at runtime, **not** committed) | + +--- + +## Prerequisites + +- **Python 3.10+** (3.11+ recommended) +- **Node.js 20+** and npm +- API credentials for your image provider (set via environment variables; see `files/src/grok_openai_image.py` and `files/src/react_api.py`) + +--- + +## Quick start (local) + +### 1. Backend + +```bash +cd files +python -m venv .venv +.venv\Scripts\activate +pip install -r requirements.txt +``` + +Configure environment (at minimum, the variables your `ENDPOINT` / OpenAI-compatible image API expects), then: + +```bash +python -m uvicorn src.react_api:app --host 127.0.0.1 --port 8055 --reload +``` + +### 2. Frontend + +In a second terminal: + +```bash +cd files/frontend +npm install +npm run dev +``` + +Open the URL Vite prints (usually `http://localhost:5173/`). The dev server proxies `/api/*` to `http://127.0.0.1:8055`. + +### 3. Optional: company logo assets + +Place official wordmarks in `files/frontend/public/` as `oracle-logo-red.png` and `oracle-logo-white.png` for exact on-card branding. Employee photos go under `files/frontend/public/employee-photos/`. + +--- + +## CSV format + +Use a header row. Important columns include `full_name`, `manager_name`, `manager_position`, `photo_asset_id` (path under `employee-photos/`), and **`employee_email`** (or `email` / `work_email`) for the email button. See `files/data/sample_employees_hr_use_cases.csv`. + +--- + +## If you see a stray `frontend` folder at the repository root + +The real app is under `files/frontend/`. A near-empty `frontend` at the top level can appear if a dev server held files open during a move. **Stop** any running `npm run dev` / Vite process, then delete the root `frontend` folder. Use only `files/frontend/` for the UI. + +--- + +## Production notes + +- Do **not** commit `files/output/`, `.env`, or `node_modules/`. +- Tune API keys and base URLs via environment variables appropriate for your company’s deployment. +- For enterprise email delivery with attachments, consider a server-side mail integration instead of relying on `mailto:` alone. + +--- + +## License / confidentiality + +Use and distribution are subject to your employer’s policies. Do not commit secrets or production credentials. diff --git a/ai/generative-ai-service/card-recognition-generator/files/.env.example b/ai/generative-ai-service/card-recognition-generator/files/.env.example new file mode 100644 index 000000000..0caac7c15 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/.env.example @@ -0,0 +1,8 @@ +# Copy to `files/.env` and fill in. Never commit real secrets. +# Image API (see files/src/grok_openai_image.py) + +ENDPOINT= +OPENAI_API_KEY= +# Optional depending on provider: +# OCI_PROJECT_ID= +# COMPARTMENT_ID= diff --git a/ai/generative-ai-service/card-recognition-generator/files/data/Oracle+Redwood+Brand+Style+Guide-Oct2024-small.pdf b/ai/generative-ai-service/card-recognition-generator/files/data/Oracle+Redwood+Brand+Style+Guide-Oct2024-small.pdf new file mode 100644 index 000000000..99a882b7f Binary files /dev/null and b/ai/generative-ai-service/card-recognition-generator/files/data/Oracle+Redwood+Brand+Style+Guide-Oct2024-small.pdf differ diff --git a/ai/generative-ai-service/card-recognition-generator/files/data/sample_employees_hr_use_cases.csv b/ai/generative-ai-service/card-recognition-generator/files/data/sample_employees_hr_use_cases.csv new file mode 100644 index 000000000..0f20b6e93 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/data/sample_employees_hr_use_cases.csv @@ -0,0 +1,4 @@ +employee_id,first_name,full_name,employee_email,role,department,region,latest_win,recognition_category,manager_name,tone,language,photo_asset_id,output_channel +E12345,Sara,Sara Al-Farsi,sara.alfarsi@example.com,Senior HR Analyst,HR,Middle East,Led onboarding improvements for 500 new hires,Operational Excellence,Omar Hassan,"warm, professional, celebratory",English,/employee-photos/sara-alfarsi.png,email +E12346,David,David Clarke,david.clarke@example.com,Engineering Manager,Engineering,EMEA,Completed first 90 days with strong team impact,Team Integration,Emma Wright,"warm, professional, celebratory",English,/employee-photos/david-clarke.png,intranet +E12347,Ana,Ana Rodrigues,ana.rodrigues@example.com,People Partner,HR,Americas,Launched mentorship circles across 4 offices,Employee Experience,Maria Torres,"warm, professional, celebratory",English,/employee-photos/ana-rodrigues.png,email diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/eslint.config.js b/ai/generative-ai-service/card-recognition-generator/files/frontend/eslint.config.js new file mode 100644 index 000000000..ef614d25c --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/eslint.config.js @@ -0,0 +1,22 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' +import { defineConfig, globalIgnores } from 'eslint/config' + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + js.configs.recommended, + tseslint.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], + languageOptions: { + globals: globals.browser, + }, + }, +]) diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/index.html b/ai/generative-ai-service/card-recognition-generator/files/frontend/index.html new file mode 100644 index 000000000..405581b94 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/index.html @@ -0,0 +1,18 @@ + + + + + + + + + Recognition Card Studio + + +
+ + + diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/package-lock.json b/ai/generative-ai-service/card-recognition-generator/files/frontend/package-lock.json new file mode 100644 index 000000000..8d48ee7d3 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/package-lock.json @@ -0,0 +1,2742 @@ +{ + "name": "frontend", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "frontend", + "version": "0.0.0", + "dependencies": { + "react": "^19.2.5", + "react-dom": "^19.2.5" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/node": "^24.12.2", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^6.0.1", + "eslint": "^10.2.1", + "eslint-plugin-react-hooks": "^7.1.1", + "eslint-plugin-react-refresh": "^0.5.2", + "globals": "^17.5.0", + "typescript": "~6.0.2", + "typescript-eslint": "^8.58.2", + "vite": "^8.0.10" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@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.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@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.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "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.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emnapi/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "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.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.5.tgz", + "integrity": "sha512-eIJYKTCECbP/nsKaaruF6LW967mtbQbsw4JTtSVkUQc9MneSkbrgPJAbKl9nWr0ZeowV8BfsarBmPpBzGelA2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.1.tgz", + "integrity": "sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "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.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "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/wasm-runtime": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", + "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.127.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.127.0.tgz", + "integrity": "sha512-aIYXQBo4lCbO4z0R3FHeucQHpF46l2LbMdxRvqvuRuW2OxdnSkcng5B8+K12spgLDj93rtN3+J2Vac/TIO+ciQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.17.tgz", + "integrity": "sha512-s70pVGhw4zqGeFnXWvAzJDlvxhlRollagdCCKRgOsgUOH3N1l0LIxf83AtGzmb5SiVM4Hjl5HyarMRfdfj3DaQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.17.tgz", + "integrity": "sha512-4ksWc9n0mhlZpZ9PMZgTGjeOPRu8MB1Z3Tz0Mo02eWfWCHMW1zN82Qz/pL/rC+yQa+8ZnutMF0JjJe7PjwasYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.17.tgz", + "integrity": "sha512-SUSDOI6WwUVNcWxd02QEBjLdY1VPHvlEkw6T/8nYG322iYWCTxRb1vzk4E+mWWYehTp7ERibq54LSJGjmouOsw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.17.tgz", + "integrity": "sha512-hwnz3nw9dbJ05EDO/PvcjaaewqqDy7Y1rn1UO81l8iIK1GjenME75dl16ajbvSSMfv66WXSRCYKIqfgq2KCfxw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.17.tgz", + "integrity": "sha512-IS+W7epTcwANmFSQFrS1SivEXHtl1JtuQA9wlxrZTcNi6mx+FDOYrakGevvvTwgj2JvWiK8B29/qD9BELZPyXQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-e6usGaHKW5BMNZOymS1UcEYGowQMWcgZ71Z17Sl/h2+ZziNJ1a9n3Zvcz6LdRyIW5572wBCTH/Z+bKuZouGk9Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.17.tgz", + "integrity": "sha512-b/CgbwAJpmrRLp02RPfhbudf5tZnN9nsPWK82znefso832etkem8H7FSZwxrOI9djcdTP7U6YfNhbRnh7djErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-4EII1iNGRUN5WwGbF/kOh/EIkoDN9HsupgLQoXfY+D1oyJm7/F4t5PYU5n8SWZgG0FEwakyM8pGgwcBYruGTlA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-AH8oq3XqQo4IibpVXvPeLDI5pzkpYn0WiZAfT05kFzoJ6tQNzwRdDYQ45M8I/gslbodRZwW8uxLhbSBbkv96rA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-cLnjV3xfo7KslbU41Z7z8BH/E1y5mzUYzAqih1d1MDaIGZRCMqTijqLv76/P7fyHuvUcfGsIpqCdddbxLLK9rA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.17.tgz", + "integrity": "sha512-0phclDw1spsL7dUB37sIARuis2tAgomCJXAHZlpt8PXZ4Ba0dRP1e+66lsRqrfhISeN9bEGNjQs+T/Fbd7oYGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.17.tgz", + "integrity": "sha512-0ag/hEgXOwgw4t8QyQvUCxvEg+V0KBcA6YuOx9g0r02MprutRF5dyljgm3EmR02O292UX7UeS6HzWHAl6KgyhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.17.tgz", + "integrity": "sha512-LEXei6vo0E5wTGwpkJ4KoT3OZJRnglwldt5ziLzOlc6qqb55z4tWNq2A+PFqCJuvWWdP53CVhG1Z9NtToDPJrA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.17.tgz", + "integrity": "sha512-gUmyzBl3SPMa6hrqFUth9sVfcLBlYsbMzBx5PlexMroZStgzGqlZ26pYG89rBb45Mnia+oil6YAIFeEWGWhoZA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.17.tgz", + "integrity": "sha512-3hkiolcUAvPB9FLb3UZdfjVVNWherN1f/skkGWJP/fgSQhYUZpSIRr0/I8ZK9TkF3F7kxvJAk0+IcKvPHk9qQg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-rc.7", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.7.tgz", + "integrity": "sha512-qujRfC8sFVInYSPPMLQByRh7zhwkGFS4+tyMQ83srV1qrxL4g8E2tyxVVyxd0+8QeBM1mIk9KbWxkegRr76XzA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "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.12.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.2.tgz", + "integrity": "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/@types/react": { + "version": "19.2.14", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz", + "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.1.tgz", + "integrity": "sha512-BOziFIfE+6osHO9FoJG4zjoHUcvI7fTNBSpdAwrNH0/TLvzjsk2oo8XSSOT2HhqUyhZPfHv4UOffoJ9oEEQ7Ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.59.1", + "@typescript-eslint/type-utils": "8.59.1", + "@typescript-eslint/utils": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1", + "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.59.1", + "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.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.59.1.tgz", + "integrity": "sha512-HDQH9O/47Dxi1ceDhBXdaldtf/WV9yRYMjbjCuNk3qnaTD564qwv61Y7+gTxwxRKzSrgO5uhtw584igXVuuZkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.59.1", + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/typescript-estree": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1", + "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.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.59.1.tgz", + "integrity": "sha512-+MuHQlHiEr00Of/IQbE/MmEoi44znZHbR/Pz7Opq4HryUOlRi+/44dro9Ycy8Fyo+/024IWtw8m4JUMCGTYxDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.59.1", + "@typescript-eslint/types": "^8.59.1", + "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.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.59.1.tgz", + "integrity": "sha512-LwuHQI4pDOYVKvmH2dkaJo6YZCSgouVgnS/z7yBPKBMvgtBvyLqiLy9Z6b7+m/TRcX1NFYUqZetI5Y+aT4GEfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1" + }, + "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.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.1.tgz", + "integrity": "sha512-/0nEyPbX7gRsk0Uwfe4ALwwgxuA66d/l2mhRDNlAvaj4U3juhUtJNq0DsY8M2AYwwb9rEq2hrC3IcIcEt++iJA==", + "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.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.59.1.tgz", + "integrity": "sha512-klWPBR2ciQHS3f++ug/mVnWKPjBUo7icEL3FAO1lhAR1Z1i5NQYZ1EannMSRYcq5qCv5wNALlXr6fksRHyYl7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/typescript-estree": "8.59.1", + "@typescript-eslint/utils": "8.59.1", + "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.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.59.1.tgz", + "integrity": "sha512-ZDCjgccSdYPw5Bxh+my4Z0lJU96ZDN7jbBzvmEn0FZx3RtU1C7VWl6NbDx94bwY3V5YsgwRzJPOgeY2Q/nLG8A==", + "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.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.1.tgz", + "integrity": "sha512-OUd+vJS05sSkOip+BkZ/2NS8RMxrAAJemsC6vU3kmfLyeaJT0TftHkV9mcx2107MmsBVXXexhVu4F0TZXyMl4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.59.1", + "@typescript-eslint/tsconfig-utils": "8.59.1", + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/visitor-keys": "8.59.1", + "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/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.1.tgz", + "integrity": "sha512-3pIeoXhCeYH9FSCBI8P3iNwJlGuzPlYKkTlen2O9T1DSeeg8UG8jstq6BLk+Mda0qup7mgk4z4XL4OzRaxZ8LA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.59.1", + "@typescript-eslint/types": "8.59.1", + "@typescript-eslint/typescript-estree": "8.59.1" + }, + "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.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.1.tgz", + "integrity": "sha512-LdDNl6C5iJExcM0Yh0PwAIBb9PrSiCsWamF/JyEZawm3kFDnRoaq3LGE4bpyRao/fWeGKKyw7icx0YxrLFC5Cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.59.1", + "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/@vitejs/plugin-react": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.0.1.tgz", + "integrity": "sha512-l9X/E3cDb+xY3SWzlG1MOGt2usfEHGMNIaegaUGFsLkb3RCn/k8/TOXBcab+OndDI4TBtktT8/9BwwW8Vi9KUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "1.0.0-rc.7" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", + "babel-plugin-react-compiler": "^1.0.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "@rolldown/plugin-babel": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + } + } + }, + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "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/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/baseline-browser-mapping": { + "version": "2.10.23", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.23.tgz", + "integrity": "sha512-xwVXGqevyKPsiuQdLj+dZMVjidjJV508TBqexND5HrF89cGdCYCJFB3qhcxRHSeMctdCfbR1jrxBajhDy7o29g==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/browserslist": { + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "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.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001791", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001791.tgz", + "integrity": "sha512-yk0l/YSrOnFZk3UROpDLQD9+kC1l4meK/wed583AXrzoarMGJcbRi2Q4RaUYbKxYAsZ8sWmaSa/DsLmdBeI1vQ==", + "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/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-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/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.344", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.344.tgz", + "integrity": "sha512-4MxfbmNDm+KPh066EZy+eUnkcDPcZ35wNmOWzFuh/ijvHsve6kbLTLURy88uCNK5FbpN+yk2nQY6BYh1GEt+wg==", + "dev": true, + "license": "ISC" + }, + "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": "10.2.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.2.1.tgz", + "integrity": "sha512-wiyGaKsDgqXvF40P8mDwiUp/KQjE1FdrIEJsM8PZ3XCiniTMXS3OHWWUe5FI5agoCnr8x4xPrTDZuxsBlNHl+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.5.5", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.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", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.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", + "minimatch": "^10.2.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.1.1.tgz", + "integrity": "sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.24.4", + "@babel/parser": "^7.24.4", + "hermes-parser": "^0.25.1", + "zod": "^3.25.0 || ^4.0.0", + "zod-validation-error": "^3.5.0 || ^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0" + } + }, + "node_modules/eslint-plugin-react-refresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.5.2.tgz", + "integrity": "sha512-hmgTH57GfzoTFjVN0yBwTggnsVUF2tcqi7RJZHqi9lIezSs4eFyAMktA68YD4r5kNw1mxyY4dmkyoFDb3FIqrA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "eslint": "^9 || ^10" + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "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/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "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/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/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.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", + "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": "17.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.5.0.tgz", + "integrity": "sha512-qoV+HK2yFl/366t2/Cb3+xxPUo5BuMynomoDmiaZBIdbs+0pYbjfZU+twLhGKp4uCZ/+NbtpVepH5bGCxRyy2g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hermes-estree": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", + "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==", + "dev": true, + "license": "MIT" + }, + "node_modules/hermes-parser": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz", + "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hermes-estree": "0.25.1" + } + }, + "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/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/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/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "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/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/minimatch": { + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.5" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "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.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "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.38", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz", + "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==", + "dev": true, + "license": "MIT" + }, + "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/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/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.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.12.tgz", + "integrity": "sha512-W62t/Se6rA0Az3DfCL0AqJwXuKwBeYg6nOaIgzP+xZ7N5BFCI7DYi1qs6ygUYT6rvfi6t9k65UMLJC+PHZpDAA==", + "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.11", + "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.2.5", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.5.tgz", + "integrity": "sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.5", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.5.tgz", + "integrity": "sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.5" + } + }, + "node_modules/rolldown": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.17.tgz", + "integrity": "sha512-ZrT53oAKrtA4+YtBWPQbtPOxIbVDbxT0orcYERKd63VJTF13zPcgXTvD4843L8pcsI7M6MErt8QtON6lrB9tyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.127.0", + "@rolldown/pluginutils": "1.0.0-rc.17" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.0.0-rc.17", + "@rolldown/binding-darwin-arm64": "1.0.0-rc.17", + "@rolldown/binding-darwin-x64": "1.0.0-rc.17", + "@rolldown/binding-freebsd-x64": "1.0.0-rc.17", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.17", + "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.17", + "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-x64-musl": "1.0.0-rc.17", + "@rolldown/binding-openharmony-arm64": "1.0.0-rc.17", + "@rolldown/binding-wasm32-wasi": "1.0.0-rc.17", + "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.17", + "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.17" + } + }, + "node_modules/rolldown/node_modules/@rolldown/pluginutils": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.17.tgz", + "integrity": "sha512-n8iosDOt6Ig1UhJ2AYqoIhHWh/isz0xpicHTzpKBeotdVsTEcxsSA/i3EVM7gQAj0rU27OLAxCjzlj15IWY7bg==", + "dev": true, + "license": "MIT" + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "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/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/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "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/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/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "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": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.59.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.59.1.tgz", + "integrity": "sha512-xqDcFVBmlrltH64lklOVp1wYxgJr6LVdg3NamBgH2OOQDLFdTKfIZXF5PfghrnXQKXZGTQs8tr1vL7fJvq8CTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.59.1", + "@typescript-eslint/parser": "8.59.1", + "@typescript-eslint/typescript-estree": "8.59.1", + "@typescript-eslint/utils": "8.59.1" + }, + "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.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "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": "8.0.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.10.tgz", + "integrity": "sha512-rZuUu9j6J5uotLDs+cAA4O5H4K1SfPliUlQwqa6YEwSrWDZzP4rhm00oJR5snMewjxF5V/K3D4kctsUTsIU9Mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.4", + "postcss": "^8.5.10", + "rolldown": "1.0.0-rc.17", + "tinyglobby": "^0.2.16" + }, + "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", + "@vitejs/devtools": "^0.1.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.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 + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "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/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/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" + } + }, + "node_modules/zod": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-validation-error": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz", + "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + } + } + } +} diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/package.json b/ai/generative-ai-service/card-recognition-generator/files/frontend/package.json new file mode 100644 index 000000000..1de5ca547 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/package.json @@ -0,0 +1,30 @@ +{ + "name": "frontend", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "react": "^19.2.5", + "react-dom": "^19.2.5" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/node": "^24.12.2", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^6.0.1", + "eslint": "^10.2.1", + "eslint-plugin-react-hooks": "^7.1.1", + "eslint-plugin-react-refresh": "^0.5.2", + "globals": "^17.5.0", + "typescript": "~6.0.2", + "typescript-eslint": "^8.58.2", + "vite": "^8.0.10" + } +} diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/public/employee-photos/ana-rodrigues.png b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/employee-photos/ana-rodrigues.png new file mode 100644 index 000000000..733f003c0 Binary files /dev/null and b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/employee-photos/ana-rodrigues.png differ diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/public/employee-photos/david-clarke.png b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/employee-photos/david-clarke.png new file mode 100644 index 000000000..10d2c036a Binary files /dev/null and b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/employee-photos/david-clarke.png differ diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/public/employee-photos/sara-alfarsi.png b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/employee-photos/sara-alfarsi.png new file mode 100644 index 000000000..f99e3fa15 Binary files /dev/null and b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/employee-photos/sara-alfarsi.png differ diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/public/favicon.svg b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/favicon.svg new file mode 100644 index 000000000..6893eb132 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/public/icons.svg b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/icons.svg new file mode 100644 index 000000000..e9522193d --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/icons.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/public/oracle-logo-red.png b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/oracle-logo-red.png new file mode 100644 index 000000000..f6c263cbc Binary files /dev/null and b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/oracle-logo-red.png differ diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/public/oracle-logo-white.png b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/oracle-logo-white.png new file mode 100644 index 000000000..aec24140a Binary files /dev/null and b/ai/generative-ai-service/card-recognition-generator/files/frontend/public/oracle-logo-white.png differ diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/src/App.css b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/App.css new file mode 100644 index 000000000..3cbd02a16 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/App.css @@ -0,0 +1,536 @@ +/* Recognition Card Studio — App layout & components. + * Single-column layout: full-width form, preview appears below only after generation. + * Georgia typography throughout, Redwood-inspired palette, motion-aware polish. + */ + +/* ===== Page shell =============================================================== */ +.page { + width: min(920px, 100%); + margin: 0 auto; + padding: 2.25rem 1.5rem 4rem; + flex: 1; +} + +/* ===== Hero ===================================================================== */ +.hero { + margin-bottom: 2rem; + max-width: 760px; +} + +.hero h1 { + margin: 0 0 0.7rem; + font-size: clamp(2rem, 3.4vw, 2.8rem); + font-weight: 700; + line-height: 1.1; + color: var(--ink); + letter-spacing: -0.01em; +} + +.hero-subtitle { + margin: 0; + font-size: 1.05rem; + line-height: 1.55; + color: var(--ink-soft); + max-width: 640px; + font-style: italic; +} + +/* ===== Stacked layout (form → preview) ========================================= */ +.layout-stack { + display: flex; + flex-direction: column; + gap: 2rem; + width: 100%; +} + +/* ===== Panels ==================================================================== */ +.panel { + background: var(--surface-warm); + border: 1px solid var(--line); + border-radius: 18px; + box-shadow: var(--shadow-md); + padding: 1.5rem; + position: relative; +} + +.control-panel { + display: flex; + flex-direction: column; + gap: 1.1rem; + width: 100%; +} + +/* ===== Step cards inside the control panel ===================================== */ +.step { + display: flex; + flex-direction: column; + gap: 0.65rem; + padding: 1.1rem 1.15rem; + border: 1px solid var(--line); + border-radius: 14px; + background: var(--surface); + transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; +} + +.step:hover { + border-color: rgba(45, 46, 50, 0.18); +} + +.step.is-focus { + border-color: rgba(197, 19, 26, 0.4); + box-shadow: 0 0 0 4px rgba(197, 19, 26, 0.06); +} + +.step.is-complete { + border-color: rgba(90, 123, 127, 0.4); +} + +.step-header { + display: flex; + align-items: center; + gap: 0.7rem; + margin-bottom: 0.2rem; +} + +.step-num { + display: inline-grid; + place-items: center; + width: 26px; + height: 26px; + border-radius: 999px; + background: var(--ink); + color: var(--cream-soft); + font-size: 0.82rem; + font-weight: 700; + font-style: italic; + flex-shrink: 0; +} + +.step.is-focus .step-num { + background: var(--oracle-red); +} + +.step.is-complete .step-num { + background: var(--olive); +} + +.step h3 { + margin: 0; + font-size: 1.05rem; + font-weight: 700; + color: var(--ink); + letter-spacing: -0.005em; +} + +.field { + display: flex; + flex-direction: column; + gap: 0.32rem; +} + +.field + .field { + margin-top: 0.5rem; +} + +.field-label { + font-size: 0.78rem; + font-weight: 700; + letter-spacing: 0.04em; + text-transform: uppercase; + color: var(--slate); +} + +.helper { + margin: 0; + font-size: 0.85rem; + color: var(--slate); + line-height: 1.5; + font-style: italic; +} + +/* ===== Form controls ============================================================ */ +.input, +.select, +.file-input { + width: 100%; + font-family: var(--font-serif); + font-size: 0.98rem; + color: var(--ink); + background: var(--surface); + border: 1px solid var(--line); + border-radius: 10px; + padding: 0.7rem 0.85rem; + transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; +} + +.select { + appearance: none; + -webkit-appearance: none; + background-image: url("data:image/svg+xml;utf8,"); + background-repeat: no-repeat; + background-position: right 0.95rem center; + padding-right: 2.5rem; + cursor: pointer; +} + +.input:hover, +.select:hover, +.file-input:hover { + border-color: rgba(45, 46, 50, 0.22); +} + +.input:focus, +.select:focus, +.file-input:focus { + outline: none; + border-color: var(--oracle-red); + box-shadow: 0 0 0 4px rgba(197, 19, 26, 0.12); + background: var(--cream-soft); +} + +.input:disabled, +.select:disabled, +.file-input:disabled { + opacity: 0.55; + cursor: not-allowed; + background: var(--cream-soft); +} + +.file-input { + cursor: pointer; +} + +/* Style the native file input button cross-browser. */ +.file-input::file-selector-button { + font-family: var(--font-serif); + font-size: 0.9rem; + font-weight: 700; + margin-right: 0.85rem; + padding: 0.45rem 0.85rem; + border-radius: 8px; + border: 1px solid var(--line); + background: var(--cream-soft); + color: var(--ink); + cursor: pointer; + transition: background 0.15s ease; +} + +.file-input::file-selector-button:hover { + background: var(--cream-deep); +} + +/* ===== Buttons ================================================================== */ +.btn { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + font-family: var(--font-serif); + font-size: 1rem; + font-weight: 700; + padding: 0.85rem 1.2rem; + border-radius: 12px; + border: 1px solid transparent; + cursor: pointer; + transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease; + letter-spacing: -0.005em; +} + +.btn-primary { + background: var(--oracle-red); + color: #fff; + box-shadow: 0 6px 14px -8px rgba(197, 19, 26, 0.6); +} + +.btn-primary:hover:not(:disabled) { + background: var(--oracle-red-deep); + transform: translateY(-1px); + box-shadow: 0 12px 22px -10px rgba(197, 19, 26, 0.7); +} + +.btn-primary:active:not(:disabled) { + transform: translateY(0); +} + +.btn-primary:disabled { + opacity: 0.55; + cursor: not-allowed; + box-shadow: none; +} + +.btn-ghost { + background: transparent; + color: var(--ink); + border: 1px solid var(--line); +} + +.btn-ghost:hover:not(:disabled) { + background: var(--cream-soft); + border-color: rgba(45, 46, 50, 0.2); +} + +.generate-btn { + width: 100%; +} + +.btn-spinner { + width: 14px; + height: 14px; + border-radius: 50%; + border: 2px solid currentColor; + border-right-color: transparent; + animation: spin 0.7s linear infinite; +} + +@keyframes spin { + to { + transform: rotate(360deg); + } +} + +/* ===== Error message ============================================================ */ +.error { + margin: 0; + padding: 0.7rem 0.9rem; + border-radius: 10px; + background: rgba(197, 19, 26, 0.08); + border: 1px solid rgba(197, 19, 26, 0.22); + color: var(--oracle-red-deep); + font-size: 0.9rem; + font-style: italic; +} + +/* ===== Preview panel ============================================================ */ +.preview-panel { + display: flex; + flex-direction: column; + gap: 1rem; + min-height: 0; + width: 100%; + max-width: min(980px, 100%); + margin-inline: auto; + animation: previewIn 0.4s ease both; +} + +.email-hint { + margin: 0; + font-size: 0.84rem; + color: var(--slate); + font-style: italic; + padding: 0.55rem 0.75rem; + border-radius: 10px; + background: var(--cream-soft); + border: 1px solid var(--line-soft); +} + +.email-hint.is-warn { + background: rgba(197, 19, 26, 0.06); + border-color: rgba(197, 19, 26, 0.18); + color: var(--oracle-red-deep); +} + +.email-hint code { + font-family: var(--font-mono); + font-size: 0.88em; + padding: 0.1rem 0.35rem; + border-radius: 4px; + background: rgba(45, 46, 50, 0.06); +} + +.preview-header { + display: flex; + align-items: baseline; + justify-content: space-between; + gap: 1rem; + flex-wrap: wrap; +} + +.preview-header h2 { + margin: 0; + font-size: 1.15rem; + font-weight: 700; + color: var(--ink); +} + +.preview-meta { + font-size: 0.82rem; + color: var(--muted); + font-style: italic; +} + +.preview-stage { + position: relative; + width: 100%; + aspect-ratio: 16 / 9; + border-radius: 14px; + background: var(--cream-soft); + border: 1px dashed rgba(45, 46, 50, 0.22); + display: grid; + place-items: center; + overflow: hidden; +} + +.preview-image { + width: 100%; + height: 100%; + object-fit: contain; + display: block; + border-radius: 14px; + background: #fff; + animation: previewIn 0.45s ease both; +} + +@keyframes previewIn { + from { + opacity: 0; + transform: scale(0.985); + } + to { + opacity: 1; + transform: scale(1); + } +} + +/* ===== Empty state =============================================================== */ +.empty { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + gap: 0.85rem; + padding: 1.5rem; + color: var(--slate); + max-width: 420px; +} + +.empty-icon { + width: 88px; + height: 88px; + border-radius: 999px; + background: + radial-gradient(circle at 30% 30%, rgba(214, 162, 58, 0.5), transparent 60%), + radial-gradient(circle at 70% 70%, rgba(90, 123, 127, 0.45), transparent 60%), + var(--cream-deep); + display: grid; + place-items: center; + font-size: 2rem; + color: var(--ink); + font-style: italic; + font-weight: 700; +} + +.empty h3 { + margin: 0; + font-size: 1.15rem; + color: var(--ink); + font-weight: 700; +} + +.empty p { + margin: 0; + font-size: 0.95rem; + line-height: 1.5; + color: var(--slate); + font-style: italic; +} + +/* ===== Loading skeleton (shows while generating) ================================ */ +.preview-loading { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.85rem; + color: var(--slate); + font-style: italic; +} + +.loader-ring { + width: 36px; + height: 36px; + border-radius: 50%; + border: 3px solid rgba(45, 46, 50, 0.12); + border-top-color: var(--oracle-red); + animation: spin 0.9s linear infinite; +} + +/* ===== Action bar under the preview ============================================= */ +.preview-actions { + display: flex; + flex-wrap: wrap; + gap: 0.6rem; +} + +/* ===== Prompt details (collapsible) ============================================= */ +.prompt-box { + margin-top: 0.4rem; + border: 1px solid var(--line); + border-radius: 12px; + background: var(--cream-soft); + overflow: hidden; +} + +.prompt-box summary { + cursor: pointer; + padding: 0.75rem 1rem; + font-weight: 700; + font-size: 0.92rem; + color: var(--ink); + user-select: none; + list-style: none; + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.5rem; +} + +.prompt-box summary::-webkit-details-marker { + display: none; +} + +.prompt-box summary::after { + content: '+'; + font-weight: 700; + font-size: 1.1rem; + color: var(--slate); + transition: transform 0.2s ease; + display: inline-block; +} + +.prompt-box[open] summary::after { + content: '\2212'; +} + +.prompt-box-body { + padding: 0 1rem 1rem; + border-top: 1px solid var(--line); + background: #fff; +} + +.prompt-box-body p { + margin: 0.85rem 0 0; + font-size: 0.86rem; + line-height: 1.55; + color: var(--slate); +} + +.prompt-box-body p.mono { + font-family: var(--font-mono); + font-size: 0.78rem; + background: var(--cream-soft); + padding: 0.65rem 0.8rem; + border-radius: 8px; + white-space: pre-wrap; + word-break: break-word; + color: var(--ink-soft); +} + +/* ===== Reduced motion =========================================================== */ +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/src/App.tsx b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/App.tsx new file mode 100644 index 000000000..4a68c2ffd --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/App.tsx @@ -0,0 +1,611 @@ +import { useMemo, useState } from 'react' +import type { ChangeEvent } from 'react' +import './App.css' + +type EmployeeRow = { + employee_id: string + full_name: string + employee_email: string + position: string + department: string + latest_win: string + recognition_category: string + manager_name: string + manager_position: string + tone: string + language: string + gender: string + photo_asset_id: string +} + +/** Dedicated API port (avoid 8001 — often stacked stale listeners). Override with VITE_API_BASE_URL. */ +const RECOGNITION_API_PORT = 8055 + +// Dev: same-origin /api → Vite proxy → http://127.0.0.1:8055 +const API_BASE = + import.meta.env.VITE_API_BASE_URL ?? + (import.meta.env.DEV ? '' : `http://127.0.0.1:${RECOGNITION_API_PORT}`) + +function buildApiPath(path: string) { + const base = (API_BASE || '').replace(/\/$/, '') + const normalized = path.startsWith('/') ? path : `/${path}` + return base ? `${base}${normalized}` : normalized +} + +type GenerateCardPayload = { + fingerprint?: string + api_schema_version?: number + photo_passed_to_model?: boolean + photo_exact_overlay?: boolean + photo_path_absolute?: string + photo_path_used?: string + project_root?: string + prompt?: string + image_base64?: string +} + +const ORACLE_THEMES = ['Oracle Dark', 'Oracle Light'] +const RECOGNITION_TYPES = [ + 'Welcome', + 'Milestone', + 'Performance', + 'Team Contribution', + 'Culture & Values', + 'Promotion', +] +const SAMPLE_PHOTO_MAP: Record = { + E12345: '/employee-photos/sara-alfarsi.png', + E12346: '/employee-photos/david-clarke.png', + E12347: '/employee-photos/ana-rodrigues.png', + photo_E12345_v1: '/employee-photos/sara-alfarsi.png', +} + +function resolvePhotoAssetPath(photoAssetId: string, employeeId: string): string { + const raw = photoAssetId + .replace(/[\u201c\u201d]/g, '"') + .replace(/[\u2018\u2019]/g, "'") + .replace(/[\u200b\ufeff]/g, '') + .trim() + .replace(/\\/g, '/') + .replace(/^['"]+|['"]+$/g, '') + .replace(/[.,;:]+$/g, '') + if (!raw) return SAMPLE_PHOTO_MAP[employeeId] || '' + if ( + raw.startsWith('http://') || + raw.startsWith('https://') || + raw.startsWith('data:') || + raw.startsWith('/') + ) { + return raw + } + if (SAMPLE_PHOTO_MAP[raw]) return SAMPLE_PHOTO_MAP[raw] + if (raw.includes('.')) return `/employee-photos/${raw}` + return `/employee-photos/${raw}.png` +} + +function parseCsvLine(line: string): string[] { + const values: string[] = [] + let current = '' + let inQuotes = false + for (let i = 0; i < line.length; i += 1) { + const ch = line[i] + if (ch === '"') { + const next = line[i + 1] + if (inQuotes && next === '"') { + current += '"' + i += 1 + } else { + inQuotes = !inQuotes + } + continue + } + if (ch === ',' && !inQuotes) { + values.push(current.trim()) + current = '' + continue + } + current += ch + } + values.push(current.trim()) + return values +} + +function parseCsv(content: string): EmployeeRow[] { + const lines = content.split(/\r?\n/).filter((line) => line.trim().length > 0) + if (lines.length < 2) return [] + const headers = parseCsvLine(lines[0]).map((h) => h.trim().toLowerCase()) + + return lines.slice(1).map((line) => { + const values = parseCsvLine(line) + const get = (name: string) => values[headers.indexOf(name)] ?? '' + return { + employee_id: get('employee_id') || `ID-${Math.random().toString(36).slice(2, 7)}`, + full_name: get('full_name') || get('first_name') || 'Employee', + employee_email: + get('employee_email') || + get('work_email') || + get('email') || + get('e_mail') || + '', + position: get('position') || get('role') || 'Team Member', + department: get('department') || 'General', + latest_win: get('latest_win') || 'Outstanding contribution', + recognition_category: get('recognition_category') || 'Recognition', + manager_name: get('manager_name') || 'Manager', + manager_position: get('manager_position') || `${get('department') || 'Team'} Manager`, + tone: get('tone') || 'professional and warm', + language: get('language') || 'English', + gender: get('gender') || 'female', + photo_asset_id: get('photo_asset_id') || '', + } + }) +} + +const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/ + +function buildCardFilename(row: EmployeeRow, recognitionTypeLabel: string): string { + const safeName = row.full_name.replace(/[^a-z0-9]+/gi, '_').toLowerCase() + const typeSlug = recognitionTypeLabel.replace(/\s+/g, '_').toLowerCase() + return `recognition_${safeName}_${typeSlug}.png` +} + +function dataUrlToPngBlob(dataUrl: string): Blob | null { + const m = /^data:image\/png;base64,(.+)$/i.exec(dataUrl.trim()) + if (!m?.[1]) return null + try { + const bin = atob(m[1]) + const bytes = new Uint8Array(bin.length) + for (let i = 0; i < bin.length; i += 1) bytes[i] = bin.charCodeAt(i) + return new Blob([bytes], { type: 'image/png' }) + } catch { + return null + } +} + +/** + * Build a mailto: link that Outlook / OWA / Apple Mail all accept. + * + * Important: do **not** percent-encode the entire address as `user%40domain.com`. Microsoft clients + * often leave the **To** field blank when the mailbox part is fully encoded. RFC 6068 allows an + * unencoded addr-spec here; we only use URLSearchParams for subject/body. + */ +function buildMailtoHref(recipient: string, subject: string, body: string): string { + const addr = recipient.trim() + const params = new URLSearchParams() + params.set('subject', subject) + params.set('body', body) + return `mailto:${addr}?${params.toString()}` +} + +/** + * `navigator.share({ files })` on **Windows** (Edge/Chrome → Outlook / OWA) is buggy: it opens a + * draft with an **empty** attachment named "no_name" and may omit **To**. Skip file-sharing on + * Windows and use download + mailto instead. + */ +function shouldSkipWebShareFiles(): boolean { + if (typeof navigator === 'undefined') return true + return /Windows NT/i.test(navigator.userAgent || '') +} + +function App() { + const [rows, setRows] = useState([]) + const [selectedRowId, setSelectedRowId] = useState('') + const [recognitionType, setRecognitionType] = useState(RECOGNITION_TYPES[2]) + const [recognitionContext, setRecognitionContext] = useState('') + const [selectedTheme, setSelectedTheme] = useState(ORACLE_THEMES[0]) + const [isGenerating, setIsGenerating] = useState(false) + const [errorMessage, setErrorMessage] = useState('') + const [generatedImage, setGeneratedImage] = useState('') + const [generatedPrompt, setGeneratedPrompt] = useState('') + const [photoDebug, setPhotoDebug] = useState('') + const [generatedAt, setGeneratedAt] = useState(null) + /** Preview panel is shown only after the user successfully clicks Generate at least once. */ + const [previewShown, setPreviewShown] = useState(false) + const [emailError, setEmailError] = useState('') + + const selectedRow = useMemo( + () => rows.find((row) => row.employee_id === selectedRowId) ?? rows[0], + [rows, selectedRowId], + ) + const hasRows = rows.length > 0 + const employeePhotoFromSheet = resolvePhotoAssetPath( + selectedRow?.photo_asset_id || '', + selectedRow?.employee_id || '', + ) + + async function onUploadCsv(event: ChangeEvent) { + const file = event.target.files?.[0] + if (!file) return + const text = await file.text() + const parsed = parseCsv(text) + setRows(parsed) + setSelectedRowId(parsed[0]?.employee_id ?? '') + setGeneratedImage('') + setGeneratedPrompt('') + setPhotoDebug('') + setPreviewShown(false) + setGeneratedAt(null) + setEmailError('') + setErrorMessage(parsed.length ? '' : 'No valid rows found in the CSV file.') + } + + async function generateCard() { + if (!selectedRow) { + setErrorMessage('Please upload a CSV and select an employee first.') + return + } + try { + setIsGenerating(true) + setErrorMessage('') + const endpoint = buildApiPath('/api/generate-card') + const response = await fetch(endpoint, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + employee_name: selectedRow.full_name, + manager_name: selectedRow.manager_name, + manager_position: selectedRow.manager_position, + recognition_type: recognitionType, + theme: selectedTheme, + has_photo: Boolean(employeePhotoFromSheet), + photo_asset_id: employeePhotoFromSheet, + }), + }) + const payload = await response.json() + if (!response.ok) { + throw new Error(payload?.detail || 'Generation failed') + } + const p = payload as GenerateCardPayload + setGeneratedImage(`data:image/png;base64,${p.image_base64 ?? ''}`) + setGeneratedPrompt(p.prompt || '') + setGeneratedAt(new Date()) + setPreviewShown(true) + const exactOverlay = p.photo_exact_overlay === true + setPhotoDebug( + [ + `endpoint=${endpoint}`, + `fingerprint=${p.fingerprint ?? '?'}`, + `schema=${p.api_schema_version ?? '?'}`, + `exact_overlay=${exactOverlay}`, + `requested_photo=${employeePhotoFromSheet || '(none)'}`, + `resolved=${p.photo_path_absolute || p.photo_path_used || '(none)'}`, + ] + .filter(Boolean) + .join(' | '), + ) + } catch (err) { + setErrorMessage(err instanceof Error ? err.message : 'Failed to generate card.') + } finally { + setIsGenerating(false) + } + } + + function downloadImage() { + if (!generatedImage || !selectedRow) return + const a = document.createElement('a') + a.href = generatedImage + a.download = buildCardFilename(selectedRow, recognitionType) + document.body.appendChild(a) + a.click() + document.body.removeChild(a) + } + + /** + * Email flow: + * - **Mobile / macOS (not Windows):** try Web Share with PNG attachment when supported. + * - **Windows:** never use share-with-files (Outlook/OWA bug: empty "no_name" attachment, blank To). + * Always save the PNG, then open mailto with an **unencoded** address in `mailto:user@host?...`. + * - **mailto cannot embed binary attachments** in the URL; the downloaded file must be attached manually + * on Windows after the draft opens (we say so in the body). + */ + async function composeEmailWithCard() { + if (!generatedImage || !selectedRow) return + setEmailError('') + const to = selectedRow.employee_email.trim() + if (!to) { + setEmailError( + 'No employee email for this row. Add an employee_email column (or email / work_email) to your CSV.', + ) + return + } + if (!EMAIL_RE.test(to)) { + setEmailError('Employee email in the CSV does not look valid. Check the employee_email field.') + return + } + + const filename = buildCardFilename(selectedRow, recognitionType) + const blob = dataUrlToPngBlob(generatedImage) + if (!blob || blob.size === 0) { + setEmailError('Could not read the generated image data (empty file). Generate the card again.') + return + } + const file = new File([blob], filename, { type: 'image/png' }) + + const firstName = selectedRow.full_name.split(/\s+/)[0] || selectedRow.full_name + const plainBody = [ + `Hi ${firstName},`, + '', + 'Please find your recognition card attached.', + '', + 'Best regards', + ].join('\n') + + const plainSubject = `${recognitionType} recognition` + + const sharePayload: ShareData & { files?: File[] } = { + files: [file], + title: `Recognition — ${selectedRow.full_name}`, + text: plainBody, + } + + if ( + !shouldSkipWebShareFiles() && + navigator.share && + typeof navigator.canShare === 'function' && + navigator.canShare(sharePayload) + ) { + try { + await navigator.share(sharePayload) + return + } catch (err: unknown) { + const name = err instanceof Error ? err.name : '' + if (name === 'AbortError') return + } + } + + downloadImage() + const tipLines = shouldSkipWebShareFiles() + ? [ + plainBody, + '', + '---', + `Attach the PNG that was just downloaded: ${filename}`, + '(Check your Downloads folder, then use Attach / Insert in Outlook.)', + ] + : [ + plainBody, + '', + '---', + `Tip: attach "${filename}" from your Downloads folder (it was just saved).`, + ] + const mailtoHref = buildMailtoHref(to, plainSubject, tipLines.join('\n')) + window.setTimeout(() => { + window.location.href = mailtoHref + }, 400) + } + + const recipientEmail = (selectedRow?.employee_email ?? '').trim() + const hasValidRecipientEmail = EMAIL_RE.test(recipientEmail) + + const step1Status = hasRows ? 'is-complete' : 'is-focus' + const step2Status = hasRows ? 'is-focus' : '' + + return ( + <> +
+
+

Generate recognition cards in one click.

+

+ Upload your employee data, choose a recognition type and theme, and we will compose a + polished card with the employee photo, headline and a warm personal note — ready to send. +

+
+ +
+ + + {previewShown ? ( +
+
+

Your card

+ {generatedAt ? ( + + Generated{' '} + {generatedAt.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })} + + ) : null} +
+ +
+ {isGenerating ? ( +
+
+ Updating your card… +
+ ) : generatedImage ? ( + {`Recognition + ) : null} +
+ + {generatedImage && !isGenerating ? ( + <> +
+ + + +
+ {emailError ? ( +

+ {emailError} +

+ ) : null} + + ) : null} + + {generatedPrompt ? ( +
+ Prompt & debug +
+

{generatedPrompt}

+ {photoDebug ?

{photoDebug}

: null} +
+
+ ) : null} +
+ ) : null} +
+
+ + ) +} + +export default App diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/src/assets/hero.png b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/assets/hero.png new file mode 100644 index 000000000..02251f4b9 Binary files /dev/null and b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/assets/hero.png differ diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/src/assets/react.svg b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/assets/react.svg new file mode 100644 index 000000000..6c87de9bb --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/src/assets/vite.svg b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/assets/vite.svg new file mode 100644 index 000000000..5101b674d --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/assets/vite.svg @@ -0,0 +1 @@ +Vite diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/src/index.css b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/index.css new file mode 100644 index 000000000..509bff107 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/index.css @@ -0,0 +1,135 @@ +/* Oracle Recognition Card Studio — global styles + * Typography: Georgia (matches the typography rendered onto every generated card). + * Palette: Redwood-inspired — warm cream base, slate ink, mustard / teal / olive accents. + */ + +:root { + /* Type stack — Georgia is universally available across Windows/macOS/iOS/Android/Linux, + so we don't load a webfont. 'Times New Roman' and serif are graceful fallbacks. */ + --font-serif: Georgia, 'Times New Roman', 'Liberation Serif', serif; + --font-mono: 'Cascadia Code', 'JetBrains Mono', 'Consolas', 'Menlo', monospace; + + /* Redwood palette */ + --cream: #f5f0e5; + --cream-soft: #faf6ec; + --cream-deep: #ede4d2; + --ink: #2d2e32; + --ink-soft: #4a4b50; + --slate: #6b6c70; + --muted: #8b8a85; + --line: rgba(45, 46, 50, 0.10); + --line-soft: rgba(45, 46, 50, 0.06); + + /* Accent */ + --oracle-red: #c5131a; + --oracle-red-deep: #9c0f15; + --teal: #5a7b7f; + --olive: #4a5238; + --mustard: #d6a23a; + --sienna: #c25e2d; + + /* Surfaces */ + --surface: #ffffff; + --surface-warm: #fffdf7; + --shadow-sm: 0 1px 2px rgba(45, 46, 50, 0.06), 0 2px 6px rgba(45, 46, 50, 0.04); + --shadow-md: 0 4px 14px -6px rgba(45, 46, 50, 0.16), 0 8px 24px -12px rgba(45, 46, 50, 0.10); + --shadow-lg: 0 12px 32px -16px rgba(45, 46, 50, 0.22), 0 20px 60px -24px rgba(45, 46, 50, 0.14); + + font-family: var(--font-serif); + font-size: 16px; + line-height: 1.55; + color: var(--ink); + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +* { + box-sizing: border-box; +} + +html, +body { + margin: 0; + padding: 0; + background: var(--cream); + color: var(--ink); + font-family: var(--font-serif); + min-height: 100vh; + /* Subtle Redwood-style warm vignette in the corners — calm centre. */ + background-image: + radial-gradient(ellipse 60% 50% at 0% 0%, rgba(214, 162, 58, 0.08), transparent 60%), + radial-gradient(ellipse 50% 40% at 100% 100%, rgba(90, 123, 127, 0.07), transparent 60%), + linear-gradient(180deg, #faf6ec 0%, #f5f0e5 100%); + background-attachment: fixed; +} + +#root { + min-height: 100vh; + display: flex; + flex-direction: column; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: var(--font-serif); + font-weight: 700; + color: var(--ink); + letter-spacing: -0.005em; + line-height: 1.2; +} + +p { + font-family: var(--font-serif); +} + +/* Form elements inherit the serif voice rather than the browser default sans. */ +input, +select, +textarea, +button { + font-family: var(--font-serif); + font-size: 1rem; + color: var(--ink); +} + +a { + color: var(--oracle-red); + text-decoration: none; + transition: color 0.15s ease; +} + +a:hover { + color: var(--oracle-red-deep); +} + +/* Selection in brand red — small touch but feels considered. */ +::selection { + background: rgba(197, 19, 26, 0.15); + color: var(--ink); +} + +/* Scrollbar — tasteful, not loud. */ +::-webkit-scrollbar { + width: 10px; + height: 10px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background: rgba(45, 46, 50, 0.18); + border-radius: 6px; + border: 2px solid var(--cream); +} + +::-webkit-scrollbar-thumb:hover { + background: rgba(45, 46, 50, 0.32); +} diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/src/main.tsx b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/main.tsx new file mode 100644 index 000000000..bef5202a3 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/src/main.tsx @@ -0,0 +1,10 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import './index.css' +import App from './App.tsx' + +createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/tsconfig.app.json b/ai/generative-ai-service/card-recognition-generator/files/frontend/tsconfig.app.json new file mode 100644 index 000000000..7f42e5f7c --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/tsconfig.app.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023", "DOM"], + "module": "esnext", + "types": ["vite/client"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/tsconfig.json b/ai/generative-ai-service/card-recognition-generator/files/frontend/tsconfig.json new file mode 100644 index 000000000..1ffef600d --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/tsconfig.node.json b/ai/generative-ai-service/card-recognition-generator/files/frontend/tsconfig.node.json new file mode 100644 index 000000000..d3c52ea64 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/tsconfig.node.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023"], + "module": "esnext", + "types": ["node"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["vite.config.ts"] +} diff --git a/ai/generative-ai-service/card-recognition-generator/files/frontend/vite.config.ts b/ai/generative-ai-service/card-recognition-generator/files/frontend/vite.config.ts new file mode 100644 index 000000000..2a35ca586 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/frontend/vite.config.ts @@ -0,0 +1,18 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], + server: { + proxy: { + // Dev: browser calls same-origin /api/... so you always hit the local FastAPI app (avoids + // wrong VITE_API_BASE_URL or a stale process on another port). + '/api': { + // Dedicated port — 8001 often has multiple stale uvicorn/python listeners on Windows. + target: 'http://127.0.0.1:8055', + changeOrigin: true, + }, + }, + }, +}) diff --git a/ai/generative-ai-service/card-recognition-generator/files/output/card_20260506_131028_490815.png b/ai/generative-ai-service/card-recognition-generator/files/output/card_20260506_131028_490815.png new file mode 100644 index 000000000..7326eed07 Binary files /dev/null and b/ai/generative-ai-service/card-recognition-generator/files/output/card_20260506_131028_490815.png differ diff --git a/ai/generative-ai-service/card-recognition-generator/files/requirements.txt b/ai/generative-ai-service/card-recognition-generator/files/requirements.txt new file mode 100644 index 000000000..12f748592 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/requirements.txt @@ -0,0 +1,15 @@ +langgraph>=0.2.0 +pydantic>=2.7.0 +python-dotenv>=1.0.1 +requests>=2.32.0 +streamlit>=1.44.0 +oci>=2.126.0 +langchain-oci>=0.2.5 +oci-genai-auth>=0.2.0 +openai>=2.32.0 +Pillow>=12.0.0 +gradio>=5.0.0 +fastapi>=0.116.0 +uvicorn>=0.35.0 +python-multipart>=0.0.20 +pytesseract>=0.3.13 diff --git a/ai/generative-ai-service/card-recognition-generator/files/src/grok_openai_image.py b/ai/generative-ai-service/card-recognition-generator/files/src/grok_openai_image.py new file mode 100644 index 000000000..2b314b579 --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/src/grok_openai_image.py @@ -0,0 +1,79 @@ +import base64 +import io +import os +from pathlib import Path +from typing import Optional + +import requests +from dotenv import load_dotenv +from openai import OpenAI +from PIL import Image + + +load_dotenv() + + +def _resolve_openai_base_url(base_url: str) -> str: + root = base_url.rstrip("/") + if root.endswith("/openai/v1"): + return root + return f"{root}/openai/v1" + + +def _decode_image_result(result) -> Image.Image: + image_item = result.data[0] + if image_item.b64_json: + image_bytes = base64.b64decode(image_item.b64_json) + return Image.open(io.BytesIO(image_bytes)) + response = requests.get(image_item.url, timeout=60) + response.raise_for_status() + return Image.open(io.BytesIO(response.content)) + + +def generate_grok_image( + prompt: str, base_url: str, api_key: str, project: str, reference_image_path: Optional[str] = None +) -> Image.Image: + client = OpenAI(base_url=_resolve_openai_base_url(base_url), api_key=api_key, project=project) + + if reference_image_path: + image_path = Path(reference_image_path) + with image_path.open("rb") as image_file: + try: + # Primary path: model-guided edit with user photo input. + result = client.images.edit( + model="xai.grok-imagine-image", + prompt=prompt, + image=image_file, + ) + return _decode_image_result(result) + except Exception: + image_file.seek(0) + # Fallback for providers exposing image input via extra body. + image_b64 = base64.b64encode(image_file.read()).decode("utf-8") + result = client.images.generate( + model="xai.grok-imagine-image", + prompt=prompt, + extra_body={"input_image": image_b64}, + ) + return _decode_image_result(result) + + result = client.images.generate(model="xai.grok-imagine-image", prompt=prompt) + return _decode_image_result(result) + + +def generate_from_env(prompt: str, reference_image_path: Optional[str] = None) -> Image.Image: + base_url = os.getenv("ENDPOINT", "") + api_key = ( + os.getenv("OPENAI_API_KEY") + or os.getenv("OCI_GENAI_API_KEY") + or os.getenv("OCI_IMAGE_API_KEY") + or "" + ) + project = (os.getenv("OCI_PROJECT_ID") or os.getenv("COMPARTMENT_ID") or "").strip() + return generate_grok_image( + prompt=prompt, + base_url=base_url, + api_key=api_key, + project=project, + reference_image_path=reference_image_path, + ) diff --git a/ai/generative-ai-service/card-recognition-generator/files/src/react_api.py b/ai/generative-ai-service/card-recognition-generator/files/src/react_api.py new file mode 100644 index 000000000..6c2fcdbca --- /dev/null +++ b/ai/generative-ai-service/card-recognition-generator/files/src/react_api.py @@ -0,0 +1,789 @@ +import base64 +import io +import os +from datetime import datetime +from pathlib import Path +from typing import Optional + +from fastapi import FastAPI, HTTPException +from fastapi.middleware.cors import CORSMiddleware +from fastapi.responses import JSONResponse +from pydantic import BaseModel +from PIL import Image, ImageChops, ImageDraw, ImageFilter, ImageFont, ImageOps + +from src.grok_openai_image import generate_from_env + +# Resolve paths from the repo root, not the process CWD (avoids wrong/missing photos when +# uvicorn is started from another directory — a common reason the "old" or stock image appears). +_PROJECT_ROOT = Path(__file__).resolve().parent.parent +OUTPUT_DIR = _PROJECT_ROOT / "output" +OUTPUT_DIR.mkdir(parents=True, exist_ok=True) + +# Photo overlay geometry (fractions of width / height). MUST stay in sync with _paste_exact_employee_photo. +# Two-column layout tuned for a 16:9 card: +# left margin 7% | photo column 7-36% | gap 36-43% | text column 43-93% | right margin 7% +# This gives the body text a 50% wide column — comfortable for paragraph wrapping in Georgia at body size. +_PHOTO_COLUMN_X0_FRAC = 0.070 +_PHOTO_COLUMN_W_FRAC = 0.290 +_PHOTO_TARGET_W_FRAC = 0.235 +_PHOTO_TARGET_H_FRAC = 0.330 +_PHOTO_TOP_FRAC = 0.250 +# Matches spacing below photo + single-line name row in _paste_exact_employee_photo (approximate). +_PHOTO_NAME_GAP_BELOW_FRAC = 0.030 +_PHOTO_NAME_ROW_FRAC = 0.070 +_PHOTO_NAME_STRIP_BOTTOM_FRAC = ( + _PHOTO_TOP_FRAC + _PHOTO_TARGET_H_FRAC + _PHOTO_NAME_GAP_BELOW_FRAC + _PHOTO_NAME_ROW_FRAC +) + +# Left edge of the right-hand text column. Tightened so body sits closer to the photo. +_BODY_TEXT_MIN_LEFT_FRAC = 0.385 +_BODY_TEXT_MAX_RIGHT_FRAC = 0.93 + +# Oracle wordmark placement (top-right corner, software-rendered). +# Sized to match the proportion used in Oracle Redwood brand slide deck headers — present but not +# dominant. Roughly 12–15% of card width once aspect ratio is applied to the wordmark. +_LOGO_RIGHT_MARGIN_FRAC = 0.050 +_LOGO_TOP_MARGIN_FRAC = 0.062 +_LOGO_HEIGHT_FRAC = 0.045 + +# Oracle brand colors. +_ORACLE_RED = (197, 19, 25, 255) # PMS 485 approximation — official Oracle brand red +_ORACLE_WHITE = (255, 255, 255, 255) + + +def _is_dark_theme(theme: Optional[str]) -> bool: + """Robust dark-theme detection: a card is dark unless the theme explicitly says 'light'.""" + t = (theme or "").lower().strip() + if "dark" in t or "navy" in t or "midnight" in t or "black" in t or "night" in t: + return True + if "light" in t or "cream" in t or "white" in t or "ivory" in t: + return False + # Default: treat unknown themes as light (matches Pydantic default "Oracle Light"). + return False + +# If the UI does not see this in JSON, the request is not hitting this app (wrong port / old process). +API_FINGERPRINT = "recognition-card-api-v9-aligned-headline-smaller-logo" +print( + f"[{API_FINGERPRINT}] module={__file__!s} project_root={_PROJECT_ROOT} " + "(dev: uvicorn … --port 8055 — avoid 8001; it often has duplicate listeners on Windows)", + flush=True, +) + + +class GenerateCardRequest(BaseModel): + employee_name: Optional[str] = "Employee" + manager_name: Optional[str] = "Manager" + manager_position: Optional[str] = "Manager" + recognition_type: Optional[str] = "Performance" + theme: Optional[str] = "Oracle Light" + has_photo: Optional[bool] = False + photo_asset_id: Optional[str] = "" + model_config = {"extra": "ignore"} + + +def _recognition_instructions(recognition_type: str, recognition_context: str) -> str: + normalized = recognition_type.strip().lower() + context = recognition_context.strip() + + scenarios = { + "welcome": ( + "Write a warm welcome thank-you note that appreciates the employee for joining the team and their early impact." + ), + "milestone": ( + "Write an appreciative milestone thank-you note recognizing sustained contribution and commitment." + ), + "performance": ( + "Write a specific results-focused thank-you note that links the achievement to meaningful team or business impact." + ), + "team contribution": ( + "Write a gratitude-focused note thanking the employee for collaboration, support, and enabling team success." + ), + "culture & values": ( + "Write a values-based appreciation note thanking the employee for modeling Oracle culture and behaviors." + ), + "promotion": ( + "Write a congratulatory thank-you note recognizing growth, trust, and readiness for expanded responsibility." + ), + } + scenario_note = scenarios.get( + normalized, + "Use a professional employee-recognition tone appropriate for HR communication.", + ) + if context: + return f"{scenario_note} Additional scenario context: {context}." + return scenario_note + + +def _card_headline(recognition_type: str) -> str: + """Full headline phrase — avoids the model printing only one word e.g. Performance.""" + normalized = recognition_type.strip().lower() + titles = { + "welcome": "Welcome & Recognition", + "milestone": "Milestone Recognition", + "performance": "Performance Recognition", + "team contribution": "Team Contribution Recognition", + "culture & values": "Culture & Values Recognition", + "promotion": "Promotion Recognition", + } + return titles.get(normalized, "Employee Recognition") + + +app = FastAPI(title="Recognition Card API", version="1.0.0") + +app.add_middleware( + CORSMiddleware, + allow_origins=["*"], + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + + +def _build_prompt(payload: GenerateCardRequest, *, reserve_left_for_photo_overlay: bool) -> str: + """Oracle Redwood brand-styled abstract background prompt. + + The image model paints ONLY a Redwood-style abstract background: a calm base color across + the centre with hand-drawn organic blob shapes anchored in the corners, painted in the muted + earthy Redwood palette (mustard, burnt sienna, slate teal, dark olive, cream) with subtle + hand-drawn interior textures (hatching, dots, woven cross-hatch). Software composites the + Oracle wordmark, employee photo, and all card text on top afterwards. + + Why this approach: image models are unreliable at constrained slide layouts but excellent at + expressive art. Restricting them to art only — in a clearly defined brand language — gives + us painterly Redwood-correct backgrounds while guaranteeing typography, identity, and brand + placement deterministically through software composition. + """ + del reserve_left_for_photo_overlay # unused: same Redwood background works for both paths + + is_dark = _is_dark_theme(payload.theme) + + if is_dark: + base_description = ( + "deep warm slate charcoal base color (approximately #2D2E32, warm dark grey, NOT pure " + "black, NOT navy blue) covering the full canvas with a subtle warm undertone" + ) + palette_description = ( + "muted EARTHY Redwood palette: warm mustard yellow (#D6A23A), burnt sienna terracotta " + "(#C25E2D), slate teal grey-green (#5A7B7F), dark forest olive (#4A5238), warm cream " + "(#E8DDC3). All colors are MUTED and earthy — NEVER saturated, NEVER neon, NEVER bright." + ) + contrast_note = ( + "Shapes are medium-toned so they read clearly against the dark slate background, " + "but never high-contrast or jarring." + ) + else: + base_description = ( + "warm cream base color (approximately #F0E9D9 — soft off-white with a warm sandy " + "undertone, NOT pure white, NOT cool grey) covering the full canvas" + ) + palette_description = ( + "SOFT PASTEL Redwood palette ONLY — every color must be a LIGHT, GENTLE, AIRY pastel " + "that harmonises with the cream background. Allowed colors: pale butter yellow (#EAD79A), " + "soft peach (#E8C7A8), dusty pale sage green (#C7D2B5), light dusty teal (#BDCDCC), " + "pale rose-blush (#E5C2B8), warm beige (#DDCDB2). " + "ABSOLUTELY DO NOT use any of these dark or saturated colors: NO burnt sienna, NO terracotta, " + "NO red-orange, NO dark forest green, NO dark olive, NO dark teal, NO charcoal, NO black, " + "NO bright saturated colors. The whole image must feel LIGHT, AIRY, SOFT, PASTEL — like a " + "soft watercolor wash on warm paper." + ) + contrast_note = ( + "Shapes are pale and gentle, only slightly more saturated than the cream background — " + "low contrast, soft and elegant, NEVER bold or punchy." + ) + + return ( + f"Oracle Redwood brand style abstract background, 16:9 aspect ratio, {base_description}. " + + "STYLE — high-quality hand-drawn editorial illustration. Painterly, refined, sophisticated, " + "inspired by the Oracle Redwood design language and modern editorial design. Imagine a clean " + "page from the Oracle Redwood brand style guide. Matte finish like fine gouache, soft pastel " + "wash, or printed ink on premium paper. NOT vector-perfect, NOT digital-glossy, NOT 3D, NOT " + "sci-fi, NOT corporate-stock. Polished and elegant, never rough or scratchy. " + + f"COLOR PALETTE — {palette_description} {contrast_note} " + + "SHAPES — 2 large hand-drawn organic blob shapes (smooth pebble or leaf forms with gently " + "irregular organic outlines, like calm brush-painted shapes). Each shape is filled with ONE " + "color from the palette as a CLEAN MATTE FILL. Outlines are softly hand-drawn — slightly " + "imperfect but elegant, NEVER scratchy, NEVER scribbled, NEVER mathematically perfect. " + + "INTERIOR TEXTURES — keep textures EXTREMELY SUBTLE and minimal. Most of each shape is a clean " + "matte fill of its single color. Optionally add a SMALL textural accent in ONE small region of " + "the shape (covering at most 25% of the shape area): a few sparse dots, a small patch of fine " + "hatching, or a small woven cross-hatch area. Textures are gentle accents, NEVER busy, NEVER " + "covering the whole shape, NEVER scratchy or rough. The overall feel is calm, refined, polished. " + + "COMPOSITION — sparse, minimal, breathable. Place ONE large blob anchored in the TOP-LEFT " + "corner (extending up to ~28% width and ~30% height inward from the corner), and ONE large " + "blob anchored in the BOTTOM-RIGHT corner (extending up to ~25% width and ~25% height inward " + "from the corner). The TOP-RIGHT corner MUST stay completely empty (reserved for a header " + "element). The CENTRAL 55% of the canvas (roughly x: 22%-77%, y: 22%-78%) MUST remain pure " + "calm base color — NO shapes, NO textures, NO marks, NO lines anywhere in the centre. Generous " + "negative space. Shapes never overlap each other. " + + "STRICT NEGATIVES — the image must NOT contain ANY of the following, anywhere: " + "(a) text of ANY kind: no letters, words, numbers, glyphs, captions, headlines, paragraphs, " + "signatures, dates, watermarks, or single character marks; " + "(b) any logos, wordmarks, brand marks, trademarks, ® or ™ symbols, or text reading 'Oracle'; " + "(c) any people, faces, headshots, silhouettes, avatars, portraits, or human figures; " + "(d) any rectangles, panels, plates, frames, slates, banners, tiles, header strips, footer " + "strips, divider lines, columns, rounded boxes, or enclosing shapes of any kind; " + "(e) any tinted regions or color blocks that carve the canvas into separate areas — the base " + "color must remain ONE continuous calm surface beneath and around the blob shapes; " + "(f) any icons, charts, diagrams, photographs, real-world objects, buildings, technology, " + "computers, screens, abstract sci-fi 3D renders, glow effects, lens flares, or photorealistic " + "elements; " + "(g) any bright saturated colors, neon, fluorescent, glossy gradients, or 3D shading " + "(shapes are flat matte color with optional subtle texture only); " + "(h) any rough, scratchy, sketchy, or low-quality marks — the work must read as a polished " + "editorial illustration, not a rough sketch. " + + "The final image must look like a high-quality, polished page from the Oracle Redwood brand " + "style guide: a calm " + + ("earthy" if is_dark else "soft pastel") + + " background with 2 large refined hand-drawn organic shapes in opposite corners, very subtle " + "painterly accents, lots of empty calm space, sophisticated and warm." + ) + + +_RECOGNITION_BODIES: dict[str, str] = { + "welcome": ( + "Welcome to Oracle. Your fresh perspective and early contributions have already made a " + "meaningful impact, and the team is genuinely glad to have you on board. We look forward " + "to your continued growth and success with us." + ), + "milestone": ( + "Thank you for the years of sustained dedication and impact you have brought to Oracle. " + "Your commitment continues to shape our success, and we are grateful for the consistent " + "excellence you deliver to your colleagues and to the business." + ), + "performance": ( + "Your outstanding performance has driven meaningful results for the team and contributed " + "directly to Oracle's continued success. Thank you for the dedication, focus, and " + "measurable impact you bring to your work every day." + ), + "team contribution": ( + "Thank you for the way you lift the team up every day. Your collaboration, support, and " + "willingness to share your expertise have made a real difference, and we deeply appreciate " + "the strength you bring to everyone around you." + ), + "culture & values": ( + "Thank you for living Oracle's values in everything you do. The way you lead by example, " + "treat your colleagues with respect, and uphold the standards that define our culture is " + "truly appreciated and inspires those around you." + ), + "promotion": ( + "Congratulations on your well-earned promotion. Your growth, dedication, and consistent " + "results have made this moment possible, and we are confident you will continue to deliver " + "excellence in your expanded role." + ), +} + + +def _recognition_body(recognition_type: str) -> str: + """Body paragraph for the recognition card. Templated per scenario for predictable quality.""" + normalized = (recognition_type or "").strip().lower() + return _RECOGNITION_BODIES.get( + normalized, + "Thank you for the dedication, energy, and excellence you bring to Oracle every day. " + "Your contributions make a real difference to the team and to our continued success.", + ) + + +def _short_title(value: str) -> str: + cleaned = (value or "").replace(",", " ").replace("-", " ").replace("_", " ").replace("/", " ").strip() + if not cleaned: + return "Manager" + banned = {"department", "global", "team", "division", "unit", "function", "of"} + tokens = [token for token in cleaned.split() if token and token.lower() not in banned] + if not tokens: + return "Manager" + return " ".join(tokens[:4]) + + +_PHOTO_EXTENSIONS = {".png", ".jpg", ".jpeg", ".webp", ".gif", ".bmp"} + + +def _norm_photo_key(name: str) -> str: + """Normalize for fuzzy match (Excel/CSV names vs filenames).""" + lower = (name or "").lower() + lower = lower.replace("\u2019", "'").replace("\u2018", "'") + return "".join(ch for ch in lower if ch.isalnum()) + + +def _resolve_photo_file(photo_asset_id: str, employee_name: Optional[str] = None) -> Optional[Path]: + raw = (photo_asset_id or "").strip() + raw = raw.replace("\u201c", '"').replace("\u201d", '"').replace("\u2018", "'").replace("\u2019", "'") + raw = raw.replace("\u200b", "").replace("\ufeff", "") + raw = raw.strip("\"' \t\r\n").replace("\\", "/") + raw = raw.rstrip(".,;:") + if not raw: + return None + + candidate = raw + if raw.startswith("/"): + candidate = raw[1:] + if candidate.startswith("employee-photos/"): + candidate = f"frontend/public/{candidate}" + elif candidate.startswith("frontend/public/"): + candidate = candidate + else: + candidate = f"frontend/public/employee-photos/{candidate}" + + primary = _PROJECT_ROOT / candidate + if primary.is_file(): + return primary.resolve() + + # Fallback: tolerate accidental embedded quotes in file stem, e.g. celebratory".png + cleaned_candidate = candidate.replace('"', "").replace("'", "") + cleaned = _PROJECT_ROOT / cleaned_candidate + if cleaned.is_file(): + return cleaned.resolve() + + photo_dir = _PROJECT_ROOT / "frontend" / "public" / "employee-photos" + if not photo_dir.is_dir(): + return None + + want_name = Path(candidate).name + want_key = _norm_photo_key(Path(want_name).stem) + + # Case-insensitive exact filename (helps Linux deploys; Windows often already matches). + for item in photo_dir.iterdir(): + if item.is_file() and item.suffix.lower() in _PHOTO_EXTENSIONS and item.name.lower() == want_name.lower(): + return item.resolve() + + # Fuzzy stem: sara-alfarsi vs sara-al-farsi, etc. + if want_key: + for item in photo_dir.iterdir(): + if not item.is_file() or item.suffix.lower() not in _PHOTO_EXTENSIONS: + continue + if _norm_photo_key(item.stem) == want_key: + return item.resolve() + + # Match by employee display name when CSV path drifts from disk filename (exact normalized stem). + em_key = _norm_photo_key((employee_name or "").strip()) + if len(em_key) >= 4: + for item in photo_dir.iterdir(): + if not item.is_file() or item.suffix.lower() not in _PHOTO_EXTENSIONS: + continue + stem_key = _norm_photo_key(item.stem) + if stem_key and stem_key == em_key: + return item.resolve() + + return None + + +_GEORGIA_FILES: dict[str, tuple[str, ...]] = { + "regular": ("georgia.ttf", "Georgia.ttf"), + "bold": ("georgiab.ttf", "Georgiab.ttf"), + "italic": ("georgiai.ttf", "Georgiai.ttf"), + "bold-italic": ("georgiaz.ttf", "Georgiaz.ttf"), +} + +# Oracle wordmark fallback fonts in order of preference (closest visual match to Oracle Sans first). +_LOGO_FONT_CANDIDATES: tuple[str, ...] = ("ariblk.ttf", "arialbd.ttf", "calibrib.ttf", "segoeuib.ttf") + + +def _draw_oracle_wordmark(card: Image.Image, *, theme: str) -> Image.Image: + """Render the Oracle wordmark in the top-right corner deterministically. + + Uses an asset PNG if one is provided at frontend/public/oracle-logo.png (recommended for exact + brand fidelity). Otherwise falls back to rendering 'ORACLE' in Arial Black with a small ® + superscript — visually close to Oracle Sans and consistent across every generation. + """ + rgba = card.convert("RGBA") + w, h = rgba.size + is_dark = _is_dark_theme(theme) + fill = _ORACLE_WHITE if is_dark else _ORACLE_RED + right_margin = int(w * _LOGO_RIGHT_MARGIN_FRAC) + top_margin = int(h * _LOGO_TOP_MARGIN_FRAC) + + # Theme-specific asset takes priority for brand-perfect rendering. Place either: + # frontend/public/oracle-logo-white.png (used on dark themes) + # frontend/public/oracle-logo-red.png (used on light themes) + # frontend/public/oracle-logo.png (legacy single-file fallback, used on either theme) + public_dir = _PROJECT_ROOT / "frontend" / "public" + candidates = ( + ["oracle-logo-white.png"] if is_dark else ["oracle-logo-red.png"] + ) + ["oracle-logo.png"] + asset: Optional[Path] = None + for name in candidates: + p = public_dir / name + if p.is_file(): + asset = p + break + if asset is not None: + try: + logo = Image.open(asset).convert("RGBA") + target_h = int(h * _LOGO_HEIGHT_FRAC) + ratio = logo.width / max(1, logo.height) + target_w = max(1, int(target_h * ratio)) + logo = logo.resize((target_w, target_h), Image.Resampling.LANCZOS) + rgba.alpha_composite(logo, (w - right_margin - target_w, top_margin)) + return rgba.convert("RGB") + except OSError: + pass # fall through to text rendering + + # Fallback: render the wordmark with Arial Black. + font_size = max(28, int(h * _LOGO_HEIGHT_FRAC)) + windir = Path(os.environ.get("WINDIR", r"C:\Windows")) + font: ImageFont.ImageFont = ImageFont.load_default() + for name in _LOGO_FONT_CANDIDATES: + path = windir / "Fonts" / name + if path.is_file(): + try: + font = ImageFont.truetype(str(path), size=font_size) + break + except OSError: + continue + + r_size = max(10, int(font_size * 0.40)) + r_font = font + for name in _LOGO_FONT_CANDIDATES: + path = windir / "Fonts" / name + if path.is_file(): + try: + r_font = ImageFont.truetype(str(path), size=r_size) + break + except OSError: + continue + + text = "ORACLE" + r_glyph = "\u00ae" + draw = ImageDraw.Draw(rgba) + text_bbox = draw.textbbox((0, 0), text, font=font) + text_w = text_bbox[2] - text_bbox[0] + r_bbox = draw.textbbox((0, 0), r_glyph, font=r_font) + r_w = r_bbox[2] - r_bbox[0] + gap = max(2, int(font_size * 0.06)) + total_w = text_w + gap + r_w + + x = w - right_margin - total_w + draw.text((x, top_margin), text, font=font, fill=fill) + # ® sits raised, near the top of the wordmark. + draw.text((x + text_w + gap, top_margin + int(font_size * 0.05)), r_glyph, font=r_font, fill=fill) + return rgba.convert("RGB") + + +def _georgia_font(size: int, weight: str = "regular") -> ImageFont.ImageFont: + """Load a Georgia variant. Falls back to regular Georgia, then PIL default if missing. + + Valid weights: 'regular', 'bold', 'italic', 'bold-italic'. + """ + windir = Path(os.environ.get("WINDIR", r"C:\Windows")) + candidates = _GEORGIA_FILES.get(weight, _GEORGIA_FILES["regular"]) + for name in candidates: + p = windir / "Fonts" / name + if p.is_file(): + try: + return ImageFont.truetype(str(p), size=size) + except OSError: + continue + if weight != "regular": + return _georgia_font(size, weight="regular") + return ImageFont.load_default() + + +def _wrap_text_to_width( + draw: ImageDraw.ImageDraw, + text: str, + font: ImageFont.ImageFont, + max_width: int, +) -> list[str]: + """Greedy word-wrap: split text into lines whose pixel width fits within max_width.""" + words = text.split() + if not words: + return [""] + lines: list[str] = [] + current: list[str] = [] + for word in words: + candidate = " ".join(current + [word]) + bbox = draw.textbbox((0, 0), candidate, font=font) + if (bbox[2] - bbox[0]) <= max_width or not current: + current.append(word) + else: + lines.append(" ".join(current)) + current = [word] + if current: + lines.append(" ".join(current)) + return lines + + +def _render_card_text( + card: Image.Image, + *, + employee_name: str, + manager_name: str, + manager_title: str, + recognition_type: str, + theme: str, + has_photo: bool, +) -> Image.Image: + """Draw all card copy (headline, greeting, body, sign-off) in real Georgia. + + The image model only paints background + curves + Oracle logo. This function owns every + glyph the recipient will read, guaranteeing typography (Georgia across the board) and + layout (no AI-drawn boxes, plates, or stray captions). + """ + rgba = card.convert("RGBA") + w, h = rgba.size + is_dark = _is_dark_theme(theme) + text_fill = (245, 248, 252, 255) if is_dark else (28, 32, 42, 255) + muted_fill = (190, 200, 215, 255) if is_dark else (90, 96, 110, 255) + + text_left_frac = _BODY_TEXT_MIN_LEFT_FRAC if has_photo else 0.08 + text_left = int(w * text_left_frac) + text_right = int(w * _BODY_TEXT_MAX_RIGHT_FRAC) + text_width = text_right - text_left + + headline_size = max(28, int(h * 0.058)) + body_size = max(16, int(h * 0.037)) + signoff_size = max(14, int(h * 0.029)) + + headline_font = _georgia_font(headline_size, weight="bold") + body_font = _georgia_font(body_size) + signoff_italic = _georgia_font(signoff_size, weight="italic") + signoff_font = _georgia_font(signoff_size) + + headline = _card_headline(recognition_type) + greeting = f"Dear {employee_name}," + body_text = _recognition_body(recognition_type) + + draw = ImageDraw.Draw(rgba) + body_lines = _wrap_text_to_width(draw, body_text, body_font, text_width) + + headline_lh = int(headline_size * 1.20) + body_lh = int(body_size * 1.45) + signoff_lh = int(signoff_size * 1.40) + + gap_after_headline = int(h * 0.045) + gap_greeting_to_body = int(body_lh * 0.45) + gap_body_to_signoff = int(h * 0.045) + + total_h = ( + headline_lh + + gap_after_headline + + body_lh # greeting + + gap_greeting_to_body + + body_lh * len(body_lines) + + gap_body_to_signoff + + signoff_lh * 3 + ) + + # When a photo is present, top-align the headline with the photo top so the two columns sit on + # the same baseline (the user explicitly wants headline and photo at the SAME visual level). + # The small negative offset compensates for the cap-height padding inside the headline glyphs + # so the optical top of the letters lines up with the optical top of the photo card. + if has_photo: + y = max(int(h * 0.10), int(h * _PHOTO_TOP_FRAC) - int(headline_size * 0.18)) + else: + # No photo: vertically centre the whole text block in the canvas as before. + text_area_top = int(h * 0.20) + text_area_bottom = int(h * 0.90) + text_area_h = text_area_bottom - text_area_top + y = text_area_top + max(0, (text_area_h - total_h) // 2) + + draw.text((text_left, y), headline, font=headline_font, fill=text_fill) + y += headline_lh + gap_after_headline + + draw.text((text_left, y), greeting, font=body_font, fill=text_fill) + y += body_lh + gap_greeting_to_body + + for line in body_lines: + draw.text((text_left, y), line, font=body_font, fill=text_fill) + y += body_lh + y += gap_body_to_signoff + + draw.text((text_left, y), "With appreciation,", font=signoff_italic, fill=text_fill) + y += signoff_lh + draw.text((text_left, y), f"\u2014 {manager_name} \u2014", font=signoff_font, fill=text_fill) + y += signoff_lh + draw.text((text_left, y), manager_title, font=signoff_font, fill=muted_fill) + + return rgba.convert("RGB") + + +def _paste_exact_employee_photo( + card: Image.Image, + photo_path: Path, + *, + employee_name: str, + theme: str, +) -> Image.Image: + """Paste disk image pixels unchanged (scale-to-fit + rounded mask + soft drop shadow). + + Adds a subtle drop shadow and a thin hairline accent so the composited photo reads as a polished + design element instead of a floating cutout. Name caption is centred under the photo on its own + baseline (kept clear of any AI-drawn ornaments because the prompt forbids them). + """ + card_rgba = card.convert("RGBA") + emp = Image.open(photo_path).convert("RGBA") + w, h = card_rgba.size + is_dark = _is_dark_theme(theme) + name_fill = (248, 250, 252, 255) if is_dark else (28, 32, 42, 255) + shadow_alpha = 140 if is_dark else 90 + + column_x0 = int(w * _PHOTO_COLUMN_X0_FRAC) + column_w = int(w * _PHOTO_COLUMN_W_FRAC) + center_x = column_x0 + column_w // 2 + target_w = int(w * _PHOTO_TARGET_W_FRAC) + target_h = int(h * _PHOTO_TARGET_H_FRAC) + top = int(h * _PHOTO_TOP_FRAC) + left = column_x0 + max(0, (column_w - target_w) // 2) + + fitted = ImageOps.contain(emp, (target_w, target_h), method=Image.Resampling.LANCZOS) + px = left + max(0, (target_w - fitted.width) // 2) + py = top + max(0, (target_h - fitted.height) // 2) + ny = min(top + target_h + int(h * _PHOTO_NAME_GAP_BELOW_FRAC), h - int(h * 0.055)) + + rad = max(10, int(min(fitted.width, fitted.height) * 0.07)) + rounded = Image.new("L", fitted.size, 0) + ImageDraw.Draw(rounded).rounded_rectangle((0, 0, fitted.width, fitted.height), radius=rad, fill=255) + alpha = fitted.split()[3] if fitted.mode == "RGBA" else Image.new("L", fitted.size, 255) + mask = ImageChops.multiply(rounded, alpha) + + # Soft drop shadow under the photo for a polished, intentional look. + shadow_pad = max(12, int(min(fitted.width, fitted.height) * 0.06)) + shadow_size = (fitted.width + shadow_pad * 2, fitted.height + shadow_pad * 2) + shadow_layer = Image.new("RGBA", shadow_size, (0, 0, 0, 0)) + shadow_mask_full = Image.new("L", shadow_size, 0) + shadow_mask_full.paste(rounded, (shadow_pad, shadow_pad)) + shadow_layer.putalpha(shadow_mask_full) + shadow_layer = shadow_layer.filter(ImageFilter.GaussianBlur(radius=shadow_pad * 0.55)) + # Reduce the shadow opacity uniformly without darkening RGB. + sa = shadow_layer.split()[3].point(lambda v: int(v * (shadow_alpha / 255))) + shadow_rgba = Image.new("RGBA", shadow_size, (0, 0, 0, 0)) + shadow_rgba.putalpha(sa) + sx = px - shadow_pad + sy = py - shadow_pad + int(shadow_pad * 0.35) # slight downward offset + card_rgba.alpha_composite(shadow_rgba, (sx, sy)) + + card_rgba.paste(fitted, (px, py), mask) + + # Hairline accent under the photo — subtle separator that anchors the name caption to the photo. + accent_color = (210, 218, 230, 90) if is_dark else (80, 90, 110, 90) + line_y = py + fitted.height + max(6, int(h * 0.012)) + line_half = int(fitted.width * 0.30) + ImageDraw.Draw(card_rgba).line( + [(center_x - line_half, line_y), (center_x + line_half, line_y)], + fill=accent_color, + width=max(1, int(h * 0.0025)), + ) + + label = (employee_name or "Employee").strip() or "Employee" + fs = max(20, int(h * 0.040)) + font = _georgia_font(fs) + draw = ImageDraw.Draw(card_rgba) + bbox = draw.textbbox((0, 0), label, font=font) + tw = bbox[2] - bbox[0] + draw.text((center_x - tw // 2, ny), label, font=font, fill=name_fill) + + return card_rgba.convert("RGB") + + +@app.get("/") +def root() -> dict: + """Identify this service without relying on /api prefix (helps debug wrong process on a port).""" + return { + "app": API_FINGERPRINT, + "api_schema_version": 4, + "module_path": str(Path(__file__).resolve()), + "hints": ["GET /api/version", "GET /api/health", "POST /api/generate-card", "GET /docs"], + } + + +@app.get("/api/health") +def health() -> dict: + photo_dir = _PROJECT_ROOT / "frontend" / "public" / "employee-photos" + return { + "status": "ok", + "fingerprint": API_FINGERPRINT, + "api_schema_version": 4, + "project_root": str(_PROJECT_ROOT), + "photo_dir": str(photo_dir), + "photo_dir_exists": photo_dir.is_dir(), + "photo_mode": "exact_disk_overlay_after_generation", + } + + +@app.get("/api/version") +def api_version() -> dict: + return { + "fingerprint": API_FINGERPRINT, + "api_schema_version": 4, + "module_path": str(Path(__file__).resolve()), + "project_root": str(_PROJECT_ROOT), + } + + +@app.post("/api/generate-card") +def generate_card(payload: GenerateCardRequest) -> dict: + try: + photo_path: Optional[Path] = None + should_use_photo = bool((payload.photo_asset_id or "").strip()) or bool(payload.has_photo) + if should_use_photo: + photo_path = _resolve_photo_file( + payload.photo_asset_id or "", + employee_name=payload.employee_name, + ) + if photo_path is None: + raise FileNotFoundError( + "Employee photo not found. Put the file under frontend/public/employee-photos " + f"and verify photo_asset_id path. Received: {payload.photo_asset_id!r}" + ) + + prompt = _build_prompt(payload, reserve_left_for_photo_overlay=photo_path is not None) + # AI generates ABSTRACT BACKGROUND ONLY (gradient + curves). Software then composites: + # (1) Oracle wordmark, (2) employee photo, (3) all card text. This separation guarantees + # brand fidelity, identity preservation, Georgia typography, and a deterministic layout + # — none of which the image model can be relied on to produce consistently. + image = generate_from_env(prompt) + + employee_name_clean = (payload.employee_name or "Employee").strip() or "Employee" + manager_name_clean = (payload.manager_name or "Manager").strip() or "Manager" + manager_title_clean = _short_title(payload.manager_position or "Manager") + recognition_type_clean = (payload.recognition_type or "Performance").strip() or "Performance" + theme_clean = (payload.theme or "Oracle Light").strip() or "Oracle Light" + + image = _draw_oracle_wordmark(image, theme=theme_clean) + + if photo_path is not None: + image = _paste_exact_employee_photo( + image, + photo_path, + employee_name=employee_name_clean, + theme=theme_clean, + ) + + image = _render_card_text( + image, + employee_name=employee_name_clean, + manager_name=manager_name_clean, + manager_title=manager_title_clean, + recognition_type=recognition_type_clean, + theme=theme_clean, + has_photo=photo_path is not None, + ) + + file_name = f"card_{datetime.now().strftime('%Y%m%d_%H%M%S_%f')}.png" + file_path = OUTPUT_DIR / file_name + image.save(file_path, format="PNG") + image_bytes = io.BytesIO() + image.save(image_bytes, format="PNG") + image_b64 = base64.b64encode(image_bytes.getvalue()).decode("utf-8") + body = { + "fingerprint": API_FINGERPRINT, + "status": "ok", + "api_schema_version": 4, + "prompt": prompt, + "image_base64": image_b64, + "output_file": str(file_path.resolve()), + "photo_passed_to_model": False, + "photo_exact_overlay": bool(photo_path is not None), + "photo_path_used": str(photo_path) if photo_path is not None else "", + "photo_path_absolute": str(photo_path.resolve()) if photo_path is not None else "", + "project_root": str(_PROJECT_ROOT), + } + return JSONResponse(content=body) + except Exception as exc: # noqa: BLE001 + raise HTTPException(status_code=500, detail=f"Generation failed: {exc}") from exc