diff --git a/.env b/.env new file mode 100644 index 0000000..3acefa9 --- /dev/null +++ b/.env @@ -0,0 +1,15 @@ +# ============================================================ +# Panacea Mobile App (Expo) Environment Configuration +# Copy this file to .env: +# cp .env.example .env +# ============================================================ + +# ---- Production Backend API ---- +# EXPO_PUBLIC_API_URL=https://api.acupedia.in/api + +# ---- Local Standalone Backend (FastAPI on Port 8000) ---- +# For Local Web: http://localhost:8000/api +# For Physical Mobile Devices: http://YOUR_LOCAL_IP:8000/api +EXPO_PUBLIC_API_URL=http://localhost:8000/api +EXPO_PUBLIC_BACKEND_PORT=8000 +EXPO_PUBLIC_MEDIA_BASE_URL=http://localhost:9000/ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4b00baf --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files + +# dependencies +node_modules/ + +# Expo +.expo/ +dist/ +web-build/ +expo-env.d.ts + +# Native +.kotlin/ +*.orig.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision + +# Metro +.metro-health-check* + +# debug +npm-debug.* +yarn-debug.* +yarn-error.* + +# macOS +.DS_Store +*.pem + +# local env files +.env*.local + +# typescript +*.tsbuildinfo + +example + +# generated native folders +/ios +/android diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..30b20e3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present 650 Industries, Inc. (aka Expo) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index e69de29..4d67aec 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,56 @@ +# Welcome to your Expo app 👋 + +This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). + +## Get started + +1. Install dependencies + + ```bash + npm install + ``` + +2. Start the app + + ```bash + npx expo start + ``` + +In the output, you'll find options to open the app in a + +- [development build](https://docs.expo.dev/develop/development-builds/introduction/) +- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/) +- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/) +- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo + +You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction). + +## Get a fresh project + +When you're ready, run: + +```bash +npm run reset-project +``` + +This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing. + +### Other setup steps + +- To set up ESLint for linting, run `npx expo lint`, or follow our guide on ["Using ESLint and Prettier"](https://docs.expo.dev/guides/using-eslint/) +- If you'd like to set up unit testing, follow our guide on ["Unit Testing with Jest"](https://docs.expo.dev/develop/unit-testing/) +- Learn more about the TypeScript setup in this template in our guide on ["Using TypeScript"](https://docs.expo.dev/guides/typescript/) + +## Learn more + +To learn more about developing your project with Expo, look at the following resources: + +- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides). +- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web. + +## Join the community + +Join our community of developers creating universal apps. + +- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute. +- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions. diff --git a/app.json b/app.json new file mode 100644 index 0000000..e52560d --- /dev/null +++ b/app.json @@ -0,0 +1,42 @@ +{ + "expo": { + "name": "acupedia", + "slug": "acupedia", + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/images/icon.png", + "scheme": "myapp", + "userInterfaceStyle": "automatic", + "ios": { + "icon": "./assets/expo.icon" + }, + "android": { + "adaptiveIcon": { + "backgroundColor": "#E6F4FE", + "foregroundImage": "./assets/images/android-icon-foreground.png", + "backgroundImage": "./assets/images/android-icon-background.png", + "monochromeImage": "./assets/images/android-icon-monochrome.png" + }, + "predictiveBackGestureEnabled": false + }, + "web": { + "output": "static", + "favicon": "./assets/images/favicon.png" + }, + "plugins": [ + "expo-router", + [ + "expo-splash-screen", + { + "backgroundColor": "#208AEF", + "image": "./assets/images/splash-icon.png", + "imageWidth": 76 + } + ] + ], + "experiments": { + "typedRoutes": true, + "reactCompiler": true + } + } +} diff --git a/assets/expo.icon/Assets/expo-symbol 2.svg b/assets/expo.icon/Assets/expo-symbol 2.svg new file mode 100644 index 0000000..51d3676 --- /dev/null +++ b/assets/expo.icon/Assets/expo-symbol 2.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/expo.icon/Assets/grid.png b/assets/expo.icon/Assets/grid.png new file mode 100644 index 0000000..eefea24 Binary files /dev/null and b/assets/expo.icon/Assets/grid.png differ diff --git a/assets/expo.icon/icon.json b/assets/expo.icon/icon.json new file mode 100644 index 0000000..7a2c33c --- /dev/null +++ b/assets/expo.icon/icon.json @@ -0,0 +1,40 @@ +{ + "fill" : { + "automatic-gradient" : "extended-srgb:0.00000,0.47843,1.00000,1.00000" + }, + "groups" : [ + { + "layers" : [ + { + "image-name" : "expo-symbol 2.svg", + "name" : "expo-symbol 2", + "position" : { + "scale" : 1, + "translation-in-points" : [ + 1.1008400065293245e-05, + -16.046875 + ] + } + }, + { + "image-name" : "grid.png", + "name" : "grid" + } + ], + "shadow" : { + "kind" : "neutral", + "opacity" : 0.5 + }, + "translucency" : { + "enabled" : true, + "value" : 0.5 + } + } + ], + "supported-platforms" : { + "circles" : [ + "watchOS" + ], + "squares" : "shared" + } +} \ No newline at end of file diff --git a/assets/images/android-icon-background.png b/assets/images/android-icon-background.png new file mode 100644 index 0000000..5ffefc5 Binary files /dev/null and b/assets/images/android-icon-background.png differ diff --git a/assets/images/android-icon-foreground.png b/assets/images/android-icon-foreground.png new file mode 100644 index 0000000..3a9e501 Binary files /dev/null and b/assets/images/android-icon-foreground.png differ diff --git a/assets/images/android-icon-monochrome.png b/assets/images/android-icon-monochrome.png new file mode 100644 index 0000000..77484eb Binary files /dev/null and b/assets/images/android-icon-monochrome.png differ diff --git a/assets/images/expo-badge-white.png b/assets/images/expo-badge-white.png new file mode 100644 index 0000000..2863067 Binary files /dev/null and b/assets/images/expo-badge-white.png differ diff --git a/assets/images/expo-badge.png b/assets/images/expo-badge.png new file mode 100644 index 0000000..5d5c5bb Binary files /dev/null and b/assets/images/expo-badge.png differ diff --git a/assets/images/expo-logo.png b/assets/images/expo-logo.png new file mode 100644 index 0000000..6b1642a Binary files /dev/null and b/assets/images/expo-logo.png differ diff --git a/assets/images/favicon.png b/assets/images/favicon.png new file mode 100644 index 0000000..408bd74 Binary files /dev/null and b/assets/images/favicon.png differ diff --git a/assets/images/icon.png b/assets/images/icon.png new file mode 100644 index 0000000..67c777a Binary files /dev/null and b/assets/images/icon.png differ diff --git a/assets/images/logo-glow.png b/assets/images/logo-glow.png new file mode 100644 index 0000000..edc99be Binary files /dev/null and b/assets/images/logo-glow.png differ diff --git a/assets/images/react-logo.png b/assets/images/react-logo.png new file mode 100644 index 0000000..9d72a9f Binary files /dev/null and b/assets/images/react-logo.png differ diff --git a/assets/images/react-logo@2x.png b/assets/images/react-logo@2x.png new file mode 100644 index 0000000..2229b13 Binary files /dev/null and b/assets/images/react-logo@2x.png differ diff --git a/assets/images/react-logo@3x.png b/assets/images/react-logo@3x.png new file mode 100644 index 0000000..a99b203 Binary files /dev/null and b/assets/images/react-logo@3x.png differ diff --git a/assets/images/splash-icon.png b/assets/images/splash-icon.png new file mode 100644 index 0000000..6b1642a Binary files /dev/null and b/assets/images/splash-icon.png differ diff --git a/assets/images/tabIcons/explore.png b/assets/images/tabIcons/explore.png new file mode 100644 index 0000000..73d8258 Binary files /dev/null and b/assets/images/tabIcons/explore.png differ diff --git a/assets/images/tabIcons/explore@2x.png b/assets/images/tabIcons/explore@2x.png new file mode 100644 index 0000000..21b9bd2 Binary files /dev/null and b/assets/images/tabIcons/explore@2x.png differ diff --git a/assets/images/tabIcons/explore@3x.png b/assets/images/tabIcons/explore@3x.png new file mode 100644 index 0000000..422202d Binary files /dev/null and b/assets/images/tabIcons/explore@3x.png differ diff --git a/assets/images/tabIcons/home.png b/assets/images/tabIcons/home.png new file mode 100644 index 0000000..ad5699c Binary files /dev/null and b/assets/images/tabIcons/home.png differ diff --git a/assets/images/tabIcons/home@2x.png b/assets/images/tabIcons/home@2x.png new file mode 100644 index 0000000..22a1f2c Binary files /dev/null and b/assets/images/tabIcons/home@2x.png differ diff --git a/assets/images/tabIcons/home@3x.png b/assets/images/tabIcons/home@3x.png new file mode 100644 index 0000000..f5d1f9a Binary files /dev/null and b/assets/images/tabIcons/home@3x.png differ diff --git a/assets/images/tutorial-web.png b/assets/images/tutorial-web.png new file mode 100644 index 0000000..e4a8c58 Binary files /dev/null and b/assets/images/tutorial-web.png differ diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..edfe0a1 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8517 @@ +{ + "name": "my-app", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "my-app", + "version": "1.0.0", + "dependencies": { + "@expo-google-fonts/inter": "^0.4.2", + "@expo/ui": "~57.0.16", + "@expo/vector-icons": "^15.0.2", + "@react-native-async-storage/async-storage": "2.2.0", + "@react-native-community/netinfo": "12.0.1", + "@tanstack/react-query": "^5.101.2", + "axios": "^1.18.1", + "expo": "~57.0.20", + "expo-constants": "~57.0.17", + "expo-device": "~57.0.1", + "expo-font": "~57.0.3", + "expo-glass-effect": "~57.0.1", + "expo-image": "~57.0.4", + "expo-linear-gradient": "~57.0.1", + "expo-linking": "~57.0.9", + "expo-router": "~57.0.19", + "expo-secure-store": "~57.0.2", + "expo-splash-screen": "~57.0.8", + "expo-status-bar": "~57.0.1", + "expo-symbols": "~57.0.2", + "expo-system-ui": "~57.0.3", + "expo-web-browser": "~57.0.2", + "react": "19.2.3", + "react-dom": "19.2.3", + "react-native": "0.86.3", + "react-native-gesture-handler": "~2.32.0", + "react-native-reanimated": "4.5.1", + "react-native-safe-area-context": "~5.7.0", + "react-native-screens": "~4.26.0", + "react-native-size-matters": "^0.4.2", + "react-native-toast-message": "^2.3.3", + "react-native-web": "~0.21.0", + "react-native-worklets": "0.10.1", + "zustand": "^4.5.7" + }, + "devDependencies": { + "@types/react": "~19.2.2", + "typescript": "~6.0.3" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz", + "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.8", + "@babel/types": "^7.29.8", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.29.7.tgz", + "integrity": "sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.29.7.tgz", + "integrity": "sha512-IY3ZD9Tmooqr3TUhc3DUWxiuo8xx1DWLhd5M7hQ+ZWJamqM2BbalrBJb2MisSLoYorOj75U03qULCxQTY9r3hg==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-member-expression-to-functions": "^7.29.7", + "@babel/helper-optimise-call-expression": "^7.29.7", + "@babel/helper-replace-supers": "^7.29.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7", + "@babel/traverse": "^7.29.7", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.29.7.tgz", + "integrity": "sha512-907Uymvqgg1dwUA+7IGwFAOSYzQOuzPXKNJ1yxzwPffzkYFg2q2eHi1fIOs6sXkG9NbIUMunnUlkYsfRFNvomg==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "regexpu-core": "^6.3.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.8.tgz", + "integrity": "sha512-47UwBLPpQi1NoWzLuHNjRoHlYXMwIJoBf7MFou6viC/sIHWYygpvr0B6IAyh5sBdA2nr2LPIRww8lfaUVQINBA==", + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "debug": "^4.4.3", + "lodash.debounce": "^4.0.8", + "resolve": "^1.22.11" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.29.7.tgz", + "integrity": "sha512-j+7JYmk1JYDtACIGj0QJqqWZjoUpMoEikQGADMaHgCMCSDqd2+P32rfcibUNrGOMWrlzK1WJBdxrB3JJQZwWtg==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.29.7.tgz", + "integrity": "sha512-+kmGVjcT9RGYzoDwdwEqEvGgKe3BYq+O1iGzjFubaNgZHwYHP6lsF2Yghf4kEuv9BV7tYDZ913aBW9am6YKong==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.29.7.tgz", + "integrity": "sha512-16AMiW26DbXWBbr3B8wNozKM0ydMLB892vaOaJW/fPJdnT8vJk5sdkQcU/isqUxyCE0cEoa8wZOcbgDuC4b6Og==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-wrap-function": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.29.7.tgz", + "integrity": "sha512-atfGXWSeCiF4DnKZIfmJfQRkSw9b9gNNXR1kqKjbhG4pGYCOnkp8OcTB8E3NXjBu8NpheSnOeNKz8KT7UNFTmQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.29.7", + "@babel/helper-optimise-call-expression": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.29.7.tgz", + "integrity": "sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.29.7.tgz", + "integrity": "sha512-iES0Skag9ERIF68aXadpO6dbXa03mNWK3sEqJaMnLNs/eC3l0lkImdfoy6Y09/SfkpawdAB4RjQ7PVA7TcVGdw==", + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", + "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz", + "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-proposal-decorators": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.29.7.tgz", + "integrity": "sha512-EtU0Hi3GvrTqD56xKmZvV/uCXK2ZbwVNPNLAquVItcAZpUhkXwWlo3Fmj0c2LxgSf2I8IDULeAepwNP1OefLXg==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/plugin-syntax-decorators": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-default-from": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.29.7.tgz", + "integrity": "sha512-p+G5BNXDcy3bOXplhY4HybQ1GxH3i2Tppmdm/3epyRu2VgJJZuUlZ61MqRTg582Q7ZLBdP7fePYvsumSEkMxcQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-decorators": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.29.7.tgz", + "integrity": "sha512-9MTTLbF39X6sqM92JPEsoI7++26hjZvzkxKZy64aMhWLH2mPkJ/Q3AV4QLmls3R14FpSpkOwQQfUh962JGQxxg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-default-from": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.29.7.tgz", + "integrity": "sha512-foag0BB37ROhdeIX9O8G0jX7hw0UekJc04cHMrYLOnrErsnBKqJGHJ8eDRpoCFZBvEPPygmmtw4qyU97qa4oOw==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-flow": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.29.7.tgz", + "integrity": "sha512-ajMX6QPcyomotqwpzhkYGxcK2i/us0rs1Qo9QvUpa+Fca0FTmqrzKrctoIYLMxcOhGZldGT/BAVkRGTWBiR8gQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz", + "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz", + "integrity": "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.29.7.tgz", + "integrity": "sha512-N7zArUXWzAMzm+/N0uPBeVB3Fam5lMxtUwMmDK5f/IBBS7a7p1qeUoxd/6CckXoxUdgsntq1Dh8xNW06maZbDQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.29.7.tgz", + "integrity": "sha512-d98gXZkgswvkyohMBABkhm3GeXhYj8psWfwQ2C7gtfrKGTykQa/iOIi+JJhwMjPlZ6Vm2XN+DCf3Es1EoG4ZLA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-remap-async-to-generator": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.29.7.tgz", + "integrity": "sha512-pcUb2SS+RMo9TWVBwKGI5ShtoG7R+zBsFmCKDa6fe8c+hPr3XJlZgoE5j6i8W7gDjhyvy+85vmYexanvXh3d1w==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-remap-async-to-generator": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.29.7.tgz", + "integrity": "sha512-ONyr4+AZhKh8yKWInVxU9AXA9EbsyeLcL6V0dJy6M2/62vuvpGm29zzuymbTpdc451GEpDIdAyPLP3r+P61yKQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.29.7.tgz", + "integrity": "sha512-GtcpjFvanPfzNQi3eTitsCqtRRmmqzpy/A+yhTR1HaZo1Ly3EA8ZXxlPyHdR8/IuRMYc3E4wdGBewB2QKQjAaA==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.29.7.tgz", + "integrity": "sha512-kibJgmEdX2iMwsHY2tSZNDgj8PwIlCQz7FK9KuGKO8zsuoUwSEhoNnNVp/emKWrbY4HeO6kkXfdMqRKKKXBm2A==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.29.7.tgz", + "integrity": "sha512-qV0OGGBVacduzQHE649JyCneOFI/maT+YKsO+K4Yi3xv2wTPNjM/W2o2gdzMwEAZz7fXNTHAe0NcSg30bIN69g==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-globals": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-replace-supers": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.29.7.tgz", + "integrity": "sha512-iPX8aD6H9zV5s7ZsqTdNocPN/MGQ5sSMnElKrktxjJRMnB2jN/1p2+R7GkfD6CAYoVFqy5A4XnSIUeGgJzIWpg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.29.7.tgz", + "integrity": "sha512-24B2nOy2TeJSMheqwPD4DDQOV/elLSIlKxjZt4i05H5AgdPdWR3n18HnNrcJ+j76WJd9gbwb9jPjNYUy6RautA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-flow-strip-types": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.29.7.tgz", + "integrity": "sha512-wRHeUjUjCZnMHmiO5bRgjFLcoEh7JyTdByOW11ahhwNa4V0bmeGEaIvt51yq0zQp2yWIpqfxXXPyUP6GFJZHOQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/plugin-syntax-flow": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.29.7.tgz", + "integrity": "sha512-zeSIHh0+E1Um1WJRXCFlHQYu2ieJNdivLLjlBEp+dIBu3S51n+SZZmIXjxnItw6pz56Cn+KvK68BIBVsxq2JiQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.29.7.tgz", + "integrity": "sha512-A0H91hh6W8MFRkp5TqJmMr39jzGD1A1E1Ysiv2O06Sfbhkapm+XyIzxWCEh5kqwOZ1/8QZ0dY3SeQ7XBqfJd5Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.29.7.tgz", + "integrity": "sha512-j0vCldybPC5b5dwCQOJ21uKtHzt7hxLygJTg9eF1ScfaikEDNfzn94XoW5Fi+seBR0nCyL23xaBFFkq7dTM8XQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.29.7.tgz", + "integrity": "sha512-vuFoLwr4qnv2xbZ16SQd6uPcH5FNrLHhk/Jzo++0XJFcaDsr4gjJVg6j398oMHiC+83k/GiBzviwF5KBJkPUtQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.29.7.tgz", + "integrity": "sha512-idmp1dFaekP9GbcMvG24Kvw2BfhFZjHnNJCkV4WuIY4PskJzwI3f1N5OdgYke38T7rftO6ERulFRn2cFeZwRkg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.29.7.tgz", + "integrity": "sha512-Ld98jn4c0smUywL57m7SgsHq3OpThOa6LqZJif3G6jYOovPleoFhVrBJ1WegRApSFB2wu4+RelAj9AC9G08Z4A==", + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/plugin-transform-destructuring": "^7.29.7", + "@babel/plugin-transform-parameters": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.29.7.tgz", + "integrity": "sha512-sLsyndxK2VwX6yNUOakMb7Sh553ZTe/vVM1XJ+9Z5aW1ytsc8xOIwmyk05NNjN60vkc5/KqoTH6hB4V41LJhng==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.29.7.tgz", + "integrity": "sha512-6GM1dhvK3gNODkXcEcMCOLEDCLSoZ/sBbro2Ax8HURyasQ4NshagQixkRFdh5niI6E4gmA/jYI/4aT7rRos3ZQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.29.7.tgz", + "integrity": "sha512-ZDOBqV/qLYJI0YElr8DcENEyARsFQeESqWXH6gZlghYXuPPjvweuDhP4VyEi4BlUBlLRFZVjxoZDMjxhLW766g==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.29.7.tgz", + "integrity": "sha512-/6Rz4DK1ETDEM/bWHsPHcaEe7ZaT1EqSXjtSP/L0DijOYuaUhiRiOKcwpZ8P7zR4xXEHc2ITdiCgBm9Tpyv9ug==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.29.7.tgz", + "integrity": "sha512-+BNo06dnrzdNNqCm1X6YUaVv0DKk8Q+JYcoZfOkLhYWNCXzlwTSRq8zGWayT1csjcpNXV9CQTBRRbmTLZac5cA==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-create-class-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-display-name": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.29.7.tgz", + "integrity": "sha512-+1wdDMGNb4UPeY3Q4L5yLiYe6TXPXubs4NjrgRFw13hPRLJfEMw2Q5OXkee6/IfdqePIeW4Jjwe3aBh7SdKz4Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.29.7.tgz", + "integrity": "sha512-WsZulLVBUHXVj2cUcPVx6UE21TpalB6bHbSFErKT0Ib++ax24jjXe73FqlWvdylFOjiuPHYi6VCcgRad1ItN+A==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/plugin-syntax-jsx": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-development": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.29.7.tgz", + "integrity": "sha512-Xfy3UVMF04+ypnFbkhvfqtmvwfe92qwQdbGZVonhE+6v35GzlofmOnA1szaZqzb9xYWr0nl1e5EMmzi0DNON1g==", + "license": "MIT", + "dependencies": { + "@babel/plugin-transform-react-jsx": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", + "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", + "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-pure-annotations": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.29.7.tgz", + "integrity": "sha512-H5E+HBgDpr6Q5t+Aj11tL7XkIui1jhbIoArVQnqjgXo5/3YxkN7ZEBcWF4RQlB0T4rrxJQbXS6kiFV6B7XTqUA==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.29.8.tgz", + "integrity": "sha512-0UpIXPtdDtMXfnV2OJAVMLpj3H/92vmkA6lpSRakmycJvj3VUy6Xs1dM8tXRugupykr5WB+LpiVl0J8LMVg2mg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.29.7.tgz", + "integrity": "sha512-xmAscdE/AsqRW7vutbPNoUmu/nF5SrLKPs7aoJgEjo35lLKA/Bc0i2rMv/hr1+Y0o1bQCiVtith3u2vdgRL39Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "babel-plugin-polyfill-corejs2": "^0.4.14", + "babel-plugin-polyfill-corejs3": "^0.13.0", + "babel-plugin-polyfill-regenerator": "^0.6.5", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.29.7.tgz", + "integrity": "sha512-I+WYbGBAiCn7nA6xBrlgPH+MB7HWb4u8pv5S0Pv7OtwNvIFvCCb24YlttKEeUFVurfBCEaOTnuhlqsb7f0Z5Dg==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.29.7.tgz", + "integrity": "sha512-NCSEJ4sLFU2gqAub45HYh4fus2yQ36rr6ei6vpU7NdoJqCpxvEG8E6eJpscGyXP3VHD2Ny+fSXr04k1hoUrFqA==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.29.7.tgz", + "integrity": "sha512-jK52h8LaLc7JarhQV2ofeFMts4H7vnOXnqZNA6fYglBTZewRBE51KWt3BUltW1P+KoPsYkHoJeXePuz4zo2LMw==", + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-create-class-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.29.7", + "@babel/plugin-syntax-typescript": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.29.7.tgz", + "integrity": "sha512-7D/x/23/d/3VqZ0QA+LGbZMlGwZjztBygSWWWsfTPoQ1oQ6Q1P6Mr3d0kk42XabyUVw+fha3LqdRsFqeKqvCyA==", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-typescript": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.29.7.tgz", + "integrity": "sha512-/Foi8vKY2EVbed/1eZx0gJEEwHAIxogrySI7rULcRIvhZzbvoE/b5qG5Ghc0WKAFKOHA9SD1x7RsFlOYdutIiQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "@babel/plugin-syntax-jsx": "^7.29.7", + "@babel/plugin-transform-modules-commonjs": "^7.29.7", + "@babel/plugin-transform-typescript": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz", + "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz", + "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.8", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.8", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.8", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", + "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@egjs/hammerjs": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", + "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==", + "license": "MIT", + "dependencies": { + "@types/hammerjs": "^2.0.36" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@expo-google-fonts/inter": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@expo-google-fonts/inter/-/inter-0.4.2.tgz", + "integrity": "sha512-syfiImMaDmq7cFi0of+waE2M4uSCyd16zgyWxdPOY7fN2VBmSLKEzkfbZgeOjJq61kSqPBNNtXjggiQiSD6gMQ==", + "license": "MIT AND OFL-1.1" + }, + "node_modules/@expo-google-fonts/material-symbols": { + "version": "0.4.45", + "resolved": "https://registry.npmjs.org/@expo-google-fonts/material-symbols/-/material-symbols-0.4.45.tgz", + "integrity": "sha512-D5gd/uFa7KfMJX9S11hvej4GpQnBl27oKiUgyIq3cLTPtyDOWBwRgmeePIdV6+PGcedlDkaCND2BnRgAkxzNaA==", + "license": "MIT AND Apache-2.0" + }, + "node_modules/@expo/code-signing-certificates": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@expo/code-signing-certificates/-/code-signing-certificates-0.0.6.tgz", + "integrity": "sha512-iNe0puxwBNEcuua9gmTGzq+SuMDa0iATai1FlFTMHJ/vUmKvN/V//drXoLJkVb5i5H3iE/n/qIJxyoBnXouD0w==", + "license": "MIT", + "dependencies": { + "node-forge": "^1.3.3" + } + }, + "node_modules/@expo/config": { + "version": "57.0.9", + "resolved": "https://registry.npmjs.org/@expo/config/-/config-57.0.9.tgz", + "integrity": "sha512-dmzlKraIFxa7wLwV6K7WzI8jp6QZpW6Mc5mGjLimJUFjzh4uQdYaT3m3plEutM5yxBoBEwqzks7l+I/ljCbxAQ==", + "license": "MIT", + "dependencies": { + "@expo/config-plugins": "~57.0.9", + "@expo/config-types": "^57.0.2", + "@expo/json-file": "^11.0.1", + "@expo/require-utils": "^57.0.5", + "deepmerge": "^4.3.1", + "getenv": "^2.0.0", + "glob": "^13.0.0", + "resolve-workspace-root": "^2.0.0", + "semver": "^7.6.0", + "slugify": "^1.3.4" + } + }, + "node_modules/@expo/config-plugins": { + "version": "57.0.9", + "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-57.0.9.tgz", + "integrity": "sha512-hHgfL1avkCdEvDSw7IwlKwRYYNgcxzbNNMIk6W6lTkJpY0MajinAfeJUS0J+wPCsjUfGbVqOJM+XhPaO5ulUxg==", + "license": "MIT", + "dependencies": { + "@expo/config-types": "^57.0.2", + "@expo/json-file": "~11.0.1", + "@expo/plist": "^0.8.1", + "@expo/require-utils": "^57.0.5", + "@expo/sdk-runtime-versions": "^1.0.0", + "chalk": "^4.1.2", + "debug": "^4.3.5", + "getenv": "^2.0.0", + "glob": "^13.0.0", + "semver": "^7.5.4", + "slugify": "^1.6.6", + "xcode": "^3.0.1", + "xml2js": "0.6.0" + } + }, + "node_modules/@expo/config-plugins/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@expo/config-types": { + "version": "57.0.2", + "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-57.0.2.tgz", + "integrity": "sha512-ewW08OonrcRIsRKIlFvvcmmafE5zemb1ocu3HkNwtVPyRtj2w42pZCAkMIROYpcVBaPnc3mDT9UZDzwXWC3i6g==", + "license": "MIT" + }, + "node_modules/@expo/config/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@expo/devcert": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@expo/devcert/-/devcert-1.2.1.tgz", + "integrity": "sha512-qC4eaxmKMTmJC2ahwyui6ud8f3W60Ss7pMkpBq40Hu3zyiAaugPXnZ24145U7K36qO9UHdZUVxsCvIpz2RYYCA==", + "license": "MIT", + "dependencies": { + "@expo/sudo-prompt": "^9.3.1", + "debug": "^3.1.0" + } + }, + "node_modules/@expo/devcert/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/@expo/devtools": { + "version": "57.0.1", + "resolved": "https://registry.npmjs.org/@expo/devtools/-/devtools-57.0.1.tgz", + "integrity": "sha512-GyUf+wFNkbttaX0jR7MZa9bm77U0IrLg6d2AjpxdyoXw/w4abHoXG0oFufwLMgP9zLTd5+Ct4X/ffNUTnlzZgg==", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, + "node_modules/@expo/dom-webview": { + "version": "57.0.1", + "resolved": "https://registry.npmjs.org/@expo/dom-webview/-/dom-webview-57.0.1.tgz", + "integrity": "sha512-lAKsME4SAq+8sf56oN0DX5TBYyruupoRxbWbD2xf9RnKY8y6x8eb9LCE5pxSN0qyWdqnp+0wmyWzDkKboThKAw==", + "license": "MIT", + "peerDependencies": { + "expo": "*", + "react": "*", + "react-native": "*" + } + }, + "node_modules/@expo/env": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@expo/env/-/env-2.4.3.tgz", + "integrity": "sha512-M1NXeZCA1mkMkYOyIe7PlyRX0/jqFtMoJgyblnlq/vpCRfmueFT7RnGSQG8uEFDF5WHOFGijAQ3fogPh3/n5Ng==", + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "debug": "^4.3.4", + "getenv": "^2.0.0" + }, + "engines": { + "node": ">=20.12.0" + } + }, + "node_modules/@expo/expo-modules-macros-plugin": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@expo/expo-modules-macros-plugin/-/expo-modules-macros-plugin-0.6.1.tgz", + "integrity": "sha512-cpsLZE4rqkc1Y3eZTkxB98jrqY1YXgetmtxFt8q89jBRmk3quRuk1BZo+VcnCSObZardjg99r1k5xijEMONFGA==", + "license": "MIT" + }, + "node_modules/@expo/fingerprint": { + "version": "0.20.12", + "resolved": "https://registry.npmjs.org/@expo/fingerprint/-/fingerprint-0.20.12.tgz", + "integrity": "sha512-FIR5fkZYeFaLSowmjgyB6RPKl8AXeE8HuCBHHvyxK8UhOjpPfCAmzT4E7v2yub4qqDafKnfcOFCYxvpUEu+01w==", + "license": "MIT", + "dependencies": { + "@expo/env": "^2.4.3", + "@expo/spawn-async": "^1.8.0", + "arg": "^5.0.2", + "chalk": "^4.1.2", + "debug": "^4.3.4", + "getenv": "^2.0.0", + "glob": "^13.0.0", + "ignore": "^5.3.1", + "minimatch": "^10.2.2", + "resolve-from": "^5.0.0", + "semver": "^7.6.0" + }, + "bin": { + "fingerprint": "bin/cli.js" + } + }, + "node_modules/@expo/fingerprint/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@expo/image-utils": { + "version": "0.11.5", + "resolved": "https://registry.npmjs.org/@expo/image-utils/-/image-utils-0.11.5.tgz", + "integrity": "sha512-KPQBTpmpAfy/Vu9y4wPW808/qtZxjYmyJg8cm2QCPAupp+qEWA3b5zmk0ulOwQ9OgeHxuCPgUqWgkwHFo7UsrQ==", + "license": "MIT", + "dependencies": { + "@expo/require-utils": "^57.0.5", + "@expo/spawn-async": "^1.8.0", + "chalk": "^4.0.0", + "getenv": "^2.0.0", + "jimp-compact": "0.16.1", + "parse-png": "^2.1.0", + "semver": "^7.6.0" + } + }, + "node_modules/@expo/image-utils/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@expo/inline-modules": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@expo/inline-modules/-/inline-modules-0.1.7.tgz", + "integrity": "sha512-Bz/khd1gIJqDkje7t5ejD5e9jFbm4xEJzWSwRKadRo6gruepbw1xJ3Eb+e58OS8fY1ZNQYjzZbspnuph67sN0g==", + "license": "MIT", + "dependencies": { + "@expo/config-plugins": "~57.0.9" + } + }, + "node_modules/@expo/json-file": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/@expo/json-file/-/json-file-11.0.1.tgz", + "integrity": "sha512-zxHWj4MKKMAL29ZQSY/Fssx4Thluk40JmuGNaeS078wy/NhlFhnVi+rHHunulE3xJAJ0CM73m8VK2+GkF9eRwQ==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.20.0", + "json5": "^2.2.3" + } + }, + "node_modules/@expo/local-build-cache-provider": { + "version": "57.0.8", + "resolved": "https://registry.npmjs.org/@expo/local-build-cache-provider/-/local-build-cache-provider-57.0.8.tgz", + "integrity": "sha512-SEdE0pAQrr90bRh3MNR0ZuwoIBw390cYdFgbn7Vk0Mtm9EHaBfP7kYj+2hXnXZJgOEm3/JMtfoD3rV7rWA9FGg==", + "license": "MIT", + "dependencies": { + "@expo/config": "~57.0.9", + "chalk": "^4.1.2" + } + }, + "node_modules/@expo/log-box": { + "version": "57.0.4", + "resolved": "https://registry.npmjs.org/@expo/log-box/-/log-box-57.0.4.tgz", + "integrity": "sha512-IxwS9s1L2muj8mj8AQSuiy7u8OFJdc02NRFo2me/Tj6DiaeG5SREqmpBE4rQpR2cadqSg5jl8Qab8Cjie616dg==", + "license": "MIT", + "dependencies": { + "@expo/dom-webview": "^57.0.1", + "anser": "^1.4.9", + "stacktrace-parser": "^0.1.10" + }, + "peerDependencies": { + "@expo/dom-webview": "^57.0.1", + "expo": "*", + "react": "*", + "react-native": "*" + } + }, + "node_modules/@expo/metro": { + "version": "56.0.2", + "resolved": "https://registry.npmjs.org/@expo/metro/-/metro-56.0.2.tgz", + "integrity": "sha512-Ld5AeYMCCDa8bLeWhfuLbZFFjlV3f6ORqyPz2glGh6RltIngMuLf9BTC2yvHFjkKuGxL5SynijmA8xmNNWn5iA==", + "license": "MIT", + "dependencies": { + "metro": "0.84.5", + "metro-babel-transformer": "0.84.5", + "metro-cache": "0.84.5", + "metro-cache-key": "0.84.5", + "metro-config": "0.84.5", + "metro-core": "0.84.5", + "metro-file-map": "0.84.5", + "metro-minify-terser": "0.84.5", + "metro-resolver": "0.84.5", + "metro-runtime": "0.84.5", + "metro-source-map": "0.84.5", + "metro-symbolicate": "0.84.5", + "metro-transform-plugins": "0.84.5", + "metro-transform-worker": "0.84.5" + } + }, + "node_modules/@expo/metro-config": { + "version": "57.0.12", + "resolved": "https://registry.npmjs.org/@expo/metro-config/-/metro-config-57.0.12.tgz", + "integrity": "sha512-S62Lrq35HZqBFD55423pmWb8PjaiR/W02zQC1uECBmw1vTN8WZaFz4TJ0i21EeJzwfebMb9MLxL8JZ102Z6VbA==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.20.0", + "@babel/core": "^7.20.0", + "@babel/generator": "^7.20.5", + "@expo/config": "~57.0.9", + "@expo/env": "~2.4.3", + "@expo/json-file": "~11.0.1", + "@expo/metro": "~56.0.2", + "@expo/require-utils": "^57.0.5", + "@expo/spawn-async": "^1.8.0", + "@jridgewell/gen-mapping": "^0.3.13", + "@jridgewell/remapping": "^2.3.5", + "@jridgewell/sourcemap-codec": "^1.5.5", + "browserslist": "^4.25.0", + "chalk": "^4.1.0", + "debug": "^4.3.2", + "getenv": "^2.0.0", + "glob": "^13.0.0", + "hermes-parser": "^0.36.0", + "jsc-safe-url": "^0.2.4", + "lightningcss": "^1.30.1", + "picomatch": "^4.0.4", + "postcss": "^8.5.14", + "resolve-from": "^5.0.0" + }, + "peerDependencies": { + "expo": "*" + }, + "peerDependenciesMeta": { + "expo": { + "optional": true + } + } + }, + "node_modules/@expo/metro-file-map": { + "version": "57.0.2", + "resolved": "https://registry.npmjs.org/@expo/metro-file-map/-/metro-file-map-57.0.2.tgz", + "integrity": "sha512-tb50nSIWwKpRufSkGuivOK0FbUxv1Uwqptb0SzFTk0bkmYmcy3gIwnCbOHTfmrQDVndRhPEiu2SYgh9Z0PCvGg==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.4", + "fb-watchman": "^2.0.2", + "invariant": "^2.2.4", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + } + }, + "node_modules/@expo/metro-runtime": { + "version": "57.0.15", + "resolved": "https://registry.npmjs.org/@expo/metro-runtime/-/metro-runtime-57.0.15.tgz", + "integrity": "sha512-9RaFkqIzRud6ol9fc5ZKHgNDYeDjQVBdAQC+rjSQ6RiKV0pY+SjDqGmKY5a4M9TaV0qLMCNNrp5R88BqC2xbuQ==", + "license": "MIT", + "dependencies": { + "@expo/log-box": "^57.0.4", + "anser": "^1.4.9", + "pretty-format": "^29.7.0", + "stacktrace-parser": "^0.1.10", + "whatwg-fetch": "^3.0.0" + }, + "peerDependencies": { + "@expo/log-box": "^57.0.4", + "expo": "*", + "react": "*", + "react-dom": "*", + "react-native": "*" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/@expo/metro/node_modules/metro-config": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.84.5.tgz", + "integrity": "sha512-zie+uN6oohscowi2S7ByU+wUw6CrT4ZxW9uAbONOObSxx86RGmnIAmjXHLkfmcdYoY7jzOPEbqcI6oeVmqyBQA==", + "license": "MIT", + "dependencies": { + "connect": "^3.6.5", + "flow-enums-runtime": "^0.0.6", + "jest-validate": "^29.7.0", + "metro": "0.84.5", + "metro-cache": "0.84.5", + "metro-core": "0.84.5", + "metro-runtime": "0.84.5", + "yaml": "^2.6.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/@expo/metro/node_modules/metro-runtime": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.84.5.tgz", + "integrity": "sha512-U1m2+d1Pr+JO2/iVXBB2OfXXityz7tqwIorxfrT15IEgaHvpJBq/OHiqnOWPKJbUl3JcxjcdviZZOKk85oK4Qg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.0", + "flow-enums-runtime": "^0.0.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/@expo/osascript": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@expo/osascript/-/osascript-2.7.1.tgz", + "integrity": "sha512-Zn03EX6In7ts2lPUW2ESUSkEhEWQN1qqsiXjadtZMJOuZRkMiAg1ZQHuvz9DjByDWNJ2pBwAGyrts9lj9k389g==", + "license": "MIT", + "dependencies": { + "@expo/spawn-async": "^1.8.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@expo/package-manager": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@expo/package-manager/-/package-manager-1.13.1.tgz", + "integrity": "sha512-y/K+CaYYpZpNGZhSX4HyLT/vyIunFjNfyoxNysPBCefeLKI/VCx6f9LNPzrxayr3rCYO5bl9O8H+HRQK265Nkg==", + "license": "MIT", + "dependencies": { + "@expo/json-file": "^11.0.1", + "@expo/spawn-async": "^1.8.0", + "chalk": "^4.0.0", + "npm-package-arg": "^11.0.0", + "ora": "^3.4.0", + "resolve-workspace-root": "^2.0.0" + } + }, + "node_modules/@expo/plist": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@expo/plist/-/plist-0.8.1.tgz", + "integrity": "sha512-3gTReGIUm0oRaMClsAJYxBnVPCl6fVpsl8HS+DTVxDhW4GyVyxg9E/Znm3BvcHtUJ51RJJI14pC1wvrNilCRHw==", + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.8.8", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + } + }, + "node_modules/@expo/prebuild-config": { + "version": "57.0.15", + "resolved": "https://registry.npmjs.org/@expo/prebuild-config/-/prebuild-config-57.0.15.tgz", + "integrity": "sha512-xTbWHroj0PDmlbqvmU+zF9ZZxveJkiuyiPoeRJYRGruFHebRAWnoTdw5S7d/UCzDBI8ropGGu9g2eb2nMxtvAw==", + "license": "MIT", + "dependencies": { + "@expo/config": "~57.0.9", + "@expo/config-plugins": "~57.0.9", + "@expo/config-types": "^57.0.2", + "@expo/image-utils": "^0.11.5", + "@expo/json-file": "^11.0.1", + "@react-native/normalize-colors": "0.86.3", + "debug": "^4.3.1", + "expo-modules-autolinking": "~57.0.12", + "resolve-from": "^5.0.0", + "semver": "^7.6.0" + } + }, + "node_modules/@expo/prebuild-config/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@expo/require-utils": { + "version": "57.0.5", + "resolved": "https://registry.npmjs.org/@expo/require-utils/-/require-utils-57.0.5.tgz", + "integrity": "sha512-kTAXj9lDFEIPMsbAOGCGbjBbMF0oi7CqkYM79KOX0DDD9wSwXmlKL1z2h8OwsrBf7mbOo2DjlRvZu4BEjrIxGw==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.20.0", + "@babel/core": "^7.25.2", + "@babel/plugin-transform-modules-commonjs": "^7.24.8" + }, + "peerDependencies": { + "typescript": "^5.0.0 || ^5.0.0-0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@expo/schema-utils": { + "version": "57.0.2", + "resolved": "https://registry.npmjs.org/@expo/schema-utils/-/schema-utils-57.0.2.tgz", + "integrity": "sha512-fMu/jyN0l1Wzv7XkeWR4IYCx1M8ryui3FdBNGrWwbRgJ7EhxXxK8E2jxP2W3pbgUwUY0V3hG8+GyfCZwny+Lxw==", + "license": "MIT" + }, + "node_modules/@expo/sdk-runtime-versions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@expo/sdk-runtime-versions/-/sdk-runtime-versions-1.0.0.tgz", + "integrity": "sha512-Doz2bfiPndXYFPMRwPyGa1k5QaKDVpY806UJj570epIiMzWaYyCtobasyfC++qfIXVb5Ocy7r3tP9d62hAQ7IQ==", + "license": "MIT" + }, + "node_modules/@expo/spawn-async": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@expo/spawn-async/-/spawn-async-1.8.0.tgz", + "integrity": "sha512-eb9xxd/LbuEGSdua4NumCu/McVB9EM+F/JxB9pWgnERw4HQ9XyTNH1KapG6oqLWR8TuRK2LQfzJlmNi94CVobw==", + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.6" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@expo/sudo-prompt": { + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@expo/sudo-prompt/-/sudo-prompt-9.3.2.tgz", + "integrity": "sha512-HHQigo3rQWKMDzYDLkubN5WQOYXJJE2eNqIQC2axC2iO3mHdwnIR7FgZVvHWtBwAdzBgAP0ECp8KqS8TiMKvgw==", + "license": "MIT" + }, + "node_modules/@expo/ui": { + "version": "57.0.16", + "resolved": "https://registry.npmjs.org/@expo/ui/-/ui-57.0.16.tgz", + "integrity": "sha512-3MK74dEPE4mwlv0VbyQKepmHigOs2bcOvay2SFqc1/QSywVTOjbkNPYUbq2H+LyOLP2sHMazrPBwfXGiYn3q7A==", + "license": "MIT", + "dependencies": { + "sf-symbols-typescript": "^2.1.0", + "vaul": "^1.1.2" + }, + "peerDependencies": { + "@babel/core": "*", + "expo": "*", + "react": "*", + "react-dom": "*", + "react-native": "*", + "react-native-worklets": "*" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-native-worklets": { + "optional": true + } + } + }, + "node_modules/@expo/vector-icons": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/@expo/vector-icons/-/vector-icons-15.1.1.tgz", + "integrity": "sha512-Iu2VkcoI5vygbtYngm7jb4ifxElNVXQYdDrYkT7UCEIiKLeWnQY0wf2ZhHZ+Wro6Sc5TaumpKUOqDRpLi5rkvw==", + "license": "MIT", + "peerDependencies": { + "expo-font": ">=14.0.4", + "react": "*", + "react-native": "*" + } + }, + "node_modules/@expo/xcpretty": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/@expo/xcpretty/-/xcpretty-4.4.4.tgz", + "integrity": "sha512-4aQzz9vgxcNXFfo/iyNgDDYfsU5XGKKxWxZopw0cVotHiW+U8IJbIxMaxsINs6bHhtkG3StKNPcOrn3eBuxKPw==", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/code-frame": "^7.20.0", + "chalk": "^4.1.0", + "js-yaml": "^4.1.0" + }, + "bin": { + "excpretty": "build/cli.js" + } + }, + "node_modules/@isaacs/ttlcache": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz", + "integrity": "sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "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==", + "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==", + "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==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "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==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@radix-ui/primitive": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.7.tgz", + "integrity": "sha512-rqWnm76nYT8HoNNqEjpgJ7Pw/DrBj5iBTrmEPo6HTX5+VJyBNOqTdv4g89G63HuR5g0AaENoAcH7Is5fF2kZ8Q==", + "license": "MIT" + }, + "node_modules/@radix-ui/react-collection": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.15.tgz", + "integrity": "sha512-9W+B9NPF0NaaPh/1NJd3+KqsnlLqU9H7T2rvww+fp+T/evVXdNAyYcnfRQZFOjkR1ajQp3yORlqnI8soawLvNA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.2.2", + "@radix-ui/react-primitive": "2.1.10", + "@radix-ui/react-slot": "1.3.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.5.tgz", + "integrity": "sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-context": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.2.2.tgz", + "integrity": "sha512-RHCUGwKHDr0hDGg4X7ma4JG4/+12qxw8rkh5QKdDldlCvtja6nUx1Ef/8HVrJze81lEsgLQlqjzjGNHantgnQA==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog": { + "version": "1.1.23", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.23.tgz", + "integrity": "sha512-Ksw4WeROkO4rC9k/onilX/Ao2Cr1ku1unMNH+XSCcP4jSXYu7HDsg9n4ojMjVb22XpYjAQ9qfrFlVbru1vXDUA==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.7", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.2.2", + "@radix-ui/react-dismissable-layer": "1.1.19", + "@radix-ui/react-focus-guards": "1.1.6", + "@radix-ui/react-focus-scope": "1.1.16", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-portal": "1.1.17", + "@radix-ui/react-presence": "1.1.10", + "@radix-ui/react-primitive": "2.1.10", + "@radix-ui/react-slot": "1.3.3", + "@radix-ui/react-use-controllable-state": "1.2.6", + "@radix-ui/react-use-layout-effect": "1.1.4", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.7.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-direction": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.4.tgz", + "integrity": "sha512-5pzg4FGQNpExhnhT2zlrP1wZFaYCd1K0nYWoFAdcYoYK868IEigqMX3B3f8yIoRlAhAeDWciLI6ZdCKHF9P4Vg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dismissable-layer": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.19.tgz", + "integrity": "sha512-8g4pfOL9HoKKLWGiypT+dphVqjFfmcXO5GBnhsG6zI+lxAx/8feQpr+1LSN8Re3hiZ+XkLNS4O9ztK11/LzQ6w==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.7", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-primitive": "2.1.10", + "@radix-ui/react-use-callback-ref": "1.1.4", + "@radix-ui/react-use-effect-event": "0.0.5" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-focus-guards": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.6.tgz", + "integrity": "sha512-RNOJjfZMTyBM6xYmV3IVGXkPjIhcBAuv48POevAXwrGJhkWZ9p1rFoIS1JFooPuT193AZmRsCPhpoVJxx6OPoQ==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-focus-scope": { + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.16.tgz", + "integrity": "sha512-wmRZ2WWLvmt6KHy2rNPOdPUjwq5xOHY02+m+udwJTn0aNIox/rkskAvJTyTLGhPK6KgrUjlJUJpgmx/+wFiFIQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-primitive": "2.1.10", + "@radix-ui/react-use-callback-ref": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-id": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.4.tgz", + "integrity": "sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-portal": { + "version": "1.1.17", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.17.tgz", + "integrity": "sha512-vKQLcWypUnwZVvfV7UkGahH2g6ySe8M8R+zYBwPrv5byZ9QAW6cQVvNKo7GgmD+p8aYb6D9JBuvy8/WhOno2wQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.1.10", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-presence": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.10.tgz", + "integrity": "sha512-3wyzCQ6+ubRA+D4uv9m95JYLXxmOHp05qjrkjeA7uKHHtjpPggQzc6DAb0URl7j67oR0K2foO4ip27TiX037Bw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-primitive": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.10.tgz", + "integrity": "sha512-MucOnzh6hR5mid6VpkbglRAMYMjKLqRnGBbjXkzjK52fuQDd1qbkx78a5P40mkcnVXJdEVxm26E9OPAiUq7nBg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-slot": "1.3.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-roving-focus": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.19.tgz", + "integrity": "sha512-V9jI6hDjT7l3jsCQD9bLNvDLM3tH/gdbOTp7Tefp3hbbgCGQoK7tUvrWiRlcoBHIZ809ElXwNQwVo0B98LuTXQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.7", + "@radix-ui/react-collection": "1.1.15", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.2.2", + "@radix-ui/react-direction": "1.1.4", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-primitive": "2.1.10", + "@radix-ui/react-use-callback-ref": "1.1.4", + "@radix-ui/react-use-controllable-state": "1.2.6", + "@radix-ui/react-use-is-hydrated": "0.1.3", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slot": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.3.3.tgz", + "integrity": "sha512-qx7oqnYbxnK9kYI9m317qmFmEgo6ywqWvbTogdj7cL9p3/yx4M48p7Rnw5z3H890cL/ow/EeWJsuTykeZVXP5Q==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.5" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs": { + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.21.tgz", + "integrity": "sha512-UKxJlZid7FVtsk/WTxj4i4uSEgj2Au+KBbS7SQyTlzMhhn+86Cz3tISZdTa87bfEfcuvZezf2ZsxD4xuEKtkog==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.7", + "@radix-ui/react-context": "1.2.2", + "@radix-ui/react-direction": "1.1.4", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-presence": "1.1.10", + "@radix-ui/react-primitive": "2.1.10", + "@radix-ui/react-roving-focus": "1.1.19", + "@radix-ui/react-use-controllable-state": "1.2.6" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.4.tgz", + "integrity": "sha512-R6OUY2e2fA6Yn6s+VSx5KBV6Nx8LQEhu+cz7LCej18rQ1HLyg9PSC9jP/ZNx0o6FAIK9c0F1kHylzSxKsdlkrQ==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.6.tgz", + "integrity": "sha512-uEQJGT97ZA/TgP/Hydw47lHu+/vQj6z/0jA+WeTbK1o9Rx45GImjpD0tc3W5ad3D6XTSR6e1yEO0FvGq6WQfVQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.7", + "@radix-ui/react-use-effect-event": "0.0.5", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-effect-event": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.5.tgz", + "integrity": "sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-is-hydrated": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-is-hydrated/-/react-use-is-hydrated-0.1.3.tgz", + "integrity": "sha512-umO/aJ+82CpOnhDZUTbILCQf7kU/g0iv+oGs/Q8jw7IkhWBzaEP4sA268PhFAJTFetbwp3ICc6ktpI4TqtxcIw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.4.tgz", + "integrity": "sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@react-native-async-storage/async-storage": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-2.2.0.tgz", + "integrity": "sha512-gvRvjR5JAaUZF8tv2Kcq/Gbt3JHwbKFYfmb445rhOj6NUMx3qPLixmDx5pZAyb9at1bYvJ4/eTUipU5aki45xw==", + "license": "MIT", + "dependencies": { + "merge-options": "^3.0.4" + }, + "peerDependencies": { + "react-native": "^0.0.0-0 || >=0.65 <1.0" + } + }, + "node_modules/@react-native-community/netinfo": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-12.0.1.tgz", + "integrity": "sha512-P/3caXIvfYSJG8AWJVefukg+ZGRPs+M4Lp3pNJtgcTYoJxCjWrKQGNnCkj/Cz//zWa/avGed0i/wzm0T8vV2IQ==", + "license": "MIT", + "peerDependencies": { + "react": "*", + "react-native": ">=0.59" + } + }, + "node_modules/@react-native-masked-view/masked-view": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@react-native-masked-view/masked-view/-/masked-view-0.3.2.tgz", + "integrity": "sha512-XwuQoW7/GEgWRMovOQtX3A4PrXhyaZm0lVUiY8qJDvdngjLms9Cpdck6SmGAUNqQwcj2EadHC1HwL0bEyoa/SQ==", + "license": "MIT", + "peerDependencies": { + "react": ">=16", + "react-native": ">=0.57" + } + }, + "node_modules/@react-native/assets-registry": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.86.3.tgz", + "integrity": "sha512-TDhgCZA4wjJg84d5A9swiOQYPIWSKEEVdg9IwMFZDupQzW/F3QoLUrfAJOcalgqTDA9/buTB8awhE3Whwg6u9Q==", + "license": "MIT", + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/@react-native/babel-plugin-codegen": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.86.3.tgz", + "integrity": "sha512-O6Xza4JBGPIU8J7YbKTyBoYL4thpy8jMW/oaLDWdAyOwYHKIjK47pAL5HUEbOe2bWz2PEKjbYRF2ApkJv1ottQ==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.0", + "@react-native/codegen": "0.86.3" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/@react-native/babel-preset": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/babel-preset/-/babel-preset-0.86.3.tgz", + "integrity": "sha512-/eqs/Hy9RZRcjdcs4wj3Cqmxvtb3NM5g+Uuh1RIvsjynMO8PRsrVWWLWgBcZL/jYUo+ogXd2NFB0W8L5Bg89xw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/core": "^7.25.2", + "@babel/plugin-proposal-export-default-from": "^7.24.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-default-from": "^7.24.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-transform-async-generator-functions": "^7.25.4", + "@babel/plugin-transform-async-to-generator": "^7.24.7", + "@babel/plugin-transform-block-scoping": "^7.25.0", + "@babel/plugin-transform-class-properties": "^7.25.4", + "@babel/plugin-transform-classes": "^7.25.4", + "@babel/plugin-transform-destructuring": "^7.24.8", + "@babel/plugin-transform-flow-strip-types": "^7.25.2", + "@babel/plugin-transform-for-of": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.8", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", + "@babel/plugin-transform-optional-catch-binding": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.8", + "@babel/plugin-transform-private-methods": "^7.24.7", + "@babel/plugin-transform-private-property-in-object": "^7.24.7", + "@babel/plugin-transform-react-display-name": "^7.24.7", + "@babel/plugin-transform-react-jsx": "^7.25.2", + "@babel/plugin-transform-react-jsx-self": "^7.24.7", + "@babel/plugin-transform-react-jsx-source": "^7.24.7", + "@babel/plugin-transform-regenerator": "^7.24.7", + "@babel/plugin-transform-runtime": "^7.24.7", + "@babel/plugin-transform-typescript": "^7.25.2", + "@babel/plugin-transform-unicode-regex": "^7.24.7", + "@react-native/babel-plugin-codegen": "0.86.3", + "babel-plugin-syntax-hermes-parser": "0.36.0", + "babel-plugin-transform-flow-enums": "^0.0.2", + "react-refresh": "^0.14.0" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + }, + "peerDependencies": { + "@babel/core": "*" + } + }, + "node_modules/@react-native/babel-preset/node_modules/babel-plugin-syntax-hermes-parser": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.36.0.tgz", + "integrity": "sha512-LhD0xdoedDw7ansQgXbB2DADLZIK/LRXuWNBPuVzMc5S2WK5GyT89tCM+cQzxFGO0mGyLK6D5TrVOJJzAoDy8Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "hermes-parser": "0.36.0" + } + }, + "node_modules/@react-native/babel-preset/node_modules/hermes-estree": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.36.0.tgz", + "integrity": "sha512-A1+8zn5oss2CFP7pKsOaxorQG6FNIz1WU1VDqruLPPZl3LVgeE2C5xfFg8Ow6/Ow4mSslLLtYP1J3n38eKyW9w==", + "license": "MIT", + "peer": true + }, + "node_modules/@react-native/babel-preset/node_modules/hermes-parser": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.36.0.tgz", + "integrity": "sha512-GdpwMmH5x6IpC1cijvcvYnlPB60Mh6kTSF/NFdYV/j56gYdi+0RIakYs+eqOV+bbO0SW7mgVVGSsTJxyPQfo3w==", + "license": "MIT", + "peer": true, + "dependencies": { + "hermes-estree": "0.36.0" + } + }, + "node_modules/@react-native/codegen": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/codegen/-/codegen-0.86.3.tgz", + "integrity": "sha512-Ux4jHi0fh+bdtVEcL0gaPLbY56V+SvFUDl/8sRAE1jdb4k+o7fT/4Nc29yz4X+qfjstkSqObQTMBGhdzxH9JvA==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.2", + "@babel/parser": "^7.29.0", + "hermes-parser": "0.36.0", + "invariant": "^2.2.4", + "nullthrows": "^1.1.1", + "tinyglobby": "^0.2.15", + "yargs": "^17.6.2" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + }, + "peerDependencies": { + "@babel/core": "*" + } + }, + "node_modules/@react-native/codegen/node_modules/hermes-estree": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.36.0.tgz", + "integrity": "sha512-A1+8zn5oss2CFP7pKsOaxorQG6FNIz1WU1VDqruLPPZl3LVgeE2C5xfFg8Ow6/Ow4mSslLLtYP1J3n38eKyW9w==", + "license": "MIT" + }, + "node_modules/@react-native/codegen/node_modules/hermes-parser": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.36.0.tgz", + "integrity": "sha512-GdpwMmH5x6IpC1cijvcvYnlPB60Mh6kTSF/NFdYV/j56gYdi+0RIakYs+eqOV+bbO0SW7mgVVGSsTJxyPQfo3w==", + "license": "MIT", + "dependencies": { + "hermes-estree": "0.36.0" + } + }, + "node_modules/@react-native/community-cli-plugin": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/community-cli-plugin/-/community-cli-plugin-0.86.3.tgz", + "integrity": "sha512-qSDL9LQc5mZSZPNczT95WU9YQuPzxBklgON9vLhhqfI0yWIwKInqFx88dQ/uiEXBtf0yossthaQIqA4Ml6bF6g==", + "license": "MIT", + "dependencies": { + "@react-native/dev-middleware": "0.86.3", + "debug": "^4.4.0", + "invariant": "^2.2.4", + "metro": "^0.84.3", + "metro-config": "^0.84.3", + "metro-core": "^0.84.3", + "semver": "^7.1.3" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + }, + "peerDependencies": { + "@react-native-community/cli": "*", + "@react-native/metro-config": "0.86.3" + }, + "peerDependenciesMeta": { + "@react-native-community/cli": { + "optional": true + }, + "@react-native/metro-config": { + "optional": true + } + } + }, + "node_modules/@react-native/community-cli-plugin/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@react-native/debugger-frontend": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/debugger-frontend/-/debugger-frontend-0.86.3.tgz", + "integrity": "sha512-TQmeofQ0PcuylhhlleOeuzHYZfbrgm3gayXzowqUEzgRisTm1D40/J3ggqs7XkQi5HP5ZA3n8dHmKL9vIzPcsw==", + "license": "BSD-3-Clause", + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/@react-native/debugger-shell": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/debugger-shell/-/debugger-shell-0.86.3.tgz", + "integrity": "sha512-O4ds+J7xZfxkbih9T+cAGegBdvKSPKYJm/lDgC9CpEjFMkmzWTpVLU3Qsv9sqZuo58z+sGhIcJfPsCFFWHpqbQ==", + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.6", + "debug": "^4.4.0", + "fb-dotslash": "0.5.8" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/@react-native/dev-middleware": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/dev-middleware/-/dev-middleware-0.86.3.tgz", + "integrity": "sha512-LiEPTqTg/63bYUnrPyHLfjTDCNhA/+CUqI1+DsA9tYyewtSbULd5awsva6SgE10I+2iMhgKXS3ymkhU/kSCrGA==", + "license": "MIT", + "dependencies": { + "@isaacs/ttlcache": "^1.4.1", + "@react-native/debugger-frontend": "0.86.3", + "@react-native/debugger-shell": "0.86.3", + "chrome-launcher": "^0.15.2", + "chromium-edge-launcher": "^0.3.0", + "connect": "^3.6.5", + "debug": "^4.4.0", + "invariant": "^2.2.4", + "nullthrows": "^1.1.1", + "open": "^7.0.3", + "serve-static": "^1.16.2", + "ws": "^7.5.10" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/@react-native/gradle-plugin": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/gradle-plugin/-/gradle-plugin-0.86.3.tgz", + "integrity": "sha512-lxmx0GqLEWRIpZfpYFXlYVIs3ENQwaW6Vmp6oi29l2GoQJ1wZfFZRdMimDWlGEk8LKfHar3QH3iaPMkTcK9lEQ==", + "license": "MIT", + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/@react-native/js-polyfills": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/js-polyfills/-/js-polyfills-0.86.3.tgz", + "integrity": "sha512-eYIJ0es967+tePBFQDnl/gidVFxLns3fnbiK6rxscQrGodvuUO6hwxpQnfNynJ8MjbbndImXihXjcnJdc7SzJg==", + "license": "MIT", + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/@react-native/metro-babel-transformer": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.86.3.tgz", + "integrity": "sha512-0nlwVkG0uT9o72nrGTKUz/IqDnCkM4zE0ihe4r+OJcxH93yBdDm58AXJ3EXZeSjv3osHEFXU7ceajdZiS34mTw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/core": "^7.25.2", + "@react-native/babel-preset": "0.86.3", + "hermes-parser": "0.36.0", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + }, + "peerDependencies": { + "@babel/core": "*" + } + }, + "node_modules/@react-native/metro-babel-transformer/node_modules/hermes-estree": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.36.0.tgz", + "integrity": "sha512-A1+8zn5oss2CFP7pKsOaxorQG6FNIz1WU1VDqruLPPZl3LVgeE2C5xfFg8Ow6/Ow4mSslLLtYP1J3n38eKyW9w==", + "license": "MIT", + "peer": true + }, + "node_modules/@react-native/metro-babel-transformer/node_modules/hermes-parser": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.36.0.tgz", + "integrity": "sha512-GdpwMmH5x6IpC1cijvcvYnlPB60Mh6kTSF/NFdYV/j56gYdi+0RIakYs+eqOV+bbO0SW7mgVVGSsTJxyPQfo3w==", + "license": "MIT", + "peer": true, + "dependencies": { + "hermes-estree": "0.36.0" + } + }, + "node_modules/@react-native/metro-config": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/metro-config/-/metro-config-0.86.3.tgz", + "integrity": "sha512-qdzDMepV2xdUhsO4XC7idnnbt8K6+Hd59AjeK9y4KS86fxSQq5oL0TAbqUuajDGR7beNQoYTuS6AowN/zP0oaQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@react-native/js-polyfills": "0.86.3", + "@react-native/metro-babel-transformer": "0.86.3", + "metro-config": "^0.84.3", + "metro-runtime": "^0.84.3" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/@react-native/normalize-colors": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.86.3.tgz", + "integrity": "sha512-Cv3CDkprb67GrzuaS9BGbBJC/6G4lIw3nyKOHRKTqTTum4bn37y5+R0Z04L8mcbQN85eEohNrRwb7IOM4j6uvg==", + "license": "MIT" + }, + "node_modules/@react-native/virtualized-lists": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.86.3.tgz", + "integrity": "sha512-1j44NEyNn05Ut40vHAmoSWbsIcybFkMAOBTwQt1PrESyfSS+qBoyU1LGIogNva0VIa0rQyEC5PzbA7R4/7Nhyw==", + "license": "MIT", + "dependencies": { + "invariant": "^2.2.4", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + }, + "peerDependencies": { + "@types/react": "^19.2.0", + "react": "*", + "react-native": "0.86.3" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.12", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.12.tgz", + "integrity": "sha512-hhyNJ+nbR6ZR7pToHvllEFun9TL0sbL+tk/ON75lo+Xas054uez98qRbsuNt7MBCyZKK4+8Yli/OAGZhmfBZ/g==", + "license": "MIT" + }, + "node_modules/@tanstack/query-core": { + "version": "5.102.8", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.102.8.tgz", + "integrity": "sha512-ZNjkJ33CqvPNec/6lZBnHqLc3EVGPZ9ySLhYahU9TcuRFdmwXewuj0c4hwSWcGHqEUwcSrKeZ+oGcvPBqXcQcg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.102.8", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.102.8.tgz", + "integrity": "sha512-TYBea4OuXWD7MhaSHq069TWbFe7rcwWN6kzT7JF0OKi1K6c1gTv2IzD6A6ExJsCMozdkqBWeuIUZmu4KQg0O5A==", + "license": "MIT", + "dependencies": { + "@tanstack/query-core": "5.102.8" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^18 || ^19" + } + }, + "node_modules/@types/hammerjs": { + "version": "2.0.46", + "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.46.tgz", + "integrity": "sha512-ynRvcq6wvqexJ9brDMS4BnBLzmr0e14d6ZJTEShTBWKymQiHwlAyGu0ZPEFI2Fh1U53F7tN9ufClWM5KvqkKOw==", + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/node": { + "version": "26.4.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.4.1.tgz", + "integrity": "sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==", + "license": "MIT", + "dependencies": { + "undici-types": "~8.3.0" + } + }, + "node_modules/@types/react": { + "version": "19.2.18", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz", + "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==", + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-test-renderer": { + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-19.1.0.tgz", + "integrity": "sha512-XD0WZrHqjNrxA/MaR9O22w/RNidWR9YZmBdRGI7wcnWGrv/3dA8wKCJ8m63Sn+tLJhcjmuhOi629N66W6kgWzQ==", + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "license": "MIT" + }, + "node_modules/@ungap/structured-clone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", + "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", + "license": "ISC" + }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.15", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.15.tgz", + "integrity": "sha512-/5NV/vDALVFDXgLmfsy9TRCBlKwO2LNBFzpzvb9iIj+jR+eSc6DLYYvVOdivT/jm7MtU6TebYuRmzEOI7w40UA==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/agent-cli-detector": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/agent-cli-detector/-/agent-cli-detector-0.1.7.tgz", + "integrity": "sha512-d8OWDVdZMgjhLUT9ZPgSv/BdFFF9pVuscC0JdUSz3bjwE15gcp6u/o0/JooM2yyAWC49KThFhXlgTXRa9B7yng==", + "license": "MIT", + "bin": { + "agent-cli-detector": "dist/cli.js" + }, + "engines": { + "node": ">=18.18" + } + }, + "node_modules/anser": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/anser/-/anser-1.4.10.tgz", + "integrity": "sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww==", + "license": "MIT" + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "license": "MIT" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/aria-hidden": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz", + "integrity": "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.20.0.tgz", + "integrity": "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/axios/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/axios/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.17", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.17.tgz", + "integrity": "sha512-aTyf30K/rqAsNwN76zYrdtx8obu0E4KoUME29B1xj+B3WxgvWkp943vYQ+z8Mv3lw9xHXMHpvSPOBxzAkIa94w==", + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-define-polyfill-provider": "^0.6.8", + "semver": "^6.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.13.0.tgz", + "integrity": "sha512-U+GNwMdSFgzVmfhNm8GJUX88AadB3uo9KpJqS3FaqNIPKgySuvMb+bHPsOmmuWyIcuqZj/pzt1RUIUZns4y2+A==", + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.5", + "core-js-compat": "^3.43.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.8.tgz", + "integrity": "sha512-M762rNHfSF1EV3SLtnCJXFoQbbIIz0OyRwnCmV0KPC7qosSfCO0QLTSuJX3ayAebubhE6oYBAYPrBA5ljowaZg==", + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.8" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-react-compiler": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-react-compiler/-/babel-plugin-react-compiler-1.0.0.tgz", + "integrity": "sha512-Ixm8tFfoKKIPYdCCKYTsqv+Fd4IJ0DQqMyEimo+pxUOMUR9cVPlwTrFt9Avu+3cb6Zp3mAzl+t1MrG2fxxKsxw==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.0" + } + }, + "node_modules/babel-plugin-react-native-web": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/babel-plugin-react-native-web/-/babel-plugin-react-native-web-0.21.2.tgz", + "integrity": "sha512-SPD0J6qjJn8231i0HZhlAGH6NORe+QvRSQM2mwQEzJ2Fb3E4ruWTiiicPlHjmeWShDXLcvoorOCXjeR7k/lyWA==", + "license": "MIT" + }, + "node_modules/babel-plugin-syntax-hermes-parser": { + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.36.1.tgz", + "integrity": "sha512-ycduwJbvdvIMmVvlAZqGggS+pm5Eu4Bk9pcV9Sm2Z4PJNRVsKkv0g7vHj+LeuC1gHTeF67sJXFOq61IlqCa2hA==", + "license": "MIT", + "dependencies": { + "hermes-parser": "0.36.1" + } + }, + "node_modules/babel-plugin-transform-flow-enums": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-enums/-/babel-plugin-transform-flow-enums-0.0.2.tgz", + "integrity": "sha512-g4aaCrDDOsWjbm0PUUeVnkcVd6AKJsVc/MbnPhEotEpkeJQP6b8nzewohQi7+QS8UyPehOhGWn0nOwjvWpmMvQ==", + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-flow": "^7.12.1" + } + }, + "node_modules/babel-preset-expo": { + "version": "57.0.10", + "resolved": "https://registry.npmjs.org/babel-preset-expo/-/babel-preset-expo-57.0.10.tgz", + "integrity": "sha512-08bt6bqMZFoQuWO9gkt0EXotbqKHimELFGa1LlKJvY89iKsi4S0FJSFBFJ4pn9NZvofet48HIjYDQ0SZJ7bNrg==", + "license": "MIT", + "dependencies": { + "@babel/generator": "^7.20.5", + "@babel/helper-module-imports": "^7.25.9", + "@babel/plugin-proposal-decorators": "^7.12.9", + "@babel/plugin-proposal-export-default-from": "^7.24.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-default-from": "^7.24.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-transform-async-generator-functions": "^7.25.4", + "@babel/plugin-transform-async-to-generator": "^7.24.7", + "@babel/plugin-transform-block-scoping": "^7.25.0", + "@babel/plugin-transform-class-properties": "^7.25.4", + "@babel/plugin-transform-class-static-block": "^7.27.1", + "@babel/plugin-transform-classes": "^7.25.4", + "@babel/plugin-transform-destructuring": "^7.24.8", + "@babel/plugin-transform-export-namespace-from": "^7.25.9", + "@babel/plugin-transform-flow-strip-types": "^7.25.2", + "@babel/plugin-transform-for-of": "^7.24.7", + "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.8", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", + "@babel/plugin-transform-object-rest-spread": "^7.24.7", + "@babel/plugin-transform-optional-catch-binding": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.8", + "@babel/plugin-transform-parameters": "^7.24.7", + "@babel/plugin-transform-private-methods": "^7.24.7", + "@babel/plugin-transform-private-property-in-object": "^7.24.7", + "@babel/plugin-transform-react-display-name": "^7.24.7", + "@babel/plugin-transform-react-jsx": "^7.28.6", + "@babel/plugin-transform-react-jsx-development": "^7.27.1", + "@babel/plugin-transform-react-pure-annotations": "^7.27.1", + "@babel/plugin-transform-runtime": "^7.24.7", + "@babel/plugin-transform-typescript": "^7.25.2", + "@babel/plugin-transform-unicode-regex": "^7.24.7", + "@babel/preset-typescript": "^7.23.0", + "@react-native/babel-plugin-codegen": "0.86.3", + "babel-plugin-react-compiler": "^1.0.0", + "babel-plugin-react-native-web": "~0.21.0", + "babel-plugin-syntax-hermes-parser": "^0.36.0", + "babel-plugin-transform-flow-enums": "^0.0.2", + "debug": "^4.3.4" + }, + "peerDependencies": { + "@babel/runtime": "^7.20.0", + "expo": "*", + "expo-widgets": "^57.0.16", + "react-refresh": ">=0.14.0 <1.0.0" + }, + "peerDependenciesMeta": { + "@babel/runtime": { + "optional": true + }, + "expo": { + "optional": true + }, + "expo-widgets": { + "optional": true + } + } + }, + "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==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.21", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.21.tgz", + "integrity": "sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ==", + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "license": "Unlicense", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/bplist-creator": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.1.0.tgz", + "integrity": "sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg==", + "license": "MIT", + "dependencies": { + "stream-buffers": "2.2.x" + } + }, + "node_modules/bplist-parser": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.1.tgz", + "integrity": "sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA==", + "license": "MIT", + "dependencies": { + "big-integer": "1.6.x" + }, + "engines": { + "node": ">= 5.10.0" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.28.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.9.tgz", + "integrity": "sha512-EWazOblFYUvlGZcfGhPUPmYh3nikUxBVb+y9MJun5f3hBi812X+8MSQTujLBtgK3cf51fJWbWfOjyeO954d+Eg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.11.20", + "caniuse-lite": "^1.0.30001810", + "electron-to-chromium": "^1.5.420", + "node-releases": "^2.0.54", + "update-browserslist-db": "^1.3.2" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001810", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz", + "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==", + "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/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chrome-launcher": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.2.tgz", + "integrity": "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==", + "license": "Apache-2.0", + "dependencies": { + "@types/node": "*", + "escape-string-regexp": "^4.0.0", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^1.0.0" + }, + "bin": { + "print-chrome-path": "bin/print-chrome-path.js" + }, + "engines": { + "node": ">=12.13.0" + } + }, + "node_modules/chromium-edge-launcher": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/chromium-edge-launcher/-/chromium-edge-launcher-0.3.0.tgz", + "integrity": "sha512-p03azHlGjtyRvFEee3cyvtsRYdniSkwjkzmM/KmVnqT5d7QkkwpJBhis/zCLMYdQMVJ5tt140TBNqqrZPaWeFA==", + "license": "Apache-2.0", + "dependencies": { + "@types/node": "*", + "escape-string-regexp": "^4.0.0", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^1.0.0", + "mkdirp": "^1.0.4" + } + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "license": "MIT" + }, + "node_modules/cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", + "license": "MIT", + "dependencies": { + "restore-cursor": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/client-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", + "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "license": "MIT", + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz", + "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "compressible": "~2.0.18", + "debug": "2.6.9", + "negotiator": "~0.6.4", + "on-headers": "~1.1.0", + "safe-buffer": "5.2.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/compression/node_modules/negotiator": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/connect/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/connect/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/core-js-compat": { + "version": "3.50.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.50.0.tgz", + "integrity": "sha512-XGpFGbMLHwSt74YLTKho7Ib242qi6O8MSX+sRokV4oz7iKXvQWGYZthjIhjRGMxjzVkAubBO512dKGYcefmX3Q==", + "license": "MIT", + "dependencies": { + "browserslist": "^4.28.7" + }, + "engines": { + "node": ">=6.4.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/cross-fetch": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.2.0.tgz", + "integrity": "sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.7.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-in-js-utils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-3.1.0.tgz", + "integrity": "sha512-fJAcud6B3rRu+KHYk+Bwf+WFL2MDCJJ1XG9x137tJQ0xYxor7XziQtuGFbWNdqrvF4Tk26O3H73nfVqXt/fW1A==", + "license": "MIT", + "dependencies": { + "hyphenate-style-name": "^1.0.3" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "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==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-node-es": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", + "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", + "license": "MIT" + }, + "node_modules/dnssd-advertise": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/dnssd-advertise/-/dnssd-advertise-1.1.6.tgz", + "integrity": "sha512-Ndrrf6BMPalkQPd/zubL+4YghH2J9NspapQ09uDXwYbvOPkP0oaqf5CkcwJ0b50kS2O3ul6yVu+jz+RY62Cejg==", + "license": "MIT" + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.422", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.422.tgz", + "integrity": "sha512-UvA/32XqrLDdZSn7Jllo1AYNcWji/G0d5M0GTViE7KoGBiMunw3a34Sb2KO4ZZyrSEhqsxFoVhWWJshdyfKqJA==", + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/error-stack-parser": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz", + "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", + "license": "MIT", + "dependencies": { + "stackframe": "^1.3.4" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/expo": { + "version": "57.0.20", + "resolved": "https://registry.npmjs.org/expo/-/expo-57.0.20.tgz", + "integrity": "sha512-H57GWLLpNPrltsrjvx6ROsMecoFQza7h9OzujUjBsaY+aDL+bj3GsZaH3T5v5B96R7txuidUwjUh5q5hi3qttg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.0", + "@expo/cli": "^57.0.22", + "@expo/config": "~57.0.9", + "@expo/config-plugins": "~57.0.9", + "@expo/devtools": "~57.0.1", + "@expo/dom-webview": "~57.0.1", + "@expo/fingerprint": "^0.20.12", + "@expo/local-build-cache-provider": "^57.0.8", + "@expo/log-box": "^57.0.4", + "@expo/metro": "~56.0.2", + "@expo/metro-config": "~57.0.12", + "@ungap/structured-clone": "^1.3.0", + "babel-preset-expo": "~57.0.10", + "expo-asset": "~57.0.16", + "expo-constants": "~57.0.17", + "expo-file-system": "~57.0.6", + "expo-font": "~57.0.3", + "expo-keep-awake": "~57.0.1", + "expo-modules-autolinking": "~57.0.12", + "expo-modules-core": "~57.0.16", + "pretty-format": "^29.7.0", + "react-refresh": "^0.14.2", + "whatwg-url-minimum": "^0.1.2" + }, + "bin": { + "expo": "bin/cli", + "expo-modules-autolinking": "bin/autolinking", + "fingerprint": "bin/fingerprint" + }, + "peerDependencies": { + "@expo/dom-webview": "*", + "@expo/metro-runtime": "*", + "react": "*", + "react-dom": "*", + "react-native": "*", + "react-native-web": "*", + "react-native-webview": "*" + }, + "peerDependenciesMeta": { + "@expo/dom-webview": { + "optional": true + }, + "@expo/metro-runtime": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-native-web": { + "optional": true + }, + "react-native-webview": { + "optional": true + } + } + }, + "node_modules/expo-asset": { + "version": "57.0.16", + "resolved": "https://registry.npmjs.org/expo-asset/-/expo-asset-57.0.16.tgz", + "integrity": "sha512-IBRfQdW3iFT+GOBERMZLZM1MUNyrjMgMskuD0elVZ1ae44858UFlTJkHO3f8vi+u5zuv7O7KofsiN8NMG/uWzw==", + "license": "MIT", + "dependencies": { + "@expo/image-utils": "^0.11.5", + "expo-constants": "~57.0.17" + }, + "peerDependencies": { + "expo": "*", + "react": "*", + "react-native": "*" + } + }, + "node_modules/expo-constants": { + "version": "57.0.17", + "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-57.0.17.tgz", + "integrity": "sha512-cPWYBKN1SEbg2lXg2f8VkePJqGZrJPLvVdQDCTfbFu9sQHO1M31Y1zILReUuGnmt/VKeUz40ze579vR00xGu/A==", + "license": "MIT", + "dependencies": { + "@expo/env": "~2.4.3" + }, + "peerDependencies": { + "expo": "*", + "react-native": "*" + } + }, + "node_modules/expo-device": { + "version": "57.0.1", + "resolved": "https://registry.npmjs.org/expo-device/-/expo-device-57.0.1.tgz", + "integrity": "sha512-jyEMDUticH+dhcL3GHa2aiifOvGXJsmb3oVT2R2q4i8bN7Bddy61+NkpMmuS2VAZrvoLQwf0TJJ/1vi1ukvutA==", + "license": "MIT", + "dependencies": { + "ua-parser-js": "^0.7.33" + }, + "peerDependencies": { + "expo": "*" + } + }, + "node_modules/expo-file-system": { + "version": "57.0.6", + "resolved": "https://registry.npmjs.org/expo-file-system/-/expo-file-system-57.0.6.tgz", + "integrity": "sha512-pm8PMYEW6BnVOCBJ7df9FcDmQtE1tqImuYphlfYe1ipQRLYtdCayRczJcbKIsnB3mqEyp4gC2gWmMbsAsAOjVg==", + "license": "MIT", + "peerDependencies": { + "expo": "*", + "react-native": "*" + } + }, + "node_modules/expo-font": { + "version": "57.0.3", + "resolved": "https://registry.npmjs.org/expo-font/-/expo-font-57.0.3.tgz", + "integrity": "sha512-kiVUnc2A8vAvO2FfDJTsQa5BwmY+PAkof/1wRb5MOkcX1jtiaSTwz9gCUAyscMBFLundZDmZrLy1P7LZVC+NvA==", + "license": "MIT", + "dependencies": { + "fontfaceobserver": "^2.1.0" + }, + "peerDependencies": { + "expo": "*", + "react": "*", + "react-native": "*" + } + }, + "node_modules/expo-glass-effect": { + "version": "57.0.1", + "resolved": "https://registry.npmjs.org/expo-glass-effect/-/expo-glass-effect-57.0.1.tgz", + "integrity": "sha512-m/n8maxqNcHk6ZDhuqXBfD5Kt1Iz3M8xykVgdB0iSCIXvF70IqWXmQhX8Psswhrp8eZ+3r0mAD0Jh/2gFA3QaA==", + "license": "MIT", + "peerDependencies": { + "expo": "*", + "react": "*", + "react-native": "*" + } + }, + "node_modules/expo-image": { + "version": "57.0.4", + "resolved": "https://registry.npmjs.org/expo-image/-/expo-image-57.0.4.tgz", + "integrity": "sha512-DLVNjqIMLb71wh0F27kRv7nA9i4g80fvkVugiimVgGnO7Iot+gRSv5VhrFJCvX/OlSzbGQqd/3ktlEaPGFqP7g==", + "license": "MIT", + "dependencies": { + "sf-symbols-typescript": "^2.2.0" + }, + "peerDependencies": { + "expo": "*", + "react": "*", + "react-native": "*", + "react-native-web": "*" + }, + "peerDependenciesMeta": { + "react-native-web": { + "optional": true + } + } + }, + "node_modules/expo-keep-awake": { + "version": "57.0.1", + "resolved": "https://registry.npmjs.org/expo-keep-awake/-/expo-keep-awake-57.0.1.tgz", + "integrity": "sha512-28lkFImeXTS+bhAjuCFV7w7tW5bXg27BJVrxv+nC/nyYa86qEa0oFeHwqol6ha5k4pdVDQgBF09GM4A1k76Ssg==", + "license": "MIT", + "peerDependencies": { + "expo": "*", + "react": "*" + } + }, + "node_modules/expo-linear-gradient": { + "version": "57.0.1", + "resolved": "https://registry.npmjs.org/expo-linear-gradient/-/expo-linear-gradient-57.0.1.tgz", + "integrity": "sha512-CpS8eMqoIWcHVGKV66zbDvzotCw9qYp3f8CuI9N+h1LaO0tMLUzBpkhAKePUsXlpN3yolYlHFSPkfVZ/uSh+iA==", + "license": "MIT", + "peerDependencies": { + "expo": "*", + "react": "*", + "react-native": "*" + } + }, + "node_modules/expo-linking": { + "version": "57.0.9", + "resolved": "https://registry.npmjs.org/expo-linking/-/expo-linking-57.0.9.tgz", + "integrity": "sha512-TQJe3NsnpZXApBg1n6DKaZ4TNhYm+iYWq7W9rTp+G44IBMZSUcI8ba+ffYC/LMY1qw+95AuBPIF1zTx1NQoTXw==", + "license": "MIT", + "dependencies": { + "expo-constants": "~57.0.17", + "invariant": "^2.2.4" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/expo-modules-autolinking": { + "version": "57.0.12", + "resolved": "https://registry.npmjs.org/expo-modules-autolinking/-/expo-modules-autolinking-57.0.12.tgz", + "integrity": "sha512-Q8KAlq37nLKsQ+HsS9NpQVpd5jCgqtu694TDUNHBUBpV9ViD82mRBh8Uug/h68RG9xnLS+kuL4nYaCuFRghHjg==", + "license": "MIT", + "dependencies": { + "@expo/require-utils": "^57.0.5", + "@expo/spawn-async": "^1.8.0", + "chalk": "^4.1.0", + "commander": "^7.2.0" + }, + "bin": { + "expo-modules-autolinking": "bin/expo-modules-autolinking.js" + } + }, + "node_modules/expo-modules-core": { + "version": "57.0.16", + "resolved": "https://registry.npmjs.org/expo-modules-core/-/expo-modules-core-57.0.16.tgz", + "integrity": "sha512-vPbxDOdvG6Ucpws5ucdbQa+nNmdxKONS1fTg92sy0p4TnHX8hBiExtbrtUA/5+1t3FRCUuiy29/1nJEGdt3E4A==", + "license": "MIT", + "dependencies": { + "@expo/expo-modules-macros-plugin": "0.6.1", + "expo-modules-jsi": "~57.0.8", + "invariant": "^2.2.4" + }, + "peerDependencies": { + "react": "*", + "react-native": "*", + "react-native-worklets": "^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0" + }, + "peerDependenciesMeta": { + "react-native-worklets": { + "optional": true + } + } + }, + "node_modules/expo-modules-jsi": { + "version": "57.0.8", + "resolved": "https://registry.npmjs.org/expo-modules-jsi/-/expo-modules-jsi-57.0.8.tgz", + "integrity": "sha512-MFwvKP0FXLkEET27KsKvOh/L7Dpu2d00UgzAlmKozJgtI23WTKSyKPxu+EOSs9peSgkHzKI0vQOhWjOseGBMkQ==", + "license": "MIT", + "peerDependencies": { + "react-native": "*" + } + }, + "node_modules/expo-router": { + "version": "57.0.19", + "resolved": "https://registry.npmjs.org/expo-router/-/expo-router-57.0.19.tgz", + "integrity": "sha512-JovzZ066+qhykyJLC4hSEJpM8ToVWnJqbxmTN7USzARM0HgRR/g05a75f/EIsY4S//hbPGm6wGl/ObcCVtAX+A==", + "license": "MIT", + "dependencies": { + "@expo/log-box": "^57.0.4", + "@expo/metro-runtime": "^57.0.15", + "@expo/schema-utils": "^57.0.2", + "@expo/ui": "^57.0.16", + "@radix-ui/react-slot": "^1.2.0", + "@radix-ui/react-tabs": "^1.1.12", + "@react-native-masked-view/masked-view": "^0.3.2", + "client-only": "^0.0.1", + "color": "^4.2.3", + "debug": "^4.3.4", + "escape-string-regexp": "^4.0.0", + "expo-glass-effect": "^57.0.1", + "expo-server": "^57.0.3", + "expo-symbols": "^57.0.2", + "fast-deep-equal": "^3.1.3", + "invariant": "^2.2.4", + "nanoid": "^3.3.8", + "query-string": "^7.1.3", + "react-fast-compare": "^3.2.2", + "react-is": "^19.1.0", + "react-native-drawer-layout": "^4.2.2", + "react-native-screens": "^4.26.0", + "server-only": "^0.0.1", + "sf-symbols-typescript": "^2.1.0", + "shallowequal": "^1.1.0", + "standard-navigation": "^0.0.5", + "vaul": "^1.1.2" + }, + "peerDependencies": { + "@expo/log-box": "^57.0.4", + "@expo/metro-runtime": "^57.0.15", + "@testing-library/react-native": ">= 13.2.0", + "expo": "*", + "expo-constants": "^57.0.17", + "expo-linking": "^57.0.9", + "react": "*", + "react-dom": "*", + "react-native": "*", + "react-native-gesture-handler": "*", + "react-native-reanimated": "*", + "react-native-safe-area-context": ">= 5.4.0", + "react-native-screens": "^4.26.0", + "react-native-web": "*", + "react-server-dom-webpack": "~19.0.4 || ~19.1.5 || ~19.2.4" + }, + "peerDependenciesMeta": { + "@testing-library/react-native": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-native-gesture-handler": { + "optional": true + }, + "react-native-reanimated": { + "optional": true + }, + "react-native-web": { + "optional": true + }, + "react-server-dom-webpack": { + "optional": true + } + } + }, + "node_modules/expo-secure-store": { + "version": "57.0.3", + "resolved": "https://registry.npmjs.org/expo-secure-store/-/expo-secure-store-57.0.3.tgz", + "integrity": "sha512-w7XkSQeUiYXPoKXo1jSrQqql7pyCSyIzOp2k0apsZZBE+RkoLTQIMjcbqc181y6KgupfNnYxkaKe+4MEg94+SA==", + "license": "MIT", + "peerDependencies": { + "expo": "*" + } + }, + "node_modules/expo-server": { + "version": "57.0.3", + "resolved": "https://registry.npmjs.org/expo-server/-/expo-server-57.0.3.tgz", + "integrity": "sha512-aK+LdKzauHSGmsOStZtyxdzv0zWssCkxTw3m4QuOhfDSJsZaMRTd9O41d8ixU/QfELTbaJ0oRNcF7JFV/7O9YQ==", + "license": "MIT", + "engines": { + "node": ">=20.16.0" + } + }, + "node_modules/expo-splash-screen": { + "version": "57.0.8", + "resolved": "https://registry.npmjs.org/expo-splash-screen/-/expo-splash-screen-57.0.8.tgz", + "integrity": "sha512-BEsrKg4niYBZa5AFzWRyGqxA4ZemtBOPwbCy+C336iGYYPuZYLEgWJGmm2xD1gRfCdrM/TP+l2ONd86Zvk3KyA==", + "license": "MIT", + "dependencies": { + "@expo/config-plugins": "~57.0.9", + "@expo/image-utils": "^0.11.5", + "xml2js": "0.6.0" + }, + "peerDependencies": { + "expo": "*" + } + }, + "node_modules/expo-status-bar": { + "version": "57.0.1", + "resolved": "https://registry.npmjs.org/expo-status-bar/-/expo-status-bar-57.0.1.tgz", + "integrity": "sha512-Xwaq1gAoVRWx5dPG5VhT5RSbnI9OilhZnO5qoPBnUaBAa5VzRzfdS8q0/bsPt0jR2DKLtGuP0bQ6efMJ4RIMDg==", + "license": "MIT", + "peerDependencies": { + "expo": "*", + "react": "*", + "react-native": "*" + } + }, + "node_modules/expo-symbols": { + "version": "57.0.2", + "resolved": "https://registry.npmjs.org/expo-symbols/-/expo-symbols-57.0.2.tgz", + "integrity": "sha512-qZ0iqOflm5lZGwRsQ5Y8sDksw3GAUKwHSX1bJBoocXf7gu14vafIXXYWte+JT9VfXAUGyKodJhLHP/GoOrcNWg==", + "license": "MIT", + "dependencies": { + "@expo-google-fonts/material-symbols": "^0.4.1", + "sf-symbols-typescript": "^2.0.0" + }, + "peerDependencies": { + "expo": "*", + "expo-font": "*", + "react": "*", + "react-native": "*" + } + }, + "node_modules/expo-system-ui": { + "version": "57.0.3", + "resolved": "https://registry.npmjs.org/expo-system-ui/-/expo-system-ui-57.0.3.tgz", + "integrity": "sha512-3N3BoagGojEvQw0h7kL0Lvv2LrVjqEvODSNS+Nc9lj/kzaTaVx4K1HI8qqxeALMf5jui3rLP2b3Ai2pXotoNuA==", + "license": "MIT", + "dependencies": { + "@react-native/normalize-colors": "0.86.3", + "debug": "^4.3.2" + }, + "peerDependencies": { + "expo": "*", + "react-native": "*", + "react-native-web": "*" + }, + "peerDependenciesMeta": { + "react-native-web": { + "optional": true + } + } + }, + "node_modules/expo-web-browser": { + "version": "57.0.2", + "resolved": "https://registry.npmjs.org/expo-web-browser/-/expo-web-browser-57.0.2.tgz", + "integrity": "sha512-3vl5kvd7PB48ub6PpNIJUuPxO8xVa6D8RnIgNba6SXRwqFprOfeEZgwTgtm41kz0AAtvMOztUVNEUkwrHKjqMQ==", + "license": "MIT", + "peerDependencies": { + "expo": "*", + "react-native": "*" + } + }, + "node_modules/expo/node_modules/@expo/cli": { + "version": "57.0.22", + "resolved": "https://registry.npmjs.org/@expo/cli/-/cli-57.0.22.tgz", + "integrity": "sha512-MdToR0ZZ1yjfkqbP1jcA7viS9duMPGq/C+qQ/21dtq+en583Ghp+O11BP/wujHa9ZGRtXimzuKPZDpPresVE0g==", + "license": "MIT", + "dependencies": { + "@expo/code-signing-certificates": "^0.0.6", + "@expo/config": "~57.0.9", + "@expo/config-plugins": "~57.0.9", + "@expo/devcert": "^1.2.1", + "@expo/env": "~2.4.3", + "@expo/image-utils": "^0.11.5", + "@expo/inline-modules": "^0.1.7", + "@expo/json-file": "^11.0.1", + "@expo/log-box": "^57.0.4", + "@expo/metro": "~56.0.2", + "@expo/metro-config": "~57.0.12", + "@expo/metro-file-map": "^57.0.2", + "@expo/osascript": "^2.7.1", + "@expo/package-manager": "^1.13.1", + "@expo/plist": "^0.8.1", + "@expo/prebuild-config": "^57.0.15", + "@expo/require-utils": "^57.0.5", + "@expo/router-server": "^57.0.9", + "@expo/schema-utils": "^57.0.2", + "@expo/spawn-async": "^1.8.0", + "@expo/ws-tunnel": "^2.0.0", + "@expo/xcpretty": "^4.4.4", + "@react-native/dev-middleware": "0.86.3", + "accepts": "^1.3.8", + "agent-cli-detector": "0.1.7", + "arg": "^5.0.2", + "bplist-creator": "0.1.0", + "bplist-parser": "^0.3.1", + "chalk": "^4.0.0", + "ci-info": "^3.3.0", + "compression": "^1.7.4", + "connect": "^3.7.0", + "debug": "^4.3.4", + "dnssd-advertise": "^1.1.4", + "expo-server": "^57.0.3", + "fetch-nodeshim": "^0.4.10", + "getenv": "^2.0.0", + "glob": "^13.0.0", + "lan-network": "^0.2.1", + "multitars": "^1.0.2", + "node-forge": "^1.3.3", + "npm-package-arg": "^11.0.0", + "ora": "^3.4.0", + "picomatch": "^4.0.4", + "pretty-format": "^29.7.0", + "progress": "^2.0.3", + "prompts": "^2.3.2", + "resolve-from": "^5.0.0", + "sandbox-cli-detector": "^0.2.0", + "semver": "^7.6.0", + "send": "^0.19.0", + "slugify": "^1.3.4", + "stacktrace-parser": "^0.1.10", + "structured-headers": "^0.4.1", + "terminal-link": "^2.1.1", + "toqr": "^0.1.1", + "wrap-ansi": "^7.0.0", + "ws": "^8.12.1", + "zod": "^3.25.76" + }, + "bin": { + "expo-internal": "main.js" + }, + "peerDependencies": { + "expo": "*", + "expo-router": "*", + "react-native": "*" + }, + "peerDependenciesMeta": { + "expo-router": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, + "node_modules/expo/node_modules/@expo/cli/node_modules/@expo/router-server": { + "version": "57.0.9", + "resolved": "https://registry.npmjs.org/@expo/router-server/-/router-server-57.0.9.tgz", + "integrity": "sha512-/PxRQozFesIyCJZOAtrQE8XcmcojNiL5ctPMQnbE4ojC2EJPu0zc7c0Y4PuXsoRxrZxm8Usw76/lCVrXcfTZ2w==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "peerDependencies": { + "@expo/metro-runtime": "^57.0.15", + "expo": "*", + "expo-constants": "^57.0.17", + "expo-font": "^57.0.3", + "expo-router": "*", + "expo-server": "^57.0.3", + "react": "*", + "react-dom": "*", + "react-server-dom-webpack": "~19.0.1 || ~19.1.2 || ~19.2.1" + }, + "peerDependenciesMeta": { + "@expo/metro-runtime": { + "optional": true + }, + "expo-router": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-server-dom-webpack": { + "optional": true + } + } + }, + "node_modules/expo/node_modules/@expo/ws-tunnel": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@expo/ws-tunnel/-/ws-tunnel-2.0.0.tgz", + "integrity": "sha512-j+JfTRdCk820J9dU0sA2SqshQIKFOMo7ED84w9MJFcebfbNQgsLztEY/SABDkGnjatrW4xGqnUhVRxSBVyCkXw==", + "license": "MIT", + "peerDependencies": { + "ws": "^8.0.0" + } + }, + "node_modules/expo/node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/expo/node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/expo/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/expo/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/expo/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/expo/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/expo/node_modules/ws": { + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz", + "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/exponential-backoff": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz", + "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==", + "license": "Apache-2.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==", + "license": "MIT" + }, + "node_modules/fb-dotslash": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/fb-dotslash/-/fb-dotslash-0.5.8.tgz", + "integrity": "sha512-XHYLKk9J4BupDxi9bSEhkfss0m+Vr9ChTrjhf9l2iw3jB5C7BnY4GVPoMcqbrTutsKJso6yj2nAB6BI/F2oZaA==", + "license": "(MIT OR Apache-2.0)", + "bin": { + "dotslash": "bin/dotslash" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fbjs": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-3.0.5.tgz", + "integrity": "sha512-ztsSx77JBtkuMrEypfhgc3cI0+0h+svqeie7xHbh1k/IKdcydnvadp/mUaGgjAOXQmQSxsqgaRhS3q9fy+1kxg==", + "license": "MIT", + "dependencies": { + "cross-fetch": "^3.1.5", + "fbjs-css-vars": "^1.0.0", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^1.0.35" + } + }, + "node_modules/fbjs-css-vars": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz", + "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==", + "license": "MIT" + }, + "node_modules/fbjs/node_modules/promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "license": "MIT", + "dependencies": { + "asap": "~2.0.3" + } + }, + "node_modules/fbjs/node_modules/ua-parser-js": { + "version": "1.0.41", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.41.tgz", + "integrity": "sha512-LbBDqdIC5s8iROCUjMbW1f5dJQTEFB1+KO9ogbvlb3nm9n4YHa5p4KTvFPWvh2Hs8gZMBuiB1/8+pdfe/tDPug==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + }, + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + } + ], + "license": "MIT", + "bin": { + "ua-parser-js": "script/cli.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fetch-nodeshim": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/fetch-nodeshim/-/fetch-nodeshim-0.4.10.tgz", + "integrity": "sha512-m6I8ALe4L4XpdETy7MJZWs6L1IVMbjs99bwbpIKphxX+0CTns4IKDWJY0LWfr4YsFjfg+z1TjzTMU8lKl8rG0w==", + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/flow-enums-runtime": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/flow-enums-runtime/-/flow-enums-runtime-0.0.6.tgz", + "integrity": "sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw==", + "license": "MIT" + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/fontfaceobserver": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/fontfaceobserver/-/fontfaceobserver-2.3.0.tgz", + "integrity": "sha512-6FPvD/IVyT4ZlNe7Wcn5Fb/4ChigpucKYSvD6a+0iMoLn2inpo711eyIcKjmDtE5XNcgAkSH9uN/nfAeZzHEfg==", + "license": "BSD-2-Clause" + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/form-data/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/form-data/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-nonce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", + "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/getenv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/getenv/-/getenv-2.0.0.tgz", + "integrity": "sha512-VilgtJj/ALgGY77fiLam5iD336eSWi96Q15JSAG1zi8NRBysm3LXKdGnHb4m5cuyxvOLQQKWpBZAT6ni4FI2iQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hermes-compiler": { + "version": "250829098.0.17", + "resolved": "https://registry.npmjs.org/hermes-compiler/-/hermes-compiler-250829098.0.17.tgz", + "integrity": "sha512-qG1PXzTEtriF6oQLZF3vyHhSMxOdW5h2TqqLri0rdpstPustd2fSvRZQMVAPdlhgFwBfYnj3OUZtiO6LjYsEFw==", + "license": "MIT" + }, + "node_modules/hermes-estree": { + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.36.1.tgz", + "integrity": "sha512-guv1nQ6IJ7S83NRFPWc3SA7IBZrdNC9kapwOq6uXvF4wP+sDCgjzQbKPCoyYmoyZRzztF/n/c36l/rccCZSiCw==", + "license": "MIT" + }, + "node_modules/hermes-parser": { + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.36.1.tgz", + "integrity": "sha512-GApNk4zLHi2UWoWZZkx7LNCOSzLSc5lB55pZ/PhK7ycFeg7u5LcF88p/WbpIi1XUDtE0MpHE3uRR3u3KB7TjSQ==", + "license": "MIT", + "dependencies": { + "hermes-estree": "0.36.1" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, + "node_modules/hosted-git-info": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", + "license": "ISC", + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/hyphenate-style-name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz", + "integrity": "sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw==", + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/inline-style-prefixer": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-7.0.1.tgz", + "integrity": "sha512-lhYo5qNTQp3EvSSp3sRvXMbVQTLrvGV6DycRMJ5dm2BLMiJ30wpXKdDdgX+GmJZ5uQMucwRKHamXSst3Sj/Giw==", + "license": "MIT", + "dependencies": { + "css-in-js-utils": "^3.1.0" + } + }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.4.tgz", + "integrity": "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==", + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util/node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-util/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jimp-compact": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/jimp-compact/-/jimp-compact-0.16.1.tgz", + "integrity": "sha512-dZ6Ra7u1G8c4Letq/B5EzAxj4tLFHL+cGtdpR+PVm4yzPDj+lCk+AbivWt1eOM+ikzkowtyV7qSqX6qr3t71Ww==", + "license": "MIT" + }, + "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==", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsc-safe-url": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/jsc-safe-url/-/jsc-safe-url-0.2.4.tgz", + "integrity": "sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q==", + "license": "0BSD" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lan-network": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/lan-network/-/lan-network-0.2.1.tgz", + "integrity": "sha512-ONPnazC96VKDntab9j9JKwIWhZ4ZUceB4A9Epu4Ssg0hYFmtHZSeQ+n15nIwTFmcBUKtExOer8WTJ4GF9MO64A==", + "license": "MIT", + "bin": { + "lan-network": "dist/lan-network-cli.js" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lighthouse-logger": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", + "integrity": "sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==", + "license": "Apache-2.0", + "dependencies": { + "debug": "^2.6.9", + "marky": "^1.2.2" + } + }, + "node_modules/lighthouse-logger/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/lighthouse-logger/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "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.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "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.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "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.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "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.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "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.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "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.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], + "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.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], + "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.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], + "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.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], + "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.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "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.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "license": "MIT" + }, + "node_modules/lodash.throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==", + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "license": "MIT", + "dependencies": { + "chalk": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" + }, + "node_modules/log-symbols/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "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==", + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/marky": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/marky/-/marky-1.3.0.tgz", + "integrity": "sha512-ocnPZQLNpvbedwTy9kNrQEsknEfgvcLMvOtz3sFeWApDq1MXH1TqkCIx58xlpESsfwQOnuBO9beyQuNGzVvuhQ==", + "license": "Apache-2.0" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/memoize-one": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", + "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==", + "license": "MIT" + }, + "node_modules/merge-options": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", + "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==", + "license": "MIT", + "dependencies": { + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "license": "MIT" + }, + "node_modules/metro": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro/-/metro-0.84.5.tgz", + "integrity": "sha512-r1liLkyFZMVSEMNjU1CJU5pRzs3NdkxHqXS60O25c0rCIqAR+cGk7rPydw/g0WAIKVXojIBIF45yYBPagJGcgw==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/core": "^7.25.2", + "@babel/generator": "^7.29.1", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "accepts": "^2.0.0", + "ci-info": "^2.0.0", + "connect": "^3.6.5", + "debug": "^4.4.0", + "error-stack-parser": "^2.0.6", + "flow-enums-runtime": "^0.0.6", + "graceful-fs": "^4.2.4", + "hermes-parser": "0.35.0", + "invariant": "^2.2.4", + "jest-worker": "^29.7.0", + "jsc-safe-url": "^0.2.2", + "lodash.throttle": "^4.1.1", + "metro-babel-transformer": "0.84.5", + "metro-cache": "0.84.5", + "metro-cache-key": "0.84.5", + "metro-config": "0.84.5", + "metro-core": "0.84.5", + "metro-file-map": "0.84.5", + "metro-resolver": "0.84.5", + "metro-runtime": "0.84.5", + "metro-source-map": "0.84.5", + "metro-symbolicate": "0.84.5", + "metro-transform-plugins": "0.84.5", + "metro-transform-worker": "0.84.5", + "mime-types": "^3.0.1", + "nullthrows": "^1.1.1", + "serialize-error": "^2.1.0", + "source-map": "^0.5.6", + "throat": "^5.0.0", + "ws": "^7.5.10", + "yargs": "^17.6.2" + }, + "bin": { + "metro": "src/cli.js" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-babel-transformer": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.84.5.tgz", + "integrity": "sha512-2WbHILKMiJUzfdjmGOQOqU1bWi9//gqiclc/tkk/AIsrrVw3efhZ1uhkOwMTxUEPOzqoo091H0olLmVZH5FHGQ==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.2", + "flow-enums-runtime": "^0.0.6", + "hermes-parser": "0.35.0", + "metro-cache-key": "0.84.5", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-babel-transformer/node_modules/hermes-estree": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.35.0.tgz", + "integrity": "sha512-xVx5Opwy8Oo1I5yGpVRhCvWL/iV3M+ylksSKVNlxxD90cpDpR/AR1jLYqK8HWihm065a6UI3HeyAmYzwS8NOOg==", + "license": "MIT" + }, + "node_modules/metro-babel-transformer/node_modules/hermes-parser": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.35.0.tgz", + "integrity": "sha512-9JLjeHxBx8T4CAsydZR49PNZUaix+WpQJwu9p2010lu+7Kwl6D/7wYFFJxoz+aXkaaClp9Zfg6W6/zVlSJORaA==", + "license": "MIT", + "dependencies": { + "hermes-estree": "0.35.0" + } + }, + "node_modules/metro-cache": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-cache/-/metro-cache-0.84.5.tgz", + "integrity": "sha512-WHS0n2OxQqtwEjSeQFPePNrMvEFhmQcUQM9cRJMHByWoi/GMWFBEWOf7hVkAM/0KRutAXNbDlSu/cZB6CyxgQQ==", + "license": "MIT", + "dependencies": { + "exponential-backoff": "^3.1.1", + "flow-enums-runtime": "^0.0.6", + "https-proxy-agent": "^7.0.5", + "metro-core": "0.84.5" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-cache-key": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-cache-key/-/metro-cache-key-0.84.5.tgz", + "integrity": "sha512-3dPB2TnvGjjf0/9O7AXVQURKXuQNauTZE7WpTGTlR017Gh/B5y0m/2wcqxfveUguHSpu89KhVxCAlr2k/H7uhQ==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.84.6.tgz", + "integrity": "sha512-cD2mLEofcuV26kxSV4hfV1Pbuh6igdUhYQriO8ZVeJ7HyZfq4/wqHV0gSR7fEO8NUp9odr60/Kzm5YakmghWwQ==", + "license": "MIT", + "dependencies": { + "connect": "^3.6.5", + "flow-enums-runtime": "^0.0.6", + "jest-validate": "^29.7.0", + "metro": "0.84.6", + "metro-cache": "0.84.6", + "metro-core": "0.84.6", + "metro-runtime": "0.84.6", + "yaml": "^2.6.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/hermes-estree": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.35.0.tgz", + "integrity": "sha512-xVx5Opwy8Oo1I5yGpVRhCvWL/iV3M+ylksSKVNlxxD90cpDpR/AR1jLYqK8HWihm065a6UI3HeyAmYzwS8NOOg==", + "license": "MIT" + }, + "node_modules/metro-config/node_modules/hermes-parser": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.35.0.tgz", + "integrity": "sha512-9JLjeHxBx8T4CAsydZR49PNZUaix+WpQJwu9p2010lu+7Kwl6D/7wYFFJxoz+aXkaaClp9Zfg6W6/zVlSJORaA==", + "license": "MIT", + "dependencies": { + "hermes-estree": "0.35.0" + } + }, + "node_modules/metro-config/node_modules/metro": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro/-/metro-0.84.6.tgz", + "integrity": "sha512-ty/tx/imE5Ph2gvPU788Ckim6RAC2tyZxLz2hWRgC9U7/fGKV7qY/slADy0qHPEw9cpUgc4BfmV3oUsYwm7oeg==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/core": "^7.25.2", + "@babel/generator": "^7.29.1", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "accepts": "^2.0.0", + "ci-info": "^2.0.0", + "connect": "^3.6.5", + "debug": "^4.4.0", + "error-stack-parser": "^2.0.6", + "flow-enums-runtime": "^0.0.6", + "graceful-fs": "^4.2.4", + "hermes-parser": "0.35.0", + "invariant": "^2.2.4", + "jest-worker": "^29.7.0", + "jsc-safe-url": "^0.2.2", + "lodash.throttle": "^4.1.1", + "metro-babel-transformer": "0.84.6", + "metro-cache": "0.84.6", + "metro-cache-key": "0.84.6", + "metro-config": "0.84.6", + "metro-core": "0.84.6", + "metro-file-map": "0.84.6", + "metro-resolver": "0.84.6", + "metro-runtime": "0.84.6", + "metro-source-map": "0.84.6", + "metro-symbolicate": "0.84.6", + "metro-transform-plugins": "0.84.6", + "metro-transform-worker": "0.84.6", + "mime-types": "^3.0.1", + "nullthrows": "^1.1.1", + "serialize-error": "^2.1.0", + "source-map": "^0.5.6", + "throat": "^5.0.0", + "ws": "^7.5.10", + "yargs": "^17.6.2" + }, + "bin": { + "metro": "src/cli.js" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-babel-transformer": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.84.6.tgz", + "integrity": "sha512-B1ozl6KxFHbQjXZ2U8WiTPWXylqiD3V4EXyV5r0fqETOrqIrJlBvbVTD82UxIN+B3Vpe4l8G1tb15ocd2RyOQA==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.2", + "flow-enums-runtime": "^0.0.6", + "hermes-parser": "0.35.0", + "metro-cache-key": "0.84.6", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-cache": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-cache/-/metro-cache-0.84.6.tgz", + "integrity": "sha512-KBJVpb02oKNO+jlWQ1Aax7cd11YP0MClDaMgx6C4MhyZ9g95J/dC1Bo6sCzXaU9L9h/w5cQfT5zDkGW5sOj99A==", + "license": "MIT", + "dependencies": { + "exponential-backoff": "^3.1.1", + "flow-enums-runtime": "^0.0.6", + "https-proxy-agent": "^7.0.5", + "metro-core": "0.84.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-cache-key": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-cache-key/-/metro-cache-key-0.84.6.tgz", + "integrity": "sha512-6tyXt1BZ/3U183XV48oif7Nm65TE+pTo0Vs31u4FxMgqiYQR/SiSr3RoXn3pmy4pd280ZmLmct0x3jZpu0pV4A==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-core": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-core/-/metro-core-0.84.6.tgz", + "integrity": "sha512-ZqYskM8+f3PFMosBDJd8DLqRvT1ltRGhWL/ZfTpBvf4SoadO30VVrdhAoHFVGz3G1CJpWa3fgZH7nnnX/ybllA==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6", + "lodash.throttle": "^4.1.1", + "metro-resolver": "0.84.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-file-map": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-file-map/-/metro-file-map-0.84.6.tgz", + "integrity": "sha512-ov9VywWBsHPt54Zc7/DxWvqjTwxuZvhfeyHg8ZAMGKtf2PcH1wS3EnoBH7In53Rspk/eXVWAO5+avxunPn081w==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "fb-watchman": "^2.0.0", + "flow-enums-runtime": "^0.0.6", + "graceful-fs": "^4.2.4", + "invariant": "^2.2.4", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "nullthrows": "^1.1.1", + "walker": "^1.0.7" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-minify-terser": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-minify-terser/-/metro-minify-terser-0.84.6.tgz", + "integrity": "sha512-SqhB/Kxrw0XfyW0k8mEscqX/CQopm6Fp3EpdSIPzvKfGgQp9bTMahg9PAdVsXUmIWwErbmFw1VqB+VFBOKksUw==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6", + "terser": "^5.15.0" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-resolver": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-resolver/-/metro-resolver-0.84.6.tgz", + "integrity": "sha512-PplpGc/OCLxgKeLNsLQO/VHsYDIvkcGGr3zNT7UanHCGRqhxKv245o+naV8cRI4/pcLqyc+9j+J0AJbT3Kp5Sg==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-source-map": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.84.6.tgz", + "integrity": "sha512-4p/EplRbgNxhdqA6kAj1AmIq9qqYXYSAjgxuZ73rYA+p037xDDrxK8CyDKNfbn1k6aMuVt8LV0fpt7NHUTKiZw==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "flow-enums-runtime": "^0.0.6", + "invariant": "^2.2.4", + "metro-symbolicate": "0.84.6", + "nullthrows": "^1.1.1", + "ob1": "0.84.6", + "source-map": "^0.5.6", + "vlq": "^1.0.0" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-symbolicate": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.84.6.tgz", + "integrity": "sha512-wJFyyF5ysbVyoYVWGL6GwVMiNnGllwDU2gF096376fl0fc8IFUlADSyNlswj31K9og2sOilXe/FdyWFPczPUYg==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6", + "invariant": "^2.2.4", + "metro-source-map": "0.84.6", + "nullthrows": "^1.1.1", + "source-map": "^0.5.6", + "vlq": "^1.0.0" + }, + "bin": { + "metro-symbolicate": "src/index.js" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-transform-plugins": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-transform-plugins/-/metro-transform-plugins-0.84.6.tgz", + "integrity": "sha512-pROPMFaj25Y9+3LlLqpBRz/7B/2YPnfEQz/z3juYxkh3FGQ+3c/Qh4E+khPSTdwTw0M6LitLYHMqaHMbQmuBJw==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.2", + "@babel/generator": "^7.29.1", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "flow-enums-runtime": "^0.0.6", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/metro-transform-worker": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-transform-worker/-/metro-transform-worker-0.84.6.tgz", + "integrity": "sha512-xLTVrOENaHR9DiuhnHS+zcle0rKsCy2CpXSIx7xD+zhJs+qVRNUyV7Z1zIt/0P/d0cSGVx846R+dIjHEudhcww==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.2", + "@babel/generator": "^7.29.1", + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "flow-enums-runtime": "^0.0.6", + "metro": "0.84.6", + "metro-babel-transformer": "0.84.6", + "metro-cache": "0.84.6", + "metro-cache-key": "0.84.6", + "metro-minify-terser": "0.84.6", + "metro-source-map": "0.84.6", + "metro-transform-plugins": "0.84.6", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-config/node_modules/ob1": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.84.6.tgz", + "integrity": "sha512-+s+6zjd0X68hfAcn92NsEPXnSYOF3O7exw/Fj4UfRTB+UL+Tdjdkzu5/4WquXlzqgvNm8FWuuW6/0Yd8S2rYxw==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-core": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-core/-/metro-core-0.84.5.tgz", + "integrity": "sha512-xwm605hCi5Y6eJTTb8ZWo6pkUcoBEIyiQOfkZh5GwtDwUrP9SNhTQZhzJHrBCwwxlf3Ptl/pxWJgQ1rsNYMnrA==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6", + "lodash.throttle": "^4.1.1", + "metro-resolver": "0.84.5" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-file-map": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-file-map/-/metro-file-map-0.84.5.tgz", + "integrity": "sha512-mlm/JL8toSbSc2akpKIGmzvrVRSCgZ5vkbycI34oMLoOnLGuLyC8WTyVJ6P0hZG/usDaGwZSl/s9BCRriqjGJA==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "fb-watchman": "^2.0.0", + "flow-enums-runtime": "^0.0.6", + "graceful-fs": "^4.2.4", + "invariant": "^2.2.4", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "nullthrows": "^1.1.1", + "walker": "^1.0.7" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-minify-terser": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-minify-terser/-/metro-minify-terser-0.84.5.tgz", + "integrity": "sha512-BJoFwCEDsYnagPqarayInv2+diCDNDdLlaof/p6s9w4gh+gc9HXYM+pDvsKGKKUumpZswNF3Z/ftTMqKl/5IBg==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6", + "terser": "^5.15.0" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-resolver": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-resolver/-/metro-resolver-0.84.5.tgz", + "integrity": "sha512-VSSnepg1k6LyCwtb6eirWdAWlpKwBG8Rdtsr1mU38rMelFyWgh3/QuMSiZIZAIjwg/fsa8GhW5/FO54CAUPCEA==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-runtime": { + "version": "0.84.6", + "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.84.6.tgz", + "integrity": "sha512-47EYO/DOai0PA3GoAyDpyXOgHNMwbl/Z9dQlQineDLHkpD42xOwMrIx1crT0+n6F+aGoEyxZmeFwfMzaIqVqKQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.0", + "flow-enums-runtime": "^0.0.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-source-map": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.84.5.tgz", + "integrity": "sha512-2BtV5L9uPc49F13Gn5wiP6bX/EncqzqTIk2VL/0F/96Vo0YEOjluT/qktQjFODfqGFsucwnh5mPEAl/2jVEfeg==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "flow-enums-runtime": "^0.0.6", + "invariant": "^2.2.4", + "metro-symbolicate": "0.84.5", + "nullthrows": "^1.1.1", + "ob1": "0.84.5", + "source-map": "^0.5.6", + "vlq": "^1.0.0" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-symbolicate": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.84.5.tgz", + "integrity": "sha512-rQ40zYDAkaWBN9yvjUuAD0ZpzBMZSoKyGYXnb5JrfbKjun7fTvfoLHL3KXFYenBTYZkQtlp4cKSCv/1utxFyOw==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6", + "invariant": "^2.2.4", + "metro-source-map": "0.84.5", + "nullthrows": "^1.1.1", + "source-map": "^0.5.6", + "vlq": "^1.0.0" + }, + "bin": { + "metro-symbolicate": "src/index.js" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-transform-plugins": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-transform-plugins/-/metro-transform-plugins-0.84.5.tgz", + "integrity": "sha512-+InaSVGaOyt0DyRo4Y/zIdPI6CZwnbNho5LAL23tgmuGwv7fyfkF7kKfPjZcfxXBcoYdTLLFnCfCH/dHSiCqNg==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.2", + "@babel/generator": "^7.29.1", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "flow-enums-runtime": "^0.0.6", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro-transform-worker": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-transform-worker/-/metro-transform-worker-0.84.5.tgz", + "integrity": "sha512-ui1Z8x4s5RL36gMmKLaMMO7O9NNDHNdthEZSCDQHAau3JcAsTaFOK6I+2q4I/kW5u8hSEjJk9L45TXSVJw6g1A==", + "license": "MIT", + "dependencies": { + "@babel/core": "^7.25.2", + "@babel/generator": "^7.29.1", + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "flow-enums-runtime": "^0.0.6", + "metro": "0.84.5", + "metro-babel-transformer": "0.84.5", + "metro-cache": "0.84.5", + "metro-cache-key": "0.84.5", + "metro-minify-terser": "0.84.5", + "metro-source-map": "0.84.5", + "metro-transform-plugins": "0.84.5", + "nullthrows": "^1.1.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro/node_modules/hermes-estree": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.35.0.tgz", + "integrity": "sha512-xVx5Opwy8Oo1I5yGpVRhCvWL/iV3M+ylksSKVNlxxD90cpDpR/AR1jLYqK8HWihm065a6UI3HeyAmYzwS8NOOg==", + "license": "MIT" + }, + "node_modules/metro/node_modules/hermes-parser": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.35.0.tgz", + "integrity": "sha512-9JLjeHxBx8T4CAsydZR49PNZUaix+WpQJwu9p2010lu+7Kwl6D/7wYFFJxoz+aXkaaClp9Zfg6W6/zVlSJORaA==", + "license": "MIT", + "dependencies": { + "hermes-estree": "0.35.0" + } + }, + "node_modules/metro/node_modules/metro-config": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.84.5.tgz", + "integrity": "sha512-zie+uN6oohscowi2S7ByU+wUw6CrT4ZxW9uAbONOObSxx86RGmnIAmjXHLkfmcdYoY7jzOPEbqcI6oeVmqyBQA==", + "license": "MIT", + "dependencies": { + "connect": "^3.6.5", + "flow-enums-runtime": "^0.0.6", + "jest-validate": "^29.7.0", + "metro": "0.84.5", + "metro-cache": "0.84.5", + "metro-core": "0.84.5", + "metro-runtime": "0.84.5", + "yaml": "^2.6.1" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/metro/node_modules/metro-runtime": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.84.5.tgz", + "integrity": "sha512-U1m2+d1Pr+JO2/iVXBB2OfXXityz7tqwIorxfrT15IEgaHvpJBq/OHiqnOWPKJbUl3JcxjcdviZZOKk85oK4Qg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.0", + "flow-enums-runtime": "^0.0.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/multitars": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/multitars/-/multitars-1.0.2.tgz", + "integrity": "sha512-6GwVw5eLi9sThdtlS4PKwC7yRLaf45pYhIEzKBHdKxi+YOXGKFX8acIniH+Uh/+k9mS2lQOupTccjoe5r0/1IQ==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", + "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/negotiator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.1.0.tgz", + "integrity": "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==", + "license": "MIT", + "dependencies": { + "content-type": "^2.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-forge": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz", + "integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==", + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.54", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.54.tgz", + "integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/npm-package-arg": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.3.tgz", + "integrity": "sha512-sHGJy8sOC1YraBywpzQlIKBE4pBbGbiF95U6Auspzyem956E0+FtDtsx1ZxlOJkQCZ1AFXAY/yuvtFYrOxF+Bw==", + "license": "ISC", + "dependencies": { + "hosted-git-info": "^7.0.0", + "proc-log": "^4.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm-package-arg/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/nullthrows": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz", + "integrity": "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==", + "license": "MIT" + }, + "node_modules/ob1": { + "version": "0.84.5", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.84.5.tgz", + "integrity": "sha512-aH9RkoZc7w/90HBamFxTw8ZLFr05wXS+iOnvmrgo53Ep8Pyrm5FieQSaPIVROkfFVQISeD/zo92fes26TOwe+A==", + "license": "MIT", + "dependencies": { + "flow-enums-runtime": "^0.0.6" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", + "license": "MIT", + "dependencies": { + "mimic-fn": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", + "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", + "license": "MIT", + "dependencies": { + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-spinners": "^2.0.0", + "log-symbols": "^2.2.0", + "strip-ansi": "^5.2.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ora/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ora/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/ora/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" + }, + "node_modules/ora/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/ora/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ora/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/parse-png": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/parse-png/-/parse-png-2.1.0.tgz", + "integrity": "sha512-Nt/a5SfCLiTnQAjx3fHlqp8hRgTL3z7kTQZzvIMS9uCAepnCyjpdEc6M/sz69WqMBdaDBw9sF1F1UaHROYzGkQ==", + "license": "MIT", + "dependencies": { + "pngjs": "^3.3.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.5.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", + "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/plist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.1.tgz", + "integrity": "sha512-ZIfcLJC+7E7FBFnDxm9MPmt7D+DidyQ26lewieO75AdhA2ayMtsJSES0iWzqJQbcVRSrTufQoy0DR94xHue0oA==", + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.9.10", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + }, + "engines": { + "node": ">=10.4.0" + } + }, + "node_modules/plist/node_modules/@xmldom/xmldom": { + "version": "0.9.12", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.12.tgz", + "integrity": "sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A==", + "license": "MIT", + "engines": { + "node": ">=14.6" + } + }, + "node_modules/pngjs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", + "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/postcss": { + "version": "8.5.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", + "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.18", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "license": "MIT" + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/pretty-format/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" + }, + "node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "license": "MIT", + "dependencies": { + "asap": "~2.0.6" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/query-string": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", + "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", + "license": "MIT", + "dependencies": { + "decode-uri-component": "^0.2.2", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/react": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", + "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-devtools-core": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-6.1.5.tgz", + "integrity": "sha512-ePrwPfxAnB+7hgnEr8vpKxL9cmnp7F322t8oqcPshbIQQhDKgFDW4tjhF2wjVbdXF9O/nyuy3sQWd9JGpiLPvA==", + "license": "MIT", + "dependencies": { + "shell-quote": "^1.6.1", + "ws": "^7" + } + }, + "node_modules/react-dom": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.3" + } + }, + "node_modules/react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==", + "license": "MIT" + }, + "node_modules/react-freeze": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/react-freeze/-/react-freeze-1.0.4.tgz", + "integrity": "sha512-r4F0Sec0BLxWicc7HEyo2x3/2icUTrRmDjaaRyzzn+7aDyFZliszMDOgLVwSnQnYENOlL1o569Ze2HZefk8clA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=17.0.0" + } + }, + "node_modules/react-is": { + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.8.tgz", + "integrity": "sha512-s5un28nYxKJw5gvUHyW5PCC28CvBqLu9r3cWgzHT4Vo/5fqqkFcdRYsGcKf50WMPpjjFZS5d76fn3YCo2njKwQ==", + "license": "MIT" + }, + "node_modules/react-native": { + "version": "0.86.3", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.86.3.tgz", + "integrity": "sha512-JR5s3bM9ezud+Mw24GlNXNfthqPIKwrQgPPJcam+L97t2sKjjEavhCzBn+fyqZZRcM5+XlhYxpTxVkK7e1n38Q==", + "license": "MIT", + "dependencies": { + "@react-native/assets-registry": "0.86.3", + "@react-native/codegen": "0.86.3", + "@react-native/community-cli-plugin": "0.86.3", + "@react-native/gradle-plugin": "0.86.3", + "@react-native/js-polyfills": "0.86.3", + "@react-native/normalize-colors": "0.86.3", + "@react-native/virtualized-lists": "0.86.3", + "abort-controller": "^3.0.0", + "anser": "^1.4.9", + "ansi-regex": "^5.0.0", + "babel-plugin-syntax-hermes-parser": "0.36.0", + "base64-js": "^1.5.1", + "commander": "^12.0.0", + "flow-enums-runtime": "^0.0.6", + "hermes-compiler": "250829098.0.17", + "invariant": "^2.2.4", + "memoize-one": "^5.0.0", + "metro-runtime": "^0.84.3", + "metro-source-map": "^0.84.3", + "nullthrows": "^1.1.1", + "pretty-format": "^29.7.0", + "promise": "^8.3.0", + "react-devtools-core": "^6.1.5", + "react-refresh": "^0.14.0", + "regenerator-runtime": "^0.13.2", + "scheduler": "0.27.0", + "semver": "^7.1.3", + "stacktrace-parser": "^0.1.10", + "tinyglobby": "^0.2.15", + "whatwg-fetch": "^3.0.0", + "ws": "^7.5.10", + "yargs": "^17.6.2" + }, + "bin": { + "react-native": "cli.js" + }, + "engines": { + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + }, + "peerDependencies": { + "@react-native/jest-preset": "0.86.3", + "@types/react": "^19.1.1", + "react": "^19.2.3" + }, + "peerDependenciesMeta": { + "@react-native/jest-preset": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-native-drawer-layout": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/react-native-drawer-layout/-/react-native-drawer-layout-4.2.10.tgz", + "integrity": "sha512-O6TQdZ5LSm3dqnuR4rX9KPtE+9dVg7jsezEYz1l01rkQTe4fQvYZIoPu2sZFl5X2N70uhRdjnPULySVR3sBUwA==", + "license": "MIT", + "dependencies": { + "color": "^4.2.3", + "use-latest-callback": "^0.2.4" + }, + "peerDependencies": { + "react": ">= 18.2.0", + "react-native": "*", + "react-native-gesture-handler": ">= 2.0.0", + "react-native-reanimated": ">= 2.0.0" + } + }, + "node_modules/react-native-gesture-handler": { + "version": "2.32.0", + "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.32.0.tgz", + "integrity": "sha512-uYIMOKlKENORq2SABE+jIjbPU+h5I/sQKcq2v16zRq848nwEp1fWRVwML4QWqijc8UcXJC25o54S8GQd4Mf2OA==", + "license": "MIT", + "dependencies": { + "@egjs/hammerjs": "^2.0.17", + "@types/react-test-renderer": "^19.1.0", + "hoist-non-react-statics": "^3.3.0", + "invariant": "^2.2.4" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/react-native-is-edge-to-edge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.3.1.tgz", + "integrity": "sha512-NIXU/iT5+ORyCc7p0z2nnlkouYKX425vuU1OEm6bMMtWWR9yvb+Xg5AZmImTKoF9abxCPqrKC3rOZsKzUYgYZA==", + "license": "MIT", + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/react-native-reanimated": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-4.5.1.tgz", + "integrity": "sha512-RnMvtDuR+68ig864gAvZCOdZehqhC5rFmMo0kn+ARfgVSTvFeF6IFLBVgMPUu0KwihaapEyW24WRi6nEyy1kSA==", + "license": "MIT", + "dependencies": { + "react-native-is-edge-to-edge": "^1.3.1", + "semver": "^7.7.3" + }, + "peerDependencies": { + "react": "*", + "react-native": "0.83 - 0.86", + "react-native-worklets": "0.10.x" + } + }, + "node_modules/react-native-reanimated/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/react-native-safe-area-context": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-5.7.0.tgz", + "integrity": "sha512-/9/MtQz8ODphjsLdZ+GZAIcC/RtoqW9EeShf7Uvnfgm/pzYrJ75y3PV/J1wuAV1T5Dye5ygq4EAW20RoBq0ABQ==", + "license": "MIT", + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/react-native-screens": { + "version": "4.26.2", + "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-4.26.2.tgz", + "integrity": "sha512-2XnWsZToKj76trGtEZzx5ELD/qOICFEprEeUntImmitQFVUkea27fiWdUSITArI356Y1qynpXZINW+Unbhky/A==", + "license": "MIT", + "dependencies": { + "react-freeze": "^1.0.0", + "warn-once": "^0.1.0" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/react-native-size-matters": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/react-native-size-matters/-/react-native-size-matters-0.4.2.tgz", + "integrity": "sha512-DKE3f/sdcozd24oASgkP1iGg+YU3HoajRa5k3a4wkRzpiqREq8SGX12Y5zBgAt/8IivLQoTMYkyQu1/Giuy+zQ==", + "license": "MIT", + "peerDependencies": { + "react-native": "*" + } + }, + "node_modules/react-native-toast-message": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/react-native-toast-message/-/react-native-toast-message-2.5.0.tgz", + "integrity": "sha512-gQzICyDZ29Vn2r9ntJG4khW5fxolDNLWcItFJJZgm3cw4o62gUabWprmslVE3RUAkKjto2KZvIMheMbuyozjLQ==", + "license": "MIT", + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/react-native-web": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.21.2.tgz", + "integrity": "sha512-SO2t9/17zM4iEnFvlu2DA9jqNbzNhoUP+AItkoCOyFmDMOhUnBBznBDCYN92fGdfAkfQlWzPoez6+zLxFNsZEg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.6", + "@react-native/normalize-colors": "^0.74.1", + "fbjs": "^3.0.4", + "inline-style-prefixer": "^7.0.1", + "memoize-one": "^6.0.0", + "nullthrows": "^1.1.1", + "postcss-value-parser": "^4.2.0", + "styleq": "^0.1.3" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } + }, + "node_modules/react-native-web/node_modules/@react-native/normalize-colors": { + "version": "0.74.89", + "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.74.89.tgz", + "integrity": "sha512-qoMMXddVKVhZ8PA1AbUCk83trpd6N+1nF2A6k1i6LsQObyS92fELuk8kU/lQs6M7BsMHwqyLCpQJ1uFgNvIQXg==", + "license": "MIT" + }, + "node_modules/react-native-web/node_modules/memoize-one": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", + "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==", + "license": "MIT" + }, + "node_modules/react-native-worklets": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/react-native-worklets/-/react-native-worklets-0.10.1.tgz", + "integrity": "sha512-62mRM19bDpfpdI8HLkEErcdOsrAPDtE9lA/sw+5lLRpzBHNhxaoj9QyY2KjXqUmirelxkX4zuPGTC3VdA0feJA==", + "license": "MIT", + "dependencies": { + "@babel/plugin-transform-arrow-functions": "^7.27.1", + "@babel/plugin-transform-class-properties": "^7.28.6", + "@babel/plugin-transform-classes": "^7.28.6", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.28.6", + "@babel/plugin-transform-optional-chaining": "^7.28.6", + "@babel/plugin-transform-shorthand-properties": "^7.27.1", + "@babel/plugin-transform-template-literals": "^7.27.1", + "@babel/plugin-transform-unicode-regex": "^7.27.1", + "@babel/preset-typescript": "^7.28.5", + "@babel/types": "^7.27.1", + "convert-source-map": "^2.0.0", + "semver": "^7.7.4" + }, + "peerDependencies": { + "@babel/core": "*", + "@react-native/metro-config": "*", + "react": "*", + "react-native": "0.83 - 0.86" + } + }, + "node_modules/react-native-worklets/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/react-native/node_modules/babel-plugin-syntax-hermes-parser": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.36.0.tgz", + "integrity": "sha512-LhD0xdoedDw7ansQgXbB2DADLZIK/LRXuWNBPuVzMc5S2WK5GyT89tCM+cQzxFGO0mGyLK6D5TrVOJJzAoDy8Q==", + "license": "MIT", + "dependencies": { + "hermes-parser": "0.36.0" + } + }, + "node_modules/react-native/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/react-native/node_modules/hermes-estree": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.36.0.tgz", + "integrity": "sha512-A1+8zn5oss2CFP7pKsOaxorQG6FNIz1WU1VDqruLPPZl3LVgeE2C5xfFg8Ow6/Ow4mSslLLtYP1J3n38eKyW9w==", + "license": "MIT" + }, + "node_modules/react-native/node_modules/hermes-parser": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.36.0.tgz", + "integrity": "sha512-GdpwMmH5x6IpC1cijvcvYnlPB60Mh6kTSF/NFdYV/j56gYdi+0RIakYs+eqOV+bbO0SW7mgVVGSsTJxyPQfo3w==", + "license": "MIT", + "dependencies": { + "hermes-estree": "0.36.0" + } + }, + "node_modules/react-native/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/react-refresh": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", + "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-remove-scroll": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.7.2.tgz", + "integrity": "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q==", + "license": "MIT", + "dependencies": { + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-remove-scroll-bar": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz", + "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==", + "license": "MIT", + "dependencies": { + "react-style-singleton": "^2.2.2", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-style-singleton": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.3.tgz", + "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==", + "license": "MIT", + "dependencies": { + "get-nonce": "^1.0.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "license": "MIT" + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz", + "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==", + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "license": "MIT" + }, + "node_modules/regexpu-core": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz", + "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==", + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.2.2", + "regjsgen": "^0.8.0", + "regjsparser": "^0.13.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.2.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", + "license": "MIT" + }, + "node_modules/regjsparser": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.2.tgz", + "integrity": "sha512-NgRBy2Nx/bE+9F27nVHnqcN5HjyLmecqsqx2PJHu3/IEtADD4WuxuXIVExD5PoSDFVrl78dOonfcOe5O+5nbzQ==", + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~3.1.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-workspace-root": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/resolve-workspace-root/-/resolve-workspace-root-2.0.1.tgz", + "integrity": "sha512-nR23LHAvaI6aHtMg6RWoaHpdR4D881Nydkzi2CixINyg9T00KgaJdJI6Vwty+Ps8WLxZHuxsS0BseWjxSA4C+w==", + "license": "MIT" + }, + "node_modules/restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", + "license": "MIT", + "dependencies": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/sandbox-cli-detector": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/sandbox-cli-detector/-/sandbox-cli-detector-0.2.0.tgz", + "integrity": "sha512-4lyHX0ZU0AZKwjgZ1InxZAa3PNpyEb8rOQ+Zss1ReYmhNzW0Q+h1zE5nvniXN0HaAWZaZE1zgVNEirb0R7LmNg==", + "license": "MIT", + "bin": { + "sandbox-cli-detector": "dist/cli.js" + }, + "engines": { + "node": ">=18.18" + } + }, + "node_modules/sax": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.1.tgz", + "integrity": "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } + }, + "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==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/send": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serialize-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", + "integrity": "sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/serve-static": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-static/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/server-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz", + "integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==", + "license": "MIT" + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/sf-symbols-typescript": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/sf-symbols-typescript/-/sf-symbols-typescript-2.2.0.tgz", + "integrity": "sha512-TPbeg0b7ylrswdGCji8FRGFAKuqbpQlLbL8SOle3j1iHSs5Ob5mhvMAxWN2UItOjgALAB5Zp3fmMfj8mbWvXKw==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "license": "MIT" + }, + "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==", + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.10.0.tgz", + "integrity": "sha512-w1aiOKwKuRgtwAReIIj89puqg+I7GvX4IbLrvmhXbzQsj1+Zwi4VO3+fa6ZF91TWSjIxoEkKnMeHcLEODK5ZXA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "license": "ISC" + }, + "node_modules/simple-plist": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.3.1.tgz", + "integrity": "sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw==", + "license": "MIT", + "dependencies": { + "bplist-creator": "0.1.0", + "bplist-parser": "0.3.1", + "plist": "^3.0.5" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.4.tgz", + "integrity": "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "license": "MIT" + }, + "node_modules/slugify": { + "version": "1.6.9", + "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.6.9.tgz", + "integrity": "sha512-vZ7rfeehZui7wQs438JXBckYLkIIdfHOXsaVEUMyS5fHo1483l1bMdo0EDSWYclY0yZKFOipDy4KHuKs6ssvdg==", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/stackframe": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz", + "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==", + "license": "MIT" + }, + "node_modules/stacktrace-parser": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.11.tgz", + "integrity": "sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.7.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/standard-navigation": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/standard-navigation/-/standard-navigation-0.0.5.tgz", + "integrity": "sha512-YAmzwAiiQVocZxO/VGPFiQHcu5pKiz09QIGC0MK6aRMoa3E0QkoTQgcqJr7ZZ3OMiNhu4DkaGElFI5htjOIDbw==", + "license": "MIT" + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-buffers": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", + "integrity": "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==", + "license": "Unlicense", + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/structured-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/structured-headers/-/structured-headers-0.4.1.tgz", + "integrity": "sha512-0MP/Cxx5SzeeZ10p/bZI0S6MpgD+yxAhi1BOQ34jgnMXsCq3j1t6tQnZu+KdlL7dvJTLT3g9xN8tl10TqgFMcg==", + "license": "MIT" + }, + "node_modules/styleq": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/styleq/-/styleq-0.1.3.tgz", + "integrity": "sha512-3ZUifmCDCQanjeej1f6kyl/BeP/Vae5EYkQ9iJfUm/QwZvlgnZzyflqAsAWYURdtea8Vkvswu2GrC57h3qffcA==", + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/terser": { + "version": "5.51.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.51.2.tgz", + "integrity": "sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==", + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.15.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, + "node_modules/throat": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", + "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "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/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "license": "BSD-3-Clause" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/toqr": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/toqr/-/toqr-0.1.1.tgz", + "integrity": "sha512-FWAPzCIHZHnrE/5/w9MPk0kK25hSQSH2IKhYh9PyjS3SG/+IEMvlwIHbhz+oF7xl54I+ueZlVnMjyzdSwLmAwA==", + "license": "MIT" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "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==", + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ua-parser-js": { + "version": "0.7.41", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.41.tgz", + "integrity": "sha512-O3oYyCMPYgNNHuO7Jjk3uacJWZF8loBgwrfd/5LE/HyZ3lUIOdniQ7DNXJcIgZbwioZxk0fLfI4EVnetdiX5jg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + }, + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + } + ], + "license": "MIT", + "bin": { + "ua-parser-js": "script/cli.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/undici-types": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", + "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", + "license": "MIT" + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "license": "MIT", + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz", + "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.2.0.tgz", + "integrity": "sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz", + "integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==", + "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/use-callback-ref": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz", + "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/use-latest-callback": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/use-latest-callback/-/use-latest-callback-0.2.6.tgz", + "integrity": "sha512-FvRG9i1HSo0wagmX63Vrm8SnlUU3LMM3WyZkQ76RnslpBrX694AdG4A0zQBx2B3ZifFA0yv/BaEHGBnEax5rZg==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/use-sidecar": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.3.tgz", + "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==", + "license": "MIT", + "dependencies": { + "detect-node-es": "^1.1.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/use-sync-external-store": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", + "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/validate-npm-package-name": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vaul": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vaul/-/vaul-1.1.2.tgz", + "integrity": "sha512-ZFkClGpWyI2WUQjdLJ/BaGuV6AVQiJ3uELGk3OYtP+B6yCO7Cmn9vPFXVJkRaGkOJu3m8bQMgtyzNHixULceQA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-dialog": "^1.1.1" + }, + "peerDependencies": { + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc" + } + }, + "node_modules/vlq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-1.0.1.tgz", + "integrity": "sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w==", + "license": "MIT" + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/warn-once": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.1.tgz", + "integrity": "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q==", + "license": "MIT" + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-fetch": { + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", + "license": "MIT" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/whatwg-url-minimum": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/whatwg-url-minimum/-/whatwg-url-minimum-0.1.2.tgz", + "integrity": "sha512-XPEm0XFQWNVG292lII1PrRRJl3sItrs7CettZ4ncYxuDVpLyy+NwlGyut2hXI0JswcJUxeCH+CyOJK0ZzAXD6A==", + "license": "MIT" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/ws": { + "version": "7.5.13", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.13.tgz", + "integrity": "sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xcode": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/xcode/-/xcode-3.0.1.tgz", + "integrity": "sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA==", + "license": "Apache-2.0", + "dependencies": { + "simple-plist": "^1.1.0", + "uuid": "^7.0.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/xml2js": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.0.tgz", + "integrity": "sha512-eLTh0kA8uHceqesPqSE+VvO1CDDJWMwlQfB6LuN6T8w6MaDJ8Txm8P7s5cHD0miF0V+GGTZrDQfxPZQVsur33w==", + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xml2js/node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yargs": { + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zustand": { + "version": "4.5.7", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.7.tgz", + "integrity": "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==", + "license": "MIT", + "dependencies": { + "use-sync-external-store": "^1.2.2" + }, + "engines": { + "node": ">=12.7.0" + }, + "peerDependencies": { + "@types/react": ">=16.8", + "immer": ">=9.0.6", + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..199db92 --- /dev/null +++ b/package.json @@ -0,0 +1,54 @@ +{ + "name": "my-app", + "main": "expo-router/entry", + "version": "1.0.0", + "dependencies": { + "@expo/ui": "~57.0.16", + "expo": "~57.0.20", + "expo-constants": "~57.0.17", + "expo-device": "~57.0.1", + "expo-font": "~57.0.3", + "expo-glass-effect": "~57.0.1", + "expo-image": "~57.0.4", + "expo-linking": "~57.0.9", + "expo-router": "~57.0.19", + "expo-splash-screen": "~57.0.8", + "expo-status-bar": "~57.0.1", + "expo-symbols": "~57.0.2", + "expo-system-ui": "~57.0.3", + "expo-web-browser": "~57.0.2", + "react": "19.2.3", + "react-dom": "19.2.3", + "react-native": "0.86.3", + "react-native-gesture-handler": "~2.32.0", + "react-native-reanimated": "4.5.1", + "react-native-safe-area-context": "~5.7.0", + "react-native-screens": "~4.26.0", + "react-native-web": "~0.21.0", + "react-native-worklets": "0.10.1", + "@expo-google-fonts/inter": "^0.4.2", + "@expo/vector-icons": "^15.0.2", + "@react-native-async-storage/async-storage": "2.2.0", + "@react-native-community/netinfo": "12.0.1", + "@tanstack/react-query": "^5.101.2", + "axios": "^1.18.1", + "expo-linear-gradient": "~57.0.1", + "expo-secure-store": "~57.0.2", + "react-native-size-matters": "^0.4.2", + "react-native-toast-message": "^2.3.3", + "zustand": "^4.5.7" + }, + "devDependencies": { + "@types/react": "~19.2.2", + "typescript": "~6.0.3" + }, + "scripts": { + "start": "expo start", + "reset-project": "node ./scripts/reset-project.js", + "android": "expo start --android", + "ios": "expo start --ios", + "web": "expo start --web", + "lint": "expo lint" + }, + "private": true +} diff --git a/src/api/access-token.ts b/src/api/access-token.ts new file mode 100644 index 0000000..a463592 --- /dev/null +++ b/src/api/access-token.ts @@ -0,0 +1,26 @@ +/** + * Process-local access-token bridge used by the HTTP client. + * + * IMPORTANT: + * - This module must never import Zustand or any API client. + * - The auth store writes the current access token here. + * - api/client.ts reads it from here. + * + * This deliberately breaks the dependency cycle: + * auth.store -> api client -> auth.store + */ + +let currentAccessToken: string | null = null; + +export function setApiAccessToken(token: string | null | undefined): void { + const normalized = typeof token === "string" ? token.trim() : ""; + currentAccessToken = normalized.length > 0 ? normalized : null; +} + +export function getApiAccessToken(): string | null { + return currentAccessToken; +} + +export function clearApiAccessToken(): void { + currentAccessToken = null; +} diff --git a/src/api/client.ts b/src/api/client.ts new file mode 100644 index 0000000..cbaffb1 --- /dev/null +++ b/src/api/client.ts @@ -0,0 +1,29 @@ +import axios from "axios"; + +import { getApiAccessToken } from "@/api/access-token"; + +const apiClient = axios.create({ + baseURL: + process.env.EXPO_PUBLIC_API_URL ?? + process.env.EXPO_PUBLIC_API_BASE_URL ?? + "http://localhost:8000/api", + timeout: 30000, + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "Bypass-Tunnel-Reminder": "true", + }, +}); + +apiClient.interceptors.request.use( + (config) => { + const token = getApiAccessToken(); + if (token) { + config.headers.Authorization = `Bearer ${token}`; + } + return config; + }, + (error) => Promise.reject(error), +); + +export default apiClient; diff --git a/src/api/endpoints.ts b/src/api/endpoints.ts new file mode 100644 index 0000000..628c43b --- /dev/null +++ b/src/api/endpoints.ts @@ -0,0 +1,35 @@ +export const API_ENDPOINTS = { + AUTH: { + REGISTER: "/auth/register", + LOGIN: "/auth/login", + ME: "/auth/me", + PROFILE: "/auth/profile", + CHANGE_PASSWORD: "/auth/change-password", + FORGOT_PASSWORD: "/auth/forgot-password", + RESET_PASSWORD: "/auth/reset-password", + }, + + ACCESS: { + ME: "/access/me", + }, + + CART: { + CALCULATE: "/cart/calculate", + }, + + CHECKOUT: { + CONFIG: "/checkout/config", + CREATE_ORDER: "/checkout/create-order", + VERIFY: "/checkout/verify", + INVOICE: (paymentId: string) => `/checkout/payment/${encodeURIComponent(paymentId)}/invoice`, + }, + + MODULE: "/module", + CONTENTS: "/contents", + MODULES: "/contents/modules", + MODULE_CONTENTS: "/contents/module-contents", + MODULE_TEMPLATE_CONTENTS: "/contents/module-template-contents", + MODULE_TEMPLATE_CONTENT_DETAILS: "/contents/module-template-content-details", + TEMPLATES: "/contents/templates", + +} as const; diff --git a/src/api/http-client.ts b/src/api/http-client.ts new file mode 100644 index 0000000..dba54e4 --- /dev/null +++ b/src/api/http-client.ts @@ -0,0 +1,76 @@ +import axios, { AxiosError, AxiosHeaders, AxiosInstance, AxiosRequestConfig } from "axios"; +import { ApiError, ApiErrorPayload } from "./types"; + +export type AccessTokenProvider = () => string | null | Promise; + +export interface HttpClientOptions { + baseURL: string; + timeoutMs?: number; + accessTokenProvider?: AccessTokenProvider; +} + +function normalizeApiError(error: unknown): ApiError { + if (!axios.isAxiosError(error)) { + return new ApiError({ + message: "Unexpected client error.", + status: null, + code: null, + details: null, + cause: error, + }); + } + + const axiosError = error as AxiosError; + const payload = axiosError.response?.data; + const detail = payload?.detail ?? null; + + return new ApiError({ + message: + typeof detail === "string" && detail.trim() + ? detail + : axiosError.message || "Request failed.", + status: axiosError.response?.status ?? null, + code: payload?.code ?? axiosError.code ?? null, + details: detail, + cause: axiosError, + }); +} + +export function createHttpClient(options: HttpClientOptions): AxiosInstance { + const client = axios.create({ + baseURL: options.baseURL.replace(/\/+$/, ""), + timeout: options.timeoutMs ?? 20_000, + headers: { + Accept: "application/json", + "Content-Type": "application/json", + }, + }); + + client.interceptors.request.use(async (config) => { + if (!options.accessTokenProvider) return config; + + const token = await options.accessTokenProvider(); + if (!token) return config; + + const headers = AxiosHeaders.from(config.headers); + headers.set("Authorization", `Bearer ${token}`); + config.headers = headers; + + return config; + }); + + client.interceptors.response.use( + (response) => response, + (error: unknown) => Promise.reject(normalizeApiError(error)), + ); + + return client; +} + +export async function request( + client: AxiosInstance, + config: AxiosRequestConfig, +): Promise { + const response = await client.request(config); + return response.data; +} diff --git a/src/api/index.ts b/src/api/index.ts new file mode 100644 index 0000000..4079242 --- /dev/null +++ b/src/api/index.ts @@ -0,0 +1,5 @@ +export { default as apiClient } from "./client"; +export * from "./endpoints"; +export * from "./types"; + +import "./interceptors"; \ No newline at end of file diff --git a/src/api/interceptors.ts b/src/api/interceptors.ts new file mode 100644 index 0000000..e650363 --- /dev/null +++ b/src/api/interceptors.ts @@ -0,0 +1,15 @@ +import apiClient from "./client"; + +apiClient.interceptors.request.use( + async (config) => { + return config; + }, + async (error) => Promise.reject(error) +); + +apiClient.interceptors.response.use( + (response) => response, + async (error) => Promise.reject(error) +); + +export default apiClient; \ No newline at end of file diff --git a/src/api/types.ts b/src/api/types.ts new file mode 100644 index 0000000..848aa73 --- /dev/null +++ b/src/api/types.ts @@ -0,0 +1,40 @@ +export interface ApiValidationIssue { + type?: string; + loc?: Array; + msg?: string; + input?: unknown; + ctx?: unknown; +} + +export interface ApiErrorPayload { + detail?: string | ApiValidationIssue[] | unknown; + code?: string; +} + +export class ApiError extends Error { + readonly status: number | null; + readonly code: string | null; + readonly details: unknown; + readonly cause?: unknown; + + constructor(init: { + message: string; + status: number | null; + code: string | null; + details: unknown; + cause?: unknown; + }) { + super(init.message); + this.name = "ApiError"; + this.status = init.status; + this.code = init.code; + this.details = init.details; + this.cause = init.cause; + } +} + +export interface ApiResponse { + success: boolean; + message: string; + data: T; +} \ No newline at end of file diff --git a/src/app/(tabs)/_layout.tsx b/src/app/(tabs)/_layout.tsx new file mode 100644 index 0000000..790a275 --- /dev/null +++ b/src/app/(tabs)/_layout.tsx @@ -0,0 +1,98 @@ +import { Tabs, router } from "expo-router"; +import { Ionicons } from "@expo/vector-icons"; +import { Alert } from "react-native"; +import { AuthColors } from "@/features/auth/constants/colors"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; +import { useAuthStore } from "@/store/auth.store"; + +export default function TabsLayout() { + const insets = useSafeAreaInsets(); + const bottomPadding = insets.bottom > 0 ? insets.bottom : 8; + const tabBarHeight = 52 + bottomPadding; + + const { accessToken, logout } = useAuthStore(); + const isAuthenticated = !!accessToken; + + const handleAuthAction = () => { + if (isAuthenticated) { + Alert.alert( + "Logout", + "Are you sure you want to logout?", + [ + { text: "Cancel", style: "cancel" }, + { + text: "Yes", + style: "destructive", + onPress: () => { + logout(); + router.replace("/login"); + }, + }, + ], + { cancelable: true } + ); + } else { + router.push("/login"); + } + }; + + return ( + + ( + + ), + }} + /> + + ( + + ), + }} + listeners={{ + tabPress: (e) => { + e.preventDefault(); + handleAuthAction(); + }, + }} + /> + + ); +} diff --git a/src/app/(tabs)/auth-action.tsx b/src/app/(tabs)/auth-action.tsx new file mode 100644 index 0000000..f497173 --- /dev/null +++ b/src/app/(tabs)/auth-action.tsx @@ -0,0 +1,6 @@ +import React from "react"; +import { View } from "react-native"; + +export default function AuthActionScreen() { + return ; +} diff --git a/src/app/(tabs)/index.tsx b/src/app/(tabs)/index.tsx new file mode 100644 index 0000000..2b5aef6 --- /dev/null +++ b/src/app/(tabs)/index.tsx @@ -0,0 +1,5 @@ +import HomeScreen from "@/screens/home/HomeScreen"; + +export default function TabsIndex() { + return ; +} diff --git a/src/app/(tabs)/library.tsx b/src/app/(tabs)/library.tsx new file mode 100644 index 0000000..f4a35fc --- /dev/null +++ b/src/app/(tabs)/library.tsx @@ -0,0 +1,304 @@ +import React, { useCallback, useEffect, useMemo } from "react"; +import { + ScrollView, + StyleSheet, + Text, + View, + TouchableOpacity, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { router, useFocusEffect } from "expo-router"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; + +import { Colors } from "@/theme"; +import { useAuthStore } from "@/store/auth.store"; +import { useModulesQuery } from "@/features/content/hooks/use-content-queries"; +import { buildContentReferenceRoute } from "@/features/content/utils/content-reference"; +import { isModuleUnlockedByAccess } from "@/features/access/module-access"; +import { + ModuleIndexItem, + normalizeModuleListResponse, + toModuleIndexItem, +} from "@/features/modules/module-index"; + +export default function LibraryScreen() { + const { + access, + accessToken, + refreshAccess, + setModules, + setLastViewedModule, + } = useAuthStore(); + + const modulesQuery = useModulesQuery(); + const modules = useMemo( + () => normalizeModuleListResponse(modulesQuery.data), + [modulesQuery.data], + ); + + useEffect(() => { + setModules( + modules.map((module) => { + const item = toModuleIndexItem(module); + return { + id: module.id, + code: module.code, + slug: module.slug, + isDefaultFree: item.isDefaultFree, + }; + }), + ); + }, [modules, setModules]); + + useFocusEffect( + useCallback(() => { + if (accessToken) { + void refreshAccess(); + } + }, [accessToken, refreshAccess]), + ); + + const items = useMemo( + () => modules.filter((module) => module.is_active).map(toModuleIndexItem), + [modules], + ); + + const unlockedModules = useMemo(() => { + if (!accessToken) return []; + + return items.filter((item) => + isModuleUnlockedByAccess(item.module, access), + ); + }, [access, accessToken, items]); + + const categories = useMemo( + () => Array.from(new Set(unlockedModules.map((item) => item.category))), + [unlockedModules], + ); + + const handleModulePress = useCallback( + (item: ModuleIndexItem) => { + setLastViewedModule({ + moduleId: item.module.id, + moduleCode: item.module.code, + moduleSlug: item.module.slug, + entryTemplateCode: item.reference.target.template_code, + title: item.title, + description: item.description, + icon: item.icon, + color: item.color, + category: item.category, + }); + + router.push(buildContentReferenceRoute(item.reference) as never); + }, + [setLastViewedModule], + ); + + return ( + + + Your Library + + + {unlockedModules.length} + Modules Unlocked + + + {unlockedModules.length === 0 ? ( + + + + + Your Library is Empty + + Explore all modules on the Home dashboard to unlock premium content. + + router.push("/modules")}> + Explore Modules + + + ) : ( + + {categories.map((category) => { + const categoryModules = unlockedModules.filter( + (item) => item.category === category, + ); + + return ( + + {category} + + {categoryModules.map((item, index) => ( + + handleModulePress(item)} + > + + + + + {item.title} + + {item.description} + + + + + {index < categoryModules.length - 1 ? ( + + ) : null} + + ))} + + + ); + })} + + )} + + + ); +} + +const styles = StyleSheet.create({ + safeArea: { + flex: 1, + backgroundColor: Colors.background, + }, + container: { + flex: 1, + paddingHorizontal: moderateScale(24), + paddingTop: verticalScale(20), + }, + title: { + fontSize: moderateScale(22), + fontWeight: "700", + color: Colors.textPrimary, + marginBottom: verticalScale(16), + }, + unlockedBox: { + backgroundColor: "#F3F4F6", + borderRadius: moderateScale(14), + padding: moderateScale(14), + flexDirection: "row", + alignItems: "center", + marginBottom: verticalScale(24), + }, + unlockedCount: { + fontSize: moderateScale(22), + fontWeight: "800", + color: Colors.primary, + marginRight: moderateScale(12), + }, + unlockedText: { + fontSize: moderateScale(14), + fontWeight: "600", + color: Colors.textPrimary, + }, + emptyContainer: { + flex: 1, + justifyContent: "center", + alignItems: "center", + paddingBottom: verticalScale(80), + }, + iconWrapper: { + width: moderateScale(90), + height: moderateScale(90), + borderRadius: moderateScale(45), + backgroundColor: "#F3F4F6", + justifyContent: "center", + alignItems: "center", + marginBottom: verticalScale(16), + }, + emptyTitle: { + fontSize: moderateScale(18), + fontWeight: "700", + color: Colors.textPrimary, + marginBottom: verticalScale(6), + }, + emptySubtitle: { + fontSize: moderateScale(13), + color: Colors.textSecondary, + textAlign: "center", + lineHeight: 18, + paddingHorizontal: moderateScale(16), + marginBottom: verticalScale(16), + }, + exploreText: { + fontSize: moderateScale(14), + fontWeight: "700", + color: Colors.primary, + }, + scrollContent: { + paddingBottom: verticalScale(24), + }, + card: { + backgroundColor: "#FFFFFF", + borderRadius: moderateScale(16), + borderWidth: 1, + borderColor: "#E5E7EB", + overflow: "hidden", + }, + row: { + flexDirection: "row", + alignItems: "center", + padding: moderateScale(14), + }, + iconWrapperSmall: { + width: moderateScale(40), + height: moderateScale(40), + borderRadius: moderateScale(20), + justifyContent: "center", + alignItems: "center", + }, + textContainer: { + flex: 1, + marginLeft: moderateScale(12), + marginRight: moderateScale(12), + }, + moduleTitle: { + fontSize: moderateScale(15), + fontWeight: "600", + color: Colors.textPrimary, + marginBottom: 2, + }, + moduleDesc: { + fontSize: moderateScale(12), + color: Colors.textSecondary, + }, + separator: { + height: 1, + backgroundColor: "#F3F4F6", + }, + categorySection: { + marginBottom: verticalScale(20), + }, + categoryTitle: { + fontSize: moderateScale(12), + fontWeight: "700", + color: Colors.textSecondary, + textTransform: "uppercase", + letterSpacing: 1, + marginBottom: verticalScale(8), + marginLeft: moderateScale(4), + }, +}); diff --git a/src/app/(tabs)/profile.tsx b/src/app/(tabs)/profile.tsx new file mode 100644 index 0000000..7697e9e --- /dev/null +++ b/src/app/(tabs)/profile.tsx @@ -0,0 +1,5 @@ +import ProfileOverviewScreen from "@/screens/profile/ProfileOverviewScreen"; + +export default function ProfileScreen() { + return ; +} diff --git a/src/app/_layout.tsx b/src/app/_layout.tsx new file mode 100644 index 0000000..64aaaa5 --- /dev/null +++ b/src/app/_layout.tsx @@ -0,0 +1,133 @@ +import { Stack } from "expo-router"; +import React from "react"; +import * as RN from "react-native"; +import { + useFonts, + Inter_400Regular, + Inter_500Medium, + Inter_600SemiBold, + Inter_700Bold, +} from "@expo-google-fonts/inter"; + +import { AppProvider } from "@/providers"; + +// Helper to resolve font family based on styles +const resolveCustomStyle = (style: any) => { + if (!style) { + return { fontFamily: "Inter-Regular" }; + } + + const flat = RN.StyleSheet.flatten(style); + + // If fontFamily is already specified (like icons), don't override it! + if (flat && flat.fontFamily && flat.fontFamily !== "System" && flat.fontFamily !== "sans-serif") { + return style; + } + + // Map font weight to Inter weights + const weight = flat?.fontWeight; + let fontFamily = "Inter-Regular"; + + if (weight === "bold" || weight === "700" || weight === "800" || weight === "900") { + fontFamily = "Inter-Bold"; + } else if (weight === "600") { + fontFamily = "Inter-SemiBold"; + } else if (weight === "500") { + fontFamily = "Inter-Medium"; + } + + // Merge the new fontFamily with the rest of the styles + return [ + style, + { fontFamily } + ]; +}; + +const OriginalText = RN.Text; +const OriginalTextInput = RN.TextInput; + +// Custom Text HOC +const CustomText = React.forwardRef((props: any, ref: any) => { + const { style, allowFontScaling, ...rest } = props; + const newStyle = resolveCustomStyle(style); + return ( + + ); +}); + +// Bind static props/methods if any +Object.assign(CustomText, OriginalText); + +try { + const rnExports = require("react-native"); + const descText = Object.getOwnPropertyDescriptor(rnExports, "Text"); + if (descText && descText.configurable) { + Object.defineProperty(rnExports, "Text", { + get: () => CustomText, + configurable: true, + }); + } +} catch (e) { + // Silently ignore if module exports are immutable in web bundle environment +} + +// Custom TextInput HOC +const CustomTextInput = React.forwardRef((props: any, ref: any) => { + const { style, allowFontScaling, ...rest } = props; + const newStyle = resolveCustomStyle(style); + return ( + + ); +}); + +Object.assign(CustomTextInput, OriginalTextInput); + +try { + const rnExports = require("react-native"); + const descInput = Object.getOwnPropertyDescriptor(rnExports, "TextInput"); + if (descInput && descInput.configurable) { + Object.defineProperty(rnExports, "TextInput", { + get: () => CustomTextInput, + configurable: true, + }); + } +} catch (e) { + // Silently ignore if module exports are immutable in web bundle environment +} + +import { GestureHandlerRootView } from "react-native-gesture-handler"; + +export default function RootLayout() { + const [fontsLoaded] = useFonts({ + "Inter-Regular": Inter_400Regular, + "Inter-Medium": Inter_500Medium, + "Inter-SemiBold": Inter_600SemiBold, + "Inter-Bold": Inter_700Bold, + }); + + if (!fontsLoaded) { + return null; + } + + return ( + + + + + + ); +} \ No newline at end of file diff --git a/src/app/index.tsx b/src/app/index.tsx new file mode 100644 index 0000000..ea91d65 --- /dev/null +++ b/src/app/index.tsx @@ -0,0 +1,5 @@ +import { Redirect } from "expo-router"; + +export default function Index() { + return ; +} \ No newline at end of file diff --git a/src/app/login/forgot-password.tsx b/src/app/login/forgot-password.tsx new file mode 100644 index 0000000..ec648f7 --- /dev/null +++ b/src/app/login/forgot-password.tsx @@ -0,0 +1,308 @@ +import React, { useState } from "react"; +import { + KeyboardAvoidingView, + Platform, + ScrollView, + StyleSheet, + Text, + View, + Alert, + Pressable, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { router } from "expo-router"; +import { moderateScale, verticalScale } from "react-native-size-matters"; +import { Colors } from "@/theme"; +import { AuthColors } from "@/features/auth/constants/colors"; +import BaseTextInput from "@/components/forms/BaseTextInput"; +import PasswordInput from "@/components/forms/PasswordInput"; +import PrimaryButton from "@/components/buttons/PrimaryButton"; +import FieldLabel from "@/components/forms/FieldLabel"; +import { forgotPassword, resetPassword } from "@/features/auth/api/auth.api"; + +export default function ForgotPasswordScreen() { + const [step, setStep] = useState<"request" | "verify">("request"); + const [email, setEmail] = useState(""); + const [otpCode, setOtpCode] = useState(""); + const [newPassword, setNewPassword] = useState(""); + const [confirmPassword, setConfirmPassword] = useState(""); + + const [emailError, setEmailError] = useState(""); + const [otpError, setOtpError] = useState(""); + const [passwordError, setPasswordError] = useState(""); + const [confirmError, setConfirmError] = useState(""); + const [isLoading, setIsLoading] = useState(false); + + const handleRequestOtp = async () => { + setEmailError(""); + const cleanEmail = email.trim().toLowerCase(); + if (!cleanEmail) { + setEmailError("Email is required"); + return; + } + if (!/\S+@\S+\.\S+/.test(cleanEmail)) { + setEmailError("Please enter a valid email address"); + return; + } + + setIsLoading(true); + try { + const res = await forgotPassword({ email: cleanEmail }); + const msg = res.message || "Verification code sent! Check your inbox."; + if (Platform.OS === "web") { + window.alert(msg); + } else { + Alert.alert("Code Sent", msg); + } + setStep("verify"); + } catch (err: any) { + const errMsg = err?.response?.data?.detail || "Failed to send verification code."; + setEmailError(errMsg); + } finally { + setIsLoading(false); + } + }; + + const handleResetPassword = async () => { + setOtpError(""); + setPasswordError(""); + setConfirmError(""); + + let hasError = false; + if (!otpCode.trim() || otpCode.trim().length !== 6) { + setOtpError("Please enter the 6-digit code"); + hasError = true; + } + + if (!newPassword) { + setPasswordError("New password is required"); + hasError = true; + } else if (newPassword.length < 8) { + setPasswordError("Must be at least 8 characters"); + hasError = true; + } else if (!/[A-Z]/.test(newPassword)) { + setPasswordError("Must contain at least one uppercase letter"); + hasError = true; + } else if (!/[0-9]/.test(newPassword)) { + setPasswordError("Must contain at least one number"); + hasError = true; + } else if (!/[^A-Za-z0-9]/.test(newPassword)) { + setPasswordError("Must contain at least one special character"); + hasError = true; + } + + if (!confirmPassword) { + setConfirmError("Please confirm your password"); + hasError = true; + } else if (newPassword !== confirmPassword) { + setConfirmError("Passwords do not match"); + hasError = true; + } + + if (hasError) return; + + setIsLoading(true); + try { + const res = await resetPassword({ + email: email.trim().toLowerCase(), + otp_code: otpCode.trim(), + new_password: newPassword, + }); + + const successMsg = res.message || "Password reset successfully! You can now log in."; + if (Platform.OS === "web") { + window.alert(successMsg); + router.replace("/login"); + } else { + Alert.alert("Success", successMsg, [ + { text: "Log In", onPress: () => router.replace("/login") }, + ]); + } + } catch (err: any) { + const errMsg = err?.response?.data?.detail || "Invalid code or reset failed."; + setOtpError(errMsg); + if (Platform.OS === "web") { + window.alert(errMsg); + } else { + Alert.alert("Error", errMsg); + } + } finally { + setIsLoading(false); + } + }; + + return ( + + + + + {/* Header */} + + Reset Password + + {step === "request" + ? "Enter your registered email to receive a 6-digit verification code." + : `Enter the 6-digit code sent to ${email} and your new password.`} + + + + {step === "request" ? ( + + + + + + + + + + + router.back()} + > + ← Back to Log In + + + ) : ( + + + + setOtpCode(val.replace(/\D/g, "").slice(0, 6))} + placeholder="123456" + keyboardType="number-pad" + autoCapitalize="none" + leftIcon="key-outline" + error={otpError} + /> + + + + + + + + + + + + + + + + + + setStep("request")}> + Resend code + + router.replace("/login")}> + Back to Log In + + + + )} + + + + + ); +} + +const styles = StyleSheet.create({ + safeArea: { + flex: 1, + backgroundColor: Colors.background, + }, + keyboardContainer: { + flex: 1, + }, + contentContainer: { + flexGrow: 1, + paddingBottom: verticalScale(32), + }, + container: { + flex: 1, + paddingHorizontal: moderateScale(24), + paddingTop: verticalScale(30), + }, + header: { + marginBottom: verticalScale(24), + }, + title: { + fontSize: moderateScale(26), + fontWeight: "800", + color: Colors.text, + marginBottom: verticalScale(8), + }, + subtitle: { + fontSize: moderateScale(14), + color: Colors.textSecondary, + lineHeight: moderateScale(20), + }, + form: { + marginTop: verticalScale(8), + }, + field: { + marginBottom: verticalScale(16), + }, + buttonSpacing: { + marginTop: verticalScale(12), + }, + backButton: { + alignSelf: "center", + marginTop: verticalScale(20), + padding: moderateScale(8), + }, + backButtonText: { + fontSize: moderateScale(14), + fontWeight: "700", + color: AuthColors.primary, + }, + footerRow: { + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", + marginTop: verticalScale(20), + }, + resendText: { + fontSize: moderateScale(14), + fontWeight: "600", + color: Colors.textSecondary, + }, +}); diff --git a/src/app/login/index.tsx b/src/app/login/index.tsx new file mode 100644 index 0000000..3c24295 --- /dev/null +++ b/src/app/login/index.tsx @@ -0,0 +1,5 @@ +import LoginScreen from "@/screens/auth/LoginScreen"; + +export default function Login() { + return ; +} \ No newline at end of file diff --git a/src/app/modules/[moduleCode]/[templateCode]/[contentId].tsx b/src/app/modules/[moduleCode]/[templateCode]/[contentId].tsx new file mode 100644 index 0000000..4aba07c --- /dev/null +++ b/src/app/modules/[moduleCode]/[templateCode]/[contentId].tsx @@ -0,0 +1,22 @@ +import { useLocalSearchParams } from "expo-router"; + +import { ModuleAccessGate } from "@/features/access/components/ModuleAccessGate"; +import { ContentDetailScreen } from "@/features/content/screens/ContentDetailScreen"; + +export default function ContentDetailRoute() { + const { moduleCode, templateCode, contentId } = useLocalSearchParams<{ + moduleCode: string; + templateCode: string; + contentId: string; + }>(); + + return ( + + + + ); +} diff --git a/src/app/modules/[moduleCode]/[templateCode]/index.tsx b/src/app/modules/[moduleCode]/[templateCode]/index.tsx new file mode 100644 index 0000000..25689d1 --- /dev/null +++ b/src/app/modules/[moduleCode]/[templateCode]/index.tsx @@ -0,0 +1,17 @@ +import { useLocalSearchParams } from "expo-router"; + +import { ModuleAccessGate } from "@/features/access/components/ModuleAccessGate"; +import { TemplateScreen } from "@/features/content/screens/TemplateScreen"; + +export default function TemplateRoute() { + const { moduleCode, templateCode } = useLocalSearchParams<{ + moduleCode: string; + templateCode: string; + }>(); + + return ( + + + + ); +} diff --git a/src/app/modules/[moduleCode]/search.tsx b/src/app/modules/[moduleCode]/search.tsx new file mode 100644 index 0000000..f4c3ff5 --- /dev/null +++ b/src/app/modules/[moduleCode]/search.tsx @@ -0,0 +1,21 @@ +import { useLocalSearchParams } from "expo-router"; + +import { ModuleAccessGate } from "@/features/access/components/ModuleAccessGate"; +import { useModuleDisplayName } from "@/features/content/hooks/use-module-display-name"; +import FacetedSearchScreen from "@/features/search/screens/FacetedSearchScreen"; + +export default function ModuleSearchRoute() { + const { moduleCode } = useLocalSearchParams<{ moduleCode: string }>(); + const module = typeof moduleCode === "string" ? moduleCode.trim() : ""; + const moduleDisplay = useModuleDisplayName(module); + + return ( + + + + ); +} diff --git a/src/app/modules/index.tsx b/src/app/modules/index.tsx new file mode 100644 index 0000000..5c95a4b --- /dev/null +++ b/src/app/modules/index.tsx @@ -0,0 +1,5 @@ +import ModulesIndexScreen from "@/screens/modules/ModulesIndexScreen"; + +export default function ModulesIndexRoute() { + return ; +} diff --git a/src/app/modules/list.tsx b/src/app/modules/list.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/app/register/index.tsx b/src/app/register/index.tsx new file mode 100644 index 0000000..1df93f5 --- /dev/null +++ b/src/app/register/index.tsx @@ -0,0 +1,5 @@ +import SignUpScreen from "@/screens/auth/SignUpScreen"; + +export default function Register() { + return ; +} diff --git a/src/app/search.tsx b/src/app/search.tsx new file mode 100644 index 0000000..eb1b473 --- /dev/null +++ b/src/app/search.tsx @@ -0,0 +1,5 @@ +import FacetedSearchScreen from "@/features/search/screens/FacetedSearchScreen"; + +export default function GlobalSearchRoute() { + return ; +} diff --git a/src/app/subscription/index.tsx b/src/app/subscription/index.tsx new file mode 100644 index 0000000..a42b415 --- /dev/null +++ b/src/app/subscription/index.tsx @@ -0,0 +1,326 @@ +import React, { useCallback, useEffect, useMemo, useState } from "react"; +import { + ActivityIndicator, + Alert, + Linking, + Platform, + ScrollView, + StyleSheet, + Text, + TextInput, + TouchableOpacity, + View, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { router, useFocusEffect, useLocalSearchParams } from "expo-router"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; +import Constants from "expo-constants"; + +import { Colors } from "@/theme"; +import { useAuthStore } from "@/store/auth.store"; +import { calculateCart } from "@/features/commerce"; +import type { CartCalculationResponse } from "@/features/commerce"; +import PrimaryButton from "@/components/buttons/PrimaryButton"; + +function param(value: string | string[] | undefined): string { + return typeof value === "string" ? value : ""; +} + +function money(value: number, currency: string): string { + try { + return new Intl.NumberFormat("en-IN", { + style: "currency", + currency, + maximumFractionDigits: 2, + }).format(value); + } catch { + return `${currency} ${value.toFixed(2)}`; + } +} + +function resolveStorefrontUrl(): string { + const envUrl = process.env.EXPO_PUBLIC_STOREFRONT_URL?.trim(); + if (envUrl) return envUrl; + + const apiUrl = process.env.EXPO_PUBLIC_API_URL ?? ""; + if (apiUrl.startsWith("https://")) { + try { + const parsed = new URL(apiUrl); + if (!parsed.hostname.includes("localhost") && !parsed.hostname.includes("127.0.0.1")) { + return parsed.origin; + } + } catch {} + } + + const hostUri = Constants.expoConfig?.hostUri; + const metroHost = hostUri?.split(":")[0]; + if (metroHost && /^[0-9.]+$/.test(metroHost) && metroHost !== "127.0.0.1") { + return `http://${metroHost}:3000`; + } + + if (Platform.OS === "web" && typeof window !== "undefined") { + return `${window.location.protocol}//${window.location.hostname}`; + } + + const ipMatch = apiUrl.match(/http:\/\/([0-9.]+)/); + if (ipMatch?.[1]) return `http://${ipMatch[1]}:3000`; + + return "http://localhost:3000"; +} + +export default function SubscriptionScreen() { + const params = useLocalSearchParams(); + const accessToken = useAuthStore((state) => state.accessToken); + const access = useAuthStore((state) => state.access); + const refreshAccess = useAuthStore((state) => state.refreshAccess); + + const moduleId = param(params.moduleId); + const moduleCode = param(params.moduleCode); + const title = param(params.title) || "Clinical Module"; + const category = param(params.category); + const description = param(params.desc); + const planCode = param(params.planCode).trim().toUpperCase(); + + const [couponCode, setCouponCode] = useState(""); + const [pricing, setPricing] = useState(null); + const [loadingPricing, setLoadingPricing] = useState(false); + const [openingCheckout, setOpeningCheckout] = useState(false); + const [error, setError] = useState(null); + + const unlocked = useMemo(() => { + if (!accessToken) return false; + if (moduleCode && access?.unlocked_module_codes.includes(moduleCode)) return true; + return false; + }, [access, accessToken, moduleCode]); + + const loadPricing = useCallback(async (coupon?: string) => { + if (!planCode) { + setPricing(null); + setError("This module does not have a commerce plan configured."); + return; + } + + setLoadingPricing(true); + setError(null); + try { + const response = await calculateCart({ + cart_item_codes: [planCode], + coupon_code: coupon?.trim() || null, + currency: "INR", + }); + setPricing(response); + } catch (err: any) { + const detail = err?.response?.data?.detail; + setError(typeof detail === "string" ? detail : "Unable to load current subscription pricing."); + setPricing(null); + } finally { + setLoadingPricing(false); + } + }, [planCode]); + + useEffect(() => { + void loadPricing(); + }, [loadPricing]); + + useFocusEffect( + useCallback(() => { + if (accessToken) void refreshAccess(); + }, [accessToken, refreshAccess]), + ); + + const showAlert = (alertTitle: string, message: string, onConfirm?: () => void) => { + if (Platform.OS === "web") { + alert(`${alertTitle}\n\n${message}`); + onConfirm?.(); + return; + } + Alert.alert( + alertTitle, + message, + onConfirm ? [{ text: "Cancel", style: "cancel" }, { text: "Continue", onPress: onConfirm }] : [{ text: "OK" }], + ); + }; + + const handleCheckout = async () => { + if (!accessToken) { + router.push("/login"); + return; + } + if (!planCode) { + showAlert("Subscription unavailable", "No access plan is configured for this module."); + return; + } + + setOpeningCheckout(true); + try { + const storefrontUrl = resolveStorefrontUrl(); + const query = new URLSearchParams(); + query.set("token", accessToken); + query.set("planCode", planCode); + if (couponCode.trim()) query.set("couponCode", couponCode.trim().toUpperCase()); + const apiUrl = process.env.EXPO_PUBLIC_API_URL; + if (apiUrl) query.set("apiUrl", apiUrl); + if (moduleId) query.set("moduleId", moduleId); + if (moduleCode) query.set("moduleCode", moduleCode); + + const checkoutUrl = `${storefrontUrl}?${query.toString()}`; + showAlert( + "Complete payment", + "Checkout will open in the secure web storefront. Return to AcuPedia after payment; access will refresh automatically.", + () => { void Linking.openURL(checkoutUrl); }, + ); + } catch { + showAlert("Unable to open checkout", "Please try again."); + } finally { + setOpeningCheckout(false); + } + }; + + return ( + + + router.back()} style={styles.backButton}> + + + Subscription + + + + + + + + {unlocked ? `${title} is unlocked` : `Unlock ${title}`} + + {unlocked + ? "Your current entitlement already includes this module." + : "Pricing and discounts below are calculated by the current commerce API."} + + + {(category || description) ? ( + + + + {category ? {category} : null} + {description ? {description} : null} + {planCode ? Plan: {planCode} : null} + + + ) : null} + + {!unlocked ? ( + <> + + {loadingPricing ? ( + + + Loading current pricing… + + ) : pricing ? ( + <> + {pricing.cart_items.map((item) => ( + + {item.name} + {money(item.price, pricing.currency)} + + ))} + + Subtotal{money(pricing.base_subtotal, pricing.currency)} + {pricing.total_discounts > 0 ? Discounts− {money(pricing.total_discounts, pricing.currency)} : null} + {pricing.convenience_fee > 0 ? Convenience fee{money(pricing.convenience_fee, pricing.currency)} : null} + GST{money(pricing.gst_amount, pricing.currency)} + + Total{money(pricing.grand_total, pricing.currency)} + {pricing.coupon_applied ? Coupon applied: {pricing.coupon_applied} : null} + + ) : ( + {error ?? "Pricing is unavailable."} + )} + + + + + void loadPricing(couponCode)} + disabled={loadingPricing} + > + Apply + + + + {error && pricing ? {error} : null} + + + {openingCheckout ? : ( + void handleCheckout()} + disabled={loadingPricing || !planCode} + /> + )} + + + ) : ( + + router.replace("/modules/list")} /> + + )} + + + ); +} + +const styles = StyleSheet.create({ + safeArea: { flex: 1, backgroundColor: Colors.background }, + header: { + height: 60, + flexDirection: "row", + alignItems: "center", + justifyContent: "space-between", + paddingHorizontal: moderateScale(16), + borderBottomWidth: 1, + borderBottomColor: "#ECECEC", + backgroundColor: "#FFFFFF", + }, + backButton: { padding: 4 }, + headerTitle: { fontSize: moderateScale(18), fontWeight: "700", color: Colors.textPrimary }, + placeholder: { width: 32 }, + content: { paddingHorizontal: moderateScale(24), paddingTop: verticalScale(28), paddingBottom: verticalScale(40) }, + iconContainer: { alignItems: "center", marginBottom: verticalScale(16) }, + title: { fontSize: moderateScale(24), fontWeight: "800", color: Colors.textPrimary, textAlign: "center" }, + subtitle: { fontSize: moderateScale(14), color: Colors.textSecondary, textAlign: "center", lineHeight: 20, marginTop: verticalScale(8), marginBottom: verticalScale(22) }, + infoBox: { flexDirection: "row", backgroundColor: "#EEF2FF", borderRadius: moderateScale(14), padding: moderateScale(14), marginBottom: verticalScale(18) }, + infoText: { flex: 1, marginLeft: moderateScale(10) }, + infoTitle: { fontSize: moderateScale(14), fontWeight: "700", color: Colors.textPrimary }, + infoDescription: { marginTop: 3, fontSize: moderateScale(12), color: Colors.textSecondary, lineHeight: 18 }, + planCode: { marginTop: 5, fontSize: moderateScale(11), color: Colors.primary, fontWeight: "600" }, + pricingCard: { backgroundColor: "#FFFFFF", borderRadius: moderateScale(16), borderWidth: 1, borderColor: "#E5E7EB", padding: moderateScale(16) }, + loadingRow: { flexDirection: "row", alignItems: "center", justifyContent: "center", paddingVertical: verticalScale(16) }, + loadingText: { marginLeft: moderateScale(10), color: Colors.textSecondary, fontSize: moderateScale(13) }, + priceRow: { flexDirection: "row", justifyContent: "space-between", alignItems: "center", marginVertical: verticalScale(5) }, + priceLabel: { flex: 1, fontSize: moderateScale(14), fontWeight: "700", color: Colors.textPrimary, marginRight: 10 }, + priceValue: { fontSize: moderateScale(14), fontWeight: "700", color: Colors.textPrimary }, + secondaryLabel: { fontSize: moderateScale(13), color: Colors.textSecondary }, + secondaryValue: { fontSize: moderateScale(13), color: Colors.textPrimary }, + discountLabel: { fontSize: moderateScale(13), color: "#15803D" }, + discountValue: { fontSize: moderateScale(13), color: "#15803D", fontWeight: "600" }, + totalLabel: { fontSize: moderateScale(15), fontWeight: "800", color: Colors.textPrimary }, + totalValue: { fontSize: moderateScale(18), fontWeight: "800", color: Colors.primary }, + divider: { height: 1, backgroundColor: "#ECECEC", marginVertical: verticalScale(8) }, + appliedText: { marginTop: verticalScale(8), fontSize: moderateScale(12), color: "#15803D", fontWeight: "600" }, + errorText: { fontSize: moderateScale(13), color: "#B91C1C", textAlign: "center", paddingVertical: verticalScale(14) }, + couponRow: { flexDirection: "row", marginTop: verticalScale(14) }, + couponInput: { flex: 1, minHeight: 46, backgroundColor: "#FFFFFF", borderWidth: 1, borderColor: "#D1D5DB", borderRadius: moderateScale(12), paddingHorizontal: moderateScale(12), color: Colors.textPrimary }, + applyButton: { marginLeft: moderateScale(10), minWidth: 78, minHeight: 46, alignItems: "center", justifyContent: "center", backgroundColor: "#EEF2FF", borderRadius: moderateScale(12) }, + applyText: { fontSize: moderateScale(13), fontWeight: "700", color: Colors.primary }, + inlineError: { marginTop: verticalScale(8), fontSize: moderateScale(12), color: "#B91C1C" }, + buttonContainer: { marginTop: verticalScale(24) }, +}); diff --git a/src/components/buttons/PrimaryButton.tsx b/src/components/buttons/PrimaryButton.tsx new file mode 100644 index 0000000..180f270 --- /dev/null +++ b/src/components/buttons/PrimaryButton.tsx @@ -0,0 +1,105 @@ +import React from "react"; +import { + ActivityIndicator, + Pressable, + StyleSheet, + Text, + ViewStyle, +} from "react-native"; +import { LinearGradient } from "expo-linear-gradient"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; + +import { AuthColors } from "@/features/auth/constants/colors"; + +interface PrimaryButtonProps { + title: string; + onPress: () => void; + loading?: boolean; + disabled?: boolean; + style?: ViewStyle; +} + +export default function PrimaryButton({ + title, + onPress, + loading = false, + disabled = false, + style, +}: PrimaryButtonProps) { + const isDisabled = disabled || loading; + + return ( + [ + styles.pressable, + style, + pressed && !isDisabled && styles.pressed, + isDisabled && styles.disabled, + ]} + > + + {loading ? ( + + ) : ( + + {title} + + )} + + + ); +} + +const styles = StyleSheet.create({ + pressable: { + width: "100%", + borderRadius: moderateScale(18), + overflow: "hidden", + marginTop: verticalScale(24), + }, + + gradient: { + height: verticalScale(56), + justifyContent: "center", + alignItems: "center", + }, + + title: { + color: AuthColors.white, + fontSize: moderateScale(16), + fontWeight: "700", + letterSpacing: 0.3, + }, + + pressed: { + opacity: 0.9, + transform: [{ scale: 0.98 }], + }, + + disabled: { + opacity: 0.6, + }, +}); \ No newline at end of file diff --git a/src/components/forms/BaseTextInput.tsx b/src/components/forms/BaseTextInput.tsx new file mode 100644 index 0000000..4805a96 --- /dev/null +++ b/src/components/forms/BaseTextInput.tsx @@ -0,0 +1,146 @@ +import React, { forwardRef } from "react"; +import { + StyleSheet, + Text, + TextInput, + TextInputProps, + View, +} from "react-native"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; +import { Ionicons } from "@expo/vector-icons"; + +import { AuthColors } from "@/features/auth/constants/colors"; + +interface BaseTextInputProps extends TextInputProps { + label?: string; + error?: string; + leftIcon?: keyof typeof Ionicons.glyphMap; + rightElement?: React.ReactNode; +} + +const BaseTextInput = forwardRef( + ( + { + label, + error, + leftIcon, + rightElement, + style, + ...props + }, + ref + ) => { + return ( + + {label ? ( + + {label} + + ) : null} + + + {leftIcon && ( + + )} + + + + {rightElement} + + + {error ? ( + + {error} + + ) : null} + + ); + } +); + +BaseTextInput.displayName = "BaseTextInput"; + +export default BaseTextInput; + +const styles = StyleSheet.create({ + wrapper: { + marginBottom: verticalScale(18), + }, + + label: { + fontSize: moderateScale(14), + fontWeight: "600", + color: AuthColors.textPrimary, + marginBottom: verticalScale(8), + }, + + inputContainer: { + flexDirection: "row", + alignItems: "center", + + backgroundColor: + AuthColors.inputBackground, + + borderWidth: 1, + + borderColor: AuthColors.border, + + borderRadius: moderateScale(16), + + paddingHorizontal: scale(16), + + height: verticalScale(56), + }, + + leftIcon: { + marginRight: scale(12), + }, + + input: { + flex: 1, + + fontSize: moderateScale(16), + + color: AuthColors.textPrimary, + + paddingVertical: 0, + }, + + errorBorder: { + borderColor: AuthColors.danger, + }, + + errorText: { + color: AuthColors.danger, + + fontSize: moderateScale(12), + + marginTop: verticalScale(6), + + marginLeft: scale(6), + }, +}); \ No newline at end of file diff --git a/src/components/forms/DropdownField.tsx b/src/components/forms/DropdownField.tsx new file mode 100644 index 0000000..bb90f07 --- /dev/null +++ b/src/components/forms/DropdownField.tsx @@ -0,0 +1,103 @@ +import React from "react"; +import { + Pressable, + StyleSheet, + Text, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; + +import { Colors } from "@/theme"; + +interface DropdownFieldProps { + value?: string; + placeholder?: string; + onPress?: () => void; + disabled?: boolean; +} + +export default function DropdownField({ + value, + placeholder = "Select", + onPress, + disabled = false, +}: DropdownFieldProps) { + const displayText = value?.trim() || placeholder; + const isPlaceholder = !value?.trim(); + + return ( + [ + styles.container, + pressed && !disabled && styles.pressed, + disabled && styles.disabled, + ]} + > + + + {displayText} + + + + + + ); +} + +const styles = StyleSheet.create({ + container: { + height: verticalScale(56), + backgroundColor: "#FFFFFF", + borderWidth: 1, + borderColor: "#E5E7EB", + borderRadius: moderateScale(16), + justifyContent: "center", + paddingHorizontal: scale(16), + }, + + content: { + flexDirection: "row", + alignItems: "center", + justifyContent: "space-between", + }, + + value: { + flex: 1, + marginRight: scale(12), + fontSize: moderateScale(16), + color: Colors.text, + }, + + placeholder: { + color: "#9CA3AF", + }, + + pressed: { + opacity: 0.85, + }, + + disabled: { + opacity: 0.6, + backgroundColor: "#F9FAFB", + }, +}); \ No newline at end of file diff --git a/src/components/forms/FieldLabel.tsx b/src/components/forms/FieldLabel.tsx new file mode 100644 index 0000000..79d42ae --- /dev/null +++ b/src/components/forms/FieldLabel.tsx @@ -0,0 +1,51 @@ +import React from "react"; +import { + StyleSheet, + Text, + View, +} from "react-native"; +import { + moderateScale, + verticalScale, +} from "react-native-size-matters"; + +import { Colors } from "@/theme"; + +interface FieldLabelProps { + label: string; + required?: boolean; +} + +export default function FieldLabel({ + label, + required = false, +}: FieldLabelProps) { + return ( + + + {label} + {required && ( + * + )} + + + ); +} + +const styles = StyleSheet.create({ + container: { + marginBottom: verticalScale(8), + }, + + label: { + fontSize: moderateScale(14), + fontWeight: "600", + color: Colors.text, + lineHeight: moderateScale(20), + }, + + required: { + color: "#EF4444", + fontWeight: "700", + }, +}); \ No newline at end of file diff --git a/src/components/forms/PasswordInput.tsx b/src/components/forms/PasswordInput.tsx new file mode 100644 index 0000000..991f4cb --- /dev/null +++ b/src/components/forms/PasswordInput.tsx @@ -0,0 +1,64 @@ +import React, { useState } from "react"; +import { Pressable } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale } from "react-native-size-matters"; + +import BaseTextInput from "./BaseTextInput"; +import { AuthColors } from "@/features/auth/constants/colors"; + +interface PasswordInputProps { + value: string; + onChangeText: (text: string) => void; + placeholder?: string; + error?: string; + editable?: boolean; +} + +export default function PasswordInput({ + value, + onChangeText, + placeholder = "Password", + error, + editable = true, +}: PasswordInputProps) { + const [secureTextEntry, setSecureTextEntry] = useState(true); + + return ( + + setSecureTextEntry(!secureTextEntry) + } + > + + + } + /> + ); +} \ No newline at end of file diff --git a/src/components/text/AppText.tsx b/src/components/text/AppText.tsx new file mode 100644 index 0000000..537afb4 --- /dev/null +++ b/src/components/text/AppText.tsx @@ -0,0 +1,61 @@ +import React from "react"; +import { + Text, + type StyleProp, + type TextProps, + type TextStyle, +} from "react-native"; + +import { + fonts, + Typography, + type FontWeight, + type TypographyVariant, +} from "@/theme"; + +export interface AppTextProps extends TextProps { + variant?: TypographyVariant; + weight?: FontWeight; + style?: StyleProp; +} + +export const AppText = React.forwardRef< + React.ElementRef, + AppTextProps +>( + ( + { + variant = "body", + weight, + style, + allowFontScaling = true, + maxFontSizeMultiplier = 1.4, + ...rest + }, + ref, + ) => { + const typographyStyle = Typography[variant]; + + const weightStyle: TextStyle | undefined = weight + ? { + fontFamily: fonts[weight], + } + : undefined; + + return ( + + ); + }, +); + +AppText.displayName = "AppText"; \ No newline at end of file diff --git a/src/components/text/AppTextInput.tsx b/src/components/text/AppTextInput.tsx new file mode 100644 index 0000000..4c8b747 --- /dev/null +++ b/src/components/text/AppTextInput.tsx @@ -0,0 +1,66 @@ +import React from "react"; +import { + TextInput, + type TextInputProps, + type TextStyle, + type StyleProp, + StyleSheet, +} from "react-native"; + +import { fonts } from "@/theme"; + +export interface AppTextInputProps extends TextInputProps { + style?: StyleProp; + + /** + * Controls accessibility font scaling. + * + * @default true + */ + allowFontScaling?: boolean; + + /** + * Maximum accessibility font scaling multiplier. + * + * @default 1.4 + */ + maxFontSizeMultiplier?: number; +} + +export const AppTextInput = React.forwardRef< + React.ElementRef, + AppTextInputProps +>( + ( + { + style, + allowFontScaling = true, + maxFontSizeMultiplier = 1.4, + ...rest + }, + ref, + ) => { + return ( + + ); + }, +); + +AppTextInput.displayName = "AppTextInput"; + +const styles = StyleSheet.create({ + base: { + fontFamily: fonts.regular, + fontSize: 16, + lineHeight: 22, + }, +}); \ No newline at end of file diff --git a/src/constants/modulesData.ts b/src/constants/modulesData.ts new file mode 100644 index 0000000..f33465d --- /dev/null +++ b/src/constants/modulesData.ts @@ -0,0 +1,268 @@ +export interface ModuleItem { + id: string; + code?: string; // Canonical Module Code from config.json (e.g. M0001, M0011) + title: string; + desc: string; + taxonomyId: string; + icon: string; + color: string; + category: string; + isDefaultFree: boolean; + planCode: string; +} + +export const CLINICAL_MODULES: ModuleItem[] = [ + { + id: "acupoints", + code: "M0001", + title: "Acupuncture", + desc: "All points, locations, indications & more", + taxonomyId: "6d4b0290-d44c-4d87-a9c3-89f8c8a8632c", + icon: "water-outline", + color: "#2563EB", + category: "point", + isDefaultFree: true, + planCode: "POINTS_ACU", + }, + { + id: "ear-acupuncture", + code: "M0002", + title: "Ear-acupuncture", + desc: "Ear Points & Point Category", + taxonomyId: "89136bd9-50f1-437a-ac7f-8ed36ef723b6", + icon: "ear-outline", + color: "#F59E0B", + category: "point", + isDefaultFree: false, + planCode: "POINTS_EAR", + }, + { + id: "scalp-acupuncture", + code: "M0003", + title: "Scalp acupuncture", + desc: "Scalp zones, points & protocols", + taxonomyId: "a625b5b3-b0c4-4559-87bc-397277f2765e", + icon: "accessibility-outline", + color: "#EF4444", + category: "point", + isDefaultFree: false, + planCode: "POINTS_SCALP", + }, + { + id: "points_tung", + code: "M0004", + title: "Master Tung", + desc: "Master Tung points and treatments", + taxonomyId: "64ec885d-652a-43e2-90ea-648a8884784b", + icon: "analytics-outline", + color: "#10B981", + category: "point", + isDefaultFree: false, + planCode: "POINTS_TUNG", + }, + { + id: "auriculotherapy", + code: "M0041", + title: "Microsystem", + desc: "Auriculotherapy reflexology systems", + taxonomyId: "55f6a101-9b4d-40c9-8316-6389a598e831", + icon: "body-outline", + color: "#8B5CF6", + category: "point", + isDefaultFree: false, + planCode: "THERAPEUTICS_EAR", + }, + { + id: "eight-principles", + code: "M0011", + title: "Eight principle", + desc: "Exterior/Interior, Cold/Heat, Deficiency/Excess, Yin/Yang patterns", + taxonomyId: "c75e115a-88f0-4989-a4de-29fd64d0f099", + icon: "git-network-outline", + color: "#7C3AED", + category: "Patterns", + isDefaultFree: true, + planCode: "PATTERN_CORE", + }, + { + id: "twelve-channels", + code: "M0018", + title: "zangfu", + desc: "Zangfu organ and channel identification", + taxonomyId: "e14c36ec-ca17-4f68-a34f-11e0e4baf01b", + icon: "pulse-outline", + color: "#06B6D4", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + { + id: "qi-blood-body-fluids", + code: "M0013", + title: "Qi-Blood-body fluid", + desc: "Qi, Blood, and Body Fluid identification of patterns", + taxonomyId: "6eed9ead-a685-4d24-bd02-94c45e5cd26d", + icon: "water-outline", + color: "#3B82F6", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + { + id: "pathogenic-factors", + code: "M0014", + title: "pathogenic factors", + desc: "Wind, Cold, Summer-Heat, Dampness, Dryness, Fire patterns", + taxonomyId: "ac78f54a-1f39-4c6d-bf9a-670a6267fe29", + icon: "flame-outline", + color: "#F59E0B", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + { + id: "six-stages", + code: "M0015", + title: "six stages", + desc: "Tai Yang, Yang Ming, Shao Yang, Tai Yin, Shao Yin, Jue Yin", + taxonomyId: "25aac40d-d336-4780-99b9-385c7833bd61", + icon: "layers-outline", + color: "#10B981", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + { + id: "four-levels", + code: "M0016", + title: "four level", + desc: "Wei, Qi, Ying, Xue level pattern identification", + taxonomyId: "3c54841a-68be-4bb4-bd48-436e60c2033c", + icon: "trending-up-outline", + color: "#EF4444", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + { + id: "three-burners", + code: "M0017", + title: "three burners", + desc: "Upper, Middle, and Lower Burner pattern identification", + taxonomyId: "d03c5393-8634-4993-b944-50c1d68c096e", + icon: "thermometer-outline", + color: "#EC4899", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + { + id: "five-elements", + code: "M0019", + title: "five elements", + desc: "Wood, Fire, Earth, Metal, Water relationships and patterns", + taxonomyId: "e5ef08e9-7ddf-4f6b-b96e-846e729eb89f", + icon: "flower-outline", + color: "#6366F1", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + { + id: "extra-ordinary-vessel", + code: "M0020", + title: "Extraordinary Vessels", + desc: "Eight Extraordinary Vessels and Confluent points", + taxonomyId: "9c3c8612-9c16-41ea-bf7c-65db4058d88e", + icon: "git-commit-outline", + color: "#8B5CF6", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + { + id: "food-category", + code: "M0031", + title: "Food category", + desc: "Nutritional food category classifications", + taxonomyId: "ea249c2e-5dd7-46ce-a27f-c2f5d200f03c", + icon: "nutrition-outline", + color: "#10B981", + category: "Nutrition", + isDefaultFree: true, + planCode: "NUTRITION_CORE", + }, + { + id: "food-items", + code: "M0031", + title: "food items", + desc: "Individual food item properties and indications", + taxonomyId: "e632204d-1dae-4f3c-9ce7-df25c4002b74", + icon: "leaf-outline", + color: "#059669", + category: "Nutrition", + isDefaultFree: false, + planCode: "NUTRITION_CORE", + }, + { + id: "gynecology", + code: "M0042", + title: "Gynecology", + desc: "Menstrual irregularities and pregnancy patterns", + taxonomyId: "b492d8ac-79d7-4210-9454-3438e9bf3fa1", + icon: "woman-outline", + color: "#EC4899", + category: "Therapeutics", + isDefaultFree: false, + planCode: "THERAPEUTICS_GYNAE", + }, + { + id: "neurology", + code: "M0043", + title: "Neurology", + desc: "Nervous system therapeutic protocols", + taxonomyId: "a82323eb-e055-4d2d-aaaa-6c641c67a3d5", + icon: "hardware-chip-outline", + color: "#6366F1", + category: "Therapeutics", + isDefaultFree: false, + planCode: "THERAPEUTICS_CORE", + }, + { + id: "pediatric", + code: "M0044", + title: "Pediatric", + desc: "Pediatric clinical treatments and protocols", + taxonomyId: "a5867f97-7358-4699-9bb5-ce61a74aeb30", + icon: "people-outline", + color: "#F59E0B", + category: "Therapeutics", + isDefaultFree: false, + planCode: "THERAPEUTICS_CORE", + }, + { + id: "musculo-skeletal", + code: "M0045", + title: "Musculo-skeletal", + desc: "Locomotor system treatment protocols", + taxonomyId: "8ab31d7c-c309-4682-a3be-e4a8cd13a3ea", + icon: "body-outline", + color: "#3B82F6", + category: "Therapeutics", + isDefaultFree: false, + planCode: "THERAPEUTICS_CORE", + }, + { + id: "ophthalmic", + code: "M0046", + title: "Ophthalmic", + desc: "Eye and vision therapeutic protocols", + taxonomyId: "3f4a71cf-aa99-4ac7-ac59-0c0df42f74e7", + icon: "eye-outline", + color: "#06B6D4", + category: "Therapeutics", + isDefaultFree: false, + planCode: "THERAPEUTICS_CORE", + }, +]; + diff --git a/src/features/access/api/access.api.ts b/src/features/access/api/access.api.ts new file mode 100644 index 0000000..59a82e4 --- /dev/null +++ b/src/features/access/api/access.api.ts @@ -0,0 +1,10 @@ +import apiClient from "@/api/client"; +import { API_ENDPOINTS } from "@/api/endpoints"; +import type { AccessMeResponse } from "@/store/types"; + +export async function getAccessMe(): Promise { + const response = await apiClient.get( + API_ENDPOINTS.ACCESS.ME, + ); + return response.data; +} diff --git a/src/features/access/components/ModuleAccessGate.tsx b/src/features/access/components/ModuleAccessGate.tsx new file mode 100644 index 0000000..5c9cc74 --- /dev/null +++ b/src/features/access/components/ModuleAccessGate.tsx @@ -0,0 +1,166 @@ +import React, { PropsWithChildren, useEffect, useMemo, useState } from "react"; +import { ActivityIndicator, StyleSheet, Text, TouchableOpacity, View } from "react-native"; +import { router } from "expo-router"; + +import { Colors } from "@/theme"; +import { useAuthStore } from "@/store/auth.store"; +import { useModulesQuery } from "@/features/content/hooks/use-content-queries"; +import { + normalizeModuleListResponse, + toModuleIndexItem, +} from "@/features/modules/module-index"; +import { isModuleUnlockedByAccess } from "@/features/access/module-access"; + +interface ModuleAccessGateProps extends PropsWithChildren { + moduleCode: string; +} + +export function ModuleAccessGate({ moduleCode, children }: ModuleAccessGateProps) { + const accessToken = useAuthStore((state) => state.accessToken); + const access = useAuthStore((state) => state.access); + const refreshAccess = useAuthStore((state) => state.refreshAccess); + const modulesQuery = useModulesQuery(); + const [accessChecked, setAccessChecked] = useState(false); + const [accessRefreshSucceeded, setAccessRefreshSucceeded] = useState(false); + const [accessError, setAccessError] = useState(false); + + const modules = useMemo( + () => normalizeModuleListResponse(modulesQuery.data), + [modulesQuery.data], + ); + const module = useMemo( + () => modules.find((item) => item.code === moduleCode), + [moduleCode, modules], + ); + const item = useMemo( + () => (module ? toModuleIndexItem(module) : null), + [module], + ); + + useEffect(() => { + let active = true; + + setAccessChecked(false); + setAccessRefreshSucceeded(false); + setAccessError(false); + + if (!accessToken) { + setAccessChecked(true); + return () => { + active = false; + }; + } + + void refreshAccess() + .then(() => { + if (active) setAccessRefreshSucceeded(true); + }) + .catch(() => { + if (active) setAccessError(true); + }) + .finally(() => { + if (active) setAccessChecked(true); + }); + + return () => { + active = false; + }; + }, [accessToken, refreshAccess]); + + const unlocked = Boolean( + module && isModuleUnlockedByAccess(module, access), + ); + + useEffect(() => { + if (modulesQuery.isLoading || !accessChecked) return; + + if (!accessToken) { + router.replace("/register"); + return; + } + + if (!accessRefreshSucceeded || !item || unlocked) return; + + router.replace({ + pathname: "/subscription", + params: { + moduleId: item.module.id, + moduleCode: item.module.code, + title: item.title, + category: item.category, + desc: item.description, + planCode: item.planCode, + }, + }); + }, [ + accessChecked, + accessRefreshSucceeded, + accessToken, + item, + modulesQuery.isLoading, + unlocked, + ]); + + + if (accessChecked && accessToken && accessError) { + return ( + + Unable to verify module access + Connect to the internet and try again. + router.replace("/modules")}> + Back to Modules + + + ); + } + + if ( + modulesQuery.isLoading || + !accessChecked || + !accessRefreshSucceeded || + !accessToken || + !item || + !unlocked + ) { + return ( + + + + ); + } + + return <>{children}; +} + +const styles = StyleSheet.create({ + loadingContainer: { + flex: 1, + alignItems: "center", + justifyContent: "center", + backgroundColor: Colors.background, + paddingHorizontal: 24, + }, + errorTitle: { + fontSize: 18, + fontWeight: "700", + color: Colors.textPrimary, + textAlign: "center", + }, + errorText: { + marginTop: 8, + fontSize: 14, + color: Colors.textSecondary, + textAlign: "center", + }, + retryButton: { + marginTop: 18, + paddingHorizontal: 18, + paddingVertical: 10, + borderRadius: 12, + backgroundColor: Colors.primary, + }, + retryText: { + color: "#FFFFFF", + fontWeight: "700", + }, +}); diff --git a/src/features/access/module-access.ts b/src/features/access/module-access.ts new file mode 100644 index 0000000..ee2a214 --- /dev/null +++ b/src/features/access/module-access.ts @@ -0,0 +1,21 @@ +import type { AccessMeResponse } from "@/store/types"; + +export interface ModuleAccessIdentity { + code?: string | null; + slug?: string | null; +} + +export function isModuleUnlockedByAccess( + module: ModuleAccessIdentity, + access: AccessMeResponse | null, +): boolean { + if (!access) return false; + + const code = module.code?.trim(); + const slug = module.slug?.trim(); + + if (code && access.unlocked_module_codes.includes(code)) return true; + if (slug && access.unlocked_module_slugs.includes(slug)) return true; + + return false; +} diff --git a/src/features/auth/api/auth.api.ts b/src/features/auth/api/auth.api.ts new file mode 100644 index 0000000..14862e6 --- /dev/null +++ b/src/features/auth/api/auth.api.ts @@ -0,0 +1,74 @@ +import apiClient from "@/api/client"; +import { API_ENDPOINTS } from "@/api/endpoints"; +import type { + AuthTokenResponse, + ForgotPasswordRequest, + LoginRequest, + RegisterRequest, + ResetPasswordRequest, + StatusMessageResponse, + UserIdentity, +} from "@/store/types"; + +export async function login( + payload: LoginRequest, +): Promise { + const response = await apiClient.post( + API_ENDPOINTS.AUTH.LOGIN, + payload, + ); + return response.data; +} + +export async function register( + payload: RegisterRequest, +): Promise { + const response = await apiClient.post( + API_ENDPOINTS.AUTH.REGISTER, + payload, + ); + return response.data; +} + +export async function getMe(): Promise { + const response = await apiClient.get( + API_ENDPOINTS.AUTH.ME, + ); + return response.data; +} + +export async function forgotPassword( + payload: ForgotPasswordRequest, +): Promise { + const response = await apiClient.post( + API_ENDPOINTS.AUTH.FORGOT_PASSWORD, + payload, + ); + return response.data; +} + +export async function resetPassword( + payload: ResetPasswordRequest, +): Promise { + const response = await apiClient.post( + API_ENDPOINTS.AUTH.RESET_PASSWORD, + payload, + ); + return response.data; +} + +export interface ProfileUpdatePayload { + full_name?: string | null; + email?: string | null; + phone_number?: string | null; +} + +export async function updateProfile( + payload: ProfileUpdatePayload, +): Promise<{ status: string; message: string; user: AuthTokenResponse["user"] }> { + const response = await apiClient.put<{ status: string; message: string; user: AuthTokenResponse["user"] }>( + API_ENDPOINTS.AUTH.PROFILE, + payload, + ); + return response.data; +} diff --git a/src/features/auth/components/LoginFooter.tsx b/src/features/auth/components/LoginFooter.tsx new file mode 100644 index 0000000..8a2d3f5 --- /dev/null +++ b/src/features/auth/components/LoginFooter.tsx @@ -0,0 +1,61 @@ +import React from "react"; +import { + Pressable, + StyleSheet, + Text, + View, +} from "react-native"; +import { + moderateScale, + verticalScale, +} from "react-native-size-matters"; + +import { AuthColors } from "../constants/colors"; + +interface LoginFooterProps { + onSignUpPress?: () => void; +} + +export default function LoginFooter({ + onSignUpPress, +}: LoginFooterProps) { + return ( + + + Don't have an account? + + + + + Sign Up + + + + ); +} + +const styles = StyleSheet.create({ + container: { + marginTop: verticalScale(36), + flexDirection: "row", + justifyContent: "center", + alignItems: "center", + }, + + text: { + fontSize: moderateScale(14), + color: AuthColors.textSecondary, + }, + + signUp: { + marginLeft: moderateScale(6), + fontSize: moderateScale(14), + fontWeight: "700", + color: AuthColors.primary, + }, +}); \ No newline at end of file diff --git a/src/features/auth/components/LoginForm.tsx b/src/features/auth/components/LoginForm.tsx new file mode 100644 index 0000000..0dd5575 --- /dev/null +++ b/src/features/auth/components/LoginForm.tsx @@ -0,0 +1,178 @@ +import React, { useState } from "react"; +import { + Alert, + Pressable, + StyleSheet, + Text, + View, +} from "react-native"; +import { useRouter } from "expo-router"; +import { + moderateScale, + verticalScale, +} from "react-native-size-matters"; + +import BaseTextInput from "@/components/forms/BaseTextInput"; +import PasswordInput from "@/components/forms/PasswordInput"; +import PrimaryButton from "@/components/buttons/PrimaryButton"; + +import { AuthColors } from "../constants/colors"; +import { useAuthStore } from "@/store/auth.store"; +import { LoginMethod } from "./LoginTabs"; +import { login } from "@/features/auth/api/auth.api"; + +interface LoginFormProps { + activeTab: LoginMethod; +} + +export default function LoginForm({ + activeTab, +}: LoginFormProps) { + const router = useRouter(); + const establishSession = useAuthStore((state) => state.establishSession); + + const [email, setEmail] = useState(""); + const [phone, setPhone] = useState(""); + const [password, setPassword] = useState(""); + + const [emailError, setEmailError] = useState(""); + const [phoneError, setPhoneError] = useState(""); + const [passwordError, setPasswordError] = useState(""); + + const handlePhoneChange = (text: string) => { + const digits = text.replace(/\D/g, ""); + setPhone(digits.slice(0, 10)); + }; + + const handleLogin = async () => { + let hasError = false; + setEmailError(""); + setPhoneError(""); + setPasswordError(""); + + if (activeTab === "email") { + if (!email.trim()) { + setEmailError("Email is required"); + hasError = true; + } else if (!/\S+@\S+\.\S+/.test(email)) { + setEmailError("Please enter a valid email address"); + hasError = true; + } + } else { + if (!phone.trim()) { + setPhoneError("Phone number is required"); + hasError = true; + } else if (phone.length < 10) { + setPhoneError("Phone number must be 10 digits"); + hasError = true; + } + } + + if (!password) { + setPasswordError("Password is required"); + hasError = true; + } + + if (hasError) return; + + try { + // Prepare login payload + const payload: any = { password }; + if (activeTab === "email") { + payload.email = email.trim().toLowerCase(); + } else { + payload.phone_number = phone.trim(); + } + + const response = await login(payload); + await establishSession(response); + + // Navigate to Home only after the token is installed and initial + // identity/access refresh has been attempted. + router.replace("/"); + } catch (err: any) { + let errMsg = "Invalid credentials. Please try again."; + const detail = err.response?.data?.detail; + if (typeof detail === "string") { + errMsg = detail; + } else if (Array.isArray(detail) && detail.length > 0) { + errMsg = detail[0].msg || JSON.stringify(detail[0]); + } else if (err.message) { + errMsg = err.message; + } + alert("Login Failed: " + errMsg); + } + }; + + return ( + + {activeTab === "email" ? ( + + ) : ( + + )} + + + + { + router.push("/login/forgot-password"); + }} + > + + Forgot Password? + + + + + + ); +} + +const styles = StyleSheet.create({ + container: { + marginTop: verticalScale(10), + }, + + forgotButton: { + alignSelf: "flex-end", + marginTop: verticalScale(4), + marginBottom: verticalScale(20), + }, + + forgotText: { + fontSize: moderateScale(14), + fontWeight: "600", + color: AuthColors.primary, + }, +}); \ No newline at end of file diff --git a/src/features/auth/components/LoginHeader.tsx b/src/features/auth/components/LoginHeader.tsx new file mode 100644 index 0000000..f8f92bd --- /dev/null +++ b/src/features/auth/components/LoginHeader.tsx @@ -0,0 +1,69 @@ +import React from "react"; +import { Pressable, StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { useRouter } from "expo-router"; + +import { AuthColors } from "../constants/colors"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; +export default function LoginHeader() { + const router = useRouter(); + + return ( + + router.back()} + style={styles.backButton} + > + + + + + Welcome Back! + + + Login to continue + + + + ); +} + +const styles = StyleSheet.create({ + container: { + marginTop: verticalScale(8), + marginBottom: verticalScale(32), + }, + + backButton: { + width: scale(40), + height: scale(40), + justifyContent: "center", + marginBottom: verticalScale(28), + }, + + textContainer: { + gap: moderateScale(8), + }, + + title: { + fontSize: moderateScale(32), + fontWeight: "700", + color: AuthColors.textPrimary, + }, + + subtitle: { + fontSize: 16, + color: AuthColors.textSecondary, + fontWeight: "500", + }, +}); \ No newline at end of file diff --git a/src/features/auth/components/LoginTabs.tsx b/src/features/auth/components/LoginTabs.tsx new file mode 100644 index 0000000..2a2d192 --- /dev/null +++ b/src/features/auth/components/LoginTabs.tsx @@ -0,0 +1,107 @@ +import React from "react"; +import { + Pressable, + StyleSheet, + Text, + View, +} from "react-native"; +import { + moderateScale, + verticalScale, +} from "react-native-size-matters"; + +import { AuthColors } from "../constants/colors"; + +export type LoginMethod = "email" | "phone"; + +interface LoginTabsProps { + activeTab: LoginMethod; + onTabChange: (tab: LoginMethod) => void; +} + +export default function LoginTabs({ + activeTab, + onTabChange, +}: LoginTabsProps) { + return ( + + onTabChange("email")} + > + + Email + + + {activeTab === "email" && ( + + )} + + + onTabChange("phone")} + > + + Phone + + + {activeTab === "phone" && ( + + )} + + + ); +} + +const styles = StyleSheet.create({ + container: { + flexDirection: "row", + marginBottom: verticalScale(30), + borderBottomWidth: 1, + borderBottomColor: "#ECECEC", + }, + + tab: { + flex: 1, + alignItems: "center", + justifyContent: "center", + paddingBottom: verticalScale(12), + position: "relative", + }, + + text: { + fontSize: moderateScale(16), + fontWeight: "500", + color: AuthColors.textSecondary, + }, + + activeText: { + color: AuthColors.primary, + fontWeight: "700", + }, + + indicator: { + position: "absolute", + left: 0, + right: 0, + bottom: -1, + height: verticalScale(3), + borderRadius: moderateScale(2), + backgroundColor: AuthColors.primary, + }, +}); \ No newline at end of file diff --git a/src/features/auth/components/SignUpFooter.tsx b/src/features/auth/components/SignUpFooter.tsx new file mode 100644 index 0000000..98d868e --- /dev/null +++ b/src/features/auth/components/SignUpFooter.tsx @@ -0,0 +1,61 @@ +import React from "react"; +import { + Pressable, + StyleSheet, + Text, + View, +} from "react-native"; +import { + moderateScale, + verticalScale, +} from "react-native-size-matters"; + +import { AuthColors } from "../constants/colors"; + +interface SignUpFooterProps { + onLogInPress?: () => void; +} + +export default function SignUpFooter({ + onLogInPress, +}: SignUpFooterProps) { + return ( + + + Already have an account? + + + + + Log In + + + + ); +} + +const styles = StyleSheet.create({ + container: { + marginTop: verticalScale(28), + flexDirection: "row", + justifyContent: "center", + alignItems: "center", + }, + + text: { + fontSize: moderateScale(14), + color: AuthColors.textSecondary, + }, + + logIn: { + marginLeft: moderateScale(6), + fontSize: moderateScale(14), + fontWeight: "700", + color: AuthColors.primary, + }, +}); diff --git a/src/features/auth/components/SignUpForm.tsx b/src/features/auth/components/SignUpForm.tsx new file mode 100644 index 0000000..406b04f --- /dev/null +++ b/src/features/auth/components/SignUpForm.tsx @@ -0,0 +1,185 @@ +import React, { useState } from "react"; +import { Alert, StyleSheet, View } from "react-native"; +import { useRouter } from "expo-router"; +import { verticalScale } from "react-native-size-matters"; + +import BaseTextInput from "@/components/forms/BaseTextInput"; +import PasswordInput from "@/components/forms/PasswordInput"; +import PrimaryButton from "@/components/buttons/PrimaryButton"; + +import { useAuthStore } from "@/store/auth.store"; +import { register } from "@/features/auth/api/auth.api"; + +export default function SignUpForm() { + const router = useRouter(); + const setRegisteredUser = useAuthStore((state) => state.setRegisteredUser); + + const [fullName, setFullName] = useState(""); + const [email, setEmail] = useState(""); + const [phone, setPhone] = useState(""); + const [password, setPassword] = useState(""); + const [confirmPassword, setConfirmPassword] = useState(""); + + const [fullNameError, setFullNameError] = useState(""); + const [emailError, setEmailError] = useState(""); + const [phoneError, setPhoneError] = useState(""); + const [passwordError, setPasswordError] = useState(""); + const [confirmPasswordError, setConfirmPasswordError] = useState(""); + + const handlePhoneChange = (text: string) => { + const digits = text.replace(/\D/g, ""); + setPhone(digits.slice(0, 10)); + }; + + const handleSignUp = async () => { + let hasError = false; + setFullNameError(""); + setEmailError(""); + setPhoneError(""); + setPasswordError(""); + setConfirmPasswordError(""); + + if (!fullName.trim()) { + setFullNameError("Full name is required"); + hasError = true; + } + + if (!email.trim()) { + setEmailError("Email is required"); + hasError = true; + } else if (!/\S+@\S+\.\S+/.test(email)) { + setEmailError("Please enter a valid email address"); + hasError = true; + } + + if (phone.trim() && phone.length < 10) { + setPhoneError("Phone number must be 10 digits"); + hasError = true; + } + + if (!password) { + setPasswordError("Password is required"); + hasError = true; + } else if (password.length < 8) { + setPasswordError("Password must be at least 8 characters"); + hasError = true; + } else if (!/[A-Z]/.test(password)) { + setPasswordError("Password must contain at least one uppercase letter (A-Z)"); + hasError = true; + } else if (!/[0-9]/.test(password)) { + setPasswordError("Password must contain at least one number (0-9)"); + hasError = true; + } else if (!/[^A-Za-z0-9]/.test(password)) { + setPasswordError("Password must contain at least one special character (!@#$)"); + hasError = true; + } + + if (!confirmPassword) { + setConfirmPasswordError("Please confirm your password"); + hasError = true; + } else if (password !== confirmPassword) { + setConfirmPasswordError("Passwords do not match"); + hasError = true; + } + + if (hasError) return; + + try { + const response = await register({ + email: email.trim().toLowerCase(), + password, + full_name: fullName.trim(), + phone_number: phone.trim() ? phone.trim() : undefined, + }); + + const { user } = response; + + setRegisteredUser({ + id: user.id, + name: user.display_name, + email: user.email, + }); + + // Redirect directly to login screen without alert block + router.replace("/login"); + } catch (err: any) { + let errMsg = "Something went wrong. Please try again."; + const detail = err.response?.data?.detail; + if (typeof detail === "string") { + errMsg = detail; + } else if (Array.isArray(detail) && detail.length > 0) { + errMsg = detail[0].msg || JSON.stringify(detail[0]); + } + alert("Registration Failed: " + errMsg); + } + }; + + return ( + + + + + + + + + + + + + + + + ); +} + +const styles = StyleSheet.create({ + container: { + marginTop: verticalScale(10), + }, + buttonSpacing: { + marginTop: verticalScale(10), + }, +}); diff --git a/src/features/auth/components/SignUpHeader.tsx b/src/features/auth/components/SignUpHeader.tsx new file mode 100644 index 0000000..add42c2 --- /dev/null +++ b/src/features/auth/components/SignUpHeader.tsx @@ -0,0 +1,70 @@ +import React from "react"; +import { Pressable, StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { useRouter } from "expo-router"; + +import { AuthColors } from "../constants/colors"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; + +export default function SignUpHeader() { + const router = useRouter(); + + return ( + + router.back()} + style={styles.backButton} + > + + + + + Create Account + + + Sign up to get started + + + + ); +} + +const styles = StyleSheet.create({ + container: { + marginTop: verticalScale(8), + marginBottom: verticalScale(24), + }, + + backButton: { + width: scale(40), + height: scale(40), + justifyContent: "center", + marginBottom: verticalScale(20), + }, + + textContainer: { + gap: moderateScale(8), + }, + + title: { + fontSize: moderateScale(32), + fontWeight: "700", + color: AuthColors.textPrimary, + }, + + subtitle: { + fontSize: 16, + color: AuthColors.textSecondary, + fontWeight: "500", + }, +}); diff --git a/src/features/auth/components/SocialButton.tsx b/src/features/auth/components/SocialButton.tsx new file mode 100644 index 0000000..f710085 --- /dev/null +++ b/src/features/auth/components/SocialButton.tsx @@ -0,0 +1,64 @@ +import React from "react"; +import { + Pressable, + StyleSheet, + View, +} from "react-native"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; + +interface SocialButtonProps { + icon: React.ReactNode; + onPress?: () => void; +} + +export default function SocialButton({ + icon, + onPress, +}: SocialButtonProps) { + return ( + [ + styles.container, + pressed && styles.pressed, + ]} + onPress={onPress} + > + + {icon} + + + ); +} + +const styles = StyleSheet.create({ + container: { + width: scale(58), + height: scale(58), + borderRadius: moderateScale(29), + + backgroundColor: "#FFFFFF", + + justifyContent: "center", + alignItems: "center", + + borderWidth: 1, + borderColor: "#ECECEC", + + marginHorizontal: scale(8), + }, + + iconContainer: { + justifyContent: "center", + alignItems: "center", + }, + + pressed: { + opacity: 0.8, + transform: [{ scale: 0.96 }], + }, +}); \ No newline at end of file diff --git a/src/features/auth/components/SocialLogin.tsx b/src/features/auth/components/SocialLogin.tsx new file mode 100644 index 0000000..8358fee --- /dev/null +++ b/src/features/auth/components/SocialLogin.tsx @@ -0,0 +1,102 @@ +import React from "react"; +import { + StyleSheet, + Text, + View, +} from "react-native"; + +import { + moderateScale, + verticalScale, +} from "react-native-size-matters"; + +import { + Ionicons, + FontAwesome, +} from "@expo/vector-icons"; + +import SocialButton from "./SocialButton"; +import { AuthColors } from "../constants/colors"; + +export default function SocialLogin() { + return null; + // return ( + // + // + // + // + // + // or continue with + // + // + // + // + // + // + // + // } + // /> + // + // + // } + // /> + // + // + // } + // /> + // + // + // ); +} + +const styles = StyleSheet.create({ + container: { + marginTop: verticalScale(34), + }, + + dividerRow: { + flexDirection: "row", + alignItems: "center", + }, + + line: { + flex: 1, + height: 1, + backgroundColor: "#ECECEC", + }, + + text: { + marginHorizontal: moderateScale(12), + + fontSize: moderateScale(14), + + color: AuthColors.textSecondary, + }, + + iconsRow: { + marginTop: verticalScale(24), + + flexDirection: "row", + + justifyContent: "center", + alignItems: "center", + }, +}); \ No newline at end of file diff --git a/src/features/auth/constants/colors.ts b/src/features/auth/constants/colors.ts new file mode 100644 index 0000000..71769bb --- /dev/null +++ b/src/features/auth/constants/colors.ts @@ -0,0 +1,22 @@ +export const AuthColors = { + primary: "#4F46E5", + primaryDark: "#4338CA", + primaryLight: "#EEF2FF", + + background: "#FFFFFF", + + textPrimary: "#171717", + textSecondary: "#6B7280", + + border: "#E5E7EB", + + inputBackground: "#FFFFFF", + + divider: "#E5E7EB", + + disabled: "#C7C7C7", + + white: "#FFFFFF", + + danger: "#EF4444", +} as const; \ No newline at end of file diff --git a/src/features/commerce/api/commerce.api.ts b/src/features/commerce/api/commerce.api.ts new file mode 100644 index 0000000..3b26137 --- /dev/null +++ b/src/features/commerce/api/commerce.api.ts @@ -0,0 +1,56 @@ +import apiClient from "@/api/client"; +import { API_ENDPOINTS } from "@/api/endpoints"; +import type { + CartCalculationRequest, + CartCalculationResponse, + CheckoutOrderRequest, + CheckoutOrderResponse, + CheckoutVerifyRequest, + CheckoutVerifyResponse, +} from "../types/commerce.types"; + +export async function calculateCart( + payload: CartCalculationRequest, +): Promise { + const response = await apiClient.post( + API_ENDPOINTS.CART.CALCULATE, + payload, + ); + return response.data; +} + +export async function getCheckoutConfig(): Promise<{ razorpay_key_id: string }> { + const response = await apiClient.get<{ razorpay_key_id: string }>( + API_ENDPOINTS.CHECKOUT.CONFIG, + ); + return response.data; +} + +export async function createCheckoutOrder( + payload: CheckoutOrderRequest, +): Promise { + const response = await apiClient.post( + API_ENDPOINTS.CHECKOUT.CREATE_ORDER, + payload, + ); + return response.data; +} + +export async function verifyCheckoutPayment( + payload: CheckoutVerifyRequest, +): Promise { + const response = await apiClient.post( + API_ENDPOINTS.CHECKOUT.VERIFY, + payload, + ); + return response.data; +} + +export async function getInvoiceUrl( + paymentId: string, +): Promise<{ short_url: string }> { + const response = await apiClient.get<{ short_url: string }>( + API_ENDPOINTS.CHECKOUT.INVOICE(paymentId), + ); + return response.data; +} diff --git a/src/features/commerce/index.ts b/src/features/commerce/index.ts new file mode 100644 index 0000000..f154170 --- /dev/null +++ b/src/features/commerce/index.ts @@ -0,0 +1,2 @@ +export * from "./api/commerce.api"; +export * from "./types/commerce.types"; diff --git a/src/features/commerce/types/commerce.types.ts b/src/features/commerce/types/commerce.types.ts new file mode 100644 index 0000000..ed7a9b9 --- /dev/null +++ b/src/features/commerce/types/commerce.types.ts @@ -0,0 +1,66 @@ +export interface CartCalculationRequest { + cart_item_codes: string[]; + owned_category_names?: string[]; + coupon_code?: string | null; + currency?: string; + is_first_purchase?: boolean; +} + +export interface CartItemResponse { + code: string; + name: string; + category: string; + price: number; +} + +export interface CartCalculationResponse { + currency: string; + base_subtotal: number; + discount_policy: string; + bundle_discount_amount: number; + coupon_applied: string; + coupon_discount_amount: number; + total_discounts: number; + convenience_fee_rate: number; + convenience_fee: number; + taxable_amount: number; + gst_amount: number; + grand_total: number; + cart_items: CartItemResponse[]; +} + +export interface CheckoutOrderRequest { + cart_item_codes: string[]; + coupon_code?: string | null; + currency?: string; +} + +export interface CheckoutOrderResponse { + razorpay_order_id: string; + amount: number; + currency: string; + receipt: string; + base_subtotal: number; + total_discounts: number; + convenience_fee: number; + convenience_fee_rate: number; + taxable_amount: number; + gst_amount: number; + grand_total: number; +} + +export interface CheckoutVerifyRequest { + razorpay_order_id: string; + razorpay_payment_id: string; + razorpay_signature: string; + billing_profile_id?: string | null; + currency?: string; +} + +export interface CheckoutVerifyResponse { + status: string; + message: string; + razorpay_payment_id: string; + invoice_number?: string | null; + invoice_url?: string | null; +} diff --git a/src/features/content/CollectionTemplateScreen.tsx b/src/features/content/CollectionTemplateScreen.tsx new file mode 100644 index 0000000..4f17ee9 --- /dev/null +++ b/src/features/content/CollectionTemplateScreen.tsx @@ -0,0 +1,102 @@ +import React, { useEffect, useMemo, useState } from "react"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { StyleSheet, Text, View } from "react-native"; +import { moderateScale, verticalScale } from "react-native-size-matters"; + +import { Colors } from "@/theme"; +import { ContentPageHeader } from "../components/layout/ContentPageHeader"; +import { ContractSortModal } from "../components/search/ContractSortModal"; +import { SearchAttributeModal } from "../components/search/SearchAttributeModal"; +import { FilterSummary } from "../components/search/FilterSummary"; +import { SearchHeader } from "../components/search/SearchHeader"; +import { ModuleFilterBuilderModal } from "../components/search/ModuleFilterBuilderModal"; +import { ModuleFilterChips } from "../components/search/ModuleFilterChips"; +import { ModuleSearchResults } from "../components/search/ModuleSearchResults"; +import { ScreenError } from "../components/ContentScreenState"; +import { useContentSearchInfiniteQuery } from "../hooks/use-content-search-infinite-query"; +import { useModuleContentSearchInfiniteQuery } from "../hooks/use-module-content-search-infinite-query"; +import { useModuleSearchContractQuery } from "../hooks/use-module-search-contract-query"; +import { useTemplateSearchController } from "../hooks/use-template-search-controller"; +import { useDebouncedValue } from "../hooks/use-debounced-value"; +import { resolveCollectionItemRenderer, resolveCollectionRenderer } from "../renderers/registry"; +import type { LogicalOperator, ModuleSearchContentItem, SearchContentItem, SearchCriterion, SortCriterion, TemplateContractResponse } from "../types/presentation.types"; + +export interface CollectionTemplateScreenProps { + moduleCode: string; + moduleName: string; + templateCode: string; + contract: TemplateContractResponse; + onItemPress: (item: SearchContentItem) => void; + onModuleSearchItemPress: (item: ModuleSearchContentItem) => void; + onOpenSort?: () => void; +} + +export function CollectionTemplateScreen({ moduleCode, moduleName, templateCode, contract, onItemPress, onModuleSearchItemPress, onOpenSort }: CollectionTemplateScreenProps) { + const [filterBuilderVisible, setFilterBuilderVisible] = useState(false); + const [sortVisible, setSortVisible] = useState(false); + const [searchAttributesVisible, setSearchAttributesVisible] = useState(false); + const [moduleQuery, setModuleQuery] = useState(""); + const debouncedModuleQuery = useDebouncedValue(moduleQuery.trim(), 350); + const [moduleLogic, setModuleLogic] = useState("and"); + const [moduleFilters, setModuleFilters] = useState([]); + const [moduleSearchAttributes, setModuleSearchAttributes] = useState([]); + const [moduleSort, setModuleSort] = useState([]); + + const moduleContractQuery = useModuleSearchContractQuery(moduleCode); + const moduleContract = moduleContractQuery.data; + + useEffect(() => { + if (!moduleContract) return; + setModuleSort((current) => + current.length > 0 ? current : moduleContract.default_sort, + ); + }, [moduleContract]); + const searchableFields = useMemo(() => (moduleContract?.fields ?? []).filter((field) => field.is_searchable).map((field) => ({ attribute_key: field.attribute_key, label: `${field.label} · ${field.template_name}` })), [moduleContract?.fields]); + const filterableFields = useMemo(() => (moduleContract?.fields ?? []).filter((field) => field.is_filterable), [moduleContract?.fields]); + const moduleSearchActive = Boolean(debouncedModuleQuery) || moduleFilters.length > 0; + + const templateSearch = useTemplateSearchController({ moduleCode, templateCode, contract }); + const templateQuery = useContentSearchInfiniteQuery({ module_code: moduleCode, template_code: templateCode, logic: contract.search.default_logic, filters: [], sort: templateSearch.sort, page_size: 25 }, { enabled: !moduleSearchActive }); + const moduleQueryResult = useModuleContentSearchInfiniteQuery({ module_code: moduleCode, query: debouncedModuleQuery || undefined, search_attributes: moduleSearchAttributes.length ? moduleSearchAttributes : undefined, logic: moduleLogic, filters: moduleFilters, sort: moduleSort, page_size: 25 }, { enabled: moduleSearchActive }); + + const templateMerged = useMemo(() => { const pages = templateQuery.data?.pages ?? []; return { total: pages[0]?.total ?? 0, items: pages.flatMap((page) => page.items) }; }, [templateQuery.data]); + const moduleMerged = useMemo(() => { const pages = moduleQueryResult.data?.pages ?? []; return { total: pages[0]?.total ?? 0, items: pages.flatMap((page) => page.items) }; }, [moduleQueryResult.data]); + + const rendererResolution = useMemo(() => { + try { + const collectionCode = contract.presentation.renderers.collection; + const itemCode = contract.presentation.renderers.collection_item; + if (!collectionCode || !itemCode) throw new Error("This content collection is missing its renderer configuration."); + return { CollectionRenderer: resolveCollectionRenderer(collectionCode), ItemRenderer: resolveCollectionItemRenderer(itemCode), error: null as Error | null }; + } catch (error) { + return { CollectionRenderer: null, ItemRenderer: null, error: error instanceof Error ? error : new Error("Renderer resolution failed.") }; + } + }, [contract.presentation.renderers.collection, contract.presentation.renderers.collection_item]); + + if (rendererResolution.error || !rendererResolution.CollectionRenderer || !rendererResolution.ItemRenderer) return ; + if (moduleContractQuery.isError) return void moduleContractQuery.refetch()} />; + if (moduleSearchActive && moduleQueryResult.isError) return void moduleQueryResult.refetch()} />; + if (!moduleSearchActive && templateQuery.isError) return void templateQuery.refetch()} />; + + const CollectionRenderer = rendererResolution.CollectionRenderer; + const ItemRenderer = rendererResolution.ItemRenderer; + const hasFilters = filterableFields.length > 0; + const hasSearchAttributes = searchableFields.length > 0; + const hasSort = contract.search.sort_fields.length > 0; + + return + + + setFilterBuilderVisible(true)} onSearchAttributes={() => setSearchAttributesVisible(true)} onSort={() => { if (onOpenSort) onOpenSort(); else setSortVisible(true); }} /> + setModuleFilters((current) => current.filter((_, itemIndex) => itemIndex !== index))} onClear={() => setModuleFilters([])} /> + {moduleQuery !== debouncedModuleQuery ? Searching… : null} + + {moduleSearchActive ? void moduleQueryResult.refetch()} onLoadMore={() => { if (moduleQueryResult.hasNextPage && !moduleQueryResult.isFetchingNextPage) void moduleQueryResult.fetchNextPage(); }} onItemPress={onModuleSearchItemPress} /> : void templateQuery.refetch()} onLoadMore={() => { if (templateQuery.hasNextPage && !templateQuery.isFetchingNextPage) void templateQuery.fetchNextPage(); }} onItemPress={onItemPress} renderItem={({item,onPress}) => } />} + + {hasFilters ? setFilterBuilderVisible(false)} onAdd={(criterion) => setModuleFilters((current) => [...current, criterion])} /> : null} + {hasSearchAttributes ? setSearchAttributesVisible(false)} onApply={setModuleSearchAttributes} /> : null} + {hasSort && !onOpenSort ? setSortVisible(false)} onApply={moduleSearchActive ? setModuleSort : templateSearch.setSort} /> : null} + ; +} + +const styles=StyleSheet.create({safeArea:{flex:1,backgroundColor:Colors.surface},searchingRow:{paddingHorizontal:moderateScale(24),paddingBottom:verticalScale(6)},searchingText:{fontSize:moderateScale(12),color:Colors.textSecondary},collectionContainer:{flex:1}}); diff --git a/src/features/content/TemplateScreen.tsx b/src/features/content/TemplateScreen.tsx new file mode 100644 index 0000000..aca3dc1 --- /dev/null +++ b/src/features/content/TemplateScreen.tsx @@ -0,0 +1,154 @@ +import React from "react"; +import { useRouter } from "expo-router"; +import { ScreenError, ScreenLoading } from "../components/ContentScreenState"; +import { useTemplateContractQuery } from "../hooks/use-template-contract-query"; +import { useModuleDisplayName } from "../hooks/use-module-display-name"; +import type { ModuleSearchContentItem, SearchContentItem, TemplateContractResponse } from "../types/presentation.types"; +import { buildContentReferenceRoute, getSingleNavigableContentReference } from "../utils/content-reference"; +import { CollectionTemplateScreen } from "./CollectionTemplateScreen"; +import { SingleTemplateScreen } from "./SingleTemplateScreen"; + +export interface TemplateScreenProps { + moduleCode: string; + templateCode: string; + onContentPress?: (contentId: string) => void; + onOpenFilters?: () => void; + onOpenSort?: () => void; +} + +function normalized(value: string): string { + return value.trim(); +} + +function buildItemTarget( + moduleCode: string, + templateCode: string, + contract: TemplateContractResponse, + item: SearchContentItem, +): string { + // Data-level hydrated content references are authoritative for the selected + // content row when exactly one valid target exists. Multiple row links are + // intentionally not guessed; semantic renderers should expose them explicitly. + const rowReference = getSingleNavigableContentReference(item.attributes.link); + if (rowReference) { + return buildContentReferenceRoute(rowReference); + } + + const itemLink = contract.presentation.item_link; + const targetTemplate = itemLink?.target_template_code?.trim() || templateCode; + + if (itemLink?.action === "template") { + return `/modules/${encodeURIComponent(moduleCode)}/${encodeURIComponent(targetTemplate)}`; + } + + const configuredContentIdKey = itemLink?.target_content_id_attribute?.trim(); + const configuredContentId = configuredContentIdKey + ? item.attributes[configuredContentIdKey] + : undefined; + const targetContentId = + typeof configuredContentId === "string" && configuredContentId.trim() + ? configuredContentId.trim() + : item.id; + + return `/modules/${encodeURIComponent(moduleCode)}/${encodeURIComponent(targetTemplate)}/${encodeURIComponent(targetContentId)}`; +} + +export function TemplateScreen({ + moduleCode, + templateCode, + onContentPress, + onOpenFilters, + onOpenSort, +}: TemplateScreenProps) { + const router = useRouter(); + const module = normalized(moduleCode); + const template = normalized(templateCode); + + if (!module || !template) { + return ; + } + + return ( + router.push(target as never)} + /> + ); +} + +function TemplateScreenResolved({ + moduleCode, + templateCode, + onContentPress, + onOpenFilters, + onOpenSort, + navigate, +}: TemplateScreenProps & { navigate: (target: string) => void }) { + const contractQuery = useTemplateContractQuery(templateCode); + const moduleDisplay = useModuleDisplayName(moduleCode); + + if (contractQuery.isLoading) return ; + + if (contractQuery.isError) { + return ( + void contractQuery.refetch()} + /> + ); + } + + const contract = contractQuery.data; + if (!contract) return ; + + if (contract.template_code !== templateCode) { + return ; + } + + if (contract.module_code && contract.module_code !== moduleCode) { + return ; + } + + if (contract.presentation.mode === "single") { + return ; + } + + if (contract.presentation.mode === "collection") { + return ( + { + navigate(`/modules/${encodeURIComponent(moduleCode)}/${encodeURIComponent(item.template_code)}/${encodeURIComponent(item.id)}`); + }} + onItemPress={(item) => { + const rowReference = getSingleNavigableContentReference(item.attributes.link); + + // A hydrated data-level reference is more specific than the optional + // legacy callback because it identifies the actual destination content. + if (rowReference) { + navigate(buildContentReferenceRoute(rowReference)); + return; + } + + if (onContentPress && !contract.presentation.item_link) { + onContentPress(item.id); + return; + } + + navigate(buildItemTarget(moduleCode, templateCode, contract, item)); + }} + onOpenSort={onOpenSort} + /> + ); + } + + return ; +} diff --git a/src/features/content/api/content-presentation.api.ts b/src/features/content/api/content-presentation.api.ts new file mode 100644 index 0000000..9a1e417 --- /dev/null +++ b/src/features/content/api/content-presentation.api.ts @@ -0,0 +1,26 @@ +import type { AxiosInstance } from "axios"; +import { request } from "@/api/http-client"; +import type { + ContentSearchRequest, + ContentSearchResponse, + TemplateContractResponse, +} from "../types/presentation.types"; + +export class ContentPresentationApi { + constructor(private readonly client: AxiosInstance) {} + + getTemplateContract(templateCode: string): Promise { + return request(this.client, { + method: "GET", + url: `/contents/templates/${encodeURIComponent(templateCode)}/contract`, + }); + } + + searchContents(payload: ContentSearchRequest): Promise { + return request(this.client, { + method: "POST", + url: "/contents/search", + data: payload, + }); + } +} diff --git a/src/features/content/api/content-presentation.client.ts b/src/features/content/api/content-presentation.client.ts new file mode 100644 index 0000000..c8a6bbd --- /dev/null +++ b/src/features/content/api/content-presentation.client.ts @@ -0,0 +1,4 @@ +import apiClient from "@/api/client"; +import { ContentPresentationApi } from "./content-presentation.api"; + +export const contentPresentationApi = new ContentPresentationApi(apiClient); diff --git a/src/features/content/api/content-presentation.query-keys.ts b/src/features/content/api/content-presentation.query-keys.ts new file mode 100644 index 0000000..8af840b --- /dev/null +++ b/src/features/content/api/content-presentation.query-keys.ts @@ -0,0 +1,42 @@ +import type { + ContentSearchRequest, + SearchCriterion, + SortCriterion, +} from "../types/presentation.types"; + +function normalizeFilters(filters: SearchCriterion[]) { + return filters.map((item) => ({ + attribute_key: item.attribute_key, + operator: item.operator, + value: item.value, + })); +} + +function normalizeSort(sort: SortCriterion[]) { + return sort.map((item) => ({ + field: item.field, + direction: item.direction, + })); +} + +export const contentPresentationQueryKeys = { + root: ["content", "presentation"] as const, + + templateContract: (templateCode: string) => + ["content", "presentation", "template", templateCode, "contract"] as const, + + search: (request: Omit) => + [ + "content", + "presentation", + "search", + request.module_id ?? null, + request.module_code ?? null, + request.template_code, + request.query ?? "", + request.logic, + normalizeFilters(request.filters), + normalizeSort(request.sort), + request.page_size, + ] as const, +}; diff --git a/src/features/content/api/content.api.ts b/src/features/content/api/content.api.ts new file mode 100644 index 0000000..829864f --- /dev/null +++ b/src/features/content/api/content.api.ts @@ -0,0 +1,91 @@ +import { AxiosInstance } from "axios"; +import { request } from "@/api/http-client"; +import { + ContentDetailResponse, + ModuleContentListResponse, + ModuleListResponse, + ModuleRequest, + ModuleTemplateContentDetailResponse, + ModuleTemplateContentRequest, + ModuleTemplateContentResponse, + PublishContentResponse, + ReconstructedContentResponse, + TemplateAttributeDefinitionsResponse, +} from "../types/content.types"; + +export class ContentApi { + constructor(private readonly client: AxiosInstance) {} + + getModules(): Promise { + return request(this.client, { + method: "GET", + url: "/contents/modules", + }); + } + + getModuleContents(payload: ModuleRequest): Promise { + return request(this.client, { + method: "POST", + url: "/contents/module-contents", + data: payload, + }); + } + + getModuleTemplateContents( + payload: ModuleTemplateContentRequest, + ): Promise { + return request(this.client, { + method: "POST", + url: "/contents/module-template-contents", + data: payload, + }); + } + + getModuleTemplateContentDetails( + payload: ModuleTemplateContentRequest, + ): Promise { + return request(this.client, { + method: "POST", + url: "/contents/module-template-content-details", + data: payload, + }); + } + + getContent(contentId: string): Promise { + return request(this.client, { + method: "GET", + url: `/contents/${encodeURIComponent(contentId)}`, + }); + } + + getModuleContentDetail( + payload: ModuleRequest, + contentId: string, + ): Promise { + return request(this.client, { + method: "POST", + url: `/contents/module-contents/${encodeURIComponent(contentId)}`, + data: payload, + }); + } + + getTemplateDefinitions( + templateCode: string, + ): Promise { + return request(this.client, { + method: "GET", + url: `/contents/templates/${encodeURIComponent(templateCode)}/attributes`, + }); + } + + publishContent( + contentId: string, + actorId: string, + ): Promise { + return request(this.client, { + method: "POST", + url: `/contents/${encodeURIComponent(contentId)}/publish`, + params: { actor_id: actorId }, + }); + } +} diff --git a/src/features/content/api/content.client.ts b/src/features/content/api/content.client.ts new file mode 100644 index 0000000..6d4819c --- /dev/null +++ b/src/features/content/api/content.client.ts @@ -0,0 +1,13 @@ +import apiClient from "@/api/client"; +import { ContentApi } from "./content.api"; + +/** + * Canonical content API client. + * + * Content now shares the same Axios instance as auth/access/search so: + * - the current bearer token is attached consistently; + * - EXPO_PUBLIC_API_URL is the single API base URL; + * - there is no second unauthenticated content client. + */ +export const httpClient = apiClient; +export const contentApi = new ContentApi(apiClient); diff --git a/src/features/content/api/content.query-keys.ts b/src/features/content/api/content.query-keys.ts new file mode 100644 index 0000000..777cd98 --- /dev/null +++ b/src/features/content/api/content.query-keys.ts @@ -0,0 +1,24 @@ +import { ModuleRequest } from "../types/content.types"; + +function moduleIdentity(request: ModuleRequest): string { + if (request.module_id) return `id:${request.module_id}`; + if (request.module_code) return `code:${request.module_code}`; + return "unresolved"; +} + +export const contentQueryKeys = { + root: ["content"] as const, + modules: () => ["content", "modules"] as const, + moduleContents: (request: ModuleRequest) => + ["content", "module", moduleIdentity(request), "contents"] as const, + moduleTemplateContents: (request: ModuleRequest, templateCode: string) => + ["content", "module", moduleIdentity(request), "template", templateCode, "contents"] as const, + moduleTemplateDetails: (request: ModuleRequest, templateCode: string) => + ["content", "module", moduleIdentity(request), "template", templateCode, "details"] as const, + contentDetail: (contentId: string) => + ["content", "detail", contentId] as const, + moduleContentDetail: (request: ModuleRequest, contentId: string) => + ["content", "module", moduleIdentity(request), "content", contentId] as const, + templateDefinitions: (templateCode: string) => + ["content", "template", templateCode, "definitions"] as const, +}; diff --git a/src/features/content/api/presentation.api.ts b/src/features/content/api/presentation.api.ts new file mode 100644 index 0000000..71b8c26 --- /dev/null +++ b/src/features/content/api/presentation.api.ts @@ -0,0 +1,7 @@ +import { AxiosInstance } from "axios"; +import { request } from "@/api/http-client"; +import { ContentSearchRequest, ContentSearchResponse, TemplateContractResponse } from "../types/presentation.types"; +export class ContentPresentationApi { constructor(private readonly client:AxiosInstance){} + getTemplateContract(templateCode:string):Promise{return request(this.client,{method:"GET",url:`/contents/templates/${encodeURIComponent(templateCode)}/contract`});} + searchContents(payload:ContentSearchRequest):Promise{return request(this.client,{method:"POST",url:"/contents/search",data:payload});} +} diff --git a/src/features/content/api/presentation.client.ts b/src/features/content/api/presentation.client.ts new file mode 100644 index 0000000..4f3eba1 --- /dev/null +++ b/src/features/content/api/presentation.client.ts @@ -0,0 +1,4 @@ +import apiClient from "@/api/client"; +import { ContentPresentationApi } from "./presentation.api"; + +export const contentPresentationApi = new ContentPresentationApi(apiClient); diff --git a/src/features/content/attribute-presentation.ts b/src/features/content/attribute-presentation.ts new file mode 100644 index 0000000..a6a4ecf --- /dev/null +++ b/src/features/content/attribute-presentation.ts @@ -0,0 +1,159 @@ +import type { + TemplateAttributePresentationContract, + TemplatePresentationContract, +} from "../types/presentation.types"; + +/** + * Default required by the backend/frontend presentation contract. + * A missing rule must never make an empty attribute visible implicitly. + */ +export const DEFAULT_EMPTY_BEHAVIOR = "hide" as const; +export const DEFAULT_ATTRIBUTE_VISIBILITY = "show" as const; + +export type AttributePresentationMap = ReadonlyMap< + string, + TemplateAttributePresentationContract +>; + +function isPlainObject(value: unknown): value is Record { + if (value === null || typeof value !== "object") { + return false; + } + + const prototype = Object.getPrototypeOf(value); + return prototype === Object.prototype || prototype === null; +} + +/** + * Determines whether a content value is semantically empty for presentation. + * + * Empty: + * - null / undefined + * - empty or whitespace-only strings + * - arrays whose elements are all empty + * - plain objects whose values are all empty + * + * Not empty: + * - 0 + * - false + * - non-empty strings + * - numbers, including NaN/Infinity if they reached the presentation layer + * - non-plain objects (they are treated as concrete values) + */ +export function isEmptyValue(value: unknown): boolean { + if (value === null || value === undefined) { + return true; + } + + if (typeof value === "string") { + return value.trim().length === 0; + } + + if (Array.isArray(value)) { + return value.length === 0 || value.every(isEmptyValue); + } + + if (isPlainObject(value)) { + const values = Object.values(value); + return values.length === 0 || values.every(isEmptyValue); + } + + return false; +} + +/** + * Builds an immutable, O(1)-lookup index for a template contract's attribute + * presentation rules. Duplicate keys indicate a broken backend contract and + * are rejected rather than silently allowing the last value to win. + */ +export function createAttributePresentationMap( + attributes: readonly TemplateAttributePresentationContract[] | null | undefined, +): AttributePresentationMap { + const map = new Map(); + + for (const rule of attributes ?? []) { + const key = rule.attribute_key.trim(); + if (!key) { + throw new Error("Attribute presentation rule contains a blank attribute_key."); + } + if (map.has(key)) { + throw new Error(`Duplicate attribute presentation rule: ${key}`); + } + map.set(key, rule); + } + + return map; +} + +/** Convenience overload for callers holding the complete presentation contract. */ +export function createPresentationAttributeMap( + presentation: + | Pick + | null + | undefined, +): AttributePresentationMap { + return createAttributePresentationMap(presentation?.attributes); +} + +/** + * Returns the effective presentation rule for a canonical attribute key. + * + * The backend normally sends an effective rule for every active definition. + * The fallback remains `hide` defensively for older/cached contracts. + */ +export function getAttributePresentationRule( + attributeKey: string, + rules: AttributePresentationMap | readonly TemplateAttributePresentationContract[] | null | undefined, +): TemplateAttributePresentationContract { + const normalizedKey = attributeKey.trim(); + if (!normalizedKey) { + throw new Error("attributeKey is required."); + } + + const rule = rules instanceof Map + ? rules.get(normalizedKey) + : (rules ?? []).find((item) => item.attribute_key === normalizedKey); + + return rule ?? { + attribute_key: normalizedKey, + visibility: DEFAULT_ATTRIBUTE_VISIBILITY, + empty_behavior: DEFAULT_EMPTY_BEHAVIOR, + empty_text: null, + }; +} + +/** + * Determines whether an attribute should be rendered. + * Non-empty values always render. Empty values render only when explicitly + * configured with `empty_behavior: "show"`. + */ +export function shouldRenderAttribute( + value: unknown, + rule?: Pick | null, +): boolean { + if (rule?.visibility === "hide") return false; + if (!isEmptyValue(value)) return true; + return rule?.empty_behavior === "show"; +} + +/** + * Returns display text for an empty value when the rule explicitly permits + * rendering it. A null result means no placeholder text should be displayed. + * + * This helper intentionally returns null for non-empty values: formatting real + * values is the semantic renderer's responsibility. + */ +export function getEmptyDisplayText( + value: unknown, + rule?: Pick< + TemplateAttributePresentationContract, + "empty_behavior" | "empty_text" + > | null, +): string | null { + if (!isEmptyValue(value) || rule?.empty_behavior !== "show") { + return null; + } + + const text = rule.empty_text?.trim(); + return text ? text : null; +} diff --git a/src/features/content/components/ContentScreenState.tsx b/src/features/content/components/ContentScreenState.tsx new file mode 100644 index 0000000..a9161a9 --- /dev/null +++ b/src/features/content/components/ContentScreenState.tsx @@ -0,0 +1,64 @@ +import React from "react"; +import { + ActivityIndicator, + Pressable, + SafeAreaView, + Text, + View, +} from "react-native"; + +export function ScreenLoading({ message = "Loading content…" }: { message?: string }) { + return ( + + + + {message} + + + ); +} + +export function ScreenError({ + title = "Unable to load content", + message, + onRetry, +}: { + title?: string; + message?: string; + onRetry?: () => void; +}) { + return ( + + + {title} + {message ? {message} : null} + {onRetry ? ( + + Retry + + ) : null} + + + ); +} + +export function ScreenEmpty({ + title = "No content available", + message, +}: { + title?: string; + message?: string; +}) { + return ( + + + {title} + {message ? {message} : null} + + + ); +} diff --git a/src/features/content/components/layout/ContentPageHeader.tsx b/src/features/content/components/layout/ContentPageHeader.tsx new file mode 100644 index 0000000..cbbcba1 --- /dev/null +++ b/src/features/content/components/layout/ContentPageHeader.tsx @@ -0,0 +1,130 @@ +import React, { type ReactNode } from "react"; +import { Pressable, StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { router } from "expo-router"; +import { moderateScale } from "react-native-size-matters"; + +import { Colors } from "@/theme"; + +export interface ContentPageHeaderProps { + title: string; + right?: ReactNode; + fallbackRoute?: string; + onTitlePress?: () => void; + titleAccessibilityLabel?: string; +} + +export function ContentPageHeader({ + title, + right, + fallbackRoute = "/modules", + onTitlePress, + titleAccessibilityLabel, +}: ContentPageHeaderProps) { + const handleBack = () => { + if (router.canGoBack()) { + router.back(); + return; + } + + router.replace(fallbackRoute as never); + }; + + const titleContent = ( + + {title} + + ); + + return ( + + + [ + styles.iconButton, + pressed && styles.pressed, + ]} + > + + + + + {onTitlePress ? ( + [ + styles.titleButton, + pressed && styles.pressed, + ]} + > + {titleContent} + + ) : ( + {titleContent} + )} + + + {right} + + + ); +} + +const styles = StyleSheet.create({ + header: { + height: 60, + flexDirection: "row", + alignItems: "center", + paddingHorizontal: moderateScale(12), + borderBottomWidth: 1, + borderBottomColor: "#ECECEC", + backgroundColor: "#FFFFFF", + }, + sideSlot: { + width: 88, + height: 40, + flexDirection: "row", + alignItems: "center", + justifyContent: "flex-start", + }, + rightSlot: { + justifyContent: "flex-end", + }, + iconButton: { + width: 40, + height: 40, + borderRadius: 20, + alignItems: "center", + justifyContent: "center", + }, + pressed: { + opacity: 0.65, + }, + titleButton: { + flex: 1, + minHeight: 40, + marginHorizontal: moderateScale(4), + alignItems: "center", + justifyContent: "center", + }, + title: { + width: "100%", + textAlign: "center", + fontSize: moderateScale(18), + fontWeight: "700", + color: Colors.textPrimary, + }, +}); diff --git a/src/features/content/components/m0001/category.tsx b/src/features/content/components/m0001/category.tsx new file mode 100644 index 0000000..5153b27 --- /dev/null +++ b/src/features/content/components/m0001/category.tsx @@ -0,0 +1,33 @@ +import React from "react"; +import { asString } from "../../renderers/helpers/value"; +import { Hero } from "../../renderers/shared/Hero"; +import { DescriptionList, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "../../renderers/details/categoryParts"; +export const CategoryHero=({data,title}:{data:Record;title:string})=>; +export const SourcePointTable=({data}:{data:Record})=>; +export const ClinicalFeatureList=({data}:{data:Record})=>; +export const YinYangSection=({data}:{data:Record})=>; +export const DiagnosticUtilityList=({data}:{data:Record})=>; +export const MajorLuoCards=({data}:{data:Record})=><>; +export const RelatedChannelDisordersTable=({data}:{data:Record})=>; +export const RegionalDisordersTable=({data}:{data:Record})=>; +export const PsychoEmotionalTable=({data}:{data:Record})=>; +export const TwelveChannelXiList=({data}:{data:Record})=>; +export const ExtraordinaryChannelXiList=({data}:{data:Record})=>; +export const ClinicalApplicationSections=({data}:{data:Record})=>; +export const OrganPointMatrix=({title,value}:{title:string;value:unknown})=>; +export const PhaseLegend=({data}:{data:Record})=><>; +export const YinFiveShuMatrix=({data}:{data:Record})=>; +export const YangFiveShuMatrix=({data}:{data:Record})=>; +export const HoraryPointMatrix=({data}:{data:Record})=>; +export const HuiMeetingPointCards=({data}:{data:Record})=>; +export const ConfluentPointCards=({data}:{data:Record})=>; +export const LowerHeSeaPointCards=({data}:{data:Record})=>; +export const GaoWuCommandRows=({data}:{data:Record})=>; +export const FourSeaCards=({data}:{data:Record})=>; +export const GhostPointTable=({data}:{data:Record})=>; +export const HistoricalNotes=({data}:{data:Record})=>; +export const AlternativeListSection=({data}:{data:Record})=>; +export const EntryExitMatrix=({data}:{data:Record})=>; +export const ClinicalSignificanceSection=({data}:{data:Record})=>; +export const ReturningYangPointGrid=({data}:{data:Record})=>; +export { DescriptionList, PointCodes }; diff --git a/src/features/content/components/m0001/eov.tsx b/src/features/content/components/m0001/eov.tsx new file mode 100644 index 0000000..40194f1 --- /dev/null +++ b/src/features/content/components/m0001/eov.tsx @@ -0,0 +1,9 @@ +import React from "react"; import { Text } from "react-native"; +import { asRecordArray, asString, asStringArray } from "../../renderers/helpers/value"; +import { Hero } from "../../renderers/shared/Hero"; import { SectionCard } from "../../renderers/shared/SectionCard"; import { KeyValueGrid } from "../../renderers/shared/KeyValueGrid"; import { ChipList } from "../../renderers/shared/ChipList"; import { BulletList } from "../../renderers/shared/BulletList"; import { ImageGallery } from "../../renderers/shared/ImageGallery"; +export const VesselHero=({data,title}:{data:Record;title:string})=>; +export const PointRelationsGrid=({data}:{data:Record})=>; +export const AreasOfEffectChips=({data}:{data:Record})=>; +export const FunctionsList=({data}:{data:Record})=>; +export const PathwaySection=({data}:{data:Record})=>{asString(data.pathway)}; +export const EovImageGallery=({data}:{data:Record})=>; diff --git a/src/features/content/components/m0001/meridian.tsx b/src/features/content/components/m0001/meridian.tsx new file mode 100644 index 0000000..92f0179 --- /dev/null +++ b/src/features/content/components/m0001/meridian.tsx @@ -0,0 +1,15 @@ +import React from "react"; +import { asRecord, asRecordArray, asString, asStringArray } from "../../renderers/helpers/value"; +import { Hero } from "../../renderers/shared/Hero"; import { SectionCard } from "../../renderers/shared/SectionCard"; import { BulletList } from "../../renderers/shared/BulletList"; import { ObjectSections } from "../../renderers/shared/ObjectSections"; import { ChipList } from "../../renderers/shared/ChipList"; import { RecordCards } from "../../renderers/shared/RecordCards"; +export const MeridianHero=({data,title}:{data:Record;title:string})=>; +export const PrimaryChannelPathway=({data}:{data:Record})=>; +export const SecondaryBranches=({data}:{data:Record})=>; +export const DivergentChannel=({data}:{data:Record})=>; +export const LuoChannel=({data}:{data:Record})=>; +export const SinewChannel=({data}:{data:Record})=>; +export const SymptomsSections=({data}:{data:Record})=>; +export const MeetingPoints=({data}:{data:Record})=>; +export const PointCategoriesGrid=({data}:{data:Record})=>; +export const ClinicalManifestations=({data}:{data:Record})=>; +export const SpecificPoints=({data}:{data:Record})=>; +export const FiveShuTable=({data}:{data:Record})=>; diff --git a/src/features/content/components/m0001/point.tsx b/src/features/content/components/m0001/point.tsx new file mode 100644 index 0000000..40afb1c --- /dev/null +++ b/src/features/content/components/m0001/point.tsx @@ -0,0 +1,21 @@ +import React from "react"; +import { Text } from "react-native"; +import { asRecord, asRecordArray, asString, asStringArray } from "../../renderers/helpers/value"; +import { Hero } from "../../renderers/shared/Hero"; +import { ChipList } from "../../renderers/shared/ChipList"; +import { BulletList } from "../../renderers/shared/BulletList"; +import { KeyValueGrid } from "../../renderers/shared/KeyValueGrid"; +import { ObjectSections } from "../../renderers/shared/ObjectSections"; +import { ImageGallery } from "../../renderers/shared/ImageGallery"; +import { SectionCard } from "../../renderers/shared/SectionCard"; +export const PointHero=({data,title}:{data:Record;title:string})=>; +export const AlternativeNames=({data}:{data:Record})=>; +export const PointTypeChips=({data}:{data:Record})=>; +export const ChannelSection=({data}:{data:Record})=>asString(data.channel)?{asString(data.channel)}:null; +export const LocationSection=({data}:{data:Record})=>{asString(data.location)}{asString(data.location_note)?{asString(data.location_note)}:null}; +export const IndicationsList=({data}:{data:Record})=>; +export const ActionsList=({data}:{data:Record})=>; +export const MethodsSection=({data}:{data:Record})=>{const m=asRecord(data.methods);return }; +export const RegionalAnatomySection=({data}:{data:Record})=>; +export const CautionSection=({data}:{data:Record})=>asString(data.caution)?{asString(data.caution)}:null; +export const PointImageGallery=({data}:{data:Record})=>; diff --git a/src/features/content/components/navigation/ContentLink.tsx b/src/features/content/components/navigation/ContentLink.tsx new file mode 100644 index 0000000..31d1046 --- /dev/null +++ b/src/features/content/components/navigation/ContentLink.tsx @@ -0,0 +1,98 @@ +import React, { type ReactNode } from "react"; +import { Pressable, StyleSheet, Text, View, type StyleProp, type ViewStyle } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { useRouter } from "expo-router"; + +import { Colors } from "@/theme/colors"; +import { Radius } from "@/theme/radius"; +import { Spacing } from "@/theme/spacing"; +import type { NavigableContentReference } from "../../types/content-reference.types"; +import { buildContentReferenceRoute } from "../../utils/content-reference"; + +export interface ContentLinkProps { + reference: NavigableContentReference; + /** Optional custom child content. When omitted, the reference label is rendered. */ + children?: ReactNode; + /** Optional accessibility label override. */ + accessibilityLabel?: string; + /** Optional wrapper style for renderer-specific placement. */ + style?: StyleProp; + /** Called immediately before navigation. */ + onPress?: (reference: NavigableContentReference) => void; + /** Disable navigation while retaining the visual content. */ + disabled?: boolean; +} + +export function ContentLink({ + reference, + children, + accessibilityLabel, + style, + onPress, + disabled = false, +}: ContentLinkProps) { + const router = useRouter(); + const label = reference.label?.trim() || defaultReferenceLabel(reference); + + return ( + { + onPress?.(reference); + router.push(buildContentReferenceRoute(reference) as never); + }} + style={({ pressed }) => [ + styles.container, + style, + pressed && !disabled ? styles.pressed : null, + disabled ? styles.disabled : null, + ]} + > + {children ?? ( + + {label} + + + )} + + ); +} + +function defaultReferenceLabel(reference: NavigableContentReference): string { + if (reference.type === "content_ref") { + return reference.target.source_key?.trim() || "Open content"; + } + return "Open section"; +} + +const styles = StyleSheet.create({ + container: { + borderRadius: Radius.md, + }, + defaultContent: { + minHeight: 44, + paddingHorizontal: Spacing.md, + paddingVertical: Spacing.sm, + borderRadius: Radius.md, + backgroundColor: "#E8F5E9", + flexDirection: "row", + alignItems: "center", + gap: Spacing.sm, + }, + label: { + flex: 1, + color: Colors.primaryDark, + fontSize: 15, + lineHeight: 20, + fontWeight: "700", + }, + pressed: { + opacity: 0.78, + }, + disabled: { + opacity: 0.5, + }, +}); diff --git a/src/features/content/components/search/ContentSearchBar.tsx b/src/features/content/components/search/ContentSearchBar.tsx new file mode 100644 index 0000000..a0362c6 --- /dev/null +++ b/src/features/content/components/search/ContentSearchBar.tsx @@ -0,0 +1,3 @@ +import React from "react"; +import { TextInput, View } from "react-native"; +export function ContentSearchBar({value,onChangeText}:{value:string;onChangeText:(v:string)=>void}){return } diff --git a/src/features/content/components/search/ContractFilterModal.tsx b/src/features/content/components/search/ContractFilterModal.tsx new file mode 100644 index 0000000..e024ff8 --- /dev/null +++ b/src/features/content/components/search/ContractFilterModal.tsx @@ -0,0 +1,538 @@ +import React, { useEffect, useMemo, useState } from "react"; +import { + KeyboardAvoidingView, + Modal, + Platform, + Pressable, + ScrollView, + StyleSheet, + Text, + TextInput, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; + +import { Colors } from "@/theme"; +import type { + LogicalOperator, + SearchCriterion, + SearchFieldContract, + SearchOperator, +} from "../../types/presentation.types"; + +interface ContractFilterModalProps { + visible: boolean; + fields: SearchFieldContract[]; + logic: LogicalOperator; + filters: SearchCriterion[]; + onApply: (value: { + logic: LogicalOperator; + filters: SearchCriterion[]; + }) => void; + onClose: () => void; +} + +interface DraftCriterion { + id: string; + attribute_key: string; + operator: SearchOperator; + valueText: string; + valueChoice?: unknown; +} + +const OPERATOR_LABELS: Record = { + eq: "Equals", + neq: "Not equal", + contains: "Contains", + starts_with: "Starts with", + in: "Any of", + gt: "Greater than", + gte: "Greater or equal", + lt: "Less than", + lte: "Less or equal", +}; + +function createId(): string { + return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`; +} + +function stringifyValue(value: unknown): string { + if (Array.isArray(value)) return value.map(String).join(", "); + if (value === null || value === undefined) return ""; + if (typeof value === "object") return JSON.stringify(value); + return String(value); +} + +function fromCriterion(criterion: SearchCriterion): DraftCriterion { + return { + id: createId(), + attribute_key: criterion.attribute_key, + operator: criterion.operator, + valueText: stringifyValue(criterion.value), + valueChoice: Array.isArray(criterion.value) ? undefined : criterion.value, + }; +} + +function defaultDraft(field: SearchFieldContract): DraftCriterion { + return { + id: createId(), + attribute_key: field.attribute_key, + operator: field.operators[0] ?? "eq", + valueText: "", + }; +} + +function parseTextValue(operator: SearchOperator, value: string): unknown { + const trimmed = value.trim(); + + if (operator === "in") { + return trimmed + .split(",") + .map((item) => item.trim()) + .filter(Boolean); + } + + if (["gt", "gte", "lt", "lte"].includes(operator)) { + const numeric = Number(trimmed); + return Number.isFinite(numeric) ? numeric : trimmed; + } + + if (trimmed.toLowerCase() === "true") return true; + if (trimmed.toLowerCase() === "false") return false; + + return trimmed; +} + +function displayAllowedValue(value: unknown): string { + if (typeof value === "string") return value; + if (typeof value === "number" || typeof value === "boolean") return String(value); + if (value && typeof value === "object") { + const record = value as Record; + const label = record.label ?? record.name ?? record.value ?? record.code; + if (label !== undefined) return String(label); + } + return stringifyValue(value); +} + +export function ContractFilterModal({ + visible, + fields, + logic, + filters, + onApply, + onClose, +}: ContractFilterModalProps) { + const [draftLogic, setDraftLogic] = useState(logic); + const [drafts, setDrafts] = useState([]); + + useEffect(() => { + if (!visible) return; + setDraftLogic(logic); + setDrafts(filters.map(fromCriterion)); + }, [filters, logic, visible]); + + const fieldsByKey = useMemo( + () => new Map(fields.map((field) => [field.attribute_key, field])), + [fields], + ); + + const addCondition = () => { + const field = fields[0]; + if (!field) return; + setDrafts((current) => [...current, defaultDraft(field)]); + }; + + const updateDraft = (id: string, patch: Partial) => { + setDrafts((current) => + current.map((item) => (item.id === id ? { ...item, ...patch } : item)), + ); + }; + + const apply = () => { + const next = drafts.flatMap((draft) => { + const field = fieldsByKey.get(draft.attribute_key); + if (!field || !field.operators.includes(draft.operator)) return []; + + const hasAllowedValues = Boolean(field.allowed_values?.length); + const rawValue = hasAllowedValues && draft.valueChoice !== undefined + ? draft.valueChoice + : parseTextValue(draft.operator, draft.valueText); + + if (draft.operator === "in") { + const values = Array.isArray(rawValue) ? rawValue : [rawValue]; + const cleaned = values.filter( + (value) => value !== "" && value !== null && value !== undefined, + ); + if (cleaned.length === 0) return []; + return [{ + attribute_key: draft.attribute_key, + operator: draft.operator, + value: cleaned, + }]; + } + + if (rawValue === "" || rawValue === null || rawValue === undefined) return []; + + return [{ + attribute_key: draft.attribute_key, + operator: draft.operator, + value: rawValue, + }]; + }); + + onApply({ logic: draftLogic, filters: next }); + onClose(); + }; + + return ( + + + + + + + + Filters + Use the fields defined by this content template. + + + + + + + + Match conditions + + {(["and", "or"] as const).map((option) => ( + setDraftLogic(option)} + style={[ + styles.segment, + draftLogic === option && styles.segmentActive, + ]} + > + + {option === "and" ? "All (AND)" : "Any (OR)"} + + + ))} + + + + + Available filters + + {fields.map((field) => ( + + setDrafts((current) => [ + ...current, + defaultDraft(field), + ]) + } + style={styles.chip} + > + {field.label} + + ))} + + {drafts.length === 0 ? ( + + + No filters applied + Add one or more conditions to narrow the content list. + + ) : null} + + {drafts.map((draft, index) => { + const field = fieldsByKey.get(draft.attribute_key) ?? fields[0]; + if (!field) return null; + const allowedValues = field.allowed_values ?? []; + + return ( + + + Condition {index + 1} + setDrafts((current) => current.filter((item) => item.id !== draft.id))} + hitSlop={8} + > + + + + + Field + + {fields.map((candidate) => { + const selected = candidate.attribute_key === draft.attribute_key; + return ( + + updateDraft(draft.id, { + attribute_key: candidate.attribute_key, + operator: candidate.operators[0] ?? "eq", + valueText: "", + valueChoice: undefined, + }) + } + style={[styles.chip, selected && styles.chipActive]} + > + + {candidate.label} + + + ); + })} + + + Operator + + {field.operators.map((operator) => { + const selected = operator === draft.operator; + return ( + + updateDraft(draft.id, { + operator, + valueText: "", + valueChoice: undefined, + }) + } + style={[styles.chip, selected && styles.chipActive]} + > + + {OPERATOR_LABELS[operator]} + + + ); + })} + + + Value + {allowedValues.length > 0 ? ( + + {allowedValues.map((value, valueIndex) => { + const valueText = stringifyValue(value); + const selected = + draft.operator === "in" + ? draft.valueText.split(",").map((item) => item.trim()).includes(valueText) + : stringifyValue(draft.valueChoice) === valueText; + + return ( + { + if (draft.operator === "in") { + const current = draft.valueText + .split(",") + .map((item) => item.trim()) + .filter(Boolean); + const next = selected + ? current.filter((item) => item !== valueText) + : [...current, valueText]; + updateDraft(draft.id, { valueText: next.join(", "), valueChoice: undefined }); + } else { + updateDraft(draft.id, { valueChoice: value, valueText }); + } + }} + style={[styles.chip, selected && styles.chipActive]} + > + + {displayAllowedValue(value)} + + + ); + })} + + ) : ( + updateDraft(draft.id, { valueText, valueChoice: undefined })} + placeholder={draft.operator === "in" ? "Enter comma-separated values" : "Enter value"} + placeholderTextColor="#94A3B8" + style={styles.input} + autoCapitalize="none" + /> + )} + + ); + })} + + + + Add condition + + + + + { + setDraftLogic(logic); + setDrafts([]); + }} + style={styles.secondaryButton} + > + Clear + + + Apply filters + + + + + + ); +} + +const styles = StyleSheet.create({ + overlay: { flex: 1, justifyContent: "flex-end" }, + scrim: { ...StyleSheet.absoluteFillObject, backgroundColor: "rgba(15,23,42,0.38)" }, + sheet: { + maxHeight: "88%", + minHeight: "55%", + backgroundColor: "#F8FAFC", + borderTopLeftRadius: moderateScale(24), + borderTopRightRadius: moderateScale(24), + overflow: "hidden", + }, + handle: { + alignSelf: "center", + width: moderateScale(42), + height: 4, + borderRadius: 2, + backgroundColor: "#CBD5E1", + marginTop: verticalScale(9), + }, + header: { + flexDirection: "row", + justifyContent: "space-between", + alignItems: "flex-start", + paddingHorizontal: moderateScale(20), + paddingTop: verticalScale(14), + paddingBottom: verticalScale(12), + backgroundColor: "#FFFFFF", + borderBottomWidth: 1, + borderBottomColor: "#E2E8F0", + }, + title: { fontSize: moderateScale(19), fontWeight: "800", color: Colors.textPrimary }, + subtitle: { marginTop: 3, fontSize: moderateScale(12), color: Colors.textSecondary }, + closeButton: { width: 36, height: 36, alignItems: "center", justifyContent: "center" }, + logicSection: { paddingHorizontal: moderateScale(20), paddingTop: verticalScale(14) }, + sectionLabel: { + marginTop: verticalScale(10), + marginBottom: verticalScale(7), + fontSize: moderateScale(12), + fontWeight: "700", + color: Colors.textSecondary, + }, + segmented: { flexDirection: "row", padding: 3, borderRadius: 12, backgroundColor: "#E2E8F0" }, + segment: { flex: 1, alignItems: "center", paddingVertical: verticalScale(8), borderRadius: 10 }, + segmentActive: { backgroundColor: "#FFFFFF" }, + segmentText: { fontSize: moderateScale(12), fontWeight: "700", color: Colors.textSecondary }, + segmentTextActive: { color: Colors.primaryDark }, + scrollContent: { paddingHorizontal: moderateScale(20), paddingBottom: verticalScale(18) }, + emptyCard: { + marginTop: verticalScale(14), + alignItems: "center", + padding: moderateScale(18), + borderRadius: 14, + borderWidth: 1, + borderColor: "#E2E8F0", + backgroundColor: "#FFFFFF", + }, + emptyTitle: { marginTop: 8, fontSize: moderateScale(14), fontWeight: "700", color: Colors.textPrimary }, + emptyText: { marginTop: 4, textAlign: "center", fontSize: moderateScale(12), lineHeight: 18, color: Colors.textSecondary }, + conditionCard: { + marginTop: verticalScale(14), + padding: moderateScale(14), + borderRadius: 14, + borderWidth: 1, + borderColor: "#E2E8F0", + backgroundColor: "#FFFFFF", + }, + conditionHeader: { flexDirection: "row", alignItems: "center", justifyContent: "space-between" }, + conditionTitle: { fontSize: moderateScale(14), fontWeight: "800", color: Colors.textPrimary }, + chipWrap: { flexDirection: "row", flexWrap: "wrap", gap: moderateScale(7) }, + chip: { + paddingHorizontal: moderateScale(10), + paddingVertical: verticalScale(7), + borderRadius: 999, + borderWidth: 1, + borderColor: "#CBD5E1", + backgroundColor: "#FFFFFF", + }, + chipActive: { borderColor: "#A7D7A9", backgroundColor: "#E8F5E9" }, + chipText: { fontSize: moderateScale(11.5), fontWeight: "600", color: Colors.textSecondary }, + chipTextActive: { color: Colors.primaryDark }, + input: { + minHeight: verticalScale(42), + borderRadius: 12, + borderWidth: 1, + borderColor: "#CBD5E1", + backgroundColor: "#FFFFFF", + paddingHorizontal: moderateScale(12), + fontSize: moderateScale(13), + color: Colors.textPrimary, + }, + addButton: { + marginTop: verticalScale(14), + minHeight: verticalScale(42), + flexDirection: "row", + alignItems: "center", + justifyContent: "center", + gap: 6, + borderRadius: 12, + borderWidth: 1, + borderColor: "#A7D7A9", + backgroundColor: "#E8F5E9", + }, + addButtonText: { fontSize: moderateScale(13), fontWeight: "800", color: Colors.primaryDark }, + footer: { + flexDirection: "row", + gap: moderateScale(10), + paddingHorizontal: moderateScale(20), + paddingTop: verticalScale(12), + paddingBottom: verticalScale(16), + borderTopWidth: 1, + borderTopColor: "#E2E8F0", + backgroundColor: "#FFFFFF", + }, + secondaryButton: { + minWidth: moderateScale(92), + alignItems: "center", + justifyContent: "center", + paddingHorizontal: moderateScale(16), + paddingVertical: verticalScale(11), + borderRadius: 12, + borderWidth: 1, + borderColor: "#CBD5E1", + }, + secondaryButtonText: { fontSize: moderateScale(13), fontWeight: "700", color: Colors.textPrimary }, + primaryButton: { + flex: 1, + alignItems: "center", + justifyContent: "center", + paddingHorizontal: moderateScale(16), + paddingVertical: verticalScale(11), + borderRadius: 12, + backgroundColor: Colors.primary, + }, + primaryButtonText: { fontSize: moderateScale(13), fontWeight: "800", color: "#FFFFFF" }, +}); diff --git a/src/features/content/components/search/ContractSortModal.tsx b/src/features/content/components/search/ContractSortModal.tsx new file mode 100644 index 0000000..7fec0c2 --- /dev/null +++ b/src/features/content/components/search/ContractSortModal.tsx @@ -0,0 +1,229 @@ +import React, { useEffect, useMemo, useState } from "react"; +import { + Modal, + Pressable, + ScrollView, + StyleSheet, + Text, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; + +import { Colors } from "@/theme"; +import type { + SortCriterion, + SortDirection, + SortFieldContract, +} from "../../types/presentation.types"; + +interface ContractSortModalProps { + visible: boolean; + fields: SortFieldContract[]; + sort: SortCriterion[]; + defaultSort: SortCriterion[]; + onApply: (sort: SortCriterion[]) => void; + onClose: () => void; +} + +export function ContractSortModal({ + visible, + fields, + sort, + defaultSort, + onApply, + onClose, +}: ContractSortModalProps) { + const [draft, setDraft] = useState(sort); + + useEffect(() => { + if (visible) setDraft(sort); + }, [sort, visible]); + + const labels = useMemo( + () => new Map(fields.map((field) => [field.field, field.label])), + [fields], + ); + + const available = fields.filter( + (field) => !draft.some((criterion) => criterion.field === field.field), + ); + + const add = (field: string) => { + setDraft((current) => [...current, { field, direction: "asc" }]); + }; + + const setDirection = (field: string, direction: SortDirection) => { + setDraft((current) => + current.map((criterion) => + criterion.field === field ? { ...criterion, direction } : criterion, + ), + ); + }; + + const move = (index: number, offset: -1 | 1) => { + setDraft((current) => { + const target = index + offset; + if (target < 0 || target >= current.length) return current; + const next = [...current]; + [next[index], next[target]] = [next[target], next[index]]; + return next; + }); + }; + + return ( + + + + + + + + Sort + Earlier rules have higher priority. + + + + + + + + {draft.length === 0 ? ( + + + No sort rules + Results will use the backend's natural ordering. + + ) : null} + + {draft.map((criterion, index) => ( + + + + {index + 1} + + {labels.get(criterion.field) ?? criterion.field} + + move(index, -1)} hitSlop={6}> + + + move(index, 1)} hitSlop={6}> + + + setDraft((current) => current.filter((item) => item.field !== criterion.field))} hitSlop={6}> + + + + + + + {(["asc", "desc"] as const).map((direction) => { + const selected = criterion.direction === direction; + return ( + setDirection(criterion.field, direction)} + style={[styles.segment, selected && styles.segmentActive]} + > + + + {direction === "asc" ? "Ascending" : "Descending"} + + + ); + })} + + + ))} + + {available.length > 0 ? ( + + Add sort field + + {available.map((field) => ( + add(field.field)} style={styles.addChip}> + + {field.label} + + ))} + + + ) : null} + + + + setDraft(defaultSort)} style={styles.secondaryButton}> + Default + + { + onApply(draft); + onClose(); + }} + style={styles.primaryButton} + > + Apply sort + + + + + + ); +} + +const styles = StyleSheet.create({ + overlay: { flex: 1, justifyContent: "flex-end" }, + scrim: { ...StyleSheet.absoluteFillObject, backgroundColor: "rgba(15,23,42,0.38)" }, + sheet: { + maxHeight: "82%", + minHeight: "48%", + backgroundColor: "#F8FAFC", + borderTopLeftRadius: moderateScale(24), + borderTopRightRadius: moderateScale(24), + overflow: "hidden", + }, + handle: { alignSelf: "center", width: 42, height: 4, borderRadius: 2, backgroundColor: "#CBD5E1", marginTop: 9 }, + header: { + flexDirection: "row", + justifyContent: "space-between", + alignItems: "flex-start", + paddingHorizontal: moderateScale(20), + paddingTop: verticalScale(14), + paddingBottom: verticalScale(12), + backgroundColor: "#FFFFFF", + borderBottomWidth: 1, + borderBottomColor: "#E2E8F0", + }, + title: { fontSize: moderateScale(19), fontWeight: "800", color: Colors.textPrimary }, + subtitle: { marginTop: 3, fontSize: moderateScale(12), color: Colors.textSecondary }, + closeButton: { width: 36, height: 36, alignItems: "center", justifyContent: "center" }, + scrollContent: { padding: moderateScale(20), paddingBottom: verticalScale(18) }, + emptyCard: { alignItems: "center", padding: 18, borderRadius: 14, borderWidth: 1, borderColor: "#E2E8F0", backgroundColor: "#FFFFFF" }, + emptyTitle: { marginTop: 8, fontSize: moderateScale(14), fontWeight: "700", color: Colors.textPrimary }, + emptyText: { marginTop: 4, textAlign: "center", fontSize: moderateScale(12), color: Colors.textSecondary }, + sortCard: { marginBottom: verticalScale(12), padding: moderateScale(14), borderRadius: 14, borderWidth: 1, borderColor: "#E2E8F0", backgroundColor: "#FFFFFF" }, + sortHeader: { flexDirection: "row", alignItems: "center", gap: moderateScale(9) }, + priorityBadge: { width: 26, height: 26, borderRadius: 13, alignItems: "center", justifyContent: "center", backgroundColor: "#E8F5E9" }, + priorityText: { fontSize: moderateScale(11), fontWeight: "800", color: Colors.primaryDark }, + fieldLabel: { flex: 1, fontSize: moderateScale(13.5), fontWeight: "800", color: Colors.textPrimary }, + rowActions: { flexDirection: "row", alignItems: "center", gap: moderateScale(10) }, + segmented: { marginTop: verticalScale(12), flexDirection: "row", padding: 3, borderRadius: 12, backgroundColor: "#E2E8F0" }, + segment: { flex: 1, minHeight: 36, flexDirection: "row", alignItems: "center", justifyContent: "center", gap: 5, borderRadius: 10 }, + segmentActive: { backgroundColor: "#FFFFFF" }, + segmentText: { fontSize: moderateScale(11.5), fontWeight: "700", color: Colors.textSecondary }, + segmentTextActive: { color: Colors.primaryDark }, + availableSection: { marginTop: verticalScale(4) }, + sectionLabel: { marginBottom: verticalScale(8), fontSize: moderateScale(12), fontWeight: "700", color: Colors.textSecondary }, + chipWrap: { flexDirection: "row", flexWrap: "wrap", gap: moderateScale(7) }, + addChip: { flexDirection: "row", alignItems: "center", gap: 4, paddingHorizontal: moderateScale(10), paddingVertical: verticalScale(7), borderRadius: 999, borderWidth: 1, borderColor: "#A7D7A9", backgroundColor: "#E8F5E9" }, + addChipText: { fontSize: moderateScale(11.5), fontWeight: "700", color: Colors.primaryDark }, + footer: { flexDirection: "row", gap: 10, paddingHorizontal: moderateScale(20), paddingTop: verticalScale(12), paddingBottom: verticalScale(16), borderTopWidth: 1, borderTopColor: "#E2E8F0", backgroundColor: "#FFFFFF" }, + secondaryButton: { minWidth: moderateScale(92), alignItems: "center", justifyContent: "center", paddingHorizontal: 16, paddingVertical: 11, borderRadius: 12, borderWidth: 1, borderColor: "#CBD5E1" }, + secondaryButtonText: { fontSize: moderateScale(13), fontWeight: "700", color: Colors.textPrimary }, + primaryButton: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 16, paddingVertical: 11, borderRadius: 12, backgroundColor: Colors.primary }, + primaryButtonText: { fontSize: moderateScale(13), fontWeight: "800", color: "#FFFFFF" }, +}); diff --git a/src/features/content/components/search/FilterSummary.tsx b/src/features/content/components/search/FilterSummary.tsx new file mode 100644 index 0000000..7a62d5d --- /dev/null +++ b/src/features/content/components/search/FilterSummary.tsx @@ -0,0 +1,3 @@ +import React from "react"; +import { Pressable, Text, View } from "react-native"; +export function FilterSummary({filterCount,sortCount,onFilter,onSort}:{filterCount:number;sortCount:number;onFilter:()=>void;onSort:()=>void}){ return Filters{filterCount?` (${filterCount})`:""}Sort{sortCount?` (${sortCount})`:""}; } diff --git a/src/features/content/components/search/ModuleFilterBuilderModal.tsx b/src/features/content/components/search/ModuleFilterBuilderModal.tsx new file mode 100644 index 0000000..5f6d155 --- /dev/null +++ b/src/features/content/components/search/ModuleFilterBuilderModal.tsx @@ -0,0 +1,120 @@ +import React, { useMemo, useState } from "react"; +import { Modal, Pressable, ScrollView, StyleSheet, Text, TextInput, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; +import { Colors } from "@/theme"; +import type { ModuleSearchFieldContract, SearchCriterion } from "../../types/presentation.types"; + +interface Props { + visible: boolean; + fields: ModuleSearchFieldContract[]; + onAdd: (criterion: SearchCriterion) => void; + onClose: () => void; +} + +function displayValue(value: unknown): string { + if (value === null || value === undefined) return ""; + if (["string", "number", "boolean"].includes(typeof value)) return String(value); + if (value && typeof value === "object") { + const record = value as Record; + const label = record.label ?? record.name ?? record.value; + if (label !== undefined) return String(label); + } + return JSON.stringify(value); +} + +function parseValue(field: ModuleSearchFieldContract, raw: string): unknown { + const value = raw.trim(); + if (field.data_type === "number") { + const number = Number(value); + return Number.isFinite(number) ? number : value; + } + if (field.data_type === "boolean") { + if (value.toLowerCase() === "true") return true; + if (value.toLowerCase() === "false") return false; + } + return value; +} + +export function ModuleFilterBuilderModal({ visible, fields, onAdd, onClose }: Props) { + const filterable = useMemo(() => fields.filter((field) => field.is_filterable && field.default_operator), [fields]); + const [selectedKey, setSelectedKey] = useState(""); + const [valueText, setValueText] = useState(""); + const [choice, setChoice] = useState(undefined); + const selected = filterable.find((field) => field.attribute_key === selectedKey) ?? filterable[0]; + + const add = () => { + if (!selected?.default_operator) return; + const value = choice !== undefined ? choice : parseValue(selected, valueText); + if (value === "" || value === null || value === undefined) return; + onAdd({ attribute_key: selected.attribute_key, operator: selected.default_operator, value }); + setSelectedKey(""); setValueText(""); setChoice(undefined); onClose(); + }; + + return ( + + + + + + + + Add filter + Choose an attribute from anywhere in this module and provide its value. + + + + + Attribute + + {filterable.map((field) => { + const active = field.attribute_key === selected?.attribute_key; + return ( + { setSelectedKey(field.attribute_key); setValueText(""); setChoice(undefined); }} style={[styles.field, active && styles.fieldActive]}> + + {field.label} + {field.template_name} + + {active ? : null} + + ); + })} + + {selected ? <> + Value + {selected.allowed_values?.length ? ( + + {selected.allowed_values.map((item, index) => { + const label = displayValue(item); + const active = JSON.stringify(choice) === JSON.stringify(item); + return { setChoice(item); setValueText(""); }} style={[styles.choice, active && styles.choiceActive]}>{label}; + })} + + ) : ( + { setValueText(value); setChoice(undefined); }} placeholder={`Enter ${selected.label.toLowerCase()}…`} placeholderTextColor={Colors.textSecondary} style={styles.input} /> + )} + : null} + + + Cancel + Add filter + + + + + ); +} + +const styles = StyleSheet.create({ + overlay:{flex:1,justifyContent:"flex-end"}, scrim:{...StyleSheet.absoluteFillObject,backgroundColor:"rgba(15,23,42,0.36)"}, + sheet:{maxHeight:"86%",backgroundColor:Colors.surface,borderTopLeftRadius:moderateScale(22),borderTopRightRadius:moderateScale(22)}, + handle:{alignSelf:"center",width:moderateScale(42),height:verticalScale(4),marginTop:verticalScale(8),borderRadius:99,backgroundColor:"#CBD5E1"}, + header:{flexDirection:"row",alignItems:"flex-start",gap:moderateScale(12),padding:moderateScale(20),paddingBottom:moderateScale(12)}, headerCopy:{flex:1}, + title:{fontSize:moderateScale(18),fontWeight:"800",color:Colors.textPrimary}, subtitle:{marginTop:verticalScale(4),fontSize:moderateScale(12),lineHeight:moderateScale(17),color:Colors.textSecondary}, + content:{paddingHorizontal:moderateScale(20),paddingBottom:verticalScale(20)}, label:{marginTop:verticalScale(10),marginBottom:verticalScale(8),fontSize:moderateScale(12),fontWeight:"800",color:Colors.textPrimary}, fieldList:{gap:verticalScale(7)}, + field:{flexDirection:"row",alignItems:"center",minHeight:verticalScale(52),paddingHorizontal:moderateScale(13),paddingVertical:verticalScale(9),borderWidth:1,borderColor:"#E2E8F0",borderRadius:moderateScale(13),backgroundColor:"#FFFFFF"}, + fieldActive:{borderColor:"#A7D7A9",backgroundColor:"#F1F8F1"}, fieldCopy:{flex:1}, fieldTitle:{fontSize:moderateScale(13),fontWeight:"700",color:Colors.textPrimary}, fieldTitleActive:{color:Colors.primaryDark}, fieldGroup:{marginTop:2,fontSize:moderateScale(11),color:Colors.textSecondary}, + input:{minHeight:verticalScale(46),borderWidth:1,borderColor:"#CBD5E1",borderRadius:moderateScale(12),paddingHorizontal:moderateScale(13),color:Colors.textPrimary,backgroundColor:"#FFFFFF"}, + choiceWrap:{flexDirection:"row",flexWrap:"wrap",gap:moderateScale(8)}, choice:{paddingHorizontal:moderateScale(11),paddingVertical:verticalScale(7),borderRadius:999,borderWidth:1,borderColor:"#CBD5E1",backgroundColor:"#FFFFFF"}, choiceActive:{borderColor:"#A7D7A9",backgroundColor:"#E8F5E9"}, choiceText:{fontSize:moderateScale(12),color:Colors.textPrimary}, choiceTextActive:{color:Colors.primaryDark,fontWeight:"700"}, + footer:{flexDirection:"row",gap:moderateScale(10),padding:moderateScale(20),borderTopWidth:1,borderTopColor:"#E2E8F0"}, secondaryButton:{minWidth:moderateScale(96),alignItems:"center",paddingVertical:verticalScale(11),borderWidth:1,borderColor:"#CBD5E1",borderRadius:moderateScale(12)}, secondaryText:{fontWeight:"700",color:Colors.textPrimary}, primaryButton:{flex:1,alignItems:"center",paddingVertical:verticalScale(11),borderRadius:moderateScale(12),backgroundColor:Colors.primary}, primaryText:{fontWeight:"800",color:"#FFFFFF"}, +}); diff --git a/src/features/content/components/search/ModuleFilterChips.tsx b/src/features/content/components/search/ModuleFilterChips.tsx new file mode 100644 index 0000000..0125732 --- /dev/null +++ b/src/features/content/components/search/ModuleFilterChips.tsx @@ -0,0 +1,17 @@ +import React, { useMemo } from "react"; +import { Pressable, StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; +import { Colors } from "@/theme"; +import type { LogicalOperator, ModuleSearchFieldContract, SearchCriterion } from "../../types/presentation.types"; + +interface Props { fields: ModuleSearchFieldContract[]; filters: SearchCriterion[]; logic: LogicalOperator; onLogicChange:(logic:LogicalOperator)=>void; onRemove:(index:number)=>void; onClear:()=>void; } +function valueText(value:unknown):string { if(Array.isArray(value)) return value.map(valueText).join(", "); if(value===null||value===undefined) return ""; if(typeof value==="object"){ const r=value as Record; const l=r.label??r.name??r.value; return l!==undefined?String(l):JSON.stringify(value);} return String(value); } +export function ModuleFilterChips({fields,filters,logic,onLogicChange,onRemove,onClear}:Props){ + const fieldMap=useMemo(()=>new Map(fields.map((field)=>[field.attribute_key,field])),[fields]); if(!filters.length) return null; + return + {filters.length>1?Match{(["and","or"] as const).map((option)=>onLogicChange(option)} style={[styles.logicButton,logic===option&&styles.logicButtonActive]}>{option.toUpperCase()})}Clear:null} + {filters.map((filter,index)=>{ const field=fieldMap.get(filter.attribute_key); const label=field?.label??"Attribute"; return {label}{valueText(filter.value)}onRemove(index)}>;})} + ; +} +const styles=StyleSheet.create({container:{paddingHorizontal:moderateScale(24),paddingBottom:verticalScale(10),gap:verticalScale(8)},logicRow:{flexDirection:"row",alignItems:"center",gap:moderateScale(7)},logicLabel:{fontSize:moderateScale(11.5),color:Colors.textSecondary},logicButton:{paddingHorizontal:moderateScale(9),paddingVertical:verticalScale(5),borderRadius:999,borderWidth:1,borderColor:"#CBD5E1"},logicButtonActive:{borderColor:"#A7D7A9",backgroundColor:"#E8F5E9"},logicText:{fontSize:moderateScale(10.5),fontWeight:"800",color:Colors.textSecondary},logicTextActive:{color:Colors.primaryDark},clearButton:{marginLeft:"auto",paddingVertical:verticalScale(5)},clearText:{fontSize:moderateScale(11),fontWeight:"700",color:Colors.primaryDark},chips:{flexDirection:"row",flexWrap:"wrap",gap:moderateScale(8)},chip:{maxWidth:"100%",flexDirection:"row",alignItems:"center",gap:moderateScale(7),paddingLeft:moderateScale(11),paddingRight:moderateScale(7),paddingVertical:verticalScale(6),borderRadius:moderateScale(13),backgroundColor:"#E8F5E9",borderWidth:1,borderColor:"#C8E6C9"},chipCopy:{maxWidth:moderateScale(220)},chipLabel:{fontSize:moderateScale(10),fontWeight:"800",color:Colors.primaryDark},chipValue:{marginTop:1,fontSize:moderateScale(11.5),color:Colors.textPrimary}}); diff --git a/src/features/content/components/search/ModuleSearchResults.tsx b/src/features/content/components/search/ModuleSearchResults.tsx new file mode 100644 index 0000000..1069a71 --- /dev/null +++ b/src/features/content/components/search/ModuleSearchResults.tsx @@ -0,0 +1,11 @@ +import React from "react"; +import { ActivityIndicator, FlatList, RefreshControl, StyleSheet, Text, View } from "react-native"; +import { Colors } from "@/theme"; +import type { ModuleSearchContentItem } from "../../types/presentation.types"; +import { StandardIndexCard } from "../../renderers/shared/StandardIndexCard"; +interface Props { items:ModuleSearchContentItem[]; total:number; isLoading:boolean; isRefreshing:boolean; isFetchingNextPage:boolean; onRefresh:()=>void; onLoadMore:()=>void; onItemPress:(item:ModuleSearchContentItem)=>void; } +export function ModuleSearchResults({items,total,isLoading,isRefreshing,isFetchingNextPage,onRefresh,onLoadMore,onItemPress}:Props){ + if(isLoading&&!items.length) return Searching across module…; + return item.id} contentContainerStyle={items.length?styles.list:styles.emptyList} refreshControl={} renderItem={({item})=>onItemPress(item)}/>} ListHeaderComponent={items.length?{total} module result{total===1?"":"s"}:null} ListEmptyComponent={No matching contentTry removing a filter or changing the search value.} ListFooterComponent={isFetchingNextPage?:null} onEndReached={onLoadMore} onEndReachedThreshold={0.35}/>; +} +const styles=StyleSheet.create({list:{paddingBottom:24},emptyList:{flexGrow:1},center:{flex:1,alignItems:"center",justifyContent:"center",padding:28},resultCount:{paddingHorizontal:24,paddingVertical:8,fontSize:12,fontWeight:"700",color:Colors.textSecondary},emptyTitle:{fontSize:16,fontWeight:"800",color:Colors.textPrimary},muted:{marginTop:6,textAlign:"center",color:Colors.textSecondary},footer:{marginVertical:18}}); diff --git a/src/features/content/components/search/PaginationFooter.tsx b/src/features/content/components/search/PaginationFooter.tsx new file mode 100644 index 0000000..dc12a19 --- /dev/null +++ b/src/features/content/components/search/PaginationFooter.tsx @@ -0,0 +1 @@ +import React from "react"; import { ActivityIndicator, View } from "react-native"; export function PaginationFooter({loading}:{loading:boolean}){ return loading?:null; } diff --git a/src/features/content/components/search/SearchAttributeModal.tsx b/src/features/content/components/search/SearchAttributeModal.tsx new file mode 100644 index 0000000..b206a80 --- /dev/null +++ b/src/features/content/components/search/SearchAttributeModal.tsx @@ -0,0 +1,227 @@ +import React, { useEffect, useMemo, useState } from "react"; +import { + Modal, + Pressable, + ScrollView, + StyleSheet, + Text, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; + +import { Colors } from "@/theme"; + +export interface SearchAttributeOption { + attribute_key: string; + label: string; +} + +interface SearchAttributeModalProps { + visible: boolean; + fields: SearchAttributeOption[]; + selected: string[]; + onApply: (attributeKeys: string[]) => void; + onClose: () => void; +} + +export function SearchAttributeModal({ + visible, + fields, + selected, + onApply, + onClose, +}: SearchAttributeModalProps) { + const validKeys = useMemo(() => new Set(fields.map((item) => item.attribute_key)), [fields]); + const [draft, setDraft] = useState([]); + + useEffect(() => { + if (!visible) return; + setDraft(selected.filter((key) => validKeys.has(key))); + }, [selected, validKeys, visible]); + + const selectedSet = useMemo(() => new Set(draft), [draft]); + + const toggle = (key: string) => { + setDraft((current) => + current.includes(key) + ? current.filter((item) => item !== key) + : [...current, key], + ); + }; + + return ( + + + + + + + + Search in + + Choose which searchable attributes should participate in the text search. + Leave all unselected to search everywhere. + + + + + + + + + setDraft([])} + style={[styles.option, draft.length === 0 && styles.optionActive]} + > + + + All searchable attributes + + Search across all visible searchable attributes in this module. + + {draft.length === 0 ? ( + + ) : null} + + + {fields.map((field) => { + const active = selectedSet.has(field.attribute_key); + return ( + toggle(field.attribute_key)} + style={[styles.option, active && styles.optionActive]} + > + + + {field.label} + + + + + ); + })} + + + + setDraft([])} style={styles.secondaryButton}> + Reset to all + + { + onApply(draft); + onClose(); + }} + style={styles.primaryButton} + > + Apply search fields + + + + + + ); +} + +const styles = StyleSheet.create({ + overlay: { flex: 1, justifyContent: "flex-end" }, + scrim: { ...StyleSheet.absoluteFillObject, backgroundColor: "rgba(15,23,42,0.36)" }, + sheet: { + maxHeight: "82%", + borderTopLeftRadius: moderateScale(22), + borderTopRightRadius: moderateScale(22), + backgroundColor: Colors.surface, + overflow: "hidden", + }, + handle: { + alignSelf: "center", + width: moderateScale(42), + height: verticalScale(4), + marginTop: verticalScale(8), + borderRadius: 99, + backgroundColor: "#CBD5E1", + }, + header: { + flexDirection: "row", + alignItems: "flex-start", + gap: moderateScale(12), + paddingHorizontal: moderateScale(20), + paddingTop: verticalScale(14), + paddingBottom: verticalScale(10), + }, + headerText: { flex: 1 }, + title: { fontSize: moderateScale(18), fontWeight: "800", color: Colors.textPrimary }, + subtitle: { + marginTop: verticalScale(4), + fontSize: moderateScale(12), + lineHeight: moderateScale(17), + color: Colors.textSecondary, + }, + closeButton: { + width: moderateScale(34), + height: moderateScale(34), + alignItems: "center", + justifyContent: "center", + }, + content: { + gap: verticalScale(8), + paddingHorizontal: moderateScale(20), + paddingVertical: verticalScale(10), + }, + option: { + minHeight: verticalScale(54), + flexDirection: "row", + alignItems: "center", + gap: moderateScale(12), + paddingHorizontal: moderateScale(14), + paddingVertical: verticalScale(10), + borderWidth: 1, + borderColor: "#E2E8F0", + borderRadius: moderateScale(14), + backgroundColor: "#FFFFFF", + }, + optionActive: { borderColor: "#A7D7A9", backgroundColor: "#F1F8F1" }, + optionCopy: { flex: 1 }, + optionTitle: { fontSize: moderateScale(13.5), fontWeight: "700", color: Colors.textPrimary }, + optionTitleActive: { color: Colors.primaryDark }, + optionText: { marginTop: 2, fontSize: moderateScale(11.5), color: Colors.textSecondary }, + footer: { + flexDirection: "row", + gap: moderateScale(10), + paddingHorizontal: moderateScale(20), + paddingTop: verticalScale(12), + paddingBottom: verticalScale(16), + borderTopWidth: 1, + borderTopColor: "#E2E8F0", + backgroundColor: "#FFFFFF", + }, + secondaryButton: { + minWidth: moderateScale(104), + alignItems: "center", + justifyContent: "center", + paddingHorizontal: moderateScale(14), + paddingVertical: verticalScale(11), + borderRadius: moderateScale(12), + borderWidth: 1, + borderColor: "#CBD5E1", + }, + secondaryText: { fontSize: moderateScale(12.5), fontWeight: "700", color: Colors.textPrimary }, + primaryButton: { + flex: 1, + alignItems: "center", + justifyContent: "center", + paddingHorizontal: moderateScale(14), + paddingVertical: verticalScale(11), + borderRadius: moderateScale(12), + backgroundColor: Colors.primary, + }, + primaryText: { fontSize: moderateScale(12.5), fontWeight: "800", color: "#FFFFFF" }, +}); diff --git a/src/features/content/components/search/SearchHeader.tsx b/src/features/content/components/search/SearchHeader.tsx new file mode 100644 index 0000000..c2b2120 --- /dev/null +++ b/src/features/content/components/search/SearchHeader.tsx @@ -0,0 +1,3 @@ +import React from "react"; +import { TextInput, View } from "react-native"; +export function SearchHeader({value,onChangeText,placeholder="Search…"}:{value:string;onChangeText:(v:string)=>void;placeholder?:string}){ return ; } diff --git a/src/features/content/content-presentation.api.ts b/src/features/content/content-presentation.api.ts new file mode 100644 index 0000000..54aaa79 --- /dev/null +++ b/src/features/content/content-presentation.api.ts @@ -0,0 +1,40 @@ +import type { AxiosInstance } from "axios"; +import { request } from "@/api/http-client"; +import type { + ContentSearchRequest, + ContentSearchResponse, + ModuleContentSearchRequest, + ModuleContentSearchResponse, + ModuleSearchContractResponse, + TemplateContractResponse, +} from "../types/presentation.types"; + +export class ContentPresentationApi { + constructor(private readonly client: AxiosInstance) {} + + getTemplateContract(templateCode: string): Promise { + return request(this.client, { + method: "GET", + url: `/contents/templates/${encodeURIComponent(templateCode)}/contract`, + }); + } + + getModuleSearchContract(moduleCode: string): Promise { + return request(this.client, { + method: "GET", + url: `/contents/modules/${encodeURIComponent(moduleCode)}/search-contract`, + }); + } + + searchModuleContents(payload: ModuleContentSearchRequest): Promise { + return request(this.client, { method: "POST", url: "/contents/module-search", data: payload }); + } + + searchContents(payload: ContentSearchRequest): Promise { + return request(this.client, { + method: "POST", + url: "/contents/search", + data: payload, + }); + } +} diff --git a/src/features/content/content-presentation.query-keys.ts b/src/features/content/content-presentation.query-keys.ts new file mode 100644 index 0000000..fbd8405 --- /dev/null +++ b/src/features/content/content-presentation.query-keys.ts @@ -0,0 +1,55 @@ +import type { + ContentSearchRequest, + ModuleContentSearchRequest, + SearchCriterion, + SortCriterion, +} from "../types/presentation.types"; + +function normalizeFilters(filters: SearchCriterion[]) { + return filters.map((item) => ({ + attribute_key: item.attribute_key, + operator: item.operator, + value: item.value, + })); +} + +function normalizeSort(sort: SortCriterion[]) { + return sort.map((item) => ({ + field: item.field, + direction: item.direction, + })); +} + +export const contentPresentationQueryKeys = { + root: ["content", "presentation"] as const, + + templateContract: (templateCode: string) => + ["content", "presentation", "template", templateCode, "contract"] as const, + + moduleSearchContract: (moduleCode: string) => + ["content", "presentation", "module", moduleCode, "search-contract"] as const, + + moduleSearch: (request: Omit) => + [ + "content", "presentation", "module-search", + request.module_id ?? null, request.module_code ?? null, request.query ?? "", + [...(request.search_attributes ?? [])].sort(), request.logic, + normalizeFilters(request.filters), normalizeSort(request.sort), request.page_size, + ] as const, + + search: (request: Omit) => + [ + "content", + "presentation", + "search", + request.module_id ?? null, + request.module_code ?? null, + request.template_code, + request.query ?? "", + [...(request.search_attributes ?? [])].sort(), + request.logic, + normalizeFilters(request.filters), + normalizeSort(request.sort), + request.page_size, + ] as const, +}; diff --git a/src/features/content/hooks/index.ts b/src/features/content/hooks/index.ts new file mode 100644 index 0000000..e814e99 --- /dev/null +++ b/src/features/content/hooks/index.ts @@ -0,0 +1,5 @@ +export * from "./use-content-detail-screen"; +export * from "./use-content-search-infinite-query"; +export * from "./use-debounced-value"; +export * from "./use-single-template-content-query"; +export * from "./use-template-contract-query"; diff --git a/src/features/content/hooks/use-content-detail-screen.ts b/src/features/content/hooks/use-content-detail-screen.ts new file mode 100644 index 0000000..0b8c124 --- /dev/null +++ b/src/features/content/hooks/use-content-detail-screen.ts @@ -0,0 +1,35 @@ +import { useMemo } from "react"; +import { useModuleContentDetailQuery } from "./use-content-queries"; +import { useTemplateContractQuery } from "./use-template-contract-query"; + +export function useContentDetailScreen({ + moduleCode, + templateCode, + contentId, +}: { + moduleCode: string; + templateCode: string; + contentId: string; +}) { + const contractQuery = useTemplateContractQuery(templateCode); + const contentQuery = useModuleContentDetailQuery( + { module_code: moduleCode }, + contentId, + ); + + const moduleMismatch = useMemo(() => { + const contractModuleCode = contractQuery.data?.module_code?.trim(); + return Boolean(contractModuleCode && contractModuleCode !== moduleCode.trim()); + }, [contractQuery.data?.module_code, moduleCode]); + + return { + contractQuery, + contentQuery, + moduleMismatch, + isLoading: contractQuery.isLoading || contentQuery.isLoading, + isError: contractQuery.isError || contentQuery.isError || moduleMismatch, + refetch: async () => { + await Promise.all([contractQuery.refetch(), contentQuery.refetch()]); + }, + }; +} diff --git a/src/features/content/hooks/use-content-queries.ts b/src/features/content/hooks/use-content-queries.ts new file mode 100644 index 0000000..6782d34 --- /dev/null +++ b/src/features/content/hooks/use-content-queries.ts @@ -0,0 +1,125 @@ +import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; +import { contentApi } from "../api/content.client"; +import { contentQueryKeys } from "../api/content.query-keys"; +import { + ModuleRequest, + ModuleTemplateContentRequest, +} from "../types/content.types"; + +const hasModuleIdentity = (request: ModuleRequest) => + Boolean(request.module_id || request.module_code); + +export function useModulesQuery() { + return useQuery({ + queryKey: contentQueryKeys.modules(), + queryFn: () => contentApi.getModules(), + staleTime: 10 * 60 * 1000, + }); +} + +export function useModuleContentsQuery(request: ModuleRequest) { + return useQuery({ + queryKey: contentQueryKeys.moduleContents(request), + queryFn: () => contentApi.getModuleContents(request), + enabled: hasModuleIdentity(request), + }); +} + +export function useModuleTemplateContentsQuery( + request: ModuleTemplateContentRequest, +) { + const moduleRequest: ModuleRequest = { + module_id: request.module_id, + module_code: request.module_code, + }; + + return useQuery({ + queryKey: contentQueryKeys.moduleTemplateContents( + moduleRequest, + request.template_code, + ), + queryFn: () => contentApi.getModuleTemplateContents(request), + enabled: hasModuleIdentity(moduleRequest) && Boolean(request.template_code), + }); +} + +export function useModuleTemplateContentDetailsQuery( + request: ModuleTemplateContentRequest, +) { + const moduleRequest: ModuleRequest = { + module_id: request.module_id, + module_code: request.module_code, + }; + + return useQuery({ + queryKey: contentQueryKeys.moduleTemplateDetails( + moduleRequest, + request.template_code, + ), + queryFn: () => contentApi.getModuleTemplateContentDetails(request), + enabled: hasModuleIdentity(moduleRequest) && Boolean(request.template_code), + staleTime: 10 * 60 * 1000, + }); +} + +export function useContentQuery(contentId?: string | null) { + const id = contentId?.trim() ?? ""; + + return useQuery({ + queryKey: contentQueryKeys.contentDetail(id), + queryFn: () => contentApi.getContent(id), + enabled: Boolean(id), + staleTime: 15 * 60 * 1000, + }); +} + +export function useModuleContentDetailQuery( + request: ModuleRequest, + contentId?: string | null, +) { + const id = contentId?.trim() ?? ""; + + return useQuery({ + queryKey: contentQueryKeys.moduleContentDetail(request, id), + queryFn: () => contentApi.getModuleContentDetail(request, id), + enabled: hasModuleIdentity(request) && Boolean(id), + }); +} + +export function useTemplateDefinitionsQuery( + templateCode?: string | null, +) { + const code = templateCode?.trim() ?? ""; + + return useQuery({ + queryKey: contentQueryKeys.templateDefinitions(code), + queryFn: () => contentApi.getTemplateDefinitions(code), + enabled: Boolean(code), + staleTime: 30 * 60 * 1000, + }); +} + +export function usePublishContentMutation() { + const queryClient = useQueryClient(); + + return useMutation({ + mutationFn: ({ + contentId, + actorId, + }: { + contentId: string; + actorId: string; + }) => contentApi.publishContent(contentId, actorId), + + onSuccess: async (_data, variables) => { + await Promise.all([ + queryClient.invalidateQueries({ + queryKey: contentQueryKeys.contentDetail(variables.contentId), + }), + queryClient.invalidateQueries({ + queryKey: contentQueryKeys.root, + }), + ]); + }, + }); +} diff --git a/src/features/content/hooks/use-content-search-infinite-query.ts b/src/features/content/hooks/use-content-search-infinite-query.ts new file mode 100644 index 0000000..70e1fc6 --- /dev/null +++ b/src/features/content/hooks/use-content-search-infinite-query.ts @@ -0,0 +1,41 @@ +import { useInfiniteQuery } from "@tanstack/react-query"; +import { contentPresentationApi } from "../api/content-presentation.client"; +import { contentPresentationQueryKeys } from "../api/content-presentation.query-keys"; +import type { ContentSearchRequest } from "../types/presentation.types"; + +export type ContentSearchInfiniteRequest = Omit; + +function hasModuleIdentity(request: ContentSearchInfiniteRequest): boolean { + return Boolean(request.module_id || request.module_code); +} + +export function useContentSearchInfiniteQuery( + request: ContentSearchInfiniteRequest, + options?: { enabled?: boolean }, +) { + const enabled = + (options?.enabled ?? true) && + hasModuleIdentity(request) && + Boolean(request.template_code.trim()); + + return useInfiniteQuery({ + queryKey: contentPresentationQueryKeys.search(request), + initialPageParam: 1, + enabled, + queryFn: ({ pageParam, signal }) => { + // Axios 1.x cancellation is already propagated by TanStack Query only if + // your request wrapper accepts signal. The API call remains valid without it. + void signal; + return contentPresentationApi.searchContents({ + ...request, + page: pageParam, + }); + }, + getNextPageParam: (lastPage) => { + const loadedThrough = lastPage.page * lastPage.page_size; + return loadedThrough < lastPage.total ? lastPage.page + 1 : undefined; + }, + staleTime: 2 * 60 * 1000, + retry: 2, + }); +} diff --git a/src/features/content/hooks/use-debounced-value.ts b/src/features/content/hooks/use-debounced-value.ts new file mode 100644 index 0000000..a7fe471 --- /dev/null +++ b/src/features/content/hooks/use-debounced-value.ts @@ -0,0 +1,12 @@ +import { useEffect, useState } from "react"; + +export function useDebouncedValue(value: T, delayMs: number): T { + const [debouncedValue, setDebouncedValue] = useState(value); + + useEffect(() => { + const timer = setTimeout(() => setDebouncedValue(value), delayMs); + return () => clearTimeout(timer); + }, [value, delayMs]); + + return debouncedValue; +} diff --git a/src/features/content/hooks/use-module-content-search-infinite-query.ts b/src/features/content/hooks/use-module-content-search-infinite-query.ts new file mode 100644 index 0000000..89ea34e --- /dev/null +++ b/src/features/content/hooks/use-module-content-search-infinite-query.ts @@ -0,0 +1,20 @@ +import { useInfiniteQuery } from "@tanstack/react-query"; +import { contentPresentationApi } from "../api/content-presentation.client"; +import { contentPresentationQueryKeys } from "../api/content-presentation.query-keys"; +import type { ModuleContentSearchRequest } from "../types/presentation.types"; + +export type ModuleSearchInfiniteRequest = Omit; + +export function useModuleContentSearchInfiniteQuery( + request: ModuleSearchInfiniteRequest, + options?: { enabled?: boolean }, +) { + const enabled = (options?.enabled ?? true) && Boolean(request.module_id || request.module_code); + return useInfiniteQuery({ + queryKey: contentPresentationQueryKeys.moduleSearch(request), + initialPageParam: 1, + enabled, + queryFn: ({ pageParam }) => contentPresentationApi.searchModuleContents({ ...request, page: pageParam }), + getNextPageParam: (last) => last.page * last.page_size < last.total ? last.page + 1 : undefined, + }); +} diff --git a/src/features/content/hooks/use-module-display-name.ts b/src/features/content/hooks/use-module-display-name.ts new file mode 100644 index 0000000..aaa4ee9 --- /dev/null +++ b/src/features/content/hooks/use-module-display-name.ts @@ -0,0 +1,43 @@ +import { useMemo } from "react"; + +import { buildModuleTemplateReference } from "@/features/modules/module-index"; +import { buildContentReferenceRoute } from "../utils/content-reference"; +import { useModulesQuery } from "./use-content-queries"; + +export function useModuleDisplayName(moduleCode: string) { + const query = useModulesQuery(); + + const resolved = useMemo(() => { + const code = moduleCode.trim().toUpperCase(); + if (!code) { + return { + name: "Content", + homeRoute: "/modules", + }; + } + + const module = query.data?.modules?.find( + (item) => item.code.trim().toUpperCase() === code, + ); + + if (!module) { + return { + name: "Content", + homeRoute: "/modules", + }; + } + + return { + name: module.name?.trim() || "Content", + homeRoute: buildContentReferenceRoute( + buildModuleTemplateReference(module), + ), + }; + }, [moduleCode, query.data?.modules]); + + return { + ...resolved, + isLoading: query.isLoading, + isError: query.isError, + }; +} diff --git a/src/features/content/hooks/use-module-search-contract-query.ts b/src/features/content/hooks/use-module-search-contract-query.ts new file mode 100644 index 0000000..1c81817 --- /dev/null +++ b/src/features/content/hooks/use-module-search-contract-query.ts @@ -0,0 +1,15 @@ +import { useQuery } from "@tanstack/react-query"; +import { contentPresentationApi } from "../api/content-presentation.client"; +import { contentPresentationQueryKeys } from "../api/content-presentation.query-keys"; + +export function useModuleSearchContractQuery(moduleCode?: string | null) { + const code = moduleCode?.trim() ?? ""; + return useQuery({ + queryKey: contentPresentationQueryKeys.moduleSearchContract(code), + queryFn: () => contentPresentationApi.getModuleSearchContract(code), + enabled: Boolean(code), + staleTime: 30 * 60 * 1000, + gcTime: 60 * 60 * 1000, + retry: 2, + }); +} diff --git a/src/features/content/hooks/use-presentation-queries.ts b/src/features/content/hooks/use-presentation-queries.ts new file mode 100644 index 0000000..cacb650 --- /dev/null +++ b/src/features/content/hooks/use-presentation-queries.ts @@ -0,0 +1,5 @@ +import { useInfiniteQuery, useQuery } from "@tanstack/react-query"; +import { contentPresentationApi } from "../api/presentation.client"; +import { ContentSearchRequest } from "../types/presentation.types"; +export function useTemplateContractQuery(templateCode:string){return useQuery({queryKey:["content","template",templateCode,"contract"],queryFn:()=>contentPresentationApi.getTemplateContract(templateCode),enabled:Boolean(templateCode.trim()),staleTime:30*60*1000});} +export function useContentSearchInfiniteQuery(request:Omit){return useInfiniteQuery({queryKey:["content","search",request.module_id??request.module_code,request.template_code,request.query,request.logic,request.filters,request.sort,request.page_size],initialPageParam:1,queryFn:({pageParam})=>contentPresentationApi.searchContents({...request,page:pageParam}),getNextPageParam:(last)=>last.page*last.page_size; + media: import("../types/media.types").ContentMediaItem[]; + }; + +export function useSingleTemplateContentQuery({ + moduleCode, + templateCode, + enabled = true, +}: { + moduleCode: string; + templateCode: string; + enabled?: boolean; +}) { + const query = useModuleTemplateContentDetailsQuery({ + module_code: enabled ? moduleCode : "", + template_code: enabled ? templateCode : "", + }); + + const resolution = useMemo(() => { + if (!enabled || query.isLoading) return { status: "loading" }; + if (query.isError) return { status: "error", error: query.error }; + + const items = query.data?.items ?? []; + if (items.length === 0) return { status: "empty" }; + if (items.length !== 1) return { status: "invalid", count: items.length }; + + const item = items[0]; + return { + status: "ready", + content: { + id: item.content.id, + title: item.content.title, + slug: item.content.slug, + summary: item.content.summary, + }, + data: item.data, + media: item.media ?? [], + }; + }, [enabled, query.data, query.error, query.isError, query.isLoading]); + + return { + ...query, + resolution, + }; +} diff --git a/src/features/content/hooks/use-template-contract-query.ts b/src/features/content/hooks/use-template-contract-query.ts new file mode 100644 index 0000000..8ae1186 --- /dev/null +++ b/src/features/content/hooks/use-template-contract-query.ts @@ -0,0 +1,16 @@ +import { useQuery } from "@tanstack/react-query"; +import { contentPresentationApi } from "../api/content-presentation.client"; +import { contentPresentationQueryKeys } from "../api/content-presentation.query-keys"; + +export function useTemplateContractQuery(templateCode?: string | null) { + const code = templateCode?.trim() ?? ""; + + return useQuery({ + queryKey: contentPresentationQueryKeys.templateContract(code), + queryFn: () => contentPresentationApi.getTemplateContract(code), + enabled: Boolean(code), + staleTime: 30 * 60 * 1000, + gcTime: 60 * 60 * 1000, + retry: 2, + }); +} diff --git a/src/features/content/hooks/use-template-search-controller.ts b/src/features/content/hooks/use-template-search-controller.ts new file mode 100644 index 0000000..1b2bc2b --- /dev/null +++ b/src/features/content/hooks/use-template-search-controller.ts @@ -0,0 +1,68 @@ +import { useEffect, useMemo } from "react"; +import { useDebouncedValue } from "./use-debounced-value"; +import { useTemplateSearchStore } from "../store/template-search.store"; +import type { TemplateContractResponse } from "../types/presentation.types"; + +export function makeTemplateSearchScope(moduleCode: string, templateCode: string) { + return `${moduleCode.trim()}:${templateCode.trim()}`; +} + +export function useTemplateSearchController({ + moduleCode, + templateCode, + contract, + debounceMs = 350, +}: { + moduleCode: string; + templateCode: string; + contract: TemplateContractResponse; + debounceMs?: number; +}) { + const scope = useMemo( + () => makeTemplateSearchScope(moduleCode, templateCode), + [moduleCode, templateCode], + ); + + const initialize = useTemplateSearchStore((state) => state.initialize); + const query = useTemplateSearchStore( + (state) => state.scopes[scope]?.query ?? "", + ); + const logic = useTemplateSearchStore( + (state) => state.scopes[scope]?.logic ?? contract.search.default_logic, + ); + const filters = useTemplateSearchStore( + (state) => state.scopes[scope]?.filters ?? [], + ); + const sort = useTemplateSearchStore( + (state) => state.scopes[scope]?.sort ?? contract.search.default_sort, + ); + + const setQueryAction = useTemplateSearchStore((state) => state.setQuery); + const setLogicAction = useTemplateSearchStore((state) => state.setLogic); + const setFiltersAction = useTemplateSearchStore((state) => state.setFilters); + const setSortAction = useTemplateSearchStore((state) => state.setSort); + const resetAction = useTemplateSearchStore((state) => state.reset); + + useEffect(() => { + initialize(scope, { + logic: contract.search.default_logic, + sort: contract.search.default_sort, + }); + }, [contract.search.default_logic, contract.search.default_sort, initialize, scope]); + + const debouncedQuery = useDebouncedValue(query.trim(), debounceMs); + + return { + scope, + query, + debouncedQuery, + logic, + filters, + sort, + setQuery: (value: string) => setQueryAction(scope, value), + setLogic: (value: typeof logic) => setLogicAction(scope, value), + setFilters: (value: typeof filters) => setFiltersAction(scope, value), + setSort: (value: typeof sort) => setSortAction(scope, value), + reset: () => resetAction(scope), + }; +} diff --git a/src/features/content/index.ts b/src/features/content/index.ts new file mode 100644 index 0000000..020edd0 --- /dev/null +++ b/src/features/content/index.ts @@ -0,0 +1,7 @@ +export * from "./api/content.api"; +export * from "./api/content.client"; +export * from "./api/content.query-keys"; +export * from "./hooks/use-content-queries"; +export * from "./store/content.store"; +export * from "./types/content.types"; +export * from "./utils/attribute-definitions"; diff --git a/src/features/content/media/ContentMediaContext.tsx b/src/features/content/media/ContentMediaContext.tsx new file mode 100644 index 0000000..f807398 --- /dev/null +++ b/src/features/content/media/ContentMediaContext.tsx @@ -0,0 +1,22 @@ +import React, { createContext, useContext } from "react"; +import type { ContentMediaItem } from "../types/media.types"; + +const ContentMediaContext = createContext([]); + +export function ContentMediaProvider({ + media, + children, +}: { + media?: ContentMediaItem[] | null; + children: React.ReactNode; +}) { + return ( + + {children} + + ); +} + +export function useRelationalContentMedia(): ContentMediaItem[] { + return useContext(ContentMediaContext); +} diff --git a/src/features/content/media/ContentMediaGallery.tsx b/src/features/content/media/ContentMediaGallery.tsx new file mode 100644 index 0000000..ee3fc61 --- /dev/null +++ b/src/features/content/media/ContentMediaGallery.tsx @@ -0,0 +1,259 @@ +import { Ionicons } from "@expo/vector-icons"; +import React, { memo, useEffect, useMemo, useRef, useState } from "react"; +import { + ActivityIndicator, + FlatList, + Image, + NativeScrollEvent, + NativeSyntheticEvent, + Pressable, + StyleSheet, + Text, + useWindowDimensions, + View, +} from "react-native"; + +import { useAuthStore } from "@/store/auth.store"; +import { Colors } from "@/theme/colors"; +import { Spacing } from "@/theme/spacing"; +import type { ContentMediaItem } from "../types/media.types"; +import { FullScreenMediaViewer } from "./FullScreenMediaViewer"; +import { buildMediaImageSourceFromValues, mediaLabel } from "./media-source"; + +interface ContentMediaGalleryProps { + media?: ContentMediaItem[] | null; + title?: string; +} + +function sortMedia(media: ContentMediaItem[]): ContentMediaItem[] { + return [...media] + .filter((item) => item.url?.trim() || item.storage_key?.trim()) + .sort((a, b) => { + if (a.media_role === "primary" && b.media_role !== "primary") return -1; + if (b.media_role === "primary" && a.media_role !== "primary") return 1; + return a.sort_order - b.sort_order || a.id.localeCompare(b.id); + }); +} + +const GalleryImage = memo(function GalleryImage({ + item, + width, +}: { + item: ContentMediaItem; + width: number; +}) { + const token = useAuthStore((state) => state.accessToken); + const [loading, setLoading] = useState(true); + const [failed, setFailed] = useState(false); + + /** + * Memoize against primitive values only. + * + * React Query/backend hydration may replace the media object while keeping + * the effective URL unchanged. Depending on the whole object would rebuild + * `source`, causing React Native Web's to reload unnecessarily. + */ + const source = useMemo( + () => + buildMediaImageSourceFromValues( + item.url, + item.storage_key, + item.requires_auth, + token, + ), + [item.url, item.storage_key, item.requires_auth, token], + ); + + const sourceUri = + source && typeof source === "object" && !Array.isArray(source) + ? source.uri ?? null + : null; + + /** + * Loading state changes only when the actual image URI changes. + * Do NOT set loading=true in onLoadStart; on React Native Web that callback + * may fire again after a state-driven render and can create a visual loop. + */ + useEffect(() => { + setFailed(false); + setLoading(Boolean(sourceUri)); + }, [sourceUri]); + + if (!source) { + return ( + + + + Image unavailable + No media URL is available for this image. + + + ); + } + + return ( + + {failed ? ( + + + Image unavailable + + ) : ( + <> + setLoading(false)} + onError={() => { + setLoading(false); + setFailed(true); + }} + /> + {loading ? ( + + + + ) : null} + + )} + + ); +}, (previous, next) => + previous.width === next.width && + previous.item.id === next.item.id && + previous.item.url === next.item.url && + previous.item.storage_key === next.item.storage_key && + previous.item.requires_auth === next.item.requires_auth && + previous.item.alt_text === next.item.alt_text && + previous.item.caption === next.item.caption +); + +export function ContentMediaGallery({ media, title = "Images" }: ContentMediaGalleryProps) { + const items = useMemo(() => sortMedia(media ?? []), [media]); + const { width: windowWidth } = useWindowDimensions(); + const carouselWidth = Math.max(windowWidth - Spacing.md * 2, 280); + const [activeIndex, setActiveIndex] = useState(0); + const [viewerIndex, setViewerIndex] = useState(null); + const listRef = useRef>(null); + + if (!items.length) return null; + + const handleMomentumEnd = (event: NativeSyntheticEvent) => { + const next = Math.round(event.nativeEvent.contentOffset.x / carouselWidth); + setActiveIndex(Math.min(Math.max(next, 0), items.length - 1)); + }; + + return ( + + + {title} + {activeIndex + 1} / {items.length} + + + + item.id} + getItemLayout={(_data, index) => ({ + length: carouselWidth, + offset: carouselWidth * index, + index, + })} + onMomentumScrollEnd={handleMomentumEnd} + renderItem={({ item, index }) => ( + setViewerIndex(index)} + accessibilityRole="button" + accessibilityLabel={`Open ${mediaLabel(item, index)} in full screen`} + > + + + + View & zoom + + + )} + /> + + + {items[activeIndex]?.caption || items[activeIndex]?.alt_text ? ( + {mediaLabel(items[activeIndex], activeIndex)} + ) : null} + + {items.length > 1 ? ( + + {items.map((item, index) => ( + { + setActiveIndex(index); + listRef.current?.scrollToIndex({ index, animated: true }); + }} + hitSlop={6} + > + + + ))} + + ) : null} + + setViewerIndex(null)} + /> + + ); +} + +const styles = StyleSheet.create({ + root: { gap: 10 }, + headingRow: { flexDirection: "row", alignItems: "center", justifyContent: "space-between" }, + title: { color: Colors.textPrimary, fontSize: 18, fontWeight: "800" }, + count: { color: Colors.textSecondary, fontSize: 13, fontWeight: "600" }, + carousel: { + overflow: "hidden", + borderRadius: 16, + backgroundColor: Colors.surface, + borderWidth: StyleSheet.hairlineWidth, + borderColor: Colors.border, + }, + slide: { height: 260, alignItems: "center", justifyContent: "center" }, + image: { width: "100%", height: "100%", backgroundColor: Colors.surface }, + loadingOverlay: { + ...StyleSheet.absoluteFillObject, + alignItems: "center", + justifyContent: "center", + backgroundColor: Colors.surface, + }, + failedBox: { flex: 1, alignItems: "center", justifyContent: "center", gap: 8 }, + failedText: { color: Colors.textSecondary, fontSize: 14, fontWeight: "600" }, + failedDetail: { color: Colors.textSecondary, fontSize: 12, textAlign: "center", paddingHorizontal: 20 }, + zoomBadge: { + position: "absolute", + right: 12, + bottom: 12, + flexDirection: "row", + alignItems: "center", + gap: 6, + paddingHorizontal: 10, + paddingVertical: 7, + borderRadius: 18, + backgroundColor: "rgba(0,0,0,0.58)", + }, + zoomText: { color: Colors.white, fontSize: 12, fontWeight: "700" }, + caption: { color: Colors.textSecondary, fontSize: 13, lineHeight: 19, textAlign: "center" }, + dots: { flexDirection: "row", flexWrap: "wrap", justifyContent: "center", gap: 7 }, + dot: { width: 7, height: 7, borderRadius: 4, backgroundColor: Colors.border }, + dotActive: { width: 18, backgroundColor: Colors.primary }, +}); diff --git a/src/features/content/media/FullScreenMediaViewer.tsx b/src/features/content/media/FullScreenMediaViewer.tsx new file mode 100644 index 0000000..78f5464 --- /dev/null +++ b/src/features/content/media/FullScreenMediaViewer.tsx @@ -0,0 +1,150 @@ +import { Ionicons } from "@expo/vector-icons"; +import React, { useEffect, useRef, useState } from "react"; +import { + FlatList, + Modal, + Pressable, + StyleSheet, + Text, + useWindowDimensions, + View, + ViewToken, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; + +import { useAuthStore } from "@/store/auth.store"; +import { Colors } from "@/theme/colors"; +import type { ContentMediaItem } from "../types/media.types"; +import { mediaLabel } from "./media-source"; +import { ZoomableImage } from "./ZoomableImage"; + +interface FullScreenMediaViewerProps { + visible: boolean; + images: ContentMediaItem[]; + initialIndex: number; + onClose: () => void; +} + +export function FullScreenMediaViewer({ + visible, + images, + initialIndex, + onClose, +}: FullScreenMediaViewerProps) { + const listRef = useRef>(null); + const { width, height } = useWindowDimensions(); + const accessToken = useAuthStore((state) => state.accessToken); + const [activeIndex, setActiveIndex] = useState(initialIndex); + const [zoomed, setZoomed] = useState(false); + + useEffect(() => { + if (!visible) return; + const nextIndex = Math.min(Math.max(initialIndex, 0), Math.max(images.length - 1, 0)); + setActiveIndex(nextIndex); + setZoomed(false); + requestAnimationFrame(() => { + listRef.current?.scrollToIndex({ index: nextIndex, animated: false }); + }); + }, [images.length, initialIndex, visible]); + + const onViewableItemsChanged = useRef( + ({ viewableItems }: { viewableItems: ViewToken[] }) => { + const index = viewableItems.find((item) => item.isViewable)?.index; + if (typeof index === "number") { + setActiveIndex(index); + setZoomed(false); + } + }, + ).current; + + if (!images.length) return null; + + const active = images[activeIndex]; + + return ( + + + + + {activeIndex + 1} / {images.length} + + [styles.closeButton, pressed && styles.pressed]} + > + + + + + item.id} + initialScrollIndex={Math.min(initialIndex, Math.max(images.length - 1, 0))} + getItemLayout={(_data, index) => ({ length: width, offset: width * index, index })} + onScrollToIndexFailed={(info) => { + requestAnimationFrame(() => { + listRef.current?.scrollToOffset({ offset: info.index * width, animated: false }); + }); + }} + viewabilityConfig={{ itemVisiblePercentThreshold: 60 }} + onViewableItemsChanged={onViewableItemsChanged} + renderItem={({ item, index }) => ( + + )} + /> + + + + {mediaLabel(active, activeIndex)} + + Pinch or double-tap to zoom + + + + ); +} + +const styles = StyleSheet.create({ + root: { flex: 1, backgroundColor: Colors.black }, + toolbar: { + height: 58, + paddingHorizontal: 16, + flexDirection: "row", + alignItems: "center", + justifyContent: "space-between", + }, + counter: { color: Colors.white, fontSize: 15, fontWeight: "700" }, + closeButton: { + width: 44, + height: 44, + borderRadius: 22, + alignItems: "center", + justifyContent: "center", + backgroundColor: "rgba(255,255,255,0.12)", + }, + pressed: { opacity: 0.65 }, + footer: { minHeight: 94, paddingHorizontal: 20, paddingTop: 12, paddingBottom: 18 }, + caption: { color: Colors.white, fontSize: 15, lineHeight: 21, textAlign: "center" }, + hint: { marginTop: 7, color: "#AFAFAF", fontSize: 12, textAlign: "center" }, +}); diff --git a/src/features/content/media/ZoomableImage.tsx b/src/features/content/media/ZoomableImage.tsx new file mode 100644 index 0000000..6a7b810 --- /dev/null +++ b/src/features/content/media/ZoomableImage.tsx @@ -0,0 +1,235 @@ +import React, { memo, useEffect, useMemo, useState } from "react"; +import { ActivityIndicator, Image, StyleSheet, Text, View } from "react-native"; +import { Gesture, GestureDetector } from "react-native-gesture-handler"; +import Animated, { + runOnJS, + useAnimatedStyle, + useSharedValue, + withTiming, +} from "react-native-reanimated"; + +import { Colors } from "@/theme/colors"; +import type { ContentMediaItem } from "../types/media.types"; +import { buildMediaImageSourceFromValues } from "./media-source"; + +const MIN_SCALE = 1; +const MAX_SCALE = 4; +const DOUBLE_TAP_SCALE = 2.5; + +interface ZoomableImageProps { + item: ContentMediaItem; + accessToken: string | null; + width: number; + height: number; + active: boolean; + onZoomStateChange?: (zoomed: boolean) => void; +} + +function clamp(value: number, min: number, max: number): number { + "worklet"; + return Math.min(Math.max(value, min), max); +} + +export const ZoomableImage = memo(function ZoomableImage({ + item, + accessToken, + width, + height, + active, + onZoomStateChange, +}: ZoomableImageProps) { + const scale = useSharedValue(1); + const savedScale = useSharedValue(1); + const translateX = useSharedValue(0); + const translateY = useSharedValue(0); + const savedX = useSharedValue(0); + const savedY = useSharedValue(0); + + const [loading, setLoading] = useState(true); + const [failed, setFailed] = useState(false); + const [isZoomed, setIsZoomed] = useState(false); + + const source = useMemo( + () => + buildMediaImageSourceFromValues( + item.url, + item.storage_key, + item.requires_auth, + accessToken, + ), + [item.url, item.storage_key, item.requires_auth, accessToken], + ); + + const sourceUri = + source && typeof source === "object" && !Array.isArray(source) + ? source.uri ?? null + : null; + + useEffect(() => { + setFailed(false); + setLoading(Boolean(sourceUri)); + }, [sourceUri]); + + const notifyZoom = (zoomed: boolean) => { + setIsZoomed(zoomed); + onZoomStateChange?.(zoomed); + }; + + const reset = () => { + "worklet"; + scale.value = withTiming(1); + savedScale.value = 1; + translateX.value = withTiming(0); + translateY.value = withTiming(0); + savedX.value = 0; + savedY.value = 0; + }; + + useEffect(() => { + if (!active) { + scale.value = 1; + savedScale.value = 1; + translateX.value = 0; + translateY.value = 0; + savedX.value = 0; + savedY.value = 0; + setIsZoomed(false); + onZoomStateChange?.(false); + } + }, [active, onZoomStateChange, savedScale, savedX, savedY, scale, translateX, translateY]); + + const pinch = Gesture.Pinch() + .onBegin(() => { + runOnJS(notifyZoom)(true); + }) + .onUpdate((event) => { + scale.value = clamp(savedScale.value * event.scale, MIN_SCALE, MAX_SCALE); + }) + .onEnd(() => { + savedScale.value = scale.value; + if (scale.value <= 1.01) { + reset(); + runOnJS(notifyZoom)(false); + } + }); + + const pan = Gesture.Pan() + .enabled(isZoomed) + .maxPointers(1) + .onUpdate((event) => { + if (scale.value <= 1) return; + const maxX = ((scale.value - 1) * width) / 2; + const maxY = ((scale.value - 1) * height) / 2; + translateX.value = clamp(savedX.value + event.translationX, -maxX, maxX); + translateY.value = clamp(savedY.value + event.translationY, -maxY, maxY); + }) + .onEnd(() => { + savedX.value = translateX.value; + savedY.value = translateY.value; + }); + + const doubleTap = Gesture.Tap() + .numberOfTaps(2) + .maxDuration(250) + .onEnd((_event, success) => { + if (!success) return; + if (scale.value > 1.01) { + reset(); + runOnJS(notifyZoom)(false); + } else { + scale.value = withTiming(DOUBLE_TAP_SCALE); + savedScale.value = DOUBLE_TAP_SCALE; + runOnJS(notifyZoom)(true); + } + }); + + const gesture = Gesture.Race(doubleTap, Gesture.Simultaneous(pinch, pan)); + + const animatedStyle = useAnimatedStyle(() => ({ + transform: [ + { translateX: translateX.value }, + { translateY: translateY.value }, + { scale: scale.value }, + ], + })); + + if (!source) { + return ( + + + Image unavailable + No media URL is available for this image. + + + ); + } + + return ( + + {loading && !failed ? ( + + + + ) : null} + + {failed ? ( + + Unable to load image + Check your connection and try again. + + ) : ( + + + setLoading(false)} + onError={() => { + setLoading(false); + setFailed(true); + }} + /> + + + )} + + );; +}, (previous, next) => + previous.item.id === next.item.id && + previous.item.url === next.item.url && + previous.item.storage_key === next.item.storage_key && + previous.item.requires_auth === next.item.requires_auth && + previous.accessToken === next.accessToken && + previous.width === next.width && + previous.height === next.height && + previous.active === next.active && + previous.onZoomStateChange === next.onZoomStateChange +); + +const styles = StyleSheet.create({ + frame: { + overflow: "hidden", + alignItems: "center", + justifyContent: "center", + backgroundColor: Colors.black, + }, + imageWrap: { width: "100%", height: "100%" }, + image: { width: "100%", height: "100%" }, + loader: { + ...StyleSheet.absoluteFillObject, + zIndex: 2, + alignItems: "center", + justifyContent: "center", + }, + error: { + paddingHorizontal: 24, + alignItems: "center", + justifyContent: "center", + }, + errorTitle: { color: Colors.white, fontSize: 16, fontWeight: "700" }, + errorText: { marginTop: 6, color: "#C7C7C7", fontSize: 13, textAlign: "center" }, +}); diff --git a/src/features/content/media/index.ts b/src/features/content/media/index.ts new file mode 100644 index 0000000..9d9da07 --- /dev/null +++ b/src/features/content/media/index.ts @@ -0,0 +1,5 @@ +export * from "./ContentMediaGallery"; +export * from "./FullScreenMediaViewer"; +export * from "./ZoomableImage"; + +export * from "./ContentMediaContext"; diff --git a/src/features/content/media/media-source.ts b/src/features/content/media/media-source.ts new file mode 100644 index 0000000..bec3ab1 --- /dev/null +++ b/src/features/content/media/media-source.ts @@ -0,0 +1,88 @@ +import type { ImageSourcePropType } from "react-native"; +import type { ContentMediaItem } from "../types/media.types"; + +/** + * Resolve the final media URI using only primitive fields. + * + * Keeping URI resolution separate from ImageSource creation allows callers + * to memoize against stable primitive values rather than the entire media + * object returned by React Query. + */ +export function resolveMediaUri( + url?: string | null, + storageKey?: string | null, +): string | null { + const directUrl = url?.trim() ?? ""; + + if (directUrl) { + return directUrl; + } + + const mediaBaseUrl = (process.env.EXPO_PUBLIC_MEDIA_BASE_URL ?? "") + .trim() + .replace(/\/+$/, ""); + + const normalizedStorageKey = (storageKey ?? "") + .trim() + .replace(/^\/+/, ""); + + if (!mediaBaseUrl || !normalizedStorageKey) { + return null; + } + + return `${mediaBaseUrl}/${normalizedStorageKey}`; +} + +/** + * Build an image source without throwing during render. + * + * IMPORTANT: callers should memoize this using primitive dependencies: + * `url`, `storage_key`, `requires_auth`, and `accessToken`. + */ +export function buildMediaImageSourceFromValues( + url: string | null | undefined, + storageKey: string | null | undefined, + requiresAuth: boolean | null | undefined, + accessToken: string | null, +): ImageSourcePropType | null { + const uri = resolveMediaUri(url, storageKey); + + if (!uri) { + return null; + } + + if (requiresAuth && accessToken) { + return { + uri, + headers: { + Authorization: `Bearer ${accessToken}`, + }, + }; + } + + return { uri }; +} + +/** + * Backward-compatible helper. + */ +export function buildMediaImageSource( + item: ContentMediaItem, + accessToken: string | null, +): ImageSourcePropType | null { + return buildMediaImageSourceFromValues( + item.url, + item.storage_key, + item.requires_auth, + accessToken, + ); +} + +export function mediaLabel(item: ContentMediaItem, index: number): string { + return ( + item.alt_text?.trim() || + item.caption?.trim() || + item.usage_type.replace(/_/g, " ").trim() || + `Image ${index + 1}` + ); +} diff --git a/src/features/content/presentation.types.ts b/src/features/content/presentation.types.ts new file mode 100644 index 0000000..d943a2e --- /dev/null +++ b/src/features/content/presentation.types.ts @@ -0,0 +1,169 @@ +export type PresentationMode = "collection" | "single"; +export type LogicalOperator = "and" | "or"; +export type SortDirection = "asc" | "desc"; +export type EmptyBehavior = "hide" | "show"; +export type AttributeVisibility = "show" | "hide"; + +export type SearchOperator = + | "eq" + | "neq" + | "contains" + | "starts_with" + | "in" + | "gt" + | "gte" + | "lt" + | "lte"; + +export type CollectionItemLinkAction = "content_detail" | "template"; + +/** + * Legacy compatibility extension. + * + * The current backend TemplateContractResponse does not emit item_link. + * The UI keeps this optional shape so previously configured clients do not + * lose their navigation behavior if the backend restores the field later. + */ +export interface CollectionItemLinkContract { + action: CollectionItemLinkAction; + target_template_code?: string | null; + target_content_id_attribute?: string | null; +} + +export interface TemplateRendererContract { + collection?: string | null; + collection_item?: string | null; + detail: string; +} + +export interface TemplateAttributePresentationContract { + attribute_key: string; + visibility: AttributeVisibility; + empty_behavior: EmptyBehavior; + empty_text?: string | null; +} + +export interface TemplatePresentationContract { + mode: PresentationMode; + renderers: TemplateRendererContract; + attributes: TemplateAttributePresentationContract[]; + item_link?: CollectionItemLinkContract | null; +} + +export interface SearchFieldContract { + attribute_key: string; + label: string; + operators: SearchOperator[]; + renderer_hint?: string | null; + allowed_values?: unknown[] | null; +} + +export interface SortFieldContract { + field: string; + label: string; +} + +export interface SortCriterion { + field: string; + direction: SortDirection; +} + +export interface SearchProfileContract { + free_text_enabled: boolean; + default_logic: LogicalOperator; + fields: SearchFieldContract[]; + sort_fields: SortFieldContract[]; + default_sort: SortCriterion[]; +} + +export interface TemplateContractResponse { + template_code: string; + module_code?: string | null; + presentation: TemplatePresentationContract; + search: SearchProfileContract; +} + +export interface SearchCriterion { + attribute_key: string; + operator: SearchOperator; + value: unknown; +} + +export interface ContentSearchRequest { + module_id?: string; + module_code?: string; + template_code: string; + query?: string; + search_attributes?: string[]; + logic: LogicalOperator; + filters: SearchCriterion[]; + sort: SortCriterion[]; + page: number; + page_size: number; +} + +export interface SearchContentItem { + id: string; + content_kind?: string | null; + title: string; + slug: string; + summary?: string | null; + attributes: Record; +} + +export interface ContentSearchResponse { + page: number; + page_size: number; + total: number; + items: SearchContentItem[]; +} + +export interface ModuleSearchFieldContract { + attribute_key: string; + label: string; + template_code: string; + template_name: string; + data_type?: string | null; + is_searchable: boolean; + is_filterable: boolean; + operators: SearchOperator[]; + default_operator?: SearchOperator | null; + renderer_hint?: string | null; + allowed_values?: unknown[] | null; +} + +export interface ModuleSearchContractResponse { + module_code: string; + fields: ModuleSearchFieldContract[]; + sort_fields: SortFieldContract[]; + default_sort: SortCriterion[]; +} + +export interface ModuleContentSearchRequest { + module_id?: string; + module_code?: string; + query?: string; + search_attributes?: string[]; + logic: LogicalOperator; + filters: SearchCriterion[]; + sort: SortCriterion[]; + page: number; + page_size: number; +} + +export interface ModuleSearchContentItem { + id: string; + template_code: string; + template_name: string; + content_kind?: string | null; + title: string; + slug: string; + summary?: string | null; +} + +export interface ModuleContentSearchResponse { + page: number; + page_size: number; + total: number; + items: ModuleSearchContentItem[]; +} diff --git a/src/features/content/renderers/GenericCardRenderer.tsx b/src/features/content/renderers/GenericCardRenderer.tsx new file mode 100644 index 0000000..790b5d9 --- /dev/null +++ b/src/features/content/renderers/GenericCardRenderer.tsx @@ -0,0 +1,6 @@ +import React from "react"; +import { Pressable, Text, View } from "react-native"; +import { CollectionItemRendererProps } from "../types/renderer.types"; +export function GenericCardRenderer({ item, onPress }: CollectionItemRendererProps) { + return {item.title}{item.summary ? {item.summary} : null}; +} diff --git a/src/features/content/renderers/GenericCollectionRenderer.tsx b/src/features/content/renderers/GenericCollectionRenderer.tsx new file mode 100644 index 0000000..fc390ff --- /dev/null +++ b/src/features/content/renderers/GenericCollectionRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { FlatList, Text, View } from "react-native"; +import { CollectionRendererProps } from "../types/renderer.types"; +export function GenericCollectionRenderer({ result, isLoading, isFetchingNextPage, onLoadMore, renderItem }: CollectionRendererProps) { + if (isLoading) return Loading...; + return item.id} renderItem={({item})=>renderItem({item,onPress:()=>undefined})} onEndReached={onLoadMore} onEndReachedThreshold={0.4} ListFooterComponent={isFetchingNextPage?Loading more...:null}/>; +} diff --git a/src/features/content/renderers/GenericDetailRenderer.tsx b/src/features/content/renderers/GenericDetailRenderer.tsx new file mode 100644 index 0000000..fc6c243 --- /dev/null +++ b/src/features/content/renderers/GenericDetailRenderer.tsx @@ -0,0 +1,6 @@ +import React from "react"; +import { ScrollView, Text, View } from "react-native"; +import { DetailRendererProps } from "../types/renderer.types"; +export function GenericDetailRenderer({ content, data }: DetailRendererProps) { + return {content.title}{Object.entries(data).map(([key,value])=>{key}{JSON.stringify(value,null,2)})}; +} diff --git a/src/features/content/renderers/acupuncture/AcuPointCardRenderer.tsx b/src/features/content/renderers/acupuncture/AcuPointCardRenderer.tsx new file mode 100644 index 0000000..6edc7b2 --- /dev/null +++ b/src/features/content/renderers/acupuncture/AcuPointCardRenderer.tsx @@ -0,0 +1,8 @@ +import React from "react"; +import { Pressable, Text, View } from "react-native"; +import { CollectionItemRendererProps } from "../../types/renderer.types"; +export function AcuPointCardRenderer({ item, onPress }: CollectionItemRendererProps) { + const code=typeof item.attributes.point_code==="string"?item.attributes.point_code:""; + const meridian=typeof item.attributes.meridian==="string"?item.attributes.meridian:""; + return {code}{item.title}{meridian?{meridian}:null}; +} diff --git a/src/features/content/renderers/acupuncture/AcuPointDetailRenderer.tsx b/src/features/content/renderers/acupuncture/AcuPointDetailRenderer.tsx new file mode 100644 index 0000000..73bc7c6 --- /dev/null +++ b/src/features/content/renderers/acupuncture/AcuPointDetailRenderer.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import { ScrollView, Text, View } from "react-native"; +import { DetailRendererProps } from "../../types/renderer.types"; +const Section=({title,children}:{title:string;children:React.ReactNode})=>{title}{children}; +export function AcuPointDetailRenderer({ content, data }: DetailRendererProps) { + const pointCode=typeof data.point_code==="string"?data.point_code:""; + const location=typeof data.location==="string"?data.location:""; + const indications=Array.isArray(data.indications)?data.indications:[]; + return {pointCode}{content.title}{location?
{location}
:null}{indications.length?
{indications.map((x,i)=>• {String(x)})}
:null}
; +} diff --git a/src/features/content/renderers/collections/EovRenderers.tsx b/src/features/content/renderers/collections/EovRenderers.tsx new file mode 100644 index 0000000..3e331c8 --- /dev/null +++ b/src/features/content/renderers/collections/EovRenderers.tsx @@ -0,0 +1,11 @@ +import React from "react"; +import { Pressable, Text, View } from "react-native"; +import { asNumber, asString, asStringArray } from "../helpers/value"; +import { CollectionScaffold } from "../shared/CollectionScaffold"; +import { ContentCountBadge } from "../shared/ContentCountBadge"; +import { ChipList } from "../shared/ChipList"; +import type { CollectionItemRendererProps, CollectionRendererProps } from "../../types/renderer.types"; +export function EovIndexCollectionRenderer(props:CollectionRendererProps){ return ; } +export function EovCollectionRenderer(props:CollectionRendererProps){ return ; } +export function EovIndexCardRenderer({item,onPress}:CollectionItemRendererProps){ const a=item.attributes; return {asString(a.name)||item.title}{asString(a.code)}; } +export function EovCardRenderer({item,onPress}:CollectionItemRendererProps){ const a=item.attributes; return {asString(a.name)||item.title}Master: {asString(a.master_point)} · Paired: {asString(a.paired_meridian)}; } diff --git a/src/features/content/renderers/collections/MeridianRenderers.tsx b/src/features/content/renderers/collections/MeridianRenderers.tsx new file mode 100644 index 0000000..f8e0d93 --- /dev/null +++ b/src/features/content/renderers/collections/MeridianRenderers.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import { Pressable, Text, View } from "react-native"; +import { asNumber, asString, asStringArray } from "../helpers/value"; +import { CollectionScaffold } from "../shared/CollectionScaffold"; +import { ContentCountBadge } from "../shared/ContentCountBadge"; +import type { CollectionItemRendererProps, CollectionRendererProps } from "../../types/renderer.types"; +export function MeridianIndexCollectionRenderer(props:CollectionRendererProps){ return ; } +export function MeridianCollectionRenderer(props:CollectionRendererProps){ return ; } +export function MeridianIndexCardRenderer({item,onPress}:CollectionItemRendererProps){ const a=item.attributes; return {asString(a.name)||item.title}{asString(a.code)}; } +export function MeridianCardRenderer({item,onPress}:CollectionItemRendererProps){ const a=item.attributes; return {asString(a.title)||item.title}{asString(a.name)}{asStringArray(a.point_codes).length} referenced points; } diff --git a/src/features/content/renderers/collections/ModuleCatalogRenderers.tsx b/src/features/content/renderers/collections/ModuleCatalogRenderers.tsx new file mode 100644 index 0000000..1130705 --- /dev/null +++ b/src/features/content/renderers/collections/ModuleCatalogRenderers.tsx @@ -0,0 +1,8 @@ +import React from "react"; +import { Pressable, Text, View } from "react-native"; +import { asNumber, asString } from "../helpers/value"; +import { CollectionScaffold } from "../shared/CollectionScaffold"; +import { ContentCountBadge } from "../shared/ContentCountBadge"; +import type { CollectionItemRendererProps, CollectionRendererProps } from "../../types/renderer.types"; +export function ModuleCatalogCollectionRenderer(props: CollectionRendererProps){ return ; } +export function ModuleCatalogCardRenderer({item,onPress}:CollectionItemRendererProps){ const a=item.attributes; return {asString(a.name)||item.title}{asString(a.content_label)}›; } diff --git a/src/features/content/renderers/collections/PointCategoryRenderers.tsx b/src/features/content/renderers/collections/PointCategoryRenderers.tsx new file mode 100644 index 0000000..ec882c8 --- /dev/null +++ b/src/features/content/renderers/collections/PointCategoryRenderers.tsx @@ -0,0 +1,8 @@ +import React from "react"; +import { Pressable, Text, View } from "react-native"; +import { asNumber, asString } from "../helpers/value"; +import { CollectionScaffold } from "../shared/CollectionScaffold"; +import { ContentCountBadge } from "../shared/ContentCountBadge"; +import type { CollectionItemRendererProps, CollectionRendererProps } from "../../types/renderer.types"; +export function PointCategoryIndexCollectionRenderer(props:CollectionRendererProps){ return ; } +export function PointCategoryIndexCardRenderer({item,onPress}:CollectionItemRendererProps){ const a=item.attributes; return {asString(a.name)||item.title}›; } diff --git a/src/features/content/renderers/collections/PointRenderers.tsx b/src/features/content/renderers/collections/PointRenderers.tsx new file mode 100644 index 0000000..2c0f174 --- /dev/null +++ b/src/features/content/renderers/collections/PointRenderers.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import { Pressable, Text, View } from "react-native"; +import { asString, asStringArray } from "../helpers/value"; +import { CollectionScaffold } from "../shared/CollectionScaffold"; +import { ChipList } from "../shared/ChipList"; +import type { CollectionItemRendererProps, CollectionRendererProps } from "../../types/renderer.types"; +export function AcuPointIndexCollectionRenderer(props:CollectionRendererProps){ return ; } +export function AcuPointCollectionRenderer(props:CollectionRendererProps){ return ; } +export function AcuPointIndexCardRenderer({item,onPress}:CollectionItemRendererProps){ const a=item.attributes; return {asString(a.code)||item.title}{asString(a.alt_name_1)}{asString(a.alt_name_2)}; } +export function AcuPointCardRenderer({item,onPress}:CollectionItemRendererProps){ const a=item.attributes; return {asString(a.code)}{item.title}{asString(a.channel)}; } diff --git a/src/features/content/renderers/details/AcuPointDetailRenderer.tsx b/src/features/content/renderers/details/AcuPointDetailRenderer.tsx new file mode 100644 index 0000000..7f8fb4d --- /dev/null +++ b/src/features/content/renderers/details/AcuPointDetailRenderer.tsx @@ -0,0 +1,6 @@ +import React from "react"; +import { ScrollView, Text } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asRecord, asRecordArray, asString, asStringArray } from "../helpers/value"; +import { Hero } from "../shared/Hero"; import { SectionCard } from "../shared/SectionCard"; import { ChipList } from "../shared/ChipList"; import { BulletList } from "../shared/BulletList"; import { KeyValueGrid } from "../shared/KeyValueGrid"; import { ObjectSections } from "../shared/ObjectSections"; import { ImageGallery } from "../shared/ImageGallery"; +export function AcuPointDetailRenderer({content,data}:DetailRendererProps){ const methods=asRecord(data.methods); return {asString(data.channel)}{asString(data.location)}{asString(data.location_note)?{asString(data.location_note)}:null}{asString(data.caution)?{asString(data.caution)}:null}; } diff --git a/src/features/content/renderers/details/BackShuDetailRenderer.tsx b/src/features/content/renderers/details/BackShuDetailRenderer.tsx new file mode 100644 index 0000000..18ff1f9 --- /dev/null +++ b/src/features/content/renderers/details/BackShuDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function BackShuDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/ConfluentPointsDetailRenderer.tsx b/src/features/content/renderers/details/ConfluentPointsDetailRenderer.tsx new file mode 100644 index 0000000..f530639 --- /dev/null +++ b/src/features/content/renderers/details/ConfluentPointsDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function ConfluentPointsDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/EntryExitPointsDetailRenderer.tsx b/src/features/content/renderers/details/EntryExitPointsDetailRenderer.tsx new file mode 100644 index 0000000..51581c3 --- /dev/null +++ b/src/features/content/renderers/details/EntryExitPointsDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function EntryExitPointsDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/EovDetailRenderer.tsx b/src/features/content/renderers/details/EovDetailRenderer.tsx new file mode 100644 index 0000000..597129d --- /dev/null +++ b/src/features/content/renderers/details/EovDetailRenderer.tsx @@ -0,0 +1,6 @@ +import React from "react"; +import { ScrollView, Text } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asRecordArray, asString, asStringArray } from "../helpers/value"; +import { Hero } from "../shared/Hero"; import { SectionCard } from "../shared/SectionCard"; import { ChipList } from "../shared/ChipList"; import { BulletList } from "../shared/BulletList"; import { KeyValueGrid } from "../shared/KeyValueGrid"; import { ImageGallery } from "../shared/ImageGallery"; +export function EovDetailRenderer({content,data}:DetailRendererProps){ return {asString(data.pathway)}; } diff --git a/src/features/content/renderers/details/FiveShuDetailRenderer.tsx b/src/features/content/renderers/details/FiveShuDetailRenderer.tsx new file mode 100644 index 0000000..0297e31 --- /dev/null +++ b/src/features/content/renderers/details/FiveShuDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function FiveShuDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/FourSeasDetailRenderer.tsx b/src/features/content/renderers/details/FourSeasDetailRenderer.tsx new file mode 100644 index 0000000..f9800f8 --- /dev/null +++ b/src/features/content/renderers/details/FourSeasDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function FourSeasDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/FrontMuDetailRenderer.tsx b/src/features/content/renderers/details/FrontMuDetailRenderer.tsx new file mode 100644 index 0000000..200a0bd --- /dev/null +++ b/src/features/content/renderers/details/FrontMuDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function FrontMuDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/GaoWuCommandDetailRenderer.tsx b/src/features/content/renderers/details/GaoWuCommandDetailRenderer.tsx new file mode 100644 index 0000000..39ad466 --- /dev/null +++ b/src/features/content/renderers/details/GaoWuCommandDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function GaoWuCommandDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/GhostPointsDetailRenderer.tsx b/src/features/content/renderers/details/GhostPointsDetailRenderer.tsx new file mode 100644 index 0000000..f4a9092 --- /dev/null +++ b/src/features/content/renderers/details/GhostPointsDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function GhostPointsDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/HoraryPointsDetailRenderer.tsx b/src/features/content/renderers/details/HoraryPointsDetailRenderer.tsx new file mode 100644 index 0000000..a1ab370 --- /dev/null +++ b/src/features/content/renderers/details/HoraryPointsDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function HoraryPointsDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/HuiMeetingDetailRenderer.tsx b/src/features/content/renderers/details/HuiMeetingDetailRenderer.tsx new file mode 100644 index 0000000..c5614ec --- /dev/null +++ b/src/features/content/renderers/details/HuiMeetingDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function HuiMeetingDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/IndexEntryDetailRenderer.tsx b/src/features/content/renderers/details/IndexEntryDetailRenderer.tsx new file mode 100644 index 0000000..45bd2b3 --- /dev/null +++ b/src/features/content/renderers/details/IndexEntryDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { KeyValueGrid } from "../shared/KeyValueGrid"; +export function IndexEntryDetailRenderer({content,data}:DetailRendererProps){ return typeof v==="string"||typeof v==="number").map(([k,v])=>({label:k,value:String(v)}))}/>; } diff --git a/src/features/content/renderers/details/LowerHeSeaDetailRenderer.tsx b/src/features/content/renderers/details/LowerHeSeaDetailRenderer.tsx new file mode 100644 index 0000000..c51f84b --- /dev/null +++ b/src/features/content/renderers/details/LowerHeSeaDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function LowerHeSeaDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/LuoConnectingDetailRenderer.tsx b/src/features/content/renderers/details/LuoConnectingDetailRenderer.tsx new file mode 100644 index 0000000..8ce53c0 --- /dev/null +++ b/src/features/content/renderers/details/LuoConnectingDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function LuoConnectingDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/MeridianDetailRenderer.tsx b/src/features/content/renderers/details/MeridianDetailRenderer.tsx new file mode 100644 index 0000000..bf9be48 --- /dev/null +++ b/src/features/content/renderers/details/MeridianDetailRenderer.tsx @@ -0,0 +1,6 @@ +import React from "react"; +import { ScrollView, Text } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asRecord, asRecordArray, asString, asStringArray } from "../helpers/value"; +import { Hero } from "../shared/Hero"; import { SectionCard } from "../shared/SectionCard"; import { BulletList } from "../shared/BulletList"; import { ChipList } from "../shared/ChipList"; import { ObjectSections } from "../shared/ObjectSections"; import { RecordCards } from "../shared/RecordCards"; +export function MeridianDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/ReturningYangDetailRenderer.tsx b/src/features/content/renderers/details/ReturningYangDetailRenderer.tsx new file mode 100644 index 0000000..b2e629d --- /dev/null +++ b/src/features/content/renderers/details/ReturningYangDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function ReturningYangDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/WindowOfHeavenDetailRenderer.tsx b/src/features/content/renderers/details/WindowOfHeavenDetailRenderer.tsx new file mode 100644 index 0000000..6f1458b --- /dev/null +++ b/src/features/content/renderers/details/WindowOfHeavenDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function WindowOfHeavenDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/XiCleftDetailRenderer.tsx b/src/features/content/renderers/details/XiCleftDetailRenderer.tsx new file mode 100644 index 0000000..b396127 --- /dev/null +++ b/src/features/content/renderers/details/XiCleftDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function XiCleftDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/YuanSourceDetailRenderer.tsx b/src/features/content/renderers/details/YuanSourceDetailRenderer.tsx new file mode 100644 index 0000000..43d40ca --- /dev/null +++ b/src/features/content/renderers/details/YuanSourceDetailRenderer.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { ScrollView } from "react-native"; +import type { DetailRendererProps } from "../../types/renderer.types"; +import { asString } from "../helpers/value"; +import { Hero } from "../shared/Hero"; +import { DescriptionList, Images, ObjectArrayCards, ObjectArrayTable, ObjectCard, PointCodes, Strings } from "./categoryParts"; +export function YuanSourceDetailRenderer({content,data}:DetailRendererProps){ return ; } diff --git a/src/features/content/renderers/details/categoryParts.tsx b/src/features/content/renderers/details/categoryParts.tsx new file mode 100644 index 0000000..7542d61 --- /dev/null +++ b/src/features/content/renderers/details/categoryParts.tsx @@ -0,0 +1,26 @@ +import React from "react"; +import { ContentMediaGallery } from "../../media/ContentMediaGallery"; +import { useRelationalContentMedia } from "../../media/ContentMediaContext"; +import { Text } from "react-native"; +import { asRecord, asRecordArray, asString, asStringArray } from "../helpers/value"; +import { BulletList } from "../shared/BulletList"; +import { ChipList } from "../shared/ChipList"; +import { ObjectSections } from "../shared/ObjectSections"; +import { RecordCards } from "../shared/RecordCards"; +import { RecordTable } from "../shared/RecordTable"; +import { SectionCard } from "../shared/SectionCard"; + +export const PointCodes = ({data}:{data:Record}) => ; +export const DescriptionList = ({data}:{data:Record}) => { const arr=asStringArray(data.description); const text=asString(data.description); return {arr.length?:{text}}; }; +export const Images = ({data}:{data:Record}) => { + const relationalMedia = useRelationalContentMedia(); + if (relationalMedia.length) { + return ; + } + const rows=asRecordArray(data.images); + return rows.length?:null; +}; +export const ObjectCard = ({title,value}:{title:string;value:unknown}) => { const obj=asRecord(value); return Object.keys(obj).length?:null; }; +export const ObjectArrayCards = ({title,value}:{title:string;value:unknown}) => { const rows=asRecordArray(value); return rows.length?:null; }; +export const ObjectArrayTable = ({title,value,columns}:{title:string;value:unknown;columns?:string[]}) => { const rows=asRecordArray(value); return rows.length?:null; }; +export const Strings = ({title,value}:{title:string;value:unknown}) => { const arr=asStringArray(value); const txt=asString(value); if(!arr.length&&!txt)return null; return {arr.length?:{txt}}; }; diff --git a/src/features/content/renderers/helpers/value.ts b/src/features/content/renderers/helpers/value.ts new file mode 100644 index 0000000..651a469 --- /dev/null +++ b/src/features/content/renderers/helpers/value.ts @@ -0,0 +1,34 @@ +export function asString(value: unknown): string { + return typeof value === "string" ? value : ""; +} + +export function asNumber(value: unknown): number | null { + return typeof value === "number" && Number.isFinite(value) ? value : null; +} + +export function asStringArray(value: unknown): string[] { + return Array.isArray(value) + ? value.filter((item): item is string => typeof item === "string" && item.trim().length > 0) + : []; +} + +export function asRecord(value: unknown): Record { + return value !== null && typeof value === "object" && !Array.isArray(value) + ? (value as Record) + : {}; +} + +export function asRecordArray(value: unknown): Record[] { + return Array.isArray(value) + ? value.filter( + (item): item is Record => + item !== null && typeof item === "object" && !Array.isArray(item), + ) + : []; +} + +export function humanizeKey(value: string): string { + return value + .replace(/_/g, " ") + .replace(/\b\w/g, (letter) => letter.toUpperCase()); +} diff --git a/src/features/content/renderers/index.ts b/src/features/content/renderers/index.ts new file mode 100644 index 0000000..08fc6e7 --- /dev/null +++ b/src/features/content/renderers/index.ts @@ -0,0 +1,9 @@ +export * from "./registry"; +export * from "./shared/SectionCard"; +export * from "./shared/BulletList"; +export * from "./shared/ChipList"; +export * from "./shared/Hero"; +export * from "./shared/RecordTable"; +export * from "./shared/RecordCards"; +export * from "./shared/ObjectSections"; +export * from "./shared/ImageGallery"; diff --git a/src/features/content/renderers/registry.ts b/src/features/content/renderers/registry.ts new file mode 100644 index 0000000..b274036 --- /dev/null +++ b/src/features/content/renderers/registry.ts @@ -0,0 +1,76 @@ +import type { CollectionItemRendererComponent, CollectionRendererComponent, DetailRendererComponent } from "../types/renderer.types"; +import { ModuleCatalogCollectionRenderer, ModuleCatalogCardRenderer } from "./collections/ModuleCatalogRenderers"; +import { AcuPointCollectionRenderer, AcuPointIndexCollectionRenderer, AcuPointCardRenderer, AcuPointIndexCardRenderer } from "./collections/PointRenderers"; +import { MeridianCollectionRenderer, MeridianIndexCollectionRenderer, MeridianCardRenderer, MeridianIndexCardRenderer } from "./collections/MeridianRenderers"; +import { EovCollectionRenderer, EovIndexCollectionRenderer, EovCardRenderer, EovIndexCardRenderer } from "./collections/EovRenderers"; +import { PointCategoryIndexCollectionRenderer, PointCategoryIndexCardRenderer } from "./collections/PointCategoryRenderers"; +import { AcuPointDetailRenderer } from "./details/AcuPointDetailRenderer"; +import { MeridianDetailRenderer } from "./details/MeridianDetailRenderer"; +import { EovDetailRenderer } from "./details/EovDetailRenderer"; +import { IndexEntryDetailRenderer } from "./details/IndexEntryDetailRenderer"; +import { YuanSourceDetailRenderer } from "./details/YuanSourceDetailRenderer"; +import { LuoConnectingDetailRenderer } from "./details/LuoConnectingDetailRenderer"; +import { XiCleftDetailRenderer } from "./details/XiCleftDetailRenderer"; +import { BackShuDetailRenderer } from "./details/BackShuDetailRenderer"; +import { FrontMuDetailRenderer } from "./details/FrontMuDetailRenderer"; +import { FiveShuDetailRenderer } from "./details/FiveShuDetailRenderer"; +import { HoraryPointsDetailRenderer } from "./details/HoraryPointsDetailRenderer"; +import { HuiMeetingDetailRenderer } from "./details/HuiMeetingDetailRenderer"; +import { ConfluentPointsDetailRenderer } from "./details/ConfluentPointsDetailRenderer"; +import { LowerHeSeaDetailRenderer } from "./details/LowerHeSeaDetailRenderer"; +import { GaoWuCommandDetailRenderer } from "./details/GaoWuCommandDetailRenderer"; +import { WindowOfHeavenDetailRenderer } from "./details/WindowOfHeavenDetailRenderer"; +import { FourSeasDetailRenderer } from "./details/FourSeasDetailRenderer"; +import { GhostPointsDetailRenderer } from "./details/GhostPointsDetailRenderer"; +import { EntryExitPointsDetailRenderer } from "./details/EntryExitPointsDetailRenderer"; +import { ReturningYangDetailRenderer } from "./details/ReturningYangDetailRenderer"; + +export const collectionRenderers: Readonly> = Object.freeze({ + module_catalog_collection: ModuleCatalogCollectionRenderer, + acu_point_index_collection: AcuPointIndexCollectionRenderer, + acu_point_collection: AcuPointCollectionRenderer, + meridian_index_collection: MeridianIndexCollectionRenderer, + meridian_collection: MeridianCollectionRenderer, + eov_index_collection: EovIndexCollectionRenderer, + eov_collection: EovCollectionRenderer, + point_category_index_collection: PointCategoryIndexCollectionRenderer, +}); +export const collectionItemRenderers: Readonly> = Object.freeze({ + module_catalog_card: ModuleCatalogCardRenderer, + acu_point_index_card: AcuPointIndexCardRenderer, + acu_point_card: AcuPointCardRenderer, + meridian_index_card: MeridianIndexCardRenderer, + meridian_card: MeridianCardRenderer, + eov_index_card: EovIndexCardRenderer, + eov_card: EovCardRenderer, + point_category_index_card: PointCategoryIndexCardRenderer, +}); +export const detailRenderers: Readonly> = Object.freeze({ + module_catalog_detail: IndexEntryDetailRenderer, + acu_point_index_detail: IndexEntryDetailRenderer, + meridian_index_detail: IndexEntryDetailRenderer, + eov_index_detail: IndexEntryDetailRenderer, + point_category_index_detail: IndexEntryDetailRenderer, + acu_point_detail: AcuPointDetailRenderer, + meridian_detail: MeridianDetailRenderer, + eov_detail: EovDetailRenderer, + yuan_source_detail: YuanSourceDetailRenderer, + luo_connecting_detail: LuoConnectingDetailRenderer, + xi_cleft_detail: XiCleftDetailRenderer, + back_shu_detail: BackShuDetailRenderer, + front_mu_detail: FrontMuDetailRenderer, + five_shu_detail: FiveShuDetailRenderer, + horary_points_detail: HoraryPointsDetailRenderer, + hui_meeting_detail: HuiMeetingDetailRenderer, + confluent_points_detail: ConfluentPointsDetailRenderer, + lower_he_sea_detail: LowerHeSeaDetailRenderer, + gao_wu_command_detail: GaoWuCommandDetailRenderer, + window_of_heaven_detail: WindowOfHeavenDetailRenderer, + four_seas_detail: FourSeasDetailRenderer, + ghost_points_detail: GhostPointsDetailRenderer, + entry_exit_points_detail: EntryExitPointsDetailRenderer, + returning_yang_detail: ReturningYangDetailRenderer, +}); +export function resolveCollectionRenderer(code:string):CollectionRendererComponent { const r=collectionRenderers[code]; if(!r) throw new Error(`Unknown collection renderer: ${code}`); return r; } +export function resolveCollectionItemRenderer(code:string):CollectionItemRendererComponent { const r=collectionItemRenderers[code]; if(!r) throw new Error(`Unknown collection item renderer: ${code}`); return r; } +export function resolveDetailRenderer(code:string):DetailRendererComponent { const r=detailRenderers[code]; if(!r) throw new Error(`Unknown detail renderer: ${code}`); return r; } diff --git a/src/features/content/renderers/shared/AccordionSection.tsx b/src/features/content/renderers/shared/AccordionSection.tsx new file mode 100644 index 0000000..83b1b09 --- /dev/null +++ b/src/features/content/renderers/shared/AccordionSection.tsx @@ -0,0 +1,101 @@ +import React, { type PropsWithChildren, useState } from "react"; +import { + LayoutAnimation, + Platform, + Pressable, + StyleSheet, + Text, + UIManager, + View, +} from "react-native"; + +import { Colors } from "@/theme/colors"; +import { Radius } from "@/theme/radius"; +import { Shadows } from "@/theme/shadows"; +import { Spacing } from "@/theme/spacing"; + +if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) { + UIManager.setLayoutAnimationEnabledExperimental(true); +} + +export interface AccordionSectionProps { + title: string; + defaultExpanded?: boolean; +} + +export function AccordionSection({ + title, + defaultExpanded = true, + children, +}: PropsWithChildren) { + const [expanded, setExpanded] = useState(defaultExpanded); + + const toggle = () => { + LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut); + setExpanded((value) => !value); + }; + + return ( + + [styles.header, pressed && styles.pressed]} + > + + + {title} + + + + + {expanded ? "−" : "+"} + + + + + {expanded ? ( + <> + + {children} + + ) : null} + + ); +} + +const styles = StyleSheet.create({ + card: { + borderRadius: Radius.xl, + backgroundColor: Colors.background, + overflow: "hidden", + ...Shadows.card, + }, + header: { + minHeight: 68, + paddingHorizontal: Spacing.md, + flexDirection: "row", + alignItems: "center", + justifyContent: "space-between", + gap: Spacing.sm, + }, + pressed: { opacity: 0.9 }, + titleRow: { flex: 1, flexDirection: "row", alignItems: "center", gap: 10 }, + accent: { width: 4, height: 24, borderRadius: Radius.full, backgroundColor: Colors.primary }, + title: { flex: 1, fontSize: 18, lineHeight: 24, fontWeight: "800", color: Colors.textPrimary }, + iconCircle: { + width: 34, + height: 34, + borderRadius: Radius.full, + alignItems: "center", + justifyContent: "center", + backgroundColor: "#F1F5F9", + }, + iconCircleExpanded: { backgroundColor: "#DBEAFE" }, + icon: { fontSize: 22, lineHeight: 24, fontWeight: "700", color: Colors.textSecondary }, + iconExpanded: { color: Colors.primary }, + divider: { height: StyleSheet.hairlineWidth, marginHorizontal: Spacing.md, backgroundColor: "#E2E8F0" }, + body: { padding: Spacing.md, gap: 10 }, +}); diff --git a/src/features/content/renderers/shared/BulletList.tsx b/src/features/content/renderers/shared/BulletList.tsx new file mode 100644 index 0000000..a5e404a --- /dev/null +++ b/src/features/content/renderers/shared/BulletList.tsx @@ -0,0 +1,15 @@ +import React from "react"; +import { Text, View } from "react-native"; + +export function BulletList({ items }: { items: string[] }) { + if (!items.length) return null; + return ( + + {items.map((item, index) => ( + + •{item} + + ))} + + ); +} diff --git a/src/features/content/renderers/shared/ChipList.tsx b/src/features/content/renderers/shared/ChipList.tsx new file mode 100644 index 0000000..2503661 --- /dev/null +++ b/src/features/content/renderers/shared/ChipList.tsx @@ -0,0 +1,15 @@ +import React from "react"; +import { Text, View } from "react-native"; + +export function ChipList({ items }: { items: string[] }) { + if (!items.length) return null; + return ( + + {items.map((item) => ( + + {item} + + ))} + + ); +} diff --git a/src/features/content/renderers/shared/CollectionScaffold.tsx b/src/features/content/renderers/shared/CollectionScaffold.tsx new file mode 100644 index 0000000..678fd29 --- /dev/null +++ b/src/features/content/renderers/shared/CollectionScaffold.tsx @@ -0,0 +1,62 @@ +import React from "react"; +import { + ActivityIndicator, + FlatList, + RefreshControl, + Text, + View, +} from "react-native"; +import type { CollectionRendererProps } from "../../types/renderer.types"; + +export function CollectionScaffold( + props: CollectionRendererProps & { header?: React.ReactNode }, +) { + return ( + item.id} + keyboardShouldPersistTaps="handled" + removeClippedSubviews + initialNumToRender={12} + maxToRenderPerBatch={12} + windowSize={9} + ListHeaderComponent={ + <> + {props.header} + + {props.total} results + + + } + renderItem={({ item }) => + props.renderItem({ + item, + onPress: () => props.onItemPress(item), + }) + } + onEndReached={props.onLoadMore} + onEndReachedThreshold={0.5} + refreshControl={ + + } + ListEmptyComponent={ + props.isLoading ? ( + + + + ) : ( + + No matching content. + + ) + } + ListFooterComponent={ + props.isFetchingNextPage ? ( + + + + ) : null + } + /> + ); +} diff --git a/src/features/content/renderers/shared/ContentCountBadge.tsx b/src/features/content/renderers/shared/ContentCountBadge.tsx new file mode 100644 index 0000000..1cdf200 --- /dev/null +++ b/src/features/content/renderers/shared/ContentCountBadge.tsx @@ -0,0 +1,6 @@ +import React from "react"; +import { Text, View } from "react-native"; +export function ContentCountBadge({ count, label }: { count: number | null; label?: string }) { + if (count === null) return null; + return {count}{label ? ` ${label}` : ""}; +} diff --git a/src/features/content/renderers/shared/ContentValue.tsx b/src/features/content/renderers/shared/ContentValue.tsx new file mode 100644 index 0000000..166e303 --- /dev/null +++ b/src/features/content/renderers/shared/ContentValue.tsx @@ -0,0 +1,141 @@ +import React from "react"; +import { + StyleSheet, + Text, + View, + type StyleProp, + type TextStyle, +} from "react-native"; + +import { Colors } from "@/theme/colors"; +import { Spacing } from "@/theme/spacing"; + +import { ContentLink } from "../../components/navigation/ContentLink"; +import { parseNavigableContentReference } from "../../utils/content-reference"; +import { humanizeKey } from "../helpers/value"; + +export interface ContentValueProps { + value: unknown; + textStyle?: StyleProp; + emptyText?: string | null; +} + +/** + * Reference-aware fallback renderer for arbitrary nested attribute values. + * + * Explicit hydrated references are intercepted before generic object + * rendering. No point-code heuristics are used. + */ +export function ContentValue({ + value, + textStyle, + emptyText = null, +}: ContentValueProps) { + const reference = parseNavigableContentReference(value); + + if (reference) { + return ; + } + + if (value === null || value === undefined || value === "") { + return emptyText ? ( + {emptyText} + ) : null; + } + + if (Array.isArray(value)) { + const visible = value.filter( + (item) => item !== null && item !== undefined && item !== "", + ); + + if (!visible.length) { + return emptyText ? ( + {emptyText} + ) : null; + } + + return ( + + {visible.map((item, index) => ( + + ))} + + ); + } + + if (typeof value === "object") { + const entries = Object.entries(value as Record).filter( + ([, child]) => + child !== null && + child !== undefined && + child !== "" && + (!Array.isArray(child) || child.length > 0), + ); + + if (!entries.length) { + return emptyText ? ( + {emptyText} + ) : null; + } + + return ( + + {entries.map(([key, child]) => ( + + {humanizeKey(key)} + + + ))} + + ); + } + + return ( + + {typeof value === "boolean" ? (value ? "Yes" : "No") : String(value)} + + ); +} + +function contentValueKey(value: unknown, index: number): string { + const reference = parseNavigableContentReference(value); + if (reference?.type === "content_ref") { + return `content-${reference.target.content_id}`; + } + if (reference?.type === "template_ref") { + return `template-${reference.target.module_code}-${reference.target.template_code}`; + } + if (typeof value === "string" || typeof value === "number") { + return `${String(value)}-${index}`; + } + return `value-${index}`; +} + +const styles = StyleSheet.create({ + text: { + fontSize: 16, + lineHeight: 23, + color: Colors.textPrimary, + }, + stack: { + gap: Spacing.sm, + }, + object: { + gap: Spacing.sm, + }, + objectRow: { + gap: 4, + }, + objectLabel: { + fontSize: 12, + lineHeight: 17, + fontWeight: "700", + color: Colors.textSecondary, + textTransform: "uppercase", + letterSpacing: 0.35, + }, +}); diff --git a/src/features/content/renderers/shared/DetailPageShell.tsx b/src/features/content/renderers/shared/DetailPageShell.tsx new file mode 100644 index 0000000..71559e2 --- /dev/null +++ b/src/features/content/renderers/shared/DetailPageShell.tsx @@ -0,0 +1,109 @@ +import React, { type PropsWithChildren, useState } from "react"; +import { Pressable, SafeAreaView, StyleSheet } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { router, useLocalSearchParams } from "expo-router"; + +import { Colors } from "@/theme/colors"; +import { ContentPageHeader } from "../../components/layout/ContentPageHeader"; +import { useModuleDisplayName } from "../../hooks/use-module-display-name"; + +interface DetailPageShellProps extends PropsWithChildren { + /** + * Content title is retained for renderer compatibility and accessibility + * context. The application header itself always shows the module name. + */ + title: string; +} + +export function DetailPageShell({ + title, + children, +}: DetailPageShellProps) { + const [isFavorite, setIsFavorite] = useState(false); + const { moduleCode } = useLocalSearchParams<{ + moduleCode?: string; + }>(); + const currentModuleCode = + typeof moduleCode === "string" ? moduleCode : ""; + const moduleDisplay = useModuleDisplayName(currentModuleCode); + + const searchAction = currentModuleCode ? ( + + router.push( + `/modules/${encodeURIComponent(currentModuleCode)}/search` as never, + ) + } + style={({ pressed }) => [ + styles.iconButton, + pressed && styles.pressed, + ]} + > + + + ) : null; + + const favoriteAction = ( + setIsFavorite((value) => !value)} + style={({ pressed }) => [ + styles.iconButton, + pressed && styles.pressed, + ]} + > + + + ); + + return ( + + + router.push(moduleDisplay.homeRoute as never) + } + titleAccessibilityLabel={`Open ${moduleDisplay.name} home from ${title}`} + right={ + <> + {searchAction} + {favoriteAction} + + } + /> + {children} + + ); +} + +const styles = StyleSheet.create({ + screen: { + flex: 1, + backgroundColor: Colors.surface, + }, + iconButton: { + width: 40, + height: 40, + borderRadius: 20, + alignItems: "center", + justifyContent: "center", + }, + pressed: { + opacity: 0.65, + }, +}); diff --git a/src/features/content/renderers/shared/Hero.tsx b/src/features/content/renderers/shared/Hero.tsx new file mode 100644 index 0000000..c359865 --- /dev/null +++ b/src/features/content/renderers/shared/Hero.tsx @@ -0,0 +1,12 @@ +import React from "react"; +import { Text, View } from "react-native"; + +export function Hero({ eyebrow, title, subtitle }: { eyebrow?: string; title: string; subtitle?: string }) { + return ( + + {eyebrow ? {eyebrow} : null} + {title} + {subtitle ? {subtitle} : null} + + ); +} diff --git a/src/features/content/renderers/shared/ImageGallery.tsx b/src/features/content/renderers/shared/ImageGallery.tsx new file mode 100644 index 0000000..951476e --- /dev/null +++ b/src/features/content/renderers/shared/ImageGallery.tsx @@ -0,0 +1,42 @@ +import React from "react"; +import { Image, Text, View } from "react-native"; +import { ContentMediaGallery } from "../../media/ContentMediaGallery"; +import { useRelationalContentMedia } from "../../media/ContentMediaContext"; +import { asString } from "../helpers/value"; + +export function ImageGallery({ + images, +}: { + images: Record[]; +}) { + const relationalMedia = useRelationalContentMedia(); + + if (relationalMedia.length > 0) { + return ; + } + + const visible = images.filter( + (item) => asString(item.image_path).trim().length > 0, + ); + + if (!visible.length) return null; + + return ( + + {visible.map((item, index) => { + const path = asString(item.image_path); + const name = asString(item.image_name); + return ( + + + {name ? {name} : null} + + ); + })} + + ); +} diff --git a/src/features/content/renderers/shared/KeyValueGrid.tsx b/src/features/content/renderers/shared/KeyValueGrid.tsx new file mode 100644 index 0000000..3e4155c --- /dev/null +++ b/src/features/content/renderers/shared/KeyValueGrid.tsx @@ -0,0 +1,17 @@ +import React from "react"; +import { Text, View } from "react-native"; + +export function KeyValueGrid({ rows }: { rows: Array<{ label: string; value: string }> }) { + const visible = rows.filter((row) => row.value.trim().length > 0); + if (!visible.length) return null; + return ( + + {visible.map((row) => ( + + {row.label} + {row.value} + + ))} + + ); +} diff --git a/src/features/content/renderers/shared/ObjectSections.tsx b/src/features/content/renderers/shared/ObjectSections.tsx new file mode 100644 index 0000000..5d15f33 --- /dev/null +++ b/src/features/content/renderers/shared/ObjectSections.tsx @@ -0,0 +1,15 @@ +import React from "react"; +import { Text, View } from "react-native"; +import { asStringArray, humanizeKey } from "../helpers/value"; +import { BulletList } from "./BulletList"; + +export function ObjectSections({ value }: { value: Record }) { + const entries = Object.entries(value).filter(([,v]) => v !== null && v !== "" && (!Array.isArray(v) || v.length)); + if (!entries.length) return null; + return {entries.map(([key,val])=>( + + {humanizeKey(key)} + {Array.isArray(val) ? : {String(val)}} + + ))}; +} diff --git a/src/features/content/renderers/shared/Paragraphs.tsx b/src/features/content/renderers/shared/Paragraphs.tsx new file mode 100644 index 0000000..fe2060b --- /dev/null +++ b/src/features/content/renderers/shared/Paragraphs.tsx @@ -0,0 +1,7 @@ +import React from "react"; +import { Text, View } from "react-native"; + +export function Paragraphs({ items }: { items: string[] }) { + if (!items.length) return null; + return {items.map((x,i)=>{x})}; +} diff --git a/src/features/content/renderers/shared/PresentedSection.tsx b/src/features/content/renderers/shared/PresentedSection.tsx new file mode 100644 index 0000000..3df9bf0 --- /dev/null +++ b/src/features/content/renderers/shared/PresentedSection.tsx @@ -0,0 +1,52 @@ +import React from "react"; + +import type { AttributePresentationMap } from "../../utils/attribute-presentation"; +import { + getAttributePresentationRule, + getEmptyDisplayText, + isEmptyValue, + shouldRenderAttribute, +} from "../../utils/attribute-presentation"; + +export interface PresentedSectionRenderState { + value: unknown; + isEmpty: boolean; + emptyText: string | null; +} + +export interface PresentedSectionProps { + attributeKey: string; + value: unknown; + rules: AttributePresentationMap; + children: (state: PresentedSectionRenderState) => React.ReactNode; +} + +/** + * Contract-aware semantic boundary for one attribute. + * + * This component deliberately does not render any visual chrome. Semantic + * renderers decide the section title, layout and concrete visual primitives. + * It only applies the effective per-attribute empty-value rule. + */ +export function PresentedSection({ + attributeKey, + value, + rules, + children, +}: PresentedSectionProps) { + const rule = getAttributePresentationRule(attributeKey, rules); + + if (!shouldRenderAttribute(value, rule)) { + return null; + } + + return ( + <> + {children({ + value, + isEmpty: isEmptyValue(value), + emptyText: getEmptyDisplayText(value, rule), + })} + + ); +} diff --git a/src/features/content/renderers/shared/RecordCards.tsx b/src/features/content/renderers/shared/RecordCards.tsx new file mode 100644 index 0000000..e79b629 --- /dev/null +++ b/src/features/content/renderers/shared/RecordCards.tsx @@ -0,0 +1,15 @@ +import React from "react"; +import { Text, View } from "react-native"; +import { humanizeKey } from "../helpers/value"; + +export function RecordCards({ rows, titleKey = "name" }: { rows: Record[]; titleKey?: string }) { + if (!rows.length) return null; + return {rows.map((row,index)=>( + + {row[titleKey] ? {String(row[titleKey])} : null} + {Object.entries(row).filter(([k])=>k!==titleKey).map(([k,v])=>( + {humanizeKey(k)}{Array.isArray(v) ? v.join(", ") : String(v ?? "")} + ))} + + ))}; +} diff --git a/src/features/content/renderers/shared/RecordTable.tsx b/src/features/content/renderers/shared/RecordTable.tsx new file mode 100644 index 0000000..20152eb --- /dev/null +++ b/src/features/content/renderers/shared/RecordTable.tsx @@ -0,0 +1,22 @@ +import React from "react"; +import { ScrollView, Text, View } from "react-native"; +import { humanizeKey } from "../helpers/value"; + +export function RecordTable({ rows, columns }: { rows: Record[]; columns?: string[] }) { + if (!rows.length) return null; + const cols = columns?.length ? columns : Array.from(new Set(rows.flatMap((row) => Object.keys(row)))); + return ( + + + + {cols.map((col)=>{humanizeKey(col)})} + + {rows.map((row,index)=>( + + {cols.map((col)=>{Array.isArray(row[col]) ? (row[col] as unknown[]).join(", ") : String(row[col] ?? "")})} + + ))} + + + ); +} diff --git a/src/features/content/renderers/shared/ReferenceChipList.tsx b/src/features/content/renderers/shared/ReferenceChipList.tsx new file mode 100644 index 0000000..d48fb08 --- /dev/null +++ b/src/features/content/renderers/shared/ReferenceChipList.tsx @@ -0,0 +1,122 @@ +import React from "react"; +import { StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; + +import { Colors } from "@/theme/colors"; +import { Radius } from "@/theme/radius"; +import { Spacing } from "@/theme/spacing"; + +import { ContentLink } from "../../components/navigation/ContentLink"; +import { parseNavigableContentReference } from "../../utils/content-reference"; + +export function ReferenceChipList({ value }: { value: unknown }) { + const values = Array.isArray(value) ? value : [value]; + const visible = values.filter( + (item) => item !== null && item !== undefined && item !== "", + ); + + if (!visible.length) return null; + + return ( + + {visible.map((item, index) => { + const reference = parseNavigableContentReference(item); + + if (reference) { + const label = + reference.label?.trim() || + (reference.type === "content_ref" + ? reference.target.source_key?.trim() + : null) || + "Open"; + + return ( + + + {label} + + + + ); + } + + const text = scalarLabel(item); + if (!text) return null; + + return ( + + {text} + + ); + })} + + ); +} + +function scalarLabel(value: unknown): string | null { + if ( + typeof value === "string" || + typeof value === "number" || + typeof value === "boolean" + ) { + const normalized = String(value).trim(); + return normalized || null; + } + + return null; +} + +const styles = StyleSheet.create({ + list: { + flexDirection: "row", + flexWrap: "wrap", + gap: Spacing.sm, + }, + link: { + alignSelf: "flex-start", + borderRadius: Radius.full, + }, + linkChip: { + minHeight: 34, + paddingHorizontal: 11, + paddingVertical: 6, + borderRadius: Radius.full, + backgroundColor: "#E8F5E9", + borderWidth: 1, + borderColor: "#CDE5D0", + flexDirection: "row", + alignItems: "center", + gap: 4, + }, + linkText: { + fontSize: 13, + lineHeight: 18, + fontWeight: "800", + color: Colors.primaryDark, + }, + chip: { + borderRadius: Radius.full, + paddingHorizontal: 11, + paddingVertical: 6, + backgroundColor: "#EEF7EF", + borderWidth: 1, + borderColor: "#D4E9D6", + }, + text: { + fontSize: 13, + fontWeight: "700", + color: Colors.primaryDark, + }, +}); diff --git a/src/features/content/renderers/shared/SectionCard.tsx b/src/features/content/renderers/shared/SectionCard.tsx new file mode 100644 index 0000000..9e498bb --- /dev/null +++ b/src/features/content/renderers/shared/SectionCard.tsx @@ -0,0 +1,11 @@ +import React, { type PropsWithChildren } from "react"; +import { Text, View } from "react-native"; + +export function SectionCard({ title, children }: PropsWithChildren<{ title: string }>) { + return ( + + {title} + {children} + + ); +} diff --git a/src/features/content/renderers/shared/StandardDetailLayout.tsx b/src/features/content/renderers/shared/StandardDetailLayout.tsx new file mode 100644 index 0000000..54ab9d4 --- /dev/null +++ b/src/features/content/renderers/shared/StandardDetailLayout.tsx @@ -0,0 +1,61 @@ +import React, { type PropsWithChildren } from "react"; +import { ScrollView, StyleSheet } from "react-native"; + +import { Spacing } from "@/theme/spacing"; + +import type { ContentMediaItem } from "../../types/media.types"; +import { ContentMediaGallery } from "../../media"; +import { DetailPageShell } from "./DetailPageShell"; +import { Hero } from "./Hero"; + +export interface StandardDetailLayoutProps extends PropsWithChildren { + title: string; + eyebrow?: string; + subtitle?: string; + meta?: string; + media: ContentMediaItem[]; +} + +/** + * Canonical content-detail layout. + * + * All detail renderers share the same application chrome, spacing, media + * placement, scrolling behavior, and card surface treatment. Renderer-specific + * components only provide the semantic sections inside this shell. + */ +export function StandardDetailLayout({ + title, + eyebrow, + subtitle, + meta, + media, + children, +}: StandardDetailLayoutProps) { + return ( + + + + + + + {children} + + + ); +} + +const styles = StyleSheet.create({ + content: { + padding: Spacing.md, + paddingBottom: Spacing.xxl, + gap: Spacing.md, + }, +}); diff --git a/src/features/content/renderers/shared/StandardIndexCard.tsx b/src/features/content/renderers/shared/StandardIndexCard.tsx new file mode 100644 index 0000000..ad60c12 --- /dev/null +++ b/src/features/content/renderers/shared/StandardIndexCard.tsx @@ -0,0 +1,141 @@ +import React from "react"; +import { Pressable, StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; + +import { Colors } from "@/theme/colors"; +import { Radius } from "@/theme/radius"; +import { Shadows } from "@/theme/shadows"; +import { Spacing } from "@/theme/spacing"; + +export interface StandardIndexCardProps { + title: string; + subtitle?: string | null; + count?: number | null; + countLabel?: string | null; + onPress: () => void; +} + +/** + * Canonical card for collection/index templates such as CT0002, CT0004, + * CT0006 and CT0008. Keeping these templates on one primitive prevents + * template-specific styling from drifting across the app. + */ +export function StandardIndexCard({ + title, + subtitle, + count, + countLabel, + onPress, +}: StandardIndexCardProps) { + const normalizedTitle = title.trim(); + const normalizedSubtitle = subtitle?.trim() || null; + + return ( + [styles.card, pressed && styles.cardPressed]} + > + + + + + {normalizedTitle} + + {normalizedSubtitle ? ( + + {normalizedSubtitle} + + ) : null} + + + {count !== null && count !== undefined ? ( + + {count} + {countLabel ? ( + + {countLabel} + + ) : null} + + ) : null} + + + + + ); +} + +const styles = StyleSheet.create({ + card: { + marginHorizontal: Spacing.md, + marginVertical: 7, + padding: Spacing.md, + borderRadius: Radius.xl, + backgroundColor: Colors.background, + ...Shadows.card, + }, + cardPressed: { + opacity: 0.82, + transform: [{ scale: 0.995 }], + }, + topRow: { + flexDirection: "row", + alignItems: "center", + gap: 12, + }, + codeBadge: { + minWidth: 58, + maxWidth: 86, + paddingHorizontal: 10, + paddingVertical: 8, + borderRadius: Radius.lg, + alignItems: "center", + backgroundColor: "#E8F5E9", + }, + codeText: { + fontSize: 14, + fontWeight: "800", + color: Colors.primaryDark, + }, + titleBlock: { + flex: 1, + gap: 3, + }, + title: { + fontSize: 17, + lineHeight: 22, + fontWeight: "800", + color: Colors.textPrimary, + }, + subtitle: { + fontSize: 13, + lineHeight: 18, + color: Colors.textSecondary, + }, + countBadge: { + minWidth: 34, + maxWidth: 92, + paddingHorizontal: 9, + paddingVertical: 6, + borderRadius: Radius.full, + alignItems: "center", + justifyContent: "center", + backgroundColor: Colors.surface, + borderWidth: StyleSheet.hairlineWidth, + borderColor: Colors.border, + }, + countText: { + fontSize: 13, + lineHeight: 16, + fontWeight: "800", + color: Colors.textPrimary, + }, + countLabel: { + marginTop: 1, + fontSize: 10, + lineHeight: 12, + color: Colors.textSecondary, + }, +}); diff --git a/src/features/content/screens/CollectionTemplateScreen.tsx b/src/features/content/screens/CollectionTemplateScreen.tsx new file mode 100644 index 0000000..a7cce93 --- /dev/null +++ b/src/features/content/screens/CollectionTemplateScreen.tsx @@ -0,0 +1,166 @@ +import React, { useMemo } from "react"; +import { Pressable, SafeAreaView, StyleSheet } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { router } from "expo-router"; + +import { Colors } from "@/theme"; +import { ContentPageHeader } from "../components/layout/ContentPageHeader"; +import { ScreenError } from "../components/ContentScreenState"; +import { useContentSearchInfiniteQuery } from "../hooks/use-content-search-infinite-query"; +import { useModuleDisplayName } from "../hooks/use-module-display-name"; +import { + resolveCollectionItemRenderer, + resolveCollectionRenderer, +} from "../renderers/registry"; +import type { TemplateContractResponse } from "../types/presentation.types"; + +export interface CollectionTemplateScreenProps { + moduleCode: string; + templateCode: string; + contract: TemplateContractResponse; + onContentPress: (contentId: string) => void; + onOpenFilters?: () => void; + onOpenSort?: () => void; +} + +export function CollectionTemplateScreen({ + moduleCode, + templateCode, + contract, + onContentPress, +}: CollectionTemplateScreenProps) { + const moduleDisplay = useModuleDisplayName(moduleCode); + const query = useContentSearchInfiniteQuery({ + module_code: moduleCode, + template_code: templateCode, + logic: contract.search.default_logic, + filters: [], + sort: contract.search.default_sort, + page_size: 25, + }); + + const merged = useMemo(() => { + const pages = query.data?.pages ?? []; + return { + total: pages[0]?.total ?? 0, + items: pages.flatMap((page) => page.items), + }; + }, [query.data]); + + const rendererResolution = useMemo(() => { + try { + const collectionCode = contract.presentation.renderers.collection; + const itemCode = contract.presentation.renderers.collection_item; + if (!collectionCode || !itemCode) { + throw new Error( + `Collection template ${templateCode} must configure both collection and collection_item renderers.`, + ); + } + return { + CollectionRenderer: resolveCollectionRenderer(collectionCode), + ItemRenderer: resolveCollectionItemRenderer(itemCode), + error: null as Error | null, + }; + } catch (error) { + return { + CollectionRenderer: null, + ItemRenderer: null, + error: + error instanceof Error + ? error + : new Error("Renderer resolution failed."), + }; + } + }, [ + contract.presentation.renderers.collection, + contract.presentation.renderers.collection_item, + templateCode, + ]); + + if ( + rendererResolution.error || + !rendererResolution.CollectionRenderer || + !rendererResolution.ItemRenderer + ) { + return ( + + ); + } + + if (query.isError) { + return ( + void query.refetch()} + /> + ); + } + + const CollectionRenderer = rendererResolution.CollectionRenderer; + const ItemRenderer = rendererResolution.ItemRenderer; + const searchAction = ( + + router.push( + `/modules/${encodeURIComponent(moduleCode)}/search` as never, + ) + } + style={({ pressed }) => [styles.iconButton, pressed && styles.pressed]} + > + + + ); + + return ( + + router.push(moduleDisplay.homeRoute as never)} + titleAccessibilityLabel={`Open ${moduleDisplay.name} home`} + right={searchAction} + /> + + void query.refetch()} + onLoadMore={() => { + if (query.hasNextPage && !query.isFetchingNextPage) { + void query.fetchNextPage(); + } + }} + onItemPress={(item) => onContentPress(item.id)} + renderItem={({ item, onPress }) => ( + + )} + /> + + ); +} + +const styles = StyleSheet.create({ + screen: { + flex: 1, + backgroundColor: Colors.surface, + }, + iconButton: { + width: 40, + height: 40, + borderRadius: 20, + alignItems: "center", + justifyContent: "center", + }, + pressed: { + opacity: 0.65, + }, +}); diff --git a/src/features/content/screens/ContentDetailScreen.tsx b/src/features/content/screens/ContentDetailScreen.tsx new file mode 100644 index 0000000..8f46486 --- /dev/null +++ b/src/features/content/screens/ContentDetailScreen.tsx @@ -0,0 +1,126 @@ +import React, { useMemo } from "react"; +import { ContentMediaProvider } from "../media/ContentMediaContext"; +import { ScreenError, ScreenLoading } from "../components/ContentScreenState"; +import { useContentDetailScreen } from "../hooks/use-content-detail-screen"; +import { resolveDetailRenderer } from "../renderers/registry"; + +export interface ContentDetailScreenProps { + moduleCode: string; + templateCode: string; + contentId: string; +} + +function normalizeRequired(value: string, name: string): string { + const normalized = value.trim(); + if (!normalized) throw new Error(`${name} is required.`); + return normalized; +} + +export function ContentDetailScreen({ + moduleCode, + templateCode, + contentId, +}: ContentDetailScreenProps) { + let normalizedModuleCode: string; + let normalizedTemplateCode: string; + let normalizedContentId: string; + + try { + normalizedModuleCode = normalizeRequired(moduleCode, "moduleCode"); + normalizedTemplateCode = normalizeRequired(templateCode, "templateCode"); + normalizedContentId = normalizeRequired(contentId, "contentId"); + } catch (error) { + return ( + + ); + } + + return ( + + ); +} + +function ContentDetailScreenResolved({ + moduleCode, + templateCode, + contentId, +}: ContentDetailScreenProps) { + const screen = useContentDetailScreen({ moduleCode, templateCode, contentId }); + + const rendererResolution = useMemo(() => { + const code = screen.contractQuery.data?.presentation.renderers.detail; + if (!code) return { renderer: null, error: null as Error | null }; + + try { + return { renderer: resolveDetailRenderer(code), error: null as Error | null }; + } catch (error) { + return { + renderer: null, + error: error instanceof Error ? error : new Error("Unknown content renderer."), + }; + } + }, [screen.contractQuery.data?.presentation.renderers.detail]); + + if (screen.isLoading) { + return ; + } + + if (screen.moduleMismatch) { + return ( + + ); + } + + if (screen.contractQuery.isError || screen.contentQuery.isError) { + return ( + void screen.refetch()} + /> + ); + } + + if (rendererResolution.error || !rendererResolution.renderer) { + return ( + + ); + } + + const response = screen.contentQuery.data; + if (!response) { + return ; + } + + const Renderer = rendererResolution.renderer; + + return ( + + + + ); +} diff --git a/src/features/content/screens/RendererHost.tsx b/src/features/content/screens/RendererHost.tsx new file mode 100644 index 0000000..70ad9b5 --- /dev/null +++ b/src/features/content/screens/RendererHost.tsx @@ -0,0 +1,4 @@ +import React from "react"; +import { resolveDetailRenderer } from "../renderers/registry"; +import type { ContentEnvelope } from "../types/renderer.types"; +export function RendererHost({rendererCode,moduleCode,templateCode,content,data}:{rendererCode:string;moduleCode:string;templateCode:string;content:ContentEnvelope;data:Record}){ const Renderer=resolveDetailRenderer(rendererCode); return ; } diff --git a/src/features/content/screens/SingleTemplateScreen.tsx b/src/features/content/screens/SingleTemplateScreen.tsx new file mode 100644 index 0000000..f4e2871 --- /dev/null +++ b/src/features/content/screens/SingleTemplateScreen.tsx @@ -0,0 +1,83 @@ +import React, { useMemo } from "react"; +import { ContentMediaProvider } from "../media/ContentMediaContext"; +import { ScreenEmpty, ScreenError, ScreenLoading } from "../components/ContentScreenState"; +import { useSingleTemplateContentQuery } from "../hooks/use-single-template-content-query"; +import { resolveDetailRenderer } from "../renderers/registry"; +import type { TemplateContractResponse } from "../types/presentation.types"; + +export function SingleTemplateScreen({ + moduleCode, + templateCode, + contract, +}: { + moduleCode: string; + templateCode: string; + contract: TemplateContractResponse; +}) { + const query = useSingleTemplateContentQuery({ moduleCode, templateCode }); + + const rendererResolution = useMemo(() => { + try { + return { + Renderer: resolveDetailRenderer(contract.presentation.renderers.detail), + error: null as Error | null, + }; + } catch (error) { + return { + Renderer: null, + error: error instanceof Error ? error : new Error("Renderer resolution failed."), + }; + } + }, [contract.presentation.renderers.detail]); + + if (query.resolution.status === "loading") { + return ; + } + + if (query.resolution.status === "error") { + return ( + void query.refetch()} + /> + ); + } + + if (query.resolution.status === "empty") { + return ; + } + + if (query.resolution.status === "invalid") { + return ( + + ); + } + + if (rendererResolution.error || !rendererResolution.Renderer) { + return ( + + ); + } + + const Renderer = rendererResolution.Renderer; + const { content, data, media } = query.resolution; + + return ( + + + + ); +} diff --git a/src/features/content/screens/TemplateScreen.tsx b/src/features/content/screens/TemplateScreen.tsx new file mode 100644 index 0000000..604e0fc --- /dev/null +++ b/src/features/content/screens/TemplateScreen.tsx @@ -0,0 +1,132 @@ +import React from "react"; +import { useRouter } from "expo-router"; +import { ScreenError, ScreenLoading } from "../components/ContentScreenState"; +import { useTemplateContractQuery } from "../hooks/use-template-contract-query"; +import { CollectionTemplateScreen } from "./CollectionTemplateScreen"; +import { SingleTemplateScreen } from "./SingleTemplateScreen"; + +export interface TemplateScreenProps { + moduleCode: string; + templateCode: string; + onContentPress?: (contentId: string) => void; + onOpenFilters?: () => void; + onOpenSort?: () => void; +} + +function normalized(value: string): string { + return value.trim(); +} + +export function TemplateScreen({ + moduleCode, + templateCode, + onContentPress, + onOpenFilters, + onOpenSort, +}: TemplateScreenProps) { + const router = useRouter(); + const module = normalized(moduleCode); + const template = normalized(templateCode); + + if (!module || !template) { + return ( + + ); + } + + return ( + { + router.push( + `/modules/${encodeURIComponent(module)}/${encodeURIComponent(template)}/${encodeURIComponent(contentId)}` as never, + ); + }} + /> + ); +} + +function TemplateScreenResolved({ + moduleCode, + templateCode, + onContentPress, + onOpenFilters, + onOpenSort, + navigateToContent, +}: TemplateScreenProps & { navigateToContent: (contentId: string) => void }) { + const contractQuery = useTemplateContractQuery(templateCode); + + if (contractQuery.isLoading) { + return ; + } + + if (contractQuery.isError) { + return ( + void contractQuery.refetch()} + /> + ); + } + + const contract = contractQuery.data; + if (!contract) { + return ; + } + + if (contract.template_code !== templateCode) { + return ( + + ); + } + + if (contract.module_code && contract.module_code !== moduleCode) { + return ( + + ); + } + + if (contract.presentation.mode === "single") { + return ( + + ); + } + + if (contract.presentation.mode === "collection") { + return ( + + ); + } + + return ( + + ); +} diff --git a/src/features/content/screens/index.ts b/src/features/content/screens/index.ts new file mode 100644 index 0000000..6ebfebf --- /dev/null +++ b/src/features/content/screens/index.ts @@ -0,0 +1,4 @@ +export * from "./ContentDetailScreen"; +export * from "./TemplateScreen"; +export * from "./CollectionTemplateScreen"; +export * from "./SingleTemplateScreen"; diff --git a/src/features/content/search/ModuleFilterBuilderModal.tsx b/src/features/content/search/ModuleFilterBuilderModal.tsx new file mode 100644 index 0000000..5f6d155 --- /dev/null +++ b/src/features/content/search/ModuleFilterBuilderModal.tsx @@ -0,0 +1,120 @@ +import React, { useMemo, useState } from "react"; +import { Modal, Pressable, ScrollView, StyleSheet, Text, TextInput, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; +import { Colors } from "@/theme"; +import type { ModuleSearchFieldContract, SearchCriterion } from "../../types/presentation.types"; + +interface Props { + visible: boolean; + fields: ModuleSearchFieldContract[]; + onAdd: (criterion: SearchCriterion) => void; + onClose: () => void; +} + +function displayValue(value: unknown): string { + if (value === null || value === undefined) return ""; + if (["string", "number", "boolean"].includes(typeof value)) return String(value); + if (value && typeof value === "object") { + const record = value as Record; + const label = record.label ?? record.name ?? record.value; + if (label !== undefined) return String(label); + } + return JSON.stringify(value); +} + +function parseValue(field: ModuleSearchFieldContract, raw: string): unknown { + const value = raw.trim(); + if (field.data_type === "number") { + const number = Number(value); + return Number.isFinite(number) ? number : value; + } + if (field.data_type === "boolean") { + if (value.toLowerCase() === "true") return true; + if (value.toLowerCase() === "false") return false; + } + return value; +} + +export function ModuleFilterBuilderModal({ visible, fields, onAdd, onClose }: Props) { + const filterable = useMemo(() => fields.filter((field) => field.is_filterable && field.default_operator), [fields]); + const [selectedKey, setSelectedKey] = useState(""); + const [valueText, setValueText] = useState(""); + const [choice, setChoice] = useState(undefined); + const selected = filterable.find((field) => field.attribute_key === selectedKey) ?? filterable[0]; + + const add = () => { + if (!selected?.default_operator) return; + const value = choice !== undefined ? choice : parseValue(selected, valueText); + if (value === "" || value === null || value === undefined) return; + onAdd({ attribute_key: selected.attribute_key, operator: selected.default_operator, value }); + setSelectedKey(""); setValueText(""); setChoice(undefined); onClose(); + }; + + return ( + + + + + + + + Add filter + Choose an attribute from anywhere in this module and provide its value. + + + + + Attribute + + {filterable.map((field) => { + const active = field.attribute_key === selected?.attribute_key; + return ( + { setSelectedKey(field.attribute_key); setValueText(""); setChoice(undefined); }} style={[styles.field, active && styles.fieldActive]}> + + {field.label} + {field.template_name} + + {active ? : null} + + ); + })} + + {selected ? <> + Value + {selected.allowed_values?.length ? ( + + {selected.allowed_values.map((item, index) => { + const label = displayValue(item); + const active = JSON.stringify(choice) === JSON.stringify(item); + return { setChoice(item); setValueText(""); }} style={[styles.choice, active && styles.choiceActive]}>{label}; + })} + + ) : ( + { setValueText(value); setChoice(undefined); }} placeholder={`Enter ${selected.label.toLowerCase()}…`} placeholderTextColor={Colors.textSecondary} style={styles.input} /> + )} + : null} + + + Cancel + Add filter + + + + + ); +} + +const styles = StyleSheet.create({ + overlay:{flex:1,justifyContent:"flex-end"}, scrim:{...StyleSheet.absoluteFillObject,backgroundColor:"rgba(15,23,42,0.36)"}, + sheet:{maxHeight:"86%",backgroundColor:Colors.surface,borderTopLeftRadius:moderateScale(22),borderTopRightRadius:moderateScale(22)}, + handle:{alignSelf:"center",width:moderateScale(42),height:verticalScale(4),marginTop:verticalScale(8),borderRadius:99,backgroundColor:"#CBD5E1"}, + header:{flexDirection:"row",alignItems:"flex-start",gap:moderateScale(12),padding:moderateScale(20),paddingBottom:moderateScale(12)}, headerCopy:{flex:1}, + title:{fontSize:moderateScale(18),fontWeight:"800",color:Colors.textPrimary}, subtitle:{marginTop:verticalScale(4),fontSize:moderateScale(12),lineHeight:moderateScale(17),color:Colors.textSecondary}, + content:{paddingHorizontal:moderateScale(20),paddingBottom:verticalScale(20)}, label:{marginTop:verticalScale(10),marginBottom:verticalScale(8),fontSize:moderateScale(12),fontWeight:"800",color:Colors.textPrimary}, fieldList:{gap:verticalScale(7)}, + field:{flexDirection:"row",alignItems:"center",minHeight:verticalScale(52),paddingHorizontal:moderateScale(13),paddingVertical:verticalScale(9),borderWidth:1,borderColor:"#E2E8F0",borderRadius:moderateScale(13),backgroundColor:"#FFFFFF"}, + fieldActive:{borderColor:"#A7D7A9",backgroundColor:"#F1F8F1"}, fieldCopy:{flex:1}, fieldTitle:{fontSize:moderateScale(13),fontWeight:"700",color:Colors.textPrimary}, fieldTitleActive:{color:Colors.primaryDark}, fieldGroup:{marginTop:2,fontSize:moderateScale(11),color:Colors.textSecondary}, + input:{minHeight:verticalScale(46),borderWidth:1,borderColor:"#CBD5E1",borderRadius:moderateScale(12),paddingHorizontal:moderateScale(13),color:Colors.textPrimary,backgroundColor:"#FFFFFF"}, + choiceWrap:{flexDirection:"row",flexWrap:"wrap",gap:moderateScale(8)}, choice:{paddingHorizontal:moderateScale(11),paddingVertical:verticalScale(7),borderRadius:999,borderWidth:1,borderColor:"#CBD5E1",backgroundColor:"#FFFFFF"}, choiceActive:{borderColor:"#A7D7A9",backgroundColor:"#E8F5E9"}, choiceText:{fontSize:moderateScale(12),color:Colors.textPrimary}, choiceTextActive:{color:Colors.primaryDark,fontWeight:"700"}, + footer:{flexDirection:"row",gap:moderateScale(10),padding:moderateScale(20),borderTopWidth:1,borderTopColor:"#E2E8F0"}, secondaryButton:{minWidth:moderateScale(96),alignItems:"center",paddingVertical:verticalScale(11),borderWidth:1,borderColor:"#CBD5E1",borderRadius:moderateScale(12)}, secondaryText:{fontWeight:"700",color:Colors.textPrimary}, primaryButton:{flex:1,alignItems:"center",paddingVertical:verticalScale(11),borderRadius:moderateScale(12),backgroundColor:Colors.primary}, primaryText:{fontWeight:"800",color:"#FFFFFF"}, +}); diff --git a/src/features/content/search/ModuleFilterChips.tsx b/src/features/content/search/ModuleFilterChips.tsx new file mode 100644 index 0000000..0125732 --- /dev/null +++ b/src/features/content/search/ModuleFilterChips.tsx @@ -0,0 +1,17 @@ +import React, { useMemo } from "react"; +import { Pressable, StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; +import { Colors } from "@/theme"; +import type { LogicalOperator, ModuleSearchFieldContract, SearchCriterion } from "../../types/presentation.types"; + +interface Props { fields: ModuleSearchFieldContract[]; filters: SearchCriterion[]; logic: LogicalOperator; onLogicChange:(logic:LogicalOperator)=>void; onRemove:(index:number)=>void; onClear:()=>void; } +function valueText(value:unknown):string { if(Array.isArray(value)) return value.map(valueText).join(", "); if(value===null||value===undefined) return ""; if(typeof value==="object"){ const r=value as Record; const l=r.label??r.name??r.value; return l!==undefined?String(l):JSON.stringify(value);} return String(value); } +export function ModuleFilterChips({fields,filters,logic,onLogicChange,onRemove,onClear}:Props){ + const fieldMap=useMemo(()=>new Map(fields.map((field)=>[field.attribute_key,field])),[fields]); if(!filters.length) return null; + return + {filters.length>1?Match{(["and","or"] as const).map((option)=>onLogicChange(option)} style={[styles.logicButton,logic===option&&styles.logicButtonActive]}>{option.toUpperCase()})}Clear:null} + {filters.map((filter,index)=>{ const field=fieldMap.get(filter.attribute_key); const label=field?.label??"Attribute"; return {label}{valueText(filter.value)}onRemove(index)}>;})} + ; +} +const styles=StyleSheet.create({container:{paddingHorizontal:moderateScale(24),paddingBottom:verticalScale(10),gap:verticalScale(8)},logicRow:{flexDirection:"row",alignItems:"center",gap:moderateScale(7)},logicLabel:{fontSize:moderateScale(11.5),color:Colors.textSecondary},logicButton:{paddingHorizontal:moderateScale(9),paddingVertical:verticalScale(5),borderRadius:999,borderWidth:1,borderColor:"#CBD5E1"},logicButtonActive:{borderColor:"#A7D7A9",backgroundColor:"#E8F5E9"},logicText:{fontSize:moderateScale(10.5),fontWeight:"800",color:Colors.textSecondary},logicTextActive:{color:Colors.primaryDark},clearButton:{marginLeft:"auto",paddingVertical:verticalScale(5)},clearText:{fontSize:moderateScale(11),fontWeight:"700",color:Colors.primaryDark},chips:{flexDirection:"row",flexWrap:"wrap",gap:moderateScale(8)},chip:{maxWidth:"100%",flexDirection:"row",alignItems:"center",gap:moderateScale(7),paddingLeft:moderateScale(11),paddingRight:moderateScale(7),paddingVertical:verticalScale(6),borderRadius:moderateScale(13),backgroundColor:"#E8F5E9",borderWidth:1,borderColor:"#C8E6C9"},chipCopy:{maxWidth:moderateScale(220)},chipLabel:{fontSize:moderateScale(10),fontWeight:"800",color:Colors.primaryDark},chipValue:{marginTop:1,fontSize:moderateScale(11.5),color:Colors.textPrimary}}); diff --git a/src/features/content/search/ModuleSearchResults.tsx b/src/features/content/search/ModuleSearchResults.tsx new file mode 100644 index 0000000..1069a71 --- /dev/null +++ b/src/features/content/search/ModuleSearchResults.tsx @@ -0,0 +1,11 @@ +import React from "react"; +import { ActivityIndicator, FlatList, RefreshControl, StyleSheet, Text, View } from "react-native"; +import { Colors } from "@/theme"; +import type { ModuleSearchContentItem } from "../../types/presentation.types"; +import { StandardIndexCard } from "../../renderers/shared/StandardIndexCard"; +interface Props { items:ModuleSearchContentItem[]; total:number; isLoading:boolean; isRefreshing:boolean; isFetchingNextPage:boolean; onRefresh:()=>void; onLoadMore:()=>void; onItemPress:(item:ModuleSearchContentItem)=>void; } +export function ModuleSearchResults({items,total,isLoading,isRefreshing,isFetchingNextPage,onRefresh,onLoadMore,onItemPress}:Props){ + if(isLoading&&!items.length) return Searching across module…; + return item.id} contentContainerStyle={items.length?styles.list:styles.emptyList} refreshControl={} renderItem={({item})=>onItemPress(item)}/>} ListHeaderComponent={items.length?{total} module result{total===1?"":"s"}:null} ListEmptyComponent={No matching contentTry removing a filter or changing the search value.} ListFooterComponent={isFetchingNextPage?:null} onEndReached={onLoadMore} onEndReachedThreshold={0.35}/>; +} +const styles=StyleSheet.create({list:{paddingBottom:24},emptyList:{flexGrow:1},center:{flex:1,alignItems:"center",justifyContent:"center",padding:28},resultCount:{paddingHorizontal:24,paddingVertical:8,fontSize:12,fontWeight:"700",color:Colors.textSecondary},emptyTitle:{fontSize:16,fontWeight:"800",color:Colors.textPrimary},muted:{marginTop:6,textAlign:"center",color:Colors.textSecondary},footer:{marginVertical:18}}); diff --git a/src/features/content/search/SearchAttributeModal.tsx b/src/features/content/search/SearchAttributeModal.tsx new file mode 100644 index 0000000..b206a80 --- /dev/null +++ b/src/features/content/search/SearchAttributeModal.tsx @@ -0,0 +1,227 @@ +import React, { useEffect, useMemo, useState } from "react"; +import { + Modal, + Pressable, + ScrollView, + StyleSheet, + Text, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; + +import { Colors } from "@/theme"; + +export interface SearchAttributeOption { + attribute_key: string; + label: string; +} + +interface SearchAttributeModalProps { + visible: boolean; + fields: SearchAttributeOption[]; + selected: string[]; + onApply: (attributeKeys: string[]) => void; + onClose: () => void; +} + +export function SearchAttributeModal({ + visible, + fields, + selected, + onApply, + onClose, +}: SearchAttributeModalProps) { + const validKeys = useMemo(() => new Set(fields.map((item) => item.attribute_key)), [fields]); + const [draft, setDraft] = useState([]); + + useEffect(() => { + if (!visible) return; + setDraft(selected.filter((key) => validKeys.has(key))); + }, [selected, validKeys, visible]); + + const selectedSet = useMemo(() => new Set(draft), [draft]); + + const toggle = (key: string) => { + setDraft((current) => + current.includes(key) + ? current.filter((item) => item !== key) + : [...current, key], + ); + }; + + return ( + + + + + + + + Search in + + Choose which searchable attributes should participate in the text search. + Leave all unselected to search everywhere. + + + + + + + + + setDraft([])} + style={[styles.option, draft.length === 0 && styles.optionActive]} + > + + + All searchable attributes + + Search across all visible searchable attributes in this module. + + {draft.length === 0 ? ( + + ) : null} + + + {fields.map((field) => { + const active = selectedSet.has(field.attribute_key); + return ( + toggle(field.attribute_key)} + style={[styles.option, active && styles.optionActive]} + > + + + {field.label} + + + + + ); + })} + + + + setDraft([])} style={styles.secondaryButton}> + Reset to all + + { + onApply(draft); + onClose(); + }} + style={styles.primaryButton} + > + Apply search fields + + + + + + ); +} + +const styles = StyleSheet.create({ + overlay: { flex: 1, justifyContent: "flex-end" }, + scrim: { ...StyleSheet.absoluteFillObject, backgroundColor: "rgba(15,23,42,0.36)" }, + sheet: { + maxHeight: "82%", + borderTopLeftRadius: moderateScale(22), + borderTopRightRadius: moderateScale(22), + backgroundColor: Colors.surface, + overflow: "hidden", + }, + handle: { + alignSelf: "center", + width: moderateScale(42), + height: verticalScale(4), + marginTop: verticalScale(8), + borderRadius: 99, + backgroundColor: "#CBD5E1", + }, + header: { + flexDirection: "row", + alignItems: "flex-start", + gap: moderateScale(12), + paddingHorizontal: moderateScale(20), + paddingTop: verticalScale(14), + paddingBottom: verticalScale(10), + }, + headerText: { flex: 1 }, + title: { fontSize: moderateScale(18), fontWeight: "800", color: Colors.textPrimary }, + subtitle: { + marginTop: verticalScale(4), + fontSize: moderateScale(12), + lineHeight: moderateScale(17), + color: Colors.textSecondary, + }, + closeButton: { + width: moderateScale(34), + height: moderateScale(34), + alignItems: "center", + justifyContent: "center", + }, + content: { + gap: verticalScale(8), + paddingHorizontal: moderateScale(20), + paddingVertical: verticalScale(10), + }, + option: { + minHeight: verticalScale(54), + flexDirection: "row", + alignItems: "center", + gap: moderateScale(12), + paddingHorizontal: moderateScale(14), + paddingVertical: verticalScale(10), + borderWidth: 1, + borderColor: "#E2E8F0", + borderRadius: moderateScale(14), + backgroundColor: "#FFFFFF", + }, + optionActive: { borderColor: "#A7D7A9", backgroundColor: "#F1F8F1" }, + optionCopy: { flex: 1 }, + optionTitle: { fontSize: moderateScale(13.5), fontWeight: "700", color: Colors.textPrimary }, + optionTitleActive: { color: Colors.primaryDark }, + optionText: { marginTop: 2, fontSize: moderateScale(11.5), color: Colors.textSecondary }, + footer: { + flexDirection: "row", + gap: moderateScale(10), + paddingHorizontal: moderateScale(20), + paddingTop: verticalScale(12), + paddingBottom: verticalScale(16), + borderTopWidth: 1, + borderTopColor: "#E2E8F0", + backgroundColor: "#FFFFFF", + }, + secondaryButton: { + minWidth: moderateScale(104), + alignItems: "center", + justifyContent: "center", + paddingHorizontal: moderateScale(14), + paddingVertical: verticalScale(11), + borderRadius: moderateScale(12), + borderWidth: 1, + borderColor: "#CBD5E1", + }, + secondaryText: { fontSize: moderateScale(12.5), fontWeight: "700", color: Colors.textPrimary }, + primaryButton: { + flex: 1, + alignItems: "center", + justifyContent: "center", + paddingHorizontal: moderateScale(14), + paddingVertical: verticalScale(11), + borderRadius: moderateScale(12), + backgroundColor: Colors.primary, + }, + primaryText: { fontSize: moderateScale(12.5), fontWeight: "800", color: "#FFFFFF" }, +}); diff --git a/src/features/content/store/content-search.store.ts b/src/features/content/store/content-search.store.ts new file mode 100644 index 0000000..cf6a9ff --- /dev/null +++ b/src/features/content/store/content-search.store.ts @@ -0,0 +1,5 @@ +import { create } from "zustand"; +import { LogicalOperator, SearchCriterion, SortCriterion } from "../types/presentation.types"; +interface State { query:string; logic:LogicalOperator; filters:SearchCriterion[]; sort:SortCriterion[]; setQuery:(v:string)=>void; setLogic:(v:LogicalOperator)=>void; setFilters:(v:SearchCriterion[])=>void; setSort:(v:SortCriterion[])=>void; reset:()=>void; } +const initial={query:"",logic:"and" as LogicalOperator,filters:[] as SearchCriterion[],sort:[] as SortCriterion[]}; +export const useContentSearchStore=create((set)=>({...initial,setQuery:(query)=>set({query}),setLogic:(logic)=>set({logic}),setFilters:(filters)=>set({filters}),setSort:(sort)=>set({sort}),reset:()=>set(initial)})); diff --git a/src/features/content/store/content.store.ts b/src/features/content/store/content.store.ts new file mode 100644 index 0000000..45f0131 --- /dev/null +++ b/src/features/content/store/content.store.ts @@ -0,0 +1,60 @@ +import AsyncStorage from "@react-native-async-storage/async-storage"; +import { create } from "zustand"; +import { createJSONStorage, persist } from "zustand/middleware"; + +export interface SelectedModuleState { + id: string; + code: string; + name: string; + slug: string; +} + +interface ContentStoreState { + selectedModule: SelectedModuleState | null; + selectedTemplateCode: string | null; + recentContentIds: string[]; + setSelectedModule: (module: SelectedModuleState | null) => void; + setSelectedTemplateCode: (templateCode: string | null) => void; + addRecentContent: (contentId: string) => void; + clearRecentContent: () => void; + reset: () => void; +} + +const initialState = { + selectedModule: null, + selectedTemplateCode: null, + recentContentIds: [] as string[], +}; + +export const useContentStore = create()( + persist( + (set) => ({ + ...initialState, + setSelectedModule: (module) => + set({ + selectedModule: module, + selectedTemplateCode: null, + }), + setSelectedTemplateCode: (templateCode) => + set({ selectedTemplateCode: templateCode }), + addRecentContent: (contentId) => + set((state) => ({ + recentContentIds: [ + contentId, + ...state.recentContentIds.filter((id) => id !== contentId), + ].slice(0, 20), + })), + clearRecentContent: () => set({ recentContentIds: [] }), + reset: () => set(initialState), + }), + { + name: "acupedia-content-store", + storage: createJSONStorage(() => AsyncStorage), + partialize: (state) => ({ + selectedModule: state.selectedModule, + selectedTemplateCode: state.selectedTemplateCode, + recentContentIds: state.recentContentIds, + }), + }, + ), +); diff --git a/src/features/content/store/template-search.store.ts b/src/features/content/store/template-search.store.ts new file mode 100644 index 0000000..9a51721 --- /dev/null +++ b/src/features/content/store/template-search.store.ts @@ -0,0 +1,104 @@ +import { create } from "zustand"; +import type { + LogicalOperator, + SearchCriterion, + SortCriterion, +} from "../types/presentation.types"; + +export interface TemplateSearchState { + initialized: boolean; + query: string; + logic: LogicalOperator; + filters: SearchCriterion[]; + sort: SortCriterion[]; +} + +interface TemplateSearchStore { + scopes: Record; + initialize: ( + scope: string, + defaults: Pick, + ) => void; + setQuery: (scope: string, query: string) => void; + setLogic: (scope: string, logic: LogicalOperator) => void; + setFilters: (scope: string, filters: SearchCriterion[]) => void; + setSort: (scope: string, sort: SortCriterion[]) => void; + reset: (scope: string) => void; +} + +const emptyState: TemplateSearchState = { + initialized: false, + query: "", + logic: "and", + filters: [], + sort: [], +}; + +function current( + scopes: Record, + scope: string, +): TemplateSearchState { + return scopes[scope] ?? emptyState; +} + +export const useTemplateSearchStore = create((set) => ({ + scopes: {}, + + initialize: (scope, defaults) => + set((state) => { + const existing = state.scopes[scope]; + if (existing?.initialized) return state; + + return { + scopes: { + ...state.scopes, + [scope]: { + initialized: true, + query: existing?.query ?? "", + logic: defaults.logic, + filters: existing?.filters ?? [], + sort: existing?.sort?.length ? existing.sort : defaults.sort, + }, + }, + }; + }), + + setQuery: (scope, query) => + set((state) => ({ + scopes: { + ...state.scopes, + [scope]: { ...current(state.scopes, scope), query }, + }, + })), + + setLogic: (scope, logic) => + set((state) => ({ + scopes: { + ...state.scopes, + [scope]: { ...current(state.scopes, scope), logic }, + }, + })), + + setFilters: (scope, filters) => + set((state) => ({ + scopes: { + ...state.scopes, + [scope]: { ...current(state.scopes, scope), filters }, + }, + })), + + setSort: (scope, sort) => + set((state) => ({ + scopes: { + ...state.scopes, + [scope]: { ...current(state.scopes, scope), sort }, + }, + })), + + reset: (scope) => + set((state) => { + const next = { ...state.scopes }; + delete next[scope]; + return { scopes: next }; + }), +})); diff --git a/src/features/content/types/content-reference.types.ts b/src/features/content/types/content-reference.types.ts new file mode 100644 index 0000000..ed8dc3b --- /dev/null +++ b/src/features/content/types/content-reference.types.ts @@ -0,0 +1,31 @@ +/** + * Hydrated content-reference DTOs returned by the content API. + * + * The frontend intentionally never resolves `source_key`. A `content_ref` is + * navigable only after the backend has hydrated `target.content_id`. + */ +export interface ContentReferenceTarget { + module_code: string; + template_code: string; + content_id: string; + source_key?: string | null; +} + +export interface ContentReference { + type: "content_ref"; + label?: string | null; + target: ContentReferenceTarget; +} + +export interface TemplateReferenceTarget { + module_code: string; + template_code: string; +} + +export interface TemplateReference { + type: "template_ref"; + label?: string | null; + target: TemplateReferenceTarget; +} + +export type NavigableContentReference = ContentReference | TemplateReference; diff --git a/src/features/content/types/content.types.ts b/src/features/content/types/content.types.ts new file mode 100644 index 0000000..70b3f65 --- /dev/null +++ b/src/features/content/types/content.types.ts @@ -0,0 +1,174 @@ +import type { ContentMediaItem } from "./media.types"; + +export type ContentKind = "point" | "pattern" | "nutrition" | "therapeutic"; +export type RecordStatus = "draft" | "published" | "archived"; +export type ModuleStatus = "draft" | "active" | "inactive" | "archived"; + +export interface ModuleRequest { + module_id?: string; + module_code?: string; +} + +export interface ModuleTemplateContentRequest extends ModuleRequest { + template_code: string; +} + +export interface ModuleSummary { + id: string; + code: string; + name: string; + slug: string; +} + +export interface ModuleResponse extends ModuleSummary { + description: string | null; + thumbnail_media_asset_id: string | null; + status: ModuleStatus; + is_active: boolean; + preview_enabled: boolean; + preview_item_limit: number; + release_version: string | null; + expected_release_date: string | null; + release_notes: string | null; + metadata: Record; + created_by: string | null; + updated_by: string | null; + created_at: string; + updated_at: string; +} + +export interface ModuleListResponse { + modules: ModuleResponse[]; +} + +export interface ContentListItem { + id: string; + content_kind: ContentKind | null; + title: string; + slug: string; + summary: string | null; + thumbnail_media_id: string | null; + has_detail: boolean; +} + +export interface ContentItemResponse { + id: string; + content_kind: ContentKind | null; + title: string; + slug: string; + summary: string | null; + status: RecordStatus; + is_active: boolean; + version_no: number; + metadata: Record; + published_at: string | null; + created_at: string; + updated_at: string; +} + +export interface ModuleContentItem { + module_id: string; + content_id: string; + sort_order: number; + is_highlighted: boolean; + created_at: string; + created_by: string | null; + content: ContentListItem; +} + +export interface ModuleContentListResponse { + module: ModuleSummary; + items: ModuleContentItem[]; +} + +export interface TemplateSummary { + id: string; + code: string; + name: string; + attribute_prefix_code: string; + attribute_prefix_name: string; +} + +export interface ModuleTemplateContentResponse { + module: ModuleSummary; + template: TemplateSummary; + items: ContentListItem[]; +} + +export interface ModuleTemplateContentDetailItem { + module_content_sort_order: number; + is_highlighted: boolean; + content: ContentItemResponse; + data: Record; + media: ContentMediaItem[]; +} + +export interface ModuleTemplateContentDetailResponse { + module: ModuleSummary; + template: TemplateSummary; + items: ModuleTemplateContentDetailItem[]; +} + +export interface ContentDetailResponse { + module: ModuleSummary; + content: ContentItemResponse; + data: Record; + media: ContentMediaItem[]; +} + +export interface AttributeDefinitionResponse { + id: string; + code: string; + attribute_key: string; + label: string; + definition_kind: "scalar" | "object"; + data_type: + | "text" + | "rich_text" + | "number" + | "boolean" + | "date" + | "json" + | "media" + | null; + is_root: boolean; + is_required: boolean; + is_searchable: boolean; + is_filterable: boolean; + is_multivalue: boolean; + sort_order: number; + allowed_values: unknown[] | null; + metadata: Record; + children: AttributeDefinitionResponse[]; +} + +export interface TemplateAttributeDefinitionsResponse { + template: TemplateSummary; + attributes: AttributeDefinitionResponse[]; +} + +export interface ReconstructedContentResponse { + id: string; + source_key: string | null; + content_kind: ContentKind | null; + definition_set: TemplateSummary | null; + title: string; + slug: string; + summary: string | null; + status: RecordStatus; + is_active: boolean; + default_language: string; + version_no: number; + published_at: string | null; + created_at: string | null; + updated_at: string | null; + metadata: Record; + attributes: Record; +} + +export interface PublishContentResponse { + id: string; + status: RecordStatus; + published_at: string | null; + updated_by: string | null; +} diff --git a/src/features/content/types/media.types.ts b/src/features/content/types/media.types.ts new file mode 100644 index 0000000..8ca53b0 --- /dev/null +++ b/src/features/content/types/media.types.ts @@ -0,0 +1,22 @@ +export type ContentMediaRole = "primary" | "gallery" | string; + +export interface ContentMediaItem { + id: string; + media_asset_id: string; + media_role: ContentMediaRole; + usage_type: string; + sort_order: number; + caption: string | null; + alt_text: string | null; + mime_type: string | null; + width: number | null; + height: number | null; + /** + * Backend-resolved URL. This can be a short-lived signed URL or a protected + * media-gateway URL. The mobile client never derives object-store credentials. + */ + url: string | null; + storage_key: string | null; + /** When true, the RN Image request includes the current bearer token. */ + requires_auth?: boolean; +} diff --git a/src/features/content/types/presentation.types.ts b/src/features/content/types/presentation.types.ts new file mode 100644 index 0000000..c68e648 --- /dev/null +++ b/src/features/content/types/presentation.types.ts @@ -0,0 +1,119 @@ +export type PresentationMode = "collection" | "single"; +export type LogicalOperator = "and" | "or"; +export type SortDirection = "asc" | "desc"; +export type EmptyBehavior = "hide" | "show"; +export type AttributeVisibility = "show" | "hide"; + +export type SearchOperator = + | "eq" + | "neq" + | "contains" + | "starts_with" + | "in" + | "gt" + | "gte" + | "lt" + | "lte"; + +export type CollectionItemLinkAction = "content_detail" | "template"; + +/** + * Legacy compatibility extension. + * + * The current backend TemplateContractResponse does not emit item_link. + * The UI keeps this optional shape so previously configured clients do not + * lose their navigation behavior if the backend restores the field later. + */ +export interface CollectionItemLinkContract { + action: CollectionItemLinkAction; + target_template_code?: string | null; + target_content_id_attribute?: string | null; +} + +export interface TemplateRendererContract { + collection?: string | null; + collection_item?: string | null; + detail: string; +} + +export interface TemplateAttributePresentationContract { + attribute_key: string; + visibility: AttributeVisibility; + empty_behavior: EmptyBehavior; + empty_text?: string | null; +} + +export interface TemplatePresentationContract { + mode: PresentationMode; + renderers: TemplateRendererContract; + attributes: TemplateAttributePresentationContract[]; + item_link?: CollectionItemLinkContract | null; +} + +export interface SearchFieldContract { + attribute_key: string; + label: string; + operators: SearchOperator[]; + renderer_hint?: string | null; + allowed_values?: unknown[] | null; +} + +export interface SortFieldContract { + field: string; + label: string; +} + +export interface SortCriterion { + field: string; + direction: SortDirection; +} + +export interface SearchProfileContract { + free_text_enabled: boolean; + default_logic: LogicalOperator; + fields: SearchFieldContract[]; + sort_fields: SortFieldContract[]; + default_sort: SortCriterion[]; +} + +export interface TemplateContractResponse { + template_code: string; + module_code?: string | null; + presentation: TemplatePresentationContract; + search: SearchProfileContract; +} + +export interface SearchCriterion { + attribute_key: string; + operator: SearchOperator; + value: unknown; +} + +export interface ContentSearchRequest { + module_id?: string; + module_code?: string; + template_code: string; + query?: string; + search_attributes?: string[]; + logic: LogicalOperator; + filters: SearchCriterion[]; + sort: SortCriterion[]; + page: number; + page_size: number; +} + +export interface SearchContentItem { + id: string; + content_kind?: string | null; + title: string; + slug: string; + summary?: string | null; + attributes: Record; +} + +export interface ContentSearchResponse { + page: number; + page_size: number; + total: number; + items: SearchContentItem[]; +} diff --git a/src/features/content/types/renderer.types.ts b/src/features/content/types/renderer.types.ts new file mode 100644 index 0000000..b5b6b97 --- /dev/null +++ b/src/features/content/types/renderer.types.ts @@ -0,0 +1,42 @@ +import type React from "react"; + +export interface ContentEnvelope { + id: string; + title: string; + slug: string; + summary?: string | null; +} + +export interface SearchResultItem extends ContentEnvelope { + content_kind?: string | null; + attributes: Record; +} + +export interface DetailRendererProps { + moduleCode: string; + templateCode: string; + contentId: string; + content: ContentEnvelope; + data: Record; +} + +export interface CollectionItemRendererProps { + item: SearchResultItem; + onPress: () => void; +} + +export interface CollectionRendererProps { + items: SearchResultItem[]; + total: number; + isLoading: boolean; + isRefreshing: boolean; + isFetchingNextPage: boolean; + onRefresh: () => void; + onLoadMore: () => void; + onItemPress: (item: SearchResultItem) => void; + renderItem: (props: CollectionItemRendererProps) => React.ReactElement; +} + +export type DetailRendererComponent = React.ComponentType; +export type CollectionItemRendererComponent = React.ComponentType; +export type CollectionRendererComponent = React.ComponentType; diff --git a/src/features/content/use-module-content-search-infinite-query.ts b/src/features/content/use-module-content-search-infinite-query.ts new file mode 100644 index 0000000..89ea34e --- /dev/null +++ b/src/features/content/use-module-content-search-infinite-query.ts @@ -0,0 +1,20 @@ +import { useInfiniteQuery } from "@tanstack/react-query"; +import { contentPresentationApi } from "../api/content-presentation.client"; +import { contentPresentationQueryKeys } from "../api/content-presentation.query-keys"; +import type { ModuleContentSearchRequest } from "../types/presentation.types"; + +export type ModuleSearchInfiniteRequest = Omit; + +export function useModuleContentSearchInfiniteQuery( + request: ModuleSearchInfiniteRequest, + options?: { enabled?: boolean }, +) { + const enabled = (options?.enabled ?? true) && Boolean(request.module_id || request.module_code); + return useInfiniteQuery({ + queryKey: contentPresentationQueryKeys.moduleSearch(request), + initialPageParam: 1, + enabled, + queryFn: ({ pageParam }) => contentPresentationApi.searchModuleContents({ ...request, page: pageParam }), + getNextPageParam: (last) => last.page * last.page_size < last.total ? last.page + 1 : undefined, + }); +} diff --git a/src/features/content/use-module-search-contract-query.ts b/src/features/content/use-module-search-contract-query.ts new file mode 100644 index 0000000..1c81817 --- /dev/null +++ b/src/features/content/use-module-search-contract-query.ts @@ -0,0 +1,15 @@ +import { useQuery } from "@tanstack/react-query"; +import { contentPresentationApi } from "../api/content-presentation.client"; +import { contentPresentationQueryKeys } from "../api/content-presentation.query-keys"; + +export function useModuleSearchContractQuery(moduleCode?: string | null) { + const code = moduleCode?.trim() ?? ""; + return useQuery({ + queryKey: contentPresentationQueryKeys.moduleSearchContract(code), + queryFn: () => contentPresentationApi.getModuleSearchContract(code), + enabled: Boolean(code), + staleTime: 30 * 60 * 1000, + gcTime: 60 * 60 * 1000, + retry: 2, + }); +} diff --git a/src/features/content/utils/attribute-definitions.ts b/src/features/content/utils/attribute-definitions.ts new file mode 100644 index 0000000..70080b7 --- /dev/null +++ b/src/features/content/utils/attribute-definitions.ts @@ -0,0 +1,37 @@ +import { AttributeDefinitionResponse } from "../types/content.types"; + +export function flattenAttributeDefinitions( + roots: AttributeDefinitionResponse[], +): AttributeDefinitionResponse[] { + const output: AttributeDefinitionResponse[] = []; + + const visit = (node: AttributeDefinitionResponse) => { + output.push(node); + node.children.forEach(visit); + }; + + roots.forEach(visit); + return output; +} + +export const getFilterableDefinitions = ( + roots: AttributeDefinitionResponse[], +) => flattenAttributeDefinitions(roots).filter((item) => item.is_filterable); + +export const getSearchableDefinitions = ( + roots: AttributeDefinitionResponse[], +) => flattenAttributeDefinitions(roots).filter((item) => item.is_searchable); + +export function findDefinitionByCode( + roots: AttributeDefinitionResponse[], + code: string, +): AttributeDefinitionResponse | null { + for (const node of roots) { + if (node.code === code) return node; + + const nested = findDefinitionByCode(node.children, code); + if (nested) return nested; + } + + return null; +} diff --git a/src/features/content/utils/attribute-presentation.ts b/src/features/content/utils/attribute-presentation.ts new file mode 100644 index 0000000..a6a4ecf --- /dev/null +++ b/src/features/content/utils/attribute-presentation.ts @@ -0,0 +1,159 @@ +import type { + TemplateAttributePresentationContract, + TemplatePresentationContract, +} from "../types/presentation.types"; + +/** + * Default required by the backend/frontend presentation contract. + * A missing rule must never make an empty attribute visible implicitly. + */ +export const DEFAULT_EMPTY_BEHAVIOR = "hide" as const; +export const DEFAULT_ATTRIBUTE_VISIBILITY = "show" as const; + +export type AttributePresentationMap = ReadonlyMap< + string, + TemplateAttributePresentationContract +>; + +function isPlainObject(value: unknown): value is Record { + if (value === null || typeof value !== "object") { + return false; + } + + const prototype = Object.getPrototypeOf(value); + return prototype === Object.prototype || prototype === null; +} + +/** + * Determines whether a content value is semantically empty for presentation. + * + * Empty: + * - null / undefined + * - empty or whitespace-only strings + * - arrays whose elements are all empty + * - plain objects whose values are all empty + * + * Not empty: + * - 0 + * - false + * - non-empty strings + * - numbers, including NaN/Infinity if they reached the presentation layer + * - non-plain objects (they are treated as concrete values) + */ +export function isEmptyValue(value: unknown): boolean { + if (value === null || value === undefined) { + return true; + } + + if (typeof value === "string") { + return value.trim().length === 0; + } + + if (Array.isArray(value)) { + return value.length === 0 || value.every(isEmptyValue); + } + + if (isPlainObject(value)) { + const values = Object.values(value); + return values.length === 0 || values.every(isEmptyValue); + } + + return false; +} + +/** + * Builds an immutable, O(1)-lookup index for a template contract's attribute + * presentation rules. Duplicate keys indicate a broken backend contract and + * are rejected rather than silently allowing the last value to win. + */ +export function createAttributePresentationMap( + attributes: readonly TemplateAttributePresentationContract[] | null | undefined, +): AttributePresentationMap { + const map = new Map(); + + for (const rule of attributes ?? []) { + const key = rule.attribute_key.trim(); + if (!key) { + throw new Error("Attribute presentation rule contains a blank attribute_key."); + } + if (map.has(key)) { + throw new Error(`Duplicate attribute presentation rule: ${key}`); + } + map.set(key, rule); + } + + return map; +} + +/** Convenience overload for callers holding the complete presentation contract. */ +export function createPresentationAttributeMap( + presentation: + | Pick + | null + | undefined, +): AttributePresentationMap { + return createAttributePresentationMap(presentation?.attributes); +} + +/** + * Returns the effective presentation rule for a canonical attribute key. + * + * The backend normally sends an effective rule for every active definition. + * The fallback remains `hide` defensively for older/cached contracts. + */ +export function getAttributePresentationRule( + attributeKey: string, + rules: AttributePresentationMap | readonly TemplateAttributePresentationContract[] | null | undefined, +): TemplateAttributePresentationContract { + const normalizedKey = attributeKey.trim(); + if (!normalizedKey) { + throw new Error("attributeKey is required."); + } + + const rule = rules instanceof Map + ? rules.get(normalizedKey) + : (rules ?? []).find((item) => item.attribute_key === normalizedKey); + + return rule ?? { + attribute_key: normalizedKey, + visibility: DEFAULT_ATTRIBUTE_VISIBILITY, + empty_behavior: DEFAULT_EMPTY_BEHAVIOR, + empty_text: null, + }; +} + +/** + * Determines whether an attribute should be rendered. + * Non-empty values always render. Empty values render only when explicitly + * configured with `empty_behavior: "show"`. + */ +export function shouldRenderAttribute( + value: unknown, + rule?: Pick | null, +): boolean { + if (rule?.visibility === "hide") return false; + if (!isEmptyValue(value)) return true; + return rule?.empty_behavior === "show"; +} + +/** + * Returns display text for an empty value when the rule explicitly permits + * rendering it. A null result means no placeholder text should be displayed. + * + * This helper intentionally returns null for non-empty values: formatting real + * values is the semantic renderer's responsibility. + */ +export function getEmptyDisplayText( + value: unknown, + rule?: Pick< + TemplateAttributePresentationContract, + "empty_behavior" | "empty_text" + > | null, +): string | null { + if (!isEmptyValue(value) || rule?.empty_behavior !== "show") { + return null; + } + + const text = rule.empty_text?.trim(); + return text ? text : null; +} diff --git a/src/features/content/utils/content-reference.ts b/src/features/content/utils/content-reference.ts new file mode 100644 index 0000000..44ab018 --- /dev/null +++ b/src/features/content/utils/content-reference.ts @@ -0,0 +1,107 @@ +import type { + ContentReference, + NavigableContentReference, + TemplateReference, +} from "../types/content-reference.types"; + +function asRecord(value: unknown): Record | null { + if (typeof value !== "object" || value === null || Array.isArray(value)) return null; + return value as Record; +} + +function nonBlankString(value: unknown): string | null { + if (typeof value !== "string") return null; + const normalized = value.trim(); + return normalized.length > 0 ? normalized : null; +} + +export function parseContentReference(value: unknown): ContentReference | null { + const reference = asRecord(value); + if (!reference || reference.type !== "content_ref") return null; + + const target = asRecord(reference.target); + if (!target) return null; + + const moduleCode = nonBlankString(target.module_code); + const templateCode = nonBlankString(target.template_code); + const contentId = nonBlankString(target.content_id); + + // source_key is provenance only. A hydrated content_id is mandatory for UI navigation. + if (!moduleCode || !templateCode || !contentId) return null; + + const sourceKey = nonBlankString(target.source_key); + const label = nonBlankString(reference.label); + + return { + type: "content_ref", + ...(label ? { label } : {}), + target: { + module_code: moduleCode, + template_code: templateCode, + content_id: contentId, + ...(sourceKey ? { source_key: sourceKey } : {}), + }, + }; +} + +export function parseTemplateReference(value: unknown): TemplateReference | null { + const reference = asRecord(value); + if (!reference || reference.type !== "template_ref") return null; + + const target = asRecord(reference.target); + if (!target) return null; + + const moduleCode = nonBlankString(target.module_code); + const templateCode = nonBlankString(target.template_code); + if (!moduleCode || !templateCode) return null; + + const label = nonBlankString(reference.label); + return { + type: "template_ref", + ...(label ? { label } : {}), + target: { + module_code: moduleCode, + template_code: templateCode, + }, + }; +} + +export function parseNavigableContentReference(value: unknown): NavigableContentReference | null { + return parseContentReference(value) ?? parseTemplateReference(value); +} + +/** + * Normalizes either a single reference object or a multivalue reference array. + * Invalid/unhydrated entries are ignored and original array order is preserved. + */ +export function getNavigableContentReferences(value: unknown): NavigableContentReference[] { + const values = Array.isArray(value) ? value : [value]; + const references: NavigableContentReference[] = []; + + for (const candidate of values) { + const reference = parseNavigableContentReference(candidate); + if (reference) references.push(reference); + } + + return references; +} + +/** + * Collection-card navigation is only inferred from row data when the row has + * exactly one valid target. Multiple targets are intentionally not guessed. + */ +export function getSingleNavigableContentReference(value: unknown): NavigableContentReference | null { + const references = getNavigableContentReferences(value); + return references.length === 1 ? references[0] : null; +} + +export function buildContentReferenceRoute(reference: NavigableContentReference): string { + const moduleCode = encodeURIComponent(reference.target.module_code); + const templateCode = encodeURIComponent(reference.target.template_code); + + if (reference.type === "template_ref") { + return `/modules/${moduleCode}/${templateCode}`; + } + + return `/modules/${moduleCode}/${templateCode}/${encodeURIComponent(reference.target.content_id)}`; +} diff --git a/src/features/content/utils/search-capabilities.ts b/src/features/content/utils/search-capabilities.ts new file mode 100644 index 0000000..71caed5 --- /dev/null +++ b/src/features/content/utils/search-capabilities.ts @@ -0,0 +1,77 @@ +import type { AttributeDefinitionResponse } from "../types/content.types"; +import type { + SearchFieldContract, + SearchOperator, +} from "../types/presentation.types"; +import { flattenAttributeDefinitions } from "./attribute-definitions"; + +function operatorsFor(definition: AttributeDefinitionResponse): SearchOperator[] { + switch (definition.data_type) { + case "number": + case "date": + return ["eq", "neq", "in", "gt", "gte", "lt", "lte"]; + case "boolean": + return ["eq", "neq", "in"]; + case "text": + case "rich_text": + return ["eq", "neq", "contains", "starts_with", "in"]; + default: + return []; + } +} + +function hintFor(definition: AttributeDefinitionResponse): string | null { + if (definition.allowed_values?.length) { + return definition.is_multivalue ? "multi_select" : "select"; + } + if (definition.data_type === "boolean") return "boolean"; + if (definition.data_type === "number") return "number"; + if (definition.data_type === "date") return "date"; + return "text"; +} + +/** + * Merge server search-contract filter fields with live attribute capabilities. + * Contract entries win so backend-provided operator restrictions are preserved. + */ +export function resolveFilterFields( + contractFields: readonly SearchFieldContract[] | null | undefined, + roots: readonly AttributeDefinitionResponse[] | null | undefined, +): SearchFieldContract[] { + const result = new Map(); + + for (const field of contractFields ?? []) { + if (field.attribute_key?.trim()) result.set(field.attribute_key, field); + } + + for (const definition of flattenAttributeDefinitions([...(roots ?? [])])) { + if (!definition.is_filterable || definition.definition_kind !== "scalar") continue; + const operators = operatorsFor(definition); + if (!operators.length || result.has(definition.attribute_key)) continue; + result.set(definition.attribute_key, { + attribute_key: definition.attribute_key, + label: definition.label, + operators, + renderer_hint: hintFor(definition), + allowed_values: definition.allowed_values, + }); + } + + return [...result.values()]; +} + +export function resolveSearchableFields( + roots: readonly AttributeDefinitionResponse[] | null | undefined, +): Array<{ attribute_key: string; label: string }> { + return flattenAttributeDefinitions([...(roots ?? [])]) + .filter( + (definition) => + definition.is_searchable && + definition.definition_kind === "scalar" && + (definition.data_type === "text" || definition.data_type === "rich_text"), + ) + .map((definition) => ({ + attribute_key: definition.attribute_key, + label: definition.label, + })); +} diff --git a/src/features/history/store/recent-content.store.ts b/src/features/history/store/recent-content.store.ts new file mode 100644 index 0000000..efe3c10 --- /dev/null +++ b/src/features/history/store/recent-content.store.ts @@ -0,0 +1,73 @@ +import AsyncStorage from "@react-native-async-storage/async-storage"; +import { create } from "zustand"; +import { createJSONStorage, persist } from "zustand/middleware"; + +export interface LastVisitedContent { + module_code: string; + template_code: string; + content_id?: string; + title: string; + subtitle?: string; + visited_at: string; +} + +interface RecentContentState { + lastVisited: LastVisitedContent | null; + setLastVisited: (value: Omit) => void; + clearLastVisited: () => void; +} + +function normalizeRequired(value: string): string { + return value.trim(); +} + +export function buildLastVisitedRoute( + item: LastVisitedContent, +): string { + const moduleCode = encodeURIComponent(item.module_code); + const templateCode = encodeURIComponent(item.template_code); + + if (item.content_id?.trim()) { + return `/modules/${moduleCode}/${templateCode}/${encodeURIComponent( + item.content_id.trim(), + )}`; + } + + return `/modules/${moduleCode}/${templateCode}`; +} + +export const useRecentContentStore = create()( + persist( + (set) => ({ + lastVisited: null, + + setLastVisited: (value) => { + const moduleCode = normalizeRequired(value.module_code); + const templateCode = normalizeRequired(value.template_code); + const title = normalizeRequired(value.title); + + if (!moduleCode || !templateCode || !title) return; + + set({ + lastVisited: { + module_code: moduleCode, + template_code: templateCode, + content_id: value.content_id?.trim() || undefined, + title, + subtitle: value.subtitle?.trim() || undefined, + visited_at: new Date().toISOString(), + }, + }); + }, + + clearLastVisited: () => set({ lastVisited: null }), + }), + { + name: "accupedia-recent-content", + storage: createJSONStorage(() => AsyncStorage), + partialize: (state) => ({ + lastVisited: state.lastVisited, + }), + }, + ), +); diff --git a/src/features/modules/module-index.ts b/src/features/modules/module-index.ts new file mode 100644 index 0000000..a8c82c6 --- /dev/null +++ b/src/features/modules/module-index.ts @@ -0,0 +1,251 @@ +import type { ModuleResponse } from "@/features/content/types/content.types"; +import type { TemplateReference } from "@/features/content/types/content-reference.types"; + +export interface ModuleVisualConfig { + title?: string; + description?: string; + icon: string; + color: string; + category: string; + isDefaultFree: boolean; + planCode: string; + entryTemplateCode?: string; +} + +export interface ModuleIndexItem { + module: ModuleResponse; + reference: TemplateReference; + title: string; + description: string; + icon: string; + color: string; + category: string; + isDefaultFree: boolean; + planCode: string; +} + +const MODULE_VISUALS: Record = { + M0001: { + title: "Acupuncture", + description: "All points, locations, indications & more", + icon: "water-outline", + color: "#2563EB", + category: "point", + isDefaultFree: true, + planCode: "POINTS_ACU", + entryTemplateCode: "M0001_CT0001", + }, + M0002: { + title: "Ear-acupuncture", + description: "Ear Points & Point Category", + icon: "ear-outline", + color: "#F59E0B", + category: "point", + isDefaultFree: false, + planCode: "POINTS_EAR", + }, + M0003: { + title: "Scalp acupuncture", + description: "Scalp zones, points & protocols", + icon: "accessibility-outline", + color: "#EF4444", + category: "point", + isDefaultFree: false, + planCode: "POINTS_SCALP", + }, + M0011: { + title: "Eight principle", + description: "Exterior/Interior, Cold/Heat, Deficiency/Excess, Yin/Yang patterns", + icon: "git-network-outline", + color: "#7C3AED", + category: "Patterns", + isDefaultFree: true, + planCode: "PATTERN_CORE", + }, + M0012: { + title: "TCM Patterns", + description: "Zangfu organ and channel identification", + icon: "pulse-outline", + color: "#06B6D4", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + M0013: { + title: "Qi-Blood-body fluid", + description: "Qi, Blood, and Body Fluid identification of patterns", + icon: "water-outline", + color: "#3B82F6", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + M0014: { + title: "Pathogenic factors", + description: "Wind, Cold, Summer-Heat, Dampness, Dryness, Fire patterns", + icon: "flame-outline", + color: "#F59E0B", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + M0015: { + title: "Six stages", + description: "Tai Yang, Yang Ming, Shao Yang, Tai Yin, Shao Yin, Jue Yin", + icon: "layers-outline", + color: "#10B981", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + M0016: { + title: "Four level", + description: "Wei, Qi, Ying, Xue level pattern identification", + icon: "trending-up-outline", + color: "#EF4444", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + M0017: { + title: "Three burners", + description: "Upper, Middle, and Lower Burner pattern identification", + icon: "thermometer-outline", + color: "#EC4899", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + M0018: { + title: "Twelve channel", + description: "Twelve-channel theory and clinical reference", + icon: "pulse-outline", + color: "#06B6D4", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + M0019: { + title: "Five elements", + description: "Wood, Fire, Earth, Metal, Water relationships and patterns", + icon: "flower-outline", + color: "#6366F1", + category: "Patterns", + isDefaultFree: false, + planCode: "PATTERN_CORE", + }, + M0020: { + title: "Extra Ordinary Vessel", + description: "Extraordinary vessel theory, pathways and relationships", + icon: "git-branch-outline", + color: "#8B5CF6", + category: "point", + isDefaultFree: false, + planCode: "POINTS_ACU", + }, + M0031: { + title: "Nutrition", + description: "Nutritional food classifications, properties and indications", + icon: "nutrition-outline", + color: "#10B981", + category: "Nutrition", + isDefaultFree: true, + planCode: "NUTRITION_CORE", + }, + M0041: { + title: "Auriculotherapy", + description: "Auriculotherapy reflexology systems", + icon: "body-outline", + color: "#8B5CF6", + category: "point", + isDefaultFree: false, + planCode: "LIFETIME_ALL", + }, + M0042: { + title: "Gynecology", + description: "Menstrual irregularities and pregnancy patterns", + icon: "woman-outline", + color: "#EC4899", + category: "Therapeutics", + isDefaultFree: false, + planCode: "THERAPEUTICS_GYNAE", + }, +}; + +function asNonBlankString(value: unknown): string | null { + if (typeof value !== "string") return null; + const normalized = value.trim(); + return normalized.length > 0 ? normalized : null; +} + +function readMetadataString(module: ModuleResponse, key: string): string | null { + return asNonBlankString(module.metadata?.[key]); +} + +export function resolveModuleEntryTemplateCode(module: ModuleResponse): string { + const configured = MODULE_VISUALS[module.code]?.entryTemplateCode; + const metadataConfigured = + readMetadataString(module, "entry_template_code") ?? + readMetadataString(module, "index_template_code") ?? + readMetadataString(module, "root_template_code"); + + if (metadataConfigured) return metadataConfigured; + if (configured) return configured; + + // Canonical convention used by seeded modules: the module entry/index + // template is CT0001 unless explicitly overridden in module metadata. + return `${module.code}_CT0001`; +} + +export function buildModuleTemplateReference(module: ModuleResponse): TemplateReference { + return { + type: "template_ref", + label: module.name, + target: { + module_code: module.code, + template_code: resolveModuleEntryTemplateCode(module), + }, + }; +} + +export function toModuleIndexItem(module: ModuleResponse): ModuleIndexItem { + const visual = MODULE_VISUALS[module.code]; + const metadataCategory = readMetadataString(module, "category"); + const metadataIcon = readMetadataString(module, "icon"); + const metadataColor = readMetadataString(module, "color"); + const metadataPlanCode = readMetadataString(module, "plan_code"); + + return { + module, + reference: buildModuleTemplateReference(module), + title: visual?.title ?? module.name, + description: + visual?.description ?? + module.description ?? + "Structured clinical reference content", + icon: metadataIcon ?? visual?.icon ?? "folder-outline", + color: metadataColor ?? visual?.color ?? "#4F46E5", + category: + metadataCategory ?? + visual?.category ?? + readMetadataString(module, "kind") ?? + "Other", + isDefaultFree: visual?.isDefaultFree ?? false, + planCode: metadataPlanCode ?? visual?.planCode ?? "", + }; +} + +export function normalizeModuleListResponse(value: unknown): ModuleResponse[] { + if (Array.isArray(value)) { + return value as ModuleResponse[]; + } + + if (typeof value === "object" && value !== null) { + const modules = (value as { modules?: unknown }).modules; + if (Array.isArray(modules)) { + return modules as ModuleResponse[]; + } + } + + return []; +} diff --git a/src/features/profile/components/EditProfileAvatar.tsx b/src/features/profile/components/EditProfileAvatar.tsx new file mode 100644 index 0000000..4ac1992 --- /dev/null +++ b/src/features/profile/components/EditProfileAvatar.tsx @@ -0,0 +1,96 @@ +import React from "react"; +import { + Image, + Pressable, + StyleSheet, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; + +interface EditProfileAvatarProps { + imageUri?: string; + onPress?: () => void; +} + +export default function EditProfileAvatar({ + imageUri, + onPress, +}: EditProfileAvatarProps) { + return ( + + + {imageUri ? ( + + ) : ( + + + + )} + + + + + + + ); +} + +const styles = StyleSheet.create({ + container: { + alignItems: "center", + marginBottom: verticalScale(28), + }, + + avatarWrapper: { + position: "relative", + }, + + avatar: { + width: scale(108), + height: scale(108), + borderRadius: scale(54), + backgroundColor: "#F2F3F7", + justifyContent: "center", + alignItems: "center", + }, + + cameraButton: { + position: "absolute", + right: scale(0), + bottom: scale(2), + + width: scale(32), + height: scale(32), + borderRadius: scale(16), + + backgroundColor: "#5B3DF5", + + justifyContent: "center", + alignItems: "center", + + borderWidth: 2, + borderColor: "#FFFFFF", + }, +}); \ No newline at end of file diff --git a/src/features/profile/components/EditProfileForm.tsx b/src/features/profile/components/EditProfileForm.tsx new file mode 100644 index 0000000..63f5238 --- /dev/null +++ b/src/features/profile/components/EditProfileForm.tsx @@ -0,0 +1,144 @@ +import React, { useState, useEffect } from "react"; +import { + StyleSheet, + View, +} from "react-native"; +import { + verticalScale, +} from "react-native-size-matters"; + +import BaseTextInput from "@/components/forms/BaseTextInput"; +import DropdownField from "@/components/forms/DropdownField"; +import FieldLabel from "@/components/forms/FieldLabel"; +import PrimaryButton from "@/components/buttons/PrimaryButton"; + +interface EditProfileFormProps { + initialName?: string; + initialEmail?: string; + initialPhone?: string; + initialProfession?: string; + initialCountry?: string; + onSave?: (updatedName: string, updatedPhone: string) => void; +} + +export default function EditProfileForm({ + initialName = "User Name", + initialEmail = "user@example.com", + initialPhone = "", + initialProfession = "Practitioner", + initialCountry = "India", + onSave, +}: EditProfileFormProps) { + const [fullName, setFullName] = useState(initialName); + const [phone, setPhone] = useState(initialPhone); + + useEffect(() => { + setFullName(initialName); + }, [initialName]); + + useEffect(() => { + setPhone(initialPhone); + }, [initialPhone]); + + const [profession, setProfession] = + useState(initialProfession); + + const [country] = + useState(initialCountry); + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + // TODO: + // Open Country Picker + }} + /> + + + { + onSave?.(fullName, phone); + }} + /> + + ); +} + +const styles = StyleSheet.create({ + container: { + marginTop: verticalScale(8), + }, + + field: { + marginBottom: verticalScale(18), + }, +}); \ No newline at end of file diff --git a/src/features/profile/components/EditProfileHeader.tsx b/src/features/profile/components/EditProfileHeader.tsx new file mode 100644 index 0000000..44c66e7 --- /dev/null +++ b/src/features/profile/components/EditProfileHeader.tsx @@ -0,0 +1,94 @@ +import React from "react"; +import { + Pressable, + StyleSheet, + Text, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { useRouter } from "expo-router"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; + +import { Colors } from "@/theme"; + +interface EditProfileHeaderProps { + title?: string; +} + +export default function EditProfileHeader({ + title = "Edit Profile", +}: EditProfileHeaderProps) { + const router = useRouter(); + + return ( + + { + if (router.canGoBack()) { + router.back(); + } else { + router.replace("/"); + } + }} + > + + + + + {title} + + + {/* Placeholder keeps title perfectly centered */} + + + ); +} + +const styles = StyleSheet.create({ + container: { + height: verticalScale(56), + + flexDirection: "row", + + alignItems: "center", + + marginBottom: verticalScale(28), + }, + + backButton: { + width: scale(40), + height: scale(40), + + justifyContent: "center", + alignItems: "center", + }, + + title: { + flex: 1, + + textAlign: "center", + + fontSize: moderateScale(18), + + fontWeight: "700", + + color: Colors.text, + }, + + placeholder: { + width: scale(40), + height: scale(40), + }, +}); \ No newline at end of file diff --git a/src/features/profile/components/ProfileAvatar.tsx b/src/features/profile/components/ProfileAvatar.tsx new file mode 100644 index 0000000..1f6b61c --- /dev/null +++ b/src/features/profile/components/ProfileAvatar.tsx @@ -0,0 +1,140 @@ +import React from "react"; +import { + Image, + Pressable, + StyleSheet, + Text, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { useRouter } from "expo-router"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; + +import { Colors } from "@/theme"; + +interface ProfileAvatarProps { + name: string; + email: string; + imageUri?: string; + onEditPress?: () => void; +} + +export default function ProfileAvatar({ + name, + email, + imageUri, + onEditPress, +}: ProfileAvatarProps) { + const router = useRouter(); + + const handleEditProfile = () => { + onEditPress?.(); + router.push("/profile/edit"); + }; + + return ( + + + {imageUri ? ( + + ) : ( + + + + )} + + + + + + + + + {name} + + + + + {email} + + + ); +} + +const styles = StyleSheet.create({ + container: { + alignItems: "center", + marginTop: verticalScale(10), + marginBottom: verticalScale(28), + }, + + avatarWrapper: { + position: "relative", + marginBottom: verticalScale(16), + }, + + avatar: { + width: scale(96), + height: scale(96), + borderRadius: scale(48), + backgroundColor: "#F2F3F7", + justifyContent: "center", + alignItems: "center", + }, + + editButton: { + position: "absolute", + right: scale(-2), + bottom: scale(-2), + + width: scale(30), + height: scale(30), + borderRadius: scale(15), + + backgroundColor: "#5B3DF5", + + justifyContent: "center", + alignItems: "center", + + borderWidth: 2, + borderColor: "#FFFFFF", + }, + + name: { + fontSize: moderateScale(18), + fontWeight: "700", + color: Colors.text, + }, + + email: { + marginTop: verticalScale(6), + fontSize: moderateScale(14), + color: "#7A7A7A", + }, +}); \ No newline at end of file diff --git a/src/features/profile/components/ProfileHeader.tsx b/src/features/profile/components/ProfileHeader.tsx new file mode 100644 index 0000000..66e7a08 --- /dev/null +++ b/src/features/profile/components/ProfileHeader.tsx @@ -0,0 +1,109 @@ +import React from "react"; +import { + Pressable, + StyleSheet, + Text, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { useRouter } from "expo-router"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; + +import { Colors } from "@/theme"; + +interface ProfileHeaderProps { + title?: string; + onSettingsPress?: () => void; +} + +export default function ProfileHeader({ + title = "My Profile", + onSettingsPress, +}: ProfileHeaderProps) { + const router = useRouter(); + + return ( + + { + if (router.canGoBack()) { + router.back(); + } else { + router.replace("/"); + } + }} + > + + + + + {title} + + + + + + + ); +} + +const styles = StyleSheet.create({ + container: { + height: verticalScale(56), + + flexDirection: "row", + + alignItems: "center", + + justifyContent: "space-between", + + marginBottom: verticalScale(24), + }, + + iconButton: { + width: scale(40), + + height: scale(40), + + justifyContent: "center", + + alignItems: "center", + }, + + title: { + flex: 1, + + textAlign: "center", + + fontSize: moderateScale(18), + + fontWeight: "700", + + color: Colors.text, + }, +}); \ No newline at end of file diff --git a/src/features/profile/components/ProfileMenuItem.tsx b/src/features/profile/components/ProfileMenuItem.tsx new file mode 100644 index 0000000..be3b248 --- /dev/null +++ b/src/features/profile/components/ProfileMenuItem.tsx @@ -0,0 +1,189 @@ +import React from "react"; +import { + Pressable, + StyleSheet, + Switch, + Text, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; + +import { Colors } from "@/theme"; + +interface ProfileMenuItemProps { + icon: keyof typeof Ionicons.glyphMap; + title: string; + subtitle?: string; + value?: string | number; + onPress?: () => void; + showArrow?: boolean; + isLast?: boolean; + isSwitch?: boolean; + switchValue?: boolean; + onSwitchChange?: (value: boolean) => void; +} + +export default function ProfileMenuItem({ + icon, + title, + subtitle, + value, + onPress, + showArrow = true, + isLast = false, + isSwitch = false, + switchValue = false, + onSwitchChange, +}: ProfileMenuItemProps) { + const handlePress = () => { + if (isSwitch && onSwitchChange) { + onSwitchChange(!switchValue); + } else if (onPress) { + onPress(); + } + }; + + return ( + [ + styles.container, + !isLast && styles.border, + pressed && !isSwitch && styles.pressed, + ]} + > + + + + + + + + {title} + + {!!subtitle && ( + + {subtitle} + + )} + + + + + {value !== undefined && !isSwitch && ( + + {value} + + )} + + {isSwitch ? ( + + ) : showArrow ? ( + + ) : null} + + + ); +} + +const styles = StyleSheet.create({ + container: { + minHeight: verticalScale(54), + + flexDirection: "row", + + alignItems: "center", + + justifyContent: "space-between", + + paddingHorizontal: scale(16), + + backgroundColor: "#FFFFFF", + }, + + border: { + borderBottomWidth: 1, + borderBottomColor: "#F1F3F5", + }, + + leftSection: { + flex: 1, + + flexDirection: "row", + + alignItems: "center", + + marginRight: scale(12), + }, + + iconContainer: { + width: scale(28), + + justifyContent: "center", + + alignItems: "center", + + marginRight: scale(10), + }, + + textContainer: { + flex: 1, + justifyContent: "center", + }, + + title: { + fontSize: moderateScale(14), + fontWeight: "500", + color: Colors.text, + }, + + subtitle: { + fontSize: moderateScale(11), + color: "#94A3B8", + marginTop: verticalScale(2), + }, + + rightSection: { + flexDirection: "row", + alignItems: "center", + }, + + value: { + marginRight: scale(6), + fontSize: moderateScale(13), + color: "#6B7280", + fontWeight: "500", + }, + + pressed: { + backgroundColor: "#F8F9FA", + }, +}); \ No newline at end of file diff --git a/src/features/profile/components/ProfileOverviewCard.tsx b/src/features/profile/components/ProfileOverviewCard.tsx new file mode 100644 index 0000000..e852835 --- /dev/null +++ b/src/features/profile/components/ProfileOverviewCard.tsx @@ -0,0 +1,220 @@ +import React, { useEffect } from "react"; +import { StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; + +import ProfileMenuItem from "./ProfileMenuItem"; +import { useAuthStore } from "@/store/auth.store"; + +function formatDate(value?: string | null): string { + if (!value) return "Lifetime Access"; + const date = new Date(value); + if (Number.isNaN(date.getTime())) return "Not Available"; + return date.toLocaleDateString("en-US", { + day: "numeric", + month: "short", + year: "numeric", + }); +} + +function planLabel(code: string): string { + if (code === "LIFETIME_ALL" || code === "LIFETIME_ALL_USD") { + return "Lifetime All-Access Pass"; + } + return code + .replace(/_USD$/i, "") + .replace(/_/g, " ") + .toLowerCase() + .replace(/\b\w/g, (value) => value.toUpperCase()); +} + +export default function ProfileOverviewCard() { + const user = useAuthStore((state) => state.user); + const access = useAuthStore((state) => state.access); + const accessToken = useAuthStore((state) => state.accessToken); + const refreshAccess = useAuthStore((state) => state.refreshAccess); + + useEffect(() => { + if (accessToken) void refreshAccess(); + }, [accessToken, refreshAccess]); + + const activeSubscriptions = access?.active_subscriptions ?? []; + const activeEntitlements = access?.active_entitlements ?? []; + const unlockedCount = new Set(access?.unlocked_module_codes ?? []).size; + + const memberSince = user?.created_at + ? formatDate(user.created_at) + : "Not Available"; + + const accountOverviewItems = [ + { + icon: "time-outline" as keyof typeof Ionicons.glyphMap, + title: "Member Since", + value: memberSince, + }, + { + icon: "call-outline" as keyof typeof Ionicons.glyphMap, + title: "Phone Number", + value: user?.phone_number || "Not Configured", + }, + { + icon: "globe-outline" as keyof typeof Ionicons.glyphMap, + title: "Country", + value: user?.country || "India", + }, + { + icon: "cube-outline" as keyof typeof Ionicons.glyphMap, + title: "Modules Unlocked", + value: unlockedCount.toString(), + }, + ]; + + return ( + + Account Overview + + {accountOverviewItems.map((item, index) => ( + + ))} + + + + Subscriptions + + {activeSubscriptions.length === 0 ? ( + + No active paid subscription + + Free modules remain available. Paid access will appear here after checkout is verified. + + + ) : ( + activeSubscriptions.map((subscription, index) => ( + + + {planLabel(subscription.plan_code)} + + Started: {formatDate(subscription.started_at)} + + + Expires: {formatDate(subscription.expires_at)} + + + + {subscription.status} + + + )) + )} + + + + {activeEntitlements.length > 0 ? ( + + Unlocked Modules + + {activeEntitlements.map((entitlement, index) => ( + + + + + + {entitlement.module_name} + + Access until: {formatDate(entitlement.expires_at)} + + + + ))} + + + ) : null} + + ); +} + +const styles = StyleSheet.create({ + container: { marginTop: verticalScale(8) }, + section: { marginTop: verticalScale(24) }, + heading: { + fontSize: moderateScale(16), + fontWeight: "700", + color: "#171717", + marginBottom: verticalScale(12), + }, + card: { + backgroundColor: "#FFFFFF", + borderRadius: moderateScale(16), + overflow: "hidden", + borderWidth: 1, + borderColor: "#ECECEC", + }, + subRow: { + padding: moderateScale(16), + flexDirection: "row", + alignItems: "center", + justifyContent: "space-between", + }, + entitlementRow: { + padding: moderateScale(16), + flexDirection: "row", + alignItems: "center", + }, + entitlementIcon: { marginRight: moderateScale(10) }, + subLeft: { flex: 1 }, + subTitle: { + fontSize: moderateScale(14), + fontWeight: "600", + color: "#171717", + marginBottom: verticalScale(4), + }, + subDateText: { + fontSize: moderateScale(12), + color: "#737373", + marginTop: verticalScale(2), + }, + statusBadge: { + backgroundColor: "#DCFCE7", + paddingHorizontal: moderateScale(10), + paddingVertical: moderateScale(4), + borderRadius: moderateScale(12), + marginLeft: moderateScale(12), + }, + statusText: { + fontSize: moderateScale(11), + fontWeight: "600", + color: "#15803D", + textTransform: "capitalize", + }, + separator: { borderBottomWidth: 1, borderBottomColor: "#ECECEC" }, + emptyRow: { padding: moderateScale(16) }, + emptyTitle: { + fontSize: moderateScale(14), + fontWeight: "600", + color: "#171717", + }, + emptyText: { + marginTop: verticalScale(5), + fontSize: moderateScale(12), + color: "#737373", + lineHeight: moderateScale(18), + }, +}); diff --git a/src/features/profile/components/ProfileStatCard.tsx b/src/features/profile/components/ProfileStatCard.tsx new file mode 100644 index 0000000..59b5427 --- /dev/null +++ b/src/features/profile/components/ProfileStatCard.tsx @@ -0,0 +1,94 @@ +import React from "react"; +import { + Pressable, + StyleSheet, + Text, + View, +} from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { + moderateScale, + scale, + verticalScale, +} from "react-native-size-matters"; + +interface ProfileStatCardProps { + title: string; + value: string | number; + icon: keyof typeof Ionicons.glyphMap; + onPress?: () => void; +} + +export default function ProfileStatCard({ + title, + value, + icon, + onPress, +}: ProfileStatCardProps) { + return ( + [ + styles.card, + pressed && styles.pressed, + ]} + onPress={onPress} + > + + + + + + {value} + + + + {title} + + + ); +} + +const styles = StyleSheet.create({ + card: { + width: "48%", + backgroundColor: "#FFFFFF", + borderRadius: moderateScale(16), + paddingVertical: verticalScale(18), + paddingHorizontal: scale(16), + marginBottom: verticalScale(14), + elevation: 2, + shadowColor: "#000", + shadowOpacity: 0.05, + shadowRadius: 6, + shadowOffset: { + width: 0, + height: 2, + }, + alignItems: "center", + }, + + iconContainer: { + marginBottom: verticalScale(12), + }, + + value: { + fontSize: moderateScale(22), + fontWeight: "700", + color: "#1F2937", + }, + + title: { + marginTop: verticalScale(6), + textAlign: "center", + fontSize: moderateScale(13), + color: "#6B7280", + }, + + pressed: { + opacity: 0.85, + }, +}); \ No newline at end of file diff --git a/src/features/profile/components/ProfileStatsGrid.tsx b/src/features/profile/components/ProfileStatsGrid.tsx new file mode 100644 index 0000000..5b3e910 --- /dev/null +++ b/src/features/profile/components/ProfileStatsGrid.tsx @@ -0,0 +1,47 @@ +import React from "react"; +import { + StyleSheet, + View, +} from "react-native"; +import { verticalScale } from "react-native-size-matters"; + +import ProfileStatCard from "./ProfileStatCard"; + +export default function ProfileStatsGrid() { + return ( + + + + + + + + + + ); +} + +const styles = StyleSheet.create({ + container: { + marginTop: verticalScale(8), + flexDirection: "row", + flexWrap: "wrap", + justifyContent: "space-between", + }, +}); \ No newline at end of file diff --git a/src/features/search/api/search.api.ts b/src/features/search/api/search.api.ts new file mode 100644 index 0000000..7a1f7ce --- /dev/null +++ b/src/features/search/api/search.api.ts @@ -0,0 +1,53 @@ +import apiClient from "@/api/client"; +import type { + FacetedSearchRequest, + FacetedSearchResponse, + FacetValuesRequest, + FacetValuesResponse, + SearchCapabilitiesResponse, + SearchScope, +} from "../types/search.types"; + +function capabilityQuery(scope?: SearchScope): string { + const params: string[] = []; + if (scope?.module_codes?.length) { + params.push(`module_codes=${encodeURIComponent(scope.module_codes.join(","))}`); + } + if (scope?.content_kinds?.length) { + params.push(`content_kinds=${encodeURIComponent(scope.content_kinds.join(","))}`); + } + return params.length ? `?${params.join("&")}` : ""; +} + +export async function getSearchCapabilities( + scope?: SearchScope, +): Promise { + const response = await apiClient.get( + `/search/capabilities${capabilityQuery(scope)}`, + ); + return response.data; +} + +function apiFilters(filters: FacetValuesRequest["active_filters"]) { + return filters.map(({ display_values: _displayValues, ...filter }) => filter); +} + +export async function getFacetValues( + payload: FacetValuesRequest, +): Promise { + const response = await apiClient.post( + "/search/facet-values", + { ...payload, active_filters: apiFilters(payload.active_filters) }, + ); + return response.data; +} + +export async function searchContents( + payload: FacetedSearchRequest, +): Promise { + const response = await apiClient.post( + "/search/contents", + { ...payload, filters: apiFilters(payload.filters) }, + ); + return response.data; +} diff --git a/src/features/search/components/FacetFilterChips.tsx b/src/features/search/components/FacetFilterChips.tsx new file mode 100644 index 0000000..21df4c6 --- /dev/null +++ b/src/features/search/components/FacetFilterChips.tsx @@ -0,0 +1,16 @@ +import React, { useMemo } from "react"; +import { Pressable, StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { Colors } from "@/theme"; +import type { FacetFilter, FilterLogic, SearchFacetDefinition } from "../types/search.types"; + +interface Props { filters: FacetFilter[]; facets: SearchFacetDefinition[]; logic: FilterLogic; onLogicChange: (logic: FilterLogic) => void; onRemove: (index:number) => void; onClear: () => void; } +export function FacetFilterChips({ filters, facets, logic, onLogicChange, onRemove, onClear }: Props) { + const labels=useMemo(()=>new Map(facets.map((f)=>[f.code,f.label])),[facets]); + if(!filters.length) return null; + return + {filters.length>1?Match filters{(["and","or"] as const).map((item)=>onLogicChange(item)} style={[styles.logic,logic===item&&styles.logicActive]}>{item.toUpperCase()})}Clear all:null} + {filters.map((filter,index)=>{labels.get(filter.facet_code)??filter.facet_code}{(filter.display_values ?? filter.values.map((value) => value.replace(/-/g, " "))).join(", ")}onRemove(index)} hitSlop={8}>)} + ; +} +const styles=StyleSheet.create({wrap:{paddingHorizontal:20,paddingBottom:12,gap:8},logicRow:{flexDirection:"row",alignItems:"center",gap:7},match:{fontSize:11.5,color:Colors.textSecondary},logic:{paddingHorizontal:9,paddingVertical:5,borderRadius:999,borderWidth:1,borderColor:Colors.border},logicActive:{backgroundColor:"#E8F5E9",borderColor:"#A5D6A7"},logicText:{fontSize:10.5,fontWeight:"800",color:Colors.textSecondary},logicTextActive:{color:Colors.primaryDark},clear:{marginLeft:"auto"},clearText:{fontSize:11,fontWeight:"700",color:Colors.primaryDark},chips:{flexDirection:"row",flexWrap:"wrap",gap:8},chip:{maxWidth:"100%",flexDirection:"row",alignItems:"center",gap:7,paddingVertical:6,paddingLeft:10,paddingRight:7,borderWidth:1,borderColor:"#C8E6C9",backgroundColor:"#E8F5E9",borderRadius:13},chipCopy:{maxWidth:240},chipLabel:{fontSize:10,fontWeight:"800",color:Colors.primaryDark},chipValue:{fontSize:11.5,color:Colors.textPrimary}}); diff --git a/src/features/search/components/FacetPickerModal.tsx b/src/features/search/components/FacetPickerModal.tsx new file mode 100644 index 0000000..6d7879f --- /dev/null +++ b/src/features/search/components/FacetPickerModal.tsx @@ -0,0 +1,36 @@ +import React, { useMemo } from "react"; +import { Modal, Pressable, ScrollView, StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { Colors } from "@/theme"; +import type { SearchFacetDefinition } from "../types/search.types"; + +interface Props { visible: boolean; facets: SearchFacetDefinition[]; onSelect: (facet: SearchFacetDefinition) => void; onClose: () => void; } + +export function FacetPickerModal({ visible, facets, onSelect, onClose }: Props) { + const groups = useMemo(() => { + const map = new Map(); + facets.forEach((facet) => map.set(facet.category, [...(map.get(facet.category) ?? []), facet])); + return [...map.entries()]; + }, [facets]); + return ( + + + + Add filterChoose a search parameter + + {groups.map(([category, items]) => + {category} + {items.map((facet) => onSelect(facet)}> + {facet.label}{facet.description ? {facet.description} : null} + )} + )} + + + + + ); +} +const styles = StyleSheet.create({ + overlay:{flex:1,justifyContent:"flex-end"},scrim:{...StyleSheet.absoluteFillObject,backgroundColor:"rgba(0,0,0,0.35)"},sheet:{maxHeight:"84%",backgroundColor:Colors.white,borderTopLeftRadius:22,borderTopRightRadius:22}, + header:{flexDirection:"row",justifyContent:"space-between",padding:20,borderBottomWidth:1,borderBottomColor:Colors.border},title:{fontSize:18,fontWeight:"800",color:Colors.textPrimary},subtitle:{marginTop:3,fontSize:12,color:Colors.textSecondary},content:{padding:20},group:{marginBottom:18},category:{fontSize:12,fontWeight:"800",textTransform:"uppercase",color:Colors.textSecondary,marginBottom:6},row:{flexDirection:"row",alignItems:"center",gap:10,paddingVertical:12,borderBottomWidth:StyleSheet.hairlineWidth,borderBottomColor:Colors.border},label:{fontSize:14,fontWeight:"700",color:Colors.textPrimary},description:{marginTop:3,fontSize:11.5,lineHeight:16,color:Colors.textSecondary} +}); diff --git a/src/features/search/components/FacetValueTypeaheadModal.tsx b/src/features/search/components/FacetValueTypeaheadModal.tsx new file mode 100644 index 0000000..bc7cd87 --- /dev/null +++ b/src/features/search/components/FacetValueTypeaheadModal.tsx @@ -0,0 +1,26 @@ +import React, { useMemo, useState } from "react"; +import { ActivityIndicator, Modal, Pressable, ScrollView, StyleSheet, Text, TextInput, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { Colors } from "@/theme"; +import { useFacetValues } from "../hooks/use-facet-values"; +import type { FacetFilter, FilterLogic, SearchFacetDefinition, SearchScope } from "../types/search.types"; + +interface Props { visible: boolean; facet: SearchFacetDefinition | null; scope: SearchScope; activeFilters: FacetFilter[]; filterLogic: FilterLogic; onApply: (filter: FacetFilter) => void; onClose: () => void; } + +export function FacetValueTypeaheadModal({ visible, facet, scope, activeFilters, filterLogic, onApply, onClose }: Props) { + const [query, setQuery] = useState(""); + const [selected, setSelected] = useState>(new Map()); + const request = useMemo(() => facet ? { facet_code: facet.code, scope, query: query.trim() || undefined, active_filters: activeFilters, filter_logic: filterLogic, limit: 30 } : null, [facet, scope, query, activeFilters, filterLogic]); + const values = useFacetValues(request, visible && !!facet); + if (!facet) return null; + const toggle = (key:string,label:string) => setSelected((current) => { const next=new Map(current); if(next.has(key)) next.delete(key); else { if(!facet.allow_multiple_values) next.clear(); next.set(key,label); } return next; }); + const close = () => { setQuery(""); setSelected(new Map()); onClose(); }; + const apply = () => { if(!selected.size) return; onApply({ facet_code: facet.code, values:[...selected.keys()], value_mode:"any", display_values:[...selected.values()] }); close(); }; + return + {facet.label}Select {facet.allow_multiple_values ? "one or more values" : "a value"} + + {values.isLoading ? : values.data?.items.map((item) => { const active=selected.has(item.value_key); return toggle(item.value_key,item.label)}>{item.label}{item.result_count} matching item{item.result_count===1?"":"s"}; })} + CancelAdd {selected.size ? `(${selected.size})` : ""} + ; +} +const styles=StyleSheet.create({overlay:{flex:1,justifyContent:"flex-end"},scrim:{...StyleSheet.absoluteFillObject,backgroundColor:"rgba(0,0,0,0.35)"},sheet:{height:"78%",backgroundColor:Colors.white,borderTopLeftRadius:22,borderTopRightRadius:22},header:{flexDirection:"row",justifyContent:"space-between",padding:20},title:{fontSize:18,fontWeight:"800",color:Colors.textPrimary},subtitle:{marginTop:3,fontSize:12,color:Colors.textSecondary},search:{marginHorizontal:20,flexDirection:"row",alignItems:"center",gap:8,borderWidth:1,borderColor:Colors.border,borderRadius:12,paddingHorizontal:12},input:{flex:1,minHeight:44,color:Colors.textPrimary},content:{padding:20,paddingTop:12},valueRow:{flexDirection:"row",alignItems:"center",paddingVertical:11,borderBottomWidth:StyleSheet.hairlineWidth,borderBottomColor:Colors.border},valueRowActive:{backgroundColor:"#F4FAF4"},valueLabel:{fontSize:14,fontWeight:"700",color:Colors.textPrimary},count:{marginTop:2,fontSize:11,color:Colors.textSecondary},footer:{flexDirection:"row",gap:10,padding:20,borderTopWidth:1,borderTopColor:Colors.border},cancel:{paddingHorizontal:20,paddingVertical:12,borderWidth:1,borderColor:Colors.border,borderRadius:12},cancelText:{fontWeight:"700",color:Colors.textPrimary},apply:{flex:1,alignItems:"center",paddingVertical:12,borderRadius:12,backgroundColor:Colors.primary},disabled:{opacity:.45},applyText:{fontWeight:"800",color:Colors.white}}); diff --git a/src/features/search/components/SearchResultList.tsx b/src/features/search/components/SearchResultList.tsx new file mode 100644 index 0000000..bf4a046 --- /dev/null +++ b/src/features/search/components/SearchResultList.tsx @@ -0,0 +1,12 @@ +import React from "react"; +import { ActivityIndicator, FlatList, Pressable, StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { Colors } from "@/theme"; +import type { FacetedSearchItem } from "../types/search.types"; + +interface Props { items: FacetedSearchItem[]; total: number; loading: boolean; fetchingMore: boolean; onLoadMore:()=>void; onPress:(item:FacetedSearchItem)=>void; } +export function SearchResultList({items,total,loading,fetchingMore,onLoadMore,onPress}:Props){ + if(loading&&!items.length) return Searching content…; + return item.content_id} contentContainerStyle={items.length?styles.list:styles.empty} ListHeaderComponent={items.length?{total} result{total===1?"":"s"}:null} renderItem={({item})=>onPress(item)} style={({pressed})=>[styles.card,pressed&&styles.pressed]}>{item.title}{item.module_name} · {item.template_name}{item.summary?{item.summary}:null}} ListEmptyComponent={No matching contentTry a broader scope or remove one of the filters.} ListFooterComponent={fetchingMore?:null} onEndReached={onLoadMore} onEndReachedThreshold={.35}/>; +} +const styles=StyleSheet.create({list:{paddingHorizontal:20,paddingBottom:28},empty:{flexGrow:1},count:{paddingVertical:9,fontSize:12,fontWeight:"700",color:Colors.textSecondary},card:{flexDirection:"row",alignItems:"center",gap:12,padding:15,marginBottom:10,borderRadius:16,backgroundColor:Colors.white,borderWidth:1,borderColor:"#EEF0F2",shadowColor:"#000",shadowOpacity:.05,shadowRadius:6,shadowOffset:{width:0,height:2},elevation:1},pressed:{opacity:.75},cardText:{flex:1},title:{fontSize:16,fontWeight:"800",color:Colors.textPrimary},meta:{marginTop:3,fontSize:11.5,fontWeight:"600",color:Colors.primaryDark},summary:{marginTop:6,fontSize:12.5,lineHeight:18,color:Colors.textSecondary},center:{flex:1,alignItems:"center",justifyContent:"center",padding:32},emptyTitle:{marginTop:8,fontSize:16,fontWeight:"800",color:Colors.textPrimary},muted:{marginTop:5,textAlign:"center",fontSize:12.5,color:Colors.textSecondary}}); diff --git a/src/features/search/components/SearchScopeModal.tsx b/src/features/search/components/SearchScopeModal.tsx new file mode 100644 index 0000000..625d510 --- /dev/null +++ b/src/features/search/components/SearchScopeModal.tsx @@ -0,0 +1,104 @@ +import React from "react"; +import { Modal, Pressable, ScrollView, StyleSheet, Text, View } from "react-native"; +import { Ionicons } from "@expo/vector-icons"; +import { Colors } from "@/theme"; +import type { SearchCapabilitiesResponse, SearchScope } from "../types/search.types"; + +interface Props { + visible: boolean; + capabilities: SearchCapabilitiesResponse; + scope: SearchScope; + onChange: (scope: SearchScope) => void; + onClose: () => void; + showModules?: boolean; + fixedModuleName?: string; +} + +function toggle(values: string[] | null | undefined, value: string): string[] | null { + const set = new Set(values ?? []); + if (set.has(value)) set.delete(value); else set.add(value); + return set.size ? [...set] : null; +} + +export function SearchScopeModal({ + visible, + capabilities, + scope, + onChange, + onClose, + showModules = true, + fixedModuleName, +}: Props) { + return ( + + + + + + Search scope + + + + {showModules ? ( + <> + Modules + onChange({ ...scope, module_codes: null })}> + All modules + {!scope.module_codes?.length ? : null} + + {capabilities.modules.map((module) => { + const selected = scope.module_codes?.includes(module.code) ?? false; + return ( + onChange({ ...scope, module_codes: toggle(scope.module_codes, module.code) })}> + {module.name} + + + ); + })} + + ) : fixedModuleName ? ( + <> + Module + + + {fixedModuleName} + + + ) : null} + + Content type + onChange({ ...scope, content_kinds: null })}> + Any content type + {!scope.content_kinds?.length ? : null} + + {capabilities.content_kinds.map((kind) => { + const selected = scope.content_kinds?.includes(kind) ?? false; + return ( + onChange({ ...scope, content_kinds: toggle(scope.content_kinds, kind) })}> + {kind.charAt(0).toUpperCase() + kind.slice(1)} + + + ); + })} + + Done + + + + ); +} + +const styles = StyleSheet.create({ + overlay: { flex: 1, justifyContent: "flex-end" }, + scrim: { ...StyleSheet.absoluteFillObject, backgroundColor: "rgba(0,0,0,0.35)" }, + sheet: { maxHeight: "88%", backgroundColor: Colors.white, borderTopLeftRadius: 22, borderTopRightRadius: 22 }, + header: { flexDirection: "row", justifyContent: "space-between", alignItems: "center", padding: 20, borderBottomWidth: 1, borderBottomColor: Colors.border }, + title: { fontSize: 18, fontWeight: "800", color: Colors.textPrimary }, + content: { padding: 20, paddingBottom: 12 }, + section: { marginTop: 10, marginBottom: 8, fontSize: 12, fontWeight: "800", color: Colors.textSecondary, textTransform: "uppercase" }, + row: { minHeight: 48, flexDirection: "row", alignItems: "center", justifyContent: "space-between", borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: Colors.border }, + rowText: { flex: 1, fontSize: 14, color: Colors.textPrimary }, + lockedScopeRow: { minHeight: 48, flexDirection: "row", alignItems: "center", gap: 9, borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: Colors.border }, + done: { margin: 20, marginTop: 8, paddingVertical: 13, borderRadius: 12, backgroundColor: Colors.primary, alignItems: "center" }, + doneText: { color: Colors.white, fontWeight: "800" }, +}); diff --git a/src/features/search/hooks/use-facet-values.ts b/src/features/search/hooks/use-facet-values.ts new file mode 100644 index 0000000..14264d8 --- /dev/null +++ b/src/features/search/hooks/use-facet-values.ts @@ -0,0 +1,25 @@ +import { useQuery } from "@tanstack/react-query"; +import { getFacetValues } from "../api/search.api"; +import type { FacetValuesRequest } from "../types/search.types"; + +export function useFacetValues( + request: FacetValuesRequest | null, + enabled = true, +) { + return useQuery({ + queryKey: [ + "search", + "facet-values", + request?.facet_code ?? null, + request?.scope.module_codes ?? null, + request?.scope.content_kinds ?? null, + request?.query ?? "", + request?.filter_logic ?? "and", + request?.active_filters ?? [], + request?.limit ?? 25, + ], + queryFn: () => getFacetValues(request!), + enabled: enabled && request !== null, + staleTime: 30 * 1000, + }); +} diff --git a/src/features/search/hooks/use-faceted-search.ts b/src/features/search/hooks/use-faceted-search.ts new file mode 100644 index 0000000..673831e --- /dev/null +++ b/src/features/search/hooks/use-faceted-search.ts @@ -0,0 +1,27 @@ +import { useInfiniteQuery } from "@tanstack/react-query"; +import { searchContents } from "../api/search.api"; +import type { FacetedSearchRequest } from "../types/search.types"; + +export function useFacetedSearch( + request: Omit, + enabled = true, +) { + return useInfiniteQuery({ + queryKey: [ + "search", + "contents", + request.scope.module_codes ?? null, + request.scope.content_kinds ?? null, + request.query ?? "", + request.filters, + request.filter_logic, + request.sort, + request.page_size, + ], + queryFn: ({ pageParam }) => searchContents({ ...request, page: pageParam }), + initialPageParam: 1, + enabled, + getNextPageParam: (last) => + last.page * last.page_size < last.total ? last.page + 1 : undefined, + }); +} diff --git a/src/features/search/hooks/use-search-capabilities.ts b/src/features/search/hooks/use-search-capabilities.ts new file mode 100644 index 0000000..0945a77 --- /dev/null +++ b/src/features/search/hooks/use-search-capabilities.ts @@ -0,0 +1,16 @@ +import { useQuery } from "@tanstack/react-query"; +import { getSearchCapabilities } from "../api/search.api"; +import type { SearchScope } from "../types/search.types"; + +export function useSearchCapabilities(scope?: SearchScope) { + return useQuery({ + queryKey: [ + "search", + "capabilities", + scope?.module_codes ?? null, + scope?.content_kinds ?? null, + ], + queryFn: () => getSearchCapabilities(scope), + staleTime: 30 * 60 * 1000, + }); +} diff --git a/src/features/search/index.ts b/src/features/search/index.ts new file mode 100644 index 0000000..d90de1b --- /dev/null +++ b/src/features/search/index.ts @@ -0,0 +1,2 @@ +export { default as FacetedSearchScreen } from "./screens/FacetedSearchScreen"; +export * from "./types/search.types"; diff --git a/src/features/search/screens/FacetedSearchScreen.tsx b/src/features/search/screens/FacetedSearchScreen.tsx new file mode 100644 index 0000000..4e4f7a2 --- /dev/null +++ b/src/features/search/screens/FacetedSearchScreen.tsx @@ -0,0 +1,434 @@ +import React, { useEffect, useMemo, useState } from "react"; +import { Pressable, StyleSheet, Text, TextInput, View } from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { Ionicons } from "@expo/vector-icons"; +import { router } from "expo-router"; + +import { Colors } from "@/theme"; +import { useDebouncedValue } from "@/features/content/hooks/use-debounced-value"; +import { FacetFilterChips } from "../components/FacetFilterChips"; +import { FacetPickerModal } from "../components/FacetPickerModal"; +import { FacetValueTypeaheadModal } from "../components/FacetValueTypeaheadModal"; +import { SearchResultList } from "../components/SearchResultList"; +import { SearchScopeModal } from "../components/SearchScopeModal"; +import { useFacetedSearch } from "../hooks/use-faceted-search"; +import { useSearchCapabilities } from "../hooks/use-search-capabilities"; +import type { + FacetFilter, + FilterLogic, + SearchFacetDefinition, + SearchScope, +} from "../types/search.types"; + +export interface FacetedSearchScreenProps { + mode?: "global" | "module"; + fixedModuleCode?: string; + fixedModuleName?: string; +} + +function kindsLabel(scope: SearchScope): string { + return scope.content_kinds?.length + ? scope.content_kinds + .map((value) => value.charAt(0).toUpperCase() + value.slice(1)) + .join(", ") + : "Any type"; +} + +function globalScopeLabel(scope: SearchScope): string { + const modules = scope.module_codes?.length + ? `${scope.module_codes.length} module${scope.module_codes.length === 1 ? "" : "s"}` + : "All modules"; + return `${modules} · ${kindsLabel(scope)}`; +} + +export default function FacetedSearchScreen({ + mode = "global", + fixedModuleCode, + fixedModuleName, +}: FacetedSearchScreenProps) { + const isModuleMode = mode === "module"; + const normalizedModuleCode = fixedModuleCode?.trim().toUpperCase() || ""; + const fixedModuleCodes = + isModuleMode && normalizedModuleCode ? [normalizedModuleCode] : null; + + // Capabilities are scoped by the fixed module only. Content-kind selection + // remains a user-controlled filter, so selecting one kind never removes the + // other kinds from the scope chooser. + const capabilityScope = useMemo( + () => + fixedModuleCodes + ? { + module_codes: fixedModuleCodes, + content_kinds: null, + } + : undefined, + [normalizedModuleCode, isModuleMode], + ); + const capabilities = useSearchCapabilities(capabilityScope); + + const [query, setQuery] = useState(""); + const debouncedQuery = useDebouncedValue(query.trim(), 350); + const [scope, setScope] = useState({ + module_codes: fixedModuleCodes, + content_kinds: null, + }); + const [filters, setFilters] = useState([]); + const [logic, setLogic] = useState("and"); + const [scopeVisible, setScopeVisible] = useState(false); + const [facetPickerVisible, setFacetPickerVisible] = useState(false); + const [selectedFacet, setSelectedFacet] = + useState(null); + + useEffect(() => { + if (!isModuleMode || !normalizedModuleCode) return; + setScope((current) => ({ + ...current, + module_codes: [normalizedModuleCode], + })); + }, [isModuleMode, normalizedModuleCode]); + + const effectiveScope = useMemo( + () => + isModuleMode + ? { + ...scope, + module_codes: normalizedModuleCode + ? [normalizedModuleCode] + : null, + } + : scope, + [isModuleMode, normalizedModuleCode, scope], + ); + + const resolvedModuleName = + fixedModuleName?.trim() || + capabilities.data?.modules.find( + (module) => module.code === normalizedModuleCode, + )?.name || + "this module"; + + const search = useFacetedSearch( + { + scope: effectiveScope, + query: debouncedQuery || undefined, + filters, + filter_logic: logic, + sort: { + field: debouncedQuery ? "relevance" : "title", + direction: debouncedQuery ? "desc" : "asc", + }, + page_size: 25, + }, + capabilities.isSuccess && (!isModuleMode || Boolean(normalizedModuleCode)), + ); + + const merged = useMemo(() => { + const pages = search.data?.pages ?? []; + return { + total: pages[0]?.total ?? 0, + items: pages.flatMap((page) => page.items), + }; + }, [search.data]); + + const facets = capabilities.data?.facets ?? []; + + const handleScopeChange = (next: SearchScope) => { + setScope( + isModuleMode + ? { + ...next, + module_codes: normalizedModuleCode + ? [normalizedModuleCode] + : null, + } + : next, + ); + }; + + return ( + + + router.back()} + style={styles.headerButton} + > + + + + Search + {isModuleMode ? ( + + {resolvedModuleName} + + ) : null} + + + + + + {isModuleMode ? ( + + Search within {resolvedModuleName} + + ) : null} + + + + + {query ? ( + setQuery("")}> + + + ) : null} + + + + setScopeVisible(true)} + > + + + + {isModuleMode ? "Content type" : "Scope"} + + + {isModuleMode + ? kindsLabel(effectiveScope) + : globalScopeLabel(effectiveScope)} + + + + + + setFacetPickerVisible(true)} + > + + Filter + + + + + + setFilters((current) => + current.filter((_, itemIndex) => itemIndex !== index), + ) + } + onClear={() => setFilters([])} + /> + + {capabilities.isError ? ( + + + Unable to load search configuration + + void capabilities.refetch()}> + Retry + + + ) : ( + { + if (search.hasNextPage && !search.isFetchingNextPage) { + void search.fetchNextPage(); + } + }} + onPress={(item) => + router.push( + `/modules/${encodeURIComponent( + item.module_code, + )}/${encodeURIComponent( + item.template_code, + )}/${encodeURIComponent(item.content_id)}` as never, + ) + } + /> + )} + + {capabilities.data ? ( + setScopeVisible(false)} + showModules={!isModuleMode} + fixedModuleName={isModuleMode ? resolvedModuleName : undefined} + /> + ) : null} + + setFacetPickerVisible(false)} + onSelect={(facet) => { + setFacetPickerVisible(false); + setSelectedFacet(facet); + }} + /> + + setSelectedFacet(null)} + onApply={(filter) => + setFilters((current) => [...current, filter]) + } + /> + + ); +} + +const styles = StyleSheet.create({ + safe: { flex: 1, backgroundColor: Colors.surface }, + header: { + height: 60, + flexDirection: "row", + alignItems: "center", + justifyContent: "space-between", + paddingHorizontal: 16, + borderBottomWidth: 1, + borderBottomColor: "#ECECEC", + backgroundColor: Colors.white, + }, + headerButton: { width: 32, padding: 4 }, + headerCenter: { flex: 1, alignItems: "center" }, + headerTitle: { + fontSize: 18, + fontWeight: "800", + color: Colors.textPrimary, + }, + headerContext: { + marginTop: 1, + maxWidth: "90%", + fontSize: 10, + fontWeight: "700", + color: Colors.textSecondary, + }, + controls: { + padding: 20, + paddingBottom: 12, + gap: 12, + backgroundColor: Colors.white, + }, + scopeHint: { + fontSize: 12, + fontWeight: "700", + color: Colors.textSecondary, + }, + searchBox: { + flexDirection: "row", + alignItems: "center", + gap: 8, + borderWidth: 1, + borderColor: Colors.border, + borderRadius: 14, + paddingHorizontal: 13, + backgroundColor: "#FAFAFA", + }, + input: { + flex: 1, + minHeight: 46, + fontSize: 14, + color: Colors.textPrimary, + }, + actionRow: { flexDirection: "row", gap: 10 }, + action: { + flex: 1, + minHeight: 48, + flexDirection: "row", + alignItems: "center", + gap: 8, + paddingHorizontal: 12, + borderWidth: 1, + borderColor: Colors.border, + borderRadius: 13, + }, + actionTitle: { + fontSize: 10, + fontWeight: "800", + color: Colors.textSecondary, + textTransform: "uppercase", + }, + actionValue: { + marginTop: 1, + fontSize: 12, + fontWeight: "700", + color: Colors.textPrimary, + }, + addFilter: { + minWidth: 92, + flexDirection: "row", + alignItems: "center", + justifyContent: "center", + gap: 5, + borderRadius: 13, + backgroundColor: Colors.primary, + }, + addFilterText: { + fontSize: 13, + fontWeight: "800", + color: Colors.white, + }, + error: { + flex: 1, + alignItems: "center", + justifyContent: "center", + padding: 30, + }, + errorTitle: { + fontSize: 15, + fontWeight: "800", + color: Colors.textPrimary, + }, + retry: { + marginTop: 10, + fontWeight: "700", + color: Colors.primary, + }, +}); diff --git a/src/features/search/types/search.types.ts b/src/features/search/types/search.types.ts new file mode 100644 index 0000000..bac88f4 --- /dev/null +++ b/src/features/search/types/search.types.ts @@ -0,0 +1,105 @@ +export type FilterLogic = "and" | "or"; +export type FacetValueMode = "any" | "all"; +export type FacetControlType = + | "typeahead" + | "typeahead_multi" + | "single_select" + | "multi_select"; + +export interface SearchScope { + /** Omitted/null = all modules allowed by the backend search surface. */ + module_codes?: string[] | null; + /** Omitted/null = all content kinds. */ + content_kinds?: string[] | null; +} + +export interface SearchFacetDefinition { + code: string; + label: string; + category: string; + description?: string | null; + control_type: FacetControlType; + allow_multiple_values: boolean; + value_source: "projected" | "controlled" | string; + sort_order: number; +} + +export interface SearchModuleOption { + id: string; + code: string; + name: string; + slug: string; +} + +export interface SearchCapabilitiesResponse { + modules: SearchModuleOption[]; + content_kinds: string[]; + facets: SearchFacetDefinition[]; +} + +export interface FacetFilter { + facet_code: string; + /** Canonical value keys submitted to the backend. */ + values: string[]; + value_mode: FacetValueMode; + /** UI-only labels; stripped before the API request. */ + display_values?: string[]; +} + +export interface FacetValuesRequest { + facet_code: string; + scope: SearchScope; + query?: string; + active_filters: FacetFilter[]; + filter_logic: FilterLogic; + limit: number; +} + +export interface FacetValueOption { + value_key: string; + label: string; + result_count: number; +} + +export interface FacetValuesResponse { + facet_code: string; + items: FacetValueOption[]; +} + +export interface FacetedSearchRequest { + scope: SearchScope; + query?: string; + filters: FacetFilter[]; + filter_logic: FilterLogic; + sort: { + field: "relevance" | "title" | "recent"; + direction: "asc" | "desc"; + }; + page: number; + page_size: number; +} + +export interface FacetedSearchItem { + content_id: string; + module_code: string; + module_name: string; + template_code: string; + template_name: string; + content_kind?: string | null; + title: string; + summary?: string | null; + score: number; +} + +export interface FacetBucket { + facet_code: string; + values: FacetValueOption[]; +} + +export interface FacetedSearchResponse { + page: number; + page_size: number; + total: number; + items: FacetedSearchItem[]; + buckets: FacetBucket[]; +} diff --git a/src/lib/query/query-client.ts b/src/lib/query/query-client.ts new file mode 100644 index 0000000..2fdebac --- /dev/null +++ b/src/lib/query/query-client.ts @@ -0,0 +1,35 @@ +import { MutationCache, QueryCache, QueryClient } from "@tanstack/react-query"; +import { ApiError } from "@/api/types"; + +function shouldRetry(failureCount: number, error: unknown): boolean { + if (failureCount >= 2) return false; + + if (error instanceof ApiError) { + if ([400, 401, 403, 404, 409, 422].includes(error.status ?? 0)) { + return false; + } + } + + return true; +} + +export const queryClient = new QueryClient({ + queryCache: new QueryCache({ + onError: (error) => console.error("[Query error]", error), + }), + mutationCache: new MutationCache({ + onError: (error) => console.error("[Mutation error]", error), + }), + defaultOptions: { + queries: { + staleTime: 5 * 60 * 1000, + gcTime: 30 * 60 * 1000, + retry: shouldRetry, + refetchOnWindowFocus: false, + refetchOnReconnect: true, + }, + mutations: { + retry: false, + }, + }, +}); diff --git a/src/providers.tsx b/src/providers.tsx new file mode 100644 index 0000000..18dd596 --- /dev/null +++ b/src/providers.tsx @@ -0,0 +1,11 @@ +import React, { PropsWithChildren } from "react"; +import { QueryClientProvider } from "@tanstack/react-query"; +import { queryClient } from "@/lib/query/query-client"; + +export function AppProvider({ children }: PropsWithChildren) { + return ( + + {children} + + ); +} diff --git a/src/screens/auth/LoginScreen.tsx b/src/screens/auth/LoginScreen.tsx new file mode 100644 index 0000000..f734688 --- /dev/null +++ b/src/screens/auth/LoginScreen.tsx @@ -0,0 +1,88 @@ +import React, { useState } from "react"; +import { + KeyboardAvoidingView, + Platform, + ScrollView, + StyleSheet, + View, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { + moderateScale, + verticalScale, +} from "react-native-size-matters"; + +import { router } from "expo-router"; +import { Colors } from "@/theme"; + +import LoginHeader from "@/features/auth/components/LoginHeader"; +import LoginTabs, { + LoginMethod, +} from "@/features/auth/components/LoginTabs"; +import LoginForm from "@/features/auth/components/LoginForm"; +import SocialLogin from "@/features/auth/components/SocialLogin"; +import LoginFooter from "@/features/auth/components/LoginFooter"; + +export default function LoginScreen() { + const [activeTab, setActiveTab] = + useState("email"); + + return ( + + + + + + + + + + + + + { + router.push("/register"); + }} + /> + + + + + ); +} + +const styles = StyleSheet.create({ + safeArea: { + flex: 1, + backgroundColor: Colors.background, + }, + + keyboardContainer: { + flex: 1, + }, + + contentContainer: { + flexGrow: 1, + }, + + container: { + flex: 1, + paddingHorizontal: moderateScale(24), + paddingTop: verticalScale(20), + paddingBottom: verticalScale(32), + backgroundColor: Colors.background, + }, +}); \ No newline at end of file diff --git a/src/screens/auth/SignUpScreen.tsx b/src/screens/auth/SignUpScreen.tsx new file mode 100644 index 0000000..9afc156 --- /dev/null +++ b/src/screens/auth/SignUpScreen.tsx @@ -0,0 +1,72 @@ +import React from "react"; +import { + KeyboardAvoidingView, + Platform, + ScrollView, + StyleSheet, + View, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { + moderateScale, + verticalScale, +} from "react-native-size-matters"; +import { router } from "expo-router"; + +import { Colors } from "@/theme"; + +import SignUpHeader from "@/features/auth/components/SignUpHeader"; +import SignUpForm from "@/features/auth/components/SignUpForm"; +import SignUpFooter from "@/features/auth/components/SignUpFooter"; + +export default function SignUpScreen() { + return ( + + + + + + + + + { + router.push("/login"); + }} + /> + + + + + ); +} + +const styles = StyleSheet.create({ + safeArea: { + flex: 1, + backgroundColor: Colors.background, + }, + + keyboardContainer: { + flex: 1, + }, + + contentContainer: { + flexGrow: 1, + }, + + container: { + flex: 1, + paddingHorizontal: moderateScale(24), + paddingTop: verticalScale(20), + paddingBottom: verticalScale(32), + backgroundColor: Colors.background, + }, +}); diff --git a/src/screens/home/HomeScreen.tsx b/src/screens/home/HomeScreen.tsx new file mode 100644 index 0000000..071229a --- /dev/null +++ b/src/screens/home/HomeScreen.tsx @@ -0,0 +1,576 @@ +import React, { useCallback, useEffect, useMemo } from "react"; +import { + ScrollView, + StyleSheet, + Text, + View, + TouchableOpacity, + Alert, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { router, useFocusEffect } from "expo-router"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; + +import { Colors } from "@/theme"; +import { useAuthStore } from "@/store/auth.store"; +import { useModulesQuery } from "@/features/content/hooks/use-content-queries"; +import { buildContentReferenceRoute } from "@/features/content/utils/content-reference"; +import { isModuleUnlockedByAccess } from "@/features/access/module-access"; +import { + normalizeModuleListResponse, + toModuleIndexItem, +} from "@/features/modules/module-index"; +import type { LastViewedModule } from "@/store/auth.store"; + +export default function HomeScreen() { + const { + user, + accessToken, + access, + lastViewedModule, + setModules, + refreshSession, + } = useAuthStore(); + + const modulesQuery = useModulesQuery(); + + const modules = useMemo( + () => normalizeModuleListResponse(modulesQuery.data), + [modulesQuery.data], + ); + + const moduleItems = useMemo( + () => + modules + .filter((module) => module.is_active) + .map(toModuleIndexItem), + [modules], + ); + + useEffect(() => { + setModules( + modules.map((module) => { + const item = toModuleIndexItem(module); + return { + id: module.id, + code: module.code, + slug: module.slug, + isDefaultFree: item.isDefaultFree, + }; + }), + ); + }, [modules, setModules]); + + useFocusEffect( + useCallback(() => { + void refreshSession(); + }, [refreshSession]), + ); + + const unlockedModules = useMemo(() => { + if (!accessToken) return []; + + return moduleItems.filter((item) => + isModuleUnlockedByAccess(item.module, access), + ); + }, [access, accessToken, moduleItems]); + + const displayContinueModule = useMemo(() => { + if ( + !lastViewedModule?.moduleCode || + !lastViewedModule?.entryTemplateCode + ) { + return null; + } + + const module = modules.find( + (candidate) => candidate.code === lastViewedModule.moduleCode, + ); + if (!module || !isModuleUnlockedByAccess(module, access)) { + return null; + } + + return lastViewedModule; + }, [access, lastViewedModule, modules]); + + const handleModulePress = useCallback((module: LastViewedModule) => { + router.push( + buildContentReferenceRoute({ + type: "template_ref", + label: module.title, + target: { + module_code: module.moduleCode, + template_code: module.entryTemplateCode, + }, + }) as never, + ); + }, []); + + const handleNotificationPress = () => { + Alert.alert( + "Notifications", + "You have no new notifications at this time.", + ); + }; + + return ( + + + + {/* Header */} + + + Hello, + {accessToken ? (user?.name || "User") : "Guest"}! + + {accessToken && ( + + + + )} + + + {/* AcuPedia Intro Card */} + + + + AcuPedia + + The Complete Acupuncture Knowledge Platform + + Access structured acupuncture content, detailed point information, TCM theories, diagnostic concepts, and clinical references in one trusted learning platform. + + + + {!accessToken ? ( + <> + {/* Guest Library card */} + router.push("/register")} + > + + + + + Your Library + + 0 + Modules Unlocked + + + + + + {/* Popular Categories */} + Popular Categories + + router.push("/register")}> + + + + + Points + + + + router.push("/register")}> + + + + + Patterns + + + + router.push("/register")}> + + + + + Nutrition + + + + router.push("/register")}> + + + + + Therapeutics + + + + + ) : ( + <> + {/* Your Library Count Card */} + router.push("/library")} + > + + + + + Your Library + + {unlockedModules.length} + Modules Unlocked + + + + + + {/* Continue Learning Section */} + {displayContinueModule && ( + <> + + Continue Learning + router.push("/modules")}> + View All + + + + handleModulePress(displayContinueModule)} + > + + + + + {displayContinueModule.title} + + {displayContinueModule.category} • Clinical Reference + + Last viewed today + + + + + )} + + )} + + {/* Explore More Modules Card */} + + + Explore More Modules + + + Explore all modules and features. + + router.push("/modules")} + > + Explore All Modules + + + + + + ); +} + +const styles = StyleSheet.create({ + safeArea: { + flex: 1, + backgroundColor: Colors.background, + }, + scrollContent: { + paddingHorizontal: moderateScale(24), + paddingTop: verticalScale(16), + paddingBottom: verticalScale(32), + }, + header: { + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", + marginBottom: verticalScale(20), + }, + welcomeText: { + fontSize: moderateScale(16), + color: Colors.textSecondary, + fontWeight: "500", + }, + userName: { + fontSize: moderateScale(26), + fontWeight: "800", + color: Colors.textPrimary, + }, + bellButton: { + padding: 8, + backgroundColor: "#F3F4F6", + borderRadius: moderateScale(12), + }, + libraryCard: { + flexDirection: "row", + alignItems: "center", + backgroundColor: "#EEF2FF", + borderWidth: 1, + borderColor: "#E0E7FF", + borderRadius: moderateScale(20), + padding: moderateScale(16), + marginBottom: verticalScale(24), + }, + libraryIconWrapper: { + width: moderateScale(48), + height: moderateScale(48), + borderRadius: moderateScale(16), + backgroundColor: "#FFFFFF", + justifyContent: "center", + alignItems: "center", + marginRight: moderateScale(16), + boxShadow: '0px 2px 4px rgba(79, 70, 229, 0.1)', + }, + libraryTextContainer: { + flex: 1, + }, + libraryTitle: { + fontSize: moderateScale(13), + color: "#4F46E5", + fontWeight: "700", + textTransform: "uppercase", + letterSpacing: 0.5, + marginBottom: 2, + }, + libraryCountRow: { + flexDirection: "row", + alignItems: "baseline", + }, + libraryCount: { + fontSize: moderateScale(26), + fontWeight: "900", + color: Colors.textPrimary, + marginRight: 6, + }, + libraryCountLabel: { + fontSize: moderateScale(13), + color: Colors.textSecondary, + fontWeight: "600", + }, + sectionHeader: { + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", + marginBottom: verticalScale(12), + }, + sectionTitle: { + fontSize: moderateScale(17), + fontWeight: "800", + color: Colors.textPrimary, + }, + viewAllText: { + fontSize: moderateScale(14), + fontWeight: "700", + color: "#4F46E5", + }, + continueCard: { + flexDirection: "row", + alignItems: "center", + backgroundColor: "#FFFFFF", + borderWidth: 1, + borderColor: "#E5E7EB", + borderRadius: moderateScale(20), + padding: moderateScale(16), + marginBottom: verticalScale(28), + }, + continueIconWrapper: { + width: moderateScale(56), + height: moderateScale(56), + borderRadius: moderateScale(16), + justifyContent: "center", + alignItems: "center", + marginRight: moderateScale(16), + }, + continueTextContainer: { + flex: 1, + }, + continueModuleTitle: { + fontSize: moderateScale(16), + fontWeight: "700", + color: Colors.textPrimary, + marginBottom: 2, + }, + continueModuleDesc: { + fontSize: moderateScale(12), + color: Colors.textSecondary, + marginBottom: 4, + }, + continueTime: { + fontSize: moderateScale(11), + color: Colors.primary, + fontWeight: "600", + }, + sectionTitleUnlocked: { + fontSize: moderateScale(17), + fontWeight: "800", + color: Colors.textPrimary, + marginBottom: verticalScale(12), + }, + unlockedListCard: { + backgroundColor: "#FFFFFF", + borderWidth: 1, + borderColor: "#E5E7EB", + borderRadius: moderateScale(20), + overflow: "hidden", + marginBottom: verticalScale(28), + }, + unlockedRow: { + flexDirection: "row", + alignItems: "center", + padding: moderateScale(16), + }, + rowIconWrapper: { + width: moderateScale(42), + height: moderateScale(42), + borderRadius: moderateScale(12), + justifyContent: "center", + alignItems: "center", + marginRight: moderateScale(14), + }, + rowTextContainer: { + flex: 1, + }, + rowTitle: { + fontSize: moderateScale(15), + fontWeight: "700", + color: Colors.textPrimary, + marginBottom: 2, + }, + rowDesc: { + fontSize: moderateScale(12), + color: Colors.textSecondary, + }, + rowSeparator: { + height: 1, + backgroundColor: "#F3F4F6", + }, + exploreDashedCard: { + borderWidth: 2, + borderStyle: "dashed", + borderColor: "#818CF8", + borderRadius: moderateScale(20), + backgroundColor: "#EEF2FF30", + padding: moderateScale(18), + alignItems: "center", + }, + exploreHeaderRow: { + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", + width: "100%", + marginBottom: 4, + }, + exploreDashedTitle: { + fontSize: moderateScale(15), + fontWeight: "700", + color: Colors.textPrimary, + }, + exploreDashedSubtitle: { + fontSize: moderateScale(12), + color: Colors.textSecondary, + width: "100%", + marginBottom: verticalScale(14), + }, + exploreButton: { + width: "100%", + backgroundColor: "#FFFFFF", + borderWidth: 1, + borderColor: "#E0E7FF", + borderRadius: moderateScale(14), + paddingVertical: verticalScale(11), + alignItems: "center", + boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.05)', + + }, + exploreButtonText: { + fontSize: moderateScale(14), + fontWeight: "700", + color: "#4F46E5", + }, + infoCard: { + backgroundColor: "#F4F9F4", + borderWidth: 1, + borderColor: "#E2EFE2", + borderRadius: moderateScale(20), + padding: moderateScale(16), + marginBottom: verticalScale(24), + }, + infoTitleRow: { + flexDirection: "row", + alignItems: "center", + marginBottom: verticalScale(6), + }, + infoIcon: { + marginRight: moderateScale(6), + }, + infoAppTitle: { + fontSize: moderateScale(14), + fontWeight: "800", + color: Colors.primary, + textTransform: "uppercase", + letterSpacing: 1.5, + }, + infoHeadline: { + fontSize: moderateScale(18), + fontWeight: "800", + color: Colors.textPrimary, + marginBottom: verticalScale(8), + lineHeight: verticalScale(22), + }, + infoDesc: { + fontSize: moderateScale(13), + color: Colors.textSecondary, + lineHeight: verticalScale(18), + fontWeight: "400", + }, + libraryGuestText: { + fontSize: moderateScale(13), + color: Colors.textSecondary, + lineHeight: 18, + marginTop: 4, + }, + popularTitle: { + fontSize: moderateScale(17), + fontWeight: "800", + color: Colors.textPrimary, + marginBottom: verticalScale(12), + }, + categoriesGrid: { + flexDirection: "row", + flexWrap: "wrap", + justifyContent: "space-between", + marginBottom: verticalScale(16), + }, + categoryGridCard: { + width: "48%", + backgroundColor: "#FFFFFF", + borderRadius: moderateScale(16), + borderWidth: 1, + borderColor: "#E5E7EB", + padding: moderateScale(12), + marginBottom: verticalScale(12), + flexDirection: "row", + alignItems: "center", + }, + categoryGridIconWrapper: { + width: moderateScale(36), + height: moderateScale(36), + borderRadius: moderateScale(10), + justifyContent: "center", + alignItems: "center", + marginRight: moderateScale(10), + }, + categoryGridTextContainer: { + flex: 1, + }, + categoryGridTitle: { + fontSize: moderateScale(14), + fontWeight: "700", + color: Colors.textPrimary, + }, +}); \ No newline at end of file diff --git a/src/screens/modules/ModulesIndexScreen.tsx b/src/screens/modules/ModulesIndexScreen.tsx new file mode 100644 index 0000000..f654f40 --- /dev/null +++ b/src/screens/modules/ModulesIndexScreen.tsx @@ -0,0 +1,395 @@ +import React, { useCallback, useEffect, useMemo } from "react"; +import { + ScrollView, + StyleSheet, + Text, + TouchableOpacity, + View, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { router, useFocusEffect } from "expo-router"; +import { Ionicons } from "@expo/vector-icons"; +import { moderateScale, verticalScale } from "react-native-size-matters"; + +import { Colors } from "@/theme"; +import { useAuthStore } from "@/store/auth.store"; +import { useModulesQuery } from "@/features/content/hooks/use-content-queries"; +import { buildContentReferenceRoute } from "@/features/content/utils/content-reference"; +import { isModuleUnlockedByAccess } from "@/features/access/module-access"; +import { + ModuleIndexItem, + normalizeModuleListResponse, + toModuleIndexItem, +} from "@/features/modules/module-index"; + +export default function ModulesIndexScreen() { + const { + access, + accessToken, + refreshAccess, + setModules, + setLastViewedModule, + } = useAuthStore(); + + const modulesQuery = useModulesQuery(); + const modules = useMemo( + () => normalizeModuleListResponse(modulesQuery.data), + [modulesQuery.data], + ); + + useEffect(() => { + setModules( + modules.map((module) => { + const item = toModuleIndexItem(module); + return { + id: module.id, + code: module.code, + slug: module.slug, + isDefaultFree: item.isDefaultFree, + }; + }), + ); + }, [modules, setModules]); + + useFocusEffect( + useCallback(() => { + if (accessToken) { + void refreshAccess(); + } + }, [accessToken, refreshAccess]), + ); + + const items = useMemo( + () => modules.filter((module) => module.is_active).map(toModuleIndexItem), + [modules], + ); + + const categories = useMemo( + () => Array.from(new Set(items.map((item) => item.category))), + [items], + ); + + const isUnlocked = useCallback( + (item: ModuleIndexItem) => { + if (!accessToken) return false; + return isModuleUnlockedByAccess(item.module, access); + }, + [access, accessToken], + ); + + const handleModulePress = useCallback( + (item: ModuleIndexItem) => { + if (!accessToken) { + router.push("/register"); + return; + } + + if (!isUnlocked(item)) { + router.push({ + pathname: "/subscription", + params: { + moduleId: item.module.id, + moduleCode: item.module.code, + title: item.title, + category: item.category, + desc: item.description, + planCode: item.planCode, + }, + }); + return; + } + + setLastViewedModule({ + moduleId: item.module.id, + moduleCode: item.module.code, + moduleSlug: item.module.slug, + entryTemplateCode: item.reference.target.template_code, + title: item.title, + description: item.description, + icon: item.icon, + color: item.color, + category: item.category, + }); + + router.push(buildContentReferenceRoute(item.reference) as never); + }, + [accessToken, isUnlocked, setLastViewedModule], + ); + + return ( + + + + router.replace("/")} + style={styles.backButton} + accessibilityRole="button" + accessibilityLabel="Go to home" + > + + + All Modules + router.push("/search")} + style={styles.searchButton} + accessibilityRole="button" + accessibilityLabel="Search all content" + > + + + + + + + Explore all modules. Unlock to access complete content. + + + {modulesQuery.isError ? ( + + + Unable to load modules. Please try again. + void modulesQuery.refetch()}> + Retry + + + ) : null} + + {categories.map((category) => { + const categoryModules = items.filter( + (item) => item.category === category, + ); + + return ( + + {category} + + {categoryModules.map((item, index) => { + const unlocked = isUnlocked(item); + + return ( + + handleModulePress(item)} + > + + + + + + {item.title} + + {item.description} + + + + {unlocked ? ( + + Open + + ) : ( + + )} + + + {index < categoryModules.length - 1 ? ( + + ) : null} + + ); + })} + + + ); + })} + + + + + Unlock any module to access complete knowledge and features. + + + + + + ); +} + +const styles = StyleSheet.create({ + safeArea: { + flex: 1, + backgroundColor: Colors.background, + }, + container: { + flex: 1, + }, + header: { + height: 60, + flexDirection: "row", + alignItems: "center", + justifyContent: "space-between", + paddingHorizontal: moderateScale(16), + borderBottomWidth: 1, + borderBottomColor: "#ECECEC", + backgroundColor: "#FFFFFF", + }, + backButton: { + padding: 4, + }, + headerTitle: { + fontSize: moderateScale(18), + fontWeight: "700", + color: Colors.textPrimary, + }, + searchButton: { + width: 32, + height: 32, + alignItems: "center", + justifyContent: "center", + }, + scrollContent: { + paddingHorizontal: moderateScale(24), + paddingTop: verticalScale(16), + paddingBottom: verticalScale(32), + }, + subtitle: { + fontSize: moderateScale(14), + color: Colors.textSecondary, + textAlign: "center", + marginBottom: verticalScale(24), + lineHeight: 20, + }, + card: { + backgroundColor: "#FFFFFF", + borderRadius: moderateScale(16), + borderWidth: 1, + borderColor: "#E5E7EB", + overflow: "hidden", + }, + row: { + flexDirection: "row", + alignItems: "center", + padding: moderateScale(14), + }, + iconWrapper: { + width: moderateScale(40), + height: moderateScale(40), + borderRadius: moderateScale(20), + justifyContent: "center", + alignItems: "center", + }, + textContainer: { + flex: 1, + marginLeft: moderateScale(12), + marginRight: moderateScale(12), + }, + moduleTitle: { + fontSize: moderateScale(15), + fontWeight: "600", + color: Colors.textPrimary, + marginBottom: 2, + }, + moduleDesc: { + fontSize: moderateScale(12), + color: Colors.textSecondary, + }, + openButton: { + backgroundColor: "#4F46E5", + paddingHorizontal: moderateScale(16), + paddingVertical: verticalScale(6), + borderRadius: moderateScale(12), + }, + openButtonText: { + color: "#FFFFFF", + fontSize: moderateScale(12), + fontWeight: "700", + }, + lockIcon: { + paddingRight: 4, + }, + separator: { + height: 1, + backgroundColor: "#F3F4F6", + }, + footerNote: { + flexDirection: "row", + alignItems: "center", + backgroundColor: "#E8F5E9", + padding: moderateScale(14), + borderRadius: moderateScale(14), + borderWidth: 1, + borderColor: "#C8E6C9", + marginTop: verticalScale(8), + }, + footerNoteIcon: { + marginRight: moderateScale(10), + }, + footerNoteText: { + flex: 1, + fontSize: moderateScale(13), + color: Colors.primaryDark, + lineHeight: 18, + }, + categorySection: { + marginBottom: verticalScale(20), + }, + categoryTitle: { + fontSize: moderateScale(12), + fontWeight: "700", + color: Colors.textSecondary, + textTransform: "uppercase", + letterSpacing: 1, + marginBottom: verticalScale(8), + marginLeft: moderateScale(4), + }, + errorCard: { + flexDirection: "row", + alignItems: "center", + backgroundColor: "#FFFFFF", + borderRadius: moderateScale(14), + borderWidth: 1, + borderColor: "#E5E7EB", + padding: moderateScale(14), + marginBottom: verticalScale(20), + }, + errorIcon: { + marginRight: moderateScale(8), + }, + errorText: { + flex: 1, + fontSize: moderateScale(12), + color: Colors.textSecondary, + }, + retryText: { + fontSize: moderateScale(12), + fontWeight: "700", + color: Colors.primary, + }, +}); diff --git a/src/screens/profile/EditProfileScreen.tsx b/src/screens/profile/EditProfileScreen.tsx new file mode 100644 index 0000000..bff9bee --- /dev/null +++ b/src/screens/profile/EditProfileScreen.tsx @@ -0,0 +1,103 @@ +import React from "react"; +import { + KeyboardAvoidingView, + Platform, + ScrollView, + StyleSheet, + View, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { + moderateScale, + verticalScale, +} from "react-native-size-matters"; +import { router } from "expo-router"; +import EditProfileHeader from "@/features/profile/components/EditProfileHeader"; +import { Colors } from "@/theme"; +import EditProfileForm from "@/features/profile/components/EditProfileForm"; +import EditProfileAvatar from "@/features/profile/components/EditProfileAvatar"; +import { useAuthStore } from "@/store/auth.store"; +import { apiClient } from "@/api"; + +export default function EditProfileScreen() { + const user = useAuthStore((state) => state.user); + const refreshIdentity = useAuthStore((state) => state.refreshIdentity); + + const handleSave = async (updatedName: string, updatedPhone: string) => { + if (user) { + try { + await apiClient.put("/auth/profile", { + full_name: updatedName, + phone_number: updatedPhone, + }); + + await refreshIdentity(); + } catch (err: any) { + console.warn("Failed to update profile:", err); + alert("Failed to save changes. Please try again."); + } + } + router.back(); + }; + + return ( + + + + + + + + { + // TODO: Open image picker + }} + /> + + + + {/* Step 4 */} + {/* EditProfileForm */} + + {/* Step 5 */} + {/* Save Button */} + + + + + ); +} + +const styles = StyleSheet.create({ + safeArea: { + flex: 1, + backgroundColor: Colors.background, + }, + + keyboardContainer: { + flex: 1, + }, + + contentContainer: { + flexGrow: 1, + paddingBottom: verticalScale(24), + }, + + container: { + flex: 1, + paddingHorizontal: moderateScale(24), + paddingTop: verticalScale(20), + }, +}); \ No newline at end of file diff --git a/src/screens/profile/ProfileOverviewScreen.tsx b/src/screens/profile/ProfileOverviewScreen.tsx new file mode 100644 index 0000000..ba43136 --- /dev/null +++ b/src/screens/profile/ProfileOverviewScreen.tsx @@ -0,0 +1,176 @@ +import React from "react"; +import { + ScrollView, + StyleSheet, + View, + Text, + TouchableOpacity, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { + moderateScale, + verticalScale, +} from "react-native-size-matters"; +import { router } from "expo-router"; +import { Ionicons } from "@expo/vector-icons"; + +import { Colors } from "@/theme"; + +import ProfileHeader from "@/features/profile/components/ProfileHeader"; +import ProfileAvatar from "@/features/profile/components/ProfileAvatar"; +import ProfileOverviewCard from "@/features/profile/components/ProfileOverviewCard"; +import { useAuthStore } from "@/store/auth.store"; + +export default function ProfileOverviewScreen() { + const { user, accessToken } = useAuthStore(); + const displayName = user?.name || "User Name"; + const displayEmail = user?.email || "user@example.com"; + + if (!accessToken) { + return ( + + + + + + + Join AcuPedia + + Sign in or create an account to unlock premium clinical modules, track your learning progress, and customize your profile references. + + + router.push("/login")} + > + Log In + + + router.push("/register")} + > + Create Account + + + + + ); + } + + return ( + + + + { + router.push("/settings"); + }} + /> + + { + router.push("/profile/edit"); + }} + /> + + + + {/* + Step 5 + Bottom Navigation + */} + + + + ); +} + +const styles = StyleSheet.create({ + safeArea: { + flex: 1, + backgroundColor: Colors.background, + }, + + contentContainer: { + flexGrow: 1, + paddingBottom: verticalScale(24), + }, + + container: { + flex: 1, + paddingHorizontal: moderateScale(24), + paddingTop: verticalScale(20), + }, + + guestContentContainer: { + flexGrow: 1, + justifyContent: "center", + paddingHorizontal: moderateScale(24), + paddingBottom: verticalScale(40), + }, + guestCard: { + backgroundColor: "#FFFFFF", + borderRadius: moderateScale(24), + borderWidth: 1, + borderColor: "#E5E7EB", + padding: moderateScale(28), + alignItems: "center", + shadowColor: "#000000", + shadowOffset: { width: 0, height: 4 }, + shadowOpacity: 0.05, + shadowRadius: 10, + elevation: 2, + }, + guestIconWrapper: { + marginBottom: verticalScale(16), + }, + guestTitle: { + fontSize: moderateScale(22), + fontWeight: "800", + color: Colors.textPrimary, + marginBottom: verticalScale(8), + }, + guestSubtitle: { + fontSize: moderateScale(14), + color: Colors.textSecondary, + textAlign: "center", + lineHeight: 20, + marginBottom: verticalScale(28), + }, + guestLoginButton: { + width: "100%", + backgroundColor: Colors.primary, + borderRadius: moderateScale(14), + paddingVertical: verticalScale(13), + alignItems: "center", + marginBottom: verticalScale(12), + }, + guestLoginButtonText: { + fontSize: moderateScale(15), + fontWeight: "700", + color: "#FFFFFF", + }, + guestSignupButton: { + width: "100%", + backgroundColor: "#FFFFFF", + borderWidth: 2, + borderColor: Colors.primary, + borderRadius: moderateScale(14), + paddingVertical: verticalScale(12), + alignItems: "center", + }, + guestSignupButtonText: { + fontSize: moderateScale(15), + fontWeight: "700", + color: Colors.primary, + }, +}); \ No newline at end of file diff --git a/src/store/app.store.ts b/src/store/app.store.ts new file mode 100644 index 0000000..6c2c98d --- /dev/null +++ b/src/store/app.store.ts @@ -0,0 +1,16 @@ +import { create } from "zustand"; + +import { AppState } from "./types"; + +interface AppStore extends AppState { + setLoading: (value: boolean) => void; +} + +export const useAppStore = create((set) => ({ + isLoading: false, + + setLoading: (value) => + set({ + isLoading: value, + }), +})); \ No newline at end of file diff --git a/src/store/auth.store.ts b/src/store/auth.store.ts new file mode 100644 index 0000000..9c8381c --- /dev/null +++ b/src/store/auth.store.ts @@ -0,0 +1,267 @@ +import AsyncStorage from "@react-native-async-storage/async-storage"; +import { create } from "zustand"; +import { createJSONStorage, persist } from "zustand/middleware"; + +import { + clearApiAccessToken, + setApiAccessToken, +} from "@/api/access-token"; +import { getAccessMe } from "@/features/access/api/access.api"; +import { getMe } from "@/features/auth/api/auth.api"; + +import type { + AccessMeResponse, + AuthTokenResponse, + User, + UserIdentity, +} from "./types"; + +interface ModuleLike { + id?: string; + code?: string | null; + slug?: string | null; + isDefaultFree?: boolean; +} + +export interface LastViewedModule { + moduleId: string; + moduleCode: string; + moduleSlug: string; + entryTemplateCode: string; + title: string; + description: string; + icon: string; + color: string; + category: string; +} + +interface AuthStore { + accessToken: string | null; + user: User | null; + access: AccessMeResponse | null; + isAuthenticated: boolean; + registeredUser: User | null; + + /** + * Compatibility field for existing module/library screens. + * It is derived from /access/me unlocked codes/slugs plus UI-declared + * free modules. Paid access policy is never recalculated from plan codes. + */ + purchasedModuleIds: string[]; + + lastViewedModule: LastViewedModule | null; + modules: ModuleLike[]; + + setModules: (modules: ModuleLike[]) => void; + setTokens: (accessToken: string) => void; + setUser: (user: User | null) => void; + setRegisteredUser: (user: User | null) => void; + setLastViewedModule: (module: LastViewedModule | null) => void; + + establishSession: (response: AuthTokenResponse) => Promise; + refreshIdentity: () => Promise; + refreshAccess: () => Promise; + refreshSession: () => Promise; + logout: () => void; +} + +function mapIdentityToUser(identity: UserIdentity): User { + return { + id: identity.id, + name: identity.display_name ?? identity.email.split("@", 1)[0], + email: identity.email, + phone_number: identity.phone_number ?? "", + country: identity.country || "India", + roles: identity.roles ?? [], + is_active: identity.is_active ?? undefined, + created_at: identity.created_at ?? undefined, + }; +} + +function mapTokenUserToUser(response: AuthTokenResponse): User { + const user = response.user; + return { + id: user.id, + name: user.display_name ?? user.email.split("@", 1)[0], + email: user.email, + phone_number: user.phone_number ?? "", + country: user.country || "India", + roles: user.roles ?? [], + }; +} + +function derivePurchasedModuleIds( + modules: ModuleLike[], + access: AccessMeResponse | null, +): string[] { + const sourceModules = modules; + const unlockedCodes = new Set(access?.unlocked_module_codes ?? []); + const unlockedSlugs = new Set(access?.unlocked_module_slugs ?? []); + + return sourceModules + .filter((module) => { + if (module.code && unlockedCodes.has(module.code)) return true; + if (module.slug && unlockedSlugs.has(module.slug)) return true; + if (module.id && unlockedSlugs.has(module.id)) return true; + + return false; + }) + .map((module) => module.id) + .filter((id): id is string => Boolean(id)); +} + +export const useAuthStore = create()( + persist( + (set, get) => ({ + accessToken: null, + user: null, + access: null, + isAuthenticated: false, + registeredUser: null, + purchasedModuleIds: [], + lastViewedModule: null, + modules: [], + + setModules: (modules) => { + set((state) => ({ + modules, + purchasedModuleIds: derivePurchasedModuleIds( + modules, + state.access, + ), + })); + }, + + setTokens: (accessToken) => { + setApiAccessToken(accessToken); + set({ + accessToken, + isAuthenticated: true, + }); + }, + + setUser: (user) => set({ user }), + + setRegisteredUser: (registeredUser) => + set({ registeredUser }), + + setLastViewedModule: (lastViewedModule) => + set({ lastViewedModule }), + + establishSession: async (response) => { + setApiAccessToken(response.access_token); + set({ + accessToken: response.access_token, + isAuthenticated: true, + user: mapTokenUserToUser(response), + access: null, + purchasedModuleIds: [], + }); + + // Refresh canonical identity and access independently. A temporary + // access-service failure must not invalidate an otherwise valid login. + await Promise.allSettled([ + get().refreshIdentity(), + get().refreshAccess(), + ]); + }, + + refreshIdentity: async () => { + const token = get().accessToken; + if (!token) { + set({ user: null }); + return; + } + + const identity = await getMe(); + set({ user: mapIdentityToUser(identity) }); + }, + + refreshAccess: async () => { + const state = get(); + if (!state.accessToken) { + set({ + access: null, + purchasedModuleIds: derivePurchasedModuleIds( + state.modules, + null, + ), + }); + return; + } + + const access = await getAccessMe(); + set((current) => ({ + access, + purchasedModuleIds: derivePurchasedModuleIds( + current.modules, + access, + ), + })); + }, + + refreshSession: async () => { + if (!get().accessToken) return; + + const [identityResult, accessResult] = await Promise.allSettled([ + get().refreshIdentity(), + get().refreshAccess(), + ]); + + // Identity 401/invalid-token is handled conservatively by clearing the + // local session. Access failures are non-fatal and leave prior access + // state intact for transient-network resilience. + if (identityResult.status === "rejected") { + const err = identityResult.reason as { + response?: { status?: number }; + status?: number; + }; + const status = err?.response?.status ?? err?.status; + if (status === 401) { + get().logout(); + } + } + + if (accessResult.status === "rejected") { + console.warn( + "Failed to refresh access state:", + accessResult.reason, + ); + } + }, + + logout: () => { + clearApiAccessToken(); + set({ + accessToken: null, + user: null, + access: null, + isAuthenticated: false, + purchasedModuleIds: derivePurchasedModuleIds( + get().modules, + null, + ), + lastViewedModule: null, + }); + }, + }), + { + name: "auth-storage", + storage: createJSONStorage(() => AsyncStorage), + partialize: (state) => ({ + accessToken: state.accessToken, + user: state.user, + isAuthenticated: state.isAuthenticated, + registeredUser: state.registeredUser, + lastViewedModule: state.lastViewedModule, + }), + onRehydrateStorage: () => (state, error) => { + if (error) { + clearApiAccessToken(); + return; + } + setApiAccessToken(state?.accessToken ?? null); + }, + }, + ), +); diff --git a/src/store/index.ts b/src/store/index.ts new file mode 100644 index 0000000..0994c17 --- /dev/null +++ b/src/store/index.ts @@ -0,0 +1,4 @@ +export * from "./auth.store"; +export * from "./app.store"; +export * from "./settings.store"; +export * from "./types"; \ No newline at end of file diff --git a/src/store/settings.store.ts b/src/store/settings.store.ts new file mode 100644 index 0000000..da1bbca --- /dev/null +++ b/src/store/settings.store.ts @@ -0,0 +1,16 @@ +import { create } from "zustand"; + +import { SettingsState } from "./types"; + +interface SettingsStore extends SettingsState { + setTheme: (theme: "light" | "dark") => void; +} + +export const useSettingsStore = create((set) => ({ + theme: "light", + + setTheme: (theme) => + set({ + theme, + }), +})); \ No newline at end of file diff --git a/src/store/types.ts b/src/store/types.ts new file mode 100644 index 0000000..5af15d8 --- /dev/null +++ b/src/store/types.ts @@ -0,0 +1,113 @@ +export interface UserIdentity { + id: string; + email: string; + display_name: string | null; + phone_number: string | null; + country: string; + roles: string[]; + is_active: boolean | null; + created_at: string | null; +} + +/** + * Backward-compatible UI shape used by existing screens. + * Identity fields are sourced only from /auth/me. + */ +export interface User { + id: string; + name: string; + email: string; + phone_number?: string; + country?: string; + roles?: string[]; + is_active?: boolean; + created_at?: string; +} + +export interface ActiveSubscription { + id: string; + plan_code: string; + status: string; + started_at: string; + expires_at: string | null; +} + +export interface ActiveEntitlement { + id: string; + module_id: string; + module_code: string | null; + module_slug: string; + module_name: string; + status: string; + granted_at: string; + expires_at: string | null; + source_subscription_id: string | null; + source_plan_id: string | null; +} + +export interface AccessMeResponse { + user_id: string; + active_subscriptions: ActiveSubscription[]; + active_entitlements: ActiveEntitlement[]; + unlocked_module_codes: string[]; + unlocked_module_slugs: string[]; +} + +export interface AuthTokenUser { + id: string; + email: string; + display_name: string | null; + phone_number: string | null; + country: string; + roles: string[]; +} + +export interface AuthTokenResponse { + access_token: string; + token_type: "bearer" | string; + user: AuthTokenUser; +} + +export interface LoginRequest { + email?: string; + phone_number?: string; + password: string; +} + +export interface RegisterRequest { + email: string; + password: string; + phone_number?: string; + full_name?: string; + country?: string; +} + +export interface ForgotPasswordRequest { + email: string; +} + +export interface ResetPasswordRequest { + email: string; + otp_code: string; + new_password: string; +} + +export interface StatusMessageResponse { + status: string; + message: string; +} + +export interface AuthState { + accessToken: string | null; + user: User | null; + access: AccessMeResponse | null; + isAuthenticated: boolean; +} + +export interface AppState { + isLoading: boolean; +} + +export interface SettingsState { + theme: "light" | "dark"; +} diff --git a/src/theme/breakpoints.ts b/src/theme/breakpoints.ts new file mode 100644 index 0000000..1e1c673 --- /dev/null +++ b/src/theme/breakpoints.ts @@ -0,0 +1,5 @@ +export const Breakpoints = { + phone: 0, + tablet: 768, + desktop: 1024, +}; \ No newline at end of file diff --git a/src/theme/colors.ts b/src/theme/colors.ts new file mode 100644 index 0000000..4d1a0fe --- /dev/null +++ b/src/theme/colors.ts @@ -0,0 +1,24 @@ +export const Colors = { + primary: "#2E7D32", + primaryDark: "#1B5E20", + primaryLight: "#81C784", + + secondary: "#1565C0", + + background: "#FFFFFF", + surface: "#F8F9FA", + + text: "#212121", + textPrimary: "#212121", + textSecondary: "#616161", + + border: "#E0E0E0", + + success: "#2E7D32", + warning: "#F9A825", + error: "#D32F2F", + info: "#0288D1", + + white: "#FFFFFF", + black: "#000000", +}; \ No newline at end of file diff --git a/src/theme/fonts.ts b/src/theme/fonts.ts new file mode 100644 index 0000000..dd18b05 --- /dev/null +++ b/src/theme/fonts.ts @@ -0,0 +1,10 @@ +// src/theme/fonts.ts + +export const fonts = { + regular: "Inter-Regular", + medium: "Inter-Medium", + semiBold: "Inter-SemiBold", + bold: "Inter-Bold", +} as const; + +export type FontWeight = keyof typeof fonts; \ No newline at end of file diff --git a/src/theme/index.ts b/src/theme/index.ts new file mode 100644 index 0000000..faafa86 --- /dev/null +++ b/src/theme/index.ts @@ -0,0 +1,7 @@ +export * from "./colors"; +export * from "./spacing"; +export * from "./fonts"; +export * from "./typography"; +export * from "./radius"; +export * from "./shadows"; +export * from "./breakpoints"; \ No newline at end of file diff --git a/src/theme/radius.ts b/src/theme/radius.ts new file mode 100644 index 0000000..6b70e51 --- /dev/null +++ b/src/theme/radius.ts @@ -0,0 +1,7 @@ +export const Radius = { + sm: 4, + md: 8, + lg: 12, + xl: 16, + full: 999, +}; \ No newline at end of file diff --git a/src/theme/shadows.ts b/src/theme/shadows.ts new file mode 100644 index 0000000..386ccc1 --- /dev/null +++ b/src/theme/shadows.ts @@ -0,0 +1,19 @@ +import { Platform } from "react-native"; + +export const Shadows = { + card: Platform.select({ + ios: { + shadowColor: "#000", + shadowOpacity: 0.08, + shadowRadius: 6, + shadowOffset: { + width: 0, + height: 3, + }, + }, + android: { + elevation: 3, + }, + default: {}, + }), +}; \ No newline at end of file diff --git a/src/theme/spacing.ts b/src/theme/spacing.ts new file mode 100644 index 0000000..ea8536e --- /dev/null +++ b/src/theme/spacing.ts @@ -0,0 +1,8 @@ +export const Spacing = { + xs: 4, + sm: 8, + md: 16, + lg: 24, + xl: 32, + xxl: 40, +}; \ No newline at end of file diff --git a/src/theme/typography.ts b/src/theme/typography.ts new file mode 100644 index 0000000..d361eb8 --- /dev/null +++ b/src/theme/typography.ts @@ -0,0 +1,61 @@ +// src/theme/typography.ts + +import type { TextStyle } from "react-native"; + +import { fonts } from "./fonts"; + +export const FontSize = { + h1: 32, + h2: 28, + h3: 24, + title: 20, + body: 16, + caption: 14, + small: 12, +} as const; + +export const Typography = { + h1: { + fontFamily: fonts.bold, + fontSize: FontSize.h1, + lineHeight: 40, + }, + + h2: { + fontFamily: fonts.bold, + fontSize: FontSize.h2, + lineHeight: 36, + }, + + h3: { + fontFamily: fonts.semiBold, + fontSize: FontSize.h3, + lineHeight: 32, + }, + + title: { + fontFamily: fonts.semiBold, + fontSize: FontSize.title, + lineHeight: 28, + }, + + body: { + fontFamily: fonts.regular, + fontSize: FontSize.body, + lineHeight: 24, + }, + + caption: { + fontFamily: fonts.regular, + fontSize: FontSize.caption, + lineHeight: 20, + }, + + small: { + fontFamily: fonts.regular, + fontSize: FontSize.small, + lineHeight: 16, + }, +} satisfies Record; + +export type TypographyVariant = keyof typeof Typography; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..2e9a669 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "expo/tsconfig.base", + "compilerOptions": { + "strict": true, + "paths": { + "@/*": [ + "./src/*" + ], + "@/assets/*": [ + "./assets/*" + ] + } + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ".expo/types/**/*.ts", + "expo-env.d.ts" + ] +}